Closed Bug 1313700 Opened 9 years ago Closed 9 years ago

Color layer positioning seems off

Categories

(Core :: Graphics: WebRender, defect)

52 Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox52 --- affected

People

(Reporter: kats, Unassigned)

References

()

Details

Attachments

(2 files)

1. Build at commit 6425c0b66f76d0038aad3ad15ebf5029c4969956 (as of this writing this is the latest commit in jeff's WR branch) 2. Run the browser and load a simple green page like this: <html> <body style="background-color: green"> </body> Expected results: the content area is entirely green Actual results: there is a red strip at the top of the content area that is the same height as the chrome. If you turn on layers.dump you'll get the layers dump plus some extra printfs that I added about the conversion from layers to WR display items. As far as I can tell everything is getting converted to WR items correctly, and I don't know why that red strip is there.
Attached file Layers dump
Just to provide some more info, attached is the layers dump and the WR conversion output. The Color Layer is turned into a rect at (0,0) with a clip also at (0,0). That means it should be positioned at the top-left corner of the containing stacking context. The containing stacking context is the one generated by the ContainerLayer 0x128ffe800. That in turn has a bounds at (0,79) relative to *it's* stacking context, which is the one generated by ContainerLayer 0x11f1ae800 at (0,0). So given this chain of stacking contexts, the rect generated from the Color Layer should be at (0,79) relative to the window but it's actually positioned at (0,158) for some reason. At least that's my understanding of this.
Ethan, I think you can have a look at this bug.
Flags: needinfo?(ethlin)
Attached file Workaround
For some reason wrapping the rect from the color layer inside another stacking context at (0,0) fixes the problem. It shouldn't, since the stacking context is effectively a no-op.
I'll keep looking into this.
Assignee: nobody → bugmail
Flags: needinfo?(ethlin)
I didn't make too much progress here. I started writing code to dump webrender internal data structures like the scene and the layer tree in the hopes it would reveal what was going wrong, but so far everything seems fine.
Throwing this back into the pool as I'm switching gears to work on e10s-ification of the WR branch. I filed [1] for somebody to add dumping of WR data structures, there is a link to what I have so far included in that. [1] https://github.com/servo/webrender/issues/521
Assignee: bugmail → nobody
This seems to work fine in latest graphics tip. Tested on Linux.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: