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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutTableCell.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/LayoutTableCell.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
index 31c3bfb84592f04558f1d5be7fbb92bca35e448e..43b900803256831f1519017d9cd7383dcedb7225 100644
--- a/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutTableCell.cpp
@@ -335,7 +335,7 @@ void LayoutTableCell::layout() {
LayoutUnit LayoutTableCell::paddingTop() const {
LayoutUnit result = computedCSSPaddingTop();
if (isHorizontalWritingMode())
- result += (style()->getWritingMode() == TopToBottomWritingMode
+ result += (blink::isHorizontalWritingMode(style()->getWritingMode())
? intrinsicPaddingBefore()
: intrinsicPaddingAfter());
// TODO(leviw): The floor call should be removed when Table is sub-pixel
@@ -346,7 +346,7 @@ LayoutUnit LayoutTableCell::paddingTop() const {
LayoutUnit LayoutTableCell::paddingBottom() const {
LayoutUnit result = computedCSSPaddingBottom();
if (isHorizontalWritingMode())
- result += (style()->getWritingMode() == TopToBottomWritingMode
+ result += (blink::isHorizontalWritingMode(style()->getWritingMode())
? intrinsicPaddingAfter()
: intrinsicPaddingBefore());
// TODO(leviw): The floor call should be removed when Table is sub-pixel
@@ -357,7 +357,7 @@ LayoutUnit LayoutTableCell::paddingBottom() const {
LayoutUnit LayoutTableCell::paddingLeft() const {
LayoutUnit result = computedCSSPaddingLeft();
if (!isHorizontalWritingMode())
- result += (style()->getWritingMode() == LeftToRightWritingMode
+ result += (isFlippedLinesWritingMode(style()->getWritingMode())
? intrinsicPaddingBefore()
: intrinsicPaddingAfter());
// TODO(leviw): The floor call should be removed when Table is sub-pixel
@@ -368,7 +368,7 @@ LayoutUnit LayoutTableCell::paddingLeft() const {
LayoutUnit LayoutTableCell::paddingRight() const {
LayoutUnit result = computedCSSPaddingRight();
if (!isHorizontalWritingMode())
- result += (style()->getWritingMode() == LeftToRightWritingMode
+ result += (isFlippedLinesWritingMode(style()->getWritingMode())
? intrinsicPaddingAfter()
: intrinsicPaddingBefore());
// TODO(leviw): The floor call should be removed when Table is sub-pixel
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutVTTCue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698