| 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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This | 731 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This |
| 732 // code needs to be refactored (http://crbug.com/629721). | 732 // code needs to be refactored (http://crbug.com/629721). |
| 733 void WebFrameWidgetImpl::applyReplacementRange(const WebRange& range) { | 733 void WebFrameWidgetImpl::applyReplacementRange(const WebRange& range) { |
| 734 if (LocalFrame* frame = focusedLocalFrameInWidget()) { | 734 if (LocalFrame* frame = focusedLocalFrameInWidget()) { |
| 735 // TODO(dglazkov): Going from LocalFrame to WebLocalFrameImpl seems | 735 // TODO(dglazkov): Going from LocalFrame to WebLocalFrameImpl seems |
| 736 // silly. What is going on here? | 736 // silly. What is going on here? |
| 737 WebLocalFrameImpl::fromFrame(frame)->selectRange(range); | 737 WebLocalFrameImpl::fromFrame(frame)->selectRange(range); |
| 738 } | 738 } |
| 739 } | 739 } |
| 740 | 740 |
| 741 void WebFrameWidgetImpl::setRemoteViewportIntersection( |
| 742 const WebRect& viewportIntersection) { |
| 743 // Remote viewports are only applicable to local frames with remote ancestors. |
| 744 if (!m_localRoot->parent() || !m_localRoot->parent()->isWebRemoteFrame()) |
| 745 return; |
| 746 if (m_localRoot->frameView()) { |
| 747 m_localRoot->frameView()->setViewportIntersectionFromParent( |
| 748 viewportIntersection); |
| 749 } |
| 750 } |
| 751 |
| 741 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, | 752 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, |
| 742 const WebMouseEvent& event) { | 753 const WebMouseEvent& event) { |
| 743 // FIXME: WebWidget doesn't have the method below. | 754 // FIXME: WebWidget doesn't have the method below. |
| 744 // m_client->setMouseOverURL(WebURL()); | 755 // m_client->setMouseOverURL(WebURL()); |
| 745 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); | 756 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); |
| 746 } | 757 } |
| 747 | 758 |
| 748 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, | 759 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, |
| 749 const WebMouseEvent& event) { | 760 const WebMouseEvent& event) { |
| 750 // Take capture on a mouse down on a plugin so we can send it mouse events. | 761 // Take capture on a mouse down on a plugin so we can send it mouse events. |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 return nullptr; | 1161 return nullptr; |
| 1151 } | 1162 } |
| 1152 | 1163 |
| 1153 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1164 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
| 1154 if (!m_imeAcceptEvents) | 1165 if (!m_imeAcceptEvents) |
| 1155 return nullptr; | 1166 return nullptr; |
| 1156 return focusedLocalFrameInWidget(); | 1167 return focusedLocalFrameInWidget(); |
| 1157 } | 1168 } |
| 1158 | 1169 |
| 1159 } // namespace blink | 1170 } // namespace blink |
| OLD | NEW |