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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 if (!m_fullScreenFrame) | 76 if (!m_fullScreenFrame) |
77 return; | 77 return; |
78 | 78 |
79 if (Document* doc = m_fullScreenFrame->document()) { | 79 if (Document* doc = m_fullScreenFrame->document()) { |
80 if (FullscreenElementStack::isFullScreen(*doc)) { | 80 if (FullscreenElementStack::isFullScreen(*doc)) { |
81 if (!m_exitFullscreenPageScaleFactor) { | 81 if (!m_exitFullscreenPageScaleFactor) { |
82 m_exitFullscreenPageScaleFactor = m_webViewImpl->pageScaleFactor
(); | 82 m_exitFullscreenPageScaleFactor = m_webViewImpl->pageScaleFactor
(); |
83 m_exitFullscreenScrollOffset = m_webViewImpl->mainFrame()->scrol
lOffset(); | 83 m_exitFullscreenScrollOffset = m_webViewImpl->mainFrame()->scrol
lOffset(); |
84 m_exitFullscreenPinchViewportOffset = m_webViewImpl->pinchViewpo
rtOffset(); | 84 m_exitFullscreenPinchViewportOffset = m_webViewImpl->pinchViewpo
rtOffset(); |
85 m_webViewImpl->setPageScaleFactor(1.0f); | 85 m_webViewImpl->setPageScaleFactor(1.0f); |
| 86 m_webViewImpl->setMainFrameScrollOffset(IntPoint()); |
| 87 m_webViewImpl->setPinchViewportOffset(FloatPoint()); |
86 } | 88 } |
87 | 89 |
88 FullscreenElementStack::from(*doc).webkitDidEnterFullScreenForElemen
t(0); | 90 FullscreenElementStack::from(*doc).webkitDidEnterFullScreenForElemen
t(0); |
89 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled()) { | 91 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled()) { |
90 Element* element = FullscreenElementStack::currentFullScreenElem
entFrom(*doc); | 92 Element* element = FullscreenElementStack::currentFullScreenElem
entFrom(*doc); |
91 ASSERT(element); | 93 ASSERT(element); |
92 if (isHTMLMediaElement(*element) && m_webViewImpl->layerTreeView
()) | 94 if (isHTMLMediaElement(*element) && m_webViewImpl->layerTreeView
()) |
93 m_webViewImpl->layerTreeView()->setHasTransparentBackground(
true); | 95 m_webViewImpl->layerTreeView()->setHasTransparentBackground(
true); |
94 } | 96 } |
95 } | 97 } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 if (mediaElement->webMediaPlayer()) | 192 if (mediaElement->webMediaPlayer()) |
191 mediaElement->webMediaPlayer()->exitFullscreen(); | 193 mediaElement->webMediaPlayer()->exitFullscreen(); |
192 return; | 194 return; |
193 } | 195 } |
194 if (WebViewClient* client = m_webViewImpl->client()) | 196 if (WebViewClient* client = m_webViewImpl->client()) |
195 client->exitFullScreen(); | 197 client->exitFullScreen(); |
196 } | 198 } |
197 | 199 |
198 } | 200 } |
199 | 201 |
OLD | NEW |