Bug 43302

Summary: Background padding issue in RTL websites.
Product: WebKit Reporter: Derk-Jan Hartman <hartman.wiki>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
RTL background linewrap positioning for inline elements testcase
none
Display of css in LTR case
none
Display of RTL rendering none

Description Derk-Jan Hartman 2010-07-31 10:10:09 PDT
Created attachment 63153 [details]
RTL background linewrap positioning for inline elements testcase

A link has the following CSS in ltr situations

a.external {
 background: url(http://bits.wikimedia.org/skins-1.5/vector/images/external-link-rtl-icon.png?2) no-repeat 0% 50%;
 padding: 0px 13px 0px 0px;
}

This draw an icon in the background to the right of the link. In RTL situations, the following css is used.
a.external {
 background: url(http://bits.wikimedia.org/skins-1.5/vector/images/external-link-rtl-icon.png?2) no-repeat 0% 50%;
 padding: 0px 0px 0px 13px;
}

In this case, when the link (inline element) line wraps, the background overlaps the left side of the first line part, where it should be positioned on the left side of the second line part. Attached example and screenshots.
Comment 1 Derk-Jan Hartman 2010-07-31 10:11:36 PDT
Created attachment 63154 [details]
Display of css in LTR case
Comment 2 Derk-Jan Hartman 2010-07-31 10:12:01 PDT
Created attachment 63155 [details]
Display of RTL rendering
Comment 3 Derk-Jan Hartman 2010-07-31 10:13:33 PDT
Note, Firefox does render the expected behavior, Chrome and Opera match the behavior of Safari.
Comment 4 mitz 2010-08-02 08:56:13 PDT

*** This bug has been marked as a duplicate of bug 9272 ***