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

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

Issue 1202413003: SP: Optimize calculating cull rects for inline text and ellipsis boxes. (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
« no previous file with comments | « Source/core/layout/line/InlineBox.h ('k') | Source/core/paint/EllipsisBoxPainter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/InlineBox.cpp
diff --git a/Source/core/layout/line/InlineBox.cpp b/Source/core/layout/line/InlineBox.cpp
index d7cb47418729a2d809bb6b6f8b283e7b3a6a9461..470255cf14648934798752173eea32f6ffd910c3 100644
--- a/Source/core/layout/line/InlineBox.cpp
+++ b/Source/core/layout/line/InlineBox.cpp
@@ -341,14 +341,16 @@ LayoutPoint InlineBox::logicalPositionToPhysicalPoint(const LayoutPoint& point,
return LayoutPoint(block.size().width() - size.width() - point.x(), point.y());
}
-LayoutRect InlineBox::logicalRectToPhysicalRect(const LayoutRect& current)
+void InlineBox::logicalRectToPhysicalRect(LayoutRect& current)
{
- LayoutRect retval = current;
+ if (isHorizontal() && !layoutObject().hasFlippedBlocksWritingMode())
+ return;
+
if (!isHorizontal()) {
- retval = retval.transposedRect();
+ current = current.transposedRect();
}
- retval.setLocation(logicalPositionToPhysicalPoint(retval.location(), retval.size()));
- return retval;
+ current.setLocation(logicalPositionToPhysicalPoint(current.location(), current.size()));
+ return;
wkorman 2015/06/24 00:45:53 don't need return
}
void InlineBox::flipForWritingMode(FloatRect& rect)
« no previous file with comments | « Source/core/layout/line/InlineBox.h ('k') | Source/core/paint/EllipsisBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698