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

Unified Diff: Source/core/layout/style/LayoutStyle.h

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed web/mac/WebSubstringUtil.mm Created 5 years, 10 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: Source/core/layout/style/LayoutStyle.h
diff --git a/Source/core/layout/style/LayoutStyle.h b/Source/core/layout/style/LayoutStyle.h
index 22991f87966e85da69a4d1f3773f36932d0bef70..f5f699f12dfc096f8112741407a2c92a9ac7f537 100644
--- a/Source/core/layout/style/LayoutStyle.h
+++ b/Source/core/layout/style/LayoutStyle.h
@@ -258,8 +258,9 @@ protected:
unsigned styleType : 6; // PseudoId
unsigned pseudoBits : 8;
- unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited property
- unsigned unique : 1; // Style can not be shared.
+ // FIXME: |explicitInheritance| should be moved to ElementRareData.
+ mutable unsigned explicitInheritance : 1; // Explicitly inherits a non-inherited property
+ mutable unsigned unique : 1; // Style can not be shared.
unsigned emptyState : 1;
@@ -1457,7 +1458,7 @@ public:
// A unique style is one that has matches something that makes it impossible to share.
bool unique() const { return noninherited_flags.unique; }
- void setUnique() { noninherited_flags.unique = true; }
+ void setUnique() const { noninherited_flags.unique = true; }
bool isSharable() const;
@@ -1466,7 +1467,7 @@ public:
Color visitedDependentColor(int colorProperty) const;
- void setHasExplicitlyInheritedProperties() { noninherited_flags.explicitInheritance = true; }
+ void setHasExplicitlyInheritedProperties() const { noninherited_flags.explicitInheritance = true; }
bool hasExplicitlyInheritedProperties() const { return noninherited_flags.explicitInheritance; }
bool hasBoxDecorations() const { return hasBorder() || hasBorderRadius() || hasOutline() || hasAppearance() || boxShadow() || hasFilter() || resize() != RESIZE_NONE; }

Powered by Google App Engine
This is Rietveld 408576698