Index: Source/core/layout/LayoutObject.cpp |
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp |
index f67bca0631ff94563576be00bda7d018b589c77a..ce990606bf7180a9571f1ae15782eb809d0ede86 100644 |
--- a/Source/core/layout/LayoutObject.cpp |
+++ b/Source/core/layout/LayoutObject.cpp |
@@ -36,6 +36,8 @@ |
#include "core/editing/EditingBoundary.h" |
#include "core/editing/FrameSelection.h" |
#include "core/editing/htmlediting.h" |
+#include "core/events/Event.h" |
+#include "core/events/EventQueue.h" |
#include "core/fetch/ResourceLoadPriorityOptimizer.h" |
#include "core/fetch/ResourceLoader.h" |
#include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h" |
@@ -1822,6 +1824,15 @@ void LayoutObject::setStyle(PassRefPtr<ComputedStyle> style) |
setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); |
else if (diff.needsPaintInvalidationObject() || updatedDiff.needsPaintInvalidationObject()) |
setShouldDoFullPaintInvalidation(); |
+ |
+ // Dispatch a resize event to our owning node if requested. |
+ if (m_bitfields.sendResizeEvent() && m_node) { |
fs
2015/07/08 09:31:00
I think it would be better just put this mechanism
liberato (no reviews please)
2015/07/09 12:10:56
thanks! I added a call to LayoutMedia::layout() t
|
+ RefPtrWillBeRawPtr<Event> event = Event::create(EventTypeNames::resize); |
+ event->setTarget(m_node); |
+ LocalDOMWindow* win = document().executingWindow(); |
+ if (win) |
+ win->eventQueue()->enqueueEvent(event); |
+ } |
} |
static inline bool layoutObjectHasBackground(const LayoutObject* layoutObject) |