3 Move determination of operator direction into DOM class and reduce relayout
4 https://bugs.webkit.org/show_bug.cgi?id=160339
5
6 Reviewed by NOBODY (OOPS!).
7
8 We move the determination of operator direction into MathMLOperatorElement. After that,
9 setOperatorProperties is no longer necessary in RenderMathMLOperator and we can remove many
10 calls to update operator properties and force relayout.
11
12 No new tests, already covered by existing tests.
13
14 * mathml/MathMLInlineContainerElement.cpp:
15 (WebCore::MathMLInlineContainerElement::childrenChanged): No need to call
16 updateOperatorProperties.
17 * mathml/MathMLOperatorElement.cpp:
18 (WebCore::MathMLOperatorElement::operatorText): Set m_operatorTextIsVertical.
19 (WebCore::MathMLOperatorElement::isVertical): Return m_operatorTextIsVertical possibly
20 calculating it again if the operator text is dirty.
21 * mathml/MathMLOperatorElement.h: Define new member and accessor for operator direction.
22 * rendering/mathml/RenderMathMLFencedOperator.cpp:
23 (WebCore::RenderMathMLFencedOperator::updateOperatorContent): Rename rebuildTokenContent.
24 (WebCore::RenderMathMLFencedOperator::stretchTo): Call setOperatorProperties before
25 forwarding the call to the parent class.
26 (WebCore::RenderMathMLFencedOperator::computePreferredLogicalWidths): Ditto.
27 (WebCore::RenderMathMLFencedOperator::styleDidChange): Ditto.
28 (WebCore::RenderMathMLFencedOperator::updateMathOperator): Ditto.
29 * rendering/mathml/RenderMathMLFencedOperator.h: Override some functions to keep the call
30 to setOperatorProperties. Also handle the operator direction here.
31 * rendering/mathml/RenderMathMLOperator.cpp:
32 (WebCore::RenderMathMLOperator::isVertical): Forward the call to MathMLOperatorElement.
33 (WebCore::RenderMathMLOperator::stretchTo): Use isVertical and remove setOperatorProperties.
34 (WebCore::RenderMathMLOperator::resetStretchSize): Use isVertical.
35 (WebCore::RenderMathMLOperator::computePreferredLogicalWidths): Remove setOperatorProperties.
36 (WebCore::RenderMathMLOperator::updateMathOperator): Rename rebuildTokenContent as this
37 function really just update MathOperator. Also remove setNeedsLayoutAndPrefWidthsRecalc.
38 (WebCore::RenderMathMLOperator::updateTokenContent): Rename rebuildTokenContent.
39 (WebCore::RenderMathMLOperator::verticalStretchedOperatorShift): Call isVertical.
40 (WebCore::RenderMathMLOperator::paint): Ditto.
41 (WebCore::RenderMathMLOperator::setOperatorProperties): Deleted.
42 (WebCore::RenderMathMLOperator::rebuildTokenContent): Deleted. Renamed updateMathOperator.
43 (WebCore::RenderMathMLOperator::updateOperatorProperties): Deleted.
44 (WebCore::RenderMathMLOperator::styleDidChange): Remove setOperatorProperties.
45 * rendering/mathml/RenderMathMLOperator.h:
46 (WebCore::RenderMathMLOperator::stretchSize): Use isVertical
47 * rendering/mathml/RenderMathMLRow.cpp:
48 (WebCore::RenderMathMLRow::updateOperatorProperties): Deleted.
49 * rendering/mathml/RenderMathMLRow.h: Delete updateOperatorProperties.
50
512016-07-29 Frederic Wang <fwang@igalia.com>
52