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

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: Updated change after Doug's review. 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
« no previous file with comments | « Source/core/layout/line/BreakingContextInlineHeaders.h ('k') | Source/core/layout/style/LayoutStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/style/LayoutStyle.h
diff --git a/Source/core/layout/style/LayoutStyle.h b/Source/core/layout/style/LayoutStyle.h
index 1f8bb37fc20bc8499c44a1dbc988074754e14a18..07982610513800f3c72c0f6cea722cf401aae371 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;
@@ -1460,7 +1461,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;
@@ -1469,7 +1470,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; }
« no previous file with comments | « Source/core/layout/line/BreakingContextInlineHeaders.h ('k') | Source/core/layout/style/LayoutStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698