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

Issue 599095 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

SVG rect rounds differently to SVG root when zoomed

Reported by adha...@etouch.net, Mar 30 2016

Issue description

Chrome Version:51.0.2694.1(Official Build)d916c77d6610e3821101f1c7baf099f4982a1662-refs/branch-heads/2694@{#1}(32/64-bit)
OS:All(Aero enabled)

What steps will reproduce the problem?
(1) Launch chrome and navigate to http://www.abbott.com/our-products/consumers/pediasure.html
(2) Zoom out the page to 30% and observe the bottom R.H.S of the page

Actual:Unwanted white line is seen after zoom out to 30%.
Expected:No white line should be seen after zoom out.

This is a Non-Regression issue broken from M-31(i.e 31.0.1600.0)


 
actual.png
597 KB View Download
expected.png
443 KB View Download
Status: Untriaged (was: Unconfirmed)
Untriaging it so that it gets addressed.
Components: -Blink UI>Browser>Zoom Blink>Paint
Components: -UI>Browser>Zoom -Blink>Paint Blink>SVG
Labels: -M-51
Owner: schenney@chromium.org
Status: Assigned (was: Untriaged)
This is an issue with an SVG rect width 100% not filling the SVG root completely as expected. I'll own it while I create a reduced case.
Summary: SVG rect rounds differently to SVG root when zoomed (was: Unwanted white line is seen after zoom out in http://www.abbott.com/)
Owner: ----
Status: Available (was: Assigned)
Minimal repro.
zoomed-content-rounds-equally.html
386 bytes View Download
Wild guess: the CSS box painter int-snaps the background, but we naturally don't do that for SVG content.

(maybe the same root cause as issue 562973)

Right, the SVG box is being snapped when laid out into the page, but the rect is not. Not clear how fixable this is given SVG content does not, in theory, snap.

Comment 8 by f...@opera.com, Mar 31 2016

I guess there's nothing stopping snapping the viewport (SVGSVGElement::currentViewportSize), but that of course still leaves the viewBox transform et.c.
Owner: fmalita@chromium.org
Status: Started (was: Available)
The annoying part is that the box painter snaps at paint time only, so there isn't a very good way to communicate that outside:

https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/paint/BoxPainter.cpp&l=324

On the plus side it looks like the SVG root painter also attempts to use pixel-snapped values: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp&l=73

What I think is missing is the residual scale adjustment: after snapping the size may be different and we need to adjust for that.

I'll take a stab.
https://codereview.chromium.org/1847983002/ should fix the SVG alignment issue.

However, for certain zoom levels and window sizes I'm still seeing white background bleed in the upper-right region (see attached).  That section is just an image, no SVG involved.

AFAICT this is a website styling bug:

  <div style="max-width: 1441px;">
    <div style="width: 100%; background-color: white;">
      ..
      <li style="width: 1440px;">
        <img style="width: 100%;">

The outer div width is pinned to 1441 while the image size is pinned to 1440.  Depending on zoom/offset, these can round differently resulting in the occasional 1px bg bleed (also visible in FF).
bgbleed.png
301 KB View Download
Project Member

Comment 11 by bugdroid1@chromium.org, Apr 1 2016

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

commit d1d05d02de7519c777358ce926c007a7222449d6
Author: fmalita <fmalita@chromium.org>
Date: Fri Apr 01 14:26:10 2016

[SVG] Compensate for container size snapping

BoxPainter rounds its box rect coordinates to ensure optimal alignment
and minimize AA bleed.

SVGRootPainter attempts to do the same, but it only adjusts the offset.

Since int-snapping may also change the size, the SVG content transform
needs to take this residual scale into account (such that it maps onto
the full int-snapped area).

BUG= 599095 
R=schenney@chromium.org,fs@opera.com,pdr@chromium.org

Review URL: https://codereview.chromium.org/1847983002

Cr-Commit-Position: refs/heads/master@{#384580}

[modify] https://crrev.com/d1d05d02de7519c777358ce926c007a7222449d6/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/d1d05d02de7519c777358ce926c007a7222449d6/third_party/WebKit/LayoutTests/svg/custom/zoomed-background-alignment-expected.html
[add] https://crrev.com/d1d05d02de7519c777358ce926c007a7222449d6/third_party/WebKit/LayoutTests/svg/custom/zoomed-background-alignment.html
[modify] https://crrev.com/d1d05d02de7519c777358ce926c007a7222449d6/third_party/WebKit/Source/core/paint/SVGRootPainter.cpp

Project Member

Comment 12 by bugdroid1@chromium.org, Apr 1 2016

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

commit f025af09b2f7e8467df43ec231cfc986acb90111
Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org>
Date: Fri Apr 01 16:40:14 2016

Auto-rebaseline for r384580

https://chromium.googlesource.com/chromium/src/+/d1d05d02d

BUG= 599095 
TBR=fmalita@chromium.org

Review URL: https://codereview.chromium.org/1854793002 .

Cr-Commit-Position: refs/heads/master@{#384605}

[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/TestExpectations
[add] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/android/svg/custom/dynamic-empty-path-expected.png
[add] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/android/svg/custom/js-update-container-expected.png
[add] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/android/svg/custom/use-css-no-effect-on-shadow-tree-expected.png
[add] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/android/svg/custom/viewBox-hit-expected.png
[add] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/android/svg/zoom/page/zoom-hixie-mixed-009-expected.png
[add] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/android/svg/zoom/page/zoom-svg-float-border-padding-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/linux/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/linux/fast/images/color-profile-svg-fill-text-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-hixie-mixed-009-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-mask-with-percentages-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/linux/svg/zoom/page/zoom-svg-float-border-padding-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac-mac10.10/fast/images/color-profile-svg-fill-text-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/images/color-profile-svg-fill-text-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/zoom/page/zoom-mask-with-percentages-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac-mac10.9/svg/zoom/page/zoom-svg-float-border-padding-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac/fast/images/color-profile-svg-fill-text-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-hixie-mixed-009-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/mac/svg/zoom/page/zoom-svg-float-border-padding-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/win/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/win/fast/images/color-profile-svg-fill-text-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-hixie-mixed-009-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-mask-with-percentages-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/win/svg/zoom/page/zoom-svg-float-border-padding-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/platform/win7/fast/forms/calendar-picker/calendar-picker-appearance-zoom125-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/svg/custom/dynamic-empty-path-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/svg/custom/fractional-rects-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/svg/custom/js-update-container-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/svg/custom/use-css-no-effect-on-shadow-tree-expected.png
[modify] https://crrev.com/f025af09b2f7e8467df43ec231cfc986acb90111/third_party/WebKit/LayoutTests/svg/custom/viewBox-hit-expected.png

Status: Fixed (was: Started)

Sign in to add a comment