No border or padding is applied for the left on a multi-line rtl inline box flow. I am not shore what the correct behavior is supposed to be, but the right side is painted at the begining of the flow (in the ltr context the right side is at the end) so I assume the left should be at the end.
Created attachment 7708 [details] test case This test case shows both ltr and rtl of the same text documenting both single and multiline inline boxes.
I confirm the behavior is wrong, this sounds like one mitz find interesting.
Created attachment 7733 [details] patch Simple 1 line fix with new layout test.
While the patch does fix the functionality shown in the test case and cause no regressions that I could find, in my testing I found that the issue persists in a lot of other corner cases. I am going to attach a couple more test cases that demonstrate.
Created attachment 7779 [details] test case without bidi overide
Created attachment 7780 [details] test case with inner spans going in opposite directions of there parent
Created attachment 7781 [details] test case with opposite direction inner spans and no bidi overide
Created attachment 7782 [details] test case using hebrew text
Comment on attachment 7733 [details] patch r=me
After applying the change to rendering/InlineFlowBox.cpp, the results don't really look like they are supposed to be (multiline boxes only get one colored border).
Comment on attachment 7733 [details] patch Clearing the review flag for now.
The test case was affected by bug 8392, so I have slightly modified it before landing. It should work OK in run-webkit-tests now, but it still depends on the window width, so it may fail when tried manually.