Bug 74399

Summary: BR in BDI breaks paragraph around BDI
Product: WebKit Reporter: Aharon (Vladimir) Lanin <aharon>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: aharon, eric, leviw, playmobil, rniwa, xji
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 50910    
Attachments:
Description Flags
test case (ref file coming as separate attachment)
none
ref file for the test case above none

Description Aharon (Vladimir) Lanin 2011-12-13 04:06:00 PST
The HTML5 spec (http://dev.w3.org/html5/spec/Overview.html#the-bdi-element) states that "For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER", i.e. as a neutral character. Thus, a <bdi> containing a <br> (which serves as a paragraph break in the content of the <bdi>) must *not* serve as a paragraph break in the content around the BDI (since a neutral character does not do so).

Unfortunately, currently, the content before and after a <bdi> containing a <br> is rendered as separate bidi paragraphs, and so directional runs and other bidi effects that would otherwise be formed between the two are severed.
Comment 1 Aharon (Vladimir) Lanin 2011-12-13 04:09:24 PST
Created attachment 119000 [details]
test case (ref file coming as separate attachment)

This is one of the tests being submitted to public-html-testsuite@w3.org for inclusion into the W3C's HTML5 test suite.
Comment 2 Aharon (Vladimir) Lanin 2011-12-13 04:10:05 PST
Created attachment 119001 [details]
ref file for the test case above
Comment 3 Aharon (Vladimir) Lanin 2012-06-27 04:54:26 PDT
The CSS spec may be changed in this respect due to a recent proposal to add isolates to Unicode and to make the CSS feature make use of the new Unicode feature - which will require changes to the details of the CSS spec. Details at http://lists.w3.org/Archives/Public/public-i18n-bidi/2012AprJun/0022.html
Comment 4 Aharon (Vladimir) Lanin 2013-06-11 03:30:18 PDT
The CSS spec has indeed been changed, and this behavior is now according to spec.