Skip to content
Permalink
Browse files
2010-08-04 François Sausset <sausset@gmail.com>
        Reviewed by Kenneth Rohde Christiansen.

        Regression test: overflow: auto; on a math element was a cause of crash.
        https://bugs.webkit.org/show_bug.cgi?id=42894

        * mathml/presentation/style.xhtml: Added.
        * platform/mac/mathml/presentation/style-expected.checksum: Added.
        * platform/mac/mathml/presentation/style-expected.png: Added.
        * platform/mac/mathml/presentation/style-expected.txt: Added.
2010-08-04  François Sausset  <sausset@gmail.com>

        Reviewed by Kenneth Rohde Christiansen.

        Remove unnecessary calls to setStyle() in MathML code that made RenderLayer crash.
        https://bugs.webkit.org/show_bug.cgi?id=42894

        Test: mathml/presentation/style.xhtml

        * mathml/MathMLInlineContainerElement.cpp:
        (WebCore::MathMLInlineContainerElement::createRenderer):
        * mathml/MathMLMathElement.cpp:
        (WebCore::MathMLMathElement::createRenderer):
        * mathml/MathMLTextElement.cpp:
        (WebCore::MathMLTextElement::createRenderer):

Canonical link: https://commits.webkit.org/55490@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@64668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Aug 4, 2010
1 parent 62cd6e8 commit f6231ca67594d975afc539d58136f5cecc11e627
@@ -1,3 +1,15 @@
2010-08-04 François Sausset <sausset@gmail.com>

Reviewed by Kenneth Rohde Christiansen.

Regression test: overflow: auto; on a math element was a cause of crash.
https://bugs.webkit.org/show_bug.cgi?id=42894

* mathml/presentation/style.xhtml: Added.
* platform/mac/mathml/presentation/style-expected.checksum: Added.
* platform/mac/mathml/presentation/style-expected.png: Added.
* platform/mac/mathml/presentation/style-expected.txt: Added.

2010-08-04 Mario Sanchez Prada <msanchez@igalia.com>

Reviewed by Jeremy Orlow.
@@ -0,0 +1,15 @@
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>Styled Math Elements</title>
<style type="text/css">
math {
overflow: auto;
}
</style>
</head>
<body>
<p>
<math xmlns='http://www.w3.org/1998/Math/MathML'><mi>x</mi><mo>+</mo><mn>1</mn></math>
</p>
</body>
</html>
@@ -0,0 +1 @@
69ec8704adcae519e65bab550eca524b
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,19 @@
layer at (0,0) size 800x600
RenderView at (0,0) size 800x600
layer at (0,0) size 800x51
RenderBlock {html} at (0,0) size 800x51
RenderBody {body} at (8,16) size 784x19
RenderBlock {p} at (0,0) size 784x19
RenderText {#text} at (0,0) size 0x0
layer at (8,16) size 26x19
RenderBlock {math} at (0,0) size 26x19
RenderInline {mi} at (0,0) size 7x16
RenderText {#text} at (1,3) size 7x16
text run at (1,3) width 7: "x"
RenderBlock {mo} at (8,3) size 9x16
RenderBlock {mo} at (0,0) size 9x16
RenderText {mo} at (0,0) size 9x16
text run at (0,0) width 9: "+"
RenderInline {mn} at (0,0) size 8x16
RenderText {#text} at (17,3) size 8x16
text run at (17,3) width 8: "1"
@@ -1,3 +1,19 @@
2010-08-04 François Sausset <sausset@gmail.com>

Reviewed by Kenneth Rohde Christiansen.

Remove unnecessary calls to setStyle() in MathML code that made RenderLayer crash.
https://bugs.webkit.org/show_bug.cgi?id=42894

Test: mathml/presentation/style.xhtml

* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::createRenderer):
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::createRenderer):
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createRenderer):

2010-08-03 Kenneth Russell <kbr@google.com>

Reviewed by Nate Chapin.
@@ -53,33 +53,30 @@ PassRefPtr<MathMLInlineContainerElement> MathMLInlineContainerElement::create(co
return adoptRef(new MathMLInlineContainerElement(tagName, document));
}

RenderObject* MathMLInlineContainerElement::createRenderer(RenderArena* arena, RenderStyle* style)
RenderObject* MathMLInlineContainerElement::createRenderer(RenderArena* arena, RenderStyle*)
{
RenderObject* object;
if (hasLocalName(MathMLNames::mrowTag))
object = new (arena) RenderMathMLRow(this);
return new (arena) RenderMathMLRow(this);
else if (hasLocalName(MathMLNames::msubTag))
object = new (arena) RenderMathMLSubSup(this);
return new (arena) RenderMathMLSubSup(this);
else if (hasLocalName(MathMLNames::msupTag))
object = new (arena) RenderMathMLSubSup(this);
return new (arena) RenderMathMLSubSup(this);
else if (hasLocalName(MathMLNames::msubsupTag))
object = new (arena) RenderMathMLSubSup(this);
return new (arena) RenderMathMLSubSup(this);
else if (hasLocalName(MathMLNames::moverTag))
object = new (arena) RenderMathMLUnderOver(this);
return new (arena) RenderMathMLUnderOver(this);
else if (hasLocalName(MathMLNames::munderTag))
object = new (arena) RenderMathMLUnderOver(this);
return new (arena) RenderMathMLUnderOver(this);
else if (hasLocalName(MathMLNames::munderoverTag))
object = new (arena) RenderMathMLUnderOver(this);
return new (arena) RenderMathMLUnderOver(this);
else if (hasLocalName(MathMLNames::mfracTag))
object = new (arena) RenderMathMLFraction(this);
return new (arena) RenderMathMLFraction(this);
else if (hasLocalName(MathMLNames::msqrtTag))
object = new (arena) RenderMathMLSquareRoot(this);
return new (arena) RenderMathMLSquareRoot(this);
else if (hasLocalName(MathMLNames::mrootTag))
object = new (arena) RenderMathMLRoot(this);
return new (arena) RenderMathMLRoot(this);
else
object = new (arena) RenderMathMLBlock(this);
object->setStyle(style);
return object;
return new (arena) RenderMathMLBlock(this);
}

}
@@ -44,11 +44,9 @@ PassRefPtr<MathMLMathElement> MathMLMathElement::create(const QualifiedName& tag
return adoptRef(new MathMLMathElement(tagName, document));
}

RenderObject* MathMLMathElement::createRenderer(RenderArena* arena, RenderStyle* style)
RenderObject* MathMLMathElement::createRenderer(RenderArena* arena, RenderStyle*)
{
RenderMathMLMath* renderer = new (arena) RenderMathMLMath(this);
renderer->setStyle(style);
return renderer;
return new (arena) RenderMathMLMath(this);
}

}
@@ -49,11 +49,8 @@ PassRefPtr<MathMLTextElement> MathMLTextElement::create(const QualifiedName& tag

RenderObject* MathMLTextElement::createRenderer(RenderArena* arena, RenderStyle* style)
{
if (hasLocalName(MathMLNames::moTag)) {
RenderObject* object = new (arena) RenderMathMLOperator(this);
object->setStyle(style);
return object;
}
if (hasLocalName(MathMLNames::moTag))
return new (arena) RenderMathMLOperator(this);

return MathMLElement::createRenderer(arena, style);
}

0 comments on commit f6231ca

Please sign in to comment.