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

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

Issue 1330633003: Intersection Observer first draft Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Lost newline in merge 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: third_party/WebKit/Source/core/layout/LayoutView.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.h b/third_party/WebKit/Source/core/layout/LayoutView.h
index 6772b76e061f5d27b95485512cea58f1c990a9c9..fb87c448702553ca2b0bcf692293262208619416 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.h
+++ b/third_party/WebKit/Source/core/layout/LayoutView.h
@@ -41,6 +41,8 @@ namespace blink {
class DeprecatedPaintLayerCompositor;
class LayoutQuote;
+using IntersectionObserverTargetMap = HashMap<LayoutObject*, FloatRect>;
+
// LayoutView is the root of the layout tree and the Document's LayoutObject.
//
// It corresponds to the CSS concept of 'initial containing block' (or ICB).
@@ -198,6 +200,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;
@@ -260,6 +266,8 @@ private:
unsigned m_hitTestCount;
unsigned m_hitTestCacheHits;
OwnPtrWillBePersistent<HitTestCache> m_hitTestCache;
+
+ IntersectionObserverTargetMap m_intersectionObserverTargets;
};
DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698