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.")); |
} |
} |