| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 // the scroll offset. | 149 // the scroll offset. |
| 150 if (!m_haveEnteredFullscreen) { | 150 if (!m_haveEnteredFullscreen) { |
| 151 m_exitFullscreenPageScaleFactor = m_webViewImpl->pageScaleFactor(); | 151 m_exitFullscreenPageScaleFactor = m_webViewImpl->pageScaleFactor(); |
| 152 m_exitFullscreenScrollOffset = m_webViewImpl->mainFrame()->isWebLocalFra
me() ? m_webViewImpl->mainFrame()->scrollOffset() : WebSize(); | 152 m_exitFullscreenScrollOffset = m_webViewImpl->mainFrame()->isWebLocalFra
me() ? m_webViewImpl->mainFrame()->scrollOffset() : WebSize(); |
| 153 m_exitFullscreenVisualViewportOffset = m_webViewImpl->visualViewportOffs
et(); | 153 m_exitFullscreenVisualViewportOffset = m_webViewImpl->visualViewportOffs
et(); |
| 154 } | 154 } |
| 155 | 155 |
| 156 // We need to transition to fullscreen mode. | 156 // We need to transition to fullscreen mode. |
| 157 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(element->document().
frame()); | 157 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(element->document().
frame()); |
| 158 if (frame && frame->client()) { | 158 if (frame && frame->client()) { |
| 159 if (!Fullscreen::from(element->document()).forCrossProcessAncestor()) | 159 if (!Fullscreen::from(element->document()).forCrossProcessDescendant()) |
| 160 frame->client()->enterFullscreen(); | 160 frame->client()->enterFullscreen(); |
| 161 m_provisionalFullScreenElement = element; | 161 m_provisionalFullScreenElement = element; |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 | 164 |
| 165 void FullscreenController::exitFullScreenForElement(Element* element) | 165 void FullscreenController::exitFullScreenForElement(Element* element) |
| 166 { | 166 { |
| 167 DCHECK(element); | 167 DCHECK(element); |
| 168 | 168 |
| 169 // The client is exiting full screen, so don't send a notification. | 169 // The client is exiting full screen, so don't send a notification. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 m_webViewImpl->updateMainFrameLayoutSize(); | 209 m_webViewImpl->updateMainFrameLayoutSize(); |
| 210 } | 210 } |
| 211 | 211 |
| 212 DEFINE_TRACE(FullscreenController) | 212 DEFINE_TRACE(FullscreenController) |
| 213 { | 213 { |
| 214 visitor->trace(m_provisionalFullScreenElement); | 214 visitor->trace(m_provisionalFullScreenElement); |
| 215 visitor->trace(m_fullScreenFrame); | 215 visitor->trace(m_fullScreenFrame); |
| 216 } | 216 } |
| 217 | 217 |
| 218 } // namespace blink | 218 } // namespace blink |
| OLD | NEW |