Chromium Code Reviews| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 void WebFrameWidgetImpl::resizeVisualViewport(const WebSize& newSize) | 191 void WebFrameWidgetImpl::resizeVisualViewport(const WebSize& newSize) |
| 192 { | 192 { |
| 193 // TODO(alexmos, kenrb): resizing behavior such as this should be changed | 193 // TODO(alexmos, kenrb): resizing behavior such as this should be changed |
| 194 // to use Page messages. https://crbug.com/599688. | 194 // to use Page messages. https://crbug.com/599688. |
| 195 page()->frameHost().visualViewport().setSize(newSize); | 195 page()->frameHost().visualViewport().setSize(newSize); |
| 196 page()->frameHost().visualViewport().clampToBoundaries(); | 196 page()->frameHost().visualViewport().clampToBoundaries(); |
| 197 | |
| 198 view()->didUpdateFullScreenSize(); | |
|
dcheng
2016/05/19 22:08:39
Why do we need to call this here now?
alexmos
2016/05/19 23:58:19
This is needed for things like opening/resizing a
dcheng
2016/05/20 07:01:44
Hmm. Is WebViewImpl getting this behavior via WebV
alexmos
2016/05/20 17:20:13
Yes, in the WebViewImpl case, the resizing happens
| |
| 197 } | 199 } |
| 198 | 200 |
| 199 void WebFrameWidgetImpl::updateMainFrameLayoutSize() | 201 void WebFrameWidgetImpl::updateMainFrameLayoutSize() |
| 200 { | 202 { |
| 201 if (!m_localRoot) | 203 if (!m_localRoot) |
| 202 return; | 204 return; |
| 203 | 205 |
| 204 FrameView* view = m_localRoot->frameView(); | 206 FrameView* view = m_localRoot->frameView(); |
| 205 if (!view) | 207 if (!view) |
| 206 return; | 208 return; |
| 207 | 209 |
| 208 WebSize layoutSize = m_size; | 210 WebSize layoutSize = m_size; |
| 209 | 211 |
| 210 view->setLayoutSize(layoutSize); | 212 view->setLayoutSize(layoutSize); |
| 211 } | 213 } |
| 212 | 214 |
| 213 void WebFrameWidgetImpl::setIgnoreInputEvents(bool newValue) | 215 void WebFrameWidgetImpl::setIgnoreInputEvents(bool newValue) |
| 214 { | 216 { |
| 215 DCHECK_NE(m_ignoreInputEvents, newValue); | 217 DCHECK_NE(m_ignoreInputEvents, newValue); |
| 216 m_ignoreInputEvents = newValue; | 218 m_ignoreInputEvents = newValue; |
| 217 } | 219 } |
| 218 | 220 |
| 219 void WebFrameWidgetImpl::didEnterFullScreen() | 221 void WebFrameWidgetImpl::didEnterFullScreen() |
| 220 { | 222 { |
| 221 // FIXME: Implement full screen for out-of-process iframes. | 223 view()->didEnterFullScreen(); |
| 222 } | 224 } |
| 223 | 225 |
| 224 void WebFrameWidgetImpl::didExitFullScreen() | 226 void WebFrameWidgetImpl::didExitFullScreen() |
| 225 { | 227 { |
| 226 // FIXME: Implement full screen for out-of-process iframes. | 228 view()->didExitFullScreen(); |
| 227 } | 229 } |
| 228 | 230 |
| 229 void WebFrameWidgetImpl::beginFrame(double lastFrameTimeMonotonic) | 231 void WebFrameWidgetImpl::beginFrame(double lastFrameTimeMonotonic) |
| 230 { | 232 { |
| 231 TRACE_EVENT1("blink", "WebFrameWidgetImpl::beginFrame", "frameTime", lastFra meTimeMonotonic); | 233 TRACE_EVENT1("blink", "WebFrameWidgetImpl::beginFrame", "frameTime", lastFra meTimeMonotonic); |
| 232 DCHECK(lastFrameTimeMonotonic); | 234 DCHECK(lastFrameTimeMonotonic); |
| 233 PageWidgetDelegate::animate(*page(), lastFrameTimeMonotonic); | 235 PageWidgetDelegate::animate(*page(), lastFrameTimeMonotonic); |
| 234 } | 236 } |
| 235 | 237 |
| 236 void WebFrameWidgetImpl::updateAllLifecyclePhases() | 238 void WebFrameWidgetImpl::updateAllLifecyclePhases() |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1090 | 1092 |
| 1091 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) | 1093 HitTestResult WebFrameWidgetImpl::hitTestResultForRootFramePos(const IntPoint& p osInRootFrame) |
| 1092 { | 1094 { |
| 1093 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); | 1095 IntPoint docPoint(m_localRoot->frame()->view()->rootFrameToContents(posInRoo tFrame)); |
| 1094 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); | 1096 HitTestResult result = m_localRoot->frame()->eventHandler().hitTestResultAtP oint(docPoint, HitTestRequest::ReadOnly | HitTestRequest::Active); |
| 1095 result.setToShadowHostIfInUserAgentShadowRoot(); | 1097 result.setToShadowHostIfInUserAgentShadowRoot(); |
| 1096 return result; | 1098 return result; |
| 1097 } | 1099 } |
| 1098 | 1100 |
| 1099 } // namespace blink | 1101 } // namespace blink |
| OLD | NEW |