New issue
Advanced search Search tips

Issue 664961 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Remove the "screen scale factor" scaling of SVG <text>

Project Member Reported by f...@opera.com, Nov 14 2016

Issue description

As noted in  issue 442480  (comment 11), the mechanism for maintaining the "screen scale factor" of fonts for SVG <text> has been partially broken for some time. It's also believed to be of lesser importance/usefulness (especially when factoring in the complexity it adds for maintaining it.)

Try to remove as much of it as possible. This ought to simplify large swaths of the <text> code. It's however possible that the "scaled font" can not be eliminated altogether, since it may need to be kept around in some form to avoid minimum-font-size and similar limits. (It's a bit of an unknown how this will effect the 'geometricPrecision' value for 'text-rendering'.)
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f80957a6a5e7ec792a2f3cd7f06e2a744196d1d

commit 6f80957a6a5e7ec792a2f3cd7f06e2a744196d1d
Author: fs <fs@opera.com>
Date: Thu Dec 01 13:27:30 2016

Neuter the "screen scale factor" computation for SVG <text>

This removes the PaintLayer-factor and DSF from the "screen scale factor",
leaving only the transform to the <svg> root and the "content transform" (used
by <pattern>, <mask> and <clipPath>.)

BUG=664961

Review-Url: https://codereview.chromium.org/2492013004
Cr-Commit-Position: refs/heads/master@{#435599}

[modify] https://crrev.com/6f80957a6a5e7ec792a2f3cd7f06e2a744196d1d/third_party/WebKit/LayoutTests/platform/mac/svg/custom/masking-clipping-hidpi-expected.txt
[modify] https://crrev.com/6f80957a6a5e7ec792a2f3cd7f06e2a744196d1d/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp
[modify] https://crrev.com/6f80957a6a5e7ec792a2f3cd7f06e2a744196d1d/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.h

Project Member

Comment 2 by bugdroid1@chromium.org, Dec 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a229e828a692a3ba58fa5136173f81df1ac8b327

commit a229e828a692a3ba58fa5136173f81df1ac8b327
Author: fs <fs@opera.com>
Date: Sat Dec 10 10:35:32 2016

Strength-reduce the "scale-factor changed" condition in LayoutSVGRoot

Spend some cycles examining the difference between the old and new
local-to-border-box transforms, and only signal scale-factor changes
if that part of the transform changed.
This also means that we now detect changes scale that we previously
didn't (like [1].)

[1] paint/invalidation/svg/absolute-sized-content-with-resources.xhtml

BUG= 603956 ,664961

Review-Url: https://codereview.chromium.org/2559123003
Cr-Commit-Position: refs/heads/master@{#437767}

[modify] https://crrev.com/a229e828a692a3ba58fa5136173f81df1ac8b327/third_party/WebKit/LayoutTests/paint/invalidation/svg/absolute-sized-content-with-resources-expected.txt
[modify] https://crrev.com/a229e828a692a3ba58fa5136173f81df1ac8b327/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/svg/absolute-sized-content-with-resources-expected.txt
[modify] https://crrev.com/a229e828a692a3ba58fa5136173f81df1ac8b327/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
[modify] https://crrev.com/a229e828a692a3ba58fa5136173f81df1ac8b327/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h

Project Member

Comment 3 by bugdroid1@chromium.org, Dec 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/94ccfef1071cee24bbe7125d79704a504c41106a

commit 94ccfef1071cee24bbe7125d79704a504c41106a
Author: fs <fs@opera.com>
Date: Thu Dec 15 09:46:08 2016

Ignore minimum font-size for SVG text

In some circumstances, the minimum font-size would be applied to the
"scaled font", messing up rendering. Because of how the font is scaled,
this would trigger much less than one might expect.
Change the useSmartMinimumForFontSize argument to the
FontSize::getComputedSizeFromSpecifiedSize function to be about entirely
ignoring the minimum font-sizes (this function only has two callsites.)
Refactor LayoutSVGInlineText::computeNewScaledFontForStyle a bit to deal
with this new flow. Also always keep the "original" font when we compute
a scale factor of 0 - it should be invisible regardless.

BUG= 232332 , 335725 , 475795 ,626936,664961
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2575863002
Cr-Commit-Position: refs/heads/master@{#438794}

[add] https://crrev.com/94ccfef1071cee24bbe7125d79704a504c41106a/third_party/WebKit/LayoutTests/svg/text/minimum-font-size-not-applied-expected.html
[add] https://crrev.com/94ccfef1071cee24bbe7125d79704a504c41106a/third_party/WebKit/LayoutTests/svg/text/minimum-font-size-not-applied.html
[modify] https://crrev.com/94ccfef1071cee24bbe7125d79704a504c41106a/third_party/WebKit/Source/core/css/FontSize.cpp
[modify] https://crrev.com/94ccfef1071cee24bbe7125d79704a504c41106a/third_party/WebKit/Source/core/css/FontSize.h
[modify] https://crrev.com/94ccfef1071cee24bbe7125d79704a504c41106a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
[modify] https://crrev.com/94ccfef1071cee24bbe7125d79704a504c41106a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.h
[modify] https://crrev.com/94ccfef1071cee24bbe7125d79704a504c41106a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 11 2017

Labels: merge-merged-3029
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/93d2ca20f15362df7dd3e46754dc12a0570728b3

commit 93d2ca20f15362df7dd3e46754dc12a0570728b3
Author: Fredrik Söderquist <fs@opera.com>
Date: Tue Apr 11 07:46:46 2017

Revert "Neuter the "screen scale factor" computation for SVG <text>"

This reverts commit 6f80957a6a5e7ec792a2f3cd7f06e2a744196d1d.

Clean revert, but a reference to FrameHost had to be changed to Page, and
an ASSERT was changed to a DCHECK.

BUG= 706880 ,664961

Review-Url: https://codereview.chromium.org/2805043002
Cr-Commit-Position: refs/heads/master@{#462563}
(cherry picked from commit 7c6520814282912a6c6437e0c68537e11d77a9b6)

Review-Url: https://codereview.chromium.org/2807023004 .
Cr-Commit-Position: refs/branch-heads/3029@{#663}
Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471}

[modify] https://crrev.com/93d2ca20f15362df7dd3e46754dc12a0570728b3/third_party/WebKit/LayoutTests/platform/mac/svg/custom/masking-clipping-hidpi-expected.txt
[modify] https://crrev.com/93d2ca20f15362df7dd3e46754dc12a0570728b3/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp
[modify] https://crrev.com/93d2ca20f15362df7dd3e46754dc12a0570728b3/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.h

Project Member

Comment 6 by sheriffbot@chromium.org, Apr 11 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by f...@opera.com, Apr 11 2018

Status: Available (was: Untriaged)

Sign in to add a comment