RESOLVED FIXED 13535
REGRESSION: divs positioned absolutely to the right behave oddly in button tags
https://bugs.webkit.org/show_bug.cgi?id=13535
Summary REGRESSION: divs positioned absolutely to the right behave oddly in button tags
Dimitri Bouniol
Reported 2007-04-28 18:56:59 PDT
In the following code: <button>Click Me<div style="position: absolute; right: 5px">Now</div></button> the div will be to the right of the left side of the button, instead of the right side. This problem does not exist in non-nightly versions of Safari/Webkit. At the webpage above, you can see the problem at work in the navigation bar: the arrows are supposed to be to the right of the buttons, not the left.
Attachments
Test case from Comment #0 (79 bytes, text/html)
2007-04-28 21:46 PDT, David Kilzer (:ddkilzer)
no flags
Difference between Safari and nightly WebKit (43.06 KB, image/png)
2007-04-28 23:16 PDT, Dimitri Bouniol
no flags
Partial reduction (2.76 KB, application/xhtml+xml)
2007-04-29 00:19 PDT, David Kilzer (:ddkilzer)
no flags
Test case (456 bytes, text/html)
2007-04-29 00:26 PDT, Dimitri Bouniol
no flags
Someone meant inline flows like spans and not inline blocks too (569 bytes, patch)
2007-04-29 03:46 PDT, Dave Hyatt
mjs: review+
David Kilzer (:ddkilzer)
Comment 1 2007-04-28 21:46:31 PDT
Created attachment 14253 [details] Test case from Comment #0 This looks the same to me in a local debug build of WebKit r21170 with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135) as it does on shipping WebKit and Firefox 2.0.0.3. Dimitri, could you post a screen shot of what you're seeing?
Dimitri Bouniol
Comment 2 2007-04-28 23:16:58 PDT
Created attachment 14254 [details] Difference between Safari and nightly WebKit The window is Safari and the second one is the nightly Webkit. The > image is positioned with "position: absolute; right: -12px; width: 12px;", yet it is anchored to the left side of the button.
David Kilzer (:ddkilzer)
Comment 3 2007-04-29 00:01:33 PDT
Confirmed with a local debug build of WebKit r21170 with Safari 2.0.4 (419.3) on Mac OS X 10.4.9 (8P135). This is also a regression as shipping Safari renders it differently, although Attachment #14253 [details] from Comment #0 is not a correct reduction of the issue.
David Kilzer (:ddkilzer)
Comment 4 2007-04-29 00:19:59 PDT
Created attachment 14255 [details] Partial reduction Note that if you remove the 'body' style, you get a slightly different rendering on ToT WebKit (items are shifted down one or two pixels) versus shipping Safari.
Dimitri Bouniol
Comment 5 2007-04-29 00:26:05 PDT
Created attachment 14256 [details] Test case Very basic test case that shows the problem. The "new" should be displayed to the right of the button.
Dave Hyatt
Comment 6 2007-04-29 03:31:10 PDT
Yikes, this is a bad regression.
Dave Hyatt
Comment 7 2007-04-29 03:46:02 PDT
Created attachment 14264 [details] Someone meant inline flows like spans and not inline blocks too Fallout from Sam's positioning cleanup a while back.
Maciej Stachowiak
Comment 8 2007-04-29 03:48:03 PDT
Comment on attachment 14264 [details] Someone meant inline flows like spans and not inline blocks too r=me
Dave Hyatt
Comment 9 2007-04-29 03:51:19 PDT
Fixed in r21181
Note You need to log in before you can comment on or make changes to this bug.