Summary: | Allow non-borders to be adjusted to less than 1 when zoomed out | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Emil A Eklund <eae> | ||||||||||
Component: | Layout and Rendering | Assignee: | Emil A Eklund <eae> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | abarth, cmarcelo, dglazkov, eric, hyatt, macpherson, menard, webkit.review.bot, zimmermann | ||||||||||
Priority: | P2 | ||||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Attachments: |
|
Description
Emil A Eklund
2012-06-27 15:26:28 PDT
The problem seems to be that the margin never shrinks below 1 causing the width including the margin to extend past the container for zoom levels below 100%. (In reply to comment #1) > The problem seems to be that the margin never shrinks below 1 causing the width including the margin to extend past the container for zoom levels below 100%. ...and that logic is in CSSPrimitiveValue::computeLengthDouble: // Any original result that was >= 1 should not be allowed to fall below 1. This keeps border lines from // vanishing. double zoomedResult = result * multiplier; if (zoomedResult < 1.0 && result >= 1.0) return 1.0; This should probably only kick in for borders (which are represented as integers). Created attachment 150003 [details]
Patch
CC:ing hyatt who added the check in http://trac.webkit.org/changeset/31219 back in the dark ages of 2008. Comment on attachment 150003 [details]
Patch
Makes sense to me.
Comment on attachment 150003 [details] Patch Rejecting attachment 150003 [details] from commit-queue. New failing tests: svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html fast/transforms/bounding-rect-zoom.html svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm fast/reflections/reflection-with-zoom.html Full output: http://queues.webkit.org/results/13109213 Created attachment 150046 [details]
Archive of layout-test-results from ec2-cq-02
The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: ec2-cq-02 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment on attachment 150003 [details] Patch Attachment 150003 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13107333 New failing tests: svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html fast/transforms/bounding-rect-zoom.html svg/zoom/page/zoom-replaced-intrinsic-ratio-001.htm fast/reflections/reflection-with-zoom.html Created attachment 150088 [details]
Archive of layout-test-results from ec2-cr-linux-01
The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-01 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Created attachment 150269 [details]
Patch for landing
Committed r121599: <http://trac.webkit.org/changeset/121599> Comment on attachment 150269 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=150269&action=review > Source/WebCore/css/StyleBuilder.cpp:611 > + length = zoomedLength; It's worth noting that ApplyPropertyComputeLength is used by lots of CSS properties, not just borders, so you may want to reduce the number of cases where this is applied even further. |