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

Side by Side Diff: third_party/WebKit/Source/core/dom/IntersectionObserver.cpp

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, 8 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/dom/IntersectionObserver.h" 5 #include "core/dom/IntersectionObserver.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "core/css/parser/CSSParserTokenRange.h" 8 #include "core/css/parser/CSSParserTokenRange.h"
9 #include "core/css/parser/CSSTokenizer.h" 9 #include "core/css/parser/CSSTokenizer.h"
10 #include "core/dom/ExceptionCode.h" 10 #include "core/dom/ExceptionCode.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 exceptionState.throwRangeError("Threshold values must be between 0 a nd 1"); 75 exceptionState.throwRangeError("Threshold values must be between 0 a nd 1");
76 break; 76 break;
77 } 77 }
78 } 78 }
79 79
80 std::sort(thresholds.begin(), thresholds.end()); 80 std::sort(thresholds.begin(), thresholds.end());
81 } 81 }
82 82
83 IntersectionObserver* IntersectionObserver::create(const IntersectionObserverIni t& observerInit, IntersectionObserverCallback& callback, ExceptionState& excepti onState) 83 IntersectionObserver* IntersectionObserver::create(const IntersectionObserverIni t& observerInit, IntersectionObserverCallback& callback, ExceptionState& excepti onState)
84 { 84 {
85 RefPtrWillBeRawPtr<Node> root = observerInit.root(); 85 RawPtr<Node> root = observerInit.root();
86 if (!root) { 86 if (!root) {
87 // TODO(szager): Use Document instead of document element for implicit r oot. (crbug.com/570538) 87 // TODO(szager): Use Document instead of document element for implicit r oot. (crbug.com/570538)
88 ExecutionContext* context = callback.getExecutionContext(); 88 ExecutionContext* context = callback.getExecutionContext();
89 ASSERT(context->isDocument()); 89 ASSERT(context->isDocument());
90 Frame* mainFrame = toDocument(context)->frame()->tree().top(); 90 Frame* mainFrame = toDocument(context)->frame()->tree().top();
91 if (mainFrame && mainFrame->isLocalFrame()) 91 if (mainFrame && mainFrame->isLocalFrame())
92 root = toLocalFrame(mainFrame)->document(); 92 root = toLocalFrame(mainFrame)->document();
93 } 93 }
94 if (!root) { 94 if (!root) {
95 exceptionState.throwDOMException(HierarchyRequestError, "Unable to get r oot node in main frame to track."); 95 exceptionState.throwDOMException(HierarchyRequestError, "Unable to get r oot node in main frame to track.");
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 { 310 {
311 #if ENABLE(OILPAN) 311 #if ENABLE(OILPAN)
312 visitor->template registerWeakMembers<IntersectionObserver, &IntersectionObs erver::clearWeakMembers>(this); 312 visitor->template registerWeakMembers<IntersectionObserver, &IntersectionObs erver::clearWeakMembers>(this);
313 #endif 313 #endif
314 visitor->trace(m_callback); 314 visitor->trace(m_callback);
315 visitor->trace(m_observations); 315 visitor->trace(m_observations);
316 visitor->trace(m_entries); 316 visitor->trace(m_entries);
317 } 317 }
318 318
319 } // namespace blink 319 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698