Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp |
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
index 3e9803db0154062993c53218c7e93b3124928e05..87e9ca7c3b3392677cf162bc90238ce02b83bedf 100644 |
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
@@ -2125,6 +2125,44 @@ float ComputedStyle::BorderUnderWidth() const { |
return IsHorizontalWritingMode() ? BorderBottomWidth() : BorderLeftWidth(); |
} |
+EBorderStyle ComputedStyle::BorderBeforeStyle() const { |
+ switch (GetWritingMode()) { |
+ case WritingMode::kHorizontalTb: |
+ return BorderTopStyle(); |
+ case WritingMode::kVerticalLr: |
+ return BorderLeftStyle(); |
+ case WritingMode::kVerticalRl: |
+ return BorderRightStyle(); |
+ } |
+ NOTREACHED(); |
+ return BorderTopStyle(); |
+} |
+ |
+EBorderStyle ComputedStyle::BorderAfterStyle() const { |
+ switch (GetWritingMode()) { |
+ case WritingMode::kHorizontalTb: |
+ return BorderBottomStyle(); |
+ case WritingMode::kVerticalLr: |
+ return BorderRightStyle(); |
+ case WritingMode::kVerticalRl: |
+ return BorderLeftStyle(); |
+ } |
+ NOTREACHED(); |
+ return BorderBottomStyle(); |
+} |
+ |
+EBorderStyle ComputedStyle::BorderStartStyle() const { |
+ if (IsHorizontalWritingMode()) |
+ return IsLeftToRightDirection() ? BorderLeftStyle() : BorderRightStyle(); |
+ return IsLeftToRightDirection() ? BorderTopStyle() : BorderBottomStyle(); |
+} |
+ |
+EBorderStyle ComputedStyle::BorderEndStyle() const { |
+ if (IsHorizontalWritingMode()) |
+ return IsLeftToRightDirection() ? BorderRightStyle() : BorderLeftStyle(); |
+ return IsLeftToRightDirection() ? BorderBottomStyle() : BorderTopStyle(); |
+} |
+ |
void ComputedStyle::SetMarginStart(const Length& margin) { |
if (IsHorizontalWritingMode()) { |
if (IsLeftToRightDirection()) |