Bug 12037

Summary: For relatively positioned boxes in an RTL block, 'right' should win over 'left' if both are not 'auto'
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
Implement the spec sam: review+

Description mitz 2006-12-30 10:56:39 PST
According to <http://www.w3.org/TR/CSS21/visuren.html#relative-positioning>, "If neither 'left' nor 'right' is 'auto', the position is over-constrained, and one of them has to be ignored. If the 'direction' property of the containing block is 'ltr, the value of 'left' wins and 'right' becomes -'left'. If 'direction' of the containing block is 'rtl', 'right' wins and 'left' is ignored".

Currently in WebKit, 'left' always wins.
Comment 1 mitz 2006-12-30 11:24:16 PST
Created attachment 12124 [details]
Implement the spec

No layout test regressions. Implemented this way to avoid checking the containing block's direction unless necessary (it's cheaper to check both offsets than to check the direction and an offset).
Comment 2 Sam Weinig 2006-12-30 16:45:08 PST
Comment on attachment 12124 [details]
Implement the spec

r=me!
Comment 3 David Kilzer (:ddkilzer) 2006-12-31 06:15:52 PST
Committed revision 18490.