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

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

Issue 2793193004: Remove mutable from ComputedStyle by const_cast. (Closed)
Patch Set: Address comments 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 | « third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp ('k') | no next file » | 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 0b147d6ef6e0220dd2e0d17720f31245bc398219..337d4ed513b0b45fe942d8bf1699a171a02a6008 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -231,12 +231,9 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
return !(*this == other);
}
- // 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.
- mutable unsigned m_hasViewportUnits : 1;
-
- mutable unsigned m_hasRemUnits : 1;
+ // These are set if we used viewport or rem units when resolving a length.
+ unsigned m_hasViewportUnits : 1;
+ unsigned m_hasRemUnits : 1;
// If you add more style bits here, you will also need to update
// ComputedStyle::copyNonInheritedFromCached() 68 bits
@@ -2349,12 +2346,12 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
bool hasViewportUnits() const {
return m_nonInheritedData.m_hasViewportUnits;
}
- void setHasViewportUnits(bool hasViewportUnits = true) const {
+ void setHasViewportUnits(bool hasViewportUnits = true) {
m_nonInheritedData.m_hasViewportUnits = hasViewportUnits;
}
bool hasRemUnits() const { return m_nonInheritedData.m_hasRemUnits; }
- void setHasRemUnits() const { m_nonInheritedData.m_hasRemUnits = true; }
+ void setHasRemUnits() { m_nonInheritedData.m_hasRemUnits = true; }
bool emptyState() const { return m_emptyState; }
void setEmptyState(bool b) {
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698