 Chromium Code Reviews
 Chromium Code Reviews Issue 2738503004:
  Search the entire subtree when looking for the end of an inline continuation chain.  (Closed)
    
  
    Issue 2738503004:
  Search the entire subtree when looking for the end of an inline continuation chain.  (Closed) 
  | Index: third_party/WebKit/Source/core/layout/LayoutInline.cpp | 
| diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp | 
| index 0ca9f0c68c9b5df3ea98a2f5e951b0b7f8a226a5..6992af87ed788db430c335b0b0f57aac83a045ff 100644 | 
| --- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp | 
| +++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp | 
| @@ -1140,11 +1140,17 @@ LayoutRect LayoutInline::absoluteVisualRect() const { | 
| for (LayoutBlock* currBlock = containingBlock(); | 
| currBlock && currBlock->isAnonymousBlock(); | 
| currBlock = toLayoutBlock(currBlock->nextSibling())) { | 
| + bool walkChildrenOnly = !currBlock->childrenInline(); | 
| for (LayoutObject* curr = currBlock->firstChild(); curr; | 
| curr = curr->nextSibling()) { | 
| LayoutRect rect(curr->localVisualRect()); | 
| context(FloatRect(rect)); | 
| - if (curr == endContinuation) { | 
| + if (walkChildrenOnly) | 
| + continue; | 
| + for (LayoutObject* walker = curr; walker; | 
| + walker = walker->nextInPreOrder(curr)) { | 
| 
rhogan
2017/03/07 19:01:50
Nested inside for (LayoutObject* curr = currBlock-
 
mstensho (USE GERRIT)
2017/03/07 19:45:13
nextInPreOrder(curr) forces us to stay within |cur
 
rhogan
2017/03/07 20:00:31
Oh right enough, the nested loop will always bail
 | 
| + if (walker != endContinuation) | 
| + continue; | 
| LayoutRect rect(enclosingIntRect(floatResult)); | 
| mapToVisualRectInAncestorSpace(view(), rect); | 
| return rect; |