| 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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2011 Google Inc. All rights reserved. | 9 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "core/css/CSSFontSelectorClient.h" | 32 #include "core/css/CSSFontSelectorClient.h" |
| 33 #include "core/css/invalidation/StyleInvalidator.h" | 33 #include "core/css/invalidation/StyleInvalidator.h" |
| 34 #include "core/css/resolver/StyleResolver.h" | 34 #include "core/css/resolver/StyleResolver.h" |
| 35 #include "core/css/resolver/StyleResolverStats.h" | 35 #include "core/css/resolver/StyleResolverStats.h" |
| 36 #include "core/dom/Document.h" | 36 #include "core/dom/Document.h" |
| 37 #include "core/dom/DocumentOrderedList.h" | 37 #include "core/dom/DocumentOrderedList.h" |
| 38 #include "core/dom/DocumentStyleSheetCollection.h" | 38 #include "core/dom/DocumentStyleSheetCollection.h" |
| 39 #include "core/dom/StyleEngineContext.h" | 39 #include "core/dom/StyleEngineContext.h" |
| 40 #include "platform/heap/Handle.h" | 40 #include "platform/heap/Handle.h" |
| 41 #include "wtf/Allocator.h" | 41 #include "wtf/Allocator.h" |
| 42 #include "wtf/AutoReset.h" |
| 42 #include "wtf/ListHashSet.h" | 43 #include "wtf/ListHashSet.h" |
| 43 #include "wtf/TemporaryChange.h" | |
| 44 #include "wtf/Vector.h" | 44 #include "wtf/Vector.h" |
| 45 #include "wtf/text/WTFString.h" | 45 #include "wtf/text/WTFString.h" |
| 46 #include <memory> | 46 #include <memory> |
| 47 | 47 |
| 48 namespace blink { | 48 namespace blink { |
| 49 | 49 |
| 50 class CSSFontSelector; | 50 class CSSFontSelector; |
| 51 class CSSStyleSheet; | 51 class CSSStyleSheet; |
| 52 class Node; | 52 class Node; |
| 53 class RuleFeatureSet; | 53 class RuleFeatureSet; |
| 54 class ShadowTreeStyleSheetCollection; | 54 class ShadowTreeStyleSheetCollection; |
| 55 class StyleRuleFontFace; | 55 class StyleRuleFontFace; |
| 56 class StyleSheet; | 56 class StyleSheet; |
| 57 class StyleSheetContents; | 57 class StyleSheetContents; |
| 58 | 58 |
| 59 class CORE_EXPORT StyleEngine final : public GarbageCollectedFinalized<StyleEngi
ne>, public CSSFontSelectorClient { | 59 class CORE_EXPORT StyleEngine final : public GarbageCollectedFinalized<StyleEngi
ne>, public CSSFontSelectorClient { |
| 60 USING_GARBAGE_COLLECTED_MIXIN(StyleEngine); | 60 USING_GARBAGE_COLLECTED_MIXIN(StyleEngine); |
| 61 public: | 61 public: |
| 62 | 62 |
| 63 class IgnoringPendingStylesheet : public TemporaryChange<bool> { | 63 class IgnoringPendingStylesheet { |
| 64 DISALLOW_NEW(); | 64 DISALLOW_NEW(); |
| 65 public: | 65 public: |
| 66 IgnoringPendingStylesheet(StyleEngine& engine) | 66 IgnoringPendingStylesheet(StyleEngine& engine) |
| 67 : TemporaryChange<bool>(engine.m_ignorePendingStylesheets, true) | 67 : m_scope(&engine.m_ignorePendingStylesheets, true) |
| 68 { | 68 { |
| 69 } | 69 } |
| 70 private: |
| 71 AutoReset<bool> m_scope; |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 friend class IgnoringPendingStylesheet; | 74 friend class IgnoringPendingStylesheet; |
| 73 | 75 |
| 74 static StyleEngine* create(Document& document) { return new StyleEngine(docu
ment); } | 76 static StyleEngine* create(Document& document) { return new StyleEngine(docu
ment); } |
| 75 | 77 |
| 76 ~StyleEngine(); | 78 ~StyleEngine(); |
| 77 | 79 |
| 78 const HeapVector<Member<StyleSheet>>& styleSheetsForStyleSheetList(TreeScope
&); | 80 const HeapVector<Member<StyleSheet>>& styleSheetsForStyleSheetList(TreeScope
&); |
| 79 | 81 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 | 272 |
| 271 std::unique_ptr<StyleResolverStats> m_styleResolverStats; | 273 std::unique_ptr<StyleResolverStats> m_styleResolverStats; |
| 272 unsigned m_styleForElementCount = 0; | 274 unsigned m_styleForElementCount = 0; |
| 273 | 275 |
| 274 friend class StyleEngineTest; | 276 friend class StyleEngineTest; |
| 275 }; | 277 }; |
| 276 | 278 |
| 277 } // namespace blink | 279 } // namespace blink |
| 278 | 280 |
| 279 #endif | 281 #endif |
| OLD | NEW |