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

Return an empty font list when the permission is not given, or platform implementation is missing (e.g. Android). Also, remove the unused kCanceled status. #33350

Merged
merged 1 commit into from Mar 26, 2022

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Mar 24, 2022

Previously in the case of unsupported platform, the browser-side code returned FontEnumerationStatus::kUnexpectedError, while the renderer side handled FontEnumerationStatus::kUnimplementedError even though it would never been thrown under any case. We fix that behavior by updating the browser-side to throw an UnimplementedError, which the renderer handles by returning an empty font list. In general, the browser-side will provide specific information about font enumeration status, and the renderer-side will handle how users will receive the response. Similarly for permission denied or not given cases, the renderer-side will process FontEnumerationStatus::kPermissionDenied into an empty font list.

Bug: 1296792
Change-Id: I5c936a176d49453d3494bbc952831f83512c7db4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3547299
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Daseul Lee <dslee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#985005}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title Return an empty font list when the permission is not given, or platform implementation is missing (e.g. Android). Return an empty font list when the permission is not given, or platform implementation is missing (e.g. Android). Also, remove the unused kCanceled status. Mar 24, 2022
…rm implementation is missing (e.g. Android). Also, remove the unused kCanceled status.

Previously in the case of unsupported platform, the browser-side code returned FontEnumerationStatus::kUnexpectedError, while the renderer side handled FontEnumerationStatus::kUnimplementedError even though it would never been thrown under any case. We fix that behavior by updating the browser-side to throw an UnimplementedError, which the renderer handles by returning an empty font list. In general, the browser-side will provide specific information about font enumeration status, and the renderer-side will handle how users will receive the response. Similarly for permission denied or not given cases, the renderer-side will process FontEnumerationStatus::kPermissionDenied into an empty font list.

Bug: 1296792
Change-Id: I5c936a176d49453d3494bbc952831f83512c7db4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3547299
Reviewed-by: Victor Costan <pwnall@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Commit-Queue: Daseul Lee <dslee@chromium.org>
Cr-Commit-Position: refs/heads/main@{#985005}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants