Bug 13535 - REGRESSION: divs positioned absolutely to the right behave oddly in button tags
Summary: REGRESSION: divs positioned absolutely to the right behave oddly in button tags
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 523.x (Safari 3)
Hardware: Macintosh OS X 10.4
: P1 Normal
Assignee: Dave Hyatt
URL: http://bouniol.homeip.net/www.dousky....
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2007-04-28 18:56 PDT by Dimitri Bouniol
Modified: 2007-04-29 03:51 PDT (History)
0 users

See Also:


Attachments
Test case from Comment #0 (79 bytes, text/html)
2007-04-28 21:46 PDT, David Kilzer (:ddkilzer)
no flags Details
Difference between Safari and nightly WebKit (43.06 KB, image/png)
2007-04-28 23:16 PDT, Dimitri Bouniol
no flags Details
Partial reduction (2.76 KB, application/xhtml+xml)
2007-04-29 00:19 PDT, David Kilzer (:ddkilzer)
no flags Details
Test case (456 bytes, text/html)
2007-04-29 00:26 PDT, Dimitri Bouniol
no flags Details
Someone meant inline flows like spans and not inline blocks too (569 bytes, patch)
2007-04-29 03:46 PDT, Dave Hyatt
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri Bouniol 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.
Comment 1 David Kilzer (:ddkilzer) 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?
Comment 2 Dimitri Bouniol 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.
Comment 3 David Kilzer (:ddkilzer) 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.

Comment 4 David Kilzer (:ddkilzer) 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.
Comment 5 Dimitri Bouniol 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.
Comment 6 Dave Hyatt 2007-04-29 03:31:10 PDT
Yikes, this is a bad regression.
Comment 7 Dave Hyatt 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.
Comment 8 Maciej Stachowiak 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
Comment 9 Dave Hyatt 2007-04-29 03:51:19 PDT
Fixed in r21181