| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |