Index: third_party/WebKit/Source/core/dom/Element.cpp |
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp |
index 9cce24f6a0f58afd4ba5c6ec0704733e4ab0c8db..4d44a2acef7ff89f183d502581ed23fa55e4acff 100644 |
--- a/third_party/WebKit/Source/core/dom/Element.cpp |
+++ b/third_party/WebKit/Source/core/dom/Element.cpp |
@@ -116,6 +116,7 @@ |
#include "core/layout/api/LayoutBoxItem.h" |
#include "core/layout/api/LayoutViewItem.h" |
#include "core/loader/DocumentLoader.h" |
+#include "core/observer/ResizeObservation.h" |
#include "core/page/ChromeClient.h" |
#include "core/page/FocusController.h" |
#include "core/page/Page.h" |
@@ -1623,6 +1624,8 @@ void Element::detachLayoutTree(const AttachContext& context) |
if (svgFilterNeedsLayerUpdate()) |
document().unscheduleSVGFilterLayerUpdateHack(*this); |
+ sizeMayHaveChanged(); |
+ |
DCHECK(needsAttach()); |
} |
@@ -2689,6 +2692,14 @@ HeapHashMap<Member<ResizeObserver>, Member<ResizeObservation>>& Element::ensureR |
return ensureElementRareData().ensureResizeObserverData(); |
} |
+void Element::sizeMayHaveChanged() |
+{ |
+ if (auto* data = resizeObserverData()) { |
+ for (auto& observation : data->values()) |
+ observation->elementSizeChanged(); |
+ } |
+} |
+ |
// Step 1 of http://domparsing.spec.whatwg.org/#insertadjacenthtml() |
static Element* contextElementForInsertion(const String& where, Element* element, ExceptionState& exceptionState) |
{ |