Bug 74489 - extra space rendered when opposite-dir span gets wrapped just before inline-block span
Summary: extra space rendered when opposite-dir span gets wrapped just before inline-b...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-14 00:46 PST by Aharon (Vladimir) Lanin
Modified: 2022-08-09 12:08 PDT (History)
10 users (show)

See Also:


Attachments
test case (ref file coming as separate attachment) (1.20 KB, text/html)
2011-12-14 00:46 PST, Aharon (Vladimir) Lanin
no flags Details
ref file for the test case above (1.04 KB, text/html)
2011-12-14 00:49 PST, Aharon (Vladimir) Lanin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aharon (Vladimir) Lanin 2011-12-14 00:46:53 PST
Created attachment 119174 [details]
test case (ref file coming as separate attachment)

When you have <div>ltr text <span dir="rtl">RTL TEXT</span></div>, and the opposite-direction span happens to get wrapped, only one space is supposed to be rendered between the last word of the ltr text and the part of the RTL TEXT that fits on the same line. And this works correctly, too. However, ifwe have:
<div>ltr text <span dir="rtl">RTL <span style="display:inline-block; width:10000px> </span></span></div>, two spaces are rendered after the last word of the ltr text.

Please note that the extra space does not reproduce if the inline-block span is replaced with lorem ipsum or a padded span.
Comment 1 Aharon (Vladimir) Lanin 2011-12-14 00:49:29 PST
Created attachment 119175 [details]
ref file for the test case above
Comment 2 Ahmad Saleem 2022-08-09 12:08:08 PDT
I am unable to reproduce this bug using attached test case using Safari 15.6 on macOS 12.5 and both boxes render same with just one space rather than two spaces as mentioned in Comment 0. It renders same across other browser (Firefox Nightly 105 and Chrome Canary 106).

I am going to mark this as "RESOLVED CONFIGURATION CHANGED", in case if it is still present, please update and reopen this bug and give rationale for others as well for clarity in testing. Thanks!