Bug 12337 - arabic punctuation on ltr sites to right of text, not at the end
Summary: arabic punctuation on ltr sites to right of text, not at the end
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.pingmag.jp/2006/12/11/iran...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-19 16:52 PST by Nicholas Shanks
Modified: 2011-07-04 00:41 PDT (History)
3 users (show)

See Also:


Attachments
URLs with trailing slash in LTR/RTL (207 bytes, text/html)
2011-06-10 14:04 PDT, Rachel Blum
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.