⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 184042 in webkit


Ignore:
Timestamp:
May 9, 2015, 8:22:21 PM (11 years ago)
Author:
Chris Dumez
Message:

Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
https://bugs.webkit.org/show_bug.cgi?id=144825

Reviewed by Sam Weinig.

Source/WebCore:

Introduce ParentNode.idl / NonDocumentTypeChildNode.idl as per DOM
specification and to avoid IDL code duplication:

No Web-Exposed behavior change.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/CharacterData.idl:
  • dom/Document.idl:
  • dom/DocumentFragment.idl:
  • dom/Element.idl:
  • dom/NonDocumentTypeChildNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
  • dom/ParentNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.

LayoutTests:

Rebaseline test as the order of the methods changed when iterating.

  • js/dom/dom-static-property-for-in-iteration-expected.txt:
Location:
trunk
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r184038 r184042  
     12015-05-09  Chris Dumez  <cdumez@apple.com>
     2
     3        Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
     4        https://bugs.webkit.org/show_bug.cgi?id=144825
     5
     6        Reviewed by Sam Weinig.
     7
     8        Rebaseline test as the order of the methods changed when iterating.
     9
     10        * js/dom/dom-static-property-for-in-iteration-expected.txt:
     11
    1122015-05-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
    213
  • trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt

    r184036 r184042  
    6666PASS a["classList"] is
    6767PASS a["dataset"] is [object DOMStringMap]
     68PASS a["uiactions"] is
     69PASS a["webkitRegionOverset"] is undefined
     70PASS a["previousElementSibling"] is [object HTMLDivElement]
     71PASS a["nextElementSibling"] is [object HTMLScriptElement]
    6872PASS a["firstElementChild"] is null
    6973PASS a["lastElementChild"] is null
    7074PASS a["childElementCount"] is 0
    71 PASS a["previousElementSibling"] is [object HTMLDivElement]
    72 PASS a["nextElementSibling"] is [object HTMLScriptElement]
    73 PASS a["uiactions"] is
    74 PASS a["webkitRegionOverset"] is undefined
    7575PASS a["ALLOW_KEYBOARD_INPUT"] is 1
    7676PASS a["nodeName"] is A
  • trunk/Source/WebCore/CMakeLists.txt

    r183866 r184042  
    412412    dom/NodeIterator.idl
    413413    dom/NodeList.idl
     414    dom/NonDocumentTypeChildNode.idl
    414415    dom/OverflowEvent.idl
    415416    dom/PageTransitionEvent.idl
     417    dom/ParentNode.idl
    416418    dom/PopStateEvent.idl
    417419    dom/ProcessingInstruction.idl
  • trunk/Source/WebCore/ChangeLog

    r184041 r184042  
     12015-05-09  Chris Dumez  <cdumez@apple.com>
     2
     3        Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
     4        https://bugs.webkit.org/show_bug.cgi?id=144825
     5
     6        Reviewed by Sam Weinig.
     7
     8        Introduce ParentNode.idl / NonDocumentTypeChildNode.idl as per DOM
     9        specification and to avoid IDL code duplication:
     10        - https://dom.spec.whatwg.org/#interface-parentnode
     11        - https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
     12
     13        No Web-Exposed behavior change.
     14
     15        * CMakeLists.txt:
     16        * DerivedSources.make:
     17        * WebCore.xcodeproj/project.pbxproj:
     18        * dom/CharacterData.idl:
     19        * dom/Document.idl:
     20        * dom/DocumentFragment.idl:
     21        * dom/Element.idl:
     22        * dom/NonDocumentTypeChildNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
     23        * dom/ParentNode.idl: Copied from Source/WebCore/dom/DocumentFragment.idl.
     24
    1252015-05-09  Chris Dumez  <cdumez@apple.com>
    226
  • trunk/Source/WebCore/DerivedSources.make

    r183697 r184042  
    300300    $(WebCore)/dom/NodeIterator.idl \
    301301    $(WebCore)/dom/NodeList.idl \
     302    $(WebCore)/dom/NonDocumentTypeChildNode.idl \
    302303    $(WebCore)/dom/OverflowEvent.idl \
    303304    $(WebCore)/dom/PageTransitionEvent.idl \
     305    $(WebCore)/dom/ParentNode.idl \
    304306    $(WebCore)/dom/PopStateEvent.idl \
    305307    $(WebCore)/dom/ProcessingInstruction.idl \
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r183940 r184042  
    16021602                44311F8212E4E66C000A8D19 /* DOMDocumentFragmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711450AC5D5340053270F /* DOMDocumentFragmentInternal.h */; };
    16031603                443817FF1A91B2F8006E04F2 /* CoreMediaSoftLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 443817FD1A91B2F8006E04F2 /* CoreMediaSoftLink.cpp */; };
    1604                 443917FF1A91B2F8006E04F2 /* QuickLookSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 443917FD1A91B2F8006E04F2 /* QuickLookSoftLink.mm */; };
    16051604                443818001A91B2F8006E04F2 /* CoreMediaSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 443817FE1A91B2F8006E04F2 /* CoreMediaSoftLink.h */; };
    1606                 443918001A91B2F8006E04F2 /* QuickLookSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 443917FE1A91B2F8006E04F2 /* QuickLookSoftLink.h */; };
     1605                443917FF1A91B2F8006E04F2 /* ios/QuickLookSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 443917FD1A91B2F8006E04F2 /* ios/QuickLookSoftLink.mm */; };
     1606                443918001A91B2F8006E04F2 /* ios/QuickLookSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 443917FE1A91B2F8006E04F2 /* ios/QuickLookSoftLink.h */; };
    16071607                443F04270E75C8FB007E5407 /* NetworkStateNotifierIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 443F04260E75C8FB007E5407 /* NetworkStateNotifierIOS.mm */; };
    16081608                4449A4051A964B0000B64AD5 /* CoreMediaSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 4449A4041A964B0000B64AD5 /* CoreMediaSPI.h */; };
     
    87738773                44311CD512E4E22D000A8D19 /* DOMDocumentPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMDocumentPrivate.h; sourceTree = "<group>"; };
    87748774                443817FD1A91B2F8006E04F2 /* CoreMediaSoftLink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoreMediaSoftLink.cpp; sourceTree = "<group>"; };
    8775                 443917FD1A91B2F8006E04F2 /* QuickLookSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ios/QuickLookSoftLink.mm; sourceTree = "<group>"; };
    87768775                443817FE1A91B2F8006E04F2 /* CoreMediaSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreMediaSoftLink.h; sourceTree = "<group>"; };
    8777                 443917FE1A91B2F8006E04F2 /* QuickLookSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ios/QuickLookSoftLink.h; sourceTree = "<group>"; };
     8776                443917FD1A91B2F8006E04F2 /* ios/QuickLookSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ios/QuickLookSoftLink.mm; sourceTree = "<group>"; };
     8777                443917FE1A91B2F8006E04F2 /* ios/QuickLookSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ios/QuickLookSoftLink.h; sourceTree = "<group>"; };
    87788778                443F04260E75C8FB007E5407 /* NetworkStateNotifierIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkStateNotifierIOS.mm; sourceTree = "<group>"; };
    87798779                4449A4041A964B0000B64AD5 /* CoreMediaSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreMediaSPI.h; sourceTree = "<group>"; };
     
    99229922                83520C7D1A71BFCC006BD2AA /* CSSFontFamily.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontFamily.h; sourceTree = "<group>"; };
    99239923                835D363619FF6193004C93AB /* StyleBuilderCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleBuilderCustom.h; sourceTree = "<group>"; };
     9924                8369E58F1AFDD0300087DF68 /* NonDocumentTypeChildNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = NonDocumentTypeChildNode.idl; sourceTree = "<group>"; };
    99249925                836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedTypeAnimator.cpp; sourceTree = "<group>"; };
    99259926                836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedProperty.cpp; sourceTree = "<group>"; };
     
    99509951                83C1D423178D5AB400141E68 /* SVGPathSegMovetoAbs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathSegMovetoAbs.h; sourceTree = "<group>"; };
    99519952                83C1D424178D5AB400141E68 /* SVGPathSegMovetoRel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathSegMovetoRel.h; sourceTree = "<group>"; };
     9953                83D26D3C1AFDCC50001B3873 /* ChildNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ChildNode.idl; sourceTree = "<group>"; };
     9954                83D26D3D1AFDCC50001B3873 /* ParentNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ParentNode.idl; sourceTree = "<group>"; };
    99529955                8419D2A4120D92D000141F8F /* SVGPathByteStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathByteStream.h; sourceTree = "<group>"; };
    99539956                8419D2A5120D92D000141F8F /* SVGPathByteStreamBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathByteStreamBuilder.cpp; sourceTree = "<group>"; };
     
    1886418867                                E45390320EAFD637003695C8 /* PlatformScreenIOS.mm */,
    1886518868                                AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerIOS.mm */,
    18866                                 443917FE1A91B2F8006E04F2 /* QuickLookSoftLink.h */,
    18867                                 443917FD1A91B2F8006E04F2 /* QuickLookSoftLink.mm */,
     18869                                443917FE1A91B2F8006E04F2 /* ios/QuickLookSoftLink.h */,
     18870                                443917FD1A91B2F8006E04F2 /* ios/QuickLookSoftLink.mm */,
    1886818871                                CDFC360118CA61630026E56F /* RemoteCommandListenerIOS.h */,
    1886918872                                CDFC360218CA61630026E56F /* RemoteCommandListenerIOS.mm */,
     
    2293222935                                D619A305144E00BE004BC302 /* ChildListMutationScope.cpp */,
    2293322936                                D619A306144E00BE004BC302 /* ChildListMutationScope.h */,
     22937                                83D26D3C1AFDCC50001B3873 /* ChildNode.idl */,
    2293422938                                A818721A0977D3C0005826D9 /* ChildNodeList.cpp */,
    2293522939                                A81872150977D3C0005826D9 /* ChildNodeList.h */,
     
    2316623170                                E43105BA16750F1600DB2FB8 /* NodeTraversal.h */,
    2316723171                                9382AAB10D8C386100F357A6 /* NodeWithIndex.h */,
     23172                                8369E58F1AFDD0300087DF68 /* NonDocumentTypeChildNode.idl */,
    2316823173                                1A0D57340A5C77FE007EDD4C /* OverflowEvent.cpp */,
    2316923174                                1A0D57350A5C77FE007EDD4C /* OverflowEvent.h */,
     
    2317223177                                E1284AE010447D4500EAEB52 /* PageTransitionEvent.h */,
    2317323178                                E1284AD910447AEB00EAEB52 /* PageTransitionEvent.idl */,
     23179                                83D26D3D1AFDCC50001B3873 /* ParentNode.idl */,
    2317423180                                8A7CC96F12076F8A001D4588 /* PendingScript.cpp */,
    2317523181                                8A7CC96A12076D73001D4588 /* PendingScript.h */,
     
    2607226078                                CE12523D1A1676CD00864480 /* QuartzCoreSPI.h in Headers */,
    2607326079                                442AF7A9102CDDEA008FD4D3 /* QuickLook.h in Headers */,
    26074                                 443918001A91B2F8006E04F2 /* QuickLookSoftLink.h in Headers */,
     26080                                443918001A91B2F8006E04F2 /* ios/QuickLookSoftLink.h in Headers */,
    2607526081                                A149786F1ABAF33800CEF7E4 /* ContentFilter.h in Headers */,
    2607626082                                CE1252391A166FA000864480 /* QuickLookSPI.h in Headers */,
     
    2957629582                                550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */,
    2957729583                                442AF7AA102CDDEA008FD4D3 /* QuickLook.mm in Sources */,
    29578                                 443917FF1A91B2F8006E04F2 /* QuickLookSoftLink.mm in Sources */,
     29584                                443917FF1A91B2F8006E04F2 /* ios/QuickLookSoftLink.mm in Sources */,
    2957929585                                072AE1E6183C0741000A5988 /* QuickTimePluginReplacement.mm in Sources */,
    2958029586                                379E371613736A6600B9E919 /* QuotedPrintable.cpp in Sources */,
  • trunk/Source/WebCore/dom/CharacterData.idl

    r184034 r184042  
    3838                                    [IsIndex, Default=Undefined] optional unsigned long length,
    3939                                    [Default=Undefined] optional DOMString data);
    40 
    41     // From the NonDocumentTypeChildNode interface - https://dom.spec.whatwg.org/#nondocumenttypechildnode
    42     // FIXME: Move this to a seperate NonDocumentTypeChildNode IDL file when one exists.
    43     readonly attribute Element previousElementSibling;
    44     readonly attribute Element nextElementSibling;
    4540};
    4641
    4742CharacterData implements ChildNode;
    48 
     43CharacterData implements NonDocumentTypeChildNode;
  • trunk/Source/WebCore/dom/Document.idl

    r184034 r184042  
    218218
    219219    readonly attribute DOMString compatMode;
    220 
    221     // NodeSelector - Selector API
    222     [RaisesException] Element querySelector(DOMString selectors);
    223     [RaisesException] NodeList querySelectorAll(DOMString selectors);
    224220
    225221#if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
     
    345341    // http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement
    346342    readonly attribute Element scrollingElement;
    347 
    348     // From the ParentNode interface - https://dom.spec.whatwg.org/#interface-parentnode
    349     // FIXME: Move this to a seperate ParentNode IDL file when one exists.
    350     readonly attribute Element firstElementChild;
    351     readonly attribute Element lastElementChild;
    352     readonly attribute unsigned long childElementCount;
    353343};
    354344
     345Document implements ParentNode;
  • trunk/Source/WebCore/dom/DocumentFragment.idl

    r184034 r184042  
    2222    ConstructorCallWith=Document
    2323 ] interface DocumentFragment : Node {
    24     // NodeSelector - Selector API
    25     [RaisesException] Element querySelector(DOMString selectors);
    26     [RaisesException] NodeList querySelectorAll(DOMString selectors);
    27    
    28     // From the ParentNode interface - https://dom.spec.whatwg.org/#interface-parentnode
    29     // FIXME: Move this to a seperate ParentNode IDL file when one exists.
    30     readonly attribute Element firstElementChild;
    31     readonly attribute Element lastElementChild;
    32     readonly attribute unsigned long childElementCount;
    3324};
    3425
     26DocumentFragment implements ParentNode;
  • trunk/Source/WebCore/dom/Element.idl

    r184034 r184042  
    120120#endif
    121121
    122     // NodeSelector - Selector API
    123     [RaisesException] Element querySelector(DOMString selectors);
    124     [RaisesException] NodeList querySelectorAll(DOMString selectors);
    125 
    126122    [RaisesException] boolean matches(DOMString selectors);
    127123    [RaisesException] Element closest(DOMString selectors);   
    128124    [ImplementedAs=matches, RaisesException] boolean webkitMatchesSelector(DOMString selectors);
    129 
    130     // From the ParentNode interface - https://dom.spec.whatwg.org/#interface-parentnode
    131     // FIXME: Move this to a seperate ParentNode IDL file when one exists.
    132     readonly attribute Element firstElementChild;
    133     readonly attribute Element lastElementChild;
    134     readonly attribute unsigned long childElementCount;
    135 
    136     // From the NonDocumentTypeChildNode interface - https://dom.spec.whatwg.org/#nondocumenttypechildnode
    137     // FIXME: Move this to a seperate NonDocumentTypeChildNode IDL file when one exists.
    138     readonly attribute Element previousElementSibling;
    139     readonly attribute Element nextElementSibling;
    140125
    141126#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
     
    287272
    288273Element implements ChildNode;
    289 
     274Element implements ParentNode;
     275Element implements NonDocumentTypeChildNode;
Note: See TracChangeset for help on using the changeset viewer.