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

Side by Side Diff: third_party/WebKit/Source/core/input/TouchEventManager.cpp

Issue 2245133006: CL for perf tryjob on win (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CL for perf tryjob on mac Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/input/TouchEventManager.h" 5 #include "core/input/TouchEventManager.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/events/TouchEvent.h" 8 #include "core/events/TouchEvent.h"
9 #include "core/frame/Deprecation.h" 9 #include "core/frame/Deprecation.h"
10 #include "core/frame/EventHandlerRegistry.h" 10 #include "core/frame/EventHandlerRegistry.h"
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 allTouchesReleased = false; 453 allTouchesReleased = false;
454 } 454 }
455 455
456 // Whether a touch should be considered a "user gesture" or not is a tricky question. 456 // Whether a touch should be considered a "user gesture" or not is a tricky question.
457 // https://docs.google.com/document/d/1oF1T3O7_E4t1PYHV6gyCwHxOi3ystm0eSL5xZ u7nvOg/edit# 457 // https://docs.google.com/document/d/1oF1T3O7_E4t1PYHV6gyCwHxOi3ystm0eSL5xZ u7nvOg/edit#
458 458
459 // The touchend corresponding to a tap is always a user gesture. 459 // The touchend corresponding to a tap is always a user gesture.
460 bool isTap = event.touchPoints().size() == 1 460 bool isTap = event.touchPoints().size() == 1
461 && event.touchPoints()[0].state() == PlatformTouchPoint::TouchReleased 461 && event.touchPoints()[0].state() == PlatformTouchPoint::TouchReleased
462 && !event.causesScrollingIfUncanceled(); 462 && !event.causesScrollingIfUncanceled();
463 463 VLOG(0) << "TouchEventManager::handleTouchEvent: " << isTap;
464 // For now, disallow dragging as a user gesture when the events are being se nt to a 464 // For now, disallow dragging as a user gesture when the events are being se nt to a
465 // cross-origin iframe (crbug.com/582140). 465 // cross-origin iframe (crbug.com/582140).
466 bool isSameOrigin = false; 466 bool isSameOrigin = false;
467 if (m_touchSequenceDocument && m_touchSequenceDocument->frame()) { 467 if (m_touchSequenceDocument && m_touchSequenceDocument->frame()) {
468 SecurityOrigin* securityOrigin = m_touchSequenceDocument->frame()->secur ityContext()->getSecurityOrigin(); 468 SecurityOrigin* securityOrigin = m_touchSequenceDocument->frame()->secur ityContext()->getSecurityOrigin();
469 Frame* top = m_frame->tree().top(); 469 Frame* top = m_frame->tree().top();
470 if (top && securityOrigin->canAccess(top->securityContext()->getSecurity Origin())) 470 if (top && securityOrigin->canAccess(top->securityContext()->getSecurity Origin()))
471 isSameOrigin = true; 471 isSameOrigin = true;
472 } 472 }
473 473
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 feature = UseCounter::TouchEndDuringScrollUserGestureUtilized; 533 feature = UseCounter::TouchEndDuringScrollUserGestureUtilized;
534 break; 534 break;
535 default: 535 default:
536 NOTREACHED(); 536 NOTREACHED();
537 return; 537 return;
538 } 538 }
539 Deprecation::countDeprecation(m_frame, feature); 539 Deprecation::countDeprecation(m_frame, feature);
540 } 540 }
541 541
542 } // namespace blink 542 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | tools/perf/benchmarks/test_tap.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698