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

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

Issue 2801143002: 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 if (isAcceleratedCompositingActive()) { 196 if (isAcceleratedCompositingActive()) {
197 updateLayerTreeViewport(); 197 updateLayerTreeViewport();
198 } else { 198 } else {
199 WebRect damagedRect(0, 0, m_size.width, m_size.height); 199 WebRect damagedRect(0, 0, m_size.width, m_size.height);
200 m_client->didInvalidateRect(damagedRect); 200 m_client->didInvalidateRect(damagedRect);
201 } 201 }
202 } 202 }
203 203
204 void WebFrameWidgetImpl::resizeVisualViewport(const WebSize& newSize) { 204 void WebFrameWidgetImpl::resizeVisualViewport(const WebSize& newSize) {
205 // TODO(alexmos, kenrb): resizing behavior such as this should be changed 205 // TODO(alexmos, kenrb): resizing behavior such as this should be changed
206 // to use Page messages. https://crbug.com/599688. 206 // to use Page messages. This uses the visual viewport size to set size on
207 page()->visualViewport().setSize(newSize); 207 // both the WebViewImpl size and the Page's VisualViewport. If there are
208 page()->visualViewport().clampToBoundaries(); 208 // multiple OOPIFs on a page, this will currently be set redundantly by
209 // each of them. See https://crbug.com/599688.
210 view()->resize(newSize);
209 211
210 view()->didUpdateFullscreenSize(); 212 view()->didUpdateFullscreenSize();
211 } 213 }
212 214
213 void WebFrameWidgetImpl::updateMainFrameLayoutSize() { 215 void WebFrameWidgetImpl::updateMainFrameLayoutSize() {
214 if (!m_localRoot) 216 if (!m_localRoot)
215 return; 217 return;
216 218
217 FrameView* view = m_localRoot->frameView(); 219 FrameView* view = m_localRoot->frameView();
218 if (!view) 220 if (!view)
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 return nullptr; 1160 return nullptr;
1159 } 1161 }
1160 1162
1161 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const { 1163 LocalFrame* WebFrameWidgetImpl::focusedLocalFrameAvailableForIme() const {
1162 if (!m_imeAcceptEvents) 1164 if (!m_imeAcceptEvents)
1163 return nullptr; 1165 return nullptr;
1164 return focusedLocalFrameInWidget(); 1166 return focusedLocalFrameInWidget();
1165 } 1167 }
1166 1168
1167 } // namespace blink 1169 } // 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