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

Side by Side Diff: Source/core/layout/compositing/CompositedDeprecatedPaintLayerMapping.cpp

Issue 1254613003: Let the WebMediaPlayer decide whether to use overlay video. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address Xianzhu's Comments Created 5 years, 4 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
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 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 752
753 FloatSize oldSize = m_graphicsLayer->size(); 753 FloatSize oldSize = m_graphicsLayer->size();
754 const IntSize& contentsSize = relativeCompositingBounds.size(); 754 const IntSize& contentsSize = relativeCompositingBounds.size();
755 if (oldSize != contentsSize) 755 if (oldSize != contentsSize)
756 m_graphicsLayer->setSize(contentsSize); 756 m_graphicsLayer->setSize(contentsSize);
757 757
758 // m_graphicsLayer is the corresponding GraphicsLayer for this DeprecatedPai ntLayer and its non-compositing 758 // m_graphicsLayer is the corresponding GraphicsLayer for this DeprecatedPai ntLayer and its non-compositing
759 // descendants. So, the visibility flag for m_graphicsLayer should be true i f there are any 759 // descendants. So, the visibility flag for m_graphicsLayer should be true i f there are any
760 // non-compositing visible layers. 760 // non-compositing visible layers.
761 bool contentsVisible = m_owningLayer.hasVisibleContent() || hasVisibleNonCom positingDescendant(&m_owningLayer); 761 bool contentsVisible = m_owningLayer.hasVisibleContent() || hasVisibleNonCom positingDescendant(&m_owningLayer);
762 if (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled() && layoutObject( )->isVideo()) { 762 if (layoutObject()->isVideo()) {
763 HTMLVideoElement* videoElement = toHTMLVideoElement(layoutObject()->node ()); 763 HTMLVideoElement* videoElement = toHTMLVideoElement(layoutObject()->node ());
764 if (videoElement->isFullscreen() && !HTMLMediaElement::isMediaStreamURL( videoElement->sourceURL().string())) 764 if (videoElement->isFullscreen() && videoElement->usesOverlayFullscreenV ideo())
765 contentsVisible = false; 765 contentsVisible = false;
766 } 766 }
767 m_graphicsLayer->setContentsVisible(contentsVisible); 767 m_graphicsLayer->setContentsVisible(contentsVisible);
768 768
769 m_graphicsLayer->setBackfaceVisibility(layoutObject()->style()->backfaceVisi bility() == BackfaceVisibilityVisible); 769 m_graphicsLayer->setBackfaceVisibility(layoutObject()->style()->backfaceVisi bility() == BackfaceVisibilityVisible);
770 } 770 }
771 771
772 void CompositedDeprecatedPaintLayerMapping::computeGraphicsLayerParentLocation(c onst DeprecatedPaintLayer* compositingContainer, const IntRect& ancestorComposit ingBounds, IntPoint& graphicsLayerParentLocation) 772 void CompositedDeprecatedPaintLayerMapping::computeGraphicsLayerParentLocation(c onst DeprecatedPaintLayer* compositingContainer, const IntRect& ancestorComposit ingBounds, IntPoint& graphicsLayerParentLocation)
773 { 773 {
774 if (compositingContainer && compositingContainer->compositedDeprecatedPaintL ayerMapping()->hasClippingLayer()) { 774 if (compositingContainer && compositingContainer->compositedDeprecatedPaintL ayerMapping()->hasClippingLayer()) {
(...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after
2384 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { 2384 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) {
2385 name = "Scrolling Block Selection Layer"; 2385 name = "Scrolling Block Selection Layer";
2386 } else { 2386 } else {
2387 ASSERT_NOT_REACHED(); 2387 ASSERT_NOT_REACHED();
2388 } 2388 }
2389 2389
2390 return name; 2390 return name;
2391 } 2391 }
2392 2392
2393 } // namespace blink 2393 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutVideo.cpp ('k') | Source/core/layout/compositing/DeprecatedPaintLayerCompositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698