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