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

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

Issue 2877893002: Make UseCounter take a LocaFrame instead of any Frame (Closed)
Patch Set: Fix compile 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 42bbce10dd40086d566e994847e00283e91b61c4..7248df4bf55f06308cd1a567f73aad353f6a1263 100644
--- a/third_party/WebKit/Source/core/events/TouchEvent.cpp
+++ b/third_party/WebKit/Source/core/events/TouchEvent.cpp
@@ -266,9 +266,9 @@ void TouchEvent::preventDefault() {
case PassiveMode::kNotPassive:
case PassiveMode::kNotPassiveDefault:
if (!cancelable()) {
- if (view() && view()->GetFrame()) {
+ if (view() && view()->IsLocalDOMWindow() && view()->GetFrame()) {
UseCounter::Count(
- view()->GetFrame(),
+ ToLocalFrame(view()->GetFrame()),
UseCounter::kUncancelableTouchEventPreventDefaulted);
}
@@ -277,9 +277,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);
}
@@ -323,16 +323,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