Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 May 2015 03:22:21 +0000 (03:22 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 May 2015 03:22:21 +0000 (03:22 +0000)
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:
- https://dom.spec.whatwg.org/#interface-parentnode
- https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode

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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184042 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
LayoutTests/ChangeLog
LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/dom/CharacterData.idl
Source/WebCore/dom/Document.idl
Source/WebCore/dom/DocumentFragment.idl
Source/WebCore/dom/Element.idl
Source/WebCore/dom/NonDocumentTypeChildNode.idl [new file with mode: 0644]
Source/WebCore/dom/ParentNode.idl [new file with mode: 0644]

index e7f7ead..be46e93 100644 (file)
@@ -1,3 +1,14 @@
+2015-05-09  Chris Dumez  <cdumez@apple.com>
+
+        Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
+        https://bugs.webkit.org/show_bug.cgi?id=144825
+
+        Reviewed by Sam Weinig.
+
+        Rebaseline test as the order of the methods changed when iterating.
+
+        * js/dom/dom-static-property-for-in-iteration-expected.txt:
+
 2015-05-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
 
         streams/reference-implementation/readable-stream-reader.html and streams/reference-implementation/bad-underlying-sources.html are flaky
index cab23be..535247e 100644 (file)
@@ -65,13 +65,13 @@ PASS a["outerHTML"] is <a id="foo" href="bar">nerget</a>
 PASS a["className"] is 
 PASS a["classList"] is 
 PASS a["dataset"] is [object DOMStringMap]
+PASS a["uiactions"] is 
+PASS a["webkitRegionOverset"] is undefined
+PASS a["previousElementSibling"] is [object HTMLDivElement]
+PASS a["nextElementSibling"] is [object HTMLScriptElement]
 PASS a["firstElementChild"] is null
 PASS a["lastElementChild"] is null
 PASS a["childElementCount"] is 0
-PASS a["previousElementSibling"] is [object HTMLDivElement]
-PASS a["nextElementSibling"] is [object HTMLScriptElement]
-PASS a["uiactions"] is 
-PASS a["webkitRegionOverset"] is undefined
 PASS a["ALLOW_KEYBOARD_INPUT"] is 1
 PASS a["nodeName"] is A
 PASS a["nodeValue"] is null
index b2b7227..654512f 100644 (file)
@@ -411,8 +411,10 @@ set(WebCore_NON_SVG_IDL_FILES
     dom/NodeFilter.idl
     dom/NodeIterator.idl
     dom/NodeList.idl
+    dom/NonDocumentTypeChildNode.idl
     dom/OverflowEvent.idl
     dom/PageTransitionEvent.idl
+    dom/ParentNode.idl
     dom/PopStateEvent.idl
     dom/ProcessingInstruction.idl
     dom/ProgressEvent.idl
index 5b32375..2b97520 100644 (file)
@@ -1,5 +1,29 @@
 2015-05-09  Chris Dumez  <cdumez@apple.com>
 
+        Introduce ParentNode.idl / NonDocumentTypeChildNode.idl
+        https://bugs.webkit.org/show_bug.cgi?id=144825
+
+        Reviewed by Sam Weinig.
+
+        Introduce ParentNode.idl / NonDocumentTypeChildNode.idl as per DOM
+        specification and to avoid IDL code duplication:
+        - https://dom.spec.whatwg.org/#interface-parentnode
+        - https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
+
+        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.
+
+2015-05-09  Chris Dumez  <cdumez@apple.com>
+
         Invalidate the FontCache on WebProcess suspension / critical memory pressure
         https://bugs.webkit.org/show_bug.cgi?id=144821
 
index 1b4338c..0f4ba2d 100644 (file)
@@ -299,8 +299,10 @@ NON_SVG_BINDING_IDLS = \
     $(WebCore)/dom/NodeFilter.idl \
     $(WebCore)/dom/NodeIterator.idl \
     $(WebCore)/dom/NodeList.idl \
+    $(WebCore)/dom/NonDocumentTypeChildNode.idl \
     $(WebCore)/dom/OverflowEvent.idl \
     $(WebCore)/dom/PageTransitionEvent.idl \
+    $(WebCore)/dom/ParentNode.idl \
     $(WebCore)/dom/PopStateEvent.idl \
     $(WebCore)/dom/ProcessingInstruction.idl \
     $(WebCore)/dom/ProgressEvent.idl \
index acdf905..27c1899 100644 (file)
                44311CD912E4E257000A8D19 /* DOMDocumentFragmentPrivate.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 44311CD412E4E22D000A8D19 /* DOMDocumentFragmentPrivate.h */; };
                44311F8212E4E66C000A8D19 /* DOMDocumentFragmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 85E711450AC5D5340053270F /* DOMDocumentFragmentInternal.h */; };
                443817FF1A91B2F8006E04F2 /* CoreMediaSoftLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 443817FD1A91B2F8006E04F2 /* CoreMediaSoftLink.cpp */; };
-               443917FF1A91B2F8006E04F2 /* QuickLookSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 443917FD1A91B2F8006E04F2 /* QuickLookSoftLink.mm */; };
                443818001A91B2F8006E04F2 /* CoreMediaSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 443817FE1A91B2F8006E04F2 /* CoreMediaSoftLink.h */; };
-               443918001A91B2F8006E04F2 /* QuickLookSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 443917FE1A91B2F8006E04F2 /* QuickLookSoftLink.h */; };
+               443917FF1A91B2F8006E04F2 /* ios/QuickLookSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 443917FD1A91B2F8006E04F2 /* ios/QuickLookSoftLink.mm */; };
+               443918001A91B2F8006E04F2 /* ios/QuickLookSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 443917FE1A91B2F8006E04F2 /* ios/QuickLookSoftLink.h */; };
                443F04270E75C8FB007E5407 /* NetworkStateNotifierIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 443F04260E75C8FB007E5407 /* NetworkStateNotifierIOS.mm */; };
                4449A4051A964B0000B64AD5 /* CoreMediaSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 4449A4041A964B0000B64AD5 /* CoreMediaSPI.h */; };
                444D4E230F708B2E003158E0 /* WebCoreURLResponseIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 444D4E210F708B2E003158E0 /* WebCoreURLResponseIOS.mm */; };
                44311CD412E4E22D000A8D19 /* DOMDocumentFragmentPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMDocumentFragmentPrivate.h; sourceTree = "<group>"; };
                44311CD512E4E22D000A8D19 /* DOMDocumentPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMDocumentPrivate.h; sourceTree = "<group>"; };
                443817FD1A91B2F8006E04F2 /* CoreMediaSoftLink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CoreMediaSoftLink.cpp; sourceTree = "<group>"; };
-               443917FD1A91B2F8006E04F2 /* QuickLookSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ios/QuickLookSoftLink.mm; sourceTree = "<group>"; };
                443817FE1A91B2F8006E04F2 /* CoreMediaSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreMediaSoftLink.h; sourceTree = "<group>"; };
-               443917FE1A91B2F8006E04F2 /* QuickLookSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ios/QuickLookSoftLink.h; sourceTree = "<group>"; };
+               443917FD1A91B2F8006E04F2 /* ios/QuickLookSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ios/QuickLookSoftLink.mm; sourceTree = "<group>"; };
+               443917FE1A91B2F8006E04F2 /* ios/QuickLookSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ios/QuickLookSoftLink.h; sourceTree = "<group>"; };
                443F04260E75C8FB007E5407 /* NetworkStateNotifierIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkStateNotifierIOS.mm; sourceTree = "<group>"; };
                4449A4041A964B0000B64AD5 /* CoreMediaSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreMediaSPI.h; sourceTree = "<group>"; };
                444D4E210F708B2E003158E0 /* WebCoreURLResponseIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreURLResponseIOS.mm; sourceTree = "<group>"; };
                832B843519D8E57400B26055 /* SVGAnimateElementBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimateElementBase.cpp; sourceTree = "<group>"; };
                83520C7D1A71BFCC006BD2AA /* CSSFontFamily.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontFamily.h; sourceTree = "<group>"; };
                835D363619FF6193004C93AB /* StyleBuilderCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleBuilderCustom.h; sourceTree = "<group>"; };
+               8369E58F1AFDD0300087DF68 /* NonDocumentTypeChildNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = NonDocumentTypeChildNode.idl; sourceTree = "<group>"; };
                836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedTypeAnimator.cpp; sourceTree = "<group>"; };
                836FBCEB178C117F00B21A15 /* SVGAnimatedProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedProperty.cpp; sourceTree = "<group>"; };
                8372DB301A6780A800C697C5 /* DiagnosticLoggingResultType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiagnosticLoggingResultType.h; sourceTree = "<group>"; };
                83C1D422178D5AB400141E68 /* SVGPathSegLinetoVerticalRel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathSegLinetoVerticalRel.h; sourceTree = "<group>"; };
                83C1D423178D5AB400141E68 /* SVGPathSegMovetoAbs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathSegMovetoAbs.h; sourceTree = "<group>"; };
                83C1D424178D5AB400141E68 /* SVGPathSegMovetoRel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathSegMovetoRel.h; sourceTree = "<group>"; };
+               83D26D3C1AFDCC50001B3873 /* ChildNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ChildNode.idl; sourceTree = "<group>"; };
+               83D26D3D1AFDCC50001B3873 /* ParentNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = ParentNode.idl; sourceTree = "<group>"; };
                8419D2A4120D92D000141F8F /* SVGPathByteStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathByteStream.h; sourceTree = "<group>"; };
                8419D2A5120D92D000141F8F /* SVGPathByteStreamBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGPathByteStreamBuilder.cpp; sourceTree = "<group>"; };
                8419D2A6120D92D000141F8F /* SVGPathByteStreamBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGPathByteStreamBuilder.h; sourceTree = "<group>"; };
                                C5278B0B17F212EA003A2998 /* PlatformPasteboardIOS.mm */,
                                E45390320EAFD637003695C8 /* PlatformScreenIOS.mm */,
                                AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerIOS.mm */,
-                               443917FE1A91B2F8006E04F2 /* QuickLookSoftLink.h */,
-                               443917FD1A91B2F8006E04F2 /* QuickLookSoftLink.mm */,
+                               443917FE1A91B2F8006E04F2 /* ios/QuickLookSoftLink.h */,
+                               443917FD1A91B2F8006E04F2 /* ios/QuickLookSoftLink.mm */,
                                CDFC360118CA61630026E56F /* RemoteCommandListenerIOS.h */,
                                CDFC360218CA61630026E56F /* RemoteCommandListenerIOS.mm */,
                                44C363EE0FAA7BB30097F8CC /* RuntimeApplicationChecksIOS.h */,
                                93F925410F7EF5B8007E37C9 /* CheckedRadioButtons.h */,
                                D619A305144E00BE004BC302 /* ChildListMutationScope.cpp */,
                                D619A306144E00BE004BC302 /* ChildListMutationScope.h */,
+                               83D26D3C1AFDCC50001B3873 /* ChildNode.idl */,
                                A818721A0977D3C0005826D9 /* ChildNodeList.cpp */,
                                A81872150977D3C0005826D9 /* ChildNodeList.h */,
                                BC904B720D10998F00680D32 /* ClassNodeList.cpp */,
                                E43105B716750F0C00DB2FB8 /* NodeTraversal.cpp */,
                                E43105BA16750F1600DB2FB8 /* NodeTraversal.h */,
                                9382AAB10D8C386100F357A6 /* NodeWithIndex.h */,
+                               8369E58F1AFDD0300087DF68 /* NonDocumentTypeChildNode.idl */,
                                1A0D57340A5C77FE007EDD4C /* OverflowEvent.cpp */,
                                1A0D57350A5C77FE007EDD4C /* OverflowEvent.h */,
                                1A0D57380A5C7812007EDD4C /* OverflowEvent.idl */,
                                E1284AE910447DEE00EAEB52 /* PageTransitionEvent.cpp */,
                                E1284AE010447D4500EAEB52 /* PageTransitionEvent.h */,
                                E1284AD910447AEB00EAEB52 /* PageTransitionEvent.idl */,
+                               83D26D3D1AFDCC50001B3873 /* ParentNode.idl */,
                                8A7CC96F12076F8A001D4588 /* PendingScript.cpp */,
                                8A7CC96A12076D73001D4588 /* PendingScript.h */,
                                41BF700D0FE86F61005E8DEC /* PlatformMessagePortChannel.cpp */,
                                550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */,
                                CE12523D1A1676CD00864480 /* QuartzCoreSPI.h in Headers */,
                                442AF7A9102CDDEA008FD4D3 /* QuickLook.h in Headers */,
-                               443918001A91B2F8006E04F2 /* QuickLookSoftLink.h in Headers */,
+                               443918001A91B2F8006E04F2 /* ios/QuickLookSoftLink.h in Headers */,
                                A149786F1ABAF33800CEF7E4 /* ContentFilter.h in Headers */,
                                CE1252391A166FA000864480 /* QuickLookSPI.h in Headers */,
                                A10DBF4718F92317000D70C6 /* QuickLookHandleClient.h in Headers */,
                                CDEE393717974259001D7580 /* PublicURLManager.cpp in Sources */,
                                550A0BC9085F6039007353D6 /* QualifiedName.cpp in Sources */,
                                442AF7AA102CDDEA008FD4D3 /* QuickLook.mm in Sources */,
-                               443917FF1A91B2F8006E04F2 /* QuickLookSoftLink.mm in Sources */,
+                               443917FF1A91B2F8006E04F2 /* ios/QuickLookSoftLink.mm in Sources */,
                                072AE1E6183C0741000A5988 /* QuickTimePluginReplacement.mm in Sources */,
                                379E371613736A6600B9E919 /* QuotedPrintable.cpp in Sources */,
                                5A574F28131DB96D00471B88 /* QuotesData.cpp in Sources */,
index da75c41..1084186 100644 (file)
@@ -37,12 +37,7 @@ interface CharacterData : Node {
     [ObjCLegacyUnnamedParameters, RaisesException] void replaceData([IsIndex, Default=Undefined] optional unsigned long offset, 
                                     [IsIndex, Default=Undefined] optional unsigned long length,
                                     [Default=Undefined] optional DOMString data);
-
-    // From the NonDocumentTypeChildNode interface - https://dom.spec.whatwg.org/#nondocumenttypechildnode
-    // FIXME: Move this to a seperate NonDocumentTypeChildNode IDL file when one exists.
-    readonly attribute Element previousElementSibling;
-    readonly attribute Element nextElementSibling;
 };
 
 CharacterData implements ChildNode;
-
+CharacterData implements NonDocumentTypeChildNode;
index 951d6fa..a5ad310 100644 (file)
 
     readonly attribute DOMString compatMode;
 
-    // NodeSelector - Selector API
-    [RaisesException] Element querySelector(DOMString selectors);
-    [RaisesException] NodeList querySelectorAll(DOMString selectors);
-
 #if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
     // Mozilla version
     readonly attribute boolean webkitIsFullScreen;
 
     // http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement
     readonly attribute Element scrollingElement;
-
-    // From the ParentNode interface - https://dom.spec.whatwg.org/#interface-parentnode
-    // FIXME: Move this to a seperate ParentNode IDL file when one exists.
-    readonly attribute Element firstElementChild;
-    readonly attribute Element lastElementChild;
-    readonly attribute unsigned long childElementCount;
 };
 
+Document implements ParentNode;
index bad44a8..2c94fbd 100644 (file)
     Constructor,
     ConstructorCallWith=Document
  ] interface DocumentFragment : Node {
-    // NodeSelector - Selector API
-    [RaisesException] Element querySelector(DOMString selectors);
-    [RaisesException] NodeList querySelectorAll(DOMString selectors);
-    
-    // From the ParentNode interface - https://dom.spec.whatwg.org/#interface-parentnode
-    // FIXME: Move this to a seperate ParentNode IDL file when one exists.
-    readonly attribute Element firstElementChild;
-    readonly attribute Element lastElementChild;
-    readonly attribute unsigned long childElementCount;
 };
 
+DocumentFragment implements ParentNode;
index 3d94ed3..e731521 100644 (file)
     readonly attribute DOMStringMap dataset;
 #endif
 
-    // NodeSelector - Selector API
-    [RaisesException] Element querySelector(DOMString selectors);
-    [RaisesException] NodeList querySelectorAll(DOMString selectors);
-
     [RaisesException] boolean matches(DOMString selectors);
     [RaisesException] Element closest(DOMString selectors);    
     [ImplementedAs=matches, RaisesException] boolean webkitMatchesSelector(DOMString selectors);
 
-    // From the ParentNode interface - https://dom.spec.whatwg.org/#interface-parentnode
-    // FIXME: Move this to a seperate ParentNode IDL file when one exists.
-    readonly attribute Element firstElementChild;
-    readonly attribute Element lastElementChild;
-    readonly attribute unsigned long childElementCount;
-
-    // From the NonDocumentTypeChildNode interface - https://dom.spec.whatwg.org/#nondocumenttypechildnode
-    // FIXME: Move this to a seperate NonDocumentTypeChildNode IDL file when one exists.
-    readonly attribute Element previousElementSibling;
-    readonly attribute Element nextElementSibling;
-
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
     // CSSOM View Module API
     ClientRectList getClientRects();
 };
 
 Element implements ChildNode;
-
+Element implements ParentNode;
+Element implements NonDocumentTypeChildNode;
diff --git a/Source/WebCore/dom/NonDocumentTypeChildNode.idl b/Source/WebCore/dom/NonDocumentTypeChildNode.idl
new file mode 100644 (file)
index 0000000..7093023
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+// https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
+[
+    NoInterfaceObject,
+] interface NonDocumentTypeChildNode {
+    readonly attribute Element previousElementSibling;
+    readonly attribute Element nextElementSibling;
+};
diff --git a/Source/WebCore/dom/ParentNode.idl b/Source/WebCore/dom/ParentNode.idl
new file mode 100644 (file)
index 0000000..ea3f5a7
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+// https://dom.spec.whatwg.org/#interface-parentnode
+[
+    NoInterfaceObject,
+] interface ParentNode {
+    readonly attribute Element firstElementChild;
+    readonly attribute Element lastElementChild;
+    readonly attribute unsigned long childElementCount;
+
+    [RaisesException] Element querySelector(DOMString selectors);
+    [RaisesException] NodeList querySelectorAll(DOMString selectors);
+};