Changeset 118111 in webkit
- Timestamp:
- May 22, 2012 8:36:39 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r118107 r118111 1 2012-05-22 Hayato Ito <hayato@chromium.org> 2 3 Make ComposedShadowTreeWalker traverse inactive insertion points correctly. 4 https://bugs.webkit.org/show_bug.cgi?id=86830 5 6 Reviewed by Dimitri Glazkov. 7 8 * fast/dom/shadow/composed-shadow-tree-walker-expected.txt: 9 * fast/dom/shadow/composed-shadow-tree-walker.html: 10 1 11 2012-05-22 Stephanie Lewis <slewis@apple.com> 2 12 -
trunk/LayoutTests/fast/dom/shadow/composed-shadow-tree-walker-expected.txt
r112845 r118111 151 151 DIV id=a 152 152 153 Test for inactive insertion points. 154 Composed Shadow Tree: 155 DIV id=a 156 CONTENT id=b 157 CONTENT id=c 158 159 Traverse in forward. 160 DIV id=a 161 CONTENT id=b 162 CONTENT id=c 163 Traverse in backward. 164 CONTENT id=c 165 CONTENT id=b 166 DIV id=a 167 153 168 PASS successfullyParsed is true 154 169 -
trunk/LayoutTests/fast/dom/shadow/composed-shadow-tree-walker.html
r112845 r118111 157 157 createDOM('div', {'id': 'f'}))); 158 158 159 debug('Test for inactive insertion points.'); 160 showComposedShadowTree( 161 createDOM('div', {'id': 'a'}, 162 createDOM('content', {'id': 'b'}, 163 createDOM('content', {'id': 'c'})))); 164 159 165 </script> 160 166 <script src="../../js/resources/js-test-post.js"></script> -
trunk/Source/WebCore/ChangeLog
r118110 r118111 1 2012-05-22 Hayato Ito <hayato@chromium.org> 2 3 Make ComposedShadowTreeWalker traverse inactive insertion points correctly. 4 https://bugs.webkit.org/show_bug.cgi?id=86830 5 6 Reviewed by Dimitri Glazkov. 7 8 Fixed InsertionPoint::isActive() issue, which may return true 9 wrongly even if the insertion point is not in Shadow DOM subtree. 10 Now ComposedShadowTreeWalker can traverse inactive insertion 11 points correctly using InsertionPoint::isActive(). 12 13 Test: fast/dom/shadow/composed-shadow-tree-walker.html 14 15 * dom/ComposedShadowTreeWalker.cpp: 16 (WebCore::ComposedShadowTreeWalker::traverseNode): 17 (WebCore::ComposedShadowTreeWalker::escapeFallbackContentElement): 18 (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents): 19 * html/shadow/InsertionPoint.cpp: 20 (WebCore::InsertionPoint::isActive): 21 * html/shadow/InsertionPoint.h: 22 (WebCore::isActiveInsertionPoint): 23 (WebCore): 24 1 25 2012-05-22 Mark Pilgrim <pilgrim@chromium.org> 2 26 -
trunk/Source/WebCore/dom/ComposedShadowTreeWalker.cpp
r117394 r118111 113 113 { 114 114 ASSERT(node); 115 if (isInsertionPoint(node)) { 116 const InsertionPoint* insertionPoint = toInsertionPoint(node); 117 if (Node* next = (direction == TraversalDirectionForward ? insertionPoint->first() : insertionPoint->last())) 118 return traverseNode(next, direction); 119 return traverseLightChildren(node, direction); 120 } 121 return const_cast<Node*>(node); 115 if (!isInsertionPoint(node)) 116 return const_cast<Node*>(node); 117 const InsertionPoint* insertionPoint = toInsertionPoint(node); 118 if (!insertionPoint->isActive()) 119 return const_cast<Node*>(node); 120 if (Node* next = (direction == TraversalDirectionForward ? insertionPoint->first() : insertionPoint->last())) 121 return traverseNode(next, direction); 122 return traverseLightChildren(node, direction); 122 123 } 123 124 … … 177 178 { 178 179 ASSERT(node); 179 if (node->parentNode() && is InsertionPoint(node->parentNode()))180 if (node->parentNode() && isActiveInsertionPoint(node->parentNode())) 180 181 return traverseSiblingOrBackToInsertionPoint(node->parentNode(), direction); 181 182 return 0; … … 185 186 { 186 187 ASSERT(node); 187 if (is InsertionPoint(node))188 if (isActiveInsertionPoint(node)) 188 189 return traverseParent(node); 189 190 return const_cast<Node*>(node); -
trunk/Source/WebCore/html/shadow/InsertionPoint.cpp
r117210 r118111 102 102 bool InsertionPoint::isActive() const 103 103 { 104 if (!shadowRoot()) 105 return false; 104 106 const Node* node = parentNode(); 105 107 while (node) { -
trunk/Source/WebCore/html/shadow/InsertionPoint.h
r117033 r118111 103 103 } 104 104 105 inline bool isActiveInsertionPoint(const Node* node) 106 { 107 return isInsertionPoint(node) && toInsertionPoint(node)->isActive(); 108 } 109 105 110 inline bool isShadowBoundary(Node* node) 106 111 {
Note: See TracChangeset
for help on using the changeset viewer.