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

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

Issue 2465983002: Rename "paint invalidation rect" etc. to "visual rect". (Closed)
Patch Set: - Created 4 years, 1 month 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
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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 LayoutUnit logicalHeight = 1112 LayoutUnit logicalHeight =
1113 lastLineBox()->logicalBottomVisualOverflow(lastRootBox.lineBottom()) - 1113 lastLineBox()->logicalBottomVisualOverflow(lastRootBox.lineBottom()) -
1114 logicalTop; 1114 logicalTop;
1115 1115
1116 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight); 1116 LayoutRect rect(logicalLeftSide, logicalTop, logicalWidth, logicalHeight);
1117 if (!style()->isHorizontalWritingMode()) 1117 if (!style()->isHorizontalWritingMode())
1118 rect = rect.transposedRect(); 1118 rect = rect.transposedRect();
1119 return rect; 1119 return rect;
1120 } 1120 }
1121 1121
1122 LayoutRect LayoutInline::absoluteClippedOverflowRect() const { 1122 LayoutRect LayoutInline::absoluteVisualRect() const {
1123 if (!continuation()) { 1123 if (!continuation()) {
1124 LayoutRect rect = visualOverflowRect(); 1124 LayoutRect rect = visualOverflowRect();
1125 mapToVisualRectInAncestorSpace(view(), rect); 1125 mapToVisualRectInAncestorSpace(view(), rect);
1126 return rect; 1126 return rect;
1127 } 1127 }
1128 1128
1129 FloatRect floatResult; 1129 FloatRect floatResult;
1130 LinesBoundingBoxGeneratorContext context(floatResult); 1130 LinesBoundingBoxGeneratorContext context(floatResult);
1131 1131
1132 LayoutInline* endContinuation = inlineElementContinuation(); 1132 LayoutInline* endContinuation = inlineElementContinuation();
1133 while (LayoutInline* nextContinuation = 1133 while (LayoutInline* nextContinuation =
1134 endContinuation->inlineElementContinuation()) 1134 endContinuation->inlineElementContinuation())
1135 endContinuation = nextContinuation; 1135 endContinuation = nextContinuation;
1136 1136
1137 for (LayoutBlock* currBlock = containingBlock(); 1137 for (LayoutBlock* currBlock = containingBlock();
1138 currBlock && currBlock->isAnonymousBlock(); 1138 currBlock && currBlock->isAnonymousBlock();
1139 currBlock = toLayoutBlock(currBlock->nextSibling())) { 1139 currBlock = toLayoutBlock(currBlock->nextSibling())) {
1140 for (LayoutObject* curr = currBlock->firstChild(); curr; 1140 for (LayoutObject* curr = currBlock->firstChild(); curr;
1141 curr = curr->nextSibling()) { 1141 curr = curr->nextSibling()) {
1142 LayoutRect rect(curr->localOverflowRectForPaintInvalidation()); 1142 LayoutRect rect(curr->localVisualRect());
1143 context(FloatRect(rect)); 1143 context(FloatRect(rect));
1144 if (curr == endContinuation) { 1144 if (curr == endContinuation) {
1145 LayoutRect rect(enclosingIntRect(floatResult)); 1145 LayoutRect rect(enclosingIntRect(floatResult));
1146 mapToVisualRectInAncestorSpace(view(), rect); 1146 mapToVisualRectInAncestorSpace(view(), rect);
1147 return rect; 1147 return rect;
1148 } 1148 }
1149 } 1149 }
1150 } 1150 }
1151 return LayoutRect(); 1151 return LayoutRect();
1152 } 1152 }
1153 1153
1154 LayoutRect LayoutInline::localOverflowRectForPaintInvalidation() const { 1154 LayoutRect LayoutInline::localVisualRect() const {
1155 // If we don't create line boxes, we don't have any invalidations to do. 1155 // If we don't create line boxes, we don't have any invalidations to do.
1156 if (!alwaysCreateLineBoxes()) 1156 if (!alwaysCreateLineBoxes())
1157 return LayoutRect(); 1157 return LayoutRect();
1158 1158
1159 if (style()->visibility() != EVisibility::Visible) 1159 if (style()->visibility() != EVisibility::Visible)
1160 return LayoutRect(); 1160 return LayoutRect();
1161 1161
1162 return visualOverflowRect(); 1162 return visualOverflowRect();
1163 } 1163 }
1164 1164
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); 1514 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason);
1515 } 1515 }
1516 1516
1517 // TODO(lunalu): Not to just dump 0, 0 as the x and y here 1517 // TODO(lunalu): Not to just dump 0, 0 as the x and y here
1518 LayoutRect LayoutInline::debugRect() const { 1518 LayoutRect LayoutInline::debugRect() const {
1519 IntRect linesBox = enclosingIntRect(linesBoundingBox()); 1519 IntRect linesBox = enclosingIntRect(linesBoundingBox());
1520 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); 1520 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height()));
1521 } 1521 }
1522 1522
1523 } // namespace blink 1523 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutInline.h ('k') | third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698