Bug 106600 - Bad spacing inside MathML formulas when text-indent is specified
Summary: Bad spacing inside MathML formulas when text-indent is specified
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: MathML (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-10 14:01 PST by Frédéric Wang (:fredw)
Modified: 2013-05-17 09:25 PDT (History)
8 users (show)

See Also:


Attachments
Testcase (88.08 KB, text/html)
2013-01-10 14:01 PST, Frédéric Wang (:fredw)
no flags Details
Patch V1 (1.29 KB, patch)
2013-05-06 00:52 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff
Patch V2 (2.86 KB, patch)
2013-05-16 12:21 PDT, Frédéric Wang (:fredw)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2013-01-10 14:01:36 PST
Created attachment 182201 [details]
Testcase

See the testcase, where I use the CSS rule

p { text-indent: 2em; }

There are large gaps inside the formulas in Chrome 24. This seems similar to this old Gecko's bug: https://bugzilla.mozilla.org/show_bug.cgi?id=454085 and could be fixed the same way. Interestingly, if you uncomment the <script> and let MathJax process the <math>, then the page renders correctly.
Comment 1 Frédéric Wang (:fredw) 2013-01-14 02:45:50 PST
Fixing this bug should just be a matter of adding "text-indent: 0" rules in

Source/WebCore/css/mathml.css
Comment 2 Frédéric Wang (:fredw) 2013-05-06 00:51:35 PDT
So it seems that the bug appears with the latest LaTeXML version (with new CSS style). See for instance my blog:

http://www.maths-informatique-jeux.com/blog/frederic/?post/2013/04/04/Suslin%E2%80%99s-Problem
Comment 3 Frédéric Wang (:fredw) 2013-05-06 00:52:10 PDT
Created attachment 200640 [details]
Patch V1
Comment 4 Frédéric Wang (:fredw) 2013-05-08 14:49:08 PDT
Can someone please review the patch?
Comment 5 Martin Robinson 2013-05-09 09:32:25 PDT
(In reply to comment #4)
> Can someone please review the patch?

This patch doesn't change any test results or include any new tests?
Comment 6 Frédéric Wang (:fredw) 2013-05-12 02:33:03 PDT
(In reply to comment #5)
> This patch doesn't change any test results or include any new tests?

This only resets the text-indent value on the <math> element. So this only has an effect on pages that modify text-indent and contain a <math> element. I thought it was a trivial change so didn't need tests. Apparently, everything is green above.
Comment 7 Martin Robinson 2013-05-12 12:46:05 PDT
(In reply to comment #6)
> (In reply to comment #5)
> > This patch doesn't change any test results or include any new tests?
> 
> This only resets the text-indent value on the <math> element. So this only has an effect on pages that modify text-indent and contain a <math> element. I thought it was a trivial change so didn't need tests. Apparently, everything is green above.
Comment 8 Martin Robinson 2013-05-12 12:47:42 PDT
(In reply to comment #
> (In reply to comment #
> This patch doesn't change any test results or include any new tests?
> 
> This only resets the text-indent value on the <math> element. So this only has an effect on pages that modify text-indent and contain a <math> element. I thought it was a trivial change so didn't need tests. Apparently, everything is green above.

I think it could be useful for this to have a test so that we don't regress here. It seems that a reference test could be fairly trivial in this case actually. In general, changes to WebCore need tests and I'd say doubly so for changes to layout.
Comment 9 Frédéric Wang (:fredw) 2013-05-16 12:21:33 PDT
Created attachment 201981 [details]
Patch V2
Comment 10 WebKit Commit Bot 2013-05-17 09:25:40 PDT
Comment on attachment 201981 [details]
Patch V2

Clearing flags on attachment: 201981

Committed r150264: <http://trac.webkit.org/changeset/150264>
Comment 11 WebKit Commit Bot 2013-05-17 09:25:42 PDT
All reviewed patches have been landed.  Closing bug.