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

Unified Diff: Source/core/css/resolver/StyleResolver.h

Issue 5216392399814656: Clear StyleResolverState after each resolve. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated after levi's revert Created 7 years, 5 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/css/FontLoader.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.h
diff --git a/Source/core/css/resolver/StyleResolver.h b/Source/core/css/resolver/StyleResolver.h
index 462831ed9b9d90b9c45271802013b0d10d176315..6e6b51f51dcc2cee6efc5e73eab77e51d9d98100 100644
--- a/Source/core/css/resolver/StyleResolver.h
+++ b/Source/core/css/resolver/StyleResolver.h
@@ -123,6 +123,15 @@ public:
const ContainerNode* scope;
};
+struct CSSPropertyValue {
+ CSSPropertyValue(CSSPropertyID property, CSSValue* value)
+ : property(property), value(value) { }
+ // Stores value=propertySet.getPropertyCSSValue(id).get().
+ CSSPropertyValue(CSSPropertyID, const StylePropertySet&);
+ CSSPropertyID property;
+ CSSValue* value;
+};
+
// This class selects a RenderStyle for a given element based on a collection of stylesheets.
class StyleResolver {
WTF_MAKE_NONCOPYABLE(StyleResolver); WTF_MAKE_FAST_ALLOCATED;
@@ -181,7 +190,7 @@ private:
bool canShareStyleWithControl(const ElementResolveContext&, Element* sharingCandidate) const;
bool sharingCandidateHasIdenticalStyleAffectingAttributes(const ElementResolveContext&, Element* sharingCandidate) const;
- PassRefPtr<RenderStyle> styleForKeyframe(const RenderStyle*, const StyleKeyframe*, KeyframeValue&);
+ PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle*, const StyleKeyframe*, KeyframeValue&);
public:
// These methods will give back the set of rules that matched for a given element (or a pseudo-element).
@@ -197,9 +206,8 @@ public:
PassRefPtr<CSSRuleList> pseudoStyleRulesForElement(Element*, PseudoId, unsigned rulesToInclude = AllButEmptyCSSRules);
public:
- void applyPropertyToStyle(CSSPropertyID, CSSValue*, RenderStyle*);
-
- void applyPropertyToCurrentStyle(CSSPropertyID, CSSValue*);
+ // |properties| is an array with |count| elements.
+ void applyPropertiesToStyle(const CSSPropertyValue* properties, size_t count, RenderStyle*);
void updateFont();
void initializeFontStyle(Settings*);
« no previous file with comments | « Source/core/css/FontLoader.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698