Title: [205408] trunk/Source/WebCore
- Revision
- 205408
- Author
- [email protected]
- Date
- 2016-09-03 14:32:45 -0700 (Sat, 03 Sep 2016)
Log Message
Constructors of MathML renderers should only accept MathMLPresentationElement-derived classes
https://bugs.webkit.org/show_bug.cgi?id=161378
Patch by Frédéric Wang <[email protected]> on 2016-09-03
Reviewed by Darin Adler.
We update constructors of RenderMathMLBlock, to only accept MathMLPresentationElement
instances as a parameter. Similarly, we make the constructor of RenderMathMLToken only
accept MathMLTokenElement instances.
No new tests, behavior is unchanged.
* rendering/mathml/RenderMathMLBlock.cpp:
(WebCore::RenderMathMLBlock::RenderMathMLBlock):
* rendering/mathml/RenderMathMLBlock.h:
* rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::RenderMathMLToken):
* rendering/mathml/RenderMathMLToken.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (205407 => 205408)
--- trunk/Source/WebCore/ChangeLog 2016-09-03 19:58:28 UTC (rev 205407)
+++ trunk/Source/WebCore/ChangeLog 2016-09-03 21:32:45 UTC (rev 205408)
@@ -1,3 +1,23 @@
+2016-09-03 Frédéric Wang <[email protected]>
+
+ Constructors of MathML renderers should only accept MathMLPresentationElement-derived classes
+ https://bugs.webkit.org/show_bug.cgi?id=161378
+
+ Reviewed by Darin Adler.
+
+ We update constructors of RenderMathMLBlock, to only accept MathMLPresentationElement
+ instances as a parameter. Similarly, we make the constructor of RenderMathMLToken only
+ accept MathMLTokenElement instances.
+
+ No new tests, behavior is unchanged.
+
+ * rendering/mathml/RenderMathMLBlock.cpp:
+ (WebCore::RenderMathMLBlock::RenderMathMLBlock):
+ * rendering/mathml/RenderMathMLBlock.h:
+ * rendering/mathml/RenderMathMLToken.cpp:
+ (WebCore::RenderMathMLToken::RenderMathMLToken):
+ * rendering/mathml/RenderMathMLToken.h:
+
2016-09-03 Brian Weinstein <[email protected]>
Consult with the FrameLoaderClient about whether or not content extensions should be enabled when loading this URL.
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp (205407 => 205408)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp 2016-09-03 19:58:28 UTC (rev 205407)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp 2016-09-03 21:32:45 UTC (rev 205408)
@@ -34,6 +34,7 @@
#include "LayoutRepainter.h"
#include "MathMLElement.h"
#include "MathMLNames.h"
+#include "MathMLPresentationElement.h"
#include "RenderView.h"
#if ENABLE(DEBUG_MATH_LAYOUT)
@@ -44,7 +45,7 @@
using namespace MathMLNames;
-RenderMathMLBlock::RenderMathMLBlock(Element& container, RenderStyle&& style)
+RenderMathMLBlock::RenderMathMLBlock(MathMLPresentationElement& container, RenderStyle&& style)
: RenderBlock(container, WTFMove(style), 0)
, m_mathMLStyle(MathMLStyle::create())
{
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h (205407 => 205408)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h 2016-09-03 19:58:28 UTC (rev 205407)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h 2016-09-03 21:32:45 UTC (rev 205408)
@@ -39,10 +39,11 @@
namespace WebCore {
class RenderMathMLOperator;
+class MathMLPresentationElement;
class RenderMathMLBlock : public RenderBlock {
public:
- RenderMathMLBlock(Element&, RenderStyle&&);
+ RenderMathMLBlock(MathMLPresentationElement&, RenderStyle&&);
RenderMathMLBlock(Document&, RenderStyle&&);
virtual ~RenderMathMLBlock();
@@ -97,7 +98,7 @@
class RenderMathMLTable final : public RenderTable {
public:
- explicit RenderMathMLTable(Element& element, RenderStyle&& style)
+ explicit RenderMathMLTable(MathMLElement& element, RenderStyle&& style)
: RenderTable(element, WTFMove(style))
, m_mathMLStyle(MathMLStyle::create())
{
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp (205407 => 205408)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp 2016-09-03 19:58:28 UTC (rev 205407)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp 2016-09-03 21:32:45 UTC (rev 205408)
@@ -41,7 +41,7 @@
using namespace MathMLNames;
-RenderMathMLToken::RenderMathMLToken(Element& element, RenderStyle&& style)
+RenderMathMLToken::RenderMathMLToken(MathMLTokenElement& element, RenderStyle&& style)
: RenderMathMLBlock(element, WTFMove(style))
{
}
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h (205407 => 205408)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h 2016-09-03 19:58:28 UTC (rev 205407)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h 2016-09-03 21:32:45 UTC (rev 205408)
@@ -37,7 +37,7 @@
class RenderMathMLToken : public RenderMathMLBlock {
public:
- RenderMathMLToken(Element&, RenderStyle&&);
+ RenderMathMLToken(MathMLTokenElement&, RenderStyle&&);
RenderMathMLToken(Document&, RenderStyle&&);
MathMLTokenElement& element();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes