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

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

Issue 2502413004: WTF/std normalization: replace WTF::Vector::last with ::back (Closed)
Patch Set: rebase Created 4 years, 1 month 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/ElementVisibilityObserver.h" 5 #include "core/dom/ElementVisibilityObserver.h"
6 6
7 #include "core/dom/Element.h" 7 #include "core/dom/Element.h"
8 #include "core/dom/IntersectionObserverEntry.h" 8 #include "core/dom/IntersectionObserverEntry.h"
9 #include "core/frame/LocalFrame.h" 9 #include "core/frame/LocalFrame.h"
10 #include "wtf/Functional.h" 10 #include "wtf/Functional.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 m_intersectionObserver->deliver(); 67 m_intersectionObserver->deliver();
68 } 68 }
69 69
70 DEFINE_TRACE(ElementVisibilityObserver) { 70 DEFINE_TRACE(ElementVisibilityObserver) {
71 visitor->trace(m_element); 71 visitor->trace(m_element);
72 visitor->trace(m_intersectionObserver); 72 visitor->trace(m_intersectionObserver);
73 } 73 }
74 74
75 void ElementVisibilityObserver::onVisibilityChanged( 75 void ElementVisibilityObserver::onVisibilityChanged(
76 const HeapVector<Member<IntersectionObserverEntry>>& entries) { 76 const HeapVector<Member<IntersectionObserverEntry>>& entries) {
77 bool isVisible = entries.last()->intersectionRatio() > 0.f; 77 bool isVisible = entries.back()->intersectionRatio() > 0.f;
78 (*m_callback.get())(isVisible); 78 (*m_callback.get())(isVisible);
79 } 79 }
80 80
81 } // namespace blink 81 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/core/dom/Fullscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698