Bug 54921 - [Chromium] Issue 60965: Layout test fast/canvas/setWidthResetAfterForcedRender.html is failing on GPU path
Summary: [Chromium] Issue 60965: Layout test fast/canvas/setWidthResetAfterForcedRende...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-21 18:01 PST by Naoki Takano
Modified: 2011-02-25 16:24 PST (History)
7 users (show)

See Also:


Attachments
Patch (1.72 KB, patch)
2011-02-21 18:06 PST, Naoki Takano
jamesr: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Naoki Takano 2011-02-21 18:01:32 PST
[Chromium] Issue 60965:	Layout test fast/canvas/setWidthResetAfterForcedRender.html is failing on GPU path
Comment 1 Naoki Takano 2011-02-21 18:06:52 PST
Created attachment 83250 [details]
Patch
Comment 2 Naoki Takano 2011-02-21 18:08:42 PST
James,

Could you review my patch?

I guess 2D canvas acceleration doesn't need "requiresLayer()".
If it returns true, the layout is different from the non accelerated layout.

Thanks,
Comment 3 Build Bot 2011-02-21 18:23:49 PST
Attachment 83250 [details] did not build on win:
Build output: http://queues.webkit.org/results/7940821
Comment 4 James Robinson 2011-02-21 19:46:44 PST
Comment on attachment 83250 [details]
Patch

This is wrong, accelerated 2d canvases also require a layer. Why do you think this helps on that test?
Comment 5 Early Warning System Bot 2011-02-21 20:03:11 PST
Attachment 83250 [details] did not build on qt:
Build output: http://queues.webkit.org/results/7938998
Comment 6 Collabora GTK+ EWS bot 2011-02-21 21:35:43 PST
Attachment 83250 [details] did not build on gtk:
Build output: http://queues.webkit.org/results/7943179
Comment 7 Naoki Takano 2011-02-22 00:30:09 PST
James,

Thank you for your review.

As you know, requiresLayer() function is called bye
RenderBoxModelObject::styleDidChange()
RenderObject::updateFillImages()

If the returned values are true, the rendering tree becomes different from the non-accelerated rendering trees. The canvas layer order is different from non-accelerated.

For example, in setWidthResetAfterForce, the canvas element becomes the same layer of the root. That causes the test failure. That is why I change this part.

I want to make sure the layer purpose. I thought this looked like the very special layer to overlay the rendered images in partial. Is this correct? Or is there another purpose for the layer?

Still I'm wondering why the requiresLayer() can change rendering tree order.

Thanks,

(In reply to comment #4)
> (From update of attachment 83250 [details])
> This is wrong, accelerated 2d canvases also require a layer. Why do you think this helps on that test?
Comment 8 Naoki Takano 2011-02-22 19:16:13 PST
James,

Could you give me your thought?

Thanks,

(In reply to comment #7)
> James,
> 
> Thank you for your review.
> 
> As you know, requiresLayer() function is called bye
> RenderBoxModelObject::styleDidChange()
> RenderObject::updateFillImages()
> 
> If the returned values are true, the rendering tree becomes different from the non-accelerated rendering trees. The canvas layer order is different from non-accelerated.
> 
> For example, in setWidthResetAfterForce, the canvas element becomes the same layer of the root. That causes the test failure. That is why I change this part.
> 
> I want to make sure the layer purpose. I thought this looked like the very special layer to overlay the rendered images in partial. Is this correct? Or is there another purpose for the layer?
> 
> Still I'm wondering why the requiresLayer() can change rendering tree order.
> 
> Thanks,
> 
> (In reply to comment #4)
> > (From update of attachment 83250 [details] [details])
> > This is wrong, accelerated 2d canvases also require a layer. Why do you think this helps on that test?
Comment 9 James Robinson 2011-02-22 19:22:16 PST
(In reply to comment #7)
> James,
> 
> Thank you for your review.
> 
> As you know, requiresLayer() function is called bye
> RenderBoxModelObject::styleDidChange()
> RenderObject::updateFillImages()
> 
> If the returned values are true, the rendering tree becomes different from the non-accelerated rendering trees. The canvas layer order is different from non-accelerated.

Yes - this is expected.  An accelerated canvas requires a layer whereas a non-accelerated canvas may or may not need its own layer.  Different does not mean wrong.

> 
> For example, in setWidthResetAfterForce, the canvas element becomes the same layer of the root. That causes the test failure. That is why I change this part.

I'm not sure what you mean by 'becomes the same layer of the root' - could you expand?

> 
> I want to make sure the layer purpose. I thought this looked like the very special layer to overlay the rendered images in partial. Is this correct? Or is there another purpose for the layer?

The RenderLayer is required because accelerated canvas require their own composited layer.  See RenderLayerCompositor::requiresCompositingForCanvas() to see a similar check.

I'm pretty sure Stephen fixed this test with https://bugs.webkit.org/show_bug.cgi?id=54561 at http://trac.webkit.org/changeset/78922 - could you confirm if the test still fails after that revision?
Comment 10 Naoki Takano 2011-02-22 19:50:31 PST
James,

Thank you for your comment. I'll make sure Stephan's patch. Still I'm a beginner for WebKit, I have to study a lot... So I'm sorry if my patch is far from the correct fix;-)

But thank you for your dedication every time.

(In reply to comment #9)
> (In reply to comment #7)
> > James,
> > 
> > Thank you for your review.
> > 
> > As you know, requiresLayer() function is called bye
> > RenderBoxModelObject::styleDidChange()
> > RenderObject::updateFillImages()
> > 
> > If the returned values are true, the rendering tree becomes different from the non-accelerated rendering trees. The canvas layer order is different from non-accelerated.
> 
> Yes - this is expected.  An accelerated canvas requires a layer whereas a non-accelerated canvas may or may not need its own layer.  Different does not mean wrong.
> 
> > 
> > For example, in setWidthResetAfterForce, the canvas element becomes the same layer of the root. That causes the test failure. That is why I change this part.
> 
> I'm not sure what you mean by 'becomes the same layer of the root' - could you expand?
> 
> > 
> > I want to make sure the layer purpose. I thought this looked like the very special layer to overlay the rendered images in partial. Is this correct? Or is there another purpose for the layer?
> 
> The RenderLayer is required because accelerated canvas require their own composited layer.  See RenderLayerCompositor::requiresCompositingForCanvas() to see a similar check.
> 
> I'm pretty sure Stephen fixed this test with https://bugs.webkit.org/show_bug.cgi?id=54561 at http://trac.webkit.org/changeset/78922 - could you confirm if the test still fails after that revision?
Comment 11 Naoki Takano 2011-02-22 23:53:29 PST
James,

I confirmed Stephen's fix and it looks Ok with Chrome.

But it doesn't with DumpRenderTree.

As you know, we can run the test like following,
./webkit/tools/layout_tests/run_webkit_tests.sh  --accelerated-2d-canvas fast/canvas/setWidthResetAfterForcedRender.html

It fails as following,
         RenderText {#text} at (0,0) size 176x19
           text run at (0,0) width 176: "Actual output: (blank canvas)"
       RenderBlock (anonymous) at (0,152) size 784x55
-        RenderHTMLCanvas {CANVAS} at (0,0) size 100x50
         RenderText {#text} at (0,0) size 0x0
         RenderText {#text} at (0,0) size 0x0
+layer at (8,168) size 100x50
+  RenderHTMLCanvas {CANVAS} at (0,0) size 100x50

As you see, rendering tree is different.

That's why I said
> > For example, in setWidthResetAfterForce, the canvas element becomes the same layer of the root. That causes the test failure. That is why I change this part.

If we have to fix completely, we have to consider DumpRenderTree part, right?

What do you think?

(In reply to comment #10)
> James,
> 
> Thank you for your comment. I'll make sure Stephan's patch. Still I'm a beginner for WebKit, I have to study a lot... So I'm sorry if my patch is far from the correct fix;-)
> 
> But thank you for your dedication every time.
> 
> (In reply to comment #9)
> > (In reply to comment #7)
> > > James,
> > > 
> > > Thank you for your review.
> > > 
> > > As you know, requiresLayer() function is called bye
> > > RenderBoxModelObject::styleDidChange()
> > > RenderObject::updateFillImages()
> > > 
> > > If the returned values are true, the rendering tree becomes different from the non-accelerated rendering trees. The canvas layer order is different from non-accelerated.
> > 
> > Yes - this is expected.  An accelerated canvas requires a layer whereas a non-accelerated canvas may or may not need its own layer.  Different does not mean wrong.
> > 
> > > 
> > > For example, in setWidthResetAfterForce, the canvas element becomes the same layer of the root. That causes the test failure. That is why I change this part.
> > 
> > I'm not sure what you mean by 'becomes the same layer of the root' - could you expand?
> > 
> > > 
> > > I want to make sure the layer purpose. I thought this looked like the very special layer to overlay the rendered images in partial. Is this correct? Or is there another purpose for the layer?
> > 
> > The RenderLayer is required because accelerated canvas require their own composited layer.  See RenderLayerCompositor::requiresCompositingForCanvas() to see a similar check.
> > 
> > I'm pretty sure Stephen fixed this test with https://bugs.webkit.org/show_bug.cgi?id=54561 at http://trac.webkit.org/changeset/78922 - could you confirm if the test still fails after that revision?
Comment 12 Naoki Takano 2011-02-23 23:42:59 PST
James,

Could you give me your comment?

Thanks,

(In reply to comment #11)
> James,
> 
> I confirmed Stephen's fix and it looks Ok with Chrome.
> 
> But it doesn't with DumpRenderTree.
> 
> As you know, we can run the test like following,
> ./webkit/tools/layout_tests/run_webkit_tests.sh  --accelerated-2d-canvas fast/canvas/setWidthResetAfterForcedRender.html
> 
> It fails as following,
>          RenderText {#text} at (0,0) size 176x19
>            text run at (0,0) width 176: "Actual output: (blank canvas)"
>        RenderBlock (anonymous) at (0,152) size 784x55
> -        RenderHTMLCanvas {CANVAS} at (0,0) size 100x50
>          RenderText {#text} at (0,0) size 0x0
>          RenderText {#text} at (0,0) size 0x0
> +layer at (8,168) size 100x50
> +  RenderHTMLCanvas {CANVAS} at (0,0) size 100x50
> 
> As you see, rendering tree is different.
> 
> That's why I said
> > > For example, in setWidthResetAfterForce, the canvas element becomes the same layer of the root. That causes the test failure. That is why I change this part.
> 
> If we have to fix completely, we have to consider DumpRenderTree part, right?
> 
> What do you think?
> 
> (In reply to comment #10)
> > James,
> > 
> > Thank you for your comment. I'll make sure Stephan's patch. Still I'm a beginner for WebKit, I have to study a lot... So I'm sorry if my patch is far from the correct fix;-)
> > 
> > But thank you for your dedication every time.
> > 
> > (In reply to comment #9)
> > > (In reply to comment #7)
> > > > James,
> > > > 
> > > > Thank you for your review.
> > > > 
> > > > As you know, requiresLayer() function is called bye
> > > > RenderBoxModelObject::styleDidChange()
> > > > RenderObject::updateFillImages()
> > > > 
> > > > If the returned values are true, the rendering tree becomes different from the non-accelerated rendering trees. The canvas layer order is different from non-accelerated.
> > > 
> > > Yes - this is expected.  An accelerated canvas requires a layer whereas a non-accelerated canvas may or may not need its own layer.  Different does not mean wrong.
> > > 
> > > > 
> > > > For example, in setWidthResetAfterForce, the canvas element becomes the same layer of the root. That causes the test failure. That is why I change this part.
> > > 
> > > I'm not sure what you mean by 'becomes the same layer of the root' - could you expand?
> > > 
> > > > 
> > > > I want to make sure the layer purpose. I thought this looked like the very special layer to overlay the rendered images in partial. Is this correct? Or is there another purpose for the layer?
> > > 
> > > The RenderLayer is required because accelerated canvas require their own composited layer.  See RenderLayerCompositor::requiresCompositingForCanvas() to see a similar check.
> > > 
> > > I'm pretty sure Stephen fixed this test with https://bugs.webkit.org/show_bug.cgi?id=54561 at http://trac.webkit.org/changeset/78922 - could you confirm if the test still fails after that revision?
Comment 13 Naoki Takano 2011-02-25 14:46:01 PST
James,

Could you give me your comment?

(In reply to comment #12)
> James,
> 
> Could you give me your comment?
> 
> Thanks,
> 
> (In reply to comment #11)
> > James,
> > 
> > I confirmed Stephen's fix and it looks Ok with Chrome.
> > 
> > But it doesn't with DumpRenderTree.
> > 
> > As you know, we can run the test like following,
> > ./webkit/tools/layout_tests/run_webkit_tests.sh  --accelerated-2d-canvas fast/canvas/setWidthResetAfterForcedRender.html
> > 
> > It fails as following,
> >          RenderText {#text} at (0,0) size 176x19
> >            text run at (0,0) width 176: "Actual output: (blank canvas)"
> >        RenderBlock (anonymous) at (0,152) size 784x55
> > -        RenderHTMLCanvas {CANVAS} at (0,0) size 100x50
> >          RenderText {#text} at (0,0) size 0x0
> >          RenderText {#text} at (0,0) size 0x0
> > +layer at (8,168) size 100x50
> > +  RenderHTMLCanvas {CANVAS} at (0,0) size 100x50
> > 
> > As you see, rendering tree is different.
> > 
> > That's why I said
> > > > For example, in setWidthResetAfterForce, the canvas element becomes the same layer of the root. That causes the test failure. That is why I change this part.
> > 
> > If we have to fix completely, we have to consider DumpRenderTree part, right?
> > 
> > What do you think?
> > 
> > (In reply to comment #10)
> > > James,
> > > 
> > > Thank you for your comment. I'll make sure Stephan's patch. Still I'm a beginner for WebKit, I have to study a lot... So I'm sorry if my patch is far from the correct fix;-)
> > > 
> > > But thank you for your dedication every time.
> > > 
> > > (In reply to comment #9)
> > > > (In reply to comment #7)
> > > > > James,
> > > > > 
> > > > > Thank you for your review.
> > > > > 
> > > > > As you know, requiresLayer() function is called bye
> > > > > RenderBoxModelObject::styleDidChange()
> > > > > RenderObject::updateFillImages()
> > > > > 
> > > > > If the returned values are true, the rendering tree becomes different from the non-accelerated rendering trees. The canvas layer order is different from non-accelerated.
> > > > 
> > > > Yes - this is expected.  An accelerated canvas requires a layer whereas a non-accelerated canvas may or may not need its own layer.  Different does not mean wrong.
> > > > 
> > > > > 
> > > > > For example, in setWidthResetAfterForce, the canvas element becomes the same layer of the root. That causes the test failure. That is why I change this part.
> > > > 
> > > > I'm not sure what you mean by 'becomes the same layer of the root' - could you expand?
> > > > 
> > > > > 
> > > > > I want to make sure the layer purpose. I thought this looked like the very special layer to overlay the rendered images in partial. Is this correct? Or is there another purpose for the layer?
> > > > 
> > > > The RenderLayer is required because accelerated canvas require their own composited layer.  See RenderLayerCompositor::requiresCompositingForCanvas() to see a similar check.
> > > > 
> > > > I'm pretty sure Stephen fixed this test with https://bugs.webkit.org/show_bug.cgi?id=54561 at http://trac.webkit.org/changeset/78922 - could you confirm if the test still fails after that revision?
Comment 14 James Robinson 2011-02-25 14:48:15 PST
(In reply to comment #11)
> James,
> 
> I confirmed Stephen's fix and it looks Ok with Chrome.
> 
> But it doesn't with DumpRenderTree.
> 
> As you know, we can run the test like following,
> ./webkit/tools/layout_tests/run_webkit_tests.sh  --accelerated-2d-canvas fast/canvas/setWidthResetAfterForcedRender.html
> 
> It fails as following,
>          RenderText {#text} at (0,0) size 176x19
>            text run at (0,0) width 176: "Actual output: (blank canvas)"
>        RenderBlock (anonymous) at (0,152) size 784x55
> -        RenderHTMLCanvas {CANVAS} at (0,0) size 100x50
>          RenderText {#text} at (0,0) size 0x0
>          RenderText {#text} at (0,0) size 0x0
> +layer at (8,168) size 100x50
> +  RenderHTMLCanvas {CANVAS} at (0,0) size 100x50
> 
> As you see, rendering tree is different.

Yes.  The new render tree is correct when accelerated canvas is enabled as I said in comment #9.
Comment 15 Naoki Takano 2011-02-25 16:24:23 PST
I see, so we have to change test patterns. Because even after the change, still the test says "Error" in setWidthResetAfterForcedRender.html.

(In reply to comment #14)
> (In reply to comment #11)
> > James,
> > 
> > I confirmed Stephen's fix and it looks Ok with Chrome.
> > 
> > But it doesn't with DumpRenderTree.
> > 
> > As you know, we can run the test like following,
> > ./webkit/tools/layout_tests/run_webkit_tests.sh  --accelerated-2d-canvas fast/canvas/setWidthResetAfterForcedRender.html
> > 
> > It fails as following,
> >          RenderText {#text} at (0,0) size 176x19
> >            text run at (0,0) width 176: "Actual output: (blank canvas)"
> >        RenderBlock (anonymous) at (0,152) size 784x55
> > -        RenderHTMLCanvas {CANVAS} at (0,0) size 100x50
> >          RenderText {#text} at (0,0) size 0x0
> >          RenderText {#text} at (0,0) size 0x0
> > +layer at (8,168) size 100x50
> > +  RenderHTMLCanvas {CANVAS} at (0,0) size 100x50
> > 
> > As you see, rendering tree is different.
> 
> Yes.  The new render tree is correct when accelerated canvas is enabled as I said in comment #9.