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

Side by Side Diff: third_party/WebKit/Source/core/dom/CSSSelectorWatch.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "core/dom/Document.h" 36 #include "core/dom/Document.h"
37 #include "platform/Timer.h" 37 #include "platform/Timer.h"
38 #include "wtf/HashCountedSet.h" 38 #include "wtf/HashCountedSet.h"
39 #include "wtf/HashSet.h" 39 #include "wtf/HashSet.h"
40 #include "wtf/RefPtr.h" 40 #include "wtf/RefPtr.h"
41 #include "wtf/Vector.h" 41 #include "wtf/Vector.h"
42 #include "wtf/text/WTFString.h" 42 #include "wtf/text/WTFString.h"
43 43
44 namespace blink { 44 namespace blink {
45 45
46 class CORE_EXPORT CSSSelectorWatch final : public NoBaseWillBeGarbageCollectedFi nalized<CSSSelectorWatch>, public WillBeHeapSupplement<Document> { 46 class CORE_EXPORT CSSSelectorWatch final : public GarbageCollectedFinalized<CSSS electorWatch>, public HeapSupplement<Document> {
47 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(CSSSelectorWatch); 47 USING_GARBAGE_COLLECTED_MIXIN(CSSSelectorWatch);
48 USING_FAST_MALLOC_WILL_BE_REMOVED(CSSSelectorWatch);
49 public: 48 public:
50 virtual ~CSSSelectorWatch() { } 49 virtual ~CSSSelectorWatch() { }
51 50
52 static CSSSelectorWatch& from(Document&); 51 static CSSSelectorWatch& from(Document&);
53 static CSSSelectorWatch* fromIfExists(Document&); 52 static CSSSelectorWatch* fromIfExists(Document&);
54 53
55 void watchCSSSelectors(const Vector<String>& selectors); 54 void watchCSSSelectors(const Vector<String>& selectors);
56 const WillBeHeapVector<RefPtrWillBeMember<StyleRule>>& watchedCallbackSelect ors() const { return m_watchedCallbackSelectors; } 55 const HeapVector<Member<StyleRule>>& watchedCallbackSelectors() const { retu rn m_watchedCallbackSelectors; }
57 56
58 void updateSelectorMatches(const Vector<String>& removedSelectors, const Vec tor<String>& addedSelectors); 57 void updateSelectorMatches(const Vector<String>& removedSelectors, const Vec tor<String>& addedSelectors);
59 58
60 DECLARE_VIRTUAL_TRACE(); 59 DECLARE_VIRTUAL_TRACE();
61 60
62 private: 61 private:
63 explicit CSSSelectorWatch(Document&); 62 explicit CSSSelectorWatch(Document&);
64 void callbackSelectorChangeTimerFired(Timer<CSSSelectorWatch>*); 63 void callbackSelectorChangeTimerFired(Timer<CSSSelectorWatch>*);
65 Document& document() const { return *m_document; } 64 Document& document() const { return *m_document; }
66 65
67 RawPtrWillBeMember<Document> m_document; 66 Member<Document> m_document;
68 67
69 WillBeHeapVector<RefPtrWillBeMember<StyleRule>> m_watchedCallbackSelectors; 68 HeapVector<Member<StyleRule>> m_watchedCallbackSelectors;
70 69
71 // Maps a CSS selector string with a -webkit-callback property to the number 70 // Maps a CSS selector string with a -webkit-callback property to the number
72 // of matching ComputedStyle objects in this document. 71 // of matching ComputedStyle objects in this document.
73 HashCountedSet<String> m_matchingCallbackSelectors; 72 HashCountedSet<String> m_matchingCallbackSelectors;
74 // Selectors are relative to m_matchingCallbackSelectors's contents at 73 // Selectors are relative to m_matchingCallbackSelectors's contents at
75 // the previous call to selectorMatchChanged. 74 // the previous call to selectorMatchChanged.
76 HashSet<String> m_addedSelectors; 75 HashSet<String> m_addedSelectors;
77 HashSet<String> m_removedSelectors; 76 HashSet<String> m_removedSelectors;
78 77
79 Timer<CSSSelectorWatch> m_callbackSelectorChangeTimer; 78 Timer<CSSSelectorWatch> m_callbackSelectorChangeTimer;
80 79
81 // When an element is reparented, the new location's style is evaluated afte r the expriation of the relayout timer. 80 // When an element is reparented, the new location's style is evaluated afte r the expriation of the relayout timer.
82 // We don't want to send redundant callbacks to the embedder, so this counte r lets us wait another time around the event loop. 81 // We don't want to send redundant callbacks to the embedder, so this counte r lets us wait another time around the event loop.
83 int m_timerExpirations; 82 int m_timerExpirations;
84 }; 83 };
85 84
86 } // namespace blink 85 } // namespace blink
87 86
88 #endif // CSSSelectorWatch_h 87 #endif // CSSSelectorWatch_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698