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

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

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More assert fixes Created 4 years, 7 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: third_party/WebKit/Source/core/css/resolver/StyleResolver.h
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.h b/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
index 5ce00aea84de0672f0b1ee92b816e4ea52ec0c12..dd247c3db864e02d1fb3c3d357b1917d2a1efe4a 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
@@ -26,14 +26,11 @@
#include "core/animation/PropertyHandle.h"
#include "core/css/ElementRuleCollector.h"
#include "core/css/PseudoStyleRequest.h"
-#include "core/css/RuleFeature.h"
-#include "core/css/RuleSet.h"
#include "core/css/SelectorChecker.h"
#include "core/css/SelectorFilter.h"
#include "core/css/resolver/CSSPropertyPriority.h"
#include "core/css/resolver/MatchedPropertiesCache.h"
#include "core/css/resolver/StyleBuilder.h"
-#include "core/dom/DocumentOrderedList.h"
#include "core/style/CachedUAStyle.h"
#include "platform/heap/Handle.h"
#include "wtf/Deque.h"
@@ -54,11 +51,10 @@ class Document;
class Element;
class Interpolation;
class MatchResult;
-class MediaQueryEvaluator;
+class RuleSet;
class ScopedStyleResolver;
class StylePropertySet;
class StyleRule;
-class ViewportStyleResolver;
enum StyleSharingBehavior {
AllowStyleSharing,
@@ -99,18 +95,6 @@ public:
static PassRefPtr<ComputedStyle> styleForDocument(Document&);
- // FIXME: It could be better to call appendAuthorStyleSheets() directly after we factor StyleResolver further.
- // https://bugs.webkit.org/show_bug.cgi?id=108890
- void appendAuthorStyleSheets(const HeapVector<Member<CSSStyleSheet>>&);
- void resetAuthorStyle(TreeScope&);
- void resetRuleFeatures();
- void finishAppendAuthorStyleSheets();
-
- void lazyAppendAuthorStyleSheets(unsigned firstNew, const HeapVector<Member<CSSStyleSheet>>&);
- void removePendingAuthorStyleSheets(const HeapVector<Member<CSSStyleSheet>>&);
- void appendPendingAuthorStyleSheets();
- bool hasPendingAuthorStyleSheets() const { return m_pendingStyleSheets.size() > 0 || m_needCollectFeatures; }
-
// TODO(esprehn): StyleResolver should probably not contain tree walking
// state, instead we should pass a context object during recalcStyle.
SelectorFilter& selectorFilter() { return m_selectorFilter; }
@@ -132,14 +116,6 @@ public:
void computeFont(ComputedStyle*, const StylePropertySet&);
- ViewportStyleResolver* viewportStyleResolver() { return m_viewportStyleResolver.get(); }
-
- void addViewportDependentMediaQueries(const MediaQueryResultList&);
- bool hasViewportDependentMediaQueries() const { return !m_viewportDependentMediaQueryResults.isEmpty(); }
- bool mediaQueryAffectedByViewportChange() const;
- void addDeviceDependentMediaQueries(const MediaQueryResultList&);
- bool mediaQueryAffectedByDeviceChange() const;
-
// FIXME: Rename to reflect the purpose, like didChangeFontSize or something.
void invalidateMatchedPropertiesCache();
@@ -148,23 +124,7 @@ public:
// Exposed for ComputedStyle::isStyleAvilable().
static ComputedStyle* styleNotYetAvailable() { return s_styleNotYetAvailable; }
- RuleFeatureSet& ensureUpdatedRuleFeatureSet()
- {
- if (hasPendingAuthorStyleSheets())
- appendPendingAuthorStyleSheets();
- return m_features;
- }
-
- RuleFeatureSet& ruleFeatureSet()
- {
- return m_features;
- }
-
StyleSharingList& styleSharingList();
-
- bool hasRulesForId(const AtomicString&) const;
- bool hasFullscreenUAStyle() const { return m_hasFullscreenUAStyle; }
-
void addToStyleSharingList(Element&);
void clearStyleSharingList();
@@ -175,9 +135,6 @@ public:
DECLARE_TRACE();
- void addTreeBoundaryCrossingScope(ContainerNode& scope);
- void initWatchedSelectorRules();
-
private:
explicit StyleResolver(Document&);
@@ -189,8 +146,6 @@ private:
void loadPendingResources(StyleResolverState&);
void adjustComputedStyle(StyleResolverState&, Element*);
- void appendCSSStyleSheet(CSSStyleSheet&);
-
void collectPseudoRulesForElement(const Element&, ElementRuleCollector&, PseudoId, unsigned rulesToInclude);
void matchRuleSet(ElementRuleCollector&, RuleSet*);
void matchUARules(ElementRuleCollector&);
@@ -198,7 +153,6 @@ private:
void matchAuthorRules(const Element&, ElementRuleCollector&);
void matchAuthorRulesV0(const Element&, ElementRuleCollector&);
void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeSMILProperties);
- void collectFeatures();
void collectTreeBoundaryCrossingRules(const Element&, ElementRuleCollector&);
void applyMatchedProperties(StyleResolverState&, const MatchResult&);
@@ -228,31 +182,12 @@ private:
MatchedPropertiesCache m_matchedPropertiesCache;
- Member<MediaQueryEvaluator> m_medium;
- MediaQueryResultList m_viewportDependentMediaQueryResults;
- MediaQueryResultList m_deviceDependentMediaQueryResults;
-
Member<Document> m_document;
SelectorFilter m_selectorFilter;
- Member<ViewportStyleResolver> m_viewportStyleResolver;
-
- HeapListHashSet<Member<CSSStyleSheet>, 16> m_pendingStyleSheets;
-
- // FIXME: The entire logic of collecting features on StyleResolver, as well as transferring them
- // between various parts of machinery smells wrong. This needs to be better somehow.
- RuleFeatureSet m_features;
- Member<RuleSet> m_siblingRuleSet;
- Member<RuleSet> m_uncommonAttributeRuleSet;
- Member<RuleSet> m_watchedSelectorsRules;
-
- DocumentOrderedList m_treeBoundaryCrossingScopes;
-
- bool m_needCollectFeatures;
- bool m_printMediaType;
- bool m_hasFullscreenUAStyle = false;
+ bool m_printMediaType = false;
- unsigned m_styleSharingDepth;
+ unsigned m_styleSharingDepth = 0;
HeapVector<Member<StyleSharingList>, styleSharingMaxDepth> m_styleSharingLists;
};

Powered by Google App Engine
This is Rietveld 408576698