Title: [205468] trunk
Revision
205468
Author
[email protected]
Date
2016-09-05 20:33:50 -0700 (Mon, 05 Sep 2016)

Log Message

More bindings improvements, particularly things not needed for _javascript_ bindings
https://bugs.webkit.org/show_bug.cgi?id=161572

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Export a couple of files needed for legacy bindings.

* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::addCrossOriginWindowPropertyNames): Mark array const.
* bindings/js/JSLocationCustom.cpp:
(WebCore::addCrossOriginLocationPropertyNames): Ditto.

* dom/DOMImplementation.cpp:
(WebCore::addString): Deleted.
(WebCore::isSupportedSVG10Feature): Deleted.
(WebCore::isSupportedSVG11Feature): Deleted.
(WebCore::DOMImplementation::hasFeature): Deleted.

* dom/DOMImplementation.h: Changed hasFeature to take no arguments and to always
return true, as specified in the DOM spec.

* dom/DOMImplementation.idl: Removed the arguments to hasFeature.

* dom/Document.cpp:
(WebCore::Document::defaultCharsetForLegacyBindings): Renamed from
defaultCharsetForBindings, because this function is used only by the
non-_javascript_ bindings.
* dom/Document.h: Updated for the above.

* dom/DocumentType.h: Removed entitiesForBindings,
notationsForBindings, and internalSubsetForBindings, all of which were
empty functions. The empty implementations are now in the legacy bindings.

* dom/Element.cpp:
(WebCore::Element::dispatchSimulatedClickForBindings): Deleted.
This code is now at the single call site, in HTMLElement.
* dom/Element.h: Updated for the above change.

* dom/Node.cpp:
(WebCore::Node::isSupportedForBindings): Deleted. This is only used in the
legacy bindings, and since it only returns a value other than "true" for
SVG features, it is now in the SVGTests class.
* dom/Node.h: Updated for the above change.

* html/HTMLElement.cpp:
(WebCore::HTMLElement::click): Call simulateClick with the appropriate
arguments rather than calling dispatchSimulatedClickForBindings.

* svg/SVGTests.cpp:
(WebCore::supportedSVGFeatures): Added. Moved here from DOMImplementation,
but also refactored.
(WebCore::SVGTests::isValid): Changed to use the function above, rather than
calling DOMImplementation::hasFeature. This change fixes a bug where feature names
that do not look like valid SVG feature names, names such as "xxx", were returning
true claiming that the feature was supported. This behavior was helpful in the
general DOMImplementation function, but harmful here. This bug was causing test
failures in some of our SVG tests.
(WebCore::SVGTests::hasFeatureForLegacyBindings): Added. Uses the set above to
implement the legacy behavior of hasFeature. It's better to have this in parallel
with the SVGTests::isValid function rather than having either depend on the other.

* svg/SVGTests.h: Added exported SVGTests::isValid function.

Source/WebKit/mac:

* DOM/DOMDOMImplementation.mm:
(-[DOMImplementation hasFeature:version:]): Call SVGTests::hasFeatureForLegacyBindings
instead of DOMImplementation::hasFeature. Also removed JSMainThreadNullState
since this does not do anything that can invoke _javascript_.

* DOM/DOMDocument.mm:
(-[DOMDocument defaultCharset]): Call defaultCharsetForLegacyBindings. Also removed
JSMainThreadNullState.

* DOM/DOMDocumentType.mm:
(-[DOMDocumentType entities]): Changed to simply return nil; same behavior as before,
but with no dependency on WebCore. Also removed JSMainThreadNullState.
(-[DOMDocumentType notations]): Ditto.
(-[DOMDocumentType internalSubset]): Ditto, except empty string rather than nil.

* DOM/DOMNode.mm:
(-[DOMNode isSupported:version:]): Call SVGTests::hasFeatureForLegacyBindings
instead of Node::isSupportedForBindings. Also removed JSMainThreadNullState.

Source/WebKit2:

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
(webkit_dom_dom_implementation_has_feature): Call SVGTests::hasFeatureForLegacyBindings
instead of DOMImplementation::hasFeature. Also removed JSMainThreadNullState
since this does not do anything that can invoke _javascript_.

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
(webkit_dom_document_get_default_charset): Call defaultCharsetForLegacyBindings.
Also removed JSMainThreadNullState.

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
(webkit_dom_document_type_get_entities): Changed to simply return nullptr; same behavior
as before, but with no dependency on WebCore. Also removed JSMainThreadNullState.
(webkit_dom_document_type_get_notations): Ditto.
(webkit_dom_document_type_get_internal_subset): Ditto.

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
(webkit_dom_node_is_supported): Call SVGTests::hasFeatureForLegacyBindings
instead of Node::isSupportedForBindings. Also removed JSMainThreadNullState.

LayoutTests:

* TestExpectations: Updated to expect success instead of failure for the
imported/mozilla/svg tests named conditions-01.svg, conditions-06.svg,
dynamic-conditions-01.svg, switch-01.svg, and
svg-integration/dynamic-conditions-outer-svg-03.xhtml. These are now all passing,
likely because of a progression due to correctly handling bogus feature strings.
Also, a comment in bug 139115 claims that requiredFeatures it going to be removed
from the SVG specifications and from other implementations. Updated to expect
possible failure for dynamic-conditions-08.svg and dynamic-conditions-12.svg. Before
these were reliably passing because of the incorrect handling of bogus feature strings.
Now, they are sometimes failing because the tests include required code that runs on
a timer, but no code to guarantee the test engine will wait for the timer to fire.

* platform/efl/TestExpectations: Removed now-redundant expectations that these
tests will pass; now expected on all platforms.

* platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt:
* platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt:
* platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.png:
* platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.png:
* platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt:
* platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.png:
* platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt:
* svg/custom/svg-features-expected.txt:
Updated results for all these tests now that DOMImplementation.hasFeature always
returns true. The tests aren't super-valuable any more, but I don't see a good
reason to locally modify the imported tests from the W3C-SVG-1.1 suite, and
while the svg-features test isn't great, keeping it does provide a little test
coverage for the "always return true" behavior.

* platform/ios-simulator/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
* platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
* platform/win/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
* svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
Updated for progression due to correctly handling bogus feature strings.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (205467 => 205468)


--- trunk/LayoutTests/ChangeLog	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/ChangeLog	2016-09-06 03:33:50 UTC (rev 205468)
@@ -1,3 +1,47 @@
+2016-09-05  Darin Adler  <[email protected]>
+
+        More bindings improvements, particularly things not needed for _javascript_ bindings
+        https://bugs.webkit.org/show_bug.cgi?id=161572
+
+        Reviewed by Sam Weinig.
+
+        * TestExpectations: Updated to expect success instead of failure for the
+        imported/mozilla/svg tests named conditions-01.svg, conditions-06.svg,
+        dynamic-conditions-01.svg, switch-01.svg, and
+        svg-integration/dynamic-conditions-outer-svg-03.xhtml. These are now all passing,
+        likely because of a progression due to correctly handling bogus feature strings.
+        Also, a comment in bug 139115 claims that requiredFeatures it going to be removed
+        from the SVG specifications and from other implementations. Updated to expect
+        possible failure for dynamic-conditions-08.svg and dynamic-conditions-12.svg. Before
+        these were reliably passing because of the incorrect handling of bogus feature strings.
+        Now, they are sometimes failing because the tests include required code that runs on
+        a timer, but no code to guarantee the test engine will wait for the timer to fire.
+
+        * platform/efl/TestExpectations: Removed now-redundant expectations that these
+        tests will pass; now expected on all platforms.
+
+        * platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt:
+        * platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt:
+        * platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt:
+        * svg/custom/svg-features-expected.txt:
+        Updated results for all these tests now that DOMImplementation.hasFeature always
+        returns true. The tests aren't super-valuable any more, but I don't see a good
+        reason to locally modify the imported tests from the W3C-SVG-1.1 suite, and
+        while the svg-features test isn't great, keeping it does provide a little test
+        coverage for the "always return true" behavior.
+
+        * platform/ios-simulator/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
+        * platform/win/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
+        * svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
+        Updated for progression due to correctly handling bogus feature strings.
+
 2016-09-05  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r205450.

Modified: trunk/LayoutTests/TestExpectations (205467 => 205468)


--- trunk/LayoutTests/TestExpectations	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/TestExpectations	2016-09-06 03:33:50 UTC (rev 205468)
@@ -482,16 +482,13 @@
 webkit.org/b/112032 imported/mozilla/svg/text-layout-01.svg [ ImageOnlyFailure ]
 webkit.org/b/139107 imported/mozilla/svg/clip-02a.svg [ ImageOnlyFailure ]
 webkit.org/b/139107 imported/mozilla/svg/clip-02b.svg [ ImageOnlyFailure ]
-webkit.org/b/139115 imported/mozilla/svg/conditions-01.svg [ ImageOnlyFailure ]
-webkit.org/b/139115 imported/mozilla/svg/conditions-06.svg [ ImageOnlyFailure ]
-webkit.org/b/139115 imported/mozilla/svg/dynamic-conditions-01.svg [ ImageOnlyFailure ]
 webkit.org/b/139115 imported/mozilla/svg/dynamic-conditions-03.svg [ ImageOnlyFailure ]
-webkit.org/b/139115 imported/mozilla/svg/switch-01.svg [ ImageOnlyFailure ]
 webkit.org/b/139115 imported/mozilla/svg/svg-integration/dynamic-conditions-outer-svg-02.xhtml [ ImageOnlyFailure ]
-webkit.org/b/139115 imported/mozilla/svg/svg-integration/dynamic-conditions-outer-svg-03.xhtml [ ImageOnlyFailure ]
 webkit.org/b/139116 imported/mozilla/svg/conditions-07.svg [ ImageOnlyFailure ]
 webkit.org/b/139117 imported/mozilla/svg/conditions-08.svg [ ImageOnlyFailure ]
 webkit.org/b/139118 imported/mozilla/svg/cssComment-in-attribute-01.svg [ ImageOnlyFailure ]
+imported/mozilla/svg/dynamic-conditions-08.svg [ Pass ImageOnlyFailure ]
+imported/mozilla/svg/dynamic-conditions-12.svg [ Pass ImageOnlyFailure ]
 webkit.org/b/139119 imported/mozilla/svg/text/multiple-x-rtl.svg [ ImageOnlyFailure ]
 webkit.org/b/139119 imported/mozilla/svg/text/multiple-x-holes-rtl.svg [ ImageOnlyFailure ]
 webkit.org/b/139119 imported/mozilla/svg/text/multiple-x-multiple-dx-anchor-end-bidi.svg [ ImageOnlyFailure ]

Modified: trunk/LayoutTests/platform/efl/TestExpectations (205467 => 205468)


--- trunk/LayoutTests/platform/efl/TestExpectations	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2016-09-06 03:33:50 UTC (rev 205468)
@@ -1150,12 +1150,9 @@
 imported/mozilla/svg/blend-screen.svg [ Pass ]
 imported/mozilla/svg/clip-02a.svg [ Pass ]
 imported/mozilla/svg/clip-02b.svg [ Pass ]
-imported/mozilla/svg/conditions-01.svg [ Pass ]
-imported/mozilla/svg/conditions-06.svg [ Pass ]
 imported/mozilla/svg/conditions-07.svg [ Pass ]
 imported/mozilla/svg/conditions-08.svg [ Pass ]
 imported/mozilla/svg/cssComment-in-attribute-01.svg [ Pass ]
-imported/mozilla/svg/dynamic-conditions-01.svg [ Pass ]
 imported/mozilla/svg/dynamic-conditions-03.svg [ Pass ]
 imported/mozilla/svg/dynamic-marker-01.svg [ Pass ]
 imported/mozilla/svg/dynamic-pattern-01.svg [ Pass ]

Modified: trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt (205467 => 205468)


--- trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -34,6 +34,6 @@
     RenderSVGText {text} at (10,223) size 147x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 147x34
         chunk 1 text run 1 at (10.00,250.00) startOffset 0 endOffset 11 width 146.65: "org.w3c.svg"
-    RenderSVGText {text} at (370,223) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (370.00,250.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (370,223) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (370.00,250.00) startOffset 0 endOffset 4 width 46.64: "true"

Modified: trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt (205467 => 205468)


--- trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -10,30 +10,30 @@
     RenderSVGText {text} at (5,18) size 206x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 206x34
         chunk 1 text run 1 at (5.00,45.00) startOffset 0 endOffset 16 width 205.80: "org.w3c.svg.lang"
-    RenderSVGText {text} at (385,18) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,18) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,58) size 258x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 258x34
         chunk 1 text run 1 at (5.00,85.00) startOffset 0 endOffset 19 width 257.45: "org.w3c.svg.dynamic"
-    RenderSVGText {text} at (385,58) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,58) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,98) size 218x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 218x34
         chunk 1 text run 1 at (5.00,125.00) startOffset 0 endOffset 18 width 217.46: "org.w3c.svg.static"
-    RenderSVGText {text} at (385,98) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,98) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,138) size 208x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 208x34
         chunk 1 text run 1 at (5.00,165.00) startOffset 0 endOffset 15 width 207.48: "org.w3c.dom.svg"
-    RenderSVGText {text} at (385,138) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,138) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,178) size 147x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 147x34
         chunk 1 text run 1 at (5.00,205.00) startOffset 0 endOffset 11 width 146.65: "org.w3c.svg"
-    RenderSVGText {text} at (385,178) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,178) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 4 width 46.64: "true"

Modified: trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt (205467 => 205468)


--- trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -10,30 +10,30 @@
     RenderSVGText {text} at (5,18) size 279x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 279x34
         chunk 1 text run 1 at (5.00,45.00) startOffset 0 endOffset 22 width 278.29: "org.w3c.dom.svg.static"
-    RenderSVGText {text} at (385,18) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,18) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,58) size 335x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 335x34
         chunk 1 text run 1 at (5.00,85.00) startOffset 0 endOffset 25 width 334.95: "org.w3c.dom.svg.animation"
-    RenderSVGText {text} at (385,58) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,58) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,98) size 319x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 319x34
         chunk 1 text run 1 at (5.00,125.00) startOffset 0 endOffset 23 width 318.28: "org.w3c.dom.svg.dynamic"
-    RenderSVGText {text} at (385,98) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,98) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,138) size 245x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 245x34
         chunk 1 text run 1 at (5.00,165.00) startOffset 0 endOffset 19 width 244.97: "org.w3c.dom.svg.all"
-    RenderSVGText {text} at (385,138) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,138) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,178) size 185x34 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 185x34
         chunk 1 text run 1 at (5.00,205.00) startOffset 0 endOffset 15 width 184.13: "org.w3c.svg.all"
-    RenderSVGText {text} at (385,178) size 57x34 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x34
-        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,178) size 47x34 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x34
+        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 4 width 46.64: "true"

Modified: trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt (205467 => 205468)


--- trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -12,8 +12,6 @@
         RenderSVGRect {rect} at (80,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(80.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
         RenderSVGRect {rect} at (190,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(190.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
         RenderSVGRect {rect} at (300,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-      RenderSVGRect {rect} at (100,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-      RenderSVGRect {rect} at (190,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(190.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
       RenderSVGRect {rect} at (300,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
       RenderSVGRect {rect} at (0,0) size 480x360 [x=0.00] [y=0.00] [width=480.00] [height=360.00]
     RenderSVGContainer {g} at (10,314) size 230x33

Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt (205467 => 205468)


--- trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -34,6 +34,6 @@
     RenderSVGText {text} at (10,222) size 147x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 147x35
         chunk 1 text run 1 at (10.00,250.00) startOffset 0 endOffset 11 width 146.65: "org.w3c.svg"
-    RenderSVGText {text} at (370,222) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (370.00,250.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (370,222) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (370.00,250.00) startOffset 0 endOffset 4 width 46.64: "true"

Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt (205467 => 205468)


--- trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -10,30 +10,30 @@
     RenderSVGText {text} at (5,17) size 206x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 206x35
         chunk 1 text run 1 at (5.00,45.00) startOffset 0 endOffset 16 width 205.80: "org.w3c.svg.lang"
-    RenderSVGText {text} at (385,17) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,17) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,57) size 258x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 258x35
         chunk 1 text run 1 at (5.00,85.00) startOffset 0 endOffset 19 width 257.45: "org.w3c.svg.dynamic"
-    RenderSVGText {text} at (385,57) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,57) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,97) size 218x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 218x35
         chunk 1 text run 1 at (5.00,125.00) startOffset 0 endOffset 18 width 217.46: "org.w3c.svg.static"
-    RenderSVGText {text} at (385,97) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,97) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,137) size 208x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 208x35
         chunk 1 text run 1 at (5.00,165.00) startOffset 0 endOffset 15 width 207.48: "org.w3c.dom.svg"
-    RenderSVGText {text} at (385,137) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,137) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,177) size 147x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 147x35
         chunk 1 text run 1 at (5.00,205.00) startOffset 0 endOffset 11 width 146.65: "org.w3c.svg"
-    RenderSVGText {text} at (385,177) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,177) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 4 width 46.64: "true"

Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.png


(Binary files differ)

Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt (205467 => 205468)


--- trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -10,30 +10,30 @@
     RenderSVGText {text} at (5,17) size 279x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 279x35
         chunk 1 text run 1 at (5.00,45.00) startOffset 0 endOffset 22 width 278.29: "org.w3c.dom.svg.static"
-    RenderSVGText {text} at (385,17) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,17) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,57) size 335x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 335x35
         chunk 1 text run 1 at (5.00,85.00) startOffset 0 endOffset 25 width 334.95: "org.w3c.dom.svg.animation"
-    RenderSVGText {text} at (385,57) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,57) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,97) size 319x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 319x35
         chunk 1 text run 1 at (5.00,125.00) startOffset 0 endOffset 23 width 318.28: "org.w3c.dom.svg.dynamic"
-    RenderSVGText {text} at (385,97) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,97) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,137) size 245x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 245x35
         chunk 1 text run 1 at (5.00,165.00) startOffset 0 endOffset 19 width 244.97: "org.w3c.dom.svg.all"
-    RenderSVGText {text} at (385,137) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,137) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 4 width 46.64: "true"
     RenderSVGText {text} at (5,177) size 185x36 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 185x35
         chunk 1 text run 1 at (5.00,205.00) startOffset 0 endOffset 15 width 184.13: "org.w3c.svg.all"
-    RenderSVGText {text} at (385,177) size 57x36 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 57x35
-        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 5 width 56.63: "false"
+    RenderSVGText {text} at (385,177) size 47x36 contains 1 chunk(s)
+      RenderSVGInlineText {#text} at (0,0) size 47x35
+        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 4 width 46.64: "true"

Modified: trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt (205467 => 205468)


--- trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -12,8 +12,6 @@
         RenderSVGRect {rect} at (80,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(80.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
         RenderSVGRect {rect} at (190,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(190.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
         RenderSVGRect {rect} at (300,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-      RenderSVGRect {rect} at (100,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-      RenderSVGRect {rect} at (190,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(190.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
       RenderSVGRect {rect} at (300,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
       RenderSVGRect {rect} at (0,0) size 480x360 [x=0.00] [y=0.00] [width=480.00] [height=360.00]
     RenderSVGContainer {g} at (10,314) size 230x33

Modified: trunk/LayoutTests/platform/win/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt (205467 => 205468)


--- trunk/LayoutTests/platform/win/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/platform/win/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -12,8 +12,6 @@
         RenderSVGRect {rect} at (80,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(80.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
         RenderSVGRect {rect} at (190,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(190.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
         RenderSVGRect {rect} at (300,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-      RenderSVGRect {rect} at (100,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-      RenderSVGRect {rect} at (190,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(190.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
       RenderSVGRect {rect} at (300,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
       RenderSVGRect {rect} at (0,0) size 480x360 [x=0.00] [y=0.00] [width=480.00] [height=360.00]
     RenderSVGContainer {g} at (10,314) size 231x33

Modified: trunk/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt (205467 => 205468)


--- trunk/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -17,8 +17,6 @@
         RenderSVGRect {rect} at (80,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(80.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
         RenderSVGRect {rect} at (190,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(190.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
         RenderSVGRect {rect} at (300,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-      RenderSVGRect {rect} at (100,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-      RenderSVGRect {rect} at (190,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(190.00,100.00)}] [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
       RenderSVGRect {rect} at (300,100) size 100x100 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,100.00)}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
       RenderSVGRect {rect} at (0,0) size 480x360 [x=0.00] [y=0.00] [width=480.00] [height=360.00]
     RenderSVGContainer {g} at (10,314) size 227x33

Modified: trunk/LayoutTests/svg/custom/svg-features-expected.txt (205467 => 205468)


--- trunk/LayoutTests/svg/custom/svg-features-expected.txt	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/LayoutTests/svg/custom/svg-features-expected.txt	2016-09-06 03:33:50 UTC (rev 205468)
@@ -1,14 +1,14 @@
 "org.w3c.svg", "1.0": true
 "org.w3c.svg.static", "1.0": true
-"org.w3c.svg.animation", "1.0": false
-"org.w3c.svg.dynamic", "1.0": false
+"org.w3c.svg.animation", "1.0": true
+"org.w3c.svg.dynamic", "1.0": true
 "org.w3c.dom", "1.0": true
 "org.w3c.dom.svg", "1.0": true
 "org.w3c.dom.svg.static", "1.0": true
-"org.w3c.dom.svg.animation", "1.0": false
-"org.w3c.dom.svg.dynamic", "1.0": false
-"org.w3c.svg.all", "1.0": false
-"org.w3c.dom.svg.all", "1.0": false
+"org.w3c.dom.svg.animation", "1.0": true
+"org.w3c.dom.svg.dynamic", "1.0": true
+"org.w3c.svg.all", "1.0": true
+"org.w3c.dom.svg.all", "1.0": true
 "http://www.w3.org/TR/SVG11/feature#SVG", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#SVGDOM", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#SVG-static", "1.1": true
@@ -15,8 +15,8 @@
 "http://www.w3.org/TR/SVG11/feature#SVGDOM-static", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#SVG-animation", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#SVGDOM-animation", "1.1": true
-"http://www.w3.org/TR/SVG11/feature#SVG-dynamic", "1.1": false
-"http://www.w3.org/TR/SVG11/feature#SVGDOM-dynamic", "1.1": false
+"http://www.w3.org/TR/SVG11/feature#SVG-dynamic", "1.1": true
+"http://www.w3.org/TR/SVG11/feature#SVGDOM-dynamic", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#CoreAttribute", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#Structure", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1": true
@@ -34,7 +34,7 @@
 "http://www.w3.org/TR/SVG11/feature#GraphicsAttribute", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#BaseGraphicsAttribute", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#Marker", "1.1": true
-"http://www.w3.org/TR/SVG11/feature#ColorProfile", "1.1": false
+"http://www.w3.org/TR/SVG11/feature#ColorProfile", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#Gradient", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#Pattern", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#Clip", "1.1": true
@@ -44,7 +44,7 @@
 "http://www.w3.org/TR/SVG11/feature#BasicFilter", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#DocumentEventsAttribute", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#GraphicalEventsAttribute", "1.1": true
-"http://www.w3.org/TR/SVG11/feature#AnimationEventsAttribute", "1.1": false
+"http://www.w3.org/TR/SVG11/feature#AnimationEventsAttribute", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#Cursor", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#Hyperlinking", "1.1": true
 "http://www.w3.org/TR/SVG11/feature#XlinkAttribute", "1.1": true

Modified: trunk/Source/WebCore/ChangeLog (205467 => 205468)


--- trunk/Source/WebCore/ChangeLog	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/ChangeLog	2016-09-06 03:33:50 UTC (rev 205468)
@@ -1,3 +1,68 @@
+2016-09-05  Darin Adler  <[email protected]>
+
+        More bindings improvements, particularly things not needed for _javascript_ bindings
+        https://bugs.webkit.org/show_bug.cgi?id=161572
+
+        Reviewed by Sam Weinig.
+
+        * WebCore.xcodeproj/project.pbxproj: Export a couple of files needed for legacy bindings.
+
+        * bindings/js/JSDOMWindowCustom.cpp:
+        (WebCore::addCrossOriginWindowPropertyNames): Mark array const.
+        * bindings/js/JSLocationCustom.cpp:
+        (WebCore::addCrossOriginLocationPropertyNames): Ditto.
+
+        * dom/DOMImplementation.cpp:
+        (WebCore::addString): Deleted.
+        (WebCore::isSupportedSVG10Feature): Deleted.
+        (WebCore::isSupportedSVG11Feature): Deleted.
+        (WebCore::DOMImplementation::hasFeature): Deleted.
+
+        * dom/DOMImplementation.h: Changed hasFeature to take no arguments and to always
+        return true, as specified in the DOM spec.
+
+        * dom/DOMImplementation.idl: Removed the arguments to hasFeature.
+
+        * dom/Document.cpp:
+        (WebCore::Document::defaultCharsetForLegacyBindings): Renamed from
+        defaultCharsetForBindings, because this function is used only by the
+        non-_javascript_ bindings.
+        * dom/Document.h: Updated for the above.
+
+        * dom/DocumentType.h: Removed entitiesForBindings,
+        notationsForBindings, and internalSubsetForBindings, all of which were
+        empty functions. The empty implementations are now in the legacy bindings.
+
+        * dom/Element.cpp:
+        (WebCore::Element::dispatchSimulatedClickForBindings): Deleted.
+        This code is now at the single call site, in HTMLElement.
+        * dom/Element.h: Updated for the above change.
+
+        * dom/Node.cpp:
+        (WebCore::Node::isSupportedForBindings): Deleted. This is only used in the
+        legacy bindings, and since it only returns a value other than "true" for
+        SVG features, it is now in the SVGTests class.
+        * dom/Node.h: Updated for the above change.
+
+        * html/HTMLElement.cpp:
+        (WebCore::HTMLElement::click): Call simulateClick with the appropriate
+        arguments rather than calling dispatchSimulatedClickForBindings.
+
+        * svg/SVGTests.cpp:
+        (WebCore::supportedSVGFeatures): Added. Moved here from DOMImplementation,
+        but also refactored.
+        (WebCore::SVGTests::isValid): Changed to use the function above, rather than
+        calling DOMImplementation::hasFeature. This change fixes a bug where feature names
+        that do not look like valid SVG feature names, names such as "xxx", were returning
+        true claiming that the feature was supported. This behavior was helpful in the
+        general DOMImplementation function, but harmful here. This bug was causing test
+        failures in some of our SVG tests.
+        (WebCore::SVGTests::hasFeatureForLegacyBindings): Added. Uses the set above to
+        implement the legacy behavior of hasFeature. It's better to have this in parallel
+        with the SVGTests::isValid function rather than having either depend on the other.
+
+        * svg/SVGTests.h: Added exported SVGTests::isValid function.
+
 2016-09-05  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r205450.

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (205467 => 205468)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-09-06 03:33:50 UTC (rev 205468)
@@ -4506,7 +4506,7 @@
 		B2227AA80D00BF220071B782 /* SVGStopElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279120D00BF210071B782 /* SVGStopElement.cpp */; };
 		B2227AA90D00BF220071B782 /* SVGStopElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279130D00BF210071B782 /* SVGStopElement.h */; };
 		B2227AAB0D00BF220071B782 /* SVGStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279150D00BF210071B782 /* SVGStringList.cpp */; };
-		B2227AAC0D00BF220071B782 /* SVGStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279160D00BF210071B782 /* SVGStringList.h */; };
+		B2227AAC0D00BF220071B782 /* SVGStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279160D00BF210071B782 /* SVGStringList.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B2227AB50D00BF220071B782 /* SVGGraphicsElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222791F0D00BF210071B782 /* SVGGraphicsElement.cpp */; };
 		B2227AB60D00BF220071B782 /* SVGGraphicsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279200D00BF210071B782 /* SVGGraphicsElement.h */; };
 		B2227AB70D00BF220071B782 /* SVGStyleElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279210D00BF210071B782 /* SVGStyleElement.cpp */; };
@@ -4518,7 +4518,7 @@
 		B2227AC00D00BF220071B782 /* SVGSymbolElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222792A0D00BF210071B782 /* SVGSymbolElement.cpp */; };
 		B2227AC10D00BF220071B782 /* SVGSymbolElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B222792B0D00BF210071B782 /* SVGSymbolElement.h */; };
 		B2227AC40D00BF220071B782 /* SVGTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222792E0D00BF210071B782 /* SVGTests.cpp */; };
-		B2227AC50D00BF220071B782 /* SVGTests.h in Headers */ = {isa = PBXBuildFile; fileRef = B222792F0D00BF210071B782 /* SVGTests.h */; };
+		B2227AC50D00BF220071B782 /* SVGTests.h in Headers */ = {isa = PBXBuildFile; fileRef = B222792F0D00BF210071B782 /* SVGTests.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		B2227AC70D00BF220071B782 /* SVGTextContentElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279310D00BF210071B782 /* SVGTextContentElement.cpp */; };
 		B2227AC80D00BF220071B782 /* SVGTextContentElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279320D00BF210071B782 /* SVGTextContentElement.h */; };
 		B2227ACA0D00BF220071B782 /* SVGTextElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279340D00BF210071B782 /* SVGTextElement.cpp */; };

Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (205467 => 205468)


--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -322,7 +322,7 @@
 static void addCrossOriginWindowPropertyNames(ExecState& state, PropertyNameArray& propertyNames)
 {
     // https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
-    static const Identifier* properties[] = {
+    static const Identifier* const properties[] = {
         &state.propertyNames().blur, &state.propertyNames().close, &state.propertyNames().closed,
         &state.propertyNames().focus, &state.propertyNames().frames, &state.propertyNames().length,
         &state.propertyNames().location, &state.propertyNames().opener, &state.propertyNames().parent,

Modified: trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp (205467 => 205468)


--- trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -111,7 +111,7 @@
 static void addCrossOriginLocationPropertyNames(ExecState& state, PropertyNameArray& propertyNames)
 {
     // https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
-    static const Identifier* properties[] = { &state.propertyNames().href, &state.propertyNames().replace };
+    static const Identifier* const properties[] = { &state.propertyNames().href, &state.propertyNames().replace };
     for (auto* property : properties)
         propertyNames.add(*property);
 }

Modified: trunk/Source/WebCore/dom/DOMImplementation.cpp (205467 => 205468)


--- trunk/Source/WebCore/dom/DOMImplementation.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/dom/DOMImplementation.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -65,13 +65,6 @@
 
 using namespace HTMLNames;
 
-typedef HashSet<String, ASCIICaseInsensitiveHash> FeatureSet;
-
-static void addString(FeatureSet& set, const char* string)
-{
-    set.add(string);
-}
-
 #if ENABLE(VIDEO)
 
 class DOMImplementationSupportsTypeClient : public MediaPlayerSupportsTypeClient {
@@ -92,123 +85,11 @@
 
 #endif
 
-static bool isSupportedSVG10Feature(const String& feature, const String& version)
-{
-    if (!version.isEmpty() && version != "1.0")
-        return false;
-
-    static bool initialized = false;
-    static NeverDestroyed<FeatureSet> svgFeatures;
-    if (!initialized) {
-#if ENABLE(SVG_FONTS)
-        addString(svgFeatures, "svg");
-        addString(svgFeatures, "svg.static");
-#endif
-//      addString(svgFeatures, "svg.animation");
-//      addString(svgFeatures, "svg.dynamic");
-//      addString(svgFeatures, "svg.dom.animation");
-//      addString(svgFeatures, "svg.dom.dynamic");
-#if ENABLE(SVG_FONTS)
-        addString(svgFeatures, "dom");
-        addString(svgFeatures, "dom.svg");
-        addString(svgFeatures, "dom.svg.static");
-#endif
-//      addString(svgFeatures, "svg.all");
-//      addString(svgFeatures, "dom.svg.all");
-        initialized = true;
-    }
-    return feature.startsWith("org.w3c.", false)
-        && svgFeatures.get().contains(feature.right(feature.length() - 8));
-}
-
-static bool isSupportedSVG11Feature(const String& feature, const String& version)
-{
-    if (!version.isEmpty() && version != "1.1")
-        return false;
-
-    static bool initialized = false;
-    static NeverDestroyed<FeatureSet> svgFeatures;
-    if (!initialized) {
-        // Sadly, we cannot claim to implement any of the SVG 1.1 generic feature sets
-        // lack of Font and Filter support.
-        // http://bugs.webkit.org/show_bug.cgi?id=15480
-#if ENABLE(SVG_FONTS)
-        addString(svgFeatures, "SVG");
-        addString(svgFeatures, "SVGDOM");
-        addString(svgFeatures, "SVG-static");
-        addString(svgFeatures, "SVGDOM-static");
-#endif
-        addString(svgFeatures, "SVG-animation");
-        addString(svgFeatures, "SVGDOM-animation");
-//      addString(svgFeatures, "SVG-dynamic);
-//      addString(svgFeatures, "SVGDOM-dynamic);
-        addString(svgFeatures, "CoreAttribute");
-        addString(svgFeatures, "Structure");
-        addString(svgFeatures, "BasicStructure");
-        addString(svgFeatures, "ContainerAttribute");
-        addString(svgFeatures, "ConditionalProcessing");
-        addString(svgFeatures, "Image");
-        addString(svgFeatures, "Style");
-        addString(svgFeatures, "ViewportAttribute");
-        addString(svgFeatures, "Shape");
-        addString(svgFeatures, "Text");
-        addString(svgFeatures, "BasicText");
-        addString(svgFeatures, "PaintAttribute");
-        addString(svgFeatures, "BasicPaintAttribute");
-        addString(svgFeatures, "OpacityAttribute");
-        addString(svgFeatures, "GraphicsAttribute");
-        addString(svgFeatures, "BaseGraphicsAttribute");
-        addString(svgFeatures, "Marker");
-//      addString(svgFeatures, "ColorProfile"); // requires color-profile, bug 6037
-        addString(svgFeatures, "Gradient");
-        addString(svgFeatures, "Pattern");
-        addString(svgFeatures, "Clip");
-        addString(svgFeatures, "BasicClip");
-        addString(svgFeatures, "Mask");
-        addString(svgFeatures, "Filter");
-        addString(svgFeatures, "BasicFilter");
-        addString(svgFeatures, "DocumentEventsAttribute");
-        addString(svgFeatures, "GraphicalEventsAttribute");
-//      addString(svgFeatures, "AnimationEventsAttribute");
-        addString(svgFeatures, "Cursor");
-        addString(svgFeatures, "Hyperlinking");
-        addString(svgFeatures, "XlinkAttribute");
-        addString(svgFeatures, "ExternalResourcesRequired");
-        addString(svgFeatures, "View");
-        addString(svgFeatures, "Script");
-        addString(svgFeatures, "Animation"); 
-#if ENABLE(SVG_FONTS)
-        addString(svgFeatures, "Font");
-        addString(svgFeatures, "BasicFont");
-#endif
-        addString(svgFeatures, "Extensibility");
-        initialized = true;
-    }
-    return feature.startsWith("http://www.w3.org/tr/svg11/feature#", false)
-        && svgFeatures.get().contains(feature.right(feature.length() - 35));
-}
-
 DOMImplementation::DOMImplementation(Document& document)
     : m_document(document)
 {
 }
 
-bool DOMImplementation::hasFeature(const String& feature, const String& version)
-{
-    if (feature.startsWith("http://www.w3.org/TR/SVG", false)
-        || feature.startsWith("org.w3c.dom.svg", false)
-        || feature.startsWith("org.w3c.svg", false)) {
-        // FIXME: SVG 2.0 support?
-        return isSupportedSVG10Feature(feature, version) || isSupportedSVG11Feature(feature, version);
-    }
-
-    // FIXME: SVG specifications <http://www.w3.org/TR/SVG/script.html#InterfaceSVGZoomEvent>
-    // and <http://www.w3.org/TR/SVG2/interact.html#InterfaceSVGZoomEvent>
-    // say that we should return true for the feature "SVGZoomEvents".
-
-    return true;
-}
-
 ExceptionOr<Ref<DocumentType>> DOMImplementation::createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId)
 {
     ExceptionCode ec = 0;

Modified: trunk/Source/WebCore/dom/DOMImplementation.h (205467 => 205468)


--- trunk/Source/WebCore/dom/DOMImplementation.h	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/dom/DOMImplementation.h	2016-09-06 03:33:50 UTC (rev 205468)
@@ -40,7 +40,7 @@
     WEBCORE_EXPORT ExceptionOr<Ref<DocumentType>> createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId);
     WEBCORE_EXPORT ExceptionOr<Ref<XMLDocument>> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*);
     WEBCORE_EXPORT Ref<HTMLDocument> createHTMLDocument(const String& title);
-    WEBCORE_EXPORT static bool hasFeature(const String& feature, const String& version);
+    static bool hasFeature() { return true; }
     WEBCORE_EXPORT static Ref<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media);
 
     static Ref<Document> createDocument(const String& MIMEType, Frame*, const URL&);

Modified: trunk/Source/WebCore/dom/DOMImplementation.idl (205467 => 205468)


--- trunk/Source/WebCore/dom/DOMImplementation.idl	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/dom/DOMImplementation.idl	2016-09-06 03:33:50 UTC (rev 205468)
@@ -27,9 +27,7 @@
     [NewObject] XMLDocument createDocument(DOMString? namespaceURI, [TreatNullAs=EmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
     [NewObject] HTMLDocument createHTMLDocument(optional DOMString title);
 
-    // FIXME: Latest DOM specification says this should ignore all arguments and always return true.
-    // FIXME: Using "undefined" as default parameter value is wrong.
-    boolean hasFeature(optional DOMString feature = "undefined", [TreatNullAs=EmptyString] optional DOMString version = "undefined");
+    boolean hasFeature();
 
     // FIXME: Using "undefined" as default parameter value is wrong.
     CSSStyleSheet createCSSStyleSheet(optional DOMString title = "undefined", optional DOMString media = "undefined");

Modified: trunk/Source/WebCore/dom/Document.cpp (205467 => 205468)


--- trunk/Source/WebCore/dom/Document.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/dom/Document.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -1347,7 +1347,7 @@
     return UTF8Encoding().domName();
 }
 
-String Document::defaultCharsetForBindings() const
+String Document::defaultCharsetForLegacyBindings() const
 {
     if (Settings* settings = this->settings())
         return settings->defaultTextEncodingName();

Modified: trunk/Source/WebCore/dom/Document.h (205467 => 205468)


--- trunk/Source/WebCore/dom/Document.h	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/dom/Document.h	2016-09-06 03:33:50 UTC (rev 205468)
@@ -413,7 +413,7 @@
 
     WEBCORE_EXPORT String readyState() const;
 
-    WEBCORE_EXPORT String defaultCharsetForBindings() const;
+    WEBCORE_EXPORT String defaultCharsetForLegacyBindings() const;
 
     String charset() const { return Document::encoding(); }
     WEBCORE_EXPORT String characterSetWithUTF8Fallback() const;

Modified: trunk/Source/WebCore/dom/DocumentType.h (205467 => 205468)


--- trunk/Source/WebCore/dom/DocumentType.h	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/dom/DocumentType.h	2016-09-06 03:33:50 UTC (rev 205468)
@@ -37,11 +37,6 @@
         return adoptRef(*new DocumentType(document, name, publicId, systemId));
     }
 
-    // These are needed by ObjC / GObject bindings for backward compatibility.
-    NamedNodeMap* entitiesForBindings() const { return nullptr; }
-    NamedNodeMap* notationsForBindings() const { return nullptr; }
-    String internalSubsetForBindings() const { return String(); }
-
     const String& name() const { return m_name; }
     const String& publicId() const { return m_publicId; }
     const String& systemId() const { return m_systemId; }

Modified: trunk/Source/WebCore/dom/Element.cpp (205467 => 205468)


--- trunk/Source/WebCore/dom/Element.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/dom/Element.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -336,11 +336,6 @@
     simulateClick(*this, underlyingEvent, eventOptions, visualOptions, SimulatedClickCreationOptions::FromUserAgent);
 }
 
-void Element::dispatchSimulatedClickForBindings(Event* underlyingEvent)
-{
-    simulateClick(*this, underlyingEvent, SendNoEvents, DoNotShowPressedLook, SimulatedClickCreationOptions::FromBindings);
-}
-
 Ref<Node> Element::cloneNodeInternal(Document& targetDocument, CloningOperation type)
 {
     switch (type) {

Modified: trunk/Source/WebCore/dom/Element.h (205467 => 205468)


--- trunk/Source/WebCore/dom/Element.h	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/dom/Element.h	2016-09-06 03:33:50 UTC (rev 205468)
@@ -501,7 +501,6 @@
     bool dispatchWheelEvent(const PlatformWheelEvent&);
     bool dispatchKeyEvent(const PlatformKeyboardEvent&);
     void dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions = SendNoEvents, SimulatedClickVisualOptions = ShowPressedLook);
-    void dispatchSimulatedClickForBindings(Event* underlyingEvent);
     void dispatchFocusInEvent(const AtomicString& eventType, RefPtr<Element>&& oldFocusedElement);
     void dispatchFocusOutEvent(const AtomicString& eventType, RefPtr<Element>&& newFocusedElement);
     virtual void dispatchFocusEvent(RefPtr<Element>&& oldFocusedElement, FocusDirection);

Modified: trunk/Source/WebCore/dom/Node.cpp (205467 => 205468)


--- trunk/Source/WebCore/dom/Node.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/dom/Node.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -34,7 +34,6 @@
 #include "ComposedTreeAncestorIterator.h"
 #include "ContainerNodeAlgorithms.h"
 #include "ContextMenuController.h"
-#include "DOMImplementation.h"
 #include "DocumentType.h"
 #include "ElementIterator.h"
 #include "ElementRareData.h"
@@ -86,11 +85,6 @@
 
 using namespace HTMLNames;
 
-bool Node::isSupportedForBindings(const String& feature, const String& version)
-{
-    return DOMImplementation::hasFeature(feature, version);
-}
-
 #if DUMP_NODE_STATISTICS
 static HashSet<Node*> liveNodeSet;
 #endif

Modified: trunk/Source/WebCore/dom/Node.h (205467 => 205468)


--- trunk/Source/WebCore/dom/Node.h	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/dom/Node.h	2016-09-06 03:33:50 UTC (rev 205468)
@@ -121,9 +121,6 @@
         DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20,
     };
 
-    // Only used by ObjC / GObject bindings.
-    WEBCORE_EXPORT static bool isSupportedForBindings(const String& feature, const String& version);
-
     WEBCORE_EXPORT static void startIgnoringLeaks();
     WEBCORE_EXPORT static void stopIgnoringLeaks();
 

Modified: trunk/Source/WebCore/html/HTMLElement.cpp (205467 => 205468)


--- trunk/Source/WebCore/html/HTMLElement.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/html/HTMLElement.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -59,6 +59,7 @@
 #include "RenderElement.h"
 #include "ScriptController.h"
 #include "Settings.h"
+#include "SimulatedClick.h"
 #include "StyleProperties.h"
 #include "SubframeLoader.h"
 #include "Text.h"
@@ -698,7 +699,7 @@
 
 void HTMLElement::click()
 {
-    dispatchSimulatedClickForBindings(nullptr);
+    simulateClick(*this, nullptr, SendNoEvents, DoNotShowPressedLook, SimulatedClickCreationOptions::FromBindings);
 }
 
 void HTMLElement::accessKeyAction(bool sendMouseEvents)

Modified: trunk/Source/WebCore/svg/SVGTests.cpp (205467 => 205468)


--- trunk/Source/WebCore/svg/SVGTests.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/svg/SVGTests.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <[email protected]>
  * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <[email protected]>
- * Copyright (C) 2015 Apple Inc. All right reserved.
+ * Copyright (C) 2015-2016 Apple Inc. All right reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -38,6 +38,74 @@
 
 using namespace SVGNames;
 
+static const HashSet<String, ASCIICaseInsensitiveHash>& supportedSVGFeatures()
+{
+    static NeverDestroyed<HashSet<String, ASCIICaseInsensitiveHash>> features = [] {
+        static const char* const features10[] = {
+#if ENABLE(SVG_FONTS)
+            "dom",
+            "dom.svg",
+            "dom.svg.static",
+            "svg",
+            "svg.static",
+#endif
+        };
+        static const char* const features11[] = {
+            "animation",
+            "basegraphicsattribute",
+            "basicclip",
+            "basicfilter",
+            "basicpaintattribute",
+            "basicstructure",
+            "basictext",
+            "clip",
+            "conditionalprocessing",
+            "containerattribute",
+            "coreattribute",
+            "cursor",
+            "documenteventsattribute",
+            "extensibility",
+            "externalresourcesrequired",
+            "filter",
+            "gradient",
+            "graphicaleventsattribute",
+            "graphicsattribute",
+            "hyperlinking",
+            "image",
+            "marker",
+            "mask",
+            "opacityattribute",
+            "paintattribute",
+            "pattern",
+            "script",
+            "shape",
+            "structure",
+            "style",
+            "svg-animation",
+            "svgdom-animation",
+            "text",
+            "view",
+            "viewportattribute",
+            "xlinkattribute",
+#if ENABLE(SVG_FONTS)
+            "basicfont",
+            "font",
+            "svg",
+            "svg-static",
+            "svgdom",
+            "svgdom-static",
+#endif
+        };
+        HashSet<String, ASCIICaseInsensitiveHash> set;
+        for (auto& feature : features10)
+            set.add(makeString("org.w3c.", feature));
+        for (auto& feature : features11)
+            set.add(makeString("http://www.w3.org/tr/svg11/feature#", feature));
+        return set;
+    }();
+    return features;
+}
+
 SVGTests::SVGTests()
     : m_requiredFeatures(requiredFeaturesAttr)
     , m_requiredExtensions(requiredExtensionsAttr)
@@ -87,7 +155,7 @@
 bool SVGTests::isValid() const
 {
     for (auto& feature : m_requiredFeatures.value) {
-        if (feature.isEmpty() || !DOMImplementation::hasFeature(feature, String()))
+        if (feature.isEmpty() || !supportedSVGFeatures().contains(feature))
             return false;
     }
     for (auto& language : m_systemLanguage.value) {
@@ -177,4 +245,25 @@
     return m_systemLanguage.value;
 }
 
+bool SVGTests::hasFeatureForLegacyBindings(const String& feature, const String& version)
+{
+    // FIXME: This function is here only to be exposed in the Objective-C and GObject bindings for both Node and DOMImplementation.
+    // It's likely that we can just remove this and instead have the bindings return true unconditionally.
+    // This is what the DOMImplementation function now does in _javascript_ as is now suggested in the DOM specification.
+    // The behavior implemented below is quirky, but preserves what WebKit has done for at least the last few years.
+
+    bool hasSVG10FeaturePrefix = feature.startsWith("org.w3c.dom.svg", false) || feature.startsWith("org.w3c.svg", false);
+    bool hasSVG11FeaturePrefix = feature.startsWith("http://www.w3.org/tr/svg", false);
+
+    // We don't even try to handle feature names that don't look like the SVG ones, so just return true for all of those.
+    if (!(hasSVG10FeaturePrefix || hasSVG11FeaturePrefix))
+        return true;
+
+    // If the version number matches the style of the feature name, then use the set to see if the feature is supported.
+    if (version.isEmpty() || (hasSVG10FeaturePrefix && version == "1.0") || (hasSVG11FeaturePrefix && version == "1.1"))
+        return supportedSVGFeatures().contains(feature);
+
+    return false;
 }
+
+}

Modified: trunk/Source/WebCore/svg/SVGTests.h (205467 => 205468)


--- trunk/Source/WebCore/svg/SVGTests.h	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebCore/svg/SVGTests.h	2016-09-06 03:33:50 UTC (rev 205468)
@@ -18,8 +18,7 @@
  * Boston, MA 02110-1301, USA.
  */
 
-#ifndef SVGTests_h
-#define SVGTests_h
+#pragma once
 
 #include "SVGAnimatedPropertyMacros.h"
 #include "SVGStringList.h"
@@ -46,6 +45,8 @@
 
     static const SVGAttributeToPropertyMap& attributeToPropertyMap();
 
+    WEBCORE_EXPORT static bool hasFeatureForLegacyBindings(const String& feature, const String& version);
+
 protected:
     SVGTests();
 
@@ -62,5 +63,3 @@
 };
 
 } // namespace WebCore
-
-#endif // SVGTests_h

Modified: trunk/Source/WebKit/mac/ChangeLog (205467 => 205468)


--- trunk/Source/WebKit/mac/ChangeLog	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebKit/mac/ChangeLog	2016-09-06 03:33:50 UTC (rev 205468)
@@ -1,3 +1,29 @@
+2016-09-05  Darin Adler  <[email protected]>
+
+        More bindings improvements, particularly things not needed for _javascript_ bindings
+        https://bugs.webkit.org/show_bug.cgi?id=161572
+
+        Reviewed by Sam Weinig.
+
+        * DOM/DOMDOMImplementation.mm:
+        (-[DOMImplementation hasFeature:version:]): Call SVGTests::hasFeatureForLegacyBindings
+        instead of DOMImplementation::hasFeature. Also removed JSMainThreadNullState
+        since this does not do anything that can invoke _javascript_.
+
+        * DOM/DOMDocument.mm:
+        (-[DOMDocument defaultCharset]): Call defaultCharsetForLegacyBindings. Also removed
+        JSMainThreadNullState.
+
+        * DOM/DOMDocumentType.mm:
+        (-[DOMDocumentType entities]): Changed to simply return nil; same behavior as before,
+        but with no dependency on WebCore. Also removed JSMainThreadNullState.
+        (-[DOMDocumentType notations]): Ditto.
+        (-[DOMDocumentType internalSubset]): Ditto, except empty string rather than nil.
+
+        * DOM/DOMNode.mm:
+        (-[DOMNode isSupported:version:]): Call SVGTests::hasFeatureForLegacyBindings
+        instead of Node::isSupportedForBindings. Also removed JSMainThreadNullState.
+
 2016-09-04  Joseph Pecoraro  <[email protected]>
 
         Remove unnecessary RetainPtr.

Modified: trunk/Source/WebKit/mac/DOM/DOMDOMImplementation.mm (205467 => 205468)


--- trunk/Source/WebKit/mac/DOM/DOMDOMImplementation.mm	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebKit/mac/DOM/DOMDOMImplementation.mm	2016-09-06 03:33:50 UTC (rev 205468)
@@ -36,6 +36,7 @@
 #import <WebCore/DocumentType.h>
 #import <WebCore/HTMLDocument.h>
 #import <WebCore/JSMainThreadExecState.h>
+#import <WebCore/SVGTests.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebCoreObjCExtras.h>
 #import <WebCore/WebScriptObjectPrivate.h>
@@ -58,8 +59,7 @@
 
 - (BOOL)hasFeature:(NSString *)feature version:(NSString *)version
 {
-    WebCore::JSMainThreadNullState state;
-    return unwrap(*self).hasFeature(feature, version);
+    return WebCore::SVGTests::hasFeatureForLegacyBindings(feature, version);
 }
 
 - (DOMDocumentType *)createDocumentType:(NSString *)qualifiedName publicId:(NSString *)publicId systemId:(NSString *)systemId

Modified: trunk/Source/WebKit/mac/DOM/DOMDocument.mm (205467 => 205468)


--- trunk/Source/WebKit/mac/DOM/DOMDocument.mm	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebKit/mac/DOM/DOMDocument.mm	2016-09-06 03:33:50 UTC (rev 205468)
@@ -310,8 +310,7 @@
 
 - (NSString *)defaultCharset
 {
-    WebCore::JSMainThreadNullState state;
-    return IMPL->defaultCharsetForBindings();
+    return IMPL->defaultCharsetForLegacyBindings();
 }
 
 - (NSString *)readyState

Modified: trunk/Source/WebKit/mac/DOM/DOMDocumentType.mm (205467 => 205468)


--- trunk/Source/WebKit/mac/DOM/DOMDocumentType.mm	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebKit/mac/DOM/DOMDocumentType.mm	2016-09-06 03:33:50 UTC (rev 205468)
@@ -48,14 +48,12 @@
 
 - (DOMNamedNodeMap *)entities
 {
-    WebCore::JSMainThreadNullState state;
-    return kit(WTF::getPtr(IMPL->entitiesForBindings()));
+    return nil;
 }
 
 - (DOMNamedNodeMap *)notations
 {
-    WebCore::JSMainThreadNullState state;
-    return kit(WTF::getPtr(IMPL->notationsForBindings()));
+    return nil;
 }
 
 - (NSString *)publicId
@@ -72,8 +70,7 @@
 
 - (NSString *)internalSubset
 {
-    WebCore::JSMainThreadNullState state;
-    return IMPL->internalSubsetForBindings();
+    return @"";
 }
 
 - (void)remove

Modified: trunk/Source/WebKit/mac/DOM/DOMNode.mm (205467 => 205468)


--- trunk/Source/WebKit/mac/DOM/DOMNode.mm	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebKit/mac/DOM/DOMNode.mm	2016-09-06 03:33:50 UTC (rev 205468)
@@ -33,9 +33,11 @@
 #import "DOMNodeListInternal.h"
 #import "ExceptionHandlers.h"
 #import "ObjCEventListener.h"
+#import <WebCore/DOMImplementation.h>
 #import <WebCore/Element.h>
 #import <WebCore/JSMainThreadExecState.h>
 #import <WebCore/NodeList.h>
+#import <WebCore/SVGTests.h>
 #import <WebCore/ThreadCheck.h>
 #import <WebCore/WebCoreObjCExtras.h>
 #import <WebCore/WebScriptObjectPrivate.h>
@@ -291,8 +293,7 @@
 
 - (BOOL)isSupported:(NSString *)feature version:(NSString *)version
 {
-    JSMainThreadNullState state;
-    return unwrap(*self).isSupportedForBindings(feature, version);
+    return SVGTests::hasFeatureForLegacyBindings(feature, version);
 }
 
 - (BOOL)hasAttributes

Modified: trunk/Source/WebKit2/ChangeLog (205467 => 205468)


--- trunk/Source/WebKit2/ChangeLog	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebKit2/ChangeLog	2016-09-06 03:33:50 UTC (rev 205468)
@@ -1,3 +1,29 @@
+2016-09-05  Darin Adler  <[email protected]>
+
+        More bindings improvements, particularly things not needed for _javascript_ bindings
+        https://bugs.webkit.org/show_bug.cgi?id=161572
+
+        Reviewed by Sam Weinig.
+
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
+        (webkit_dom_dom_implementation_has_feature): Call SVGTests::hasFeatureForLegacyBindings
+        instead of DOMImplementation::hasFeature. Also removed JSMainThreadNullState
+        since this does not do anything that can invoke _javascript_.
+
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
+        (webkit_dom_document_get_default_charset): Call defaultCharsetForLegacyBindings.
+        Also removed JSMainThreadNullState.
+
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
+        (webkit_dom_document_type_get_entities): Changed to simply return nullptr; same behavior
+        as before, but with no dependency on WebCore. Also removed JSMainThreadNullState.
+        (webkit_dom_document_type_get_notations): Ditto.
+        (webkit_dom_document_type_get_internal_subset): Ditto.
+
+        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
+        (webkit_dom_node_is_supported): Call SVGTests::hasFeatureForLegacyBindings
+        instead of Node::isSupportedForBindings. Also removed JSMainThreadNullState.
+
 2016-09-05  Michael Catanzaro  <[email protected]>
 
         Unreviewed, update stale variable name

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp (205467 => 205468)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -33,6 +33,7 @@
 #include <WebCore/ExceptionCode.h>
 #include <WebCore/ExceptionCodeDescription.h>
 #include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/SVGTests.h>
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
 
@@ -107,15 +108,12 @@
 
 gboolean webkit_dom_dom_implementation_has_feature(WebKitDOMDOMImplementation* self, const gchar* feature, const gchar* version)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(WEBKIT_DOM_IS_DOM_IMPLEMENTATION(self), FALSE);
     g_return_val_if_fail(feature, FALSE);
     g_return_val_if_fail(version, FALSE);
-    WebCore::DOMImplementation* item = WebKit::core(self);
     WTF::String convertedFeature = WTF::String::fromUTF8(feature);
     WTF::String convertedVersion = WTF::String::fromUTF8(version);
-    gboolean result = item->hasFeature(convertedFeature, convertedVersion);
-    return result;
+    return WebCore::SVGTests::hasFeatureForLegacyBindings(convertedFeature, convertedVersion);
 }
 
 WebKitDOMDocumentType* webkit_dom_dom_implementation_create_document_type(WebKitDOMDOMImplementation* self, const gchar* qualifiedName, const gchar* publicId, const gchar* systemId, GError** error)

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp (205467 => 205468)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -145,9 +145,7 @@
 gchar* webkit_dom_document_get_default_charset(WebKitDOMDocument* self)
 {
     g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), nullptr);
-
-    WebCore::JSMainThreadNullState state;
-    return convertToUTF8String(WebKit::core(self)->defaultCharsetForBindings());
+    return convertToUTF8String(WebKit::core(self)->defaultCharsetForLegacyBindings());
 }
 
 WebKitDOMText* webkit_dom_text_replace_whole_text(WebKitDOMText* self, const gchar* content, GError** error)

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp (205467 => 205468)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -232,29 +232,20 @@
 
 WebKitDOMNamedNodeMap* webkit_dom_document_type_get_entities(WebKitDOMDocumentType* self)
 {
-    WebCore::JSMainThreadNullState state;
-    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), 0);
-    WebCore::DocumentType* item = WebKit::core(self);
-    RefPtr<WebCore::NamedNodeMap> gobjectResult = WTF::getPtr(item->entitiesForBindings());
-    return WebKit::kit(gobjectResult.get());
+    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), nullptr);
+    return nullptr;
 }
 
 WebKitDOMNamedNodeMap* webkit_dom_document_type_get_notations(WebKitDOMDocumentType* self)
 {
-    WebCore::JSMainThreadNullState state;
-    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), 0);
-    WebCore::DocumentType* item = WebKit::core(self);
-    RefPtr<WebCore::NamedNodeMap> gobjectResult = WTF::getPtr(item->notationsForBindings());
-    return WebKit::kit(gobjectResult.get());
+    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), nullptr);
+    return nullptr;
 }
 
 gchar* webkit_dom_document_type_get_internal_subset(WebKitDOMDocumentType* self)
 {
-    WebCore::JSMainThreadNullState state;
-    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), 0);
-    WebCore::DocumentType* item = WebKit::core(self);
-    gchar* result = convertToUTF8String(item->internalSubsetForBindings());
-    return result;
+    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), nullptr);
+    return nullptr;
 }
 
 gchar* webkit_dom_document_type_get_public_id(WebKitDOMDocumentType* self)

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp (205467 => 205468)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp	2016-09-06 03:16:22 UTC (rev 205467)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp	2016-09-06 03:33:50 UTC (rev 205468)
@@ -1,6 +1,5 @@
 /*
  *  This file is part of the WebKit open source project.
- *  This file has been generated by generate-bindings.pl. DO NOT MODIFY!
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
@@ -21,13 +20,9 @@
 #include "config.h"
 #include "WebKitDOMNode.h"
 
-#include <WebCore/CSSImportRule.h>
+#include "ConvertToUTF8String.h"
 #include "DOMObjectCache.h"
-#include <WebCore/Document.h>
-#include <WebCore/ExceptionCode.h>
-#include <WebCore/ExceptionCodeDescription.h>
 #include "GObjectEventListener.h"
-#include <WebCore/JSMainThreadExecState.h>
 #include "WebKitDOMDocumentPrivate.h"
 #include "WebKitDOMElementPrivate.h"
 #include "WebKitDOMEventPrivate.h"
@@ -34,9 +29,14 @@
 #include "WebKitDOMEventTarget.h"
 #include "WebKitDOMNodeListPrivate.h"
 #include "WebKitDOMNodePrivate.h"
+#include "WebKitDOMNodeUnstable.h"
 #include "WebKitDOMPrivate.h"
-#include "ConvertToUTF8String.h"
-#include "WebKitDOMNodeUnstable.h"
+#include <WebCore/CSSImportRule.h>
+#include <WebCore/Document.h>
+#include <WebCore/ExceptionCode.h>
+#include <WebCore/ExceptionCodeDescription.h>
+#include <WebCore/JSMainThreadExecState.h>
+#include <WebCore/SVGTests.h>
 #include <wtf/GetPtr.h>
 #include <wtf/RefPtr.h>
 
@@ -485,15 +485,12 @@
 
 gboolean webkit_dom_node_is_supported(WebKitDOMNode* self, const gchar* feature, const gchar* version)
 {
-    WebCore::JSMainThreadNullState state;
     g_return_val_if_fail(WEBKIT_DOM_IS_NODE(self), FALSE);
     g_return_val_if_fail(feature, FALSE);
     g_return_val_if_fail(version, FALSE);
-    WebCore::Node* item = WebKit::core(self);
     WTF::String convertedFeature = WTF::String::fromUTF8(feature);
     WTF::String convertedVersion = WTF::String::fromUTF8(version);
-    gboolean result = item->isSupportedForBindings(convertedFeature, convertedVersion);
-    return result;
+    return WebCore::SVGTests::hasFeatureForLegacyBindings(convertedFeature, convertedVersion);
 }
 
 gboolean webkit_dom_node_is_same_node(WebKitDOMNode* self, WebKitDOMNode* other)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to