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

Unified Diff: Source/core/layout/LayoutView.h

Issue 1330633003: Intersection Observer first draft Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix segfault on null input. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/LayoutView.h
diff --git a/Source/core/layout/LayoutView.h b/Source/core/layout/LayoutView.h
index ea2d26fb1293418ec90d06deeb704c0e50177288..46386f95dc17e14df5579f7958a26201d1ef5fc8 100644
--- a/Source/core/layout/LayoutView.h
+++ b/Source/core/layout/LayoutView.h
@@ -43,6 +43,8 @@ namespace blink {
class DeprecatedPaintLayerCompositor;
class LayoutQuote;
+using IntersectionObserverTargetMap = HashMap<LayoutObject*, FloatRect>;
+
// The root of the layout tree, corresponding to the CSS initial containing block.
// It's dimensions match that of the logical viewport (which may be different from
// the visible viewport in fixed-layout mode), and it is always at position (0,0)
@@ -189,6 +191,10 @@ public:
// It is very likely you do not want to call this method.
void setShouldDoFullPaintInvalidationForViewAndAllDescendants();
+ void addIntersectionObserverTarget(LayoutObject*);
+ void removeIntersectionObserverTarget(LayoutObject*);
+ void computeIntersectionObservations(const FloatRect&);
+
private:
void mapLocalToContainer(const LayoutBoxModelObject* paintInvalidationContainer, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const override;
@@ -234,6 +240,8 @@ private:
OwnPtrWillBePersistent<HitTestCache> m_hitTestCache;
OwnPtrWillBePersistent<PendingSelection> m_pendingSelection;
+
+ IntersectionObserverTargetMap m_intersectionObserverTargets;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());

Powered by Google App Engine
This is Rietveld 408576698