New issue
Advanced search Search tips

Issue 859774 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 3
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

SVGImage zoom out more than other element with Browser scale(ctrl + +/-).

Reported by hugh...@hotmail.com, Jul 3

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
1. Open svg.html
2. Use ctrl + '+' to zoom out the document.

What is the expected behavior?
SVGImage should not cut off.

What went wrong?
SVGImage is cut off.  But svg with path works correctly.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 67.0.3396.99  Channel: stable
OS Version: 10.0
Flash Version: 

Any workaround?
 
svg.html
1.9 KB View Download
svgimage.png
1.7 KB View Download
Bisected to 214027fe9a295bc44a3df7dcfd906b1e479373a9
"Use the viewBox when scaling <svg:image>s non-uniformly w/ pAR=none"
Landed in 41.0.2219.0 as r303885
Status: Available (was: Unconfirmed)
Looks like we're missing to apply the scale factor. Adding a 'viewBox' would probably work as a workaround.
Owner: f...@opera.com
Status: Started (was: Available)
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 3

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

commit e3848980d7f21941e1ff18ede8f33843d6b8a2a9
Author: Fredrik Söderquist <fs@opera.com>
Date: Tue Jul 03 13:38:21 2018

Scale the viewport size in SVGImagePainter

LayoutImageResource::GetImage expects a zoomed container size (it passes
it unmodified to SVGImageForContainer::Create which unzooms it), so we
need to scale the viewport size before passing it.

Bug:  859774 
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I24f7f0b1f402aaef112882ab146d573981889cae
Reviewed-on: https://chromium-review.googlesource.com/1124163
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#572190}
[add] https://crrev.com/e3848980d7f21941e1ff18ede8f33843d6b8a2a9/third_party/WebKit/LayoutTests/svg/custom/image-with-zoom-and-no-intrinsic-dims-expected.html
[add] https://crrev.com/e3848980d7f21941e1ff18ede8f33843d6b8a2a9/third_party/WebKit/LayoutTests/svg/custom/image-with-zoom-and-no-intrinsic-dims.html
[modify] https://crrev.com/e3848980d7f21941e1ff18ede8f33843d6b8a2a9/third_party/blink/renderer/core/paint/svg_image_painter.cc

Status: Fixed (was: Started)

Sign in to add a comment