[Webkit-unassigned] [Bug 79093] New: <wbr> should have the same bidi effects as a U+200B, the zero width space

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 21 02:20:17 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=79093

           Summary: <wbr> should have the same bidi effects as a U+200B,
                    the zero width space
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: aharon at google.com
                CC: mitz at webkit.org, playmobil at google.com,
                    xji at chromium.org


Currently, data:text/html,<div dir=rtl>123,<wbr>456</div> is displayed as 456,123 (when it is not wrapped to two lines).

There are three things wrong with this:
- It gives you the wrong number with no hint to the user of what happened. We want it to display as 123,456, as if the <wbr> was not there.
- It is not what IE9 does (it displays 123,456)
- It seems to disagree with the HTML5 spec (http://dev.w3.org/html5/spec/Overview.html#phrasing-content-1), whose default style sheet section says:

wbr { content: '\200B'; }

Please note that U+200B, the ZERO WIDTH SPACE, is (unlike all the other space-type characters, e.g. U+200A, the HAIR WIDTH SPACE) of bidi class BN, which effectively has no effect on the bidi ordering of the content around it (see http://unicode.org/reports/tr9/#Boundary_Neutrals). Thus data:text/html,<div dir=rtl>123,&%23x200B;456</div> displays as we want it to, i.e. 123,456.

Unfortunately, the HTML5 spec currently gives no more explicit indication of the effects the <wbr> is supposed to have on the bidi ordering of the content around it, and I have filed a bug on HTML5 (https://www.w3.org/Bugs/Public/show_bug.cgi?id=16001) about that. Also, the content spec in the default style sheet is rather strange, given that the <wbr> definition (http://dev.w3.org/html5/spec/Overview.html#the-wbr-element) explicitly says that "content inside wbr elements must not be considered part of the surrounding text".

Nevertheless, I think that there is sufficient reason to change the bidi behavior of <wbr> to match that of U+200B (when the line is not wrapped at the <wbr>), without waiting for the last word from the HTML5 spec.

Please note that currently there are no good workarounds to this bug. Using &#x200B; instead of <wbr> results in a stupid invisible character in the page, which is no fun if the user cuts, pastes, and edits the content. Furthermore, unlike <wbr>, it does not work inside a <pre>. And adding wbr { content: '\200B'; } to the page's style currently does not seem to have any effect (perhaps the content pseudo-property is not supported yet?).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list