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

Unified Diff: third_party/WebKit/Source/core/css/CSSProperty.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSProperty.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSProperty.cpp b/third_party/WebKit/Source/core/css/CSSProperty.cpp
index 69452b0b07994110da6302901398e2fb0b16692c..7df3a339fcde3b31340774841b6e440c1a5c4626 100644
--- a/third_party/WebKit/Source/core/css/CSSProperty.cpp
+++ b/third_party/WebKit/Source/core/css/CSSProperty.cpp
@@ -54,13 +54,13 @@ static CSSPropertyID resolveToPhysicalProperty(
LogicalBoxSide logicalSide,
const StylePropertyShorthand& shorthand) {
if (direction == TextDirection::Ltr) {
- if (writingMode == TopToBottomWritingMode) {
+ if (isHorizontalWritingMode(writingMode)) {
// The common case. The logical and physical box sides match.
// Left = Start, Right = End, Before = Top, After = Bottom
return shorthand.properties()[logicalSide];
}
- if (writingMode == LeftToRightWritingMode) {
+ if (isFlippedLinesWritingMode(writingMode)) {
// Start = Top, End = Bottom, Before = Left, After = Right.
switch (logicalSide) {
case StartSide:
@@ -87,7 +87,7 @@ static CSSPropertyID resolveToPhysicalProperty(
}
}
- if (writingMode == TopToBottomWritingMode) {
+ if (isHorizontalWritingMode(writingMode)) {
// Start = Right, End = Left, Before = Top, After = Bottom
switch (logicalSide) {
case StartSide:
@@ -101,7 +101,7 @@ static CSSPropertyID resolveToPhysicalProperty(
}
}
- if (writingMode == LeftToRightWritingMode) {
+ if (isFlippedLinesWritingMode(writingMode)) {
// Start = Bottom, End = Top, Before = Left, After = Right
switch (logicalSide) {
case StartSide:
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698