Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutInline.cpp

Issue 2752483002: Search the entire subtree when looking for the end of an inline continuation chain. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-div-in-anchor-and-img-crash.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 LinesBoundingBoxGeneratorContext context(floatResult); 1133 LinesBoundingBoxGeneratorContext context(floatResult);
1134 1134
1135 LayoutInline* endContinuation = inlineElementContinuation(); 1135 LayoutInline* endContinuation = inlineElementContinuation();
1136 while (LayoutInline* nextContinuation = 1136 while (LayoutInline* nextContinuation =
1137 endContinuation->inlineElementContinuation()) 1137 endContinuation->inlineElementContinuation())
1138 endContinuation = nextContinuation; 1138 endContinuation = nextContinuation;
1139 1139
1140 for (LayoutBlock* currBlock = containingBlock(); 1140 for (LayoutBlock* currBlock = containingBlock();
1141 currBlock && currBlock->isAnonymousBlock(); 1141 currBlock && currBlock->isAnonymousBlock();
1142 currBlock = toLayoutBlock(currBlock->nextSibling())) { 1142 currBlock = toLayoutBlock(currBlock->nextSibling())) {
1143 bool walkChildrenOnly = !currBlock->childrenInline();
1143 for (LayoutObject* curr = currBlock->firstChild(); curr; 1144 for (LayoutObject* curr = currBlock->firstChild(); curr;
1144 curr = curr->nextSibling()) { 1145 curr = curr->nextSibling()) {
1145 LayoutRect rect(curr->localVisualRect()); 1146 LayoutRect rect(curr->localVisualRect());
1146 context(FloatRect(rect)); 1147 context(FloatRect(rect));
1147 if (curr == endContinuation) { 1148 if (walkChildrenOnly)
1149 continue;
1150 for (LayoutObject* walker = curr; walker;
1151 walker = walker->nextInPreOrder(curr)) {
1152 if (walker != endContinuation)
1153 continue;
1148 LayoutRect rect(enclosingIntRect(floatResult)); 1154 LayoutRect rect(enclosingIntRect(floatResult));
1149 mapToVisualRectInAncestorSpace(view(), rect); 1155 mapToVisualRectInAncestorSpace(view(), rect);
1150 return rect; 1156 return rect;
1151 } 1157 }
1152 } 1158 }
1153 } 1159 }
1154 return LayoutRect(); 1160 return LayoutRect();
1155 } 1161 }
1156 1162
1157 LayoutRect LayoutInline::localVisualRect() const { 1163 LayoutRect LayoutInline::localVisualRect() const {
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); 1534 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason);
1529 } 1535 }
1530 1536
1531 // TODO(lunalu): Not to just dump 0, 0 as the x and y here 1537 // TODO(lunalu): Not to just dump 0, 0 as the x and y here
1532 LayoutRect LayoutInline::debugRect() const { 1538 LayoutRect LayoutInline::debugRect() const {
1533 IntRect linesBox = enclosingIntRect(linesBoundingBox()); 1539 IntRect linesBox = enclosingIntRect(linesBoundingBox());
1534 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); 1540 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height()));
1535 } 1541 }
1536 1542
1537 } // namespace blink 1543 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/spatial-navigation/snav-div-in-anchor-and-img-crash.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698