Graphical elements inside mphantom should not be visible.

https://bugs.webkit.org/show_bug.cgi?id=116600.

Patch by Frédéric Wang <fred.wang@free.fr> on 2013-07-24
Reviewed by Chris Fleizach.

Source/WebCore:

Test: mathml/presentation/phantom.html

* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::paint): don't paint the fraction bar when the visibility is not "visible"
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint): don't paint the radical symbol when the visibility is not "visible"

LayoutTests:

* mathml/presentation/phantom-expected.html: Added.
* mathml/presentation/phantom.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 930aea84
2013-07-24 Frédéric Wang <fred.wang@free.fr>
Graphical elements inside mphantom should not be visible.
https://bugs.webkit.org/show_bug.cgi?id=116600.
Reviewed by Chris Fleizach.
* mathml/presentation/phantom-expected.html: Added.
* mathml/presentation/phantom.html: Added.
2013-07-24 Simon Pena <simon.pena@samsung.com>
[GTK] Unreviewed gardening. Add expectations for flaky test.
<!doctype html>
<html>
<head>
<title>phantom</title>
<meta charset="utf-8"/>
</head>
<body style="background: white;">
<math>
<mfrac>
<mtext>mphantom</mtext>
<mrow>
<mo>[</mo>
<mphantom style="color: white;">
<mo>(</mo>
<mn>2</mn>
<mo>+</mo>
<msqrt>
<mfrac>
<mi>x</mi>
<mi>y</mi>
</mfrac>
</msqrt>
</mphantom>
<mo>]</mo>
</mrow>
</mfrac>
</math>
</body>
</html>
<!doctype html>
<html>
<head>
<title>phantom</title>
<meta charset="utf-8"/>
</head>
<body style="background: white;">
<!-- The <mphantom> element should be invisible but should have the size
of its content. -->
<math>
<mfrac>
<mtext>mphantom</mtext>
<mrow>
<mo>[</mo>
<mphantom>
<mo>(</mo>
<mn>2</mn>
<mo>+</mo>
<msqrt>
<mfrac>
<mi>x</mi>
<mi>y</mi>
</mfrac>
</msqrt>
</mphantom>
<mo>]</mo>
</mrow>
</mfrac>
</math>
</body>
</html>
2013-07-24 Frédéric Wang <fred.wang@free.fr>
Graphical elements inside mphantom should not be visible.
https://bugs.webkit.org/show_bug.cgi?id=116600.
Reviewed by Chris Fleizach.
Test: mathml/presentation/phantom.html
* rendering/mathml/RenderMathMLFraction.cpp:
(WebCore::RenderMathMLFraction::paint): don't paint the fraction bar when the visibility is not "visible"
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::paint): don't paint the radical symbol when the visibility is not "visible"
2013-07-24 Brendan Long <b.long@cablelabs.com>
WebVTTParser's identifier buffering can ignore subsequent lines
......@@ -143,7 +143,7 @@ void RenderMathMLFraction::layout()
void RenderMathMLFraction::paint(PaintInfo& info, const LayoutPoint& paintOffset)
{
RenderMathMLBlock::paint(info, paintOffset);
if (info.context->paintingDisabled() || info.phase != PaintPhaseForeground)
if (info.context->paintingDisabled() || info.phase != PaintPhaseForeground || style()->visibility() != VISIBLE)
return;
RenderBox* denominatorWrapper = lastChildBox();
......
......@@ -251,7 +251,7 @@ void RenderMathMLRoot::paint(PaintInfo& info, const LayoutPoint& paintOffset)
{
RenderMathMLBlock::paint(info, paintOffset);
if (info.context->paintingDisabled())
if (info.context->paintingDisabled() || style()->visibility() != VISIBLE)
return;
IntPoint adjustedPaintOffset = roundedIntPoint(paintOffset + location() + contentBoxRect().location());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment