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

Unified Diff: third_party/WebKit/Source/core/observer/ResizeObservation.h

Issue 2173203002: ResizeObserver pt3: observation computation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing CORE_EXPORT Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/observer/ResizeObservation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/observer/ResizeObservation.h
diff --git a/third_party/WebKit/Source/core/observer/ResizeObservation.h b/third_party/WebKit/Source/core/observer/ResizeObservation.h
index b1a3f796b2a189dd69be6bd91829aa2b76d9415b..18b6f0ef3a45ad2aa5fae9a3121f5758c2f7096c 100644
--- a/third_party/WebKit/Source/core/observer/ResizeObservation.h
+++ b/third_party/WebKit/Source/core/observer/ResizeObservation.h
@@ -15,18 +15,25 @@ class Element;
class ResizeObserver;
// ResizeObservation represents an element that is being observed.
-class ResizeObservation final : public GarbageCollected<ResizeObservation> {
+class CORE_EXPORT ResizeObservation final : public GarbageCollected<ResizeObservation> {
public:
ResizeObservation(Element* target, ResizeObserver*);
Element* target() const { return m_target; }
+ size_t targetDepth();
+ void setObservationSize(const LayoutSize&);
+ // True if observationSize differs from target's current size.
+ bool observationSizeOutOfSync() const;
+
+ static LayoutSize getTargetSize(Element* target);
DECLARE_TRACE();
private:
WeakMember<Element> m_target;
-
Member<ResizeObserver> m_observer;
+ // Target size sent in last observation notification.
+ LayoutSize m_observationSize;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/observer/ResizeObservation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698