[Webkit-unassigned] [Bug 78944] New: height + max-height values break proportional image scaling

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 17 16:26:03 PST 2012


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

           Summary: height + max-height values break proportional image
                    scaling
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: CSS
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bryan at resenmedia.com


Created an attachment (id=127674)
 --> (https://bugs.webkit.org/attachment.cgi?id=127674&action=review)
Minimal test case

If an image has both a height and max-height assigned, and the width is isn't defined or set to auto, any scaling of the image will ONLY happen vertically. The horizontal image size is kept static instead of scaling to keep the image's correct proportion.

Example:

An image is 400x400px with a css height of 400px and a min-height of 200px. In previous version of WebKit and other browsers, the image would be scaled to 200x200px, but in the current version (including the current release of Google Chrome), the image is scaled to 400x200px, completely distorting the image.

This seems to only happen with height/max-height. Running the same text with width/max-width works fine. Removing the "height" value also fixes the issue.

Attached in a very minimal test case. In the wild, I know you probably wouldn't use pixel values for both height and max-height, it just makes for an easier example.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list