OLD | NEW |
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // some tests that take advantage of it. There may also be edge | 334 // some tests that take advantage of it. There may also be edge |
335 // cases in the browser where this happens. | 335 // cases in the browser where this happens. |
336 // See http://crbug.com/345372. | 336 // See http://crbug.com/345372. |
337 m_targetForTouchID.set(touchInfo.point.id(), touchInfo.touchNode); | 337 m_targetForTouchID.set(touchInfo.point.id(), touchInfo.touchNode); |
338 | 338 |
339 m_regionForTouchID.set(touchInfo.point.id(), touchInfo.region); | 339 m_regionForTouchID.set(touchInfo.point.id(), touchInfo.region); |
340 | 340 |
341 TouchAction effectiveTouchAction = | 341 TouchAction effectiveTouchAction = |
342 TouchActionUtil::computeEffectiveTouchAction(*touchInfo.touchNode); | 342 TouchActionUtil::computeEffectiveTouchAction(*touchInfo.touchNode); |
343 if (effectiveTouchAction != TouchActionAuto) { | 343 if (effectiveTouchAction != TouchActionAuto) { |
344 m_frame->page()->chromeClient().setTouchAction(effectiveTouchAction); | 344 m_frame->page()->chromeClient().setTouchAction(m_frame, |
| 345 effectiveTouchAction); |
345 | 346 |
346 // Combine the current touch action sequence with the touch action | 347 // Combine the current touch action sequence with the touch action |
347 // for the current finger press. | 348 // for the current finger press. |
348 m_currentTouchAction &= effectiveTouchAction; | 349 m_currentTouchAction &= effectiveTouchAction; |
349 } | 350 } |
350 } | 351 } |
351 } | 352 } |
352 } | 353 } |
353 | 354 |
354 void TouchEventManager::setAllPropertiesOfTouchInfos( | 355 void TouchEventManager::setAllPropertiesOfTouchInfos( |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 } | 505 } |
505 | 506 |
506 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); | 507 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); |
507 } | 508 } |
508 | 509 |
509 bool TouchEventManager::isAnyTouchActive() const { | 510 bool TouchEventManager::isAnyTouchActive() const { |
510 return m_touchPressed; | 511 return m_touchPressed; |
511 } | 512 } |
512 | 513 |
513 } // namespace blink | 514 } // namespace blink |
OLD | NEW |