Repository navigation
Implement CSS3 Calc - #7185
Implement CSS3 Calc#7185dzbarsky wants to merge 20 commits into
Conversation
|
Also need to figure out if we have tests or can steal some from Gecko. |
|
Pretty sure the AST simplification code isn't quite right and can actually enter some places I thought were unreachable. I'll plug those up as part of writing the tests, but let me know if you can think of a cleaner way to do this. |
There was a problem hiding this comment.
(Remove this before committing)
|
Ok, the implementation now passes all the tests I've written. I want to figure out if I can somehow clean up the code because it's a little messy |
|
@dzbarsky Do you want to keep iterating on this some more, or is this ready for review? |
|
It's ready for review now. I'm gone for the next week so there's no rush. |
|
Reviewed 1 of 6 files at r1, 5 of 7 files at r2, 1 of 2 files at r3, 3 of 4 files at r8, 1 of 2 files at r11. components/layout/block.rs, line 333 [r16] (raw file): Though perhaps there should be a special case when the percentage component is zero. components/layout/block.rs, line 334 [r16] (raw file): components/layout/block.rs, line 347 [r16] (raw file): components/layout/block.rs, line 1130 [r16] (raw file): components/layout/fragment.rs, line 459 [r16] (raw file): components/layout/fragment.rs, line 615 [r16] (raw file): components/style/properties.mako.rs, line 1864 [r16] (raw file): components/style/values.rs, line 423 [r16] (raw file): components/style/values.rs, line 1287 [r16] (raw file): Comments from the review on Reviewable.io |
|
Review status: 11 of 12 files reviewed at latest revision, 8 unresolved discussions, all commit checks successful. components/layout/block.rs, line 333 [r16] (raw file): components/layout/block.rs, line 334 [r16] (raw file): components/layout/block.rs, line 347 [r16] (raw file): components/layout/block.rs, line 1130 [r16] (raw file): components/layout/fragment.rs, line 0 [r16] (raw file): components/layout/fragment.rs, line 459 [r16] (raw file): components/style/properties.mako.rs, line 1864 [r16] (raw file): components/style/values.rs, line 423 [r16] (raw file): components/style/values.rs, line 1287 [r16] (raw file): Comments from the review on Reviewable.io |
|
☔ The latest upstream changes (presumably #7265) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Reviewed 1 of 1 files at r17. components/layout/block.rs, line 333 [r16] (raw file): components/layout/block.rs, line 347 [r16] (raw file): components/layout/block.rs, line 1130 [r16] (raw file): components/style/values.rs, line 442 [r17] (raw file): components/style/values.rs, line 1303 [r17] (raw file): components/style/values.rs, line 1327 [r17] (raw file): Comments from the review on Reviewable.io |
|
Review status: 1 of 17 files reviewed at latest revision, 9 unresolved discussions, all commit checks successful. components/style/values.rs, line 442 [r17] (raw file): components/style/values.rs, line 1303 [r17] (raw file): Comments from the review on Reviewable.io |
436e2a3 to
25829bb
Compare
|
Is this superseded by #7400? |
|
Yes, but I can either rebase #7400 after this merges or merge it all at once. Whichever is easier for @SimonSapin |
|
@bors-servo r+ |
|
📌 Commit 2591a89 has been approved by |
Implement CSS3 Calc This is #7185 with one commit added to make it build merged with master, which got support for the `ch` unit in the meantime. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7496) <!-- Reviewable:end -->
|
☔ The latest upstream changes (presumably #7510) made this pull request unmergeable. Please resolve the merge conflicts. |
|
I had hoped this would auto-merge with #7496. Is there something here that’s not there? |
|
Yeah, I added a commit adding ch support and modified the test. I see you merged your version already so I'll just roll the test change into the other calc PR I have open. |
Doesn't work for font-size and I need to investigate how it should work for units that aren't lengths, but what I have so far should be ok. r? @SimonSapin
Fixes #7156.