Index: Source/core/css/CSSPrimitiveValue.h |
diff --git a/Source/core/css/CSSPrimitiveValue.h b/Source/core/css/CSSPrimitiveValue.h |
index e17640e80ff619559fb69865c03262298119d478..04fd6cee163e94f3386b83d6263e36a4c5532bdb 100644 |
--- a/Source/core/css/CSSPrimitiveValue.h |
+++ b/Source/core/css/CSSPrimitiveValue.h |
@@ -108,6 +108,11 @@ public: |
String, |
PropertyID, |
ValueID, |
+ |
Timothy Loh
2015/09/02 01:59:03
Should probably mention that this is non-standard
sashab
2015/09/02 03:54:49
Done.
|
+ // This value is used to handle quirky margins in reflow roots (body, td, and th) like WinIE. |
+ // The basic idea is that a stylesheet can use the value __qem (for quirky em) instead of em. |
+ // When the quirky value is used, if you're in quirks mode, the margin will collapse away |
+ // inside a table cell. |
QuirkyEms, |
}; |
@@ -160,16 +165,18 @@ public: |
bool isCustomIdent() const { return type() == UnitType::CustomIdentifier; } |
bool isFontRelativeLength() const |
{ |
- return type() == UnitType::Ems |
+ return type() == UnitType::QuirkyEms |
+ || type() == UnitType::Ems |
|| type() == UnitType::Exs |
|| type() == UnitType::Rems |
|| type() == UnitType::Chs; |
} |
+ bool isQuirkValue() const { return type() == UnitType::QuirkyEms; } |
Timothy Loh
2015/09/02 01:59:03
isQuirkyEms?
sashab
2015/09/02 03:54:49
Done.
|
bool isViewportPercentageLength() const { return isViewportPercentageLength(type()); } |
static bool isViewportPercentageLength(UnitType type) { return type >= UnitType::ViewportWidth && type <= UnitType::ViewportMax; } |
static bool isLength(UnitType type) |
{ |
- return (type >= UnitType::Ems && type <= UnitType::Picas) || type == UnitType::Rems || type == UnitType::Chs || isViewportPercentageLength(type); |
+ return (type >= UnitType::Ems && type <= UnitType::Picas) || type == UnitType::QuirkyEms || type == UnitType::Rems || type == UnitType::Chs || isViewportPercentageLength(type); |
} |
bool isLength() const { return isLength(typeWithCalcResolved()); } |
bool isNumber() const { return typeWithCalcResolved() == UnitType::Number || typeWithCalcResolved() == UnitType::Integer; } |
@@ -221,17 +228,6 @@ public: |
return adoptRefWillBeNoop(new CSSPrimitiveValue(value)); |
} |
- // This value is used to handle quirky margins in reflow roots (body, td, and th) like WinIE. |
- // The basic idea is that a stylesheet can use the value __qem (for quirky em) instead of em. |
- // When the quirky value is used, if you're in quirks mode, the margin will collapse away |
- // inside a table cell. |
- static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createAllowingMarginQuirk(double value, UnitType type) |
- { |
- CSSPrimitiveValue* quirkValue = new CSSPrimitiveValue(value, type); |
- quirkValue->m_isQuirkValue = true; |
- return adoptRefWillBeNoop(quirkValue); |
- } |
- |
~CSSPrimitiveValue(); |
void cleanup(); |
@@ -266,8 +262,6 @@ public: |
static const char* unitTypeToString(UnitType); |
String customCSSText() const; |
- bool isQuirkValue() const { return m_isQuirkValue; } |
- |
bool equals(const CSSPrimitiveValue&) const; |
DECLARE_TRACE_AFTER_DISPATCH(); |