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 upCompleted implementation of devtools' `getLayout`. (#3598) #7267
Conversation
highfive
commented
Aug 18, 2015
|
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @Manishearth (or someone else) soon. |
highfive
commented
Aug 18, 2015
|
r? @pcwalton for the querying bits |
|
The |
|
|
571829d
to
50ce147
|
|
50ce147
to
df0fec9
|
The layout/style bits look good to me. |
|
@pcwalton Is there any danger from reading the style data directly in the script task, rather than querying layout for it? |
|
|
df0fec9
to
b86508a
|
|
|
edit: (wrong issue for this comment) |
|
I'll poke pcwalton to get an answer out of him, but these changes look pretty great to me! Reviewed 7 of 7 files at r1, 6 of 6 files at r2, 1 of 1 files at r3, 1 of 1 files at r4, 1 of 1 files at r5. components/script/devtools.rs, line 141 [r1] (raw file): components/script/dom/node.rs, line 63 [r1] (raw file): components/script/dom/node.rs, line 1073 [r1] (raw file): Comments from the review on Reviewable.io |
|
-S-awaiting-review Reviewed 2 of 2 files at r6. Comments from the review on Reviewable.io |
|
@jdm If there are off-main-thread CSS transitions running, they could be concurrently modifying style. So I think you need to handle the synchronization somehow. Since styles are atomically copy-on-write, you can satisfy this by simply cloning the style object. |
|
@benschulz Instead of using |
|
Done. Can I ask, how this addresses the problem? I've only just found out about |
|
@benschulz Yes, you're right that that's a potential race. Perhaps while there are |
|
@jdm It looks like this is waiting on an answer from you? |
|
Taking this so I stop forgetting about it. |
|
Rebased in #9661. |
Completed implementation of devtools' `getLayout`. Rebase of #7267. Fixes #3598. This avoids all of the sketchy issues of trying to read the style data for margins from the script thread. I replaced it with a layout query that fetches the margin style properties for a given element. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9661) <!-- Reviewable:end -->
benschulz commentedAug 18, 2015
First PR; be gentle. ;)
Fixes #3598.
Notes
_shared_data→shared_data)? I couldn't find any naming conventions, but I assume the underscore means "don't access".