Changeset 139958 in webkit
- Timestamp:
- Jan 16, 2013 8:22:41 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r139932 r139958 1 2013-01-16 MORITA Hajime <morrita@google.com> 2 3 Attr.ownerDocument should change if its parent's owner did 4 https://bugs.webkit.org/show_bug.cgi?id=97644 5 6 Reviewed by Darin Adler. 7 8 * fast/dom/Attr/parent-adopt-node-expected.txt: Added. 9 * fast/dom/Attr/parent-adopt-node.html: Added. 10 1 11 2013-01-16 Victor Carbune <vcarbune@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r139954 r139958 1 2013-01-16 MORITA Hajime <morrita@google.com> 2 3 Attr.ownerDocument should change if its parent's owner did 4 https://bugs.webkit.org/show_bug.cgi?id=97644 5 6 Reviewed by Darin Adler. 7 8 moveTreeToNewScope() didn't traverse its Attr instances. But it should. 9 10 Test: fast/dom/Attr/parent-adopt-node.html 11 12 * dom/ElementAttributeData.cpp: 13 (WebCore::ElementAttributeData::getExistingAttrs): 14 (WebCore): 15 * dom/ElementAttributeData.h: 16 (ElementAttributeData): 17 * dom/TreeScopeAdopter.cpp: 18 (WebCore::TreeScopeAdopter::moveTreeToNewScope): 19 1 20 2013-01-16 Adam Barth <abarth@webkit.org> 2 21 -
trunk/Source/WebCore/dom/Element.cpp
r139839 r139958 1643 1643 #endif 1644 1644 1645 const Vector<RefPtr<Attr> >& Element::attrNodeList() 1646 { 1647 ASSERT(hasSyntheticAttrChildNodes()); 1648 return *attrNodeListForElement(this); 1649 } 1650 1645 1651 PassRefPtr<Attr> Element::setAttributeNode(Attr* attrNode, ExceptionCode& ec) 1646 1652 { -
trunk/Source/WebCore/dom/Element.h
r139839 r139958 38 38 namespace WebCore { 39 39 40 class Attr; 40 41 class Attribute; 41 42 class ClientRect; … … 229 230 PassRefPtr<Attr> attrIfExists(const QualifiedName&); 230 231 PassRefPtr<Attr> ensureAttr(const QualifiedName&); 231 232 233 const Vector<RefPtr<Attr> >& attrNodeList(); 234 232 235 virtual CSSStyleDeclaration* style(); 233 236 -
trunk/Source/WebCore/dom/TreeScopeAdopter.cpp
r138735 r139958 26 26 #include "TreeScopeAdopter.h" 27 27 28 #include "Attr.h" 28 29 #include "Document.h" 29 30 #include "ElementRareData.h" … … 61 62 if (willMoveToNewDocument) 62 63 moveNodeToNewDocument(node, oldDocument, newDocument); 64 65 if (!node->isElementNode()) 66 continue; 67 68 if (node->hasSyntheticAttrChildNodes()) { 69 const Vector<RefPtr<Attr> >& attrs = toElement(node)->attrNodeList(); 70 for (unsigned i = 0; i < attrs.size(); ++i) 71 moveTreeToNewScope(attrs[i].get()); 72 } 63 73 64 74 for (ShadowRoot* shadow = node->youngestShadowRoot(); shadow; shadow = shadow->olderShadowRoot()) {
Note: See TracChangeset
for help on using the changeset viewer.