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 upSerialize style attributes on demand… #17476
Conversation
|
@bors-servo try |
Serialize style attributes on demand… … rather than every time that CSSOM `Element.style` is modified. Results are *not* cached in this PR. We could add APIs that work with `&mut AttrValue` rather than `&AttrValue` to add some caching. CC #17399 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17476) <!-- Reviewable:end -->
|
|
|
@bors-servo try |
Serialize style attributes on demand… … rather than every time that CSSOM `Element.style` is modified. Results are *not* cached in this PR. We could add APIs that work with `&mut AttrValue` rather than `&AttrValue` to add some caching. CC #17399 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17476) <!-- Reviewable:end -->
|
|
|
@bors-servo try |
Serialize style attributes on demand… … rather than every time that CSSOM `Element.style` is modified. Results are *not* cached in this PR. We could add APIs that work with `&mut AttrValue` rather than `&AttrValue` to add some caching. CC #17399 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17476) <!-- Reviewable:end -->
|
|
|
Lots of |
|
Yes, the hack is sufficient for next week. |
|
Previously, all variants of the That means everything that relied on deref needs to do something else. I could play whack-a-mole until the test suite passes, but I’m worried that this would leave more panics waiting to happen. So if we want keep pursuing wide usage of For code that needs to deal with potentially any variant, the Another idea might be to add a method that panics, but only in the |
|
Could we use |
|
Looks like |
|
In that case, we should definitely decide what to do here. I don't like leaving good demo performance gated on temporary hacks; I've been burned by this too many times as folks try our demos and call us out. |
|
I’ll try to hack something with a |
|
When writing my last comment I forgot that accessing the |
|
|
|
This does not appear to be going anywhere. |
SimonSapin commentedJun 22, 2017
•
edited by larsbergstrom
… rather than every time that CSSOM
Element.styleis modified. Results are not cached in this PR. We could add APIs that work with&mut AttrValuerather than&AttrValueto add some caching.CC #17399
This change is