Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number::parse should not simplify calc() to number when parsing #15960

Closed
upsuper opened this issue Mar 15, 2017 · 1 comment
Closed

Number::parse should not simplify calc() to number when parsing #15960

upsuper opened this issue Mar 15, 2017 · 1 comment

Comments

@upsuper
Copy link
Member

@upsuper upsuper commented Mar 15, 2017

Length::parse doesn't simplify calc() to a single length during parsing, Number::parse shouldn't do so either.

For example, the code below

<!DOCTYPE HTML>
<p style="line-height: calc(1)"></p>
<script>
let $p = document.querySelector('p');
alert($p.style.lineHeight);
</script>

should output calc(1) rather than 1, just like changing it to calc(1px) would output calc(1px) not 1px.

@highfive
Copy link

@highfive highfive commented Mar 26, 2017

cc @emilio

@bholley bholley added the A-stylo label Mar 26, 2017
bors-servo added a commit that referenced this issue Mar 26, 2017
style: Make numbers keep track of whether they were specified as calc().

Fixes #15960

<!-- 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/16144)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 26, 2017
style: Make numbers keep track of whether they were specified as calc().

Fixes #15960

<!-- 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/16144)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 26, 2017
style: Make numbers keep track of whether they were specified as calc().

Fixes #15960

<!-- 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/16144)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 27, 2017
style: Make numbers keep track of whether they were specified as calc().

Fixes #15960

<!-- 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/16144)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 27, 2017
style: Make numbers keep track of whether they were specified as calc().

Fixes #15960

<!-- 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/16144)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 27, 2017
style: Make numbers keep track of whether they were specified as calc().

Fixes #15960

<!-- 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/16144)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 27, 2017
style: Make numbers keep track of whether they were specified as calc().

Fixes #15960

<!-- 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/16144)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 27, 2017
style: Make numbers keep track of whether they were specified as calc().

Fixes #15960

<!-- 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/16144)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.