Fix intermittent macOS reftest failures#24347
Merged
bors-servo merged 1 commit intoservo:masterfrom Oct 3, 2019
Merged
Conversation
Member
Author
|
@bors-servo try=wpt-mac |
Contributor
bors-servo
pushed a commit
that referenced
this pull request
Oct 2, 2019
Fix intermittent macOS reftest failures CTCreateFontWithName intermittently returns the wrong font for a given postscript name. These changes rely on obtaining a font descriptor, using it to get the path to the actual font file on disk, getting the bytes that make up the font, and using Core Graphics to create a font handle and obtaining the Core Graphics font from the CGFont reference. This is the same strategy that font-kit uses. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23290 - [x] There are tests for these changes <!-- 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/24347) <!-- Reviewable:end -->
Contributor
|
💔 Test failed - status-taskcluster |
Member
Author
|
r? @pcwalton since this code is cribbed from font-kit. |
pcwalton
reviewed
Oct 2, 2019
| } | ||
| }, | ||
| None => core_text::font::new_from_name(&*self.identifier, clamped_pt_size).ok(), | ||
| None => { |
Contributor
There was a problem hiding this comment.
Add a comment linking to the issue. r=me with that.
Member
Author
|
@bors-servo r=pcwalton |
Contributor
|
📌 Commit 1529436 has been approved by |
atouchet
reviewed
Oct 3, 2019
| @@ -1,2 +1,2 @@ | |||
| [control-chars-089.html] | |||
| expected: FAIL | |||
| sexpected: FAIL | |||
…t incorrect behaviour.
Member
Author
|
@bors-servo r=pcwalton |
Contributor
|
📌 Commit ddbd7ae has been approved by |
Contributor
bors-servo
pushed a commit
that referenced
this pull request
Oct 3, 2019
Fix intermittent macOS reftest failures CTCreateFontWithName intermittently returns the wrong font for a given postscript name. These changes rely on obtaining a font descriptor, using it to get the path to the actual font file on disk, getting the bytes that make up the font, and using Core Graphics to create a font handle and obtaining the Core Graphics font from the CGFont reference. This is the same strategy that font-kit uses. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23290 - [x] There are tests for these changes <!-- 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/24347) <!-- Reviewable:end -->
Contributor
|
☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CTCreateFontWithName intermittently returns the wrong font for a given postscript name. These changes rely on obtaining a font descriptor, using it to get the path to the actual font file on disk, getting the bytes that make up the font, and using Core Graphics to create a font handle and obtaining the Core Graphics font from the CGFont reference. This is the same strategy that font-kit uses.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is