OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All |
7 * rights reserved. | 7 * rights reserved. |
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 void watchedSelectorsChanged(); | 111 void watchedSelectorsChanged(); |
112 void initialViewportChanged(); | 112 void initialViewportChanged(); |
113 void viewportRulesChanged(); | 113 void viewportRulesChanged(); |
114 | 114 |
115 void injectAuthorSheet(StyleSheetContents* authorSheet); | 115 void injectAuthorSheet(StyleSheetContents* authorSheet); |
116 CSSStyleSheet& ensureInspectorStyleSheet(); | 116 CSSStyleSheet& ensureInspectorStyleSheet(); |
117 RuleSet* watchedSelectorsRuleSet() { | 117 RuleSet* watchedSelectorsRuleSet() { |
118 return m_globalRuleSet.watchedSelectorsRuleSet(); | 118 return m_globalRuleSet.watchedSelectorsRuleSet(); |
119 } | 119 } |
120 | 120 |
| 121 RuleSet* ruleSetForSheet(CSSStyleSheet&); |
121 void mediaQueryAffectingValueChanged(); | 122 void mediaQueryAffectingValueChanged(); |
122 void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector); | 123 void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector); |
123 void updateActiveStyleSheets(StyleResolverUpdateMode); | 124 void updateActiveStyleSheets(StyleResolverUpdateMode); |
124 void updateActiveStyle(); | 125 void updateActiveStyle(); |
125 | 126 |
126 enum ActiveSheetsUpdate { DontUpdateActiveSheets, UpdateActiveSheets }; | 127 enum ActiveSheetsUpdate { DontUpdateActiveSheets, UpdateActiveSheets }; |
127 String preferredStylesheetSetName() const { | 128 String preferredStylesheetSetName() const { |
128 return m_preferredStylesheetSetName; | 129 return m_preferredStylesheetSetName; |
129 } | 130 } |
130 String selectedStylesheetSetName() const { | 131 String selectedStylesheetSetName() const { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 m_globalRuleSet.update(document()); | 191 m_globalRuleSet.update(document()); |
191 } | 192 } |
192 return *m_resolver; | 193 return *m_resolver; |
193 } | 194 } |
194 | 195 |
195 bool hasResolver() const { return m_resolver; } | 196 bool hasResolver() const { return m_resolver; } |
196 void clearResolver(); | 197 void clearResolver(); |
197 void clearMasterResolver(); | 198 void clearMasterResolver(); |
198 | 199 |
199 StyleInvalidator& styleInvalidator() { return m_styleInvalidator; } | 200 StyleInvalidator& styleInvalidator() { return m_styleInvalidator; } |
200 const MediaQueryEvaluator& ensureMediaQueryEvaluator(); | 201 bool mediaQueryAffectedByViewportChange(); |
| 202 bool mediaQueryAffectedByDeviceChange(); |
| 203 bool hasViewportDependentMediaQueries() const { |
| 204 return !m_globalRuleSet.ruleFeatureSet() |
| 205 .viewportDependentMediaQueryResults() |
| 206 .isEmpty(); |
| 207 } |
201 | 208 |
202 CSSFontSelector* fontSelector() { return m_fontSelector; } | 209 CSSFontSelector* fontSelector() { return m_fontSelector; } |
203 void setFontSelector(CSSFontSelector*); | 210 void setFontSelector(CSSFontSelector*); |
204 | 211 |
205 void removeFontFaceRules(const HeapVector<Member<const StyleRuleFontFace>>&); | 212 void removeFontFaceRules(const HeapVector<Member<const StyleRuleFontFace>>&); |
206 void clearFontCache(); | 213 void clearFontCache(); |
207 // updateGenericFontFamilySettings is used from WebSettingsImpl. | 214 // updateGenericFontFamilySettings is used from WebSettingsImpl. |
208 void updateGenericFontFamilySettings(); | 215 void updateGenericFontFamilySettings(); |
209 | 216 |
210 void didDetach(); | 217 void didDetach(); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 UnorderedTreeScopeSet& treeScopesRemoved); | 317 UnorderedTreeScopeSet& treeScopesRemoved); |
311 | 318 |
312 bool shouldSkipInvalidationFor(const Element&) const; | 319 bool shouldSkipInvalidationFor(const Element&) const; |
313 void scheduleRuleSetInvalidationsForElement( | 320 void scheduleRuleSetInvalidationsForElement( |
314 Element&, | 321 Element&, |
315 const HeapVector<Member<RuleSet>>&); | 322 const HeapVector<Member<RuleSet>>&); |
316 void invalidateSlottedElements(HTMLSlotElement&); | 323 void invalidateSlottedElements(HTMLSlotElement&); |
317 | 324 |
318 void updateViewport(); | 325 void updateViewport(); |
319 void updateActiveStyleSheets(); | 326 void updateActiveStyleSheets(); |
| 327 const MediaQueryEvaluator& ensureMediaQueryEvaluator(); |
320 | 328 |
321 Member<Document> m_document; | 329 Member<Document> m_document; |
322 bool m_isMaster; | 330 bool m_isMaster; |
323 | 331 |
324 // Track the number of currently loading top-level stylesheets needed for | 332 // Track the number of currently loading top-level stylesheets needed for |
325 // layout. Sheets loaded using the @import directive are not included in this | 333 // layout. Sheets loaded using the @import directive are not included in this |
326 // count. We use this count of pending sheets to detect when we can begin | 334 // count. We use this count of pending sheets to detect when we can begin |
327 // attaching elements and when it is safe to execute scripts. | 335 // attaching elements and when it is safe to execute scripts. |
328 int m_pendingScriptBlockingStylesheets = 0; | 336 int m_pendingScriptBlockingStylesheets = 0; |
329 int m_pendingRenderBlockingStylesheets = 0; | 337 int m_pendingRenderBlockingStylesheets = 0; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 375 |
368 std::unique_ptr<StyleResolverStats> m_styleResolverStats; | 376 std::unique_ptr<StyleResolverStats> m_styleResolverStats; |
369 unsigned m_styleForElementCount = 0; | 377 unsigned m_styleForElementCount = 0; |
370 | 378 |
371 friend class StyleEngineTest; | 379 friend class StyleEngineTest; |
372 }; | 380 }; |
373 | 381 |
374 } // namespace blink | 382 } // namespace blink |
375 | 383 |
376 #endif | 384 #endif |
OLD | NEW |