OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 if (RuntimeEnabledFeatures::cssCompositingEnabled()) | 505 if (RuntimeEnabledFeatures::cssCompositingEnabled()) |
506 updateLayerBlendMode(renderer()->style()); | 506 updateLayerBlendMode(renderer()->style()); |
507 | 507 |
508 bool isSimpleContainer = isSimpleContainerCompositingLayer(); | 508 bool isSimpleContainer = isSimpleContainerCompositingLayer(); |
509 | 509 |
510 m_owningLayer->updateDescendantDependentFlags(); | 510 m_owningLayer->updateDescendantDependentFlags(); |
511 | 511 |
512 // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer a
nd its non-compositing | 512 // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer a
nd its non-compositing |
513 // descendants. So, the visibility flag for m_graphicsLayer should be true i
f there are any | 513 // descendants. So, the visibility flag for m_graphicsLayer should be true i
f there are any |
514 // non-compositing visible layers. | 514 // non-compositing visible layers. |
515 m_graphicsLayer->setContentsVisible(m_owningLayer->hasVisibleContent() || ha
sVisibleNonCompositingDescendantLayers()); | 515 bool contentsVisible = m_owningLayer->hasVisibleContent() || hasVisibleNonCo
mpositingDescendantLayers(); |
| 516 #if USE(NATIVE_FULLSCREEN_VIDEO) |
| 517 if (renderer()->isVideo()) { |
| 518 HTMLMediaElement* mediaElement = toMediaElement(renderer()->node()); |
| 519 if (mediaElement->isFullscreen()) |
| 520 contentsVisible = false; |
| 521 } |
| 522 #endif |
| 523 m_graphicsLayer->setContentsVisible(contentsVisible); |
516 | 524 |
517 RenderStyle* style = renderer()->style(); | 525 RenderStyle* style = renderer()->style(); |
518 // FIXME: reflections should force transform-style to be flat in the style:
https://bugs.webkit.org/show_bug.cgi?id=106959 | 526 // FIXME: reflections should force transform-style to be flat in the style:
https://bugs.webkit.org/show_bug.cgi?id=106959 |
519 bool preserves3D = style->transformStyle3D() == TransformStyle3DPreserve3D &
& !renderer()->hasReflection(); | 527 bool preserves3D = style->transformStyle3D() == TransformStyle3DPreserve3D &
& !renderer()->hasReflection(); |
520 m_graphicsLayer->setPreserves3D(preserves3D); | 528 m_graphicsLayer->setPreserves3D(preserves3D); |
521 m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == Backfa
ceVisibilityVisible); | 529 m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == Backfa
ceVisibilityVisible); |
522 | 530 |
523 RenderLayer* compAncestor = m_owningLayer->ancestorCompositingLayer(); | 531 RenderLayer* compAncestor = m_owningLayer->ancestorCompositingLayer(); |
524 | 532 |
525 // We compute everything relative to the enclosing compositing layer. | 533 // We compute everything relative to the enclosing compositing layer. |
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1916 if (m_layerForVerticalScrollbar) | 1924 if (m_layerForVerticalScrollbar) |
1917 backingMemory += m_layerForVerticalScrollbar->backingStoreMemoryEstimate
(); | 1925 backingMemory += m_layerForVerticalScrollbar->backingStoreMemoryEstimate
(); |
1918 | 1926 |
1919 if (m_layerForScrollCorner) | 1927 if (m_layerForScrollCorner) |
1920 backingMemory += m_layerForScrollCorner->backingStoreMemoryEstimate(); | 1928 backingMemory += m_layerForScrollCorner->backingStoreMemoryEstimate(); |
1921 | 1929 |
1922 return backingMemory; | 1930 return backingMemory; |
1923 } | 1931 } |
1924 | 1932 |
1925 } // namespace WebCore | 1933 } // namespace WebCore |
OLD | NEW |