Changeset 207864 in webkit
- Timestamp:
- Oct 25, 2016 9:45:04 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207862 r207864 1 2016-10-25 Ryosuke Niwa <rniwa@webkit.org> 2 3 Updating attribute by textContent must create a single mutation record and custom element reaction 4 https://bugs.webkit.org/show_bug.cgi?id=164003 5 6 Reviewed by Chris Dumez. 7 8 Added a test for ensuring mutating the attribute by nodeValue and textContent creates exactly one mutation record. 9 10 * fast/custom-elements/reactions-for-webkit-extensions.html: Updated the description. 11 * fast/dom/MutationObserver/text-content-on-attr-expected.txt: Added. 12 * fast/dom/MutationObserver/text-content-on-attr.html: Added. 13 1 14 2016-10-25 Michael Catanzaro <mcatanzaro@igalia.com> 2 15 -
trunk/LayoutTests/fast/custom-elements/reactions-for-webkit-extensions.html
r207571 r207864 2 2 <html> 3 3 <head> 4 <title>Custom Elements: CEReactions on Attrinterface</title>4 <title>Custom Elements: CEReactions on HTMLElement interface</title> 5 5 <meta name="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"> 6 <meta name="assert" content=" value of Attrinterface must have CEReactions">6 <meta name="assert" content="webkitdropzone of HTMLElement interface must have CEReactions"> 7 7 <meta name="help" content="https://dom.spec.whatwg.org/#node"> 8 8 <script src="../../resources/testharness.js"></script> -
trunk/LayoutTests/imported/w3c/ChangeLog
r207845 r207864 1 2016-10-25 Ryosuke Niwa <rniwa@webkit.org> 2 3 Updating attribute by textContent must create a single mutation record and custom element reaction 4 https://bugs.webkit.org/show_bug.cgi?id=164003 5 6 Reviewed by Chris Dumez. 7 8 Rebaselined the test now that all test cases are passing. 9 10 * web-platform-tests/custom-elements/reactions/Node-expected.txt: 11 1 12 2016-10-25 Brady Eidson <beidson@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Node-expected.txt
r207710 r207864 2 2 PASS nodeValue on Node must enqueue an attributeChanged reaction when replacing an existing attribute 3 3 PASS nodeValue on Node must not enqueue an attributeChanged reaction when replacing an existing unobserved attribute 4 FAIL textContent on Node must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 1 got 2 4 PASS textContent on Node must enqueue an attributeChanged reaction when replacing an existing attribute 5 5 PASS textContent on Node must not enqueue an attributeChanged reaction when replacing an existing unobserved attribute 6 6 PASS cloneNode on Node must enqueue an attributeChanged reaction when cloning an element with an observed attribute -
trunk/Source/WebCore/ChangeLog
r207863 r207864 1 2016-10-25 Ryosuke Niwa <rniwa@webkit.org> 2 3 Updating attribute by textContent must create a single mutation record and custom element reaction 4 https://bugs.webkit.org/show_bug.cgi?id=164003 5 6 Reviewed by Chris Dumez. 7 8 The bug was caused by setTextContent not invoking setNodeValue for Attr nodes. 9 Use setNodeValue to match the specification: https://dom.spec.whatwg.org/#dom-node-textcontent 10 11 Test: fast/dom/MutationObserver/text-content-on-attr.html 12 13 * dom/Node.cpp: 14 (WebCore::Node::setTextContent): 15 1 16 2016-10-25 Brent Fulgham <bfulgham@apple.com> 2 17 -
trunk/Source/WebCore/dom/Node.cpp
r207841 r207864 1476 1476 { 1477 1477 switch (nodeType()) { 1478 case TEXT_NODE:1479 case CDATA_SECTION_NODE:1480 case COMMENT_NODE:1481 case PROCESSING_INSTRUCTION_NODE:1482 setNodeValue(text, ec);1483 return;1484 case ELEMENT_NODE:1485 case ATTRIBUTE_NODE:1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1478 case ATTRIBUTE_NODE: 1479 case TEXT_NODE: 1480 case CDATA_SECTION_NODE: 1481 case COMMENT_NODE: 1482 case PROCESSING_INSTRUCTION_NODE: 1483 setNodeValue(text, ec); 1484 return; 1485 case ELEMENT_NODE: 1486 case DOCUMENT_FRAGMENT_NODE: { 1487 auto container = makeRef(downcast<ContainerNode>(*this)); 1488 ChildListMutationScope mutation(container); 1489 container->removeChildren(); 1490 if (!text.isEmpty()) 1491 container->appendChild(document().createTextNode(text), ec); 1492 return; 1493 } 1494 case DOCUMENT_NODE: 1495 case DOCUMENT_TYPE_NODE: 1496 // Do nothing. 1497 return; 1498 1498 } 1499 1499 ASSERT_NOT_REACHED();
Note: See TracChangeset
for help on using the changeset viewer.