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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 DECLARE_VIRTUAL_TRACE(); | 260 DECLARE_VIRTUAL_TRACE(); |
261 DECLARE_TRACE_WRAPPERS(); | 261 DECLARE_TRACE_WRAPPERS(); |
262 | 262 |
263 private: | 263 private: |
264 // CSSFontSelectorClient implementation. | 264 // CSSFontSelectorClient implementation. |
265 void fontsNeedUpdate(CSSFontSelector*) override; | 265 void fontsNeedUpdate(CSSFontSelector*) override; |
266 | 266 |
267 private: | 267 private: |
268 StyleEngine(Document&); | 268 StyleEngine(Document&); |
269 bool needsActiveStyleSheetUpdate() const { | 269 bool needsActiveStyleSheetUpdate() const { |
270 return m_allTreeScopesDirty || m_documentScopeDirty || | 270 return m_allTreeScopesDirty || m_treeScopesRemoved || |
271 m_dirtyTreeScopes.size(); | 271 m_documentScopeDirty || m_dirtyTreeScopes.size(); |
272 } | 272 } |
273 | 273 |
274 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); | 274 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); |
275 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&); | 275 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&); |
276 bool shouldUpdateDocumentStyleSheetCollection() const; | 276 bool shouldUpdateDocumentStyleSheetCollection() const; |
277 bool shouldUpdateShadowTreeStyleSheetCollection() const; | 277 bool shouldUpdateShadowTreeStyleSheetCollection() const; |
278 | 278 |
279 void markDocumentDirty(); | 279 void markDocumentDirty(); |
280 void markTreeScopeDirty(TreeScope&); | 280 void markTreeScopeDirty(TreeScope&); |
281 | 281 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 | 346 |
347 Member<StyleRuleUsageTracker> m_tracker; | 347 Member<StyleRuleUsageTracker> m_tracker; |
348 | 348 |
349 using StyleSheetCollectionMap = | 349 using StyleSheetCollectionMap = |
350 HeapHashMap<WeakMember<TreeScope>, | 350 HeapHashMap<WeakMember<TreeScope>, |
351 Member<ShadowTreeStyleSheetCollection>>; | 351 Member<ShadowTreeStyleSheetCollection>>; |
352 StyleSheetCollectionMap m_styleSheetCollectionMap; | 352 StyleSheetCollectionMap m_styleSheetCollectionMap; |
353 | 353 |
354 bool m_documentScopeDirty = true; | 354 bool m_documentScopeDirty = true; |
355 bool m_allTreeScopesDirty = false; | 355 bool m_allTreeScopesDirty = false; |
| 356 bool m_treeScopesRemoved = false; |
356 UnorderedTreeScopeSet m_dirtyTreeScopes; | 357 UnorderedTreeScopeSet m_dirtyTreeScopes; |
357 UnorderedTreeScopeSet m_activeTreeScopes; | 358 UnorderedTreeScopeSet m_activeTreeScopes; |
358 DocumentOrderedList m_treeBoundaryCrossingScopes; | 359 DocumentOrderedList m_treeBoundaryCrossingScopes; |
359 | 360 |
360 String m_preferredStylesheetSetName; | 361 String m_preferredStylesheetSetName; |
361 String m_selectedStylesheetSetName; | 362 String m_selectedStylesheetSetName; |
362 | 363 |
363 CSSGlobalRuleSet m_globalRuleSet; | 364 CSSGlobalRuleSet m_globalRuleSet; |
364 | 365 |
365 bool m_usesRemUnits = false; | 366 bool m_usesRemUnits = false; |
(...skipping 11 matching lines...) Expand all Loading... |
377 | 378 |
378 std::unique_ptr<StyleResolverStats> m_styleResolverStats; | 379 std::unique_ptr<StyleResolverStats> m_styleResolverStats; |
379 unsigned m_styleForElementCount = 0; | 380 unsigned m_styleForElementCount = 0; |
380 | 381 |
381 friend class StyleEngineTest; | 382 friend class StyleEngineTest; |
382 }; | 383 }; |
383 | 384 |
384 } // namespace blink | 385 } // namespace blink |
385 | 386 |
386 #endif | 387 #endif |
OLD | NEW |