Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upunrendered content uses doc's background color #1210
Conversation
|
Thanks for the feedback on the weekend! |
| SetUnRenderedColor(id, color) => { | ||
| match compositor_layer { | ||
| Some(ref mut layer) => { | ||
| layer.unrendered_color = color; |
This comment has been minimized.
This comment has been minimized.
eschweic
Nov 11, 2013
This isn't quite correct in the case of iframes. This will set the base compositor layer correctly, but if an iframe has unrendered content, the background color will be sent to the root's compositor layer instead the iframe's.
Instead, you should add logic to compositor_layer.rs that will recursively look for the iframe with the correct id that was passed in via this message, and only set the background color if the ids match; otherwise, recurse on the layer's children. Then, call that method here rather than setting the layer's color directly.
You might also need to set recomposite to true so the updates will immediately be displayed to the screen.
| scene.background_color.r = layer.unrendered_color.r; | ||
| scene.background_color.g = layer.unrendered_color.g; | ||
| scene.background_color.b = layer.unrendered_color.b; | ||
| scene.background_color.a = layer.unrendered_color.a; |
This comment has been minimized.
This comment has been minimized.
eschweic
Nov 11, 2013
Ah, I see, right now setting the clear color will only work with the root layer anyway. Getting an unrendered color to appear for iframes is going to take a bit more work. I would suggest leaving this as is, but creating an issue.
fixes #140 This shouldn't be merged until the appropriate change is made in rust layers (servo/rust-layers#37). I'm making a pull request anyway to start getting some feedback.
|
Set up a branch on rust-layers that is pointing at servo/rust-layers@390b1d3, then stage the modified submodule and amend this commit. |
|
Also, once you've got your rust-layers update commit, can you squash all three into a single one? |
|
@ibnc You can if you want, though I think this branch is still mergeable. To do the rust-layers update, just switch into src/support/layers/rust-layers and |
|
@metajack, should I just cherry pick the commit, servo/rust-layers@390b1d3, from rust-layers, or should I just go ahead and update from the current master branch? |
|
Ah, I think I broke this. getting "No rule to make target |
|
It seems the layers.rc was replaced by lib.rs for rustpkg, I presume. Where do I reconfigure this to use lib.rs? |
|
Does it work if you run the configure script from your build directory again? |
|
I ran it again without a cleaning up. I'm going to do a clean build to see if I get the error again. |
|
@ibnc: Sorry, you'll need my rustpkg updates to Servo before you can build it with master rust-layers. I'm about to submit a PR for that. |
|
@kmcallister ah, okay. I'll sit tight then |
|
You'll also need to rebase now unfortunately. It should be a straightforward one. I just approved @kmcallister's PR so it will hopefully land shortly. |
|
I've rebased, and I am getting an issue with rustpkg and rust-geom saying:
The thing is there is an lib.rs file under src/support/geom/rust-geom. |
|
I'll pull your branch and try tomorrow. |
|
@metajack any luck? |
uses html's background color, or body's.
|
Rebased. I still can't quite figure out why rustpkg isn't building rust-geom, but no one else seems to be having the issue; so, I figure it's my local environment in some way, and that the tests should pass with bors. If everything looks good, then would you mind trying to merge @metajack? |
This comment has been minimized.
This comment has been minimized.
|
saw approval from jdm |
This comment has been minimized.
This comment has been minimized.
|
merging ibnc/servo/resizing_background_color = 9886135 into auto |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
all tests pass: |
This comment has been minimized.
This comment has been minimized.
|
fast-forwarding master to auto = 010b8cd |
fixes #140 This shouldn't be merged until the appropriate change is made in rust layers (servo/rust-layers#37). I'm making a pull request anyway to start getting some feedback.
9886135
into
servo:master
ibnc commentedNov 10, 2013
fixes #140
This shouldn't be merged until the appropriate change is made in rust layers (servo/rust-layers#37). I'm making a pull request anyway to start getting some feedback.