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

Issue 8403008: Merge 98060 - Hidden composited iframes cause infinite loop (Closed)

Created:
9 years, 1 month ago by jamesr
Modified:
9 years, 1 month ago
Reviewers:
jamesr
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/874/
Visibility:
Public.

Description

Merge 98060 - Hidden composited iframes cause infinite loop https://bugs.webkit.org/show_bug.cgi?id=52655 Source/WebCore: Reviewed by Darin Adler. visibility:hidden is problematic for compositing, because it causes RenderLayers to be removed from the z-order layer tree. This confuses RenderLayerCompositor in several ways; it never sees these layers when traversing the tree as it computes compositing requirements, or rebuilds the layer tree. This is a particular problem with composited iframes. When an iframe becomes composited, scheduleSetNeedsStyleRecalc() is called on that iframe's ownerElement in the parent document. If this happens inside Document::updateStyleForAllDocuments(), we get into an infinite loop because notifyIFramesOfCompositingChange() queues up style update as we bounce in and out of compositing mode, so documentsThatNeedStyleRecalc never empties out. This is an initial, conservative fix that doesn't attempt to fix all the issues with visibility. It changes RenderLayerCompositor to count the number of compositing RenderLayers, and to not leave compositing mode if there are any (even if they are hidden, so not hit while traversing the z-order tree). This avoids the infinite loop. Test: compositing/visibility/hidden-iframe.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::ensureBacking): (WebCore::RenderLayer::clearBacking): * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers): (WebCore::RenderLayerCompositor::updateCompositingLayers): (WebCore::RenderLayerCompositor::computeCompositingRequirements): * rendering/RenderLayerCompositor.h: (WebCore::RenderLayerCompositor::layerBecameComposited): (WebCore::RenderLayerCompositor::layerBecameNonComposited): LayoutTests: Reviewed by Darin Adler. Test with a visibility:hidden iframe, whose subframe becomes composited. * compositing/visibility/hidden-iframe-expected.txt: Added. * compositing/visibility/hidden-iframe.html: Added. TBR=simon.fraser@apple.com Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98521

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -4 lines) Patch
M Source/WebCore/rendering/RenderLayer.cpp View 1 chunk +5 lines, -1 line 0 comments Download
M Source/WebCore/rendering/RenderLayerCompositor.h View 3 chunks +10 lines, -0 lines 0 comments Download
M Source/WebCore/rendering/RenderLayerCompositor.cpp View 4 chunks +12 lines, -3 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
jamesr
9 years, 1 month ago (2011-10-26 22:10:54 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698