Bug 32862 - Background image positioning on RTL text
Summary: Background image positioning on RTL text
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Minor
Assignee: Nobody
URL: http://extdev.bbc.co.uk/worldservice/...
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2009-12-22 02:04 PST by David Vella
Modified: 2011-02-13 02:19 PST (History)
7 users (show)

See Also:


Attachments
WebArchive of http://extdev.bbc.co.uk/.../webkit_background_image.shtml (5.50 KB, application/octet-stream)
2010-03-27 15:54 PDT, Daniel Bates
no flags Details
Patch. (751.77 KB, patch)
2011-02-11 14:53 PST, Yael
darin: review+
Details | Formatted Diff | Diff
Patch. (761.15 KB, patch)
2011-02-11 15:32 PST, Yael
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Vella 2009-12-22 02:04:40 PST
Hi there,

We're run into a minor display problem in Webkit where positioning a background image to multiline Right-to-Left text, will position the image to the last line of the text, instead of the top right (as stated by the CSS).

The issue seems to appear only when the style is applied to <a> tags, it works normally on <p> (or other) tags.

The bug has been reproduced on a reducted page:
http://extdev.bbc.co.uk/worldservice/testcases/webkit_background_image.shtml
Comment 1 Daniel Bates 2010-03-27 15:54:38 PDT
Created attachment 51844 [details]
WebArchive of http://extdev.bbc.co.uk/.../webkit_background_image.shtml

For the purpose of preservation, a WebArchive of the reduction <http://extdev.bbc.co.uk/worldservice/testcases/webkit_background_image.shtml>
Comment 2 mitz 2010-10-08 16:02:48 PDT
See also bug 9272.
Comment 3 Yael 2011-02-11 14:53:39 PST
Created attachment 82184 [details]
Patch.

When the style of InlineFlowBox is right-to-left, the strips should be re-arranged in reverse oreder.
Please note that the code change is very small and the patch is big due to the tests :)
Comment 4 Yael 2011-02-11 14:55:39 PST
Sorry, one test is missing, I'll update the patch soon.
Comment 5 Darin Adler 2011-02-11 14:57:21 PST
Comment on attachment 82184 [details]
Patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=82184&action=review

> Source/WebCore/rendering/InlineFlowBox.cpp:1012
> +        int totalLogicalWidth = 0;

No reason to initialize this to zero. It’s set in all code paths below.
Comment 6 Yael 2011-02-11 15:32:50 PST
Created attachment 82196 [details]
Patch.

Removed un-needed initializer and added the missing test.
Comment 7 WebKit Commit Bot 2011-02-11 17:34:47 PST
Comment on attachment 82196 [details]
Patch.

Clearing flags on attachment: 82196

Committed r78396: <http://trac.webkit.org/changeset/78396>
Comment 8 WebKit Commit Bot 2011-02-11 17:34:54 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 WebKit Review Bot 2011-02-13 02:19:45 PST
http://trac.webkit.org/changeset/78396 might have broken SnowLeopard Intel Release (WebKit2 Tests)
The following tests are not passing:
fast/loader/empty-embed-src-attribute.html