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

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

Issue 2741633002: Remove FrameHost::eventHandlerRegistry() (Closed)
Patch Set: Rebase Created 3 years, 9 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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 return false; 477 return false;
478 } 478 }
479 479
480 updateTargetAndRegionMapsForTouchStarts(touchInfos); 480 updateTargetAndRegionMapsForTouchStarts(touchInfos);
481 481
482 m_touchPressed = !allTouchesReleased; 482 m_touchPressed = !allTouchesReleased;
483 483
484 // If there's no document receiving touch events, or no handlers on the 484 // If there's no document receiving touch events, or no handlers on the
485 // document set to receive the events, then we can skip all the rest of 485 // document set to receive the events, then we can skip all the rest of
486 // this work. 486 // this work.
487 if (!m_touchSequenceDocument || !m_touchSequenceDocument->frameHost() || 487 if (!m_touchSequenceDocument || !m_touchSequenceDocument->page() ||
488 !hasTouchHandlers( 488 !hasTouchHandlers(
489 m_touchSequenceDocument->frameHost()->eventHandlerRegistry()) || 489 m_touchSequenceDocument->page()->eventHandlerRegistry()) ||
490 !m_touchSequenceDocument->frame()) { 490 !m_touchSequenceDocument->frame()) {
491 if (allTouchesReleased) { 491 if (allTouchesReleased) {
492 m_touchSequenceDocument.clear(); 492 m_touchSequenceDocument.clear();
493 } 493 }
494 return false; 494 return false;
495 } 495 }
496 496
497 setAllPropertiesOfTouchInfos(touchInfos); 497 setAllPropertiesOfTouchInfos(touchInfos);
498 498
499 return true; 499 return true;
(...skipping 14 matching lines...) Expand all
514 } 514 }
515 515
516 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); 516 return dispatchTouchEvents(event, touchInfos, allTouchesReleased);
517 } 517 }
518 518
519 bool TouchEventManager::isAnyTouchActive() const { 519 bool TouchEventManager::isAnyTouchActive() const {
520 return m_touchPressed; 520 return m_touchPressed;
521 } 521 }
522 522
523 } // namespace blink 523 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698