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

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

Issue 2828253004: DO NOT LAND. Revert of https://codereview.chromium.org/2797963002 (Closed)
Patch Set: simplify Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 acf2ae1901a900af59bd9a9abeb7ef82bc6c5211..9f284a77258da32ab2f5188a9bb34e4f1b026980 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -200,6 +200,19 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
DataRef<SVGComputedStyle> svg_style_;
+ // !START SYNC!: Keep this in sync with the copy constructor in
+ // ComputedStyle.cpp.
+
+ // don't inherit
+ struct NonInheritedData {
+ NonInheritedData() : m_hasViewportUnits(false) {}
+
+ // These are set if we used viewport or rem units when resolving a length.
+ unsigned m_hasViewportUnits : 1;
+ } m_nonInheritedData;
+
+ // !END SYNC!
+
private:
// TODO(sashab): Move these private members to the bottom of ComputedStyle.
ALWAYS_INLINE ComputedStyle();
@@ -2307,6 +2320,14 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
void AddCallbackSelector(const String& selector);
// Non-property flags.
+ bool HasViewportUnits() const {
+ return m_nonInheritedData.m_hasViewportUnits;
+ }
+ // TODO(shend): This function should take no arguments.
+ void SetHasViewportUnits(bool hasViewportUnits) {
+ m_nonInheritedData.m_hasViewportUnits = hasViewportUnits;
+ }
+
bool EmptyState() const { return EmptyStateInternal(); }
void SetEmptyState(bool b) {
SetUnique();
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698