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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 void FullscreenController::didExitFullScreen() | 130 void FullscreenController::didExitFullScreen() |
131 { | 131 { |
132 if (!m_fullScreenFrame) | 132 if (!m_fullScreenFrame) |
133 return; | 133 return; |
134 | 134 |
135 if (Document* doc = m_fullScreenFrame->document()) { | 135 if (Document* doc = m_fullScreenFrame->document()) { |
136 if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*doc)) { | 136 if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*doc)) { |
137 if (fullscreen->webkitIsFullScreen()) { | 137 if (fullscreen->webkitCurrentFullScreenElement()) { |
138 if (m_exitFullscreenPageScaleFactor) { | 138 if (m_exitFullscreenPageScaleFactor) { |
139 m_webViewImpl->setPageScaleFactor(m_exitFullscreenPageScaleF
actor); | 139 m_webViewImpl->setPageScaleFactor(m_exitFullscreenPageScaleF
actor); |
140 m_webViewImpl->setMainFrameScrollOffset(IntPoint(m_exitFulls
creenScrollOffset)); | 140 m_webViewImpl->setMainFrameScrollOffset(IntPoint(m_exitFulls
creenScrollOffset)); |
141 m_webViewImpl->setPinchViewportOffset(m_exitFullscreenPinchV
iewportOffset); | 141 m_webViewImpl->setPinchViewportOffset(m_exitFullscreenPinchV
iewportOffset); |
142 m_exitFullscreenPageScaleFactor = 0; | 142 m_exitFullscreenPageScaleFactor = 0; |
143 m_exitFullscreenScrollOffset = IntSize(); | 143 m_exitFullscreenScrollOffset = IntSize(); |
144 } | 144 } |
145 | 145 |
146 fullscreen->didExitFullScreenForElement(0); | 146 fullscreen->didExitFullScreenForElement(0); |
147 } | 147 } |
(...skipping 30 matching lines...) Expand all Loading... |
178 { | 178 { |
179 // The client is exiting full screen, so don't send a notification. | 179 // The client is exiting full screen, so don't send a notification. |
180 if (m_isCancelingFullScreen) | 180 if (m_isCancelingFullScreen) |
181 return; | 181 return; |
182 if (WebViewClient* client = m_webViewImpl->client()) | 182 if (WebViewClient* client = m_webViewImpl->client()) |
183 client->exitFullScreen(); | 183 client->exitFullScreen(); |
184 } | 184 } |
185 | 185 |
186 } // namespace blink | 186 } // namespace blink |
187 | 187 |
OLD | NEW |