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

Unified Diff: Source/core/layout/line/InlineFlowBox.cpp

Issue 1183863003: Remove enclosingLayoutRect calls per FIXME. These are hot in profiles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/line/InlineFlowBox.cpp
diff --git a/Source/core/layout/line/InlineFlowBox.cpp b/Source/core/layout/line/InlineFlowBox.cpp
index 22885f2f095fe728d8b028bf7dc92e35bf8ca815..10d7f19555267c6da5927434bd0842d31a579f85 100644
--- a/Source/core/layout/line/InlineFlowBox.cpp
+++ b/Source/core/layout/line/InlineFlowBox.cpp
@@ -897,9 +897,7 @@ void InlineFlowBox::computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, G
// Visual overflow just includes overflow for stuff we need to issues paint invalidations for ourselves. Self-painting layers are ignored.
// Layout overflow is used to determine scrolling extent, so it still includes child layers and also factors in
// transforms, relative positioning, etc.
- // FIXME: the call to enclosingLayoutRect() below is temporary and should be removed once
- // the transition to LayoutUnit-based types is complete (crbug.com/321237)
- LayoutRect logicalLayoutOverflow(enclosingLayoutRect(logicalFrameRectIncludingLineHeight(lineTop, lineBottom)));
+ LayoutRect logicalLayoutOverflow(logicalFrameRectIncludingLineHeight(lineTop, lineBottom));
LayoutRect logicalVisualOverflow(logicalLayoutOverflow);
addBoxShadowVisualOverflow(logicalVisualOverflow);
@@ -915,9 +913,7 @@ void InlineFlowBox::computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, G
LayoutText& rt = text->layoutObject();
if (rt.isBR())
continue;
- // FIXME: the call to enclosingLayoutRect() below is temporary and should be removed once
- // the transition to LayoutUnit-based types is complete (crbug.com/321237)
- LayoutRect textBoxOverflow(enclosingLayoutRect(text->logicalFrameRect()));
+ LayoutRect textBoxOverflow(text->logicalFrameRect());
addTextBoxVisualOverflow(text, textBoxDataMap, textBoxOverflow);
logicalVisualOverflow.unite(textBoxOverflow);
} else if (curr->layoutObject().isLayoutInline()) {
@@ -960,9 +956,7 @@ void InlineFlowBox::setVisualOverflow(const LayoutRect& rect, const LayoutRect&
void InlineFlowBox::setOverflowFromLogicalRects(const LayoutRect& logicalLayoutOverflow, const LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom)
{
- // FIXME: the call to enclosingLayoutRect() below is temporary and should be removed once
- // the transition to LayoutUnit-based types is complete (crbug.com/321237)
- LayoutRect frameBox = enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
+ LayoutRect frameBox = frameRectIncludingLineHeight(lineTop, lineBottom);
LayoutRect layoutOverflow(isHorizontal() ? logicalLayoutOverflow : logicalLayoutOverflow.transposedRect());
setLayoutOverflow(layoutOverflow, frameBox);

Powered by Google App Engine
This is Rietveld 408576698