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

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

Issue 1183863003: Remove enclosingLayoutRect calls per FIXME. These are hot in profiles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove some toFloat calls (and subsequent reverse conversions), per szager 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
« no previous file with comments | « no previous file | Source/core/layout/line/InlineFlowBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/InlineFlowBox.h
diff --git a/Source/core/layout/line/InlineFlowBox.h b/Source/core/layout/line/InlineFlowBox.h
index 9b8842439d53a48908aea2119a0f395c78504464..405630c34936df8c15c5d4f3288d272ddcfd8332 100644
--- a/Source/core/layout/line/InlineFlowBox.h
+++ b/Source/core/layout/line/InlineFlowBox.h
@@ -215,9 +215,7 @@ public:
// respectively are flipped when compared to their physical counterparts. For example minX is on the left in vertical-lr, but it is on the right in vertical-rl.
LayoutRect layoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
{
- // FIXME: the call to enclosingLayoutRect() below is temporary and should be removed once
- // the transition to LayoutUnit-based types is complete (crbug.com/321237)
- return m_overflow ? m_overflow->layoutOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
+ return m_overflow ? m_overflow->layoutOverflowRect() : frameRectIncludingLineHeight(lineTop, lineBottom);
}
LayoutUnit logicalTopLayoutOverflow(LayoutUnit lineTop) const
{
@@ -241,9 +239,7 @@ public:
LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const
{
- // FIXME: the call to enclosingLayoutRect() below is temporary and should be removed once
- // the transition to LayoutUnit-based types is complete (crbug.com/321237)
- return m_overflow ? m_overflow->visualOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom));
+ return m_overflow ? m_overflow->visualOverflowRect() : frameRectIncludingLineHeight(lineTop, lineBottom);
}
LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->visualOverflowRect().x() : m_overflow->visualOverflowRect().y()) : logicalLeft(); }
LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow->visualOverflowRect().maxX() : m_overflow->visualOverflowRect().maxY()) : static_cast<LayoutUnit>(logicalRight().ceil()); }
@@ -272,13 +268,13 @@ public:
LayoutRect frameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineBottom) const
{
if (isHorizontal())
- return LayoutRect(m_topLeft.x(), lineTop.toFloat(), width(), (lineBottom - lineTop).toFloat());
- return LayoutRect(lineTop.toFloat(), m_topLeft.y(), (lineBottom - lineTop).toFloat(), height());
+ return LayoutRect(m_topLeft.x(), lineTop, width(), lineBottom - lineTop);
+ return LayoutRect(lineTop, m_topLeft.y(), lineBottom - lineTop, height());
}
LayoutRect logicalFrameRectIncludingLineHeight(LayoutUnit lineTop, LayoutUnit lineBottom) const
{
- return LayoutRect(logicalLeft(), lineTop.toFloat(), logicalWidth(), (lineBottom - lineTop).toFloat());
+ return LayoutRect(logicalLeft(), lineTop, logicalWidth(), lineBottom - lineTop);
}
bool descendantsHaveSameLineHeightAndBaseline() const { return m_descendantsHaveSameLineHeightAndBaseline; }
« no previous file with comments | « no previous file | Source/core/layout/line/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698