Implement MathML spacing around operators .
authorfred.wang@free.fr <fred.wang@free.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Mar 2014 06:46:52 +0000 (06:46 +0000)
committerfred.wang@free.fr <fred.wang@free.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 12 Mar 2014 06:46:52 +0000 (06:46 +0000)
commitd1e4648f652631af177b07b07d5c565bc8b548e4
tree878095c9e11b7b32c33599f460e8a0ed6f4969a6
parent27217b4e5ec8737723ada876bd80a215e04180e5
Implement MathML spacing around operators .
https://bugs.webkit.org/show_bug.cgi?id=115787

Reviewed by Chris Fleizach.

Source/WebCore:

This makes the <mo> operators use the lspace/rspace properties to
determine their spacing. The spacing is now consistent with the one
of <mfenced> and as a consequence bug 118843 is fixed. This also ensures
that the rendering of <mo> elements is updated when the form or
attributes are changed.

Tests: mathml/presentation/dir-mo.html
       mathml/presentation/mo-form-dynamic.html
       mathml/presentation/mo-form-minus-plus.html
       mathml/presentation/mo-form.html
       mathml/presentation/mo-lspace-rspace-dynamic.html
       mathml/presentation/mo-lspace-rspace.html
       mathml/presentation/mo-whitespaces.html

* css/mathml.css:
* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::childrenChanged):
* mathml/MathMLInlineContainerElement.h:
* rendering/mathml/RenderMathMLOperator.cpp:
(WebCore::RenderMathMLOperator::setOperatorPropertiesFromOpDictEntry):
(WebCore::RenderMathMLOperator::SetOperatorProperties):
(WebCore::RenderMathMLOperator::updateFromElement):
(WebCore::RenderMathMLOperator::updateOperatorProperties):
(WebCore::RenderMathMLOperator::updateStyle):
* rendering/mathml/RenderMathMLOperator.h:
* rendering/mathml/RenderMathMLRow.cpp:
(WebCore::RenderMathMLRow::updateOperatorProperties):
* rendering/mathml/RenderMathMLRow.h:
* rendering/mathml/RenderMathMLToken.h:

LayoutTests:

Add many new tests to verify the form/lspace/rspace properties of the
<mo> element and that the whitespace of the text content is collapsed.
Update fenced-mi now that bug 118843 is fixed.

* mathml/presentation/dir-mo-expected.html: Added.
* mathml/presentation/dir-mo.html: Added.
* mathml/presentation/fenced-expected.html:
* mathml/presentation/fenced-mi-expected.html:
* mathml/presentation/mo-form-dynamic-expected.html: Added.
* mathml/presentation/mo-form-dynamic.html: Added.
* mathml/presentation/mo-form-expected.html: Added.
* mathml/presentation/mo-form-minus-plus-expected.html: Added.
* mathml/presentation/mo-form-minus-plus.html: Added.
* mathml/presentation/mo-form.html: Added.
* mathml/presentation/mo-lspace-rspace-dynamic-expected.html: Added.
* mathml/presentation/mo-lspace-rspace-dynamic.html: Added.
* mathml/presentation/mo-lspace-rspace-expected.html: Added.
* mathml/presentation/mo-lspace-rspace.html: Added.
* mathml/presentation/mo-whitespaces-expected.html: Added.
* mathml/presentation/mo-whitespaces.html: Added.
* platform/mac/mathml/presentation/mo-stretch-expected.txt: update reference.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/mathml/presentation/dir-mo-expected.html [new file with mode: 0644]
LayoutTests/mathml/presentation/dir-mo.html [new file with mode: 0644]
LayoutTests/mathml/presentation/fenced-expected.html
LayoutTests/mathml/presentation/fenced-mi-expected.html
LayoutTests/mathml/presentation/mo-form-dynamic-expected.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-form-dynamic.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-form-expected.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-form-minus-plus-expected.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-form-minus-plus.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-form.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-lspace-rspace-dynamic-expected.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-lspace-rspace-dynamic.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-lspace-rspace-expected.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-lspace-rspace.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-whitespaces-expected.html [new file with mode: 0644]
LayoutTests/mathml/presentation/mo-whitespaces.html [new file with mode: 0644]
LayoutTests/platform/mac/mathml/presentation/mo-stretch-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/css/mathml.css
Source/WebCore/mathml/MathMLInlineContainerElement.cpp
Source/WebCore/mathml/MathMLInlineContainerElement.h
Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp
Source/WebCore/rendering/mathml/RenderMathMLOperator.h
Source/WebCore/rendering/mathml/RenderMathMLRow.cpp
Source/WebCore/rendering/mathml/RenderMathMLRow.h
Source/WebCore/rendering/mathml/RenderMathMLToken.h