Changeset 205468 in webkit


Ignore:
Timestamp:
Sep 5, 2016 8:33:50 PM (8 years ago)
Author:
Darin Adler
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:

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.

Location:
trunk
Files:
44 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r205464 r205468  
     12016-09-05  Darin Adler  <darin@apple.com>
     2
     3        More bindings improvements, particularly things not needed for JavaScript bindings
     4        https://bugs.webkit.org/show_bug.cgi?id=161572
     5
     6        Reviewed by Sam Weinig.
     7
     8        * TestExpectations: Updated to expect success instead of failure for the
     9        imported/mozilla/svg tests named conditions-01.svg, conditions-06.svg,
     10        dynamic-conditions-01.svg, switch-01.svg, and
     11        svg-integration/dynamic-conditions-outer-svg-03.xhtml. These are now all passing,
     12        likely because of a progression due to correctly handling bogus feature strings.
     13        Also, a comment in bug 139115 claims that requiredFeatures it going to be removed
     14        from the SVG specifications and from other implementations. Updated to expect
     15        possible failure for dynamic-conditions-08.svg and dynamic-conditions-12.svg. Before
     16        these were reliably passing because of the incorrect handling of bogus feature strings.
     17        Now, they are sometimes failing because the tests include required code that runs on
     18        a timer, but no code to guarantee the test engine will wait for the timer to fire.
     19
     20        * platform/efl/TestExpectations: Removed now-redundant expectations that these
     21        tests will pass; now expected on all platforms.
     22
     23        * platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt:
     24        * platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt:
     25        * platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt:
     26        * platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.png:
     27        * platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt:
     28        * platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.png:
     29        * platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt:
     30        * platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.png:
     31        * platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt:
     32        * svg/custom/svg-features-expected.txt:
     33        Updated results for all these tests now that DOMImplementation.hasFeature always
     34        returns true. The tests aren't super-valuable any more, but I don't see a good
     35        reason to locally modify the imported tests from the W3C-SVG-1.1 suite, and
     36        while the svg-features test isn't great, keeping it does provide a little test
     37        coverage for the "always return true" behavior.
     38
     39        * platform/ios-simulator/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
     40        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
     41        * platform/win/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
     42        * svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt:
     43        Updated for progression due to correctly handling bogus feature strings.
     44
    1452016-09-05  Commit Queue  <commit-queue@webkit.org>
    246
  • trunk/LayoutTests/TestExpectations

    r205399 r205468  
    483483webkit.org/b/139107 imported/mozilla/svg/clip-02a.svg [ ImageOnlyFailure ]
    484484webkit.org/b/139107 imported/mozilla/svg/clip-02b.svg [ ImageOnlyFailure ]
    485 webkit.org/b/139115 imported/mozilla/svg/conditions-01.svg [ ImageOnlyFailure ]
    486 webkit.org/b/139115 imported/mozilla/svg/conditions-06.svg [ ImageOnlyFailure ]
    487 webkit.org/b/139115 imported/mozilla/svg/dynamic-conditions-01.svg [ ImageOnlyFailure ]
    488485webkit.org/b/139115 imported/mozilla/svg/dynamic-conditions-03.svg [ ImageOnlyFailure ]
    489 webkit.org/b/139115 imported/mozilla/svg/switch-01.svg [ ImageOnlyFailure ]
    490486webkit.org/b/139115 imported/mozilla/svg/svg-integration/dynamic-conditions-outer-svg-02.xhtml [ ImageOnlyFailure ]
    491 webkit.org/b/139115 imported/mozilla/svg/svg-integration/dynamic-conditions-outer-svg-03.xhtml [ ImageOnlyFailure ]
    492487webkit.org/b/139116 imported/mozilla/svg/conditions-07.svg [ ImageOnlyFailure ]
    493488webkit.org/b/139117 imported/mozilla/svg/conditions-08.svg [ ImageOnlyFailure ]
    494489webkit.org/b/139118 imported/mozilla/svg/cssComment-in-attribute-01.svg [ ImageOnlyFailure ]
     490imported/mozilla/svg/dynamic-conditions-08.svg [ Pass ImageOnlyFailure ]
     491imported/mozilla/svg/dynamic-conditions-12.svg [ Pass ImageOnlyFailure ]
    495492webkit.org/b/139119 imported/mozilla/svg/text/multiple-x-rtl.svg [ ImageOnlyFailure ]
    496493webkit.org/b/139119 imported/mozilla/svg/text/multiple-x-holes-rtl.svg [ ImageOnlyFailure ]
  • trunk/LayoutTests/platform/efl/TestExpectations

    r205339 r205468  
    11511151imported/mozilla/svg/clip-02a.svg [ Pass ]
    11521152imported/mozilla/svg/clip-02b.svg [ Pass ]
    1153 imported/mozilla/svg/conditions-01.svg [ Pass ]
    1154 imported/mozilla/svg/conditions-06.svg [ Pass ]
    11551153imported/mozilla/svg/conditions-07.svg [ Pass ]
    11561154imported/mozilla/svg/conditions-08.svg [ Pass ]
    11571155imported/mozilla/svg/cssComment-in-attribute-01.svg [ Pass ]
    1158 imported/mozilla/svg/dynamic-conditions-01.svg [ Pass ]
    11591156imported/mozilla/svg/dynamic-conditions-03.svg [ Pass ]
    11601157imported/mozilla/svg/dynamic-marker-01.svg [ Pass ]
  • trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt

    r205001 r205468  
    1313        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]
    1414        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]
    15       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]
    16       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]
    1715      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]
    1816      RenderSVGRect {rect} at (0,0) size 480x360 [x=0.00] [y=0.00] [width=480.00] [height=360.00]
  • trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt

    r205001 r205468  
    3535      RenderSVGInlineText {#text} at (0,0) size 147x34
    3636        chunk 1 text run 1 at (10.00,250.00) startOffset 0 endOffset 11 width 146.65: "org.w3c.svg"
    37     RenderSVGText {text} at (370,223) size 57x34 contains 1 chunk(s)
    38       RenderSVGInlineText {#text} at (0,0) size 57x34
    39         chunk 1 text run 1 at (370.00,250.00) startOffset 0 endOffset 5 width 56.63: "false"
     37    RenderSVGText {text} at (370,223) size 47x34 contains 1 chunk(s)
     38      RenderSVGInlineText {#text} at (0,0) size 47x34
     39        chunk 1 text run 1 at (370.00,250.00) startOffset 0 endOffset 4 width 46.64: "true"
  • trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt

    r205001 r205468  
    1111      RenderSVGInlineText {#text} at (0,0) size 206x34
    1212        chunk 1 text run 1 at (5.00,45.00) startOffset 0 endOffset 16 width 205.80: "org.w3c.svg.lang"
    13     RenderSVGText {text} at (385,18) size 57x34 contains 1 chunk(s)
    14       RenderSVGInlineText {#text} at (0,0) size 57x34
    15         chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 5 width 56.63: "false"
     13    RenderSVGText {text} at (385,18) size 47x34 contains 1 chunk(s)
     14      RenderSVGInlineText {#text} at (0,0) size 47x34
     15        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 4 width 46.64: "true"
    1616    RenderSVGText {text} at (5,58) size 258x34 contains 1 chunk(s)
    1717      RenderSVGInlineText {#text} at (0,0) size 258x34
    1818        chunk 1 text run 1 at (5.00,85.00) startOffset 0 endOffset 19 width 257.45: "org.w3c.svg.dynamic"
    19     RenderSVGText {text} at (385,58) size 57x34 contains 1 chunk(s)
    20       RenderSVGInlineText {#text} at (0,0) size 57x34
    21         chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 5 width 56.63: "false"
     19    RenderSVGText {text} at (385,58) size 47x34 contains 1 chunk(s)
     20      RenderSVGInlineText {#text} at (0,0) size 47x34
     21        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 4 width 46.64: "true"
    2222    RenderSVGText {text} at (5,98) size 218x34 contains 1 chunk(s)
    2323      RenderSVGInlineText {#text} at (0,0) size 218x34
    2424        chunk 1 text run 1 at (5.00,125.00) startOffset 0 endOffset 18 width 217.46: "org.w3c.svg.static"
    25     RenderSVGText {text} at (385,98) size 57x34 contains 1 chunk(s)
    26       RenderSVGInlineText {#text} at (0,0) size 57x34
    27         chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 5 width 56.63: "false"
     25    RenderSVGText {text} at (385,98) size 47x34 contains 1 chunk(s)
     26      RenderSVGInlineText {#text} at (0,0) size 47x34
     27        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 4 width 46.64: "true"
    2828    RenderSVGText {text} at (5,138) size 208x34 contains 1 chunk(s)
    2929      RenderSVGInlineText {#text} at (0,0) size 208x34
    3030        chunk 1 text run 1 at (5.00,165.00) startOffset 0 endOffset 15 width 207.48: "org.w3c.dom.svg"
    31     RenderSVGText {text} at (385,138) size 57x34 contains 1 chunk(s)
    32       RenderSVGInlineText {#text} at (0,0) size 57x34
    33         chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 5 width 56.63: "false"
     31    RenderSVGText {text} at (385,138) size 47x34 contains 1 chunk(s)
     32      RenderSVGInlineText {#text} at (0,0) size 47x34
     33        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 4 width 46.64: "true"
    3434    RenderSVGText {text} at (5,178) size 147x34 contains 1 chunk(s)
    3535      RenderSVGInlineText {#text} at (0,0) size 147x34
    3636        chunk 1 text run 1 at (5.00,205.00) startOffset 0 endOffset 11 width 146.65: "org.w3c.svg"
    37     RenderSVGText {text} at (385,178) size 57x34 contains 1 chunk(s)
    38       RenderSVGInlineText {#text} at (0,0) size 57x34
    39         chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 5 width 56.63: "false"
     37    RenderSVGText {text} at (385,178) size 47x34 contains 1 chunk(s)
     38      RenderSVGInlineText {#text} at (0,0) size 47x34
     39        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 4 width 46.64: "true"
  • trunk/LayoutTests/platform/ios-simulator/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt

    r205001 r205468  
    1111      RenderSVGInlineText {#text} at (0,0) size 279x34
    1212        chunk 1 text run 1 at (5.00,45.00) startOffset 0 endOffset 22 width 278.29: "org.w3c.dom.svg.static"
    13     RenderSVGText {text} at (385,18) size 57x34 contains 1 chunk(s)
    14       RenderSVGInlineText {#text} at (0,0) size 57x34
    15         chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 5 width 56.63: "false"
     13    RenderSVGText {text} at (385,18) size 47x34 contains 1 chunk(s)
     14      RenderSVGInlineText {#text} at (0,0) size 47x34
     15        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 4 width 46.64: "true"
    1616    RenderSVGText {text} at (5,58) size 335x34 contains 1 chunk(s)
    1717      RenderSVGInlineText {#text} at (0,0) size 335x34
    1818        chunk 1 text run 1 at (5.00,85.00) startOffset 0 endOffset 25 width 334.95: "org.w3c.dom.svg.animation"
    19     RenderSVGText {text} at (385,58) size 57x34 contains 1 chunk(s)
    20       RenderSVGInlineText {#text} at (0,0) size 57x34
    21         chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 5 width 56.63: "false"
     19    RenderSVGText {text} at (385,58) size 47x34 contains 1 chunk(s)
     20      RenderSVGInlineText {#text} at (0,0) size 47x34
     21        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 4 width 46.64: "true"
    2222    RenderSVGText {text} at (5,98) size 319x34 contains 1 chunk(s)
    2323      RenderSVGInlineText {#text} at (0,0) size 319x34
    2424        chunk 1 text run 1 at (5.00,125.00) startOffset 0 endOffset 23 width 318.28: "org.w3c.dom.svg.dynamic"
    25     RenderSVGText {text} at (385,98) size 57x34 contains 1 chunk(s)
    26       RenderSVGInlineText {#text} at (0,0) size 57x34
    27         chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 5 width 56.63: "false"
     25    RenderSVGText {text} at (385,98) size 47x34 contains 1 chunk(s)
     26      RenderSVGInlineText {#text} at (0,0) size 47x34
     27        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 4 width 46.64: "true"
    2828    RenderSVGText {text} at (5,138) size 245x34 contains 1 chunk(s)
    2929      RenderSVGInlineText {#text} at (0,0) size 245x34
    3030        chunk 1 text run 1 at (5.00,165.00) startOffset 0 endOffset 19 width 244.97: "org.w3c.dom.svg.all"
    31     RenderSVGText {text} at (385,138) size 57x34 contains 1 chunk(s)
    32       RenderSVGInlineText {#text} at (0,0) size 57x34
    33         chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 5 width 56.63: "false"
     31    RenderSVGText {text} at (385,138) size 47x34 contains 1 chunk(s)
     32      RenderSVGInlineText {#text} at (0,0) size 47x34
     33        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 4 width 46.64: "true"
    3434    RenderSVGText {text} at (5,178) size 185x34 contains 1 chunk(s)
    3535      RenderSVGInlineText {#text} at (0,0) size 185x34
    3636        chunk 1 text run 1 at (5.00,205.00) startOffset 0 endOffset 15 width 184.13: "org.w3c.svg.all"
    37     RenderSVGText {text} at (385,178) size 57x34 contains 1 chunk(s)
    38       RenderSVGInlineText {#text} at (0,0) size 57x34
    39         chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 5 width 56.63: "false"
     37    RenderSVGText {text} at (385,178) size 47x34 contains 1 chunk(s)
     38      RenderSVGInlineText {#text} at (0,0) size 47x34
     39        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 4 width 46.64: "true"
  • trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt

    r178691 r205468  
    1313        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]
    1414        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]
    15       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]
    16       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]
    1715      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]
    1816      RenderSVGRect {rect} at (0,0) size 480x360 [x=0.00] [y=0.00] [width=480.00] [height=360.00]
  • trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-03-b-expected.txt

    r177774 r205468  
    3535      RenderSVGInlineText {#text} at (0,0) size 147x35
    3636        chunk 1 text run 1 at (10.00,250.00) startOffset 0 endOffset 11 width 146.65: "org.w3c.svg"
    37     RenderSVGText {text} at (370,222) size 57x36 contains 1 chunk(s)
    38       RenderSVGInlineText {#text} at (0,0) size 57x35
    39         chunk 1 text run 1 at (370.00,250.00) startOffset 0 endOffset 5 width 56.63: "false"
     37    RenderSVGText {text} at (370,222) size 47x36 contains 1 chunk(s)
     38      RenderSVGInlineText {#text} at (0,0) size 47x35
     39        chunk 1 text run 1 at (370.00,250.00) startOffset 0 endOffset 4 width 46.64: "true"
  • trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-04-b-expected.txt

    r177774 r205468  
    1111      RenderSVGInlineText {#text} at (0,0) size 206x35
    1212        chunk 1 text run 1 at (5.00,45.00) startOffset 0 endOffset 16 width 205.80: "org.w3c.svg.lang"
    13     RenderSVGText {text} at (385,17) size 57x36 contains 1 chunk(s)
    14       RenderSVGInlineText {#text} at (0,0) size 57x35
    15         chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 5 width 56.63: "false"
     13    RenderSVGText {text} at (385,17) size 47x36 contains 1 chunk(s)
     14      RenderSVGInlineText {#text} at (0,0) size 47x35
     15        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 4 width 46.64: "true"
    1616    RenderSVGText {text} at (5,57) size 258x36 contains 1 chunk(s)
    1717      RenderSVGInlineText {#text} at (0,0) size 258x35
    1818        chunk 1 text run 1 at (5.00,85.00) startOffset 0 endOffset 19 width 257.45: "org.w3c.svg.dynamic"
    19     RenderSVGText {text} at (385,57) size 57x36 contains 1 chunk(s)
    20       RenderSVGInlineText {#text} at (0,0) size 57x35
    21         chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 5 width 56.63: "false"
     19    RenderSVGText {text} at (385,57) size 47x36 contains 1 chunk(s)
     20      RenderSVGInlineText {#text} at (0,0) size 47x35
     21        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 4 width 46.64: "true"
    2222    RenderSVGText {text} at (5,97) size 218x36 contains 1 chunk(s)
    2323      RenderSVGInlineText {#text} at (0,0) size 218x35
    2424        chunk 1 text run 1 at (5.00,125.00) startOffset 0 endOffset 18 width 217.46: "org.w3c.svg.static"
    25     RenderSVGText {text} at (385,97) size 57x36 contains 1 chunk(s)
    26       RenderSVGInlineText {#text} at (0,0) size 57x35
    27         chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 5 width 56.63: "false"
     25    RenderSVGText {text} at (385,97) size 47x36 contains 1 chunk(s)
     26      RenderSVGInlineText {#text} at (0,0) size 47x35
     27        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 4 width 46.64: "true"
    2828    RenderSVGText {text} at (5,137) size 208x36 contains 1 chunk(s)
    2929      RenderSVGInlineText {#text} at (0,0) size 208x35
    3030        chunk 1 text run 1 at (5.00,165.00) startOffset 0 endOffset 15 width 207.48: "org.w3c.dom.svg"
    31     RenderSVGText {text} at (385,137) size 57x36 contains 1 chunk(s)
    32       RenderSVGInlineText {#text} at (0,0) size 57x35
    33         chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 5 width 56.63: "false"
     31    RenderSVGText {text} at (385,137) size 47x36 contains 1 chunk(s)
     32      RenderSVGInlineText {#text} at (0,0) size 47x35
     33        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 4 width 46.64: "true"
    3434    RenderSVGText {text} at (5,177) size 147x36 contains 1 chunk(s)
    3535      RenderSVGInlineText {#text} at (0,0) size 147x35
    3636        chunk 1 text run 1 at (5.00,205.00) startOffset 0 endOffset 11 width 146.65: "org.w3c.svg"
    37     RenderSVGText {text} at (385,177) size 57x36 contains 1 chunk(s)
    38       RenderSVGInlineText {#text} at (0,0) size 57x35
    39         chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 5 width 56.63: "false"
     37    RenderSVGText {text} at (385,177) size 47x36 contains 1 chunk(s)
     38      RenderSVGInlineText {#text} at (0,0) size 47x35
     39        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 4 width 46.64: "true"
  • trunk/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-dom-05-b-expected.txt

    r177774 r205468  
    1111      RenderSVGInlineText {#text} at (0,0) size 279x35
    1212        chunk 1 text run 1 at (5.00,45.00) startOffset 0 endOffset 22 width 278.29: "org.w3c.dom.svg.static"
    13     RenderSVGText {text} at (385,17) size 57x36 contains 1 chunk(s)
    14       RenderSVGInlineText {#text} at (0,0) size 57x35
    15         chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 5 width 56.63: "false"
     13    RenderSVGText {text} at (385,17) size 47x36 contains 1 chunk(s)
     14      RenderSVGInlineText {#text} at (0,0) size 47x35
     15        chunk 1 text run 1 at (385.00,45.00) startOffset 0 endOffset 4 width 46.64: "true"
    1616    RenderSVGText {text} at (5,57) size 335x36 contains 1 chunk(s)
    1717      RenderSVGInlineText {#text} at (0,0) size 335x35
    1818        chunk 1 text run 1 at (5.00,85.00) startOffset 0 endOffset 25 width 334.95: "org.w3c.dom.svg.animation"
    19     RenderSVGText {text} at (385,57) size 57x36 contains 1 chunk(s)
    20       RenderSVGInlineText {#text} at (0,0) size 57x35
    21         chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 5 width 56.63: "false"
     19    RenderSVGText {text} at (385,57) size 47x36 contains 1 chunk(s)
     20      RenderSVGInlineText {#text} at (0,0) size 47x35
     21        chunk 1 text run 1 at (385.00,85.00) startOffset 0 endOffset 4 width 46.64: "true"
    2222    RenderSVGText {text} at (5,97) size 319x36 contains 1 chunk(s)
    2323      RenderSVGInlineText {#text} at (0,0) size 319x35
    2424        chunk 1 text run 1 at (5.00,125.00) startOffset 0 endOffset 23 width 318.28: "org.w3c.dom.svg.dynamic"
    25     RenderSVGText {text} at (385,97) size 57x36 contains 1 chunk(s)
    26       RenderSVGInlineText {#text} at (0,0) size 57x35
    27         chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 5 width 56.63: "false"
     25    RenderSVGText {text} at (385,97) size 47x36 contains 1 chunk(s)
     26      RenderSVGInlineText {#text} at (0,0) size 47x35
     27        chunk 1 text run 1 at (385.00,125.00) startOffset 0 endOffset 4 width 46.64: "true"
    2828    RenderSVGText {text} at (5,137) size 245x36 contains 1 chunk(s)
    2929      RenderSVGInlineText {#text} at (0,0) size 245x35
    3030        chunk 1 text run 1 at (5.00,165.00) startOffset 0 endOffset 19 width 244.97: "org.w3c.dom.svg.all"
    31     RenderSVGText {text} at (385,137) size 57x36 contains 1 chunk(s)
    32       RenderSVGInlineText {#text} at (0,0) size 57x35
    33         chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 5 width 56.63: "false"
     31    RenderSVGText {text} at (385,137) size 47x36 contains 1 chunk(s)
     32      RenderSVGInlineText {#text} at (0,0) size 47x35
     33        chunk 1 text run 1 at (385.00,165.00) startOffset 0 endOffset 4 width 46.64: "true"
    3434    RenderSVGText {text} at (5,177) size 185x36 contains 1 chunk(s)
    3535      RenderSVGInlineText {#text} at (0,0) size 185x35
    3636        chunk 1 text run 1 at (5.00,205.00) startOffset 0 endOffset 15 width 184.13: "org.w3c.svg.all"
    37     RenderSVGText {text} at (385,177) size 57x36 contains 1 chunk(s)
    38       RenderSVGInlineText {#text} at (0,0) size 57x35
    39         chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 5 width 56.63: "false"
     37    RenderSVGText {text} at (385,177) size 47x36 contains 1 chunk(s)
     38      RenderSVGInlineText {#text} at (0,0) size 47x35
     39        chunk 1 text run 1 at (385.00,205.00) startOffset 0 endOffset 4 width 46.64: "true"
  • trunk/LayoutTests/platform/win/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt

    r197145 r205468  
    1313        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]
    1414        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]
    15       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]
    16       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]
    1715      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]
    1816      RenderSVGRect {rect} at (0,0) size 480x360 [x=0.00] [y=0.00] [width=480.00] [height=360.00]
  • trunk/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-06-f-expected.txt

    r159015 r205468  
    1818        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]
    1919        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]
    20       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]
    21       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]
    2220      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]
    2321      RenderSVGRect {rect} at (0,0) size 480x360 [x=0.00] [y=0.00] [width=480.00] [height=360.00]
  • trunk/LayoutTests/svg/custom/svg-features-expected.txt

    r195355 r205468  
    11"org.w3c.svg", "1.0": true
    22"org.w3c.svg.static", "1.0": true
    3 "org.w3c.svg.animation", "1.0": false
    4 "org.w3c.svg.dynamic", "1.0": false
     3"org.w3c.svg.animation", "1.0": true
     4"org.w3c.svg.dynamic", "1.0": true
    55"org.w3c.dom", "1.0": true
    66"org.w3c.dom.svg", "1.0": true
    77"org.w3c.dom.svg.static", "1.0": true
    8 "org.w3c.dom.svg.animation", "1.0": false
    9 "org.w3c.dom.svg.dynamic", "1.0": false
    10 "org.w3c.svg.all", "1.0": false
    11 "org.w3c.dom.svg.all", "1.0": false
     8"org.w3c.dom.svg.animation", "1.0": true
     9"org.w3c.dom.svg.dynamic", "1.0": true
     10"org.w3c.svg.all", "1.0": true
     11"org.w3c.dom.svg.all", "1.0": true
    1212"http://www.w3.org/TR/SVG11/feature#SVG", "1.1": true
    1313"http://www.w3.org/TR/SVG11/feature#SVGDOM", "1.1": true
     
    1616"http://www.w3.org/TR/SVG11/feature#SVG-animation", "1.1": true
    1717"http://www.w3.org/TR/SVG11/feature#SVGDOM-animation", "1.1": true
    18 "http://www.w3.org/TR/SVG11/feature#SVG-dynamic", "1.1": false
    19 "http://www.w3.org/TR/SVG11/feature#SVGDOM-dynamic", "1.1": false
     18"http://www.w3.org/TR/SVG11/feature#SVG-dynamic", "1.1": true
     19"http://www.w3.org/TR/SVG11/feature#SVGDOM-dynamic", "1.1": true
    2020"http://www.w3.org/TR/SVG11/feature#CoreAttribute", "1.1": true
    2121"http://www.w3.org/TR/SVG11/feature#Structure", "1.1": true
     
    3535"http://www.w3.org/TR/SVG11/feature#BaseGraphicsAttribute", "1.1": true
    3636"http://www.w3.org/TR/SVG11/feature#Marker", "1.1": true
    37 "http://www.w3.org/TR/SVG11/feature#ColorProfile", "1.1": false
     37"http://www.w3.org/TR/SVG11/feature#ColorProfile", "1.1": true
    3838"http://www.w3.org/TR/SVG11/feature#Gradient", "1.1": true
    3939"http://www.w3.org/TR/SVG11/feature#Pattern", "1.1": true
     
    4545"http://www.w3.org/TR/SVG11/feature#DocumentEventsAttribute", "1.1": true
    4646"http://www.w3.org/TR/SVG11/feature#GraphicalEventsAttribute", "1.1": true
    47 "http://www.w3.org/TR/SVG11/feature#AnimationEventsAttribute", "1.1": false
     47"http://www.w3.org/TR/SVG11/feature#AnimationEventsAttribute", "1.1": true
    4848"http://www.w3.org/TR/SVG11/feature#Cursor", "1.1": true
    4949"http://www.w3.org/TR/SVG11/feature#Hyperlinking", "1.1": true
  • trunk/Source/WebCore/ChangeLog

    r205464 r205468  
     12016-09-05  Darin Adler  <darin@apple.com>
     2
     3        More bindings improvements, particularly things not needed for JavaScript bindings
     4        https://bugs.webkit.org/show_bug.cgi?id=161572
     5
     6        Reviewed by Sam Weinig.
     7
     8        * WebCore.xcodeproj/project.pbxproj: Export a couple of files needed for legacy bindings.
     9
     10        * bindings/js/JSDOMWindowCustom.cpp:
     11        (WebCore::addCrossOriginWindowPropertyNames): Mark array const.
     12        * bindings/js/JSLocationCustom.cpp:
     13        (WebCore::addCrossOriginLocationPropertyNames): Ditto.
     14
     15        * dom/DOMImplementation.cpp:
     16        (WebCore::addString): Deleted.
     17        (WebCore::isSupportedSVG10Feature): Deleted.
     18        (WebCore::isSupportedSVG11Feature): Deleted.
     19        (WebCore::DOMImplementation::hasFeature): Deleted.
     20
     21        * dom/DOMImplementation.h: Changed hasFeature to take no arguments and to always
     22        return true, as specified in the DOM spec.
     23
     24        * dom/DOMImplementation.idl: Removed the arguments to hasFeature.
     25
     26        * dom/Document.cpp:
     27        (WebCore::Document::defaultCharsetForLegacyBindings): Renamed from
     28        defaultCharsetForBindings, because this function is used only by the
     29        non-JavaScript bindings.
     30        * dom/Document.h: Updated for the above.
     31
     32        * dom/DocumentType.h: Removed entitiesForBindings,
     33        notationsForBindings, and internalSubsetForBindings, all of which were
     34        empty functions. The empty implementations are now in the legacy bindings.
     35
     36        * dom/Element.cpp:
     37        (WebCore::Element::dispatchSimulatedClickForBindings): Deleted.
     38        This code is now at the single call site, in HTMLElement.
     39        * dom/Element.h: Updated for the above change.
     40
     41        * dom/Node.cpp:
     42        (WebCore::Node::isSupportedForBindings): Deleted. This is only used in the
     43        legacy bindings, and since it only returns a value other than "true" for
     44        SVG features, it is now in the SVGTests class.
     45        * dom/Node.h: Updated for the above change.
     46
     47        * html/HTMLElement.cpp:
     48        (WebCore::HTMLElement::click): Call simulateClick with the appropriate
     49        arguments rather than calling dispatchSimulatedClickForBindings.
     50
     51        * svg/SVGTests.cpp:
     52        (WebCore::supportedSVGFeatures): Added. Moved here from DOMImplementation,
     53        but also refactored.
     54        (WebCore::SVGTests::isValid): Changed to use the function above, rather than
     55        calling DOMImplementation::hasFeature. This change fixes a bug where feature names
     56        that do not look like valid SVG feature names, names such as "xxx", were returning
     57        true claiming that the feature was supported. This behavior was helpful in the
     58        general DOMImplementation function, but harmful here. This bug was causing test
     59        failures in some of our SVG tests.
     60        (WebCore::SVGTests::hasFeatureForLegacyBindings): Added. Uses the set above to
     61        implement the legacy behavior of hasFeature. It's better to have this in parallel
     62        with the SVGTests::isValid function rather than having either depend on the other.
     63
     64        * svg/SVGTests.h: Added exported SVGTests::isValid function.
     65
    1662016-09-05  Commit Queue  <commit-queue@webkit.org>
    267
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r205411 r205468  
    45074507                B2227AA90D00BF220071B782 /* SVGStopElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279130D00BF210071B782 /* SVGStopElement.h */; };
    45084508                B2227AAB0D00BF220071B782 /* SVGStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279150D00BF210071B782 /* SVGStringList.cpp */; };
    4509                 B2227AAC0D00BF220071B782 /* SVGStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279160D00BF210071B782 /* SVGStringList.h */; };
     4509                B2227AAC0D00BF220071B782 /* SVGStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279160D00BF210071B782 /* SVGStringList.h */; settings = {ATTRIBUTES = (Private, ); }; };
    45104510                B2227AB50D00BF220071B782 /* SVGGraphicsElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222791F0D00BF210071B782 /* SVGGraphicsElement.cpp */; };
    45114511                B2227AB60D00BF220071B782 /* SVGGraphicsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279200D00BF210071B782 /* SVGGraphicsElement.h */; };
     
    45194519                B2227AC10D00BF220071B782 /* SVGSymbolElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B222792B0D00BF210071B782 /* SVGSymbolElement.h */; };
    45204520                B2227AC40D00BF220071B782 /* SVGTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B222792E0D00BF210071B782 /* SVGTests.cpp */; };
    4521                 B2227AC50D00BF220071B782 /* SVGTests.h in Headers */ = {isa = PBXBuildFile; fileRef = B222792F0D00BF210071B782 /* SVGTests.h */; };
     4521                B2227AC50D00BF220071B782 /* SVGTests.h in Headers */ = {isa = PBXBuildFile; fileRef = B222792F0D00BF210071B782 /* SVGTests.h */; settings = {ATTRIBUTES = (Private, ); }; };
    45224522                B2227AC70D00BF220071B782 /* SVGTextContentElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B22279310D00BF210071B782 /* SVGTextContentElement.cpp */; };
    45234523                B2227AC80D00BF220071B782 /* SVGTextContentElement.h in Headers */ = {isa = PBXBuildFile; fileRef = B22279320D00BF210071B782 /* SVGTextContentElement.h */; };
  • trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp

    r205409 r205468  
    323323{
    324324    // https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
    325     static const Identifier* properties[] = {
     325    static const Identifier* const properties[] = {
    326326        &state.propertyNames().blur, &state.propertyNames().close, &state.propertyNames().closed,
    327327        &state.propertyNames().focus, &state.propertyNames().frames, &state.propertyNames().length,
  • trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp

    r205409 r205468  
    112112{
    113113    // https://html.spec.whatwg.org/#crossoriginproperties-(-o-)
    114     static const Identifier* properties[] = { &state.propertyNames().href, &state.propertyNames().replace };
     114    static const Identifier* const properties[] = { &state.propertyNames().href, &state.propertyNames().replace };
    115115    for (auto* property : properties)
    116116        propertyNames.add(*property);
  • trunk/Source/WebCore/dom/DOMImplementation.cpp

    r205411 r205468  
    6666using namespace HTMLNames;
    6767
    68 typedef HashSet<String, ASCIICaseInsensitiveHash> FeatureSet;
    69 
    70 static void addString(FeatureSet& set, const char* string)
    71 {
    72     set.add(string);
    73 }
    74 
    7568#if ENABLE(VIDEO)
    7669
     
    9386#endif
    9487
    95 static bool isSupportedSVG10Feature(const String& feature, const String& version)
    96 {
    97     if (!version.isEmpty() && version != "1.0")
    98         return false;
    99 
    100     static bool initialized = false;
    101     static NeverDestroyed<FeatureSet> svgFeatures;
    102     if (!initialized) {
    103 #if ENABLE(SVG_FONTS)
    104         addString(svgFeatures, "svg");
    105         addString(svgFeatures, "svg.static");
    106 #endif
    107 //      addString(svgFeatures, "svg.animation");
    108 //      addString(svgFeatures, "svg.dynamic");
    109 //      addString(svgFeatures, "svg.dom.animation");
    110 //      addString(svgFeatures, "svg.dom.dynamic");
    111 #if ENABLE(SVG_FONTS)
    112         addString(svgFeatures, "dom");
    113         addString(svgFeatures, "dom.svg");
    114         addString(svgFeatures, "dom.svg.static");
    115 #endif
    116 //      addString(svgFeatures, "svg.all");
    117 //      addString(svgFeatures, "dom.svg.all");
    118         initialized = true;
    119     }
    120     return feature.startsWith("org.w3c.", false)
    121         && svgFeatures.get().contains(feature.right(feature.length() - 8));
    122 }
    123 
    124 static bool isSupportedSVG11Feature(const String& feature, const String& version)
    125 {
    126     if (!version.isEmpty() && version != "1.1")
    127         return false;
    128 
    129     static bool initialized = false;
    130     static NeverDestroyed<FeatureSet> svgFeatures;
    131     if (!initialized) {
    132         // Sadly, we cannot claim to implement any of the SVG 1.1 generic feature sets
    133         // lack of Font and Filter support.
    134         // http://bugs.webkit.org/show_bug.cgi?id=15480
    135 #if ENABLE(SVG_FONTS)
    136         addString(svgFeatures, "SVG");
    137         addString(svgFeatures, "SVGDOM");
    138         addString(svgFeatures, "SVG-static");
    139         addString(svgFeatures, "SVGDOM-static");
    140 #endif
    141         addString(svgFeatures, "SVG-animation");
    142         addString(svgFeatures, "SVGDOM-animation");
    143 //      addString(svgFeatures, "SVG-dynamic);
    144 //      addString(svgFeatures, "SVGDOM-dynamic);
    145         addString(svgFeatures, "CoreAttribute");
    146         addString(svgFeatures, "Structure");
    147         addString(svgFeatures, "BasicStructure");
    148         addString(svgFeatures, "ContainerAttribute");
    149         addString(svgFeatures, "ConditionalProcessing");
    150         addString(svgFeatures, "Image");
    151         addString(svgFeatures, "Style");
    152         addString(svgFeatures, "ViewportAttribute");
    153         addString(svgFeatures, "Shape");
    154         addString(svgFeatures, "Text");
    155         addString(svgFeatures, "BasicText");
    156         addString(svgFeatures, "PaintAttribute");
    157         addString(svgFeatures, "BasicPaintAttribute");
    158         addString(svgFeatures, "OpacityAttribute");
    159         addString(svgFeatures, "GraphicsAttribute");
    160         addString(svgFeatures, "BaseGraphicsAttribute");
    161         addString(svgFeatures, "Marker");
    162 //      addString(svgFeatures, "ColorProfile"); // requires color-profile, bug 6037
    163         addString(svgFeatures, "Gradient");
    164         addString(svgFeatures, "Pattern");
    165         addString(svgFeatures, "Clip");
    166         addString(svgFeatures, "BasicClip");
    167         addString(svgFeatures, "Mask");
    168         addString(svgFeatures, "Filter");
    169         addString(svgFeatures, "BasicFilter");
    170         addString(svgFeatures, "DocumentEventsAttribute");
    171         addString(svgFeatures, "GraphicalEventsAttribute");
    172 //      addString(svgFeatures, "AnimationEventsAttribute");
    173         addString(svgFeatures, "Cursor");
    174         addString(svgFeatures, "Hyperlinking");
    175         addString(svgFeatures, "XlinkAttribute");
    176         addString(svgFeatures, "ExternalResourcesRequired");
    177         addString(svgFeatures, "View");
    178         addString(svgFeatures, "Script");
    179         addString(svgFeatures, "Animation");
    180 #if ENABLE(SVG_FONTS)
    181         addString(svgFeatures, "Font");
    182         addString(svgFeatures, "BasicFont");
    183 #endif
    184         addString(svgFeatures, "Extensibility");
    185         initialized = true;
    186     }
    187     return feature.startsWith("http://www.w3.org/tr/svg11/feature#", false)
    188         && svgFeatures.get().contains(feature.right(feature.length() - 35));
    189 }
    190 
    19188DOMImplementation::DOMImplementation(Document& document)
    19289    : m_document(document)
    19390{
    194 }
    195 
    196 bool DOMImplementation::hasFeature(const String& feature, const String& version)
    197 {
    198     if (feature.startsWith("http://www.w3.org/TR/SVG", false)
    199         || feature.startsWith("org.w3c.dom.svg", false)
    200         || feature.startsWith("org.w3c.svg", false)) {
    201         // FIXME: SVG 2.0 support?
    202         return isSupportedSVG10Feature(feature, version) || isSupportedSVG11Feature(feature, version);
    203     }
    204 
    205     // FIXME: SVG specifications <http://www.w3.org/TR/SVG/script.html#InterfaceSVGZoomEvent>
    206     // and <http://www.w3.org/TR/SVG2/interact.html#InterfaceSVGZoomEvent>
    207     // say that we should return true for the feature "SVGZoomEvents".
    208 
    209     return true;
    21091}
    21192
  • trunk/Source/WebCore/dom/DOMImplementation.h

    r205411 r205468  
    4141    WEBCORE_EXPORT ExceptionOr<Ref<XMLDocument>> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*);
    4242    WEBCORE_EXPORT Ref<HTMLDocument> createHTMLDocument(const String& title);
    43     WEBCORE_EXPORT static bool hasFeature(const String& feature, const String& version);
     43    static bool hasFeature() { return true; }
    4444    WEBCORE_EXPORT static Ref<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media);
    4545
  • trunk/Source/WebCore/dom/DOMImplementation.idl

    r205411 r205468  
    2828    [NewObject] HTMLDocument createHTMLDocument(optional DOMString title);
    2929
    30     // FIXME: Latest DOM specification says this should ignore all arguments and always return true.
    31     // FIXME: Using "undefined" as default parameter value is wrong.
    32     boolean hasFeature(optional DOMString feature = "undefined", [TreatNullAs=EmptyString] optional DOMString version = "undefined");
     30    boolean hasFeature();
    3331
    3432    // FIXME: Using "undefined" as default parameter value is wrong.
  • trunk/Source/WebCore/dom/Document.cpp

    r205416 r205468  
    13481348}
    13491349
    1350 String Document::defaultCharsetForBindings() const
     1350String Document::defaultCharsetForLegacyBindings() const
    13511351{
    13521352    if (Settings* settings = this->settings())
  • trunk/Source/WebCore/dom/Document.h

    r205411 r205468  
    414414    WEBCORE_EXPORT String readyState() const;
    415415
    416     WEBCORE_EXPORT String defaultCharsetForBindings() const;
     416    WEBCORE_EXPORT String defaultCharsetForLegacyBindings() const;
    417417
    418418    String charset() const { return Document::encoding(); }
  • trunk/Source/WebCore/dom/DocumentType.h

    r204114 r205468  
    3838    }
    3939
    40     // These are needed by ObjC / GObject bindings for backward compatibility.
    41     NamedNodeMap* entitiesForBindings() const { return nullptr; }
    42     NamedNodeMap* notationsForBindings() const { return nullptr; }
    43     String internalSubsetForBindings() const { return String(); }
    44 
    4540    const String& name() const { return m_name; }
    4641    const String& publicId() const { return m_publicId; }
  • trunk/Source/WebCore/dom/Element.cpp

    r205416 r205468  
    337337}
    338338
    339 void Element::dispatchSimulatedClickForBindings(Event* underlyingEvent)
    340 {
    341     simulateClick(*this, underlyingEvent, SendNoEvents, DoNotShowPressedLook, SimulatedClickCreationOptions::FromBindings);
    342 }
    343 
    344339Ref<Node> Element::cloneNodeInternal(Document& targetDocument, CloningOperation type)
    345340{
  • trunk/Source/WebCore/dom/Element.h

    r205416 r205468  
    502502    bool dispatchKeyEvent(const PlatformKeyboardEvent&);
    503503    void dispatchSimulatedClick(Event* underlyingEvent, SimulatedClickMouseEventOptions = SendNoEvents, SimulatedClickVisualOptions = ShowPressedLook);
    504     void dispatchSimulatedClickForBindings(Event* underlyingEvent);
    505504    void dispatchFocusInEvent(const AtomicString& eventType, RefPtr<Element>&& oldFocusedElement);
    506505    void dispatchFocusOutEvent(const AtomicString& eventType, RefPtr<Element>&& newFocusedElement);
  • trunk/Source/WebCore/dom/Node.cpp

    r205249 r205468  
    3535#include "ContainerNodeAlgorithms.h"
    3636#include "ContextMenuController.h"
    37 #include "DOMImplementation.h"
    3837#include "DocumentType.h"
    3938#include "ElementIterator.h"
     
    8685
    8786using namespace HTMLNames;
    88 
    89 bool Node::isSupportedForBindings(const String& feature, const String& version)
    90 {
    91     return DOMImplementation::hasFeature(feature, version);
    92 }
    9387
    9488#if DUMP_NODE_STATISTICS
  • trunk/Source/WebCore/dom/Node.h

    r205416 r205468  
    122122    };
    123123
    124     // Only used by ObjC / GObject bindings.
    125     WEBCORE_EXPORT static bool isSupportedForBindings(const String& feature, const String& version);
    126 
    127124    WEBCORE_EXPORT static void startIgnoringLeaks();
    128125    WEBCORE_EXPORT static void stopIgnoringLeaks();
  • trunk/Source/WebCore/html/HTMLElement.cpp

    r205050 r205468  
    6060#include "ScriptController.h"
    6161#include "Settings.h"
     62#include "SimulatedClick.h"
    6263#include "StyleProperties.h"
    6364#include "SubframeLoader.h"
     
    699700void HTMLElement::click()
    700701{
    701     dispatchSimulatedClickForBindings(nullptr);
     702    simulateClick(*this, nullptr, SendNoEvents, DoNotShowPressedLook, SimulatedClickCreationOptions::FromBindings);
    702703}
    703704
  • trunk/Source/WebCore/svg/SVGTests.cpp

    r182121 r205468  
    22 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
    33 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
    4  * Copyright (C) 2015 Apple Inc. All right reserved.
     4 * Copyright (C) 2015-2016 Apple Inc. All right reserved.
    55 *
    66 * This library is free software; you can redistribute it and/or
     
    3939using namespace SVGNames;
    4040
     41static const HashSet<String, ASCIICaseInsensitiveHash>& supportedSVGFeatures()
     42{
     43    static NeverDestroyed<HashSet<String, ASCIICaseInsensitiveHash>> features = [] {
     44        static const char* const features10[] = {
     45#if ENABLE(SVG_FONTS)
     46            "dom",
     47            "dom.svg",
     48            "dom.svg.static",
     49            "svg",
     50            "svg.static",
     51#endif
     52        };
     53        static const char* const features11[] = {
     54            "animation",
     55            "basegraphicsattribute",
     56            "basicclip",
     57            "basicfilter",
     58            "basicpaintattribute",
     59            "basicstructure",
     60            "basictext",
     61            "clip",
     62            "conditionalprocessing",
     63            "containerattribute",
     64            "coreattribute",
     65            "cursor",
     66            "documenteventsattribute",
     67            "extensibility",
     68            "externalresourcesrequired",
     69            "filter",
     70            "gradient",
     71            "graphicaleventsattribute",
     72            "graphicsattribute",
     73            "hyperlinking",
     74            "image",
     75            "marker",
     76            "mask",
     77            "opacityattribute",
     78            "paintattribute",
     79            "pattern",
     80            "script",
     81            "shape",
     82            "structure",
     83            "style",
     84            "svg-animation",
     85            "svgdom-animation",
     86            "text",
     87            "view",
     88            "viewportattribute",
     89            "xlinkattribute",
     90#if ENABLE(SVG_FONTS)
     91            "basicfont",
     92            "font",
     93            "svg",
     94            "svg-static",
     95            "svgdom",
     96            "svgdom-static",
     97#endif
     98        };
     99        HashSet<String, ASCIICaseInsensitiveHash> set;
     100        for (auto& feature : features10)
     101            set.add(makeString("org.w3c.", feature));
     102        for (auto& feature : features11)
     103            set.add(makeString("http://www.w3.org/tr/svg11/feature#", feature));
     104        return set;
     105    }();
     106    return features;
     107}
     108
    41109SVGTests::SVGTests()
    42110    : m_requiredFeatures(requiredFeaturesAttr)
     
    88156{
    89157    for (auto& feature : m_requiredFeatures.value) {
    90         if (feature.isEmpty() || !DOMImplementation::hasFeature(feature, String()))
     158        if (feature.isEmpty() || !supportedSVGFeatures().contains(feature))
    91159            return false;
    92160    }
     
    178246}
    179247
    180 }
     248bool SVGTests::hasFeatureForLegacyBindings(const String& feature, const String& version)
     249{
     250    // FIXME: This function is here only to be exposed in the Objective-C and GObject bindings for both Node and DOMImplementation.
     251    // It's likely that we can just remove this and instead have the bindings return true unconditionally.
     252    // This is what the DOMImplementation function now does in JavaScript as is now suggested in the DOM specification.
     253    // The behavior implemented below is quirky, but preserves what WebKit has done for at least the last few years.
     254
     255    bool hasSVG10FeaturePrefix = feature.startsWith("org.w3c.dom.svg", false) || feature.startsWith("org.w3c.svg", false);
     256    bool hasSVG11FeaturePrefix = feature.startsWith("http://www.w3.org/tr/svg", false);
     257
     258    // 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.
     259    if (!(hasSVG10FeaturePrefix || hasSVG11FeaturePrefix))
     260        return true;
     261
     262    // If the version number matches the style of the feature name, then use the set to see if the feature is supported.
     263    if (version.isEmpty() || (hasSVG10FeaturePrefix && version == "1.0") || (hasSVG11FeaturePrefix && version == "1.1"))
     264        return supportedSVGFeatures().contains(feature);
     265
     266    return false;
     267}
     268
     269}
  • trunk/Source/WebCore/svg/SVGTests.h

    r182121 r205468  
    1919 */
    2020
    21 #ifndef SVGTests_h
    22 #define SVGTests_h
     21#pragma once
    2322
    2423#include "SVGAnimatedPropertyMacros.h"
     
    4746    static const SVGAttributeToPropertyMap& attributeToPropertyMap();
    4847
     48    WEBCORE_EXPORT static bool hasFeatureForLegacyBindings(const String& feature, const String& version);
     49
    4950protected:
    5051    SVGTests();
     
    6364
    6465} // namespace WebCore
    65 
    66 #endif // SVGTests_h
  • trunk/Source/WebKit/mac/ChangeLog

    r205427 r205468  
     12016-09-05  Darin Adler  <darin@apple.com>
     2
     3        More bindings improvements, particularly things not needed for JavaScript bindings
     4        https://bugs.webkit.org/show_bug.cgi?id=161572
     5
     6        Reviewed by Sam Weinig.
     7
     8        * DOM/DOMDOMImplementation.mm:
     9        (-[DOMImplementation hasFeature:version:]): Call SVGTests::hasFeatureForLegacyBindings
     10        instead of DOMImplementation::hasFeature. Also removed JSMainThreadNullState
     11        since this does not do anything that can invoke JavaScript.
     12
     13        * DOM/DOMDocument.mm:
     14        (-[DOMDocument defaultCharset]): Call defaultCharsetForLegacyBindings. Also removed
     15        JSMainThreadNullState.
     16
     17        * DOM/DOMDocumentType.mm:
     18        (-[DOMDocumentType entities]): Changed to simply return nil; same behavior as before,
     19        but with no dependency on WebCore. Also removed JSMainThreadNullState.
     20        (-[DOMDocumentType notations]): Ditto.
     21        (-[DOMDocumentType internalSubset]): Ditto, except empty string rather than nil.
     22
     23        * DOM/DOMNode.mm:
     24        (-[DOMNode isSupported:version:]): Call SVGTests::hasFeatureForLegacyBindings
     25        instead of Node::isSupportedForBindings. Also removed JSMainThreadNullState.
     26
    1272016-09-04  Joseph Pecoraro  <pecoraro@apple.com>
    228
  • trunk/Source/WebKit/mac/DOM/DOMDOMImplementation.mm

    r205411 r205468  
    3737#import <WebCore/HTMLDocument.h>
    3838#import <WebCore/JSMainThreadExecState.h>
     39#import <WebCore/SVGTests.h>
    3940#import <WebCore/ThreadCheck.h>
    4041#import <WebCore/WebCoreObjCExtras.h>
     
    5960- (BOOL)hasFeature:(NSString *)feature version:(NSString *)version
    6061{
    61     WebCore::JSMainThreadNullState state;
    62     return unwrap(*self).hasFeature(feature, version);
     62    return WebCore::SVGTests::hasFeatureForLegacyBindings(feature, version);
    6363}
    6464
  • trunk/Source/WebKit/mac/DOM/DOMDocument.mm

    r205411 r205468  
    311311- (NSString *)defaultCharset
    312312{
    313     WebCore::JSMainThreadNullState state;
    314     return IMPL->defaultCharsetForBindings();
     313    return IMPL->defaultCharsetForLegacyBindings();
    315314}
    316315
  • trunk/Source/WebKit/mac/DOM/DOMDocumentType.mm

    r204717 r205468  
    4949- (DOMNamedNodeMap *)entities
    5050{
    51     WebCore::JSMainThreadNullState state;
    52     return kit(WTF::getPtr(IMPL->entitiesForBindings()));
     51    return nil;
    5352}
    5453
    5554- (DOMNamedNodeMap *)notations
    5655{
    57     WebCore::JSMainThreadNullState state;
    58     return kit(WTF::getPtr(IMPL->notationsForBindings()));
     56    return nil;
    5957}
    6058
     
    7371- (NSString *)internalSubset
    7472{
    75     WebCore::JSMainThreadNullState state;
    76     return IMPL->internalSubsetForBindings();
     73    return @"";
    7774}
    7875
  • trunk/Source/WebKit/mac/DOM/DOMNode.mm

    r204717 r205468  
    3434#import "ExceptionHandlers.h"
    3535#import "ObjCEventListener.h"
     36#import <WebCore/DOMImplementation.h>
    3637#import <WebCore/Element.h>
    3738#import <WebCore/JSMainThreadExecState.h>
    3839#import <WebCore/NodeList.h>
     40#import <WebCore/SVGTests.h>
    3941#import <WebCore/ThreadCheck.h>
    4042#import <WebCore/WebCoreObjCExtras.h>
     
    292294- (BOOL)isSupported:(NSString *)feature version:(NSString *)version
    293295{
    294     JSMainThreadNullState state;
    295     return unwrap(*self).isSupportedForBindings(feature, version);
     296    return SVGTests::hasFeatureForLegacyBindings(feature, version);
    296297}
    297298
  • trunk/Source/WebKit2/ChangeLog

    r205467 r205468  
     12016-09-05  Darin Adler  <darin@apple.com>
     2
     3        More bindings improvements, particularly things not needed for JavaScript bindings
     4        https://bugs.webkit.org/show_bug.cgi?id=161572
     5
     6        Reviewed by Sam Weinig.
     7
     8        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp:
     9        (webkit_dom_dom_implementation_has_feature): Call SVGTests::hasFeatureForLegacyBindings
     10        instead of DOMImplementation::hasFeature. Also removed JSMainThreadNullState
     11        since this does not do anything that can invoke JavaScript.
     12
     13        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:
     14        (webkit_dom_document_get_default_charset): Call defaultCharsetForLegacyBindings.
     15        Also removed JSMainThreadNullState.
     16
     17        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp:
     18        (webkit_dom_document_type_get_entities): Changed to simply return nullptr; same behavior
     19        as before, but with no dependency on WebCore. Also removed JSMainThreadNullState.
     20        (webkit_dom_document_type_get_notations): Ditto.
     21        (webkit_dom_document_type_get_internal_subset): Ditto.
     22
     23        * WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp:
     24        (webkit_dom_node_is_supported): Call SVGTests::hasFeatureForLegacyBindings
     25        instead of Node::isSupportedForBindings. Also removed JSMainThreadNullState.
     26
    1272016-09-05  Michael Catanzaro  <mcatanzaro@igalia.com>
    228
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDOMImplementation.cpp

    r205411 r205468  
    3434#include <WebCore/ExceptionCodeDescription.h>
    3535#include <WebCore/JSMainThreadExecState.h>
     36#include <WebCore/SVGTests.h>
    3637#include <wtf/GetPtr.h>
    3738#include <wtf/RefPtr.h>
     
    108109gboolean webkit_dom_dom_implementation_has_feature(WebKitDOMDOMImplementation* self, const gchar* feature, const gchar* version)
    109110{
    110     WebCore::JSMainThreadNullState state;
    111111    g_return_val_if_fail(WEBKIT_DOM_IS_DOM_IMPLEMENTATION(self), FALSE);
    112112    g_return_val_if_fail(feature, FALSE);
    113113    g_return_val_if_fail(version, FALSE);
    114     WebCore::DOMImplementation* item = WebKit::core(self);
    115114    WTF::String convertedFeature = WTF::String::fromUTF8(feature);
    116115    WTF::String convertedVersion = WTF::String::fromUTF8(version);
    117     gboolean result = item->hasFeature(convertedFeature, convertedVersion);
    118     return result;
     116    return WebCore::SVGTests::hasFeatureForLegacyBindings(convertedFeature, convertedVersion);
    119117}
    120118
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp

    r205280 r205468  
    146146{
    147147    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT(self), nullptr);
    148 
    149     WebCore::JSMainThreadNullState state;
    150     return convertToUTF8String(WebKit::core(self)->defaultCharsetForBindings());
     148    return convertToUTF8String(WebKit::core(self)->defaultCharsetForLegacyBindings());
    151149}
    152150
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocumentType.cpp

    r205280 r205468  
    233233WebKitDOMNamedNodeMap* webkit_dom_document_type_get_entities(WebKitDOMDocumentType* self)
    234234{
     235    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), nullptr);
     236    return nullptr;
     237}
     238
     239WebKitDOMNamedNodeMap* webkit_dom_document_type_get_notations(WebKitDOMDocumentType* self)
     240{
     241    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), nullptr);
     242    return nullptr;
     243}
     244
     245gchar* webkit_dom_document_type_get_internal_subset(WebKitDOMDocumentType* self)
     246{
     247    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), nullptr);
     248    return nullptr;
     249}
     250
     251gchar* webkit_dom_document_type_get_public_id(WebKitDOMDocumentType* self)
     252{
    235253    WebCore::JSMainThreadNullState state;
    236254    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), 0);
    237255    WebCore::DocumentType* item = WebKit::core(self);
    238     RefPtr<WebCore::NamedNodeMap> gobjectResult = WTF::getPtr(item->entitiesForBindings());
    239     return WebKit::kit(gobjectResult.get());
    240 }
    241 
    242 WebKitDOMNamedNodeMap* webkit_dom_document_type_get_notations(WebKitDOMDocumentType* self)
     256    gchar* result = convertToUTF8String(item->publicId());
     257    return result;
     258}
     259
     260gchar* webkit_dom_document_type_get_system_id(WebKitDOMDocumentType* self)
    243261{
    244262    WebCore::JSMainThreadNullState state;
    245263    g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), 0);
    246264    WebCore::DocumentType* item = WebKit::core(self);
    247     RefPtr<WebCore::NamedNodeMap> gobjectResult = WTF::getPtr(item->notationsForBindings());
    248     return WebKit::kit(gobjectResult.get());
    249 }
    250 
    251 gchar* webkit_dom_document_type_get_internal_subset(WebKitDOMDocumentType* self)
    252 {
    253     WebCore::JSMainThreadNullState state;
    254     g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), 0);
    255     WebCore::DocumentType* item = WebKit::core(self);
    256     gchar* result = convertToUTF8String(item->internalSubsetForBindings());
    257     return result;
    258 }
    259 
    260 gchar* webkit_dom_document_type_get_public_id(WebKitDOMDocumentType* self)
    261 {
    262     WebCore::JSMainThreadNullState state;
    263     g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), 0);
    264     WebCore::DocumentType* item = WebKit::core(self);
    265     gchar* result = convertToUTF8String(item->publicId());
    266     return result;
    267 }
    268 
    269 gchar* webkit_dom_document_type_get_system_id(WebKitDOMDocumentType* self)
    270 {
    271     WebCore::JSMainThreadNullState state;
    272     g_return_val_if_fail(WEBKIT_DOM_IS_DOCUMENT_TYPE(self), 0);
    273     WebCore::DocumentType* item = WebKit::core(self);
    274265    gchar* result = convertToUTF8String(item->systemId());
    275266    return result;
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMNode.cpp

    r205280 r205468  
    11/*
    22 *  This file is part of the WebKit open source project.
    3  *  This file has been generated by generate-bindings.pl. DO NOT MODIFY!
    43 *
    54 *  This library is free software; you can redistribute it and/or
     
    2221#include "WebKitDOMNode.h"
    2322
    24 #include <WebCore/CSSImportRule.h>
     23#include "ConvertToUTF8String.h"
    2524#include "DOMObjectCache.h"
    26 #include <WebCore/Document.h>
    27 #include <WebCore/ExceptionCode.h>
    28 #include <WebCore/ExceptionCodeDescription.h>
    2925#include "GObjectEventListener.h"
    30 #include <WebCore/JSMainThreadExecState.h>
    3126#include "WebKitDOMDocumentPrivate.h"
    3227#include "WebKitDOMElementPrivate.h"
     
    3530#include "WebKitDOMNodeListPrivate.h"
    3631#include "WebKitDOMNodePrivate.h"
     32#include "WebKitDOMNodeUnstable.h"
    3733#include "WebKitDOMPrivate.h"
    38 #include "ConvertToUTF8String.h"
    39 #include "WebKitDOMNodeUnstable.h"
     34#include <WebCore/CSSImportRule.h>
     35#include <WebCore/Document.h>
     36#include <WebCore/ExceptionCode.h>
     37#include <WebCore/ExceptionCodeDescription.h>
     38#include <WebCore/JSMainThreadExecState.h>
     39#include <WebCore/SVGTests.h>
    4040#include <wtf/GetPtr.h>
    4141#include <wtf/RefPtr.h>
     
    486486gboolean webkit_dom_node_is_supported(WebKitDOMNode* self, const gchar* feature, const gchar* version)
    487487{
    488     WebCore::JSMainThreadNullState state;
    489488    g_return_val_if_fail(WEBKIT_DOM_IS_NODE(self), FALSE);
    490489    g_return_val_if_fail(feature, FALSE);
    491490    g_return_val_if_fail(version, FALSE);
    492     WebCore::Node* item = WebKit::core(self);
    493491    WTF::String convertedFeature = WTF::String::fromUTF8(feature);
    494492    WTF::String convertedVersion = WTF::String::fromUTF8(version);
    495     gboolean result = item->isSupportedForBindings(convertedFeature, convertedVersion);
    496     return result;
     493    return WebCore::SVGTests::hasFeatureForLegacyBindings(convertedFeature, convertedVersion);
    497494}
    498495
Note: See TracChangeset for help on using the changeset viewer.