<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>42408</bug_id>
          
          <creation_ts>2010-07-15 14:33:22 -0700</creation_ts>
          <short_desc>Assertion when turning Accelerated Compositing off on a composited page</short_desc>
          <delta_ts>2011-12-21 01:16:35 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Simon Fraser (smfr)">simon.fraser</assigned_to>
          <cc>darin</cc>
    
    <cc>kbalazs</cc>
    
    <cc>qi.2.zhang</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>252115</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-07-15 14:33:22 -0700</bug_when>
    <thetext>When turning off Accelerated Compositing, we hit one of the

    ASSERT(willBeComposited == needsToBeComposited(layer));

assertions in RenderLayerCompositor::computeCompositingRequirements().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>252118</commentid>
    <comment_count>1</comment_count>
      <attachid>61724</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-07-15 14:36:03 -0700</bug_when>
    <thetext>Created attachment 61724
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>252125</commentid>
    <comment_count>2</comment_count>
      <attachid>61724</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-07-15 14:39:40 -0700</bug_when>
    <thetext>Comment on attachment 61724
Patch

Does this fix only the assertion, or does it affect behavior too? If it does have an effect on behavior, what is that effect?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>252143</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-07-15 14:58:52 -0700</bug_when>
    <thetext>There is no change in behavior; we used to do a bit of extra work for the one call to computeCompositingRequirements() after compositing was disabled, because we thought we needed to make layers, and then when we tried to, noticed that m_hasAcceleratedCompositing was false.

With the patch we never even try to make layers in that situation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>252674</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2010-07-16 13:18:37 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/63573</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>253337</commentid>
    <comment_count>5</comment_count>
    <who name="qi">qi.2.zhang</who>
    <bug_when>2010-07-19 12:42:52 -0700</bug_when>
    <thetext>*** Bug 42582 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>524595</commentid>
    <comment_count>6</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-12-20 07:09:19 -0800</bug_when>
    <thetext>I have a similar issue: https://bugs.webkit.org/show_bug.cgi?id=74511. When running fast/multicol/pagination-v-vertical-lr.html it hits the assertion in RenderLayerCompositor:

// If we just entered compositing mode, the root will have become composited (as long as accelerated compositing is enabled).
if (layer-&gt;isRootLayer()) {
    if (inCompositingMode() &amp;&amp; m_hasAcceleratedCompositing)
        willBeComposited = true;
}
    
ASSERT(willBeComposited == needsToBeComposited(layer)); &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;

In this case the layer is a root layer, and both inCompositingMode() and m_hasAcceleratedCompositing are true, but needsToBeComposited(layer) is false because layer-&gt;isNormalFlowOnly() =&gt; !layer-&gt;isSelfPaintingLayer() =&gt; !canBeComposited(layer)
Do you think another condition could be sufficient? i.e:
-if (layer-&gt;isRootLayer()) {
+if (layer-&gt;isRootLayer() &amp;&amp; canBeComposited(layer))

Thanks in advance to your help!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>524603</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-12-20 07:21:52 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; I have a similar issue: https://bugs.webkit.org/show_bug.cgi?id=74511. When running fast/multicol/pagination-v-vertical-lr.html it hits the assertion in RenderLayerCompositor:

Please file a new bug for this assertion.

&gt; In this case the layer is a root layer, and both inCompositingMode() and m_hasAcceleratedCompositing are true, but needsToBeComposited(layer) is false because layer-&gt;isNormalFlowOnly() =&gt; !layer-&gt;isSelfPaintingLayer() =&gt; !canBeComposited(layer)
&gt; Do you think another condition could be sufficient? i.e:
&gt; -if (layer-&gt;isRootLayer()) {
&gt; +if (layer-&gt;isRootLayer() &amp;&amp; canBeComposited(layer))

If the root layer cannot be composited, then all kinds of stuff will break. I think we&apos;ll have to fix this another way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>525183</commentid>
    <comment_count>8</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-12-21 01:16:35 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; I have a similar issue: https://bugs.webkit.org/show_bug.cgi?id=74511. When running fast/multicol/pagination-v-vertical-lr.html it hits the assertion in RenderLayerCompositor:
&gt; 
&gt; Please file a new bug for this assertion.

Filed https://bugs.webkit.org/show_bug.cgi?id=74999.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>61724</attachid>
            <date>2010-07-15 14:36:03 -0700</date>
            <delta_ts>2010-07-15 22:13:01 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-42408-20100715143602.patch</filename>
            <type>text/plain</type>
            <size>1757</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYkNvcmUvQ2hhbmdlTG9nIGIvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXgg
ZjM0ZDc3ZDY0ZTczMmRlZGQ5ZmZiZDE1NTFmYmIyZWEzMjA3YWFiMy4uMWYyYTk4NzJmNjMwYWRm
MTU5MGI3ODZjNjg4Yzc2ODI2MzhhZDliNSAxMDA2NDQKLS0tIGEvV2ViQ29yZS9DaGFuZ2VMb2cK
KysrIGIvV2ViQ29yZS9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxNiBAQAorMjAxMC0wNy0xNSAgU2lt
b24gRnJhc2VyICA8c2ltb24uZnJhc2VyQGFwcGxlLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBi
eSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBBc3NlcnRpb24gd2hlbiB0dXJuaW5nIEFjY2Vs
ZXJhdGVkIENvbXBvc2l0aW5nIG9mZiBvbiBhIGNvbXBvc2l0ZWQgcGFnZQorICAgICAgICBodHRw
czovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NDI0MDgKKworICAgICAgICBXaGVu
IGFjY2VsZXJhdGVkIGNvbXBvc2l0aW5nIGlzIHR1cm5lZCBvZmYsIGNoZWNrIG1faGFzQWNjZWxl
cmF0ZWRDb21wb3NpdGluZworICAgICAgICBiZWZvcmUgc2F5aW5nIHRoYXQgdGhlIHJvb3QgbGF5
ZXIgd2lsbCBiZSBjb21wb3NpdGVkLiBGaXhlcyBhbiBhc3Nlc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lQ29tcG9zaXRlZCA9IHRydWU7CisgICAgLy8gSWYg
d2UganVzdCBlbnRlcmVkIGNvbXBvc2l0aW5nIG1vZGUsIHRoZSByb290IHdpbGwgaGF2ZSBiZWNv
bWUgY29tcG9zaXRlZCAoYXMgbG9uZyBhcyBhY2NlbGVyYXRlZCBjb21wb3NpdGluZyBpcyBlbmFi
bGVkKS4KKyAgICBpZiAobGF5ZXItPmlzUm9vdExheWVyKCkpIHsKKyAgICAgICAgaWYgKGluQ29t
cG9zaXRpbmdNb2RlKCkgJiYgbV9oYXNBY2NlbGVyYXRlZENvbXBvc2l0aW5nKQorICAgICAgICAg
ICAgd2lsbEJlQ29tcG9zaXRlZCA9IHRydWU7CisgICAgfQogICAgIAogICAgIEFTU0VSVCh3aWxs
QmVDb21wb3NpdGVkID09IG5lZWRzVG9CZUNvbXBvc2l0ZWQobGF5ZXIpKTsKIAo=
</data>
<flag name="review"
          id="49797"
          type_id="1"
          status="+"
          setter="sam"
    />
          </attachment>
      

    </bug>

</bugzilla>