mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Remove dead enums from StyleResolver.
We never disable style sharing with DisallowStyleSharing now, and SMIL doesn't exist in Sky so the MatchAllRulesExcludingSMIL flag is just dead code. R=ojan@chromium.org Review URL: https://codereview.chromium.org/823633006
This commit is contained in:
parent
059ceb6e3f
commit
61d08323e8
@ -316,7 +316,7 @@ void StyleResolver::matchUARules(ElementRuleCollector& collector, RuleSet* rules
|
||||
collector.sortAndTransferMatchedRules();
|
||||
}
|
||||
|
||||
void StyleResolver::matchAllRules(StyleResolverState& state, ElementRuleCollector& collector, bool includeSMILProperties)
|
||||
void StyleResolver::matchAllRules(StyleResolverState& state, ElementRuleCollector& collector)
|
||||
{
|
||||
matchUARules(collector);
|
||||
matchAuthorRules(state.element(), collector, false);
|
||||
@ -351,8 +351,7 @@ void StyleResolver::loadPendingResources(StyleResolverState& state)
|
||||
document().styleEngine()->fontSelector()->fontLoader()->loadPendingFonts();
|
||||
}
|
||||
|
||||
PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderStyle* defaultParent, StyleSharingBehavior sharingBehavior,
|
||||
RuleMatchingBehavior matchingBehavior)
|
||||
PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderStyle* defaultParent)
|
||||
{
|
||||
ASSERT(document().frame());
|
||||
ASSERT(document().settings());
|
||||
@ -364,7 +363,7 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
|
||||
document().setDirectionSetOnDocumentElement(false);
|
||||
StyleResolverState state(document(), element, defaultParent);
|
||||
|
||||
if (sharingBehavior == AllowStyleSharing && state.parentStyle()) {
|
||||
if (state.parentStyle()) {
|
||||
SharedStyleFinder styleFinder(state.elementContext(), *this);
|
||||
if (RefPtr<RenderStyle> sharedStyle = styleFinder.findSharedStyle())
|
||||
return sharedStyle.release();
|
||||
@ -391,7 +390,7 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
|
||||
{
|
||||
ElementRuleCollector collector(state.elementContext(), state.style());
|
||||
|
||||
matchAllRules(state, collector, matchingBehavior != MatchAllRulesExcludingSMIL);
|
||||
matchAllRules(state, collector);
|
||||
|
||||
applyMatchedProperties(state, collector.matchedResult());
|
||||
}
|
||||
|
||||
@ -64,16 +64,6 @@ class StyleRuleKeyframes;
|
||||
|
||||
class MatchResult;
|
||||
|
||||
enum StyleSharingBehavior {
|
||||
AllowStyleSharing,
|
||||
DisallowStyleSharing,
|
||||
};
|
||||
|
||||
enum RuleMatchingBehavior {
|
||||
MatchAllRules,
|
||||
MatchAllRulesExcludingSMIL
|
||||
};
|
||||
|
||||
const unsigned styleSharingListSize = 15;
|
||||
const unsigned styleSharingMaxDepth = 32;
|
||||
typedef Deque<RawPtr<Element>, styleSharingListSize> StyleSharingList;
|
||||
@ -96,8 +86,7 @@ public:
|
||||
explicit StyleResolver(Document&);
|
||||
virtual ~StyleResolver();
|
||||
|
||||
PassRefPtr<RenderStyle> styleForElement(Element*, RenderStyle* parentStyle = 0, StyleSharingBehavior = AllowStyleSharing,
|
||||
RuleMatchingBehavior = MatchAllRules);
|
||||
PassRefPtr<RenderStyle> styleForElement(Element*, RenderStyle* parentStyle = 0);
|
||||
|
||||
PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle&, RenderStyle* parentStyle, const StyleKeyframe*, const AtomicString& animationName);
|
||||
static PassRefPtr<AnimatableValue> createAnimatableValueSnapshot(Element&, CSSPropertyID, CSSValue&);
|
||||
@ -166,7 +155,7 @@ private:
|
||||
void matchUARules(ElementRuleCollector&, RuleSet*);
|
||||
void matchAuthorRules(Element*, ElementRuleCollector&, bool includeEmptyRules);
|
||||
void matchAuthorRulesForShadowHost(Element*, ElementRuleCollector&, bool includeEmptyRules, Vector<RawPtr<ScopedStyleResolver>, 8>& resolvers, Vector<RawPtr<ScopedStyleResolver>, 8>& resolversInShadowTree);
|
||||
void matchAllRules(StyleResolverState&, ElementRuleCollector&, bool includeSMILProperties);
|
||||
void matchAllRules(StyleResolverState&, ElementRuleCollector&);
|
||||
void matchUARules(ElementRuleCollector&);
|
||||
|
||||
void applyMatchedProperties(StyleResolverState&, const MatchResult&);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user