Fix compatibility with canScroll
This commit is contained in:
parent
f8bdc7437d
commit
5ccd0a24e9
1 changed files with 9 additions and 0 deletions
|
@ -238,6 +238,15 @@ bool Converter<blink::WebMouseWheelEvent>::FromV8(
|
|||
dict.Get("accelerationRatioX", &out->accelerationRatioX);
|
||||
dict.Get("accelerationRatioY", &out->accelerationRatioY);
|
||||
dict.Get("hasPreciseScrollingDeltas", &out->hasPreciseScrollingDeltas);
|
||||
|
||||
#if defined(USE_AURA)
|
||||
// Matches the behavior of ui/events/blink/web_input_event_traits.cc:
|
||||
bool can_scroll = true;
|
||||
if (dict.Get("canScroll", &can_scroll) && !can_scroll) {
|
||||
out->hasPreciseScrollingDeltas = false;
|
||||
out->modifiers &= ~blink::WebInputEvent::ControlKey;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue