Fix compatibility with canScroll

This commit is contained in:
Cheng Zhao 2016-09-09 19:28:32 +09:00
parent f8bdc7437d
commit 5ccd0a24e9

View file

@ -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;
}