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

Issue 9120020: Revert 98735 - Source/WebCore: The HTML5 video element in Safari does not respect "visibility:hid... (Closed)

Created:
8 years, 11 months ago by Ken Russell (switch to Gerrit)
Modified:
8 years, 11 months ago
Reviewers:
kerz_chromium
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/963/
Visibility:
Public.

Description

Revert 98735 - Source/WebCore: The HTML5 video element in Safari does not respect "visibility:hidden" CSS property (http://crbug.com/107283) https://bugs.webkit.org/show_bug.cgi?id=38829 Reviewed by James Robinson. Make compositing and CSS visibility play nicely together. The main issue was that an old optimization (see bug 4377) caused visibility:hidden layers to not appear in the z-order lists, but those layers could still become composited, but would remain detached. In addition, composited layers which were visibility:hidden would become visible sometimes. With this fix, the z-order lists always contain all layers when the page is in compositing mode. GraphicsLayer is changed to ensure that visibility:hidden layers show no content, and visible descendants of hidden layers work correctly. Tests: compositing/visibility/visibility-composited-transforms.html compositing/visibility/visibility-composited.html compositing/visibility/visibility-image-layers-dynamic.html compositing/visibility/visibility-image-layers.html * platform/graphics/GraphicsLayer.cpp: (WebCore::GraphicsLayer::GraphicsLayer): Init m_contentsVisible to true. (WebCore::GraphicsLayer::dumpProperties): Dump m_contentsVisible if not true. * platform/graphics/GraphicsLayer.h: (WebCore::GraphicsLayer::contentsAreVisible): Getter for m_contentsVisible. (WebCore::GraphicsLayer::setContentsVisible): Setter for m_contentsVisible. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::setContentsVisible): Override setContentsVisible. (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Handle ContentsVisibilityChanged flag (WebCore::GraphicsLayerCA::updateSublayerList): Only parent the m_contentsLayer if the layer has visible contents. (WebCore::GraphicsLayerCA::updateContentsVisibility): For bits painted into the layer itself, we hide it by clearing the backing store. * platform/graphics/ca/GraphicsLayerCA.h: Removed obsolete comment on the DrawsContentChanged flag, added ContentsVisibilityChanged flag. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateZOrderLists): If we're in compositing mode, include all layers in the z-order lists. (WebCore::RenderLayer::collectLayers): New param to specify whether we need to collect all layers. * rendering/RenderLayer.h: (WebCore::RenderLayer::hasVisibleDescendant): Add comment about the need for an assertion in hasVisibleContent() , and assertion in hasVisibleDescendant(). * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Call setContentsVisible() on the GraphicsLayer. (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): We can use simple container layers in cases where visibility:hidden causes layer content to not be drawn. (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendants): Renamed from hasNonCompositingDescendants() because it now also looks at visibility to decide when things are visible. * rendering/RenderLayerBacking.h: hasNonCompositingDescendants() renamed to hasVisibleNonCompositingDescendants(). LayoutTests: The HTML5 video element in Safari does not respect "visibility:hidden" CSS property https://bugs.webkit.org/show_bug.cgi?id=38829 Test various configurations of compositing layers and visibility. Reviewed by James Robinson. * compositing/visibility/visibility-composited-expected.png: Added. * compositing/visibility/visibility-composited-transforms-expected.png: Added. * compositing/visibility/visibility-composited-transforms.html: Added. * compositing/visibility/visibility-composited.html: Added. * compositing/visibility/visibility-image-layers-dynamic-expected.txt: Added. * compositing/visibility/visibility-image-layers-dynamic.html: Added. * compositing/visibility/visibility-image-layers-expected.png: Added. * compositing/visibility/visibility-image-layers.html: Added. TBR=simon.fraser@apple.com Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=104365

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -522 lines) Patch
D LayoutTests/compositing/visibility/visibility-composited.html View 1 chunk +0 lines, -72 lines 0 comments Download
D LayoutTests/compositing/visibility/visibility-composited-expected.png View Binary file 0 comments Download
D LayoutTests/compositing/visibility/visibility-composited-transforms.html View 1 chunk +0 lines, -61 lines 0 comments Download
D LayoutTests/compositing/visibility/visibility-composited-transforms-expected.png View Binary file 0 comments Download
D LayoutTests/compositing/visibility/visibility-image-layers.html View 1 chunk +0 lines, -68 lines 0 comments Download
D LayoutTests/compositing/visibility/visibility-image-layers-dynamic.html View 1 chunk +0 lines, -95 lines 0 comments Download
D LayoutTests/compositing/visibility/visibility-image-layers-dynamic-expected.txt View 1 chunk +0 lines, -139 lines 0 comments Download
D LayoutTests/compositing/visibility/visibility-image-layers-expected.png View Binary file 0 comments Download
M Source/WebCore/platform/graphics/GraphicsLayer.h View 2 chunks +0 lines, -4 lines 0 comments Download
M Source/WebCore/platform/graphics/GraphicsLayer.cpp View 2 chunks +0 lines, -6 lines 0 comments Download
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h View 4 chunks +2 lines, -5 lines 0 comments Download
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp View 5 chunks +2 lines, -35 lines 0 comments Download
M Source/WebCore/rendering/RenderLayer.h View 2 chunks +1 line, -2 lines 0 comments Download
M Source/WebCore/rendering/RenderLayer.cpp View 3 chunks +5 lines, -11 lines 0 comments Download
M Source/WebCore/rendering/RenderLayerBacking.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderLayerBacking.cpp View 5 chunks +16 lines, -23 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Ken Russell (switch to Gerrit)
8 years, 11 months ago (2012-01-07 01:51:04 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698