OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 #endif | 245 #endif |
246 | 246 |
247 void RenderLayerCompositor::applyOverlayFullscreenVideoAdjustment() | 247 void RenderLayerCompositor::applyOverlayFullscreenVideoAdjustment() |
248 { | 248 { |
249 m_inOverlayFullscreenVideo = false; | 249 m_inOverlayFullscreenVideo = false; |
250 if (!m_rootContentLayer) | 250 if (!m_rootContentLayer) |
251 return; | 251 return; |
252 | 252 |
253 bool isMainFrame = m_renderView.frame()->isMainFrame(); | 253 bool isMainFrame = m_renderView.frame()->isMainFrame(); |
254 RenderVideo* video = findFullscreenVideoRenderer(m_renderView.document()); | 254 RenderVideo* video = findFullscreenVideoRenderer(m_renderView.document()); |
255 if (!video || !video->hasCompositedLayerMapping()) { | 255 if (!video || !video->layer()->hasCompositedLayerMapping()) { |
256 if (isMainFrame) { | 256 if (isMainFrame) { |
257 GraphicsLayer* backgroundLayer = fixedRootBackgroundLayer(); | 257 GraphicsLayer* backgroundLayer = fixedRootBackgroundLayer(); |
258 if (backgroundLayer && !backgroundLayer->parent()) | 258 if (backgroundLayer && !backgroundLayer->parent()) |
259 rootFixedBackgroundsChanged(); | 259 rootFixedBackgroundsChanged(); |
260 } | 260 } |
261 return; | 261 return; |
262 } | 262 } |
263 | 263 |
264 GraphicsLayer* videoLayer = video->compositedLayerMapping()->mainGraphicsLay
er(); | 264 GraphicsLayer* videoLayer = video->layer()->compositedLayerMapping()->mainGr
aphicsLayer(); |
265 | 265 |
266 // The fullscreen video has layer position equal to its enclosing frame's sc
roll position because fullscreen container is fixed-positioned. | 266 // The fullscreen video has layer position equal to its enclosing frame's sc
roll position because fullscreen container is fixed-positioned. |
267 // We should reset layer position here since we are going to reattach the la
yer at the very top level. | 267 // We should reset layer position here since we are going to reattach the la
yer at the very top level. |
268 videoLayer->setPosition(IntPoint()); | 268 videoLayer->setPosition(IntPoint()); |
269 | 269 |
270 // Only steal fullscreen video layer and clear all other layers if we are th
e main frame. | 270 // Only steal fullscreen video layer and clear all other layers if we are th
e main frame. |
271 if (!isMainFrame) | 271 if (!isMainFrame) |
272 return; | 272 return; |
273 | 273 |
274 m_rootContentLayer->removeAllChildren(); | 274 m_rootContentLayer->removeAllChildren(); |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 } else if (graphicsLayer == m_scrollLayer.get()) { | 1208 } else if (graphicsLayer == m_scrollLayer.get()) { |
1209 name = "LocalFrame Scrolling Layer"; | 1209 name = "LocalFrame Scrolling Layer"; |
1210 } else { | 1210 } else { |
1211 ASSERT_NOT_REACHED(); | 1211 ASSERT_NOT_REACHED(); |
1212 } | 1212 } |
1213 | 1213 |
1214 return name; | 1214 return name; |
1215 } | 1215 } |
1216 | 1216 |
1217 } // namespace WebCore | 1217 } // namespace WebCore |
OLD | NEW |