New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 722055 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

svg cut off on zooming page when setting height/width css attributes

Reported by rajabhis...@gmail.com, May 13 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100 Safari/537.36

Steps to reproduce the problem:
1. Go to https://jsfiddle.net/0sjoypar/
2. Zoom in. Ctrl ++
3. svg cuts off

What is the expected behavior?
svg should scale instead of being cut off

What went wrong?
See screenshot. Zoomed at 125%

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 54.0.2840.100  Channel: stable
OS Version: Ubuntu 14.04
Flash Version: Shockwave Flash 25.0 r0

Works as expected in mozilla and safari.
 
Screenshot from 2017-05-13 23:43:06.png
29.1 KB View Download
Labels: Needs-Milestone
Cc: davve@chromium.org
Labels: -Needs-Milestone BugSource-User PaintTeamTriaged-20170515 OS-Android OS-Chrome OS-Mac OS-Windows
Status: Available (was: Unconfirmed)
The issue is that the auto width height is not accounting for zoom. That's a bug. I have no doubt this dates back to when we finally rationalized default SVG sizes.

Comment 3 Deleted

if it helps, it doesn't work on setting height/width to initial or unset either.

Comment 5 by f...@opera.com, Dec 15 2017

Cc: msrchandra@chromium.org ranjitkan@chromium.org rbasuvula@chromium.org nyerramilli@chromium.org
 Issue 794904  has been merged into this issue.
Project Member

Comment 6 by bugdroid1@chromium.org, May 16 2018

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

commit c4bc5dbb3139832936d1ea5810e7ea9e67eb038e
Author: Fredrik Söderquist <fs@opera.com>
Date: Wed May 16 13:42:07 2018

Refactor computation of intrinsic size for "nested" objects

Sink the update of intrinsic_size_ out of the if-else in
ComputeIntrinsicSizingInfoForReplacedContent, and then push
GetNestedIntrinsicSizingInfo down into subclasses, folding it away to use the
"local" constructs of the relevant subclasses.

This leaves subclasses to deal with issues such as if whether to apply zoom
or not et.c, and will with some additional tweaks allow for more succinct
interfaces in the "nested" cases. It also makes LayoutReplaced much simpler.

Bug:  722055 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ie8493ffa89ffb34d2591d6a7ecdc8ebc20c6264f
Reviewed-on: https://chromium-review.googlesource.com/1059776
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#559069}
[modify] https://crrev.com/c4bc5dbb3139832936d1ea5810e7ea9e67eb038e/third_party/blink/renderer/core/layout/layout_embedded_object.cc
[modify] https://crrev.com/c4bc5dbb3139832936d1ea5810e7ea9e67eb038e/third_party/blink/renderer/core/layout/layout_embedded_object.h
[modify] https://crrev.com/c4bc5dbb3139832936d1ea5810e7ea9e67eb038e/third_party/blink/renderer/core/layout/layout_image.cc
[modify] https://crrev.com/c4bc5dbb3139832936d1ea5810e7ea9e67eb038e/third_party/blink/renderer/core/layout/layout_image.h
[modify] https://crrev.com/c4bc5dbb3139832936d1ea5810e7ea9e67eb038e/third_party/blink/renderer/core/layout/layout_replaced.cc
[modify] https://crrev.com/c4bc5dbb3139832936d1ea5810e7ea9e67eb038e/third_party/blink/renderer/core/layout/layout_replaced.h
[modify] https://crrev.com/c4bc5dbb3139832936d1ea5810e7ea9e67eb038e/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_marker_image.cc
[modify] https://crrev.com/c4bc5dbb3139832936d1ea5810e7ea9e67eb038e/third_party/blink/renderer/core/layout/ng/list/layout_ng_list_marker_image.h

Project Member

Comment 7 by bugdroid1@chromium.org, May 21 2018

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

commit 62e3dc5043b1a8a92692a6c5052ce63abb69ec71
Author: Fredrik Söderquist <fs@opera.com>
Date: Mon May 21 19:02:34 2018

Get rid of SVGImage::EmbeddedReplacedContent

Rather than exposing the document root's LayoutObject, add an bunch of
methods to achieve the same thing as the returned object is used for.
Reuse the same names as used on FrameView. Also rename the method on
LayoutImage to something more appropriate.

Bug:  722055 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I6d006206365988c2ad8068db7251414529ed3bca
Reviewed-on: https://chromium-review.googlesource.com/1065997
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560322}
[modify] https://crrev.com/62e3dc5043b1a8a92692a6c5052ce63abb69ec71/third_party/blink/renderer/core/layout/layout_image.cc
[modify] https://crrev.com/62e3dc5043b1a8a92692a6c5052ce63abb69ec71/third_party/blink/renderer/core/layout/layout_image.h
[modify] https://crrev.com/62e3dc5043b1a8a92692a6c5052ce63abb69ec71/third_party/blink/renderer/core/svg/graphics/svg_image.cc
[modify] https://crrev.com/62e3dc5043b1a8a92692a6c5052ce63abb69ec71/third_party/blink/renderer/core/svg/graphics/svg_image.h

Project Member

Comment 8 by bugdroid1@chromium.org, May 21 2018

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

commit 6a7bce378b2ea1e262483f52161eb353254b2e91
Author: Fredrik Söderquist <fs@opera.com>
Date: Mon May 21 19:25:52 2018

Apply zoom in LayoutSVGRoot::ComputeIntrinsicSizingInfo

Previously we didn't know in what context said method was called, so we
didn't know if zoom ought to be applied or not.
Add LayoutSVGRoot::UnscaledIntrinsicSizingInfo and change current
callers of ComputeIntrinsicSizingInfo to use it. Then make
ComputeIntrinsicSizingInfo scale the intrinsic size.

Bug:  722055 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If668e85bcea1028e48a3bc98c74d07435d425338
Reviewed-on: https://chromium-review.googlesource.com/1067397
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560331}
[add] https://crrev.com/6a7bce378b2ea1e262483f52161eb353254b2e91/third_party/WebKit/LayoutTests/svg/zoom/zoomed-inline-svg-with-auto-dimensions-expected.html
[add] https://crrev.com/6a7bce378b2ea1e262483f52161eb353254b2e91/third_party/WebKit/LayoutTests/svg/zoom/zoomed-inline-svg-with-auto-dimensions.html
[modify] https://crrev.com/6a7bce378b2ea1e262483f52161eb353254b2e91/third_party/blink/renderer/core/frame/local_frame_view.cc
[modify] https://crrev.com/6a7bce378b2ea1e262483f52161eb353254b2e91/third_party/blink/renderer/core/frame/local_frame_view.h
[modify] https://crrev.com/6a7bce378b2ea1e262483f52161eb353254b2e91/third_party/blink/renderer/core/layout/svg/layout_svg_root.cc
[modify] https://crrev.com/6a7bce378b2ea1e262483f52161eb353254b2e91/third_party/blink/renderer/core/layout/svg/layout_svg_root.h
[modify] https://crrev.com/6a7bce378b2ea1e262483f52161eb353254b2e91/third_party/blink/renderer/core/svg/graphics/svg_image.cc

Comment 9 by f...@opera.com, May 22 2018

Owner: f...@opera.com
Status: Fixed (was: Available)

Sign in to add a comment