Changeset 161142 in webkit
- Timestamp:
- Dec 30, 2013, 6:47:44 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r161141 r161142 1 2013-12-30 Antti Koivisto <antti@apple.com> 2 3 Remove attachChild 4 https://bugs.webkit.org/show_bug.cgi?id=126288 5 6 Reviewed by Andreas Kling. 7 8 * dom/ContainerNode.cpp: 9 (WebCore::destroyRenderTreeIfNeeded): 10 11 Rename detachChild and move the tests here. 12 13 (WebCore::ContainerNode::takeAllChildrenFrom): 14 15 No need to call attachRenderTree explicitly anymore. 16 17 (WebCore::ContainerNode::removeBetween): 18 1 19 2013-12-29 Andreas Kling <akling@apple.com> 2 20 -
trunk/Source/WebCore/dom/ContainerNode.cpp
r161127 r161142 105 105 } 106 106 107 static inline void attachChild(Node& child) 108 { 109 if (child.isElementNode()) 110 Style::attachRenderTree(toElement(child)); 111 else if (child.isTextNode()) 112 Style::attachTextRenderer(toText(child)); 113 } 114 115 static inline void detachChild(Node& child) 116 { 107 static inline void destroyRenderTreeIfNeeded(Node& child) 108 { 109 // FIXME: Get rid of the named flow test. 110 if (!child.renderer() && !child.inNamedFlow()) 111 return; 117 112 if (child.isElementNode()) 118 113 Style::detachRenderTree(toElement(child)); … … 141 136 for (unsigned i = 0; i < children.size(); ++i) { 142 137 Node& child = children[i].get(); 143 if (child.renderer()) 144 detachChild(child);138 139 destroyRenderTreeIfNeeded(child); 145 140 146 141 // FIXME: We need a no mutation event version of adoptNode. … … 151 146 // Can we do better? 152 147 treeScope().adoptIfNeeded(adoptedChild.get()); 153 if (renderer() && !adoptedChild->renderer())154 attachChild(*adoptedChild.get());155 148 } 156 149 } … … 594 587 ASSERT(oldChild.parentNode() == this); 595 588 596 // Remove from rendering tree 597 // FIXME: Get rid of the named flow test. 598 if (oldChild.renderer() || oldChild.inNamedFlow()) 599 detachChild(oldChild); 589 destroyRenderTreeIfNeeded(oldChild); 600 590 601 591 if (nextChild)
Note:
See TracChangeset
for help on using the changeset viewer.