Changeset 205408 in webkit


Ignore:
Timestamp:
Sep 3, 2016 2:32:45 PM (8 years ago)
Author:
commit-queue@webkit.org
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 <fwang@igalia.com> 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:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r205407 r205408  
     12016-09-03  Frédéric Wang  <fwang@igalia.com>
     2
     3        Constructors of MathML renderers should only accept MathMLPresentationElement-derived classes
     4        https://bugs.webkit.org/show_bug.cgi?id=161378
     5
     6        Reviewed by Darin Adler.
     7
     8        We update constructors of RenderMathMLBlock, to only accept MathMLPresentationElement
     9        instances as a parameter. Similarly, we make the constructor of RenderMathMLToken only
     10        accept MathMLTokenElement instances.
     11
     12        No new tests, behavior is unchanged.
     13
     14        * rendering/mathml/RenderMathMLBlock.cpp:
     15        (WebCore::RenderMathMLBlock::RenderMathMLBlock):
     16        * rendering/mathml/RenderMathMLBlock.h:
     17        * rendering/mathml/RenderMathMLToken.cpp:
     18        (WebCore::RenderMathMLToken::RenderMathMLToken):
     19        * rendering/mathml/RenderMathMLToken.h:
     20
    1212016-09-03  Brian Weinstein  <bweinstein@apple.com>
    222
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp

    r204885 r205408  
    3535#include "MathMLElement.h"
    3636#include "MathMLNames.h"
     37#include "MathMLPresentationElement.h"
    3738#include "RenderView.h"
    3839
     
    4546using namespace MathMLNames;
    4647
    47 RenderMathMLBlock::RenderMathMLBlock(Element& container, RenderStyle&& style)
     48RenderMathMLBlock::RenderMathMLBlock(MathMLPresentationElement& container, RenderStyle&& style)
    4849    : RenderBlock(container, WTFMove(style), 0)
    4950    , m_mathMLStyle(MathMLStyle::create())
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h

    r204038 r205408  
    4040
    4141class RenderMathMLOperator;
     42class MathMLPresentationElement;
    4243
    4344class RenderMathMLBlock : public RenderBlock {
    4445public:
    45     RenderMathMLBlock(Element&, RenderStyle&&);
     46    RenderMathMLBlock(MathMLPresentationElement&, RenderStyle&&);
    4647    RenderMathMLBlock(Document&, RenderStyle&&);
    4748    virtual ~RenderMathMLBlock();
     
    9899class RenderMathMLTable final : public RenderTable {
    99100public:
    100     explicit RenderMathMLTable(Element& element, RenderStyle&& style)
     101    explicit RenderMathMLTable(MathMLElement& element, RenderStyle&& style)
    101102        : RenderTable(element, WTFMove(style))
    102103        , m_mathMLStyle(MathMLStyle::create())
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.cpp

    r205031 r205408  
    4242using namespace MathMLNames;
    4343
    44 RenderMathMLToken::RenderMathMLToken(Element& element, RenderStyle&& style)
     44RenderMathMLToken::RenderMathMLToken(MathMLTokenElement& element, RenderStyle&& style)
    4545    : RenderMathMLBlock(element, WTFMove(style))
    4646{
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h

    r205031 r205408  
    3838class RenderMathMLToken : public RenderMathMLBlock {
    3939public:
    40     RenderMathMLToken(Element&, RenderStyle&&);
     40    RenderMathMLToken(MathMLTokenElement&, RenderStyle&&);
    4141    RenderMathMLToken(Document&, RenderStyle&&);
    4242
Note: See TracChangeset for help on using the changeset viewer.