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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2775573002: Generate keyword part of vertical-align property in ComputedStyleBase. (Closed)
Patch Set: Rebase Created 3 years, 9 months 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
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 8ac1b923640bc205a75d9ea9873e4fcfe32fb334..8fc530ad0bb2778b72e8186c3cfbeb31eb9df51f 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -205,16 +205,13 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// don't inherit
struct NonInheritedData {
- NonInheritedData()
- : m_verticalAlign(static_cast<unsigned>(initialVerticalAlign())),
- m_hasViewportUnits(false),
- m_hasRemUnits(false) {}
+ NonInheritedData() : m_hasViewportUnits(false), m_hasRemUnits(false) {}
// Compare computed styles, differences in inherited bits or other flags
// should not cause an inequality.
bool operator==(const NonInheritedData& other) const {
// Generated properties are compared in ComputedStyleBase
- return m_verticalAlign == other.m_verticalAlign;
+ return true;
// Differences in the following fields do not cause inequality:
// hasViewportUnits
// styleType
@@ -234,8 +231,6 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
return !(*this == other);
}
- unsigned m_verticalAlign : 4; // EVerticalAlign
-
// This is set if we used viewport units when resolving a length.
// It is mutable so we can pass around const ComputedStyles to resolve
// lengths.
@@ -1676,13 +1671,13 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
return EVerticalAlign::kBaseline;
}
EVerticalAlign verticalAlign() const {
- return static_cast<EVerticalAlign>(m_nonInheritedData.m_verticalAlign);
+ return static_cast<EVerticalAlign>(m_verticalAlign);
}
const Length& getVerticalAlignLength() const {
return m_box->verticalAlign();
}
void setVerticalAlign(EVerticalAlign v) {
- m_nonInheritedData.m_verticalAlign = static_cast<unsigned>(v);
+ m_verticalAlign = static_cast<unsigned>(v);
}
void setVerticalAlignLength(const Length& length) {
setVerticalAlign(EVerticalAlign::kLength);

Powered by Google App Engine
This is Rietveld 408576698