OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 | 673 |
674 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv
ent& event) | 674 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, const WebMouseEv
ent& event) |
675 { | 675 { |
676 // Take capture on a mouse down on a plugin so we can send it mouse events. | 676 // Take capture on a mouse down on a plugin so we can send it mouse events. |
677 // If the hit node is a plugin but a scrollbar is over it don't start mouse | 677 // If the hit node is a plugin but a scrollbar is over it don't start mouse |
678 // capture because it will interfere with the scrollbar receiving events. | 678 // capture because it will interfere with the scrollbar receiving events. |
679 IntPoint point(event.x, event.y); | 679 IntPoint point(event.x, event.y); |
680 if (event.button == WebMouseEvent::ButtonLeft) { | 680 if (event.button == WebMouseEvent::ButtonLeft) { |
681 point = m_localRoot->frameView()->windowToContents(point); | 681 point = m_localRoot->frameView()->windowToContents(point); |
682 HitTestResult result(m_localRoot->frame()->eventHandler().hitTestResultA
tPoint(point)); | 682 HitTestResult result(m_localRoot->frame()->eventHandler().hitTestResultA
tPoint(point)); |
683 result.setToShadowHostIfInUserAgentShadowRoot(); | 683 result.setToShadowHostIfInClosedShadowRoot(); |
684 Node* hitNode = result.innerNonSharedNode(); | 684 Node* hitNode = result.innerNonSharedNode(); |
685 | 685 |
686 if (!result.scrollbar() && hitNode && hitNode->renderer() && hitNode->re
nderer()->isEmbeddedObject()) { | 686 if (!result.scrollbar() && hitNode && hitNode->renderer() && hitNode->re
nderer()->isEmbeddedObject()) { |
687 m_mouseCaptureNode = hitNode; | 687 m_mouseCaptureNode = hitNode; |
688 TRACE_EVENT_ASYNC_BEGIN0("input", "capturing mouse", this); | 688 TRACE_EVENT_ASYNC_BEGIN0("input", "capturing mouse", this); |
689 } | 689 } |
690 } | 690 } |
691 | 691 |
692 PageWidgetEventHandler::handleMouseDown(mainFrame, event); | 692 PageWidgetEventHandler::handleMouseDown(mainFrame, event); |
693 | 693 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 } else { | 1008 } else { |
1009 m_layerTreeView->clearRootLayer(); | 1009 m_layerTreeView->clearRootLayer(); |
1010 m_layerTreeView->clearViewportLayers(); | 1010 m_layerTreeView->clearViewportLayers(); |
1011 } | 1011 } |
1012 } | 1012 } |
1013 | 1013 |
1014 suppressInvalidations(false); | 1014 suppressInvalidations(false); |
1015 } | 1015 } |
1016 | 1016 |
1017 } // namespace blink | 1017 } // namespace blink |
OLD | NEW |