[Webkit-unassigned] [Bug 152142] New: Browser zoom inconsistently scales box model properties

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 10 09:28:20 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=152142

            Bug ID: 152142
           Summary: Browser zoom inconsistently scales box model
                    properties
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ben at answerrocket.com
                CC: simon.fraser at apple.com

Given a <div> containing <spans>, and given the CSS fragment

div > span {
  border: 1px solid blue;
  margin: -1px;
}

when zoomed to some level other than an integer multiple of 100% (200%, 300%) the width of the border does not appear to equal the width of the margin.

Specifically, in Chrome 48 (current Chrome beta at time of writing), at 110% zoom, the computed border-width is shown in devtools as 0.909px, as if the browser has divided out the zoom level from the border.

The computed border width continues to decrease until 200% zoom, at which point it reports 1px again.

It's not clear to me whether this is a Chromium issue or a WebKit issue (I'm not familiar enough with either to know where one ends and the other begins), so I apologize if I'm barking up the wrong tree. I see this same behavior in both Safari (El Capitan) and Firefox, though Firefox reports 1px as the computed value regardless of zoom level.

I assume the intent here is to avoid non-integer border width for a solid border, but it breaks my layout and results in layouts that are in conflict with my (albeit naive) knowledge of the CSS box model.

Thanks for your time. I did try to find duplicates, but nothing I saw addressed this specifically--apologies if I missed one.

Cheers,

--Ben Mosher

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151210/6a58e517/attachment.html>


More information about the webkit-unassigned mailing list