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

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

Issue 2475643004: Monitor the intersection of video and viewport. (Closed)
Patch Set: Add ElementViewportRatioObserver. 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 #ifndef IntersectionObservation_h 5 #ifndef IntersectionObservation_h
6 #define IntersectionObservation_h 6 #define IntersectionObservation_h
7 7
8 #include "core/dom/DOMHighResTimeStamp.h" 8 #include "core/dom/DOMHighResTimeStamp.h"
9 #include "platform/geometry/LayoutRect.h" 9 #include "platform/geometry/LayoutRect.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void mapRootRectToRootFrameCoordinates(LayoutRect&) const; 51 void mapRootRectToRootFrameCoordinates(LayoutRect&) const;
52 void mapRootRectToTargetFrameCoordinates(LayoutRect&) const; 52 void mapRootRectToTargetFrameCoordinates(LayoutRect&) const;
53 bool computeGeometry(IntersectionGeometry&) const; 53 bool computeGeometry(IntersectionGeometry&) const;
54 54
55 Member<IntersectionObserver> m_observer; 55 Member<IntersectionObserver> m_observer;
56 56
57 WeakMember<Element> m_target; 57 WeakMember<Element> m_target;
58 58
59 unsigned m_shouldReportRootBounds : 1; 59 unsigned m_shouldReportRootBounds : 1;
60 unsigned m_lastThresholdIndex : 30; 60 unsigned m_lastThresholdIndex : 30;
61 float m_lastVisibleRatio = std::numeric_limits<float>::min();
61 }; 62 };
62 63
63 } // namespace blink 64 } // namespace blink
64 65
65 #endif // IntersectionObservation_h 66 #endif // IntersectionObservation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698