diff options
author | Leon Clarke <leonclarke@google.com> | 2010-07-15 12:03:35 +0100 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-07-20 16:57:23 +0100 |
commit | e458d70a0d18538346f41b503114c9ebe6b2ce12 (patch) | |
tree | 86f1637deca2c524432a822e5fcedd4bef221091 /WebCore/css/CSSProperty.cpp | |
parent | f43eabc081f7ce6af24b9df4953498a3cd6ca24d (diff) | |
download | external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.zip external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.gz external_webkit-e458d70a0d18538346f41b503114c9ebe6b2ce12.tar.bz2 |
Merge WebKit at r63173 : Initial merge by git.
Change-Id: Ife5af0c7c6261fbbc8ae6bc08c390efa9ef10b44
Diffstat (limited to 'WebCore/css/CSSProperty.cpp')
-rw-r--r-- | WebCore/css/CSSProperty.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/WebCore/css/CSSProperty.cpp b/WebCore/css/CSSProperty.cpp index d7f2175..777c0c0 100644 --- a/WebCore/css/CSSProperty.cpp +++ b/WebCore/css/CSSProperty.cpp @@ -38,4 +38,20 @@ bool operator==(const CSSProperty& a, const CSSProperty& b) return a.m_id == b.m_id && a.m_important == b.m_important && a.m_value == b.m_value; } +int CSSProperty::resolveDirectionAwareProperty(int propertyID, TextDirection direction) +{ + switch (static_cast<CSSPropertyID>(propertyID)) { + case CSSPropertyWebkitMarginEnd: + return direction == LTR ? CSSPropertyMarginRight : CSSPropertyMarginLeft; + case CSSPropertyWebkitMarginStart: + return direction == LTR ? CSSPropertyMarginLeft : CSSPropertyMarginRight; + case CSSPropertyWebkitPaddingEnd: + return direction == LTR ? CSSPropertyPaddingRight : CSSPropertyPaddingLeft; + case CSSPropertyWebkitPaddingStart: + return direction == LTR ? CSSPropertyPaddingLeft : CSSPropertyPaddingRight; + default: + return propertyID; + } +} + } // namespace WebCore |