Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp

Issue 1834913002: Fix visual viewport for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary cast Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_child_frame.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "web/WebFrameWidgetImpl.h" 31 #include "web/WebFrameWidgetImpl.h"
32 32
33 #include "core/editing/EditingUtilities.h" 33 #include "core/editing/EditingUtilities.h"
34 #include "core/editing/Editor.h" 34 #include "core/editing/Editor.h"
35 #include "core/editing/FrameSelection.h" 35 #include "core/editing/FrameSelection.h"
36 #include "core/editing/InputMethodController.h" 36 #include "core/editing/InputMethodController.h"
37 #include "core/editing/PlainTextRange.h" 37 #include "core/editing/PlainTextRange.h"
38 #include "core/frame/FrameHost.h"
38 #include "core/frame/FrameView.h" 39 #include "core/frame/FrameView.h"
39 #include "core/frame/RemoteFrame.h" 40 #include "core/frame/RemoteFrame.h"
40 #include "core/frame/Settings.h" 41 #include "core/frame/Settings.h"
41 #include "core/input/EventHandler.h" 42 #include "core/input/EventHandler.h"
42 #include "core/layout/LayoutView.h" 43 #include "core/layout/LayoutView.h"
43 #include "core/layout/api/LayoutViewItem.h" 44 #include "core/layout/api/LayoutViewItem.h"
44 #include "core/layout/compositing/PaintLayerCompositor.h" 45 #include "core/layout/compositing/PaintLayerCompositor.h"
45 #include "core/page/ContextMenuController.h" 46 #include "core/page/ContextMenuController.h"
46 #include "core/page/FocusController.h" 47 #include "core/page/FocusController.h"
47 #include "core/page/Page.h" 48 #include "core/page/Page.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 updateLayerTreeViewport(); 193 updateLayerTreeViewport();
193 } else { 194 } else {
194 WebRect damagedRect(0, 0, m_size.width, m_size.height); 195 WebRect damagedRect(0, 0, m_size.width, m_size.height);
195 m_client->didInvalidateRect(damagedRect); 196 m_client->didInvalidateRect(damagedRect);
196 } 197 }
197 } 198 }
198 } 199 }
199 200
200 void WebFrameWidgetImpl::resizeVisualViewport(const WebSize& newSize) 201 void WebFrameWidgetImpl::resizeVisualViewport(const WebSize& newSize)
201 { 202 {
202 // FIXME: Implement visual viewport for out-of-process iframes. 203 // TODO(alexmos, kenrb): resizing behavior such as this should be changed
204 // to use Page messages. https://crbug.com/599688.
205 page()->frameHost().visualViewport().setSize(newSize);
206 page()->frameHost().visualViewport().clampToBoundaries();
203 } 207 }
204 208
205 void WebFrameWidgetImpl::updateMainFrameLayoutSize() 209 void WebFrameWidgetImpl::updateMainFrameLayoutSize()
206 { 210 {
207 if (!m_localRoot) 211 if (!m_localRoot)
208 return; 212 return;
209 213
210 RefPtrWillBeRawPtr<FrameView> view = m_localRoot->frameView(); 214 RefPtrWillBeRawPtr<FrameView> view = m_localRoot->frameView();
211 if (!view) 215 if (!view)
212 return; 216 return;
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 1097
1094 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) 1098 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame)
1095 { 1099 {
1096 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); 1100 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame));
1097 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); 1101 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active);
1098 result.setToShadowHostIfInUserAgentShadowRoot(); 1102 result.setToShadowHostIfInUserAgentShadowRoot();
1099 return result; 1103 return result;
1100 } 1104 }
1101 1105
1102 } // namespace blink 1106 } // namespace blink
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_child_frame.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698