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

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

Issue 19555002: Translate viewport related meta tags into @viewport descriptors as suggested by the CSS Device Adap… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 bool buildScopedStyleTreeInDocumentOrder() const { return m_styleTree.buildI nDocumentOrder(); } 175 bool buildScopedStyleTreeInDocumentOrder() const { return m_styleTree.buildI nDocumentOrder(); }
176 176
177 ScopedStyleResolver* ensureScopedStyleResolver(const ContainerNode* scope) 177 ScopedStyleResolver* ensureScopedStyleResolver(const ContainerNode* scope)
178 { 178 {
179 return m_styleTree.ensureScopedStyleResolver(scope ? scope : document()) ; 179 return m_styleTree.ensureScopedStyleResolver(scope ? scope : document()) ;
180 } 180 }
181 181
182 // FIXME: Used by SharingStyleFinder, but should be removed. 182 // FIXME: Used by SharingStyleFinder, but should be removed.
183 bool styleSharingCandidateMatchesRuleSet(const ElementResolveContext&, RuleS et*); 183 bool styleSharingCandidateMatchesRuleSet(const ElementResolveContext&, RuleS et*);
184 184
185 void collectViewportRules(RuleSet*);
186
185 PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle*, const StyleKeyframe*, KeyframeValue&); 187 PassRefPtr<RenderStyle> styleForKeyframe(Element*, const RenderStyle*, const StyleKeyframe*, KeyframeValue&);
186 188
187 // These methods will give back the set of rules that matched for a given el ement (or a pseudo-element). 189 // These methods will give back the set of rules that matched for a given el ement (or a pseudo-element).
188 enum CSSRuleFilter { 190 enum CSSRuleFilter {
189 UAAndUserCSSRules = 1 << 1, 191 UAAndUserCSSRules = 1 << 1,
190 AuthorCSSRules = 1 << 2, 192 AuthorCSSRules = 1 << 2,
191 EmptyCSSRules = 1 << 3, 193 EmptyCSSRules = 1 << 3,
192 CrossOriginCSSRules = 1 << 4, 194 CrossOriginCSSRules = 1 << 4,
193 AllButEmptyCSSRules = UAAndUserCSSRules | AuthorCSSRules | CrossOriginCS SRules, 195 AllButEmptyCSSRules = UAAndUserCSSRules | AuthorCSSRules | CrossOriginCS SRules,
194 AllCSSRules = AllButEmptyCSSRules | EmptyCSSRules, 196 AllCSSRules = AllButEmptyCSSRules | EmptyCSSRules,
(...skipping 28 matching lines...) Expand all
223 225
224 // FIXME: Rename to reflect the purpose, like didChangeFontSize or something . 226 // FIXME: Rename to reflect the purpose, like didChangeFontSize or something .
225 void invalidateMatchedPropertiesCache(); 227 void invalidateMatchedPropertiesCache();
226 228
227 static RenderStyle* styleNotYetAvailable() { return s_styleNotYetAvailable; } 229 static RenderStyle* styleNotYetAvailable() { return s_styleNotYetAvailable; }
228 230
229 InspectorCSSOMWrappers& inspectorCSSOMWrappers() { return m_inspectorCSSOMWr appers; } 231 InspectorCSSOMWrappers& inspectorCSSOMWrappers() { return m_inspectorCSSOMWr appers; }
230 232
231 void reportMemoryUsage(MemoryObjectInfo*) const; 233 void reportMemoryUsage(MemoryObjectInfo*) const;
232 234
233 void collectViewportRules(RuleSet*);
234
235 private: 235 private:
236 void matchUARules(ElementRuleCollector&, RuleSet*); 236 void matchUARules(ElementRuleCollector&, RuleSet*);
237 void matchAuthorRules(ElementRuleCollector&, bool includeEmptyRules); 237 void matchAuthorRules(ElementRuleCollector&, bool includeEmptyRules);
238 void matchShadowDistributedRules(ElementRuleCollector&, bool includeEmptyRul es); 238 void matchShadowDistributedRules(ElementRuleCollector&, bool includeEmptyRul es);
239 void matchHostRules(ScopedStyleResolver*, ElementRuleCollector&, bool includ eEmptyRules); 239 void matchHostRules(ScopedStyleResolver*, ElementRuleCollector&, bool includ eEmptyRules);
240 void matchScopedAuthorRules(ElementRuleCollector&, bool includeEmptyRules); 240 void matchScopedAuthorRules(ElementRuleCollector&, bool includeEmptyRules);
241 void matchAllRules(ElementRuleCollector&, bool matchAuthorAndUserStyles, boo l includeSMILProperties); 241 void matchAllRules(ElementRuleCollector&, bool matchAuthorAndUserStyles, boo l includeSMILProperties);
242 void matchUARules(ElementRuleCollector&); 242 void matchUARules(ElementRuleCollector&);
243 void matchUserRules(ElementRuleCollector&, bool includeEmptyRules); 243 void matchUserRules(ElementRuleCollector&, bool includeEmptyRules);
244 void collectFeatures(); 244 void collectFeatures();
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 PseudoId ignoreDynamicPseudo = NOPSEUDO; 342 PseudoId ignoreDynamicPseudo = NOPSEUDO;
343 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo, DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches) 343 if (selectorChecker.match(selectorCheckingContext, ignoreDynamicPseudo, DOMSiblingTraversalStrategy()) == SelectorChecker::SelectorMatches)
344 return true; 344 return true;
345 } 345 }
346 return false; 346 return false;
347 } 347 }
348 348
349 } // namespace WebCore 349 } // namespace WebCore
350 350
351 #endif // StyleResolver_h 351 #endif // StyleResolver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698