Changeset 166650 in webkit
- Timestamp:
- Apr 2, 2014 10:21:09 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r166649 r166650 1 2014-04-02 David Kilzer <ddkilzer@apple.com> 2 3 Use outermost containing isolate when constructing bidi runs 4 <http://webkit.org/b/131107> 5 <rdar://problem/15690021> 6 7 Reviewed by Darin Adler. 8 9 Merged from Blink (patch by jww@chromium.org): 10 https://src.chromium.org/viewvc/blink?revision=157268&view=revision 11 http://crbug.com/279277 12 13 Update containingIsolate to go back all the way to top 14 isolate from current root, rather than stopping at the first 15 isolate it finds. This works because the current root is 16 always updated with each isolate run. 17 18 * fast/text/international/unicode-bidi-isolate-nested-with-removes-expected.txt: Updated. 19 * fast/text/international/unicode-bidi-isolate-nested-with-removes-not-adjacent-expected.txt: Added. 20 * fast/text/international/unicode-bidi-isolate-nested-with-removes-not-adjacent.html: Added. 21 * fast/text/international/unicode-bidi-isolate-nested-with-removes.html: Updated. 22 1 23 2014-04-02 Chris Fleizach <cfleizach@apple.com> 2 24 -
trunk/LayoutTests/fast/text/international/unicode-bidi-isolate-nested-with-removes-expected.txt
r166645 r166650 1 bar2 3 4 1 PASS did not crash -
trunk/LayoutTests/fast/text/international/unicode-bidi-isolate-nested-with-removes.html
r166645 r166650 1 <!doctype html> 1 2 <!-- This tests for regression of https://crbug.com/265838 where adjacent, nested isolates caused a use-after-free if the elements were later removed. --> 2 3 <script> 3 function remove(node)4 {5 node.parentNode.removeChild(node);6 }7 8 4 window.onload = function() 9 5 { 10 6 document.body.offsetTop; 11 remove(b.lastChild);7 b.lastChild.parentNode.removeChild(b.lastChild); 12 8 document.body.offsetTop; 13 remove(a.firstChild);9 a.firstChild.parentNode.removeChild(a.firstChild); 14 10 document.body.offsetTop; 15 11 16 document. body.appendChild(document.createTextNode("PASS did not crash"));12 document.write("PASS did not crash"); 17 13 } 18 14 </script> -
trunk/Source/WebCore/ChangeLog
r166649 r166650 1 2014-04-02 David Kilzer <ddkilzer@apple.com> 2 3 Use outermost containing isolate when constructing bidi runs 4 <http://webkit.org/b/131107> 5 <rdar://problem/15690021> 6 7 Reviewed by Darin Adler. 8 9 Merged from Blink (patch by jww@chromium.org): 10 https://src.chromium.org/viewvc/blink?revision=157268&view=revision 11 http://crbug.com/279277 12 13 Update containingIsolate to go back all the way to top 14 isolate from current root, rather than stopping at the first 15 isolate it finds. This works because the current root is 16 always updated with each isolate run. 17 18 Tests: fast/text/international/unicode-bidi-isolate-nested-with-removes-not-adjacent.html 19 fast/text/international/unicode-bidi-isolate-nested-with-removes.html 20 21 * rendering/InlineIterator.h: 22 (WebCore::highestContainingIsolateWithinRoot): 23 * rendering/RenderBlockLineLayout.cpp: 24 (WebCore::constructBidiRunsForSegment): 25 1 26 2014-04-02 Chris Fleizach <cfleizach@apple.com> 2 27 -
trunk/Source/WebCore/rendering/InlineIterator.h
r166245 r166650 449 449 } 450 450 451 static inline RenderObject* containingIsolate(RenderObject* object, RenderObject* root)451 static inline RenderObject* highestContainingIsolateWithinRoot(RenderObject* object, RenderObject* root) 452 452 { 453 453 ASSERT(object); 454 454 RenderObject* containingIsolateObject = 0; 455 455 while (object && object != root) { 456 if (containingIsolateObject && !isIsolatedInline(object))457 break;458 459 456 if (isIsolatedInline(object)) 460 457 containingIsolateObject = object; -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r166428 r166650 877 877 // to take a RenderObject and do this logic there, but that would be a layering 878 878 // violation for BidiResolver (which knows nothing about RenderObject). 879 RenderInline* isolatedInline = toRenderInline(containingIsolate(&startObj, currentRoot)); 879 RenderInline* isolatedInline = toRenderInline(highestContainingIsolateWithinRoot(&startObj, currentRoot)); 880 ASSERT(isolatedInline); 881 880 882 InlineBidiResolver isolatedResolver; 881 883 EUnicodeBidi unicodeBidi = isolatedInline->style().unicodeBidi();
Note: See TracChangeset
for help on using the changeset viewer.