OLD | NEW |
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 if (m_timerExpirations < 1) { | 70 if (m_timerExpirations < 1) { |
71 m_timerExpirations++; | 71 m_timerExpirations++; |
72 m_callbackSelectorChangeTimer.startOneShot(0); | 72 m_callbackSelectorChangeTimer.startOneShot(0); |
73 return; | 73 return; |
74 } | 74 } |
75 if (m_document.frame()) { | 75 if (m_document.frame()) { |
76 Vector<String> addedSelectors; | 76 Vector<String> addedSelectors; |
77 Vector<String> removedSelectors; | 77 Vector<String> removedSelectors; |
78 copyToVector(m_addedSelectors, addedSelectors); | 78 copyToVector(m_addedSelectors, addedSelectors); |
79 copyToVector(m_removedSelectors, removedSelectors); | 79 copyToVector(m_removedSelectors, removedSelectors); |
80 m_document.frame()->loader()->client()->selectorMatchChanged(addedSelect
ors, removedSelectors); | 80 m_document.frame()->loader().client()->selectorMatchChanged(addedSelecto
rs, removedSelectors); |
81 } | 81 } |
82 m_addedSelectors.clear(); | 82 m_addedSelectors.clear(); |
83 m_removedSelectors.clear(); | 83 m_removedSelectors.clear(); |
84 m_timerExpirations = 0; | 84 m_timerExpirations = 0; |
85 } | 85 } |
86 | 86 |
87 void CSSSelectorWatch::updateSelectorMatches(const Vector<String>& removedSelect
ors, const Vector<String>& addedSelectors) | 87 void CSSSelectorWatch::updateSelectorMatches(const Vector<String>& removedSelect
ors, const Vector<String>& addedSelectors) |
88 { | 88 { |
89 bool shouldUpdateTimer = false; | 89 bool shouldUpdateTimer = false; |
90 | 90 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 | 166 |
167 RefPtr<StyleRule> rule = StyleRule::create(); | 167 RefPtr<StyleRule> rule = StyleRule::create(); |
168 rule->wrapperAdoptSelectorList(selectorList); | 168 rule->wrapperAdoptSelectorList(selectorList); |
169 rule->setProperties(callbackPropertySet); | 169 rule->setProperties(callbackPropertySet); |
170 m_watchedCallbackSelectors.append(rule.release()); | 170 m_watchedCallbackSelectors.append(rule.release()); |
171 } | 171 } |
172 m_document.changedSelectorWatch(); | 172 m_document.changedSelectorWatch(); |
173 } | 173 } |
174 | 174 |
175 } // namespace WebCore | 175 } // namespace WebCore |
OLD | NEW |