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

Side by Side Diff: Source/core/css/resolver/StyleResolverState.h

Issue 20672003: Avoid reaching for StyleResolver::m_features from StyleBuilder. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // FIXME: These are effectively side-channel "out parameters" for the variou s 69 // FIXME: These are effectively side-channel "out parameters" for the variou s
70 // map functions. When we map from CSS to style objects we use this state ob ject 70 // map functions. When we map from CSS to style objects we use this state ob ject
71 // to track various meta-data about that mapping (e.g. if it's cache-able). 71 // to track various meta-data about that mapping (e.g. if it's cache-able).
72 // We need to move this data off of StyleResolverState and closer to the 72 // We need to move this data off of StyleResolverState and closer to the
73 // objects it applies to. Possibly separating (immutable) inputs from (mutab le) outputs. 73 // objects it applies to. Possibly separating (immutable) inputs from (mutab le) outputs.
74 void setApplyPropertyToRegularStyle(bool isApply) { m_applyPropertyToRegular Style = isApply; } 74 void setApplyPropertyToRegularStyle(bool isApply) { m_applyPropertyToRegular Style = isApply; }
75 void setApplyPropertyToVisitedLinkStyle(bool isApply) { m_applyPropertyToVis itedLinkStyle = isApply; } 75 void setApplyPropertyToVisitedLinkStyle(bool isApply) { m_applyPropertyToVis itedLinkStyle = isApply; }
76 bool applyPropertyToRegularStyle() const { return m_applyPropertyToRegularSt yle; } 76 bool applyPropertyToRegularStyle() const { return m_applyPropertyToRegularSt yle; }
77 bool applyPropertyToVisitedLinkStyle() const { return m_applyPropertyToVisit edLinkStyle; } 77 bool applyPropertyToVisitedLinkStyle() const { return m_applyPropertyToVisit edLinkStyle; }
78 78
79 // Holds all attribute names found while applying "content" properties that contain an "attr()" value.
80 Vector<AtomicString>& contentAttrValues() { return m_contentAttrValues; }
81
79 void setLineHeightValue(CSSValue* value) { m_lineHeightValue = value; } 82 void setLineHeightValue(CSSValue* value) { m_lineHeightValue = value; }
80 CSSValue* lineHeightValue() { return m_lineHeightValue; } 83 CSSValue* lineHeightValue() { return m_lineHeightValue; }
81 84
82 void cacheUserAgentBorderAndBackground() { m_cachedUAStyle = CachedUAStyle(s tyle()); } 85 void cacheUserAgentBorderAndBackground() { m_cachedUAStyle = CachedUAStyle(s tyle()); }
83 const CachedUAStyle& cachedUAStyle() const { return m_cachedUAStyle; } 86 const CachedUAStyle& cachedUAStyle() const { return m_cachedUAStyle; }
84 87
85 ElementStyleResources& elementStyleResources() { return m_elementStyleResour ces; } 88 ElementStyleResources& elementStyleResources() { return m_elementStyleResour ces; }
86 const CSSToStyleMap& styleMap() const { return m_styleMap; } 89 const CSSToStyleMap& styleMap() const { return m_styleMap; }
87 CSSToStyleMap& styleMap() { return m_styleMap; } 90 CSSToStyleMap& styleMap() { return m_styleMap; }
88 91
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 CSSValue* m_lineHeightValue; 144 CSSValue* m_lineHeightValue;
142 145
143 FontBuilder m_fontBuilder; 146 FontBuilder m_fontBuilder;
144 147
145 CachedUAStyle m_cachedUAStyle; 148 CachedUAStyle m_cachedUAStyle;
146 149
147 ElementStyleResources m_elementStyleResources; 150 ElementStyleResources m_elementStyleResources;
148 // CSSToStyleMap is a pure-logic class and only contains 151 // CSSToStyleMap is a pure-logic class and only contains
149 // a back-pointer to this object. 152 // a back-pointer to this object.
150 CSSToStyleMap m_styleMap; 153 CSSToStyleMap m_styleMap;
154 Vector<AtomicString> m_contentAttrValues;
151 }; 155 };
152 156
153 } // namespace WebCore 157 } // namespace WebCore
154 158
155 #endif // StyleResolverState_h 159 #endif // StyleResolverState_h
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698