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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 // FIXME: WebWidget doesn't have the method below. | 734 // FIXME: WebWidget doesn't have the method below. |
735 // m_client->setMouseOverURL(WebURL()); | 735 // m_client->setMouseOverURL(WebURL()); |
736 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); | 736 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); |
737 } | 737 } |
738 | 738 |
739 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, | 739 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, |
740 const WebMouseEvent& event) { | 740 const WebMouseEvent& event) { |
741 // Take capture on a mouse down on a plugin so we can send it mouse events. | 741 // Take capture on a mouse down on a plugin so we can send it mouse events. |
742 // If the hit node is a plugin but a scrollbar is over it don't start mouse | 742 // If the hit node is a plugin but a scrollbar is over it don't start mouse |
743 // capture because it will interfere with the scrollbar receiving events. | 743 // capture because it will interfere with the scrollbar receiving events. |
744 IntPoint point(event.x, event.y); | 744 IntPoint point(event.position.x, event.position.y); |
745 if (event.button == WebMouseEvent::Button::Left) { | 745 if (event.button == WebMouseEvent::Button::Left) { |
746 point = m_localRoot->frameView()->rootFrameToContents(point); | 746 point = m_localRoot->frameView()->rootFrameToContents(point); |
747 HitTestResult result( | 747 HitTestResult result( |
748 m_localRoot->frame()->eventHandler().hitTestResultAtPoint(point)); | 748 m_localRoot->frame()->eventHandler().hitTestResultAtPoint(point)); |
749 result.setToShadowHostIfInRestrictedShadowRoot(); | 749 result.setToShadowHostIfInRestrictedShadowRoot(); |
750 Node* hitNode = result.innerNode(); | 750 Node* hitNode = result.innerNode(); |
751 | 751 |
752 if (!result.scrollbar() && hitNode && hitNode->layoutObject() && | 752 if (!result.scrollbar() && hitNode && hitNode->layoutObject() && |
753 hitNode->layoutObject()->isEmbeddedObject()) { | 753 hitNode->layoutObject()->isEmbeddedObject()) { |
754 m_mouseCaptureNode = hitNode; | 754 m_mouseCaptureNode = hitNode; |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 return nullptr; | 1133 return nullptr; |
1134 } | 1134 } |
1135 | 1135 |
1136 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1136 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
1137 if (!m_imeAcceptEvents) | 1137 if (!m_imeAcceptEvents) |
1138 return nullptr; | 1138 return nullptr; |
1139 return focusedLocalFrameInWidget(); | 1139 return focusedLocalFrameInWidget(); |
1140 } | 1140 } |
1141 | 1141 |
1142 } // namespace blink | 1142 } // namespace blink |
OLD | NEW |