Bug 13535

Summary: REGRESSION: divs positioned absolutely to the right behave oddly in button tags
Product: WebKit Reporter: Dimitri Bouniol <dimitri008>
Component: CSSAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal Keywords: Regression
Priority: P1    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
URL: http://bouniol.homeip.net/www.dousky.com/Software/
Attachments:
Description Flags
Test case from Comment #0
none
Difference between Safari and nightly WebKit
none
Partial reduction
none
Test case
none
Someone meant inline flows like spans and not inline blocks too mjs: review+

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