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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 // FIXME: WebWidget doesn't have the method below. | 764 // FIXME: WebWidget doesn't have the method below. |
765 // m_client->setMouseOverURL(WebURL()); | 765 // m_client->setMouseOverURL(WebURL()); |
766 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); | 766 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); |
767 } | 767 } |
768 | 768 |
769 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, | 769 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, |
770 const WebMouseEvent& event) { | 770 const WebMouseEvent& event) { |
771 // Take capture on a mouse down on a plugin so we can send it mouse events. | 771 // Take capture on a mouse down on a plugin so we can send it mouse events. |
772 // If the hit node is a plugin but a scrollbar is over it don't start mouse | 772 // If the hit node is a plugin but a scrollbar is over it don't start mouse |
773 // capture because it will interfere with the scrollbar receiving events. | 773 // capture because it will interfere with the scrollbar receiving events. |
774 IntPoint point(event.x, event.y); | 774 IntPoint point(event.positionInWidget().x, event.positionInWidget().y); |
775 if (event.button == WebMouseEvent::Button::Left) { | 775 if (event.button == WebMouseEvent::Button::Left) { |
776 point = m_localRoot->frameView()->rootFrameToContents(point); | 776 point = m_localRoot->frameView()->rootFrameToContents(point); |
777 HitTestResult result( | 777 HitTestResult result( |
778 m_localRoot->frame()->eventHandler().hitTestResultAtPoint(point)); | 778 m_localRoot->frame()->eventHandler().hitTestResultAtPoint(point)); |
779 result.setToShadowHostIfInRestrictedShadowRoot(); | 779 result.setToShadowHostIfInRestrictedShadowRoot(); |
780 Node* hitNode = result.innerNode(); | 780 Node* hitNode = result.innerNode(); |
781 | 781 |
782 if (!result.scrollbar() && hitNode && hitNode->layoutObject() && | 782 if (!result.scrollbar() && hitNode && hitNode->layoutObject() && |
783 hitNode->layoutObject()->isEmbeddedObject()) { | 783 hitNode->layoutObject()->isEmbeddedObject()) { |
784 m_mouseCaptureNode = hitNode; | 784 m_mouseCaptureNode = hitNode; |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1158 return nullptr; | 1158 return nullptr; |
1159 } | 1159 } |
1160 | 1160 |
1161 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1161 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
1162 if (!m_imeAcceptEvents) | 1162 if (!m_imeAcceptEvents) |
1163 return nullptr; | 1163 return nullptr; |
1164 return focusedLocalFrameInWidget(); | 1164 return focusedLocalFrameInWidget(); |
1165 } | 1165 } |
1166 | 1166 |
1167 } // namespace blink | 1167 } // namespace blink |
OLD | NEW |