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

style: Refactor and add infrastructure for font metrics in style. #14174

Merged
merged 1 commit into from Nov 13, 2016

Conversation

@emilio
Copy link
Member

emilio commented Nov 11, 2016


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because moves stuff around without adding functionality.

This commit itself only moves things around and adds an extra parameter to the
apply_declarations function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.


This change is Reviewable

@emilio
Copy link
Member Author

emilio commented Nov 11, 2016

@emilio
Copy link
Member Author

emilio commented Nov 11, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 11, 2016

Trying commit 67de820 with merge 6a01ab8...

bors-servo added a commit that referenced this pull request Nov 11, 2016
style: Refactor and add infrastructure for font metrics in style.

<!-- Please describe your changes on the following line: -->

---
<!-- 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] These changes do not require tests because moves stuff around without adding functionality.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.

<!-- 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/14174)
<!-- Reviewable:end -->
@emilio
Copy link
Member Author

emilio commented Nov 11, 2016

Bobby said he'd need to do a bit of investigation to review this, r? @Manishearth

@highfive highfive assigned Manishearth and unassigned bholley Nov 11, 2016
@emilio emilio force-pushed the emilio:font-provider branch from 67de820 to 42946f7 Nov 11, 2016
@emilio
Copy link
Member Author

emilio commented Nov 11, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Nov 11, 2016

Trying commit 42946f7 with merge 4a5a652...

bors-servo added a commit that referenced this pull request Nov 11, 2016
style: Refactor and add infrastructure for font metrics in style.

<!-- Please describe your changes on the following line: -->

---
<!-- 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] These changes do not require tests because moves stuff around without adding functionality.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.

<!-- 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/14174)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 11, 2016

The build was interrupted to prioritize another pull request.

@bors-servo
Copy link
Contributor

bors-servo commented Nov 11, 2016

Trying commit 42946f7 with merge abd659c...

bors-servo added a commit that referenced this pull request Nov 11, 2016
style: Refactor and add infrastructure for font metrics in style.

<!-- Please describe your changes on the following line: -->

---
<!-- 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] These changes do not require tests because moves stuff around without adding functionality.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.

<!-- 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/14174)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 11, 2016

💔 Test failed - linux-rel-css

@emilio
Copy link
Member Author

emilio commented Nov 11, 2016

@bors-servo retry

  • Git failure
@bors-servo
Copy link
Contributor

bors-servo commented Nov 11, 2016

Trying commit 42946f7 with merge d486b87...

bors-servo added a commit that referenced this pull request Nov 11, 2016
style: Refactor and add infrastructure for font metrics in style.

<!-- Please describe your changes on the following line: -->

---
<!-- 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] These changes do not require tests because moves stuff around without adding functionality.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.

<!-- 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/14174)
<!-- Reviewable:end -->
@emilio emilio removed the S-tests-failed label Nov 11, 2016
@emilio emilio force-pushed the emilio:font-provider branch from 42946f7 to ec0450a Nov 11, 2016
@emilio
Copy link
Member Author

emilio commented Nov 11, 2016

@bors-servo try

  • Git failure again, rebased
@bors-servo
Copy link
Contributor

bors-servo commented Nov 11, 2016

Trying commit ec0450a with merge bc75819...

bors-servo added a commit that referenced this pull request Nov 11, 2016
style: Refactor and add infrastructure for font metrics in style.

<!-- Please describe your changes on the following line: -->

---
<!-- 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] These changes do not require tests because moves stuff around without adding functionality.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.

<!-- 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/14174)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 11, 2016

Copy link
Member

Manishearth left a comment

r=me | nits


/// Represents the font metrics that style needs from a font to compute the
/// value of certain CSS units like `ex`.
#[derive(Debug, PartialEq, Clone)]

This comment has been minimized.

Copy link
@Manishearth

Manishearth Nov 13, 2016

Member

Probably Copy too

This comment has been minimized.

Copy link
@emilio

emilio Nov 13, 2016

Author Member

Nope, that's intentional, just in case it becomes bigger, or a RefPtr to a gecko struct, or whatnot.


// FIXME(emilio): text-orientation: upright is only in Gecko
// right now.
let vertical = wm.is_vertical() || wm.is_vertical_lr();

This comment has been minimized.

Copy link
@Manishearth

Manishearth Nov 13, 2016

Member

vertical implies vertical_lr iirc

This comment has been minimized.

Copy link
@Manishearth

Manishearth Nov 13, 2016

Member

I think sideways values for both writing-mode and text-orientation will count as not-vertical here, since the text itself is in line with the inline flow. Not sure. We don't really support this yet (#14144). But perhaps we should leave a comment here to do that when this lands.

This comment has been minimized.

Copy link
@emilio

emilio Nov 13, 2016

Author Member

Added a comment pointing to that issue.

This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.
@emilio emilio force-pushed the emilio:font-provider branch from ec0450a to 6c34587 Nov 13, 2016
@emilio
Copy link
Member Author

emilio commented Nov 13, 2016

@bors-servo r=Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Nov 13, 2016

📌 Commit 6c34587 has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Nov 13, 2016

Testing commit 6c34587 with merge 57c4db7...

bors-servo added a commit that referenced this pull request Nov 13, 2016
style: Refactor and add infrastructure for font metrics in style.

<!-- Please describe your changes on the following line: -->

---
<!-- 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] These changes do not require tests because moves stuff around without adding functionality.

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

This commit itself only moves things around and adds an extra parameter to the
`apply_declarations` function to eventually handle #14079 correctly.

Probably needs a more granular API to query fonts, á la nsFontMetrics, but
that's trivial to do once this is landed.

Then we should make the font provider mandatory, and implement the missing stylo
bits.

<!-- 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/14174)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Nov 13, 2016

@bors-servo bors-servo merged commit 6c34587 into servo:master Nov 13, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@bors-servo bors-servo mentioned this pull request Nov 13, 2016
4 of 5 tasks complete
@emilio emilio deleted the emilio:font-provider branch Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.