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

Unified Diff: Source/core/events/TouchEvent.cpp

Issue 683013002: Extract a DOMWindow interface from LocalDOMWindow and use it in the idl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on top of DOMWindow moves and UseCounter overload for Frame Created 6 years, 1 month 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/events/TouchEvent.cpp
diff --git a/Source/core/events/TouchEvent.cpp b/Source/core/events/TouchEvent.cpp
index f05a6819042abb805b59fb967054efc7b5e313eb..54b79d776a2daf61df71294e25b020fe34c500ed 100644
--- a/Source/core/events/TouchEvent.cpp
+++ b/Source/core/events/TouchEvent.cpp
@@ -30,7 +30,7 @@
#include "core/events/EventDispatcher.h"
#include "core/frame/FrameConsole.h"
-#include "core/frame/LocalFrame.h"
+#include "core/frame/LocalDOMWindow.h"
#include "core/inspector/ConsoleMessage.h"
namespace blink {
@@ -96,8 +96,8 @@ void TouchEvent::preventDefault()
// A common developer error is to wait too long before attempting to stop
// scrolling by consuming a touchmove event. Generate a warning if this
// event is uncancelable.
- if (!cancelable() && view() && view()->frame()) {
- view()->frame()->console().addMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel,
+ if (!cancelable() && view() && view()->isLocalDOMWindow() && view()->frame()) {
haraken 2014/11/10 08:58:20 Hmm, it looks like you're assuming that AbstractVi
dcheng 2014/11/10 09:29:43 I need to double check, but I think it is possible
+ toLocalDOMWindow(view())->frame()->console().addMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel,
"Ignored attempt to cancel a " + type() + " event with cancelable=false, for example because scrolling is in progress and cannot be interrupted."));
}
}

Powered by Google App Engine
This is Rietveld 408576698