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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
718 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This | 718 // TODO(ekaramad):This method is almost duplicated in WebViewImpl as well. This |
719 // code needs to be refactored (http://crbug.com/629721). | 719 // code needs to be refactored (http://crbug.com/629721). |
720 void WebFrameWidgetImpl::applyReplacementRange(const WebRange& range) { | 720 void WebFrameWidgetImpl::applyReplacementRange(const WebRange& range) { |
721 if (LocalFrame* frame = focusedLocalFrameInWidget()) { | 721 if (LocalFrame* frame = focusedLocalFrameInWidget()) { |
722 // TODO(dglazkov): Going from LocalFrame to WebLocalFrameImpl seems | 722 // TODO(dglazkov): Going from LocalFrame to WebLocalFrameImpl seems |
723 // silly. What is going on here? | 723 // silly. What is going on here? |
724 WebLocalFrameImpl::fromFrame(frame)->selectRange(range); | 724 WebLocalFrameImpl::fromFrame(frame)->selectRange(range); |
725 } | 725 } |
726 } | 726 } |
727 | 727 |
728 void WebFrameWidgetImpl::setRemoteViewportIntersection( | |
729 const WebRect& viewportIntersection) { | |
730 // Remote viewports are only applicable to local frames with remote ancestors. | |
731 if (!m_localRoot->parent() || !m_localRoot->parent()->isWebRemoteFrame()) | |
dcheng
2017/01/05 07:10:19
Are these DCHECKable conditions? It seems like we
| |
732 return; | |
733 if (m_localRoot->frameView()) { | |
dcheng
2017/01/05 07:10:19
Why would it not have a frame view? IPC races?
kenrb
2017/01/09 19:31:20
Yes, I don't know how to justify these as invarian
| |
734 m_localRoot->frameView()->setViewportIntersectionFromParent( | |
735 viewportIntersection); | |
736 } | |
737 } | |
738 | |
728 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, | 739 void WebFrameWidgetImpl::handleMouseLeave(LocalFrame& mainFrame, |
729 const WebMouseEvent& event) { | 740 const WebMouseEvent& event) { |
730 // FIXME: WebWidget doesn't have the method below. | 741 // FIXME: WebWidget doesn't have the method below. |
731 // m_client->setMouseOverURL(WebURL()); | 742 // m_client->setMouseOverURL(WebURL()); |
732 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); | 743 PageWidgetEventHandler::handleMouseLeave(mainFrame, event); |
733 } | 744 } |
734 | 745 |
735 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, | 746 void WebFrameWidgetImpl::handleMouseDown(LocalFrame& mainFrame, |
736 const WebMouseEvent& event) { | 747 const WebMouseEvent& event) { |
737 // Take capture on a mouse down on a plugin so we can send it mouse events. | 748 // Take capture on a mouse down on a plugin so we can send it mouse events. |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1139 return nullptr; | 1150 return nullptr; |
1140 } | 1151 } |
1141 | 1152 |
1142 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { | 1153 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { |
1143 if (!m_imeAcceptEvents) | 1154 if (!m_imeAcceptEvents) |
1144 return nullptr; | 1155 return nullptr; |
1145 return focusedLocalFrameInWidget(); | 1156 return focusedLocalFrameInWidget(); |
1146 } | 1157 } |
1147 | 1158 |
1148 } // namespace blink | 1159 } // namespace blink |
OLD | NEW |