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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2096783004: Seperate visualviewportchanged event into scroll and resize events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 15eaf7ba9f5311b20e89f6e14f48044d98ce5bbd..81a175048f2d2777f31f948d5feab6176565e402 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -127,6 +127,7 @@
#include "core/events/ScopedEventQueue.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/frame/DOMTimer.h"
+#include "core/frame/DOMVisualViewport.h"
#include "core/frame/EventHandlerRegistry.h"
#include "core/frame/FrameConsole.h"
#include "core/frame/FrameHost.h"
@@ -3901,10 +3902,17 @@ void Document::enqueueMediaQueryChangeListeners(HeapVector<Member<MediaQueryList
ensureScriptedAnimationController().enqueueMediaQueryChangeListeners(listeners);
}
-void Document::enqueueVisualViewportChangedEvent()
+void Document::enqueueVisualViewportScrollEvent()
{
- Event* event = Event::create(EventTypeNames::visualviewportchanged);
- event->setTarget(domWindow());
+ Event* event = Event::create(EventTypeNames::scroll);
+ event->setTarget(domWindow()->visualViewport());
+ ensureScriptedAnimationController().enqueuePerFrameEvent(event);
+}
+
+void Document::enqueueVisualViewportResizeEvent()
+{
+ Event* event = Event::create(EventTypeNames::resize);
+ event->setTarget(domWindow()->visualViewport());
ensureScriptedAnimationController().enqueuePerFrameEvent(event);
}

Powered by Google App Engine
This is Rietveld 408576698