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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/SharedStyleFinder.h

Issue 2272683002: Consider pseudo classes as matching for shared style rejection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handle negated selectors Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google, Inc. 2 * Copyright (C) 2013 Google, Inc.
3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 16 matching lines...) Expand all
27 27
28 namespace blink { 28 namespace blink {
29 29
30 class Element; 30 class Element;
31 class ComputedStyle; 31 class ComputedStyle;
32 class RuleFeatureSet; 32 class RuleFeatureSet;
33 class RuleSet; 33 class RuleSet;
34 class SpaceSplitString; 34 class SpaceSplitString;
35 class StyleResolver; 35 class StyleResolver;
36 36
37 class SharedStyleFinder { 37 class CORE_EXPORT SharedStyleFinder {
38 STACK_ALLOCATED(); 38 STACK_ALLOCATED();
39 public: 39 public:
40 // RuleSets are passed non-const as the act of matching against them can cau se them 40 // RuleSets are passed non-const as the act of matching against them can cau se them
41 // to be compacted. :( 41 // to be compacted. :(
42 SharedStyleFinder(const ElementResolveContext& context, 42 SharedStyleFinder(const ElementResolveContext& context,
43 const RuleFeatureSet& features, RuleSet* siblingRuleSet, 43 const RuleFeatureSet& features, RuleSet* siblingRuleSet,
44 RuleSet* uncommonAttributeRuleSet, StyleResolver& styleResolver) 44 RuleSet* uncommonAttributeRuleSet, StyleResolver& styleResolver)
45 : m_elementAffectedByClassRules(false) 45 : m_elementAffectedByClassRules(false)
46 , m_features(features) 46 , m_features(features)
47 , m_siblingRuleSet(siblingRuleSet) 47 , m_siblingRuleSet(siblingRuleSet)
(...skipping 21 matching lines...) Expand all
69 69
70 Element& element() const { return *m_context.element(); } 70 Element& element() const { return *m_context.element(); }
71 Document& document() const { return element().document(); } 71 Document& document() const { return element().document(); }
72 72
73 bool m_elementAffectedByClassRules; 73 bool m_elementAffectedByClassRules;
74 const RuleFeatureSet& m_features; 74 const RuleFeatureSet& m_features;
75 Member<RuleSet> m_siblingRuleSet; 75 Member<RuleSet> m_siblingRuleSet;
76 Member<RuleSet> m_uncommonAttributeRuleSet; 76 Member<RuleSet> m_uncommonAttributeRuleSet;
77 Member<StyleResolver> m_styleResolver; 77 Member<StyleResolver> m_styleResolver;
78 const ElementResolveContext& m_context; 78 const ElementResolveContext& m_context;
79
80 friend class SharedStyleFinderTest;
79 }; 81 };
80 82
81 } // namespace blink 83 } // namespace blink
82 84
83 #endif // SharedStyleFinder_h 85 #endif // SharedStyleFinder_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698