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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2595833002: Replaced usages of WritingMode to use inline utility functions instead (Closed)
Patch Set: Rebase and fixed ::blink with just blink:: Created 4 years 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: third_party/WebKit/Source/core/layout/LayoutBox.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
index fb3c6cb78c8784e627960e94620930bb96a59171..66b2663d093aa85f160b992fc013db6dec67e8e5 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -5073,8 +5073,8 @@ LayoutRect LayoutBox::visualOverflowRectForPropagation(
// We are putting ourselves into our parent's coordinate space. If there is a
// flipped block mismatch in a particular axis, then we have to flip the rect
// along that axis.
- if (style()->getWritingMode() == RightToLeftWritingMode ||
- parentStyle.getWritingMode() == RightToLeftWritingMode)
+ if (isFlippedBlocksWritingMode(style()->getWritingMode()) ||
+ isFlippedBlocksWritingMode(parentStyle.getWritingMode()))
rect.setX(size().width() - rect.maxX());
return rect;
@@ -5129,8 +5129,8 @@ LayoutRect LayoutBox::layoutOverflowRectForPropagation(
// We are putting ourselves into our parent's coordinate space. If there is a
// flipped block mismatch in a particular axis, then we have to flip the rect
// along that axis.
- if (style()->getWritingMode() == RightToLeftWritingMode ||
- parentStyle.getWritingMode() == RightToLeftWritingMode)
+ if (isFlippedBlocksWritingMode(style()->getWritingMode()) ||
+ isFlippedBlocksWritingMode(parentStyle.getWritingMode()))
rect.setX(size().width() - rect.maxX());
return rect;
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperty.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698