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

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

Issue 2672693002: Moved display property to be generated 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 590d3aed4ac953fc8d084289c0208589ff9502ae..c5478dda4d1dddbe2fa7cd5a7fabecbe71e03baf 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -206,8 +206,7 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// don't inherit
struct NonInheritedData {
NonInheritedData()
- : m_effectiveDisplay(static_cast<unsigned>(initialDisplay())),
- m_originalDisplay(static_cast<unsigned>(initialDisplay())),
+ : m_originalDisplay(static_cast<unsigned>(initialDisplay())),
m_verticalAlign(static_cast<unsigned>(initialVerticalAlign())),
m_hasViewportUnits(false),
m_hasRemUnits(false) {}
@@ -216,8 +215,7 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// should not cause an inequality.
bool operator==(const NonInheritedData& other) const {
// Generated properties are compared in ComputedStyleBase
- return m_effectiveDisplay == other.m_effectiveDisplay &&
- m_originalDisplay == other.m_originalDisplay &&
+ return m_originalDisplay == other.m_originalDisplay &&
m_verticalAlign == other.m_verticalAlign;
// Differences in the following fields do not cause inequality:
// hasViewportUnits
@@ -238,7 +236,6 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
return !(*this == other);
}
- unsigned m_effectiveDisplay : 5; // EDisplay
unsigned m_originalDisplay : 5; // EDisplay
unsigned m_verticalAlign : 4; // EVerticalAlign
@@ -803,16 +800,9 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
void setContent(ContentData*);
// display
- static EDisplay initialDisplay() { return EDisplay::kInline; }
- EDisplay display() const {
- return static_cast<EDisplay>(m_nonInheritedData.m_effectiveDisplay);
- }
EDisplay originalDisplay() const {
return static_cast<EDisplay>(m_nonInheritedData.m_originalDisplay);
}
- void setDisplay(EDisplay v) {
- m_nonInheritedData.m_effectiveDisplay = static_cast<unsigned>(v);
- }
void setOriginalDisplay(EDisplay v) {
m_nonInheritedData.m_originalDisplay = static_cast<unsigned>(v);
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSValueIDMappings.h ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698