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

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: Fix incorrect assumption 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..c5308607efb407fab7d55ccca12b4fd2d870e330 100644
--- a/Source/core/events/TouchEvent.cpp
+++ b/Source/core/events/TouchEvent.cpp
@@ -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()->frame() && view()->frame()->isLocalFrame()) {
haraken 2014/11/08 09:17:25 Nit: Can we check view()->isLocalWindow() instead
dcheng 2014/11/08 23:59:56 Done.
+ toLocalFrame(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