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 upBug 10104 - Only restyle nodes that uses viewport percentage units on viewport size change #11890
Conversation
highfive
commented
Jun 28, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jun 28, 2016
|
r? @mbrubeck |
|
Profiling shows that the restyle events dropped from
to
The HTML waterfall chart also showed improved restyle speed. |
| fn has_viewport_percentage(&self) -> bool { | ||
| match *self { | ||
| % for property in data.longhands: | ||
| PropertyDeclaration::${property.camel_case}(DeclaredValue::Value(ref val)) => val.has_viewport_percentage(), |
This comment has been minimized.
This comment has been minimized.
shinglyu
Jun 28, 2016
Author
Member
This line is too long, but wrapping this will make the generated code ugly. Suggestions welcome.
|
Here are the profiler HTML file and tsv dump: |
|
|
07426f8
to
672dcf1
|
|
|
ping @mbrubeck |
|
I've started reviewing this and should have a complete review ready soon. |
|
@bors-servo delegate+ This looks good! Can land with r=mbrubeck after rebasing and addressing the minor whitespace/comment issues below. Reviewed 1 of 1 files at r1, 1 of 3 files at r7, 5 of 14 files at r9, 21 of 21 files at r10. components/layout_thread/lib.rs, line 1073 [r10] (raw file):
You can remove this comment. components/layout_thread/lib.rs, line 1078 [r10] (raw file):
It would be nice if we could avoid traversing the node's descendants after they are already dirtied. Maybe this could be a follow-up enhancement. components/style/properties/properties.mako.rs, line 830 [r9] (raw file):
|
|
|
672dcf1
to
720cf27
|
I'll land it first and make the skipping traversal part a followup, because this part of the code get bitrotted too fast. |
|
@bors-servo r=mbrubeck |
|
|
|
@mbrubeck I've updated the patch to support Stylo. One thing worth mentioning is that Gecko doesn't has the flag I just added, so I fallback to a full restyle when it is used in Stylo. Do you want to check again? Or I can just merge? |
|
@bors-servo r=mbrubeck |
|
|
Bug 10104 - Only restyle nodes that uses viewport percentage units on viewport size change <!-- Please describe your changes on the following line: --> Bug 10104 - Only restyle nodes that uses viewport percentage units on viewport size change --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #10104 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11890) <!-- Reviewable:end -->
|
|
|
|
5452bba
to
f754cac
|
Implement the |
|
@bors-servo r=mbrubeck |
|
|
Bug 10104 - Only restyle nodes that uses viewport percentage units on viewport size change <!-- Please describe your changes on the following line: --> Bug 10104 - Only restyle nodes that uses viewport percentage units on viewport size change --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #10104 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11890) <!-- Reviewable:end -->
|
|
shinglyu commentedJun 28, 2016
•
edited by larsbergstrom
Bug 10104 - Only restyle nodes that uses viewport percentage units on viewport size change
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is