Changeset 159389 in webkit
- Timestamp:
- Nov 17, 2013, 1:37:25 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r159385 r159389 1 2013-11-17 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r158774): Iteration over element children is broken 4 https://bugs.webkit.org/show_bug.cgi?id=124145 5 6 Reviewed by Anders Carlsson. 7 8 * fast/dom/htmlcollection-children-mutation-expected.txt: Added. 9 * fast/dom/htmlcollection-children-mutation.html: Added. 10 1 11 2013-11-17 Antti Koivisto <antti@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r159386 r159389 1 2013-11-17 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r158774): Iteration over element children is broken 4 https://bugs.webkit.org/show_bug.cgi?id=124145 5 6 Reviewed by Anders Carlsson. 7 8 Mutation during traversal invalidates the position cache. After the mid-point we start 9 traversing backwards as it the shortest path. However backward traversal of children-only 10 HTMLCollection was wrong and would end up going to descendants. 11 12 Reduction by yannick.poirier@inverto.tv. 13 14 Test: fast/dom/htmlcollection-children-mutation.html 15 16 * html/HTMLCollection.cpp: 17 (WebCore::HTMLCollection::collectionTraverseBackward): 18 19 Traverse direct children only when m_shouldOnlyIncludeDirectChildren bit is set. 20 1 21 2013-11-17 Zoltan Horvath <zoltan@webkit.org> 2 22 -
trunk/Source/WebCore/html/HTMLCollection.cpp
r158774 r159389 355 355 auto& root = rootNode(); 356 356 Element* element = ¤t; 357 if (m_shouldOnlyIncludeDirectChildren) { 358 for (; count && element ; --count) 359 element = iterateForPreviousElement(ElementTraversal::previousSibling(element)); 360 return element; 361 } 357 362 for (; count && element ; --count) 358 363 element = iterateForPreviousElement(ElementTraversal::previous(element, &root));
Note:
See TracChangeset
for help on using the changeset viewer.