Bug 124121

Summary: CSS direction must be reset to ltr on <math> element.
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: MathMLAssignee: Frédéric Wang (:fredw) <fred.wang>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cfleizach, commit-queue, dbarton, esprehn+autocc, glenn, gyuyoung.kim, macpherson, menard, mrobinson
Priority: P2 Keywords: WebExposed
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: https://developer.mozilla.org/he/docs/Mozilla_MathML_Project/Start
Bug Depends on:    
Bug Blocks: 123018    
Attachments:
Description Flags
screeshot
none
Patch V1 none

Description Frédéric Wang (:fredw) 2013-11-10 01:52:36 PST
Created attachment 216520 [details]
screeshot

See https://developer.mozilla.org/he/docs/Mozilla_MathML_Project/Start and attachment.

The text is in Hebrew, so the CSS direction is RTL. However, mathematical formulas are written LTR in Hebrew, so the CSS RTL direction must not be inherited. This can be trivially fixed by resetting the direction on the <math> element:

math { direction: ltr; }
Comment 1 Frédéric Wang (:fredw) 2013-11-10 03:58:49 PST
Created attachment 216523 [details]
Patch V1
Comment 2 Darin Adler 2013-11-10 17:32:20 PST
Comment on attachment 216523 [details]
Patch V1

View in context: https://bugs.webkit.org/attachment.cgi?id=216523&action=review

> Source/WebCore/css/mathml.css:6
> +    direction: ltr;

Looks like this style will also be visible in computed style, not just in how the text is displayed. It would be good to add a test that covers that as well. Could easily add that to the direction test simply by writing a little code to extract the computed value of direction and stick it into another element.
Comment 3 WebKit Commit Bot 2013-11-10 17:56:01 PST
Comment on attachment 216523 [details]
Patch V1

Clearing flags on attachment: 216523

Committed r159035: <http://trac.webkit.org/changeset/159035>
Comment 4 WebKit Commit Bot 2013-11-10 17:56:04 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Frédéric Wang (:fredw) 2014-03-10 12:26:17 PDT
Mass change: add WebExposed keyword to help MDN documentation.