| 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 19 matching lines...) Expand all Loading... |
| 30 #include "core/animation/AnimationTimeline.h" | 30 #include "core/animation/AnimationTimeline.h" |
| 31 #include "core/animation/DocumentAnimations.h" | 31 #include "core/animation/DocumentAnimations.h" |
| 32 #include "core/dom/DOMNodeIds.h" | 32 #include "core/dom/DOMNodeIds.h" |
| 33 #include "core/dom/Fullscreen.h" | 33 #include "core/dom/Fullscreen.h" |
| 34 #include "core/editing/FrameSelection.h" | 34 #include "core/editing/FrameSelection.h" |
| 35 #include "core/frame/FrameHost.h" | 35 #include "core/frame/FrameHost.h" |
| 36 #include "core/frame/FrameView.h" | 36 #include "core/frame/FrameView.h" |
| 37 #include "core/frame/LocalFrame.h" | 37 #include "core/frame/LocalFrame.h" |
| 38 #include "core/frame/Settings.h" | 38 #include "core/frame/Settings.h" |
| 39 #include "core/html/HTMLIFrameElement.h" | 39 #include "core/html/HTMLIFrameElement.h" |
| 40 #include "core/html/HTMLVideoElement.h" |
| 40 #include "core/inspector/InspectorInstrumentation.h" | 41 #include "core/inspector/InspectorInstrumentation.h" |
| 41 #include "core/layout/LayoutPart.h" | 42 #include "core/layout/LayoutPart.h" |
| 42 #include "core/layout/LayoutVideo.h" | 43 #include "core/layout/LayoutVideo.h" |
| 43 #include "core/layout/LayoutView.h" | 44 #include "core/layout/LayoutView.h" |
| 44 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" | 45 #include "core/layout/compositing/CompositedDeprecatedPaintLayerMapping.h" |
| 45 #include "core/layout/compositing/CompositingInputsUpdater.h" | 46 #include "core/layout/compositing/CompositingInputsUpdater.h" |
| 46 #include "core/layout/compositing/CompositingLayerAssigner.h" | 47 #include "core/layout/compositing/CompositingLayerAssigner.h" |
| 47 #include "core/layout/compositing/CompositingRequirementsUpdater.h" | 48 #include "core/layout/compositing/CompositingRequirementsUpdater.h" |
| 48 #include "core/layout/compositing/GraphicsLayerTreeBuilder.h" | 49 #include "core/layout/compositing/GraphicsLayerTreeBuilder.h" |
| 49 #include "core/layout/compositing/GraphicsLayerUpdater.h" | 50 #include "core/layout/compositing/GraphicsLayerUpdater.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 #if ENABLE(ASSERT) | 275 #if ENABLE(ASSERT) |
| 275 | 276 |
| 276 void DeprecatedPaintLayerCompositor::assertNoUnresolvedDirtyBits() | 277 void DeprecatedPaintLayerCompositor::assertNoUnresolvedDirtyBits() |
| 277 { | 278 { |
| 278 ASSERT(m_pendingUpdateType == CompositingUpdateNone); | 279 ASSERT(m_pendingUpdateType == CompositingUpdateNone); |
| 279 ASSERT(!m_rootShouldAlwaysCompositeDirty); | 280 ASSERT(!m_rootShouldAlwaysCompositeDirty); |
| 280 } | 281 } |
| 281 | 282 |
| 282 #endif | 283 #endif |
| 283 | 284 |
| 284 void DeprecatedPaintLayerCompositor::applyOverlayFullscreenVideoAdjustment() | 285 void DeprecatedPaintLayerCompositor::applyOverlayFullscreenVideoAdjustmentIfNeed
ed() |
| 285 { | 286 { |
| 286 m_inOverlayFullscreenVideo = false; | 287 m_inOverlayFullscreenVideo = false; |
| 287 if (!m_rootContentLayer) | 288 if (!m_rootContentLayer) |
| 288 return; | 289 return; |
| 289 | 290 |
| 290 bool isLocalRoot = m_layoutView.frame()->isLocalRoot(); | 291 bool isLocalRoot = m_layoutView.frame()->isLocalRoot(); |
| 291 LayoutVideo* video = findFullscreenVideoLayoutObject(m_layoutView.document()
); | 292 LayoutVideo* video = findFullscreenVideoLayoutObject(m_layoutView.document()
); |
| 292 if (!video || !video->layer()->hasCompositedDeprecatedPaintLayerMapping()) { | 293 if (!video || !video->layer()->hasCompositedDeprecatedPaintLayerMapping() ||
!video->videoElement()->usesOverlayFullscreenVideo()) { |
| 293 if (isLocalRoot) { | 294 if (isLocalRoot) { |
| 294 GraphicsLayer* backgroundLayer = fixedRootBackgroundLayer(); | 295 GraphicsLayer* backgroundLayer = fixedRootBackgroundLayer(); |
| 295 if (backgroundLayer && !backgroundLayer->parent()) | 296 if (backgroundLayer && !backgroundLayer->parent()) |
| 296 rootFixedBackgroundsChanged(); | 297 rootFixedBackgroundsChanged(); |
| 297 } | 298 } |
| 298 return; | 299 return; |
| 299 } | 300 } |
| 300 | 301 |
| 301 GraphicsLayer* videoLayer = video->layer()->compositedDeprecatedPaintLayerMa
pping()->mainGraphicsLayer(); | 302 GraphicsLayer* videoLayer = video->layer()->compositedDeprecatedPaintLayerMa
pping()->mainGraphicsLayer(); |
| 302 | 303 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 { | 408 { |
| 408 TRACE_EVENT0("blink", "GraphicsLayerTreeBuilder::rebuild"); | 409 TRACE_EVENT0("blink", "GraphicsLayerTreeBuilder::rebuild"); |
| 409 GraphicsLayerTreeBuilder().rebuild(*updateRoot, ancestorInfo); | 410 GraphicsLayerTreeBuilder().rebuild(*updateRoot, ancestorInfo); |
| 410 } | 411 } |
| 411 | 412 |
| 412 if (childList.isEmpty()) | 413 if (childList.isEmpty()) |
| 413 destroyRootLayer(); | 414 destroyRootLayer(); |
| 414 else | 415 else |
| 415 m_rootContentLayer->setChildren(childList); | 416 m_rootContentLayer->setChildren(childList); |
| 416 | 417 |
| 417 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled()) | 418 applyOverlayFullscreenVideoAdjustmentIfNeeded(); |
| 418 applyOverlayFullscreenVideoAdjustment(); | |
| 419 } | 419 } |
| 420 | 420 |
| 421 if (m_needsUpdateFixedBackground) { | 421 if (m_needsUpdateFixedBackground) { |
| 422 rootFixedBackgroundsChanged(); | 422 rootFixedBackgroundsChanged(); |
| 423 m_needsUpdateFixedBackground = false; | 423 m_needsUpdateFixedBackground = false; |
| 424 } | 424 } |
| 425 | 425 |
| 426 for (unsigned i = 0; i < layersNeedingPaintInvalidation.size(); i++) | 426 for (unsigned i = 0; i < layersNeedingPaintInvalidation.size(); i++) |
| 427 forceRecomputePaintInvalidationRectsIncludingNonCompositingDescendants(l
ayersNeedingPaintInvalidation[i]->layoutObject()); | 427 forceRecomputePaintInvalidationRectsIncludingNonCompositingDescendants(l
ayersNeedingPaintInvalidation[i]->layoutObject()); |
| 428 | 428 |
| (...skipping 779 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 blink | 1217 } // namespace blink |
| OLD | NEW |