Commit d7eb636f authored by Xida Chen's avatar Xida Chen Committed by Commit Bot

Simplify the comments in TouchActionFilter::OnSetWhiteListedTouchAction

The comments in this function is a copy-paste of OnSetTouchAction. This
CL simplifies it.

TBR=dtapuska@chromium.org

Bug: None
Change-Id: I279871ad1e92084c95eff990785ca1591e17f5df
Reviewed-on: https://chromium-review.googlesource.com/997761Reviewed-by: default avatarXida Chen <xidachen@chromium.org>
Reviewed-by: default avatarDave Tapuska <dtapuska@chromium.org>
Commit-Queue: Xida Chen <xidachen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548423}
parent c8f0691b
...@@ -206,16 +206,8 @@ void TouchActionFilter::ResetTouchAction() { ...@@ -206,16 +206,8 @@ void TouchActionFilter::ResetTouchAction() {
void TouchActionFilter::OnSetWhiteListedTouchAction( void TouchActionFilter::OnSetWhiteListedTouchAction(
cc::TouchAction white_listed_touch_action) { cc::TouchAction white_listed_touch_action) {
// For multiple fingers, we take the intersection of the touch actions for all // We use '&' here to account for the multiple-finger case, which is the same
// fingers that have gone down during this action. In the majority of // as OnSetTouchAction.
// real-world scenarios the touch action for all fingers will be the same.
// This is left as implementation because of the relationship of gestures
// (which are off limits for the spec). We believe the following are
// desirable properties of this choice:
// 1. Not sensitive to finger touch order. Behavior of putting two fingers
// down "at once" will be deterministic.
// 2. Only subtractive - eg. can't trigger scrolling on an element that
// otherwise has scrolling disabling by the addition of a finger.
white_listed_touch_action_ &= white_listed_touch_action; white_listed_touch_action_ &= white_listed_touch_action;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment