This preliminary step for bug 155018. The goal is to get rid of the fact that RenderMathMLToken/RenderMathMLOperator destroy & recreate an anonymous text node. We will thus use MathOperator to handle the following cases: // 1) Stretchy and large operators, since they require special painting. // 2) The minus sign, since it can be obtained from a hyphen in the DOM. // 3) The anonymous operators created by mfenced, since they do not have text content in the DOM. Note that for 3) this removes support for the edge cases of open/close operators with multiple characters like <mfenced open="ABC" close="DEF">. Not a big problem, since that case is not used at all in practice and we will probably have to remove/rewrite mfenced in the long term.
Created attachment 278498 [details] Patch
Created attachment 278601 [details] Patch for EWS testing
Comment on attachment 278601 [details] Patch for EWS testing Attachment 278601 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1302674 New failing tests: mathml/radical-fallback.html mathml/opentype/opentype-stretchy.html mathml/presentation/roots.xhtml mathml/opentype/horizontal-munderover.html
Created attachment 278603 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Created attachment 278618 [details] Patch for EWS testing
Comment on attachment 278618 [details] Patch for EWS testing Attachment 278618 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1303543 New failing tests: mathml/radical-fallback.html mathml/opentype/opentype-stretchy.html mathml/opentype/horizontal-munderover.html
Created attachment 278619 [details] Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.4
Created attachment 278620 [details] Patch
Created attachment 278621 [details] Patch
Created attachment 278629 [details] Patch
Created attachment 281564 [details] Patch
It looks like we don't need to wait the RenderMathMLRoot refactoring before taking this patch.
Comment on attachment 281564 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=281564&action=review I think this change looks good, but I'm not sure if I understand the reasons multiple-character support was removed from mfenced. Could you please explain this a bit more completely? Otherwise, this looks good. > Source/WebCore/ChangeLog:8 > + To prepare removal of anonymous text node from RenderMathMLOperator/RenderMathMLToken, "To prepare for the removal of ..." > Source/WebCore/ChangeLog:11 > + edge case of mfenced operators with multiple characters. I'm not sure I understand this change. Are mfenced operators not specified to support multiple characters? (a) If we are breaking spec here, I don't think we should make this change. (b) If the spec is unclear, we may be okay. (c) If the intent is to re-add support for mfenced operators with multiple characters in a future patch, could you please reference the Bugzilla for that change here? > Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp:362 > + return Optional<int>(static_cast<int>(lroundf(m_mathOperator.ascent()))); I think we should use std::lround(m_mathOperator.ascent()). You might need to add an #include <cmath>.
Created attachment 281644 [details] Patch
Comment on attachment 281644 [details] Patch Looks great! Thanks for all of this MathML work.
Committed r202271: <http://trac.webkit.org/changeset/202271>