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

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

Issue 2813983002: Set WebViewImpl's size in OOPIF processes. (Closed)
Patch Set: Created 3 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 | « no previous file | 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 updateLayerTreeViewport(); 190 updateLayerTreeViewport();
191 } else { 191 } else {
192 WebRect damagedRect(0, 0, m_size.width, m_size.height); 192 WebRect damagedRect(0, 0, m_size.width, m_size.height);
193 m_client->didInvalidateRect(damagedRect); 193 m_client->didInvalidateRect(damagedRect);
194 } 194 }
195 } 195 }
196 } 196 }
197 197
198 void WebFrameWidgetImpl::resizeVisualViewport(const WebSize& newSize) { 198 void WebFrameWidgetImpl::resizeVisualViewport(const WebSize& newSize) {
199 // TODO(alexmos, kenrb): resizing behavior such as this should be changed 199 // TODO(alexmos, kenrb): resizing behavior such as this should be changed
200 // to use Page messages. https://crbug.com/599688. 200 // to use Page messages. This uses the visual viewport size to set size on
201 page()->frameHost().visualViewport().setSize(newSize); 201 // both the WebViewImpl size and the Page's VisualViewport. If there are
202 page()->frameHost().visualViewport().clampToBoundaries(); 202 // multiple OOPIFs on a page, this will currently be set redundantly by
203 // each of them. See https://crbug.com/599688.
204 view()->resize(newSize);
203 205
204 view()->didUpdateFullscreenSize(); 206 view()->didUpdateFullscreenSize();
205 } 207 }
206 208
207 void WebFrameWidgetImpl::updateMainFrameLayoutSize() { 209 void WebFrameWidgetImpl::updateMainFrameLayoutSize() {
208 if (!m_localRoot) 210 if (!m_localRoot)
209 return; 211 return;
210 212
211 FrameView* view = m_localRoot->frameView(); 213 FrameView* view = m_localRoot->frameView();
212 if (!view) 214 if (!view)
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 return nullptr; 1145 return nullptr;
1144 } 1146 }
1145 1147
1146 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1148 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1147 if (!m_imeAcceptEvents) 1149 if (!m_imeAcceptEvents)
1148 return nullptr; 1150 return nullptr;
1149 return focusedLocalFrameInWidget(); 1151 return focusedLocalFrameInWidget();
1150 } 1152 }
1151 1153
1152 } // namespace blink 1154 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698