Changeset 202873 in webkit
- Timestamp:
- Jul 6, 2016 1:09:32 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
- 1 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202870 r202873 1 2016-07-06 Chris Dumez <cdumez@apple.com> 2 3 [ShadowDOM] assignedSlot property should be on Text, not CharacterData 4 https://bugs.webkit.org/show_bug.cgi?id=159482 5 <rdar://problem/27201687> 6 7 Reviewed by Ryosuke Niwa. 8 9 Update / rebaseline a couple of existing tests. 10 11 * fast/shadow-dom/Slotable-interface-assignedSlot-expected.txt: Renamed from LayoutTests/fast/shadow-dom/NonDocumentTypeChildNode-interface-assignedSlot-expected.txt. 12 * fast/shadow-dom/Slotable-interface-assignedSlot.html: Renamed from LayoutTests/fast/shadow-dom/NonDocumentTypeChildNode-interface-assignedSlot.html. 13 * js/dom/dom-static-property-for-in-iteration-expected.txt: 14 1 15 2016-07-06 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/LayoutTests/fast/shadow-dom/Slotable-interface-assignedSlot.html
r202872 r202873 2 2 <html> 3 3 <head> 4 <title>Shadow DOM: Extensions to NonDocumentTypeChildNode interface</title>4 <title>Shadow DOM: Slotable interface</title> 5 5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> 6 <meta name="assert" content=" NonDocumentTypeChildNode interface must have assignedSlot attribute">6 <meta name="assert" content="Slotable interface must have assignedSlot attribute"> 7 7 <link rel="help" href="https://w3c.github.io/webcomponents/spec/shadow/#the-slot-element"> 8 8 <script src="../../resources/testharness.js"></script> … … 18 18 assert_true('assignedSlot' in document.createElement('div'), 'assignedSlot must be defined on a div element'); 19 19 20 assert_true('assignedSlot' in CharacterData.prototype, 'assignedSlot must be defined on CharacterData.prototype');20 assert_true('assignedSlot' in Text.prototype, 'assignedSlot must be defined on Text.prototype'); 21 21 assert_true('assignedSlot' in document.createTextNode(''), 'assignedSlot must be defined on a text node'); 22 assert_true('assignedSlot' in document.createComment(''), 'assignedSlot must be defined on a comment node'); 22 assert_false('assignedSlot' in document.createComment(''), 'assignedSlot must not be defined on a comment node'); 23 assert_false('assignedSlot' in document.createProcessingInstruction('target', 'data'), 'assignedSlot must not be defined on a processing instruction node'); 23 24 24 25 }, 'assignedSlot attribute must be defined on NonDocumentTypeChildNode interface'); … … 38 39 assert_equals(childTextNode.assignedSlot, null, 'assignedSlot on a text node must be null when a node is not assigned of any slot'); 39 40 40 var commentNode = document.createComment('');41 shadowHost.appendChild(commentNode);42 assert_equals(commentNode.assignedSlot, null, 'assignedSlot on a comment node must be null when a node is not assigned of any slot');43 44 41 var slot = document.createElement('slot'); 45 42 slot.name = 'foo'; … … 47 44 assert_equals(childElement.assignedSlot, null, 'assignedSlot on an element must be null when a node does not match any slot'); 48 45 assert_equals(childTextNode.assignedSlot, null, 'assignedSlot on a text node must be null when a node does not match any slot'); 49 assert_equals(commentNode.assignedSlot, null, 'assignedSlot on a comment must be null when a node does not match any slot');50 46 51 47 }, 'assignedSlot must return null when the node does not have an assigned node'); … … 59 55 shadowHost.appendChild(childTextNode); 60 56 61 var commentNode = document.createComment('');62 shadowHost.appendChild(commentNode);63 64 var processingInstructionNode = document.createProcessingInstruction('target', 'data');65 shadowHost.appendChild(processingInstructionNode);66 67 57 var shadowRoot = shadowHost.attachShadow({mode: 'open'}); 68 58 var slot = document.createElement('slot'); … … 71 61 assert_equals(childElement.assignedSlot, slot, 'assignedSlot on an element must return the assigned default slot element'); 72 62 assert_equals(childTextNode.assignedSlot, slot, 'assignedSlot on a text node must return the assigned default slot element'); 73 assert_equals(commentNode.assignedSlot, null, 'assignedSlot on a comment node must always return null');74 assert_equals(processingInstructionNode.assignedSlot, null, 'assignedSlot on a comment node must always return null');75 63 76 64 slot.name = 'foo'; 77 65 assert_equals(childElement.assignedSlot, null, 'assignedSlot on an element must null when the element is unassigned from a slot element'); 78 66 assert_equals(childTextNode.assignedSlot, null, 'assignedSlot on a text node must null when the node is unassigned from a slot element'); 79 assert_equals(commentNode.assignedSlot, null, 'assignedSlot on a text node must null when the node is unassigned from a slot element');80 assert_equals(processingInstructionNode.assignedSlot, null, 'assignedSlot on a text node must null when the node is unassigned from a slot element');81 67 82 68 childElement.slot = 'foo'; … … 85 71 slot.removeAttribute('name'); 86 72 assert_equals(childTextNode.assignedSlot, slot, 'assignedSlot on a text node must return the re-assigned slot element'); 87 assert_equals(commentNode.assignedSlot, null, 'assignedSlot on a comment node must always return null');88 assert_equals(processingInstructionNode.assignedSlot, null, 'assignedSlot on a comment node must always return null');89 73 90 74 }, 'assignedSlot must return the assigned slot'); … … 98 82 shadowHost.appendChild(childTextNode); 99 83 100 var commentNode = document.createTextNode('');101 shadowHost.appendChild(commentNode);102 103 var processingInstructionNode = document.createProcessingInstruction('target', 'data');104 shadowHost.appendChild(processingInstructionNode);105 106 84 var shadowRoot = shadowHost.attachShadow({mode: 'closed'}); 107 85 var slot = document.createElement('slot'); … … 110 88 assert_equals(childElement.assignedSlot, null, 'assignedSlot on an element must return null if the slot is inside a closed shadow tree.'); 111 89 assert_equals(childTextNode.assignedSlot, null, 'assignedSlot on a text node must return null if the slot is inside a closed shadow tree.'); 112 assert_equals(commentNode.assignedSlot, null, 'assignedSlot on a comment node must always return null.');113 assert_equals(processingInstructionNode.assignedSlot, null, 'assignedSlot on a processing instruction must always return null.');114 90 115 91 }, 'assignedSlot must return null when the assigned slot element is inside a closed shadow tree'); -
trunk/LayoutTests/imported/w3c/ChangeLog
r202870 r202873 1 2016-07-06 Chris Dumez <cdumez@apple.com> 2 3 [ShadowDOM] assignedSlot property should be on Text, not CharacterData 4 https://bugs.webkit.org/show_bug.cgi?id=159482 5 <rdar://problem/27201687> 6 7 Reviewed by Ryosuke Niwa. 8 9 Rebaseline W3C test now that one more check is passing. 10 11 * web-platform-tests/dom/interfaces-expected.txt: 12 1 13 2016-07-06 Chris Dumez <cdumez@apple.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt
r202870 r202873 1179 1179 PASS Text interface: operation splitText(unsigned long) 1180 1180 PASS Text interface: attribute wholeText 1181 FAIL Text interface: attribute assignedSlot assert_own_property: expected property "assignedSlot" missing 1181 PASS Text interface: attribute assignedSlot 1182 1182 PASS Text must be primary interface of document.createTextNode("abc") 1183 1183 PASS Stringification of document.createTextNode("abc") -
trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt
r202870 r202873 128 128 PASS a["previousElementSibling"] is [object HTMLDivElement] 129 129 PASS a["nextElementSibling"] is [object HTMLScriptElement] 130 PASS a["assignedSlot"] is null131 130 PASS a["children"] is [object HTMLCollection] 132 131 PASS a["firstElementChild"] is null 133 132 PASS a["lastElementChild"] is null 134 133 PASS a["childElementCount"] is 0 134 PASS a["assignedSlot"] is null 135 135 PASS a["ALLOW_KEYBOARD_INPUT"] is 1 136 136 PASS a["nodeName"] is A -
trunk/Source/WebCore/CMakeLists.txt
r202656 r202873 412 412 dom/SecurityPolicyViolationEvent.idl 413 413 dom/ShadowRoot.idl 414 dom/Slotable.idl 414 415 dom/StringCallback.idl 415 416 dom/Text.idl -
trunk/Source/WebCore/ChangeLog
r202872 r202873 1 2016-07-06 Chris Dumez <cdumez@apple.com> 2 3 [ShadowDOM] assignedSlot property should be on Text, not CharacterData 4 https://bugs.webkit.org/show_bug.cgi?id=159482 5 <rdar://problem/27201687> 6 7 Reviewed by Ryosuke Niwa. 8 9 assignedSlot property should be on Text, not CharacterData as per: 10 - https://dom.spec.whatwg.org/#mixin-slotable 11 12 Align with the latest specification. 13 14 No new tests, rebaselined existing test. 15 16 * CMakeLists.txt: 17 * DerivedSources.make: 18 * WebCore.xcodeproj/project.pbxproj: 19 * dom/Element.idl: 20 * dom/NonDocumentTypeChildNode.idl: 21 * dom/Slotable.idl: Copied from Source/WebCore/dom/NonDocumentTypeChildNode.idl. 22 * dom/Text.idl: 23 1 24 2016-07-06 Jeremy Jones <jeremyj@apple.com> 2 25 -
trunk/Source/WebCore/DerivedSources.make
r202309 r202873 335 335 $(WebCore)/dom/SecurityPolicyViolationEvent.idl \ 336 336 $(WebCore)/dom/ShadowRoot.idl \ 337 $(WebCore)/dom/Slotable.idl \ 337 338 $(WebCore)/dom/StringCallback.idl \ 338 339 $(WebCore)/dom/Text.idl \ -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r202656 r202873 10688 10688 83520C7D1A71BFCC006BD2AA /* CSSFontFamily.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontFamily.h; sourceTree = "<group>"; }; 10689 10689 835D363619FF6193004C93AB /* StyleBuilderCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleBuilderCustom.h; sourceTree = "<group>"; }; 10690 835F8B261D2D90BA00E408EC /* Slotable.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Slotable.idl; sourceTree = "<group>"; }; 10690 10691 8369E58F1AFDD0300087DF68 /* NonDocumentTypeChildNode.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = NonDocumentTypeChildNode.idl; sourceTree = "<group>"; }; 10691 10692 836BAD1F1BD1CA670037356A /* HTMLTableHeaderCellElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLTableHeaderCellElement.h; sourceTree = "<group>"; }; … … 24818 24819 9B532EA11BA928570038A827 /* SlotAssignment.cpp */, 24819 24820 9B532EA21BA928570038A827 /* SlotAssignment.h */, 24821 835F8B261D2D90BA00E408EC /* Slotable.idl */, 24820 24822 D01A27AB10C9BFD800026A42 /* SpaceSplitString.cpp */, 24821 24823 D01A27AC10C9BFD800026A42 /* SpaceSplitString.h */, -
trunk/Source/WebCore/dom/Element.idl
r202539 r202873 242 242 243 243 Element implements ChildNode; 244 Element implements NonDocumentTypeChildNode; 244 245 Element implements ParentNode; 245 Element implements NonDocumentTypeChildNode;246 Element implements Slotable; -
trunk/Source/WebCore/dom/NonDocumentTypeChildNode.idl
r202091 r202873 31 31 readonly attribute Element previousElementSibling; 32 32 readonly attribute Element nextElementSibling; 33 34 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT35 [EnabledAtRuntime=ShadowDOM, ImplementedAs=assignedSlotForBindings] readonly attribute HTMLSlotElement assignedSlot;36 #endif37 33 }; -
trunk/Source/WebCore/dom/Slotable.idl
r202872 r202873 1 1 /* 2 * Copyright (C) 201 5Apple Inc. All Rights Reserved.2 * Copyright (C) 2016 Apple Inc. All Rights Reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 25 25 */ 26 26 27 // https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode28 27 [ 29 28 NoInterfaceObject, 30 ] interface NonDocumentTypeChildNode { 31 readonly attribute Element previousElementSibling; 32 readonly attribute Element nextElementSibling; 33 29 EnabledAtRuntime=ShadowDOM, 30 ] interface Slotable { 34 31 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT 35 [ EnabledAtRuntime=ShadowDOM, ImplementedAs=assignedSlotForBindings] readonly attribute HTMLSlotElementassignedSlot;32 [ImplementedAs=assignedSlotForBindings] readonly attribute HTMLSlotElement? assignedSlot; 36 33 #endif 37 34 }; -
trunk/Source/WebCore/dom/Text.idl
r200934 r202873 34 34 }; 35 35 36 Text implements Slotable;
Note: See TracChangeset
for help on using the changeset viewer.