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

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: revert video-controls-override.html 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 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 if (RuntimeEnabledFeatures::cssCompositingEnabled()) 503 if (RuntimeEnabledFeatures::cssCompositingEnabled())
504 updateLayerBlendMode(renderer()->style()); 504 updateLayerBlendMode(renderer()->style());
505 505
506 bool isSimpleContainer = isSimpleContainerCompositingLayer(); 506 bool isSimpleContainer = isSimpleContainerCompositingLayer();
507 507
508 m_owningLayer->updateDescendantDependentFlags(); 508 m_owningLayer->updateDescendantDependentFlags();
509 509
510 // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer a nd its non-compositing 510 // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer a nd its non-compositing
511 // descendants. So, the visibility flag for m_graphicsLayer should be true i f there are any 511 // descendants. So, the visibility flag for m_graphicsLayer should be true i f there are any
512 // non-compositing visible layers. 512 // non-compositing visible layers.
513 m_graphicsLayer->setContentsVisible(m_owningLayer->hasVisibleContent() || ha sVisibleNonCompositingDescendantLayers()); 513 bool contentsVisible = m_owningLayer->hasVisibleContent() || hasVisibleNonCo mpositingDescendantLayers();
514 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && renderer()->i sVideo()) {
515 HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer()->node());
516 if (mediaElement->isFullscreen())
517 contentsVisible = false;
518 }
519 m_graphicsLayer->setContentsVisible(contentsVisible);
514 520
515 RenderStyle* style = renderer()->style(); 521 RenderStyle* style = renderer()->style();
516 // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959 522 // FIXME: reflections should force transform-style to be flat in the style: https://bugs.webkit.org/show_bug.cgi?id=106959
517 bool preserves3D = style->transformStyle3D() == TransformStyle3DPreserve3D & & !renderer()->hasReflection(); 523 bool preserves3D = style->transformStyle3D() == TransformStyle3DPreserve3D & & !renderer()->hasReflection();
518 m_graphicsLayer->setPreserves3D(preserves3D); 524 m_graphicsLayer->setPreserves3D(preserves3D);
519 m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == Backfa ceVisibilityVisible); 525 m_graphicsLayer->setBackfaceVisibility(style->backfaceVisibility() == Backfa ceVisibilityVisible);
520 526
521 RenderLayer* compAncestor = m_owningLayer->ancestorCompositingLayer(); 527 RenderLayer* compAncestor = m_owningLayer->ancestorCompositingLayer();
522 528
523 // We compute everything relative to the enclosing compositing layer. 529 // We compute everything relative to the enclosing compositing layer.
(...skipping 1483 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2013 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2008 name = "Scrolling Contents Layer"; 2014 name = "Scrolling Contents Layer";
2009 } else { 2015 } else {
2010 ASSERT_NOT_REACHED(); 2016 ASSERT_NOT_REACHED();
2011 } 2017 }
2012 2018
2013 return name; 2019 return name;
2014 } 2020 }
2015 2021
2016 } // namespace WebCore 2022 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698