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 upCentralize construction of specified url() values in style. #13791
Conversation
highfive
commented
Oct 16, 2016
|
Heads up! This PR modifies the following files:
|
highfive
commented
Oct 16, 2016
|
I don’t see how this helps. You still need to do that work sooner or later. Worse, it’s possible for two threads to race and both do that work. |
|
Maybe it doesn't show up anymore in the profile because I'm delaying and never getting there (maybe the font panic I'm getting in the demo happens before layout?). In any case, this is going to be better in the case we don't need to resolve the computed url, for example if the element is not displayed. I'll investigate more though. |
|
|
|
I’m tempted to close this as I don’t think it’s a good idea, but let’s get a second opinion. @pcwalton, what do you think? |
|
Yep, I agree resolving it lazily may not be a good idea. I'd still like to refcount urls a lot more though, does that seem ok to you @SimonSapin? |
|
|
bc728ff
to
2ed1422
|
So I ended up refactoring how we handle style urls, so the place is centralized and we can refactor this in the future more easily. I agree with @SimonSapin we should be bypassing rust-url for data-uris, but I'd prefer to leave that as a followup for now. r? @SimonSapin |
0b57d83
to
7f7faf8
|
r=me with Reviewed 15 of 15 files at r1, 4 of 5 files at r2. components/style/values/specified/url.rs, line 139 at r1 (raw file):
This needs to use Comments from Reviewable |
1b41c7f
to
0197734
Centralize construction of specified url() values in style. This reduces a decent amount of overhead in #13778. r? @SimonSapin --- <!-- 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 <!-- Either: --> - [x] There are tests for these changes OR <!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13791) <!-- Reviewable:end -->
|
|
highfive
commented
Nov 9, 2016
|
|
@bors-servo retry #14162 |
Centralize construction of specified url() values in style. This reduces a decent amount of overhead in #13778. r? @SimonSapin --- <!-- 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 <!-- Either: --> - [x] There are tests for these changes OR <!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13791) <!-- Reviewable:end -->
|
@bors-servo r=SimonSapin Homu seemed stuck so I rebased. |
|
|
|
@bors-servo force clean retry |
|
@bors-servo retry
|
Centralize construction of specified url() values in style. This reduces a decent amount of overhead in #13778. r? @SimonSapin --- <!-- 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 <!-- Either: --> - [x] There are tests for these changes OR <!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13791) <!-- Reviewable:end -->
|
|
emilio commentedOct 16, 2016
•
edited by larsbergstrom
This reduces a decent amount of overhead in #13778.
r? @SimonSapin
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is