OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 if (WebLayer* layoutViewportScrollLayer = | 194 if (WebLayer* layoutViewportScrollLayer = |
195 frameView ? toWebLayer(frameView->layerForScrolling()) : nullptr) { | 195 frameView ? toWebLayer(frameView->layerForScrolling()) : nullptr) { |
196 layoutViewportScrollLayer->setBounds(frameView->contentsSize()); | 196 layoutViewportScrollLayer->setBounds(frameView->contentsSize()); |
197 | 197 |
198 // If there is a non-root fullscreen element, prevent the viewport from | 198 // If there is a non-root fullscreen element, prevent the viewport from |
199 // scrolling. | 199 // scrolling. |
200 Document* mainFrameDocument = | 200 Document* mainFrameDocument = |
201 m_page->deprecatedLocalMainFrame()->document(); | 201 m_page->deprecatedLocalMainFrame()->document(); |
202 Element* fullscreenElement = | 202 Element* fullscreenElement = |
203 Fullscreen::fullscreenElementFrom(*mainFrameDocument); | 203 Fullscreen::fullscreenElement(*mainFrameDocument); |
204 WebLayer* visualViewportScrollLayer = | 204 WebLayer* visualViewportScrollLayer = |
205 toWebLayer(m_page->frameHost().visualViewport().scrollLayer()); | 205 toWebLayer(m_page->frameHost().visualViewport().scrollLayer()); |
206 | 206 |
207 if (visualViewportScrollLayer) { | 207 if (visualViewportScrollLayer) { |
208 if (fullscreenElement && | 208 if (fullscreenElement && |
209 fullscreenElement != mainFrameDocument->documentElement()) | 209 fullscreenElement != mainFrameDocument->documentElement()) |
210 visualViewportScrollLayer->setUserScrollable(false, false); | 210 visualViewportScrollLayer->setUserScrollable(false, false); |
211 else | 211 else |
212 visualViewportScrollLayer->setUserScrollable(true, true); | 212 visualViewportScrollLayer->setUserScrollable(true, true); |
213 } | 213 } |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 if (frameIsScrollable != m_wasFrameScrollable) | 1229 if (frameIsScrollable != m_wasFrameScrollable) |
1230 return true; | 1230 return true; |
1231 | 1231 |
1232 if (WebLayer* scrollLayer = | 1232 if (WebLayer* scrollLayer = |
1233 frameView ? toWebLayer(frameView->layerForScrolling()) : nullptr) | 1233 frameView ? toWebLayer(frameView->layerForScrolling()) : nullptr) |
1234 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); | 1234 return WebSize(frameView->contentsSize()) != scrollLayer->bounds(); |
1235 return false; | 1235 return false; |
1236 } | 1236 } |
1237 | 1237 |
1238 } // namespace blink | 1238 } // namespace blink |
OLD | NEW |