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

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

Issue 2174023002: Add UseCounters for ViewportAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: 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 93c32e8c16a849dad8397c059577c2ca848fd277..1d8cea0aaa7c1b877bcb956c1ebdeb07c8dc8cab 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -126,6 +126,8 @@
#include "core/events/HashChangeEvent.h"
#include "core/events/PageTransitionEvent.h"
#include "core/events/ScopedEventQueue.h"
+#include "core/events/VisualViewportResizeEvent.h"
+#include "core/events/VisualViewportScrollEvent.h"
#include "core/fetch/ResourceFetcher.h"
#include "core/frame/DOMTimer.h"
#include "core/frame/DOMVisualViewport.h"
@@ -3924,14 +3926,14 @@ void Document::enqueueMediaQueryChangeListeners(HeapVector<Member<MediaQueryList
void Document::enqueueVisualViewportScrollEvent()
{
- Event* event = Event::create(EventTypeNames::scroll);
+ VisualViewportScrollEvent* event = VisualViewportScrollEvent::create();
event->setTarget(domWindow()->visualViewport());
ensureScriptedAnimationController().enqueuePerFrameEvent(event);
}
void Document::enqueueVisualViewportResizeEvent()
{
- Event* event = Event::create(EventTypeNames::resize);
+ VisualViewportResizeEvent* event = VisualViewportResizeEvent::create();
event->setTarget(domWindow()->visualViewport());
ensureScriptedAnimationController().enqueuePerFrameEvent(event);
}
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/events/VisualViewportResizeEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698