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

Side by Side Diff: Source/core/dom/CSSSelectorWatch.cpp

Issue 31063004: Have Frame::loader() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/custom/V8WindowCustom.cpp ('k') | Source/core/dom/DOMImplementation.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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8WindowCustom.cpp ('k') | Source/core/dom/DOMImplementation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698