Skip to content

Allow more valid use of calc expressions - #7400

Merged
bors-servo merged 1 commit into
servo:masterfrom
dzbarsky:angle
Nov 2, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
dzbarsky:angle

Conversation

@dzbarsky

Copy link
Copy Markdown
Contributor

Review on Reviewable

@pcwalton

pcwalton commented Sep 1, 2015

Copy link
Copy Markdown
Contributor

@dzbarsky Is this ready for review?

@dzbarsky

dzbarsky commented Sep 1, 2015

Copy link
Copy Markdown
Contributor Author

Yes, it's good to go.

@jdm jdm mentioned this pull request Sep 1, 2015
@metajack

metajack commented Sep 1, 2015

Copy link
Copy Markdown
Collaborator

r? @pcwalton

@SimonSapin

Copy link
Copy Markdown
Member

Note that the first 19 commits of this are in #7185, which is good to go except that it needs to add support for the ch unit (which was added while the PR was waiting on my to review).

@SimonSapin

Copy link
Copy Markdown
Member

See also #7496.

@bors-servo

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #7496) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added S-needs-rebase There are merge conflict errors. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Sep 2, 2015
@jdm jdm closed this Sep 2, 2015
@jdm jdm reopened this Sep 2, 2015
@dzbarsky

dzbarsky commented Sep 5, 2015

Copy link
Copy Markdown
Contributor Author

Rebased this to apply cleanly.

@jdm

jdm commented Sep 5, 2015

Copy link
Copy Markdown
Member

Github disagrees.

@dzbarsky

dzbarsky commented Sep 7, 2015

Copy link
Copy Markdown
Contributor Author

the var() stuff rotted this PR. Rebased again.

@frewsxcv

frewsxcv commented Sep 7, 2015

Copy link
Copy Markdown
Contributor

@dzbarsky In case you missed it, there's a style check failure:

./components/style/values.rs:1353: missing space after ,

@frewsxcv frewsxcv removed the S-needs-rebase There are merge conflict errors. label Sep 7, 2015
@SimonSapin

Copy link
Copy Markdown
Member

Reviewed 1 of 20 files at r1, 8 of 19 files at r2, 1 of 1 files at r3.
Review status: all files reviewed at latest revision, 5 unresolved discussions, all commit checks successful.


components/style/properties.mako.rs, line 1927 [r3] (raw file):
Please remove the outdated comment. (It used to explain why percentages were replaced with lengths at parse time.)


components/style/values.rs, line 210 [r3] (raw file):
It’s not great that this uses a Calc struct that has a percentage field while this Length type should not allow percentages, but I don’t have a good idea to suggest how to fix this without duplicating a lot of calc() code. What do you think?


components/style/values.rs, line 398 [r3] (raw file):
This accepts fractional numbers in the input and implicitly rounds them to integers, doesn’t it? See <integer> v.s. <number> in https://drafts.csswg.org/css-values/#calc-type-checking . I think this can be solved by adding an Integer variant to CalcUnit.


components/style/values.rs, line 447 [r3] (raw file):
Maybe rename this to CalcLengthOrPercentage?


components/style/values.rs, line 492 [r3] (raw file):
Change this to Ok(Token::Delim('/')) if expected_unit != CalcUnit::Integer => {. (See previous comment.)


Comments from the review on Reviewable.io

@SimonSapin SimonSapin added S-needs-code-changes Changes have not yet been made that were requested by a reviewer. and removed S-awaiting-review There is new code that needs to be reviewed. labels Sep 10, 2015
@SimonSapin SimonSapin assigned SimonSapin and unassigned pcwalton Sep 10, 2015
@highfive highfive removed the S-needs-code-changes Changes have not yet been made that were requested by a reviewer. label Sep 13, 2015
@eefriedman

Copy link
Copy Markdown
Contributor

@bors-servo retry #8258

@bors-servo

Copy link
Copy Markdown
Contributor

⚡ Previous build results for android, gonk, linux-dev, mac-rel-wpt are reusable. Rebuilding only linux-rel, mac-dev-ref-unit, mac-rel-css...

@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-css

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Oct 30, 2015
@eefriedman

Copy link
Copy Markdown
Contributor

I'm not sure exactly why, but /css21_dev/html4/font-146.htm is consistently failing.

@dzbarsky

dzbarsky commented Nov 2, 2015

Copy link
Copy Markdown
Contributor Author

The problem is the following declaration: div.test { font: 4em/-2em serif; background: red; color: yellow; }
The text in the div should not be visible, because the line-height is negative. Previously, servo didn't know how to parse 4em for the font-size, so the declaration would be ignored. We are now parsing that part, but are not yet handling the line-height, so the text shows up and the test breaks. We should fix font parsing, but this is follow-up fodder.

@eefriedman

Copy link
Copy Markdown
Contributor

Fine; I'll r+ if you update the expected result.

@dzbarsky

dzbarsky commented Nov 2, 2015

Copy link
Copy Markdown
Contributor Author

Looks like I was wrong. The actual problem is that we lost the check for negative line heights...

@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 2, 2015
@SimonSapin

Copy link
Copy Markdown
Member

@bors-servo r=mbrubeck

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 00980ea has been approved by mbrubeck

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 2, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 00980ea with merge e72bd14...

bors-servo pushed a commit that referenced this pull request Nov 2, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - mac-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 2, 2015
@SimonSapin

Copy link
Copy Markdown
Member
Unexpected Results
==================

/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_12.html
----------------------------------------------------------------
TIMEOUT [Parent]

Sounds maybe unrelated?

@SimonSapin

Copy link
Copy Markdown
Member

@bors-servo retry

#8292

@bors-servo

Copy link
Copy Markdown
Contributor

⚡ Previous build results for android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css are reusable. Rebuilding only mac-rel-wpt...

@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit 00980ea into servo:master Nov 2, 2015
@SimonSapin SimonSapin removed the S-tests-failed The changes caused existing tests to fail. label Jan 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants