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

SVG Text NG: Fix text layout after <svg> transform change #31696

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Nov 22, 2021

If 'transform' property of the owner <svg> is changed, and <text> is
painted without laying out, the content was painted at a wrong position
because the <text> kept positions computed with the old scaling factor.

This CL fixes it by invalidating <text> layout on 'transform' changes
on the owner <svg>. This CL is similar to crrev.com/942976 but for
<svg>, not for containing blocks.

Bug: 1271931
Change-Id: Iefc7d9b50a8474ed536be2267ad7e5e237ed2546
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3293550
Commit-Queue: Kent Tamura <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Commit-Queue: Yoshifumi Inoue <[email protected]>
Auto-Submit: Kent Tamura <[email protected]>
Reviewed-by: Koji Ishii <[email protected]>
Reviewed-by: Yoshifumi Inoue <[email protected]>
Cr-Commit-Position: refs/heads/main@{#943987}

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.

If 'transform' property of the owner <svg> is changed, and <text> is
painted without laying out, the content was painted at a wrong position
because the <text> kept positions computed with the old scaling factor.

This CL fixes it by invalidating <text> layout on 'transform' changes
on the owner <svg>.  This CL is similar to crrev.com/942976 but for
<svg>, not for containing blocks.

Bug: 1271931
Change-Id: Iefc7d9b50a8474ed536be2267ad7e5e237ed2546
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3293550
Commit-Queue: Kent Tamura <[email protected]>
Commit-Queue: Koji Ishii <[email protected]>
Commit-Queue: Yoshifumi Inoue <[email protected]>
Auto-Submit: Kent Tamura <[email protected]>
Reviewed-by: Koji Ishii <[email protected]>
Reviewed-by: Yoshifumi Inoue <[email protected]>
Cr-Commit-Position: refs/heads/main@{#943987}
@foolip
Copy link
Member

foolip commented Nov 23, 2021

This was blocked by #31714, I'll close and reopen in the hope to get the #31715 workaround, which should unblock this.

@foolip foolip closed this Nov 23, 2021
@foolip foolip reopened this Nov 23, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 10a1575 into master Nov 23, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-3293550 branch November 23, 2021 14:51
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.

4 participants