Bug 12337

Summary: arabic punctuation on ltr sites to right of text, not at the end
Product: WebKit Reporter: Nicholas Shanks <nickshanks>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: groby, mitz, playmobil
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.pingmag.jp/2006/12/11/iranian-typography-now/
Attachments:
Description Flags
URLs with trailing slash in LTR/RTL none

Description Nicholas Shanks 2007-01-19 16:52:43 PST
Have a look at the Farsi comments at the URL given. They are not marked up using lang or dir attributes. The full stop is visually at the start of the text, not the end. Furthermore, in source view, the </p> tag is immediately after the arabic, and so is rendered to the left and appears as <p/> !
Comment 1 mitz 2007-01-20 12:10:07 PST
Bidi layout of the linked page follows the spec. HTML and CSS do not have a concept of a "neutral" base writing direction which is resolved based on content (e.g. by the first character with strong directionality) like Mac OS X does. The initial value of the 'direction' property in CSS is 'ltr'.

The text view used to display the source in Safari (which is not part of WebKit) appears to be using a neutral base writing direction, so that "paragraphs" that begin with an Arabic letter are laid out as RTL. In that case, what looks like "<p/>" is correct.
Comment 2 Rachel Blum 2011-06-10 14:04:50 PDT
Created attachment 96782 [details]
URLs with trailing slash in LTR/RTL
Comment 3 Rachel Blum 2011-06-10 14:06:53 PDT
I guess this might be technically correct (Unicode TR9, 3.3.4, rule N2 - remaining neutrals take embedded direction), but it produces odd results for e.g. URLs in RTL environments. (See attachment)

A better choice would be to assume eor to have the direction of the last strong character if it's also end of paragraph... The question being, does this have any chance of being fixed, or am I better off filing a bug agains <input type="url"> not defaulting to LTR?
Comment 4 Jeremy Moskovich 2011-07-04 00:41:22 PDT
Groby: Can you file a separate bug for <input type=url> ?

I'm marking this bug as invalid since we follow the spec.