Commit ceddffaa authored by rwlbuis's avatar rwlbuis

Reviewed by Eric.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=10558
        SVG should have support for <metadata> element

        Add support for metadata tag.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3924f3a0
2006-08-27 Rob Buis <buis@kde.org>
Reviewed by Eric.
Testcase for:
http://bugzilla.opendarwin.org/show_bug.cgi?id=10558
SVG should have support for <metadata> element
* svg/custom/create-metadata-element-expected.checksum: Added.
* svg/custom/create-metadata-element-expected.png: Added.
* svg/custom/create-metadata-element-expected.txt: Added.
* svg/custom/create-metadata-element.svg: Added.
2006-08-25 Adele Peterson <adele@apple.com>
Updated results for addition of -webkit-text-security.
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
KCanvasContainer {svg} at (0,0) size 100x100
KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
<svg version="1.1" baseProfile="basic" id="svg-root" width="100%" height="100%"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg" onload="myfunc()">
<script>
function myfunc() {
var meta = document.createElementNS("http://www.w3.org/2000/svg", "metadata");
if([meta] == "[object SVGMetadataElement]") {
document.getElementById("rect").setAttributeNS(null, "display", "visible");}
}
</script>
<rect id="rect" width="100" height="100" fill="green" display="none"/>
</svg>
2006-08-27 Rob Buis <buis@kde.org>
Reviewed by Eric.
http://bugzilla.opendarwin.org/show_bug.cgi?id=10558
SVG should have support for <metadata> element
Add support for metadata tag.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* ksvg2/bindings/js/JSSVGElementWrapperFactory.cpp:
* ksvg2/svg/SVGMetadataElement.cpp: Added.
(SVGMetadataElement::SVGMetadataElement):
(SVGMetadataElement::~SVGMetadataElement):
* ksvg2/svg/SVGMetadataElement.h: Added.
* ksvg2/svg/SVGMetadataElement.idl: Added.
* ksvg2/svg/svgtags.in:
2006-08-26 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Eric.
......
......@@ -130,6 +130,7 @@ all : \
JSSVGElement.h \
JSSVGLength.h \
JSSVGMatrix.h \
JSSVGMetadataElement.h \
JSSVGPointTable.cpp \
JSSVGRectTable.cpp \
JSSVGSVGElement.h \
......
......@@ -1394,6 +1394,10 @@
A8FEFB0B0979F472005839FD /* RenderForeignObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8FEFB090979F472005839FD /* RenderForeignObject.cpp */; };
A8FEFB310979F4F6005839FD /* SVGForeignObjectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8FEFB2F0979F4F6005839FD /* SVGForeignObjectElement.cpp */; };
A8FEFB320979F4F6005839FD /* SVGForeignObjectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A8FEFB300979F4F6005839FD /* SVGForeignObjectElement.h */; };
AA84FC850AA0FE08007699AF /* JSSVGMetadataElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA84FC830AA0FE08007699AF /* JSSVGMetadataElement.cpp */; };
AA84FC860AA0FE08007699AF /* JSSVGMetadataElement.h in Headers */ = {isa = PBXBuildFile; fileRef = AA84FC840AA0FE08007699AF /* JSSVGMetadataElement.h */; };
AAC8DAB10AA1002000DC0907 /* SVGMetadataElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAC8DAAF0AA1002000DC0907 /* SVGMetadataElement.cpp */; };
AAC8DAB20AA1002000DC0907 /* SVGMetadataElement.h in Headers */ = {isa = PBXBuildFile; fileRef = AAC8DAB00AA1002000DC0907 /* SVGMetadataElement.h */; };
AB23A31209BBA7760067CC53 /* HTMLTextFieldInnerElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB23A31009BBA7760067CC53 /* HTMLTextFieldInnerElement.cpp */; };
AB23A31309BBA7760067CC53 /* HTMLTextFieldInnerElement.h in Headers */ = {isa = PBXBuildFile; fileRef = AB23A31109BBA7760067CC53 /* HTMLTextFieldInnerElement.h */; };
AB23A32709BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB23A32509BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp */; };
......@@ -1611,23 +1615,6 @@
FAE04190097596C9000540BE /* SVGImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = FAE0418E097596C9000540BE /* SVGImageLoader.h */; };
/* End PBXBuildFile section */
/* Begin PBXBuildStyle section */
BC57BF170AA0243000A43CF1 /* Development */ = {
isa = PBXBuildStyle;
buildSettings = {
COPY_PHASE_STRIP = NO;
};
name = Development;
};
BC57BF180AA0243000A43CF1 /* Deployment */ = {
isa = PBXBuildStyle;
buildSettings = {
COPY_PHASE_STRIP = YES;
};
name = Deployment;
};
/* End PBXBuildStyle section */
/* Begin PBXContainerItemProxy section */
DD041FF009D9E3250010AF2A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
......@@ -3181,6 +3168,10 @@
A8FEFB090979F472005839FD /* RenderForeignObject.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderForeignObject.cpp; sourceTree = "<group>"; };
A8FEFB2F0979F4F6005839FD /* SVGForeignObjectElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGForeignObjectElement.cpp; sourceTree = "<group>"; };
A8FEFB300979F4F6005839FD /* SVGForeignObjectElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGForeignObjectElement.h; sourceTree = "<group>"; };
AA84FC830AA0FE08007699AF /* JSSVGMetadataElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGMetadataElement.cpp; sourceTree = "<group>"; };
AA84FC840AA0FE08007699AF /* JSSVGMetadataElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSSVGMetadataElement.h; sourceTree = "<group>"; };
AAC8DAAF0AA1002000DC0907 /* SVGMetadataElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGMetadataElement.cpp; sourceTree = "<group>"; };
AAC8DAB00AA1002000DC0907 /* SVGMetadataElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGMetadataElement.h; sourceTree = "<group>"; };
AB23A31009BBA7760067CC53 /* HTMLTextFieldInnerElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLTextFieldInnerElement.cpp; sourceTree = "<group>"; };
AB23A31109BBA7760067CC53 /* HTMLTextFieldInnerElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLTextFieldInnerElement.h; sourceTree = "<group>"; };
AB23A32509BBA7D00067CC53 /* BeforeTextInsertedEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = BeforeTextInsertedEvent.cpp; sourceTree = "<group>"; };
......@@ -3585,6 +3576,8 @@
14DFB33F0A7DF7630018F769 /* Derived Sources */ = {
isa = PBXGroup;
children = (
AA84FC830AA0FE08007699AF /* JSSVGMetadataElement.cpp */,
AA84FC840AA0FE08007699AF /* JSSVGMetadataElement.h */,
65DF31D809D1C122000BE325 /* JSAttr.cpp */,
65DF31D909D1C123000BE325 /* JSAttr.h */,
65DF323309D1DE65000BE325 /* JSCanvasGradient.cpp */,
......@@ -4550,6 +4543,8 @@
A8C0F7FC089701F300BA5114 /* svg */ = {
isa = PBXGroup;
children = (
AAC8DAAF0AA1002000DC0907 /* SVGMetadataElement.cpp */,
AAC8DAB00AA1002000DC0907 /* SVGMetadataElement.h */,
A884283D09308C1C00B6D461 /* DOMList.h */,
A8C0F7FF089701F300BA5114 /* SVGAElement.cpp */,
A8C0F800089701F300BA5114 /* SVGAElement.h */,
......@@ -6446,6 +6441,8 @@
657429190A9C2D0B00C52C97 /* SQLTransaction.h in Headers */,
BC837C7C0A9D0D1A006B186A /* PDFDocumentImage.h in Headers */,
BC837CB60A9D10FE006B186A /* GraphicsContextPlatformPrivate.h in Headers */,
AA84FC860AA0FE08007699AF /* JSSVGMetadataElement.h in Headers */,
AAC8DAB20AA1002000DC0907 /* SVGMetadataElement.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -6479,12 +6476,6 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
buildSettings = {
};
buildStyles = (
BC57BF170AA0243000A43CF1 /* Development */,
BC57BF180AA0243000A43CF1 /* Deployment */,
);
hasScannedForEncodings = 1;
knownRegions = (
English,
......@@ -7331,6 +7322,8 @@
BC837C790A9D0D1A006B186A /* IntRectCG.cpp in Sources */,
BC837C7A0A9D0D1A006B186A /* IntSizeCG.cpp in Sources */,
BC837C7B0A9D0D1A006B186A /* PDFDocumentImage.cpp in Sources */,
AA84FC850AA0FE08007699AF /* JSSVGMetadataElement.cpp in Sources */,
AAC8DAB10AA1002000DC0907 /* SVGMetadataElement.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -23,10 +23,12 @@
#include "JSSVGElementWrapperFactory.h"
#include "JSSVGSVGElement.h"
#include "JSSVGMetadataElement.h"
#include "SVGNames.h"
#include "SVGSVGElement.h"
#include "SVGMetadataElement.h"
using namespace KJS;
......@@ -40,6 +42,7 @@ typedef DOMNode* (*CreateSVGElementWrapperFunction)(ExecState*, PassRefPtr<SVGEl
#define FOR_EACH_TAG(macro) \
macro(svg, SVG) \
macro(metadata, Metadata) \
// end of macro
#define CREATE_WRAPPER_FUNCTION(tag, name) \
......
/*
Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
2004, 2005 Rob Buis <buis@kde.org>
This file is part of the KDE project
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include "config.h"
#ifdef SVG_SUPPORT
#include "SVGMetadataElement.h"
using namespace WebCore;
SVGMetadataElement::SVGMetadataElement(const QualifiedName& tagName, Document *doc)
: SVGElement(tagName, doc)
{
}
SVGMetadataElement::~SVGMetadataElement()
{
}
#endif // SVG_SUPPORT
/*
Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
2004, 2005 Rob Buis <buis@kde.org>
This file is part of the KDE project
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef KSVG_SVGMetadataElementImpl_H
#define KSVG_SVGMetadataElementImpl_H
#ifdef SVG_SUPPORT
#include "SVGElement.h"
namespace WebCore
{
class SVGMetadataElement : public SVGElement
{
public:
SVGMetadataElement(const QualifiedName&, Document*);
virtual ~SVGMetadataElement();
};
} // namespace WebCore
#endif // SVG_SUPPORT
#endif
// vim:ts=4:noet
/*
Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
2004, 2005 Rob Buis <buis@kde.org>
Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
This file is part of the KDE project
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
module svg
{
interface [Conditional=SVG] SVGMetadataElement :
SVGElement {
};
};
......@@ -55,7 +55,7 @@ line
linearGradient
marker
mask
#metadata
metadata
#missing_glyph
#mpath
path
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment