<?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>72284</bug_id>
          
          <creation_ts>2011-11-14 09:53:38 -0800</creation_ts>
          <short_desc>ASSERT in RenderLayerCompositor on /fast/multicol/pagination-v-horizontal-bt.html</short_desc>
          <delta_ts>2013-03-05 10:56:58 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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="Alexis Menard (darktears)">menard</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hausmann</cc>
    
    <cc>hyatt</cc>
    
    <cc>kbalazs</cc>
    
    <cc>kenneth</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>502025</commentid>
    <comment_count>0</comment_count>
    <who name="Alexis Menard (darktears)">menard</who>
    <bug_when>2011-11-14 09:53:38 -0800</bug_when>
    <thetext>ASSERT in RenderLayerCompositor with Qt port.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>502029</commentid>
    <comment_count>1</comment_count>
      <attachid>114972</attachid>
    <who name="Alexis Menard (darktears)">menard</who>
    <bug_when>2011-11-14 09:56:19 -0800</bug_when>
    <thetext>Created attachment 114972
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>502037</commentid>
    <comment_count>2</comment_count>
    <who name="Alexis Menard (darktears)">menard</who>
    <bug_when>2011-11-14 10:01:45 -0800</bug_when>
    <thetext>./WebKitTestRunner --verbose ../../../webkit/LayoutTests/fast/multicol/pagination-v-horizontal-bt.html

assert with the Qt port on WK2.

We use AC by default now.

The assert is 

0x00007f35eb3ba376 in WebCore::RenderLayerCompositor::computeCompositingRequirements (this=0x7f359403f7f0, layer=0x7f359403f6b8, overlapMap=0x7fff43cb51d0, compositingState=..., layersChanged=@0x7fff43cb523f)
    at ../../../../webkit/Source/WebCore/rendering/RenderLayerCompositor.cpp:758
758         ASSERT(willBeComposited == needsToBeComposited(layer));

The test triggers a style change in the root layer moving from a normal flow only to a different one.

I&apos;m not very familiar with the code here but it seems that if a layer is not normal flow only it can&apos;t be composited but computeCompositingRequirements assume that if we are in composition mode (the state we are before) and AC is turned on (which is always true) then the root layer will be composited but according to canBeComposited the layer can be composited only if layer-&gt;isSelfPaintingLayer(); is true which is not true anymore as the latter check !isNormalFlowOnly().

Any suggestion on how I can improve the patch is welcome, or if I spot the right problem in the first place.

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>502040</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-11-14 10:03:46 -0800</bug_when>
    <thetext>canBeComposited() can return false for the root layer? That would break all kinds of stuff.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>502042</commentid>
    <comment_count>4</comment_count>
    <who name="Alexis Menard (darktears)">menard</who>
    <bug_when>2011-11-14 10:05:49 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; canBeComposited() can return false for the root layer? That would break all kinds of stuff.

It doesn&apos;t seem that there is specific check for that. The root layer should be always composited not matter the style?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>502288</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-11-14 14:06:08 -0800</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; canBeComposited() can return false for the root layer? That would break all kinds of stuff.
&gt; 
&gt; It doesn&apos;t seem that there is specific check for that. The root layer should be always composited not matter the style?

If there are any other compositing layers, the root layer is composited, yes. If that&apos;s no longer true for multicol, then we&apos;ll have to fix it somehow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>525484</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-12-21 12:44:51 -0800</bug_when>
    <thetext>*** Bug 74999 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>525608</commentid>
    <comment_count>7</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-12-21 14:33:40 -0800</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; (In reply to comment #3)
&gt; &gt; &gt; canBeComposited() can return false for the root layer? That would break all kinds of stuff.
&gt; &gt; 
&gt; &gt; It doesn&apos;t seem that there is specific check for that. The root layer should be always composited not matter the style?
&gt; 
&gt; If there are any other compositing layers, the root layer is composited, yes. If that&apos;s no longer true for multicol, then we&apos;ll have to fix it somehow.

But we are dealing with the root layer here, rigth? So, there is no other compositing layers yet, and we are deciding whether to composite the root layer. But ts is normalFlowOnly() =&gt; !isSelfPainting(), and canBeComposited say that such layers cannot be composited. But I guess that rather means such layers _should_ not be composited, because they are too primitive to be worth to composite them. Note that canBeComposited is called from needToBeComposited. Furthermore, there was no check for whether it is a root layer before http://trac.webkit.org/changeset/63149. I think the preassumption that the root layer must be composited if we have entered into compositing mode is wrong. I don&apos;t know exactly what it means &quot;entering into compositing mode&quot; but it seems to me that it doesn&apos;t mean to force compositing to all kinds of content. Well, I&apos;m not familiar with the AC machinery, I just try to interpret what I see :) What do you think?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526102</commentid>
    <comment_count>8</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2011-12-22 01:41:23 -0800</bug_when>
    <thetext>Test results (locally, debug) with the patch: no unexpected regression, no crash on pagination-* tests.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>114972</attachid>
            <date>2011-11-14 09:56:19 -0800</date>
            <delta_ts>2011-12-21 12:45:09 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-72284-20111114145609.patch</filename>
            <type>text/plain</type>
            <size>1810</size>
            <attacher name="Alexis Menard (darktears)">menard</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTAwMTIzCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggZjA1YTM1YjgzZDFmYTlj
ZGEwYWJkOWFlZTkwZmU4ZTFlZjA3ZmViOS4uMWI5MjU0OWFmOTIxYmMzY2RmZDlmYTcyYTA1MDg1
M2MwNGE4MWNhNCAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDIwIEBACisyMDExLTExLTE0ICBBbGV4
aXMgTWVuYXJkICA8YWxleGlzLm1lbmFyZEBvcGVuYm9zc2Eub3JnPgorCisgICAgICAgIEFTU0VS
VCBpbiBSZW5kZXJMYXllckNvbXBvc2l0b3Igd2l0aCBRdCBwb3J0LgorICAgICAgICBodHRwczov
L2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9NzIyODQKKworICAgICAgICBSZXZpZXdl
ZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBXaGVuIHRoZSBzdHlsZSBvZiB0aGUgbGF5
ZXIgY2hhbmdlZCB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aXRvci5jcHAKQEAgLTc0OSw3ICs3NDksNyBAQCB2b2lkIFJlbmRlckxheWVy
Q29tcG9zaXRvcjo6Y29tcHV0ZUNvbXBvc2l0aW5nUmVxdWlyZW1lbnRzKFJlbmRlckxheWVyKiBs
YXllciwgTwogICAgIAogICAgIC8vIElmIHdlIGp1c3QgZW50ZXJlZCBjb21wb3NpdGluZyBtb2Rl
LCB0aGUgcm9vdCB3aWxsIGhhdmUgYmVjb21lIGNvbXBvc2l0ZWQgKGFzIGxvbmcgYXMgYWNjZWxl
cmF0ZWQgY29tcG9zaXRpbmcgaXMgZW5hYmxlZCkuCiAgICAgaWYgKGxheWVyLT5pc1Jvb3RMYXll
cigpKSB7Ci0gICAgICAgIGlmIChpbkNvbXBvc2l0aW5nTW9kZSgpICYmIG1faGFzQWNjZWxlcmF0
ZWRDb21wb3NpdGluZykKKyAgICAgICAgaWYgKGluQ29tcG9zaXRpbmdNb2RlKCkgJiYgbV9oYXNB
Y2NlbGVyYXRlZENvbXBvc2l0aW5nICYmIGNhbkJlQ29tcG9zaXRlZChsYXllcikpCiAgICAgICAg
ICAgICB3aWxsQmVDb21wb3NpdGVkID0gdHJ1ZTsKICAgICB9CiAgICAgCg==
</data>
<flag name="review"
          id="113749"
          type_id="1"
          status="-"
          setter="simon.fraser"
    />
          </attachment>
      

    </bug>

</bugzilla>