Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: Source/core/rendering/RenderLayerBacking.cpp

Issue 22454003: Support subtitles for native fullscreen video (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add dangling pointer check Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 if (RuntimeEnabledFeatures::cssCompositingEnabled()) 507 if (RuntimeEnabledFeatures::cssCompositingEnabled())
508 updateLayerBlendMode(renderer()->style()); 508 updateLayerBlendMode(renderer()->style());
509 509
510 bool isSimpleContainer = isSimpleContainerCompositingLayer(); 510 bool isSimpleContainer = isSimpleContainerCompositingLayer();
511 511
512 m_owningLayer->updateDescendantDependentFlags(); 512 m_owningLayer->updateDescendantDependentFlags();
513 513
514 // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer a nd its non-compositing 514 // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer a nd its non-compositing
515 // descendants. So, the visibility flag for m_graphicsLayer should be true i f there are any 515 // descendants. So, the visibility flag for m_graphicsLayer should be true i f there are any
516 // non-compositing visible layers. 516 // non-compositing visible layers.
517 m_graphicsLayer->setContentsVisible(m_owningLayer->hasVisibleContent() || ha sVisibleNonCompositingDescendantLayers()); 517 bool contentsVisible = m_owningLayer->hasVisibleContent() || hasVisibleNonCo mpositingDescendantLayers();
518 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && renderer()->i sVideo()) {
519 HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer()->node());
520 if (mediaElement->isFullscreen())
521 contentsVisible = false;
522 }
523 m_graphicsLayer->setContentsVisible(contentsVisible);
518 524
519 RenderStyle* style = renderer()->style(); 525 RenderStyle* style = renderer()->style();
520 // 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
521 bool preserves3D = style->transformStyle3D() == TransformStyle3DPreserve3D & & !renderer()->hasReflection(); 527 bool preserves3D = style->transformStyle3D() == TransformStyle3DPreserve3D & & !renderer()->hasReflection();
522 m_graphicsLayer->setPreserves3D(preserves3D); 528 m_graphicsLayer->setPreserves3D(preserves3D);
523 m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == Backfa ceVisibilityVisible); 529 m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == Backfa ceVisibilityVisible);
524 530
525 RenderLayer* compAncestor = m_owningLayer->ancestorCompositingLayer(); 531 RenderLayer* compAncestor = m_owningLayer->ancestorCompositingLayer();
526 532
527 // We compute everything relative to the enclosing compositing layer. 533 // We compute everything relative to the enclosing compositing layer.
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 1885 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
1880 name = "Scrolling Contents Layer"; 1886 name = "Scrolling Contents Layer";
1881 } else { 1887 } else {
1882 ASSERT_NOT_REACHED(); 1888 ASSERT_NOT_REACHED();
1883 } 1889 }
1884 1890
1885 return name; 1891 return name;
1886 } 1892 }
1887 1893
1888 } // namespace WebCore 1894 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698