RESOLVED FIXED Bug 115787
Implement MathML spacing around operators
https://bugs.webkit.org/show_bug.cgi?id=115787
Summary Implement MathML spacing around operators
Frédéric Wang (:fredw)
Reported 2013-05-08 03:01:50 PDT
The WebCore/css/mathml.css stylesheet contains the following comment: /* FIXME: For a RenderMathMLOperator's margin-start and margin-end, or for a MathML "embellished operator", check the operator's lspace and rspace attributes, and the MathML operator dictionary. */ math > mo, mrow > mo, msqrt > mo, mtd > mo { -webkit-margin-start: 0.2em; -webkit-margin-end: 0.2em; } basically, we always add .2em before and after the <mo> element. We should use the default lspace/rspace values given in MathML operator dictionary instead: http://www.w3.org/TR/MathML/appendixc.html#oper-dict.entries-table which are multiple of 1/18em: http://www.w3.org/TR/MathML/appendixc.html#oper-dict.space Also, the we could use the lspace/rspace attribute valus when specified: http://www.w3.org/TR/MathML/chapter3.html#presm.mo.attrs In theory, the spacing should be added to around the whole embellished operators not necessarily to the core mo, but I'm not sure how much Webkit implements about the embellished operator hierarchy.
Attachments
Patch (23.36 KB, patch)
2014-02-21 08:35 PST, Frédéric Wang (:fredw)
no flags
Patch (42.88 KB, patch)
2014-02-21 15:11 PST, Frédéric Wang (:fredw)
no flags
Patch (43.15 KB, patch)
2014-03-06 08:53 PST, Frédéric Wang (:fredw)
no flags
Patch (43.03 KB, patch)
2014-03-11 01:00 PDT, Frédéric Wang (:fredw)
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (510.17 KB, application/zip)
2014-03-11 02:04 PDT, Build Bot
no flags
Patch (70.67 KB, patch)
2014-03-11 02:12 PDT, Frédéric Wang (:fredw)
cfleizach: review+
Frédéric Wang (:fredw)
Comment 1 2013-07-18 03:39:14 PDT
This should be fixed for mfenced too (bug 118843).
Frédéric Wang (:fredw)
Comment 2 2014-02-20 05:44:31 PST
Important: remember to take the tests from attachment 217787 [details] that were not included in the final patch of bug 99620.
Frédéric Wang (:fredw)
Comment 3 2014-02-21 08:35:27 PST
Created attachment 224871 [details] Patch The following tests are still failing: mathml/presentation/mo-form-minus-plus.html mathml/presentation/mo-form.html mathml/presentation/mo-lspace-rspace.html
Frédéric Wang (:fredw)
Comment 4 2014-02-21 15:11:34 PST
Created attachment 224915 [details] Patch This fixes the remaining test failures and adds new tests to verify dynamic changes.
Frédéric Wang (:fredw)
Comment 5 2014-02-21 15:12:19 PST
*** Bug 118843 has been marked as a duplicate of this bug. ***
Frédéric Wang (:fredw)
Comment 6 2014-03-06 08:53:51 PST
Created attachment 225995 [details] Patch Refreshing the patch and fixing a style error.
Frédéric Wang (:fredw)
Comment 7 2014-03-11 01:00:12 PDT
Build Bot
Comment 8 2014-03-11 02:04:02 PDT
Comment on attachment 226395 [details] Patch Attachment 226395 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5620794474364928 New failing tests: mathml/presentation/mo-stretch.html
Build Bot
Comment 9 2014-03-11 02:04:06 PDT
Created attachment 226398 [details] Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Frédéric Wang (:fredw)
Comment 10 2014-03-11 02:12:34 PDT
Created attachment 226400 [details] Patch Updating the mac reference of op-stretch.html
chris fleizach
Comment 11 2014-03-11 09:33:00 PDT
Comment on attachment 226400 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226400&action=review > Source/WebCore/rendering/mathml/RenderMathMLRow.cpp:62 > + auto renderOperator = toRenderMathMLBlock(child)->unembellishedOperator(); this can be inside the if block if (auto renderOperator = toRenderMathMLBlock(child)->unembellishedOperator())
Frédéric Wang (:fredw)
Comment 12 2014-03-11 23:47:37 PDT
Note You need to log in before you can comment on or make changes to this bug.