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

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

Issue 2150443002: Supplement should have a Member to the corresponding Supplementable object (Part 1) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/CSSSelectorWatch.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) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 void watchCSSSelectors(const Vector<String>& selectors); 53 void watchCSSSelectors(const Vector<String>& selectors);
54 const HeapVector<Member<StyleRule>>& watchedCallbackSelectors() const { retu rn m_watchedCallbackSelectors; } 54 const HeapVector<Member<StyleRule>>& watchedCallbackSelectors() const { retu rn m_watchedCallbackSelectors; }
55 55
56 void updateSelectorMatches(const Vector<String>& removedSelectors, const Vec tor<String>& addedSelectors); 56 void updateSelectorMatches(const Vector<String>& removedSelectors, const Vec tor<String>& addedSelectors);
57 57
58 DECLARE_VIRTUAL_TRACE(); 58 DECLARE_VIRTUAL_TRACE();
59 59
60 private: 60 private:
61 explicit CSSSelectorWatch(Document&); 61 explicit CSSSelectorWatch(Document&);
62 void callbackSelectorChangeTimerFired(TimerBase*); 62 void callbackSelectorChangeTimerFired(TimerBase*);
63 Document& document() const { return *m_document; } 63 Document& document() const { return *host(); }
64
65 Member<Document> m_document;
66 64
67 HeapVector<Member<StyleRule>> m_watchedCallbackSelectors; 65 HeapVector<Member<StyleRule>> m_watchedCallbackSelectors;
68 66
69 // Maps a CSS selector string with a -webkit-callback property to the number 67 // Maps a CSS selector string with a -webkit-callback property to the number
70 // of matching ComputedStyle objects in this document. 68 // of matching ComputedStyle objects in this document.
71 HashCountedSet<String> m_matchingCallbackSelectors; 69 HashCountedSet<String> m_matchingCallbackSelectors;
72 // Selectors are relative to m_matchingCallbackSelectors's contents at 70 // Selectors are relative to m_matchingCallbackSelectors's contents at
73 // the previous call to selectorMatchChanged. 71 // the previous call to selectorMatchChanged.
74 HashSet<String> m_addedSelectors; 72 HashSet<String> m_addedSelectors;
75 HashSet<String> m_removedSelectors; 73 HashSet<String> m_removedSelectors;
76 74
77 Timer<CSSSelectorWatch> m_callbackSelectorChangeTimer; 75 Timer<CSSSelectorWatch> m_callbackSelectorChangeTimer;
78 76
79 // When an element is reparented, the new location's style is evaluated afte r the expriation of the relayout timer. 77 // When an element is reparented, the new location's style is evaluated afte r the expriation of the relayout timer.
80 // We don't want to send redundant callbacks to the embedder, so this counte r lets us wait another time around the event loop. 78 // 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 int m_timerExpirations; 79 int m_timerExpirations;
82 80
83 friend class CSSSelectorWatchTest; 81 friend class CSSSelectorWatchTest;
84 }; 82 };
85 83
86 } // namespace blink 84 } // namespace blink
87 85
88 #endif // CSSSelectorWatch_h 86 #endif // CSSSelectorWatch_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698