• thestig's avatar
    Revert of Use changed_button_flags() when converting MouseEvent to... · 2591b1df
    thestig authored
    Revert of Use changed_button_flags() when converting MouseEvent to blink::WebMouseEvent. (patchset #2 id:20001 of https://codereview.chromium.org/302593002/)
    
    Reason for revert:
    Aura builds fail DCHECKs:
    
    ASSERTION FAILED: event.type() == PlatformEvent::MouseMoved || event.button() != NoButton
    third_party/WebKit/Source/core/events/MouseEvent.cpp(54)
    
    blink::MouseEvent::create()
    blink::Node::dispatchMouseEvent()
    blink::EventHandler::dispatchMouseEvent()
    blink::EventHandler::handleMousePressEvent()
    blink::PageWidgetEventHandler::handleMouseDown()
    blink::WebViewImpl::handleMouseDown()
    blink::WebViewImpl::handleMouseDown()
    blink::PageWidgetDelegate::handleInputEvent()
    blink::WebViewImpl::handleInputEvent()
    content::RenderWidget::OnHandleInputEvent()
    
    Original issue's description:
    > Use changed_button_flags() when converting MouseEvent to blink::WebMouseEvent.
    >
    > Event::flags() contains all the buttons that are being held down during the event, while MouseEvent::changed_button_flags() contains the buttons that are actually pressed/released during the event (and this is what we really are interested in).
    >
    > This fixes the issue with LMB being pressed while RMB is being held down. Without the fix, we always get blink::WebMouseEvent::ButtonRight in blink::WebMouseEvent::button.
    >
    > Committed: https://crrev.com/87e6b0f6d72b12e4b0308b035d1c06f2beb90feb
    > Cr-Commit-Position: refs/heads/master@{#293487}
    
    TBR=joleksy@opera.com
    NOTREECHECKS=true
    NOTRY=true
    
    Review URL: https://codereview.chromium.org/563713002
    
    Cr-Commit-Position: refs/heads/master@{#294364}
    2591b1df
web_input_event_aura.cc 13.1 KB