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

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

Issue 2521063005: Move MediaQueryEvaluator from StyleResolver to StyleEngine. (Closed)
Patch Set: Rebased Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
4 * All rights reserved. 4 * 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 StyleSharingList& styleSharingList(); 169 StyleSharingList& styleSharingList();
170 170
171 void addToStyleSharingList(Element&); 171 void addToStyleSharingList(Element&);
172 void clearStyleSharingList(); 172 void clearStyleSharingList();
173 173
174 void increaseStyleSharingDepth() { ++m_styleSharingDepth; } 174 void increaseStyleSharingDepth() { ++m_styleSharingDepth; }
175 void decreaseStyleSharingDepth() { --m_styleSharingDepth; } 175 void decreaseStyleSharingDepth() { --m_styleSharingDepth; }
176 176
177 PseudoElement* createPseudoElementIfNeeded(Element& parent, PseudoId); 177 PseudoElement* createPseudoElementIfNeeded(Element& parent, PseudoId);
178 178
179 void setRuleUsageTracker(StyleRuleUsageTracker*);
180 void updateMediaType();
181
179 DECLARE_TRACE(); 182 DECLARE_TRACE();
180 183
181 void setRuleUsageTracker(StyleRuleUsageTracker*);
182
183 private: 184 private:
184 explicit StyleResolver(Document&); 185 explicit StyleResolver(Document&);
185 186
186 PassRefPtr<ComputedStyle> initialStyleForElement(); 187 PassRefPtr<ComputedStyle> initialStyleForElement();
187 188
188 // FIXME: This should probably go away, folded into FontBuilder. 189 // FIXME: This should probably go away, folded into FontBuilder.
189 void updateFont(StyleResolverState&); 190 void updateFont(StyleResolverState&);
190 191
191 void addMatchedRulesToTracker(const ElementRuleCollector&); 192 void addMatchedRulesToTracker(const ElementRuleCollector&);
192 193
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 317
317 bool pseudoStyleForElementInternal(Element&, 318 bool pseudoStyleForElementInternal(Element&,
318 const PseudoStyleRequest&, 319 const PseudoStyleRequest&,
319 const ComputedStyle* parentStyle, 320 const ComputedStyle* parentStyle,
320 StyleResolverState&); 321 StyleResolverState&);
321 bool hasAuthorBackground(const StyleResolverState&); 322 bool hasAuthorBackground(const StyleResolverState&);
322 bool hasAuthorBorder(const StyleResolverState&); 323 bool hasAuthorBorder(const StyleResolverState&);
323 324
324 PseudoElement* createPseudoElement(Element* parent, PseudoId); 325 PseudoElement* createPseudoElement(Element* parent, PseudoId);
325 326
326 Document& document() { return *m_document; } 327 Document& document() const { return *m_document; }
327 328
328 static ComputedStyle* s_styleNotYetAvailable; 329 static ComputedStyle* s_styleNotYetAvailable;
329 330
330 MatchedPropertiesCache m_matchedPropertiesCache; 331 MatchedPropertiesCache m_matchedPropertiesCache;
331 332
332 Member<MediaQueryEvaluator> m_medium;
333 MediaQueryResultList m_viewportDependentMediaQueryResults; 333 MediaQueryResultList m_viewportDependentMediaQueryResults;
334 MediaQueryResultList m_deviceDependentMediaQueryResults; 334 MediaQueryResultList m_deviceDependentMediaQueryResults;
335 335
336 Member<Document> m_document; 336 Member<Document> m_document;
337 SelectorFilter m_selectorFilter; 337 SelectorFilter m_selectorFilter;
338 338
339 HeapListHashSet<Member<CSSStyleSheet>, 16> m_pendingStyleSheets; 339 HeapListHashSet<Member<CSSStyleSheet>, 16> m_pendingStyleSheets;
340 340
341 Member<StyleRuleUsageTracker> m_tracker; 341 Member<StyleRuleUsageTracker> m_tracker;
342 342
343 bool m_printMediaType; 343 bool m_printMediaType = false;
344 344
345 unsigned m_styleSharingDepth; 345 unsigned m_styleSharingDepth = 0;
346 HeapVector<Member<StyleSharingList>, styleSharingMaxDepth> 346 HeapVector<Member<StyleSharingList>, styleSharingMaxDepth>
347 m_styleSharingLists; 347 m_styleSharingLists;
348 }; 348 };
349 349
350 } // namespace blink 350 } // namespace blink
351 351
352 #endif // StyleResolver_h 352 #endif // StyleResolver_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698