Bug 43451
Summary: | Natural image dimensions are used for wrapping elements even if image is resized | ||
---|---|---|---|
Product: | WebKit | Reporter: | Lorin H <alystair> |
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | mitz, simon.fraser |
Priority: | P1 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://lorinhalpert.com/ipoc/bugs/html-positioning/ |
Lorin H
Possibly related to bug 22881
Save yourself time by going to the URL provided for reproduction.. or:
1. create a div with a large image inside it
2. apply 100% height to both div and image
3. apply absolute or fixed positioning to wrapping div
4. resize browser window
optionally:
- apply a background color to div to confirm actual size of div is incorrect
- change the position of the div to right:0
EXPECTED: The surrounding collapsed tags should have dimensions equal to the internal resized image.
INSTEAD:
When the wrapped image is being resized, the surrounding wrapper incorrectly uses the natural image width instead of the resized image dimensions. This places the resized image in an incorrect position when window is resized.
Depending on your screen resolution, the rendering might seem fine.. please resize your browser window to see if your renderer is affected
As of August 3rd 2010, most popular engines are affected with the following exceptions:
- In process of being fixed in the Gecko engine: https://bugzilla.mozilla.org/show_bug.cgi?id=582037
- Webkit renders correctly until window is resized, however if user modifies zoom/font-size (ctrl+/-) the wrapper width is corrected again.
- Opera/9.80 (Macintosh; Intel Mac OS X; U) Presto/2.6.30 Version/10.60 - Renders correctly until window is resized however Windows version is affected like all others (Windows NT 6.1; U)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
Steps:
1. Load the URL
2. Make the window less tall.
Note how the two image diverge.
Lorin H
Mozilla has corrected the issue in Gekko, so potentially adaptable tests and solutions can be seen in their bugzilla ticket.
Lorin H
Seems this was fixed somewhere along the line and zero communication occurred.
I'm unwilling to go back to discover exactly how many years it took the WebKit team to fix it but I'm glad it was... as Mozilla considered it P1 back in 2010 and fixed it almost immediately.
https://bugzilla.mozilla.org/show_bug.cgi?id=582037
One less open bug for WebKit is always a good thing... right?