summaryrefslogtreecommitdiffstats
path: root/WebCore/rendering/style/RenderStyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/rendering/style/RenderStyle.cpp')
-rw-r--r--WebCore/rendering/style/RenderStyle.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/WebCore/rendering/style/RenderStyle.cpp b/WebCore/rendering/style/RenderStyle.cpp
index ec77367..a6e7d59 100644
--- a/WebCore/rendering/style/RenderStyle.cpp
+++ b/WebCore/rendering/style/RenderStyle.cpp
@@ -463,6 +463,10 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
if (inherited_flags.m_writingMode != other->inherited_flags.m_writingMode)
return StyleDifferenceLayout;
+ // Check text combine mode.
+ if (rareNonInheritedData->m_textCombine != other->rareNonInheritedData->m_textCombine)
+ return StyleDifferenceLayout;
+
// Overflow returns a layout hint.
if (noninherited_flags._overflowX != other->noninherited_flags._overflowX ||
noninherited_flags._overflowY != other->noninherited_flags._overflowY)
@@ -1144,6 +1148,52 @@ Length RenderStyle::logicalMaxHeight() const
return maxWidth();
}
+const BorderValue& RenderStyle::borderBefore() const
+{
+ switch (writingMode()) {
+ case TopToBottomWritingMode:
+ return borderTop();
+ case BottomToTopWritingMode:
+ return borderBottom();
+ case LeftToRightWritingMode:
+ return borderLeft();
+ case RightToLeftWritingMode:
+ return borderRight();
+ }
+ ASSERT_NOT_REACHED();
+ return borderTop();
+}
+
+const BorderValue& RenderStyle::borderAfter() const
+{
+ switch (writingMode()) {
+ case TopToBottomWritingMode:
+ return borderBottom();
+ case BottomToTopWritingMode:
+ return borderTop();
+ case LeftToRightWritingMode:
+ return borderRight();
+ case RightToLeftWritingMode:
+ return borderLeft();
+ }
+ ASSERT_NOT_REACHED();
+ return borderBottom();
+}
+
+const BorderValue& RenderStyle::borderStart() const
+{
+ if (isHorizontalWritingMode())
+ return isLeftToRightDirection() ? borderLeft() : borderRight();
+ return isLeftToRightDirection() ? borderTop() : borderBottom();
+}
+
+const BorderValue& RenderStyle::borderEnd() const
+{
+ if (isHorizontalWritingMode())
+ return isLeftToRightDirection() ? borderRight() : borderLeft();
+ return isLeftToRightDirection() ? borderBottom() : borderTop();
+}
+
unsigned short RenderStyle::borderBeforeWidth() const
{
switch (writingMode()) {