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

Unified Diff: Source/core/layout/LayoutObject.cpp

Issue 1156993013: New media playback UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: manual rebaseline. Created 5 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
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)

Powered by Google App Engine
This is Rietveld 408576698