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

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

Issue 2769703003: 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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 LinesBoundingBoxGeneratorContext context(floatResult); 1134 LinesBoundingBoxGeneratorContext context(floatResult);
1135 1135
1136 LayoutInline* endContinuation = inlineElementContinuation(); 1136 LayoutInline* endContinuation = inlineElementContinuation();
1137 while (LayoutInline* nextContinuation = 1137 while (LayoutInline* nextContinuation =
1138 endContinuation->inlineElementContinuation()) 1138 endContinuation->inlineElementContinuation())
1139 endContinuation = nextContinuation; 1139 endContinuation = nextContinuation;
1140 1140
1141 for (LayoutBlock* currBlock = containingBlock(); 1141 for (LayoutBlock* currBlock = containingBlock();
1142 currBlock && currBlock->isAnonymousBlock(); 1142 currBlock && currBlock->isAnonymousBlock();
1143 currBlock = toLayoutBlock(currBlock->nextSibling())) { 1143 currBlock = toLayoutBlock(currBlock->nextSibling())) {
1144 bool walkChildrenOnly = !currBlock->childrenInline();
1144 for (LayoutObject* curr = currBlock->firstChild(); curr; 1145 for (LayoutObject* curr = currBlock->firstChild(); curr;
1145 curr = curr->nextSibling()) { 1146 curr = curr->nextSibling()) {
1146 LayoutRect rect(curr->localVisualRect()); 1147 LayoutRect rect(curr->localVisualRect());
1147 context(FloatRect(rect)); 1148 context(FloatRect(rect));
1148 if (curr == endContinuation) { 1149 if (walkChildrenOnly)
1150 continue;
1151 for (LayoutObject* walker = curr; walker;
1152 walker = walker->nextInPreOrder(curr)) {
1153 if (walker != endContinuation)
1154 continue;
1149 LayoutRect rect(enclosingIntRect(floatResult)); 1155 LayoutRect rect(enclosingIntRect(floatResult));
1150 mapToVisualRectInAncestorSpace(view(), rect); 1156 mapToVisualRectInAncestorSpace(view(), rect);
1151 return rect; 1157 return rect;
1152 } 1158 }
1153 } 1159 }
1154 } 1160 }
1155 return LayoutRect(); 1161 return LayoutRect();
1156 } 1162 }
1157 1163
1158 LayoutRect LayoutInline::localVisualRect() const { 1164 LayoutRect LayoutInline::localVisualRect() const {
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); 1524 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason);
1519 } 1525 }
1520 1526
1521 // TODO(lunalu): Not to just dump 0, 0 as the x and y here 1527 // TODO(lunalu): Not to just dump 0, 0 as the x and y here
1522 LayoutRect LayoutInline::debugRect() const { 1528 LayoutRect LayoutInline::debugRect() const {
1523 IntRect linesBox = enclosingIntRect(linesBoundingBox()); 1529 IntRect linesBox = enclosingIntRect(linesBoundingBox());
1524 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); 1530 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height()));
1525 } 1531 }
1526 1532
1527 } // namespace blink 1533 } // 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