Bug 84480 - ASSERT failure in RenderLayer::computeRepaintRects
Summary: ASSERT failure in RenderLayer::computeRepaintRects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-20 12:44 PDT by Yong Li
Modified: 2012-04-24 18:58 PDT (History)
3 users (show)

See Also:


Attachments
The patch (479 bytes, patch)
2012-04-20 12:58 PDT, Yong Li
simon.fraser: review-
Details | Formatted Diff | Diff
With test case (3.49 KB, patch)
2012-04-24 13:45 PDT, Yong Li
simon.fraser: review-
Details | Formatted Diff | Diff
with test case (3.62 KB, patch)
2012-04-24 14:15 PDT, Yong Li
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yong Li 2012-04-20 12:44:07 PDT
When accelerated compositing is enabled, an assert failure can occur in RenderLayer::computeRepaintRects:

ASSERT(!m_visibleContentStatusDirty);

#0  WebCore::RenderLayer::computeRepaintRects
#1  WebCore::RenderLayerCompositor::updateBacking
#2  WebCore::RenderLayerCompositor::updateLayerCompositingState (
#3  WebCore::RenderLayer::styleChanged (this=0x766bbb28, 
#4  WebCore::RenderBoxModelObject::styleDidChange

The issue can be simply and obviously fixed by adding a call to updateVisibilityStatus() before styleChanged() calling compositor->updateLayerCompositingState().

Do I have to create a test case for it?
Comment 1 Yong Li 2012-04-20 12:58:00 PDT
Created attachment 138149 [details]
The patch

The problem is obvious and easy to fix. The patch doesn't include a test. Creating a test may need much more effort than fixing it, and probably doesn't worth for such a small flaw.
Comment 2 Simon Fraser (smfr) 2012-04-20 13:55:11 PDT
Comment on attachment 138149 [details]
The patch

This should have a testcase. I haven't seen this assertion on Mac.
Comment 3 Yong Li 2012-04-24 13:45:48 PDT
Created attachment 138634 [details]
With test case
Comment 4 Simon Fraser (smfr) 2012-04-24 14:01:31 PDT
Comment on attachment 138634 [details]
With test case

View in context: https://bugs.webkit.org/attachment.cgi?id=138634&action=review

> LayoutTests/compositing/visibility/compositing-and-visibility--turned-off-together.html:16
> +if (window.layoutTestController)
> +    layoutTestController.dumpAsText();
> +
> +function dotest()
> +{
> +    document.getElementById('theelement').style.setProperty('visibility','hidden','');
> +    document.getElementById('theelement').style.removeProperty('-webkit-perspective');
> +
> +    // force layout
> +    document.body.offsetTop;
> +}
> +</script>
> +</head>
> +<body onload="setTimeout(dotest,20)">

If you're using setTimeout, you need to use layoutTestController.waitUntilDone/notifyDone.
Comment 5 Yong Li 2012-04-24 14:15:39 PDT
Created attachment 138640 [details]
with test case
Comment 6 Yong Li 2012-04-24 14:42:13 PDT
Comment on attachment 138640 [details]
with test case

Thanks Simon!
Comment 7 WebKit Review Bot 2012-04-24 18:58:25 PDT
Comment on attachment 138640 [details]
with test case

Clearing flags on attachment: 138640

Committed r115157: <http://trac.webkit.org/changeset/115157>
Comment 8 WebKit Review Bot 2012-04-24 18:58:41 PDT
All reviewed patches have been landed.  Closing bug.