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

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

Issue 2877893002: Make UseCounter take a LocaFrame instead of any Frame (Closed)
Patch Set: Rebase Created 3 years, 7 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/events/TouchEvent.cpp
diff --git a/third_party/WebKit/Source/core/events/TouchEvent.cpp b/third_party/WebKit/Source/core/events/TouchEvent.cpp
index 481207383cb7f484320e39fe3800b1b9ebfefe15..5ddc0da42a2e8ab0bf6997827ba6bf281a88d6b1 100644
--- a/third_party/WebKit/Source/core/events/TouchEvent.cpp
+++ b/third_party/WebKit/Source/core/events/TouchEvent.cpp
@@ -260,9 +260,9 @@ void TouchEvent::preventDefault() {
case PassiveMode::kNotPassive:
case PassiveMode::kNotPassiveDefault:
if (!cancelable()) {
- if (view() && view()->GetFrame()) {
+ if (view() && view()->IsLocalDOMWindow() && view()->GetFrame()) {
dcheng 2017/05/12 22:15:18 This makes me a little sad, but unfortunately, I s
Rick Byers 2017/05/25 15:32:31 Yeah I can't imagine a use case, but it would also
UseCounter::Count(
- view()->GetFrame(),
+ ToLocalFrame(view()->GetFrame()),
UseCounter::kUncancelableTouchEventPreventDefaulted);
}
@@ -271,9 +271,9 @@ void TouchEvent::preventDefault() {
WebInputEvent::
kListenersForcedNonBlockingDueToMainThreadResponsiveness) {
// Non blocking due to main thread responsiveness.
- if (view() && view()->GetFrame()) {
+ if (view() && view()->IsLocalDOMWindow() && view()->GetFrame()) {
UseCounter::Count(
- view()->GetFrame(),
+ ToLocalFrame(view()->GetFrame()),
UseCounter::
kUncancelableTouchEventDueToMainThreadResponsivenessPreventDefaulted);
}
@@ -317,16 +317,16 @@ void TouchEvent::preventDefault() {
if ((type() == EventTypeNames::touchstart ||
type() == EventTypeNames::touchmove) &&
- view() && view()->GetFrame() &&
+ view() && view()->IsLocalDOMWindow() && view()->GetFrame() &&
current_touch_action_ == TouchAction::kTouchActionAuto) {
switch (HandlingPassive()) {
case PassiveMode::kNotPassiveDefault:
- UseCounter::Count(view()->GetFrame(),
+ UseCounter::Count(ToLocalFrame(view()->GetFrame()),
UseCounter::kTouchEventPreventedNoTouchAction);
break;
case PassiveMode::kPassiveForcedDocumentLevel:
UseCounter::Count(
- view()->GetFrame(),
+ ToLocalFrame(view()->GetFrame()),
UseCounter::kTouchEventPreventedForcedDocumentPassiveNoTouchAction);
break;
default:

Powered by Google App Engine
This is Rietveld 408576698