<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[164473] trunk/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/164473">164473</a></dd>
<dt>Author</dt> <dd>ddkilzer@apple.com</dd>
<dt>Date</dt> <dd>2014-02-20 22:13:39 -0800 (Thu, 20 Feb 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Stop generating Objective-C bindings for the SVG DOM
<http://webkit.org/b/129107>
Reviewed by Timothy Hatcher.
Bug 114076 stopped compiling the Objective-C bindings for the
SVG DOM, but we continued to generate the header and source
files after that landed in <a href="http://trac.webkit.org/projects/webkit/changeset/147822">r147822</a>. This patch also stops
generating the unused header and source files.
* DerivedSources.make:
- Split BINDING_IDLS into NON_SVG_BINDING_IDLS and
SVG_BINDING_IDLS so that they may operated on separately.
- Define BINDING_IDLS again as the full list of IDL files.
- Rename DOM_CLASSES to JS_DOM_CLASSES so that JavaScript
bindings are still generated for all IDL files.
- Add OBJC_DOM_CLASSES so that Objective-C bindings are only
generated for non-SVG IDL files.
* bindings/scripts/CodeGeneratorObjC.pm:
(GetBaseClass):
(GetPropertyAttributes):
(AddIncludesForType):
(GenerateHeader):
(GenerateImplementation):
- Remove support for SVG classes.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorObjCpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (164472 => 164473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-21 06:07:37 UTC (rev 164472)
+++ trunk/Source/WebCore/ChangeLog        2014-02-21 06:13:39 UTC (rev 164473)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-02-20 David Kilzer <ddkilzer@apple.com>
+
+ Stop generating Objective-C bindings for the SVG DOM
+ <http://webkit.org/b/129107>
+
+ Reviewed by Timothy Hatcher.
+
+ Bug 114076 stopped compiling the Objective-C bindings for the
+ SVG DOM, but we continued to generate the header and source
+ files after that landed in r147822. This patch also stops
+ generating the unused header and source files.
+
+ * DerivedSources.make:
+ - Split BINDING_IDLS into NON_SVG_BINDING_IDLS and
+ SVG_BINDING_IDLS so that they may operated on separately.
+ - Define BINDING_IDLS again as the full list of IDL files.
+ - Rename DOM_CLASSES to JS_DOM_CLASSES so that JavaScript
+ bindings are still generated for all IDL files.
+ - Add OBJC_DOM_CLASSES so that Objective-C bindings are only
+ generated for non-SVG IDL files.
+
+ * bindings/scripts/CodeGeneratorObjC.pm:
+ (GetBaseClass):
+ (GetPropertyAttributes):
+ (AddIncludesForType):
+ (GenerateHeader):
+ (GenerateImplementation):
+ - Remove support for SVG classes.
+
</ins><span class="cx"> 2014-02-20 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><span class="cx"> RenderBox::updateShapeOutsideInfoAfterStyleChange shows up on profiles
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (164472 => 164473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2014-02-21 06:07:37 UTC (rev 164472)
+++ trunk/Source/WebCore/DerivedSources.make        2014-02-21 06:13:39 UTC (rev 164473)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> $(WebCore)/websockets \
</span><span class="cx"> #
</span><span class="cx">
</span><del>-BINDING_IDLS = \
</del><ins>+NON_SVG_BINDING_IDLS = \
</ins><span class="cx"> $(WebCore)/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl \
</span><span class="cx"> $(WebCore)/Modules/encryptedmedia/MediaKeyMessageEvent.idl \
</span><span class="cx"> $(WebCore)/Modules/encryptedmedia/MediaKeyNeededEvent.idl \
</span><span class="lines">@@ -485,6 +485,34 @@
</span><span class="cx"> $(WebCore)/plugins/DOMPluginArray.idl \
</span><span class="cx"> $(WebCore)/storage/Storage.idl \
</span><span class="cx"> $(WebCore)/storage/StorageEvent.idl \
</span><ins>+ $(WebCore)/testing/Internals.idl \
+ $(WebCore)/testing/InternalSettings.idl \
+ $(WebCore)/testing/MallocStatistics.idl \
+ $(WebCore)/testing/MemoryInfo.idl \
+ $(WebCore)/testing/TypeConversions.idl \
+ $(WebCore)/workers/AbstractWorker.idl \
+ $(WebCore)/workers/DedicatedWorkerGlobalScope.idl \
+ $(WebCore)/workers/SharedWorker.idl \
+ $(WebCore)/workers/SharedWorkerGlobalScope.idl \
+ $(WebCore)/workers/Worker.idl \
+ $(WebCore)/workers/WorkerGlobalScope.idl \
+ $(WebCore)/workers/WorkerLocation.idl \
+ $(WebCore)/xml/DOMParser.idl \
+ $(WebCore)/xml/XMLHttpRequest.idl \
+ $(WebCore)/xml/XMLHttpRequestException.idl \
+ $(WebCore)/xml/XMLHttpRequestProgressEvent.idl \
+ $(WebCore)/xml/XMLHttpRequestUpload.idl \
+ $(WebCore)/xml/XMLSerializer.idl \
+ $(WebCore)/xml/XPathEvaluator.idl \
+ $(WebCore)/xml/XPathException.idl \
+ $(WebCore)/xml/XPathExpression.idl \
+ $(WebCore)/xml/XPathNSResolver.idl \
+ $(WebCore)/xml/XPathResult.idl \
+ $(WebCore)/xml/XSLTProcessor.idl \
+ InternalSettingsGenerated.idl
+#
+
+SVG_BINDING_IDLS = \
</ins><span class="cx"> $(WebCore)/svg/SVGAElement.idl \
</span><span class="cx"> $(WebCore)/svg/SVGAltGlyphDefElement.idl \
</span><span class="cx"> $(WebCore)/svg/SVGAltGlyphElement.idl \
</span><span class="lines">@@ -633,32 +661,7 @@
</span><span class="cx"> $(WebCore)/svg/SVGViewElement.idl \
</span><span class="cx"> $(WebCore)/svg/SVGViewSpec.idl \
</span><span class="cx"> $(WebCore)/svg/SVGZoomAndPan.idl \
</span><del>- $(WebCore)/svg/SVGZoomEvent.idl \
- $(WebCore)/testing/Internals.idl \
- $(WebCore)/testing/InternalSettings.idl \
- $(WebCore)/testing/MallocStatistics.idl \
- $(WebCore)/testing/MemoryInfo.idl \
- $(WebCore)/testing/TypeConversions.idl \
- $(WebCore)/workers/AbstractWorker.idl \
- $(WebCore)/workers/DedicatedWorkerGlobalScope.idl \
- $(WebCore)/workers/SharedWorker.idl \
- $(WebCore)/workers/SharedWorkerGlobalScope.idl \
- $(WebCore)/workers/Worker.idl \
- $(WebCore)/workers/WorkerGlobalScope.idl \
- $(WebCore)/workers/WorkerLocation.idl \
- $(WebCore)/xml/DOMParser.idl \
- $(WebCore)/xml/XMLHttpRequest.idl \
- $(WebCore)/xml/XMLHttpRequestException.idl \
- $(WebCore)/xml/XMLHttpRequestProgressEvent.idl \
- $(WebCore)/xml/XMLHttpRequestUpload.idl \
- $(WebCore)/xml/XMLSerializer.idl \
- $(WebCore)/xml/XPathEvaluator.idl \
- $(WebCore)/xml/XPathException.idl \
- $(WebCore)/xml/XPathExpression.idl \
- $(WebCore)/xml/XPathNSResolver.idl \
- $(WebCore)/xml/XPathResult.idl \
- $(WebCore)/xml/XSLTProcessor.idl \
- InternalSettingsGenerated.idl
</del><ins>+ $(WebCore)/svg/SVGZoomEvent.idl
</ins><span class="cx"> #
</span><span class="cx">
</span><span class="cx"> ifeq ($(OS),MACOS)
</span><span class="lines">@@ -693,7 +696,7 @@
</span><span class="cx"> TouchEvent.idl \
</span><span class="cx"> TouchList.idl
</span><span class="cx">
</span><del>-BINDING_IDLS += $(ADDITIONAL_BINDING_IDLS)
</del><ins>+NON_SVG_BINDING_IDLS += $(ADDITIONAL_BINDING_IDLS)
</ins><span class="cx">
</span><span class="cx"> all : $(ADDITIONAL_BINDING_IDLS:%.idl=JS%.h)
</span><span class="cx">
</span><span class="lines">@@ -707,7 +710,7 @@
</span><span class="cx"> endif # MACOS
</span><span class="cx">
</span><span class="cx"> ifneq ($(WTF_PLATFORM_IOS), 1)
</span><del>-BINDING_IDLS += \
</del><ins>+NON_SVG_BINDING_IDLS += \
</ins><span class="cx"> $(WebCore)/dom/Touch.idl \
</span><span class="cx"> $(WebCore)/dom/TouchEvent.idl \
</span><span class="cx"> $(WebCore)/dom/TouchList.idl
</span><span class="lines">@@ -715,10 +718,12 @@
</span><span class="cx">
</span><span class="cx"> .PHONY : all
</span><span class="cx">
</span><del>-DOM_CLASSES=$(basename $(notdir $(BINDING_IDLS)))
</del><ins>+BINDING_IDLS = $(NON_SVG_BINDING_IDLS) $(SVG_BINDING_IDLS)
</ins><span class="cx">
</span><del>-JS_DOM_HEADERS=$(filter-out JSEventListener.h, $(DOM_CLASSES:%=JS%.h))
</del><ins>+JS_DOM_CLASSES=$(basename $(notdir $(BINDING_IDLS)))
</ins><span class="cx">
</span><ins>+JS_DOM_HEADERS=$(filter-out JSEventListener.h, $(JS_DOM_CLASSES:%=JS%.h))
+
</ins><span class="cx"> WEB_DOM_HEADERS :=
</span><span class="cx">
</span><span class="cx"> all : \
</span><span class="lines">@@ -1149,8 +1154,10 @@
</span><span class="cx">
</span><span class="cx"> ifeq ($(OS),MACOS)
</span><span class="cx">
</span><del>-OBJC_DOM_HEADERS=$(filter-out DOMDOMWindow.h DOMDOMMimeType.h DOMDOMPlugin.h,$(DOM_CLASSES:%=DOM%.h))
</del><ins>+OBJC_DOM_CLASSES=$(basename $(notdir $(NON_SVG_BINDING_IDLS)))
</ins><span class="cx">
</span><ins>+OBJC_DOM_HEADERS=$(filter-out DOMDOMWindow.h DOMDOMMimeType.h DOMDOMPlugin.h,$(OBJC_DOM_CLASSES:%=DOM%.h))
+
</ins><span class="cx"> all : $(OBJC_DOM_HEADERS)
</span><span class="cx">
</span><span class="cx"> all : CharsetData.cpp
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorObjCpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm (164472 => 164473)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm        2014-02-21 06:07:37 UTC (rev 164472)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm        2014-02-21 06:13:39 UTC (rev 164473)
</span><span class="lines">@@ -91,10 +91,7 @@
</span><span class="cx"> END
</span><span class="cx">
</span><span class="cx"> # Hashes
</span><del>-my %protocolTypeHash = ("XPathNSResolver" => 1, "EventListener" => 1, "EventTarget" => 1, "NodeFilter" => 1,
- "SVGFilterPrimitiveStandardAttributes" => 1,
- "SVGTests" => 1, "SVGLangSpace" => 1, "SVGExternalResourcesRequired" => 1, "SVGURIReference" => 1,
- "SVGZoomAndPan" => 1, "SVGFitToViewBox" => 1, "SVGAnimatedPathData" => 1);
</del><ins>+my %protocolTypeHash = ("XPathNSResolver" => 1, "EventListener" => 1, "EventTarget" => 1, "NodeFilter" => 1);
</ins><span class="cx"> my %nativeObjCTypeHash = ("URL" => 1, "Color" => 1);
</span><span class="cx">
</span><span class="cx"> # FIXME: this should be replaced with a function that recurses up the tree
</span><span class="lines">@@ -102,15 +99,7 @@
</span><span class="cx"> my %baseTypeHash = ("Object" => 1, "Node" => 1, "NodeList" => 1, "NamedNodeMap" => 1, "DOMImplementation" => 1,
</span><span class="cx"> "Event" => 1, "CSSRule" => 1, "CSSValue" => 1, "StyleSheet" => 1, "MediaList" => 1,
</span><span class="cx"> "Counter" => 1, "Rect" => 1, "RGBColor" => 1, "XPathExpression" => 1, "XPathResult" => 1,
</span><del>- "NodeIterator" => 1, "TreeWalker" => 1, "AbstractView" => 1, "Blob" => 1,
- "SVGAngle" => 1, "SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1, "SVGAnimatedEnumeration" => 1,
- "SVGAnimatedInteger" => 1, "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1,
- "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1,
- "SVGAnimatedPreserveAspectRatio" => 1, "SVGAnimatedRect" => 1, "SVGAnimatedString" => 1,
- "SVGAnimatedTransformList" => 1, "SVGLength" => 1, "SVGLengthList" => 1, "SVGMatrix" => 1,
- "SVGNumber" => 1, "SVGNumberList" => 1, "SVGPathSeg" => 1, "SVGPathSegList" => 1, "SVGPoint" => 1,
- "SVGPointList" => 1, "SVGPreserveAspectRatio" => 1, "SVGRect" => 1, "SVGRenderingIntent" => 1,
- "SVGStringList" => 1, "SVGTransform" => 1, "SVGTransformList" => 1, "SVGUnitTypes" => 1);
</del><ins>+ "NodeIterator" => 1, "TreeWalker" => 1, "AbstractView" => 1, "Blob" => 1);
</ins><span class="cx">
</span><span class="cx"> # Constants
</span><span class="cx"> my $buildingForIPhone = defined $ENV{PLATFORM_NAME} && ($ENV{PLATFORM_NAME} eq "iphoneos" or $ENV{PLATFORM_NAME} eq "iphonesimulator");
</span><span class="lines">@@ -500,7 +489,7 @@
</span><span class="cx">
</span><span class="cx"> return $parent if $parent eq "Object" or IsBaseType($parent);
</span><span class="cx"> return "Event" if $parent eq "UIEvent" or $parent eq "MouseEvent";
</span><del>- return "CSSValue" if $parent eq "SVGColor" or $parent eq "CSSValueList";
</del><ins>+ return "CSSValue" if $parent eq "CSSValueList";
</ins><span class="cx"> return "Node";
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -595,8 +584,6 @@
</span><span class="cx"> # FIXME: <rdar://problem/5049934> Consider using 'nonatomic' on the DOM @property declarations.
</span><span class="cx"> if ($codeGenerator->IsStringType($type) || IsNativeObjCType($type)) {
</span><span class="cx"> push(@attributes, "copy");
</span><del>- } elsif ($codeGenerator->IsSVGAnimatedType($type)) {
- push(@attributes, "strong");
</del><span class="cx"> } elsif (!$codeGenerator->IsStringType($type) && !$codeGenerator->IsPrimitiveType($type) && $type ne "DOMTimeStamp" && $type ne "CompareHow") {
</span><span class="cx"> push(@attributes, "strong");
</span><span class="cx"> }
</span><span class="lines">@@ -697,12 +684,6 @@
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if ($codeGenerator->IsSVGAnimatedType($type)) {
- $implIncludes{"${type}.h"} = 1;
- $implIncludes{"DOM${type}Internal.h"} = 1;
- return;
- }
-
</del><span class="cx"> if ($type =~ /(\w+)(Abs|Rel)$/) {
</span><span class="cx"> $implIncludes{"$1.h"} = 1;
</span><span class="cx"> $implIncludes{"DOM${type}Internal.h"} = 1;
</span><span class="lines">@@ -742,56 +723,6 @@
</span><span class="cx"> $implIncludes{"DOM${type}Internal.h"} = 1;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-sub GetSVGTypeWithNamespace
-{
- my $type = shift;
- my $typeWithNamespace = "WebCore::" . $codeGenerator->GetSVGTypeNeedingTearOff($type);
-
- # Special case for DOMSVGNumber
- $typeWithNamespace =~ s/</\<WebCore::/ unless $type eq "SVGNumber";
- return $typeWithNamespace;
-}
-
-sub GetSVGPropertyTypes
-{
- my $implType = shift;
-
- my $svgPropertyType;
- my $svgListPropertyType;
- my $svgNativeType;
-
- return ($svgPropertyType, $svgListPropertyType, $svgNativeType) if not $implType =~ /SVG/;
-
- $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($implType);
- return ($svgPropertyType, $svgListPropertyType, $svgNativeType) if not $svgNativeType;
-
- # Append space to avoid compilation errors when using PassRefPtr<$svgNativeType>
- $svgNativeType = "WebCore::$svgNativeType ";
- $svgNativeType =~ s/</\<WebCore::/ if not $svgNativeType =~ /float/;
-
- my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implType);
- if ($svgNativeType =~ /SVGPropertyTearOff/) {
- if ($svgWrappedNativeType eq "float") {
- # Special case for DOMSVGNumber
- $svgPropertyType = $svgWrappedNativeType;
- } else {
- $svgPropertyType = "WebCore::$svgWrappedNativeType";
- $svgPropertyType =~ s/</\<WebCore::/;
- }
- } elsif ($svgNativeType =~ /SVGListPropertyTearOff/ or $svgNativeType =~ /SVGStaticListPropertyTearOff/) {
- $svgListPropertyType = "WebCore::$svgWrappedNativeType";
- $svgListPropertyType =~ s/</\<WebCore::/;
- } elsif ($svgNativeType =~ /SVGTransformListPropertyTearOff/) {
- $svgListPropertyType = "WebCore::$svgWrappedNativeType";
- $svgListPropertyType =~ s/</\<WebCore::/;
- } elsif ($svgNativeType =~ /SVGPathSegListPropertyTearOff/) {
- $svgListPropertyType = "WebCore::$svgWrappedNativeType";
- $svgListPropertyType =~ s/</\<WebCore::/;
- }
-
- return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
-}
-
</del><span class="cx"> sub ConditionalIsEnabled(\%$)
</span><span class="cx"> {
</span><span class="cx"> my $defines = shift;
</span><span class="lines">@@ -1121,9 +1052,9 @@
</span><span class="cx"> push(@headerContent, split("\r", $endAppleCopyright));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- my %alwaysGenerateForNoSVGBuild = map { $_ => 1 } qw(DOMHTMLEmbedElement DOMHTMLObjectElement);
</del><ins>+ my %alwaysGenerate = map { $_ => 1 } qw(DOMHTMLEmbedElement DOMHTMLObjectElement);
</ins><span class="cx">
</span><del>- if (@privateHeaderAttributes > 0 or @privateHeaderFunctions > 0 or exists $alwaysGenerateForNoSVGBuild{$className}) {
</del><ins>+ if (@privateHeaderAttributes > 0 or @privateHeaderFunctions > 0 or exists $alwaysGenerate{$className}) {
</ins><span class="cx"> # - Private category @interface
</span><span class="cx"> if ($interface->extendedAttributes->{"AppleCopyright"}) {
</span><span class="cx"> @privateHeaderContentHeader = split("\r", $beginAppleCopyrightForHeaderFiles);
</span><span class="lines">@@ -1153,8 +1084,6 @@
</span><span class="cx"> my $implClassNameWithNamespace = "WebCore::" . $implClassName;
</span><span class="cx">
</span><span class="cx"> my $implType = $implClassNameWithNamespace;
</span><del>- my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
- $implType = $svgNativeType if $svgNativeType;
</del><span class="cx">
</span><span class="cx"> # Generate interface definitions.
</span><span class="cx"> if ($interface->extendedAttributes->{"AppleCopyright"}) {
</span><span class="lines">@@ -1164,12 +1093,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> push(@internalHeaderContent, "\n#import <WebCore/$className.h>\n\n");
</span><del>- push(@internalHeaderContent, "#import <WebCore/SVGAnimatedPropertyTearOff.h>\n\n") if $svgPropertyType;
- if ($svgListPropertyType) {
- push(@internalHeaderContent, "#import <WebCore/SVGAnimatedListPropertyTearOff.h>\n\n");
- push(@internalHeaderContent, "#import <WebCore/SVGTransformListPropertyTearOff.h>\n\n") if $svgListPropertyType =~ /SVGTransformList/;
- push(@internalHeaderContent, "#import <WebCore/SVGPathSegListPropertyTearOff.h>\n\n") if $svgListPropertyType =~ /SVGPathSegList/;
- }
</del><span class="cx">
</span><span class="cx"> if ($interfaceName eq "Node") {
</span><span class="cx"> push(@internalHeaderContent, "\@protocol DOMEventTarget;\n\n");
</span><span class="lines">@@ -1177,18 +1100,14 @@
</span><span class="cx">
</span><span class="cx"> my $startedNamespace = 0;
</span><span class="cx">
</span><del>- if ($codeGenerator->IsSVGAnimatedType($interfaceName)) {
- push(@internalHeaderContent, "#import <WebCore/$implClassName.h>\n\n");
</del><ins>+ push(@internalHeaderContent, "namespace WebCore {\n");
+ $startedNamespace = 1;
+ if ($interfaceName eq "Node") {
+ push(@internalHeaderContent, "class EventTarget;\n class Node;\n");
</ins><span class="cx"> } else {
</span><del>- push(@internalHeaderContent, "namespace WebCore {\n");
- $startedNamespace = 1;
- if ($interfaceName eq "Node") {
- push(@internalHeaderContent, "class EventTarget;\n class Node;\n");
- } else {
- push(@internalHeaderContent, "class $implClassName;\n");
- }
- push(@internalHeaderContent, "}\n\n");
</del><ins>+ push(@internalHeaderContent, "class $implClassName;\n");
</ins><span class="cx"> }
</span><ins>+ push(@internalHeaderContent, "}\n\n");
</ins><span class="cx">
</span><span class="cx"> push(@internalHeaderContent, "$implType* core($className *);\n");
</span><span class="cx"> push(@internalHeaderContent, "$className *kit($implType*);\n");
</span><span class="lines">@@ -1226,9 +1145,6 @@
</span><span class="cx"> my $numFunctions = @{$interface->functions};
</span><span class="cx"> my $implType = $implClassNameWithNamespace;
</span><span class="cx">
</span><del>- my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
- $implType = $svgNativeType if $svgNativeType;
-
</del><span class="cx"> # - Add default header template.
</span><span class="cx"> if ($interface->extendedAttributes->{"AppleCopyright"}) {
</span><span class="cx"> @implContentHeader = split("\r", $beginAppleCopyrightForSourceFiles);
</span><span class="lines">@@ -1257,16 +1173,12 @@
</span><span class="cx"> $implIncludes{"DOMCSSValueInternal.h"} = 1 if $interfaceName =~ /.*CSS.*Value/;
</span><span class="cx"> $implIncludes{"DOMEventInternal.h"} = 1 if $interfaceName =~ /.*Event/;
</span><span class="cx"> $implIncludes{"DOMStyleSheetInternal.h"} = 1 if $interfaceName eq "CSSStyleSheet";
</span><del>- $implIncludes{"DOMSVGPathSegInternal.h"} = 1 if $interfaceName =~ /^SVGPathSeg.+/;
</del><span class="cx">
</span><span class="cx"> if ($interfaceName =~ /(\w+)(Abs|Rel)$/) {
</span><span class="cx"> $implIncludes{"$1.h"} = 1;
</span><span class="cx"> } else {
</span><span class="cx"> if (!$codeGenerator->SkipIncludeHeader($implClassName)) {
</span><span class="cx"> $implIncludes{"$implClassName.h"} = 1 ;
</span><del>- } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName)) {
- my $includeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
- $implIncludes{"${includeType}.h"} = 1;
</del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1374,15 +1286,6 @@
</span><span class="cx">
</span><span class="cx"> my $getterContentTail = ")";
</span><span class="cx">
</span><del>- if ($svgPropertyType) {
- $getterContentHead = "$getterExpressionPrefix";
-
- # TODO: Handle special case for DOMSVGLength. We do need Custom code support for this.
- if ($svgPropertyType eq "WebCore::SVGLength" and $attributeName eq "value") {
- $getterContentHead = "value(WebCore::SVGLengthContext(IMPL->contextElement()), ";
- }
- }
-
</del><span class="cx"> my $attributeTypeSansPtr = $attributeType;
</span><span class="cx"> $attributeTypeSansPtr =~ s/ \*$//; # Remove trailing " *" from pointer types.
</span><span class="cx">
</span><span class="lines">@@ -1423,40 +1326,6 @@
</span><span class="cx"> } elsif ($idlType eq "Date") {
</span><span class="cx"> $getterContentHead = "kit($getterContentHead";
</span><span class="cx"> $getterContentTail .= ")";
</span><del>- } elsif ($svgPropertyType) {
- # Special case for DOMSVGNumber
- if ($svgPropertyType eq "float") {
- # Intentional leave out closing brace, it's already contained in getterContentTail
- $getterContentHead = "IMPL->propertyReference(";
- } else {
- $getterContentHead = "IMPL->propertyReference().$getterContentHead";
- }
-
- if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($idlType) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) {
- my $getter = $getterContentHead;
- $getter =~ s/\(\)//;
-
- my $tearOffType = GetSVGTypeWithNamespace($idlType);
- my $selfIsTearOffType = $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
- if ($selfIsTearOffType) {
- $implIncludes{"SVGStaticPropertyWithParentTearOff.h"} = 1;
- $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyWithParentTearOff<$implClassNameWithNamespace, /;
-
- my $getter = $getterExpressionPrefix;
- $getter =~ s/IMPL->//;
- $getter =~ s/\(//;
- my $updateMethod = "&${implClassNameWithNamespace}::update" . $codeGenerator->WK_ucfirst($getter);
-
- $getterContentHead = "${tearOffType}::create(IMPL, $getterContentHead$getterContentTail, $updateMethod)";
-
- $getterContentHead = "kit(WTF::getPtr($getterContentHead";
- $getterContentTail = "))";
- }
- }
- } elsif (($codeGenerator->IsSVGAnimatedType($implClassName) or $implClassName eq "SVGViewSpec") and $codeGenerator->IsSVGTypeNeedingTearOff($idlType)) {
- my $idlTypeWithNamespace = GetSVGTypeWithNamespace($idlType);
- $getterContentHead = "kit(static_cast<$idlTypeWithNamespace*>($getterContentHead)";
- $getterContentTail .= ")";
</del><span class="cx"> } elsif (IsProtocolType($idlType) and $idlType ne "EventTarget") {
</span><span class="cx"> $getterContentHead = "kit($getterContentHead";
</span><span class="cx"> $getterContentTail .= ")";
</span><span class="lines">@@ -1472,34 +1341,8 @@
</span><span class="cx"> $getterContentHead = "$getterContentHead";
</span><span class="cx"> $getterContentTail .= "->toString()";
</span><span class="cx"> } elsif (ConversionNeeded($attribute->signature->type)) {
</span><del>- my $type = $attribute->signature->type;
- if ($codeGenerator->IsSVGTypeNeedingTearOff($type) and not $implClassName =~ /List$/) {
- my $idlTypeWithNamespace = GetSVGTypeWithNamespace($type);
- $implIncludes{"$type.h"} = 1 if not $codeGenerator->SkipIncludeHeader($type);
- if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($type) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) {
- $idlTypeWithNamespace =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassNameWithNamespace, /;
- $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
-
- my $getter = $getterContentHead;
- $getter =~ s/IMPL->//;
- $getter =~ s/\(//;
- my $updateMethod = "&${implClassNameWithNamespace}::update" . $codeGenerator->WK_ucfirst($getter);
- $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create(IMPL, $getterContentHead$getterContentTail, $updateMethod";
- $getterContentTail .= "))";
- } elsif ($idlTypeWithNamespace =~ /SVG(Point|PathSeg)List/) {
- $getterContentHead = "kit(WTF::getPtr($getterContentHead";
- $getterContentTail .= "))";
- } elsif ($idlTypeWithNamespace =~ /SVGStaticListPropertyTearOff/) {
- $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create(IMPL, $getterContentHead";
- $getterContentTail .= ")))";
- } else {
- $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($getterContentHead";
- $getterContentTail .= ")))";
- }
- } else {
- $getterContentHead = "kit(WTF::getPtr($getterContentHead";
- $getterContentTail .= "))";
- }
</del><ins>+ $getterContentHead = "kit(WTF::getPtr($getterContentHead";
+ $getterContentTail .= "))";
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> my $getterContent;
</span><span class="lines">@@ -1578,55 +1421,20 @@
</span><span class="cx"> $arg = "core(" . $arg . ")";
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if ($svgPropertyType) {
- $implIncludes{"ExceptionCode.h"} = 1;
- $getterContentHead = "$getterExpressionPrefix";
- push(@implContent, " if (IMPL->isReadOnly()) {\n");
- push(@implContent, " WebCore::raiseOnDOMError(WebCore::NO_MODIFICATION_ALLOWED_ERR);\n");
- push(@implContent, " return;\n");
- push(@implContent, " }\n");
- push(@implContent, " $svgPropertyType& podImpl = IMPL->propertyReference();\n");
- my $ec = $hasSetterException ? ", ec" : "";
- push(@implContent, " $exceptionInit\n") if $hasSetterException;
-
- # Special case for DOMSVGNumber
- if ($svgPropertyType eq "float") {
- push(@implContent, " podImpl = $arg;\n");
- } else {
- # FIXME: Special case for DOMSVGLength. We do need Custom code support for this.
- if ($svgPropertyType eq "WebCore::SVGLength" and $attributeName eq "value") {
- push(@implContent, " podImpl.$coreSetterName($arg, WebCore::SVGLengthContext(IMPL->contextElement())$ec);\n");
- } else {
- push(@implContent, " podImpl.$coreSetterName($arg$ec);\n");
- }
- }
-
- if ($hasSetterException) {
- push(@implContent, " if (!ec)\n");
- push(@implContent, " IMPL->commitChange();\n");
- push(@implContent, " $exceptionRaiseOnError\n");
- } else {
- push(@implContent, " IMPL->commitChange();\n");
- }
- } elsif ($svgListPropertyType) {
- $getterContentHead = "$getterExpressionPrefix";
- push(@implContent, " IMPL->$coreSetterName($arg);\n");
</del><ins>+ my ($functionName, @arguments) = $codeGenerator->SetterExpression(\%implIncludes, $interfaceName, $attribute);
+ push(@arguments, $arg);
+ push(@arguments, "ec") if $hasSetterException;
+ push(@implContent, " $exceptionInit\n") if $hasSetterException;
+ if ($attribute->signature->extendedAttributes->{"ImplementedBy"}) {
+ my $implementedBy = $attribute->signature->extendedAttributes->{"ImplementedBy"};
+ $implIncludes{"${implementedBy}.h"} = 1;
+ unshift(@arguments, "IMPL");
+ $functionName = "${implementedBy}::${functionName}";
</ins><span class="cx"> } else {
</span><del>- my ($functionName, @arguments) = $codeGenerator->SetterExpression(\%implIncludes, $interfaceName, $attribute);
- push(@arguments, $arg);
- push(@arguments, "ec") if $hasSetterException;
- push(@implContent, " $exceptionInit\n") if $hasSetterException;
- if ($attribute->signature->extendedAttributes->{"ImplementedBy"}) {
- my $implementedBy = $attribute->signature->extendedAttributes->{"ImplementedBy"};
- $implIncludes{"${implementedBy}.h"} = 1;
- unshift(@arguments, "IMPL");
- $functionName = "${implementedBy}::${functionName}";
- } else {
- $functionName = "IMPL->${functionName}";
- }
- push(@implContent, " ${functionName}(" . join(", ", @arguments) . ");\n");
- push(@implContent, " $exceptionRaiseOnError\n") if $hasSetterException;
</del><ins>+ $functionName = "IMPL->${functionName}";
</ins><span class="cx"> }
</span><ins>+ push(@implContent, " ${functionName}(" . join(", ", @arguments) . ");\n");
+ push(@implContent, " $exceptionRaiseOnError\n") if $hasSetterException;
</ins><span class="cx">
</span><span class="cx"> push(@implContent, "}\n");
</span><span class="cx"> }
</span><span class="lines">@@ -1737,63 +1545,14 @@
</span><span class="cx"> push(@functionContent, " nativeNodeFilter = WebCore::NodeFilter::create(WebCore::ObjCNodeFilterCondition::create($paramName));\n");
</span><span class="cx"> }
</span><span class="cx">
</span><del>- # FIXME! We need [Custom] support for ObjC, to move these hacks into DOMSVGLength/MatrixCustom.mm
- my $svgLengthConvertToSpecifiedUnits = ($svgPropertyType and $svgPropertyType eq "WebCore::SVGLength" and $functionName eq "convertToSpecifiedUnits");
-
- push(@parameterNames, "WebCore::SVGLengthContext(IMPL->contextElement())") if $svgLengthConvertToSpecifiedUnits;
</del><span class="cx"> push(@parameterNames, "ec") if $raisesExceptions;
</span><span class="cx">
</span><del>- # Handle arguments that are 'SVGProperty' based (SVGAngle/SVGLength). We need to convert from SVGPropertyTearOff<Type>* to Type,
- # to be able to call the desired WebCore function. If the conversion fails, we can't extract Type and need to raise an exception.
- my $currentParameter = -1;
- foreach my $param (@{$function->parameters}) {
- $currentParameter++;
-
- my $paramName = $param->name;
-
- # make a new parameter name if the original conflicts with a property name
- $paramName = "in" . ucfirst($paramName) if $attributeNames{$paramName};
-
- my $idlType = $param->type;
- next if not $codeGenerator->IsSVGTypeNeedingTearOff($idlType) or $implClassName =~ /List$/;
-
- my $implGetter = GetObjCTypeGetter($paramName, $idlType);
- my $idlTypeWithNamespace = GetSVGTypeWithNamespace($idlType);
-
- $implIncludes{"ExceptionCode.h"} = 1;
- push(@functionContent, " $idlTypeWithNamespace* ${paramName}Core = $implGetter;\n");
- push(@functionContent, " if (!${paramName}Core) {\n");
- push(@functionContent, " WebCore::ExceptionCode ec = WebCore::TYPE_MISMATCH_ERR;\n");
- push(@functionContent, " $exceptionRaiseOnError\n");
- if ($returnType eq "void") {
- push(@functionContent, " return;\n");
- } else {
- push(@functionContent, " return nil;\n");
- }
- push(@functionContent, " }\n");
-
- # Replace the paramter core() getter, by the cached variable.
- splice(@parameterNames, $currentParameter, 1, "${paramName}Core->propertyReference()");
- }
-
</del><span class="cx"> my $content;
</span><span class="cx"> if ($function->signature->extendedAttributes->{"ImplementedBy"}) {
</span><span class="cx"> my $implementedBy = $function->signature->extendedAttributes->{"ImplementedBy"};
</span><span class="cx"> $implIncludes{"${implementedBy}.h"} = 1;
</span><span class="cx"> unshift(@parameterNames, $caller);
</span><span class="cx"> $content = "${implementedBy}::" . $codeGenerator->WK_lcfirst($functionName) . "(" . join(", ", @parameterNames) . ")";
</span><del>- } elsif ($svgPropertyType) {
- $implIncludes{"ExceptionCode.h"} = 1;
- push(@functionContent, " if (IMPL->isReadOnly()) {\n");
- push(@functionContent, " WebCore::raiseOnDOMError(WebCore::NO_MODIFICATION_ALLOWED_ERR);\n");
- if ($returnType eq "void") {
- push(@functionContent, " return;\n");
- } else {
- push(@functionContent, " return nil;\n");
- }
- push(@functionContent, " }\n");
- push(@functionContent, " $svgPropertyType& podImpl = IMPL->propertyReference();\n");
- $content = "podImpl." . $codeGenerator->WK_lcfirst($functionName) . "(" . join(", ", @parameterNames) . ")";
</del><span class="cx"> } else {
</span><span class="cx"> $content = "$caller->" . $codeGenerator->WK_lcfirst($functionName) . "(" . join(", ", @parameterNames) . ")";
</span><span class="cx"> }
</span><span class="lines">@@ -1803,14 +1562,9 @@
</span><span class="cx"> if ($raisesExceptions) {
</span><span class="cx"> push(@functionContent, " $exceptionInit\n");
</span><span class="cx"> push(@functionContent, " $content;\n");
</span><del>- if ($svgPropertyType) {
- push(@functionContent, " if (!ec)\n");
- push(@functionContent, " IMPL->commitChange();\n");
- }
</del><span class="cx"> push(@functionContent, " $exceptionRaiseOnError\n");
</span><span class="cx"> } else {
</span><span class="cx"> push(@functionContent, " $content;\n");
</span><del>- push(@functionContent, " IMPL->commitChange();\n") if $svgPropertyType;
</del><span class="cx"> }
</span><span class="cx"> } elsif (defined $needsCustom{"NodeToReturn"}) {
</span><span class="cx"> # Special case the insertBefore, replaceChild, removeChild
</span><span class="lines">@@ -1831,12 +1585,7 @@
</span><span class="cx"> $content = "foo";
</span><span class="cx"> } else {
</span><span class="cx"> if (ConversionNeeded($function->signature->type)) {
</span><del>- if ($codeGenerator->IsSVGTypeNeedingTearOff($function->signature->type) and not $implClassName =~ /List$/) {
- my $idlTypeWithNamespace = GetSVGTypeWithNamespace($function->signature->type);
- $content = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($content)))";
- } else {
- $content = "kit(WTF::getPtr($content))";
- }
</del><ins>+ $content = "kit(WTF::getPtr($content))";
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ($raisesExceptions) {
</span></span></pre>
</div>
</div>
</body>
</html>