Index: third_party/WebKit/Source/core/observer/ResizeObserverController.h |
diff --git a/third_party/WebKit/Source/core/observer/ResizeObserverController.h b/third_party/WebKit/Source/core/observer/ResizeObserverController.h |
index e84ef621ee747c31a93d6245c504355aaccd05e0..4017941afb7333d757872b3c298546f22290d57d 100644 |
--- a/third_party/WebKit/Source/core/observer/ResizeObserverController.h |
+++ b/third_party/WebKit/Source/core/observer/ResizeObserverController.h |
@@ -13,17 +13,34 @@ class ResizeObserver; |
// ResizeObserverController keeps track of all ResizeObservers |
// in a single Document. |
+// |
+// The observation API is used to integrate ResizeObserver |
+// and the event loop. It delivers notification in a loop. |
+// In each iteration, only notifications deeper than the |
+// shallowest notification from previous iteration are delivered. |
class ResizeObserverController final : public GarbageCollected<ResizeObserverController> { |
public: |
+ static const size_t kDepthBottom = 4096; |
+ |
ResizeObserverController(); |
void addObserver(ResizeObserver&); |
+ // observation API |
+ // Returns depth of shallowest observed node, kDepthLimit if none. |
+ size_t gatherObservations(size_t deeperThan); |
+ bool skippedObservations(); |
ikilpatrick
2016/07/29 23:18:39
comment?
atotic1
2016/07/30 03:16:29
Done. I just did not upload changes before waiting
|
+ void deliverObservations(); |
+ void clearObservations(); |
+ void observerChanged() { m_observersChanged = true; } |
+ |
DECLARE_TRACE(); |
private: |
// Active observers |
HeapHashSet<WeakMember<ResizeObserver>> m_observers; |
+ // True if observers were changed since last notification |
ikilpatrick
2016/07/29 23:18:39
clarify comment, is this the set of observers that
atotic1
2016/07/30 03:16:29
Changed to:
// True if ANY observers were changed
|
+ bool m_observersChanged; |
}; |
} // namespace blink |