Changeset 203228 in webkit


Ignore:
Timestamp:
Jul 14, 2016 10:59:17 AM (8 years ago)
Author:
fred.wang@free.fr
Message:

Cleanup of MathML headers
https://bugs.webkit.org/show_bug.cgi?id=159336

Reviewed by Alex Christensen.

We do some cleanup in MathML headers:

  • Use #pragma once
  • Use final for class that are not extended.
  • Use final instead of override for virtual members that are not overridden by derived classes.
  • Try and reduce the visibility of function members to private or protected as appropriate.
  • Remove useless #include
  • Remove useless class or friendship declaration
  • Remove unused functions

No new tests, behavior is unchanged.

  • mathml/MathMLElement.h:
  • mathml/MathMLInlineContainerElement.h:
  • mathml/MathMLMathElement.h:
  • mathml/MathMLMencloseElement.h:
  • mathml/MathMLOperatorDictionary.h:
  • mathml/MathMLPaddedElement.h:
  • mathml/MathMLSelectElement.h:
  • mathml/MathMLSpaceElement.h:
  • mathml/MathMLTextElement.h:
  • rendering/mathml/MathOperator.h:
  • rendering/mathml/RenderMathMLBlock.h:
  • rendering/mathml/RenderMathMLFenced.h:
  • rendering/mathml/RenderMathMLFraction.h:
  • rendering/mathml/RenderMathMLMath.h:
  • rendering/mathml/RenderMathMLMenclose.h:
  • rendering/mathml/RenderMathMLOperator.h:
  • rendering/mathml/RenderMathMLRoot.h:
  • rendering/mathml/RenderMathMLRow.cpp:

(WebCore::RenderMathMLRow::RenderMathMLRow): Deleted. We no longer create anonymous row.

  • rendering/mathml/RenderMathMLRow.h:
  • rendering/mathml/RenderMathMLScripts.h:
  • rendering/mathml/RenderMathMLSpace.h:
  • rendering/mathml/RenderMathMLToken.h:
  • rendering/mathml/RenderMathMLUnderOver.h:
Location:
trunk/Source/WebCore
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r203225 r203228  
     12016-07-14  Frederic Wang  <fred.wang@free.fr>
     2
     3        Cleanup of MathML headers
     4        https://bugs.webkit.org/show_bug.cgi?id=159336
     5
     6        Reviewed by Alex Christensen.
     7
     8        We do some cleanup in MathML headers:
     9        - Use #pragma once
     10        - Use final for class that are not extended.
     11        - Use final instead of override for virtual members that are not overridden by derived classes.
     12        - Try and reduce the visibility of function members to private or protected as appropriate.
     13        - Remove useless #include
     14        - Remove useless class or friendship declaration
     15        - Remove unused functions
     16
     17        No new tests, behavior is unchanged.
     18
     19        * mathml/MathMLElement.h:
     20        * mathml/MathMLInlineContainerElement.h:
     21        * mathml/MathMLMathElement.h:
     22        * mathml/MathMLMencloseElement.h:
     23        * mathml/MathMLOperatorDictionary.h:
     24        * mathml/MathMLPaddedElement.h:
     25        * mathml/MathMLSelectElement.h:
     26        * mathml/MathMLSpaceElement.h:
     27        * mathml/MathMLTextElement.h:
     28        * rendering/mathml/MathOperator.h:
     29        * rendering/mathml/RenderMathMLBlock.h:
     30        * rendering/mathml/RenderMathMLFenced.h:
     31        * rendering/mathml/RenderMathMLFraction.h:
     32        * rendering/mathml/RenderMathMLMath.h:
     33        * rendering/mathml/RenderMathMLMenclose.h:
     34        * rendering/mathml/RenderMathMLOperator.h:
     35        * rendering/mathml/RenderMathMLRoot.h:
     36        * rendering/mathml/RenderMathMLRow.cpp:
     37        (WebCore::RenderMathMLRow::RenderMathMLRow): Deleted. We no longer create anonymous row.
     38        * rendering/mathml/RenderMathMLRow.h:
     39        * rendering/mathml/RenderMathMLScripts.h:
     40        * rendering/mathml/RenderMathMLSpace.h:
     41        * rendering/mathml/RenderMathMLToken.h:
     42        * rendering/mathml/RenderMathMLUnderOver.h:
     43
    1442016-07-14  Alex Christensen  <achristensen@webkit.org>
    245
  • trunk/Source/WebCore/mathml/MathMLElement.h

    r203108 r203228  
    2626 */
    2727
    28 #ifndef MathMLElement_h
    29 #define MathMLElement_h
     28#pragma once
    3029
    3130#if ENABLE(MATHML)
     
    114113
    115114#endif // ENABLE(MATHML)
    116 
    117 #endif // MathMLElement_h
  • trunk/Source/WebCore/mathml/MathMLInlineContainerElement.h

    r202960 r203228  
    2525 */
    2626
    27 #ifndef MathMLInlineContainerElement_h
    28 #define MathMLInlineContainerElement_h
     27#pragma once
    2928
    3029#if ENABLE(MATHML)
     
    3736    static Ref<MathMLInlineContainerElement> create(const QualifiedName& tagName, Document&);
    3837
    39     bool isPresentationMathML() const override { return true; }
    40 
    4138protected:
    4239    MathMLInlineContainerElement(const QualifiedName& tagName, Document&);
     
    4643private:
    4744    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
     45    bool isPresentationMathML() const final { return true; }
    4846};
    4947
     
    5149
    5250#endif // ENABLE(MATHML)
    53 #endif // MathMLInlineContainerElement_h
  • trunk/Source/WebCore/mathml/MathMLMathElement.h

    r202960 r203228  
    2525 */
    2626
    27 #ifndef MathMLMathElement_h
    28 #define MathMLMathElement_h
     27#pragma once
    2928
    3029#if ENABLE(MATHML)
     
    3332namespace WebCore {
    3433
    35 class MathMLMathElement : public MathMLInlineContainerElement {
     34class MathMLMathElement final : public MathMLInlineContainerElement {
    3635public:
    3736    static Ref<MathMLMathElement> create(const QualifiedName& tagName, Document&);
    38 
    39 protected:
    40     void didAttachRenderers() final;
    4137
    4238private:
    4339    MathMLMathElement(const QualifiedName& tagName, Document&);
    4440    void parseAttribute(const QualifiedName&, const AtomicString&) final;
     41    void didAttachRenderers() final;
    4542
    46     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
     43    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
    4744};
    4845
     
    5047
    5148#endif // ENABLE(MATHML)
    52 #endif // MathMLMathElement_h
  • trunk/Source/WebCore/mathml/MathMLMencloseElement.h

    r200041 r203228  
    2525 */
    2626
    27 #ifndef MathMLMencloseElement_h
    28 #define MathMLMencloseElement_h
     27#pragma once
    2928
    3029#if ENABLE(MATHML)
     
    3736public:
    3837    static Ref<MathMLMencloseElement> create(const QualifiedName& tagName, Document&);
    39     void parseAttribute(const QualifiedName&, const AtomicString&) final;
    4038
    4139    enum MencloseNotationFlag {
     
    6058    MathMLMencloseElement(const QualifiedName&, Document&);
    6159    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
     60    void parseAttribute(const QualifiedName&, const AtomicString&) final;
    6261    void clearNotations() { m_notationFlags = 0; }
    6362    void addNotation(MencloseNotationFlag notationFlag) { m_notationFlags |= notationFlag; }
     
    6867
    6968#endif // ENABLE(MATHML)
    70 #endif // MathMLMencloseElement_h
  • trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h

    r203116 r203228  
    2424 */
    2525
    26 #ifndef MathMLOperatorDictionary_h
    27 #define MathMLOperatorDictionary_h
     26#pragma once
    2827
    2928#if ENABLE(MATHML)
     
    5857}
    5958#endif // ENABLE(MATHML)
    60 #endif // MathMLOperatorDictionary_h
  • trunk/Source/WebCore/mathml/MathMLPaddedElement.h

    r203150 r203228  
    2424 */
    2525
    26 #ifndef MathMLPaddedElement_h
    27 #define MathMLPaddedElement_h
     26#pragma once
    2827
    2928#if ENABLE(MATHML)
     
    5655
    5756#endif // ENABLE(MATHML)
    58 #endif // MathMLPaddedElement_h
  • trunk/Source/WebCore/mathml/MathMLSelectElement.h

    r200041 r203228  
    2424 */
    2525
    26 #ifndef MathMLSelectElement_h
    27 #define MathMLSelectElement_h
     26#pragma once
    2827
    2928#if ENABLE(MATHML)
     
    4140private:
    4241    MathMLSelectElement(const QualifiedName& tagName, Document&);
    43     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
     42    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
    4443
    45     bool childShouldCreateRenderer(const Node&) const override;
     44    bool childShouldCreateRenderer(const Node&) const final;
    4645
    47     void finishParsingChildren() override;
    48     void childrenChanged(const ChildChange&) override;
    49     void attributeChanged(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue, AttributeModificationReason = ModifiedDirectly) override;
    50     void defaultEventHandler(Event*) override;
    51     bool willRespondToMouseClickEvents() override;
     46    void finishParsingChildren() final;
     47    void childrenChanged(const ChildChange&) final;
     48    void attributeChanged(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue, AttributeModificationReason = ModifiedDirectly) final;
     49    void defaultEventHandler(Event*) final;
     50    bool willRespondToMouseClickEvents() final;
    5251
    5352    void toggle();
     
    5655    Element* getSelectedSemanticsChild();
    5756
    58     void updateSelectedChild() override;
     57    void updateSelectedChild() final;
    5958    RefPtr<Element> m_selectedChild;
    6059};
     
    6362
    6463#endif // ENABLE(MATHML)
    65 #endif // MathMLSelectElement_h
  • trunk/Source/WebCore/mathml/MathMLSpaceElement.h

    r203108 r203228  
    2424 */
    2525
    26 #ifndef MathMLSpaceElement_h
    27 #define MathMLSpaceElement_h
     26#pragma once
    2827
    2928#if ENABLE(MATHML)
     
    5251
    5352#endif // ENABLE(MATHML)
    54 #endif // MathMLSpaceElement_h
  • trunk/Source/WebCore/mathml/MathMLTextElement.h

    r202727 r203228  
    2525 */
    2626
    27 #ifndef MathMLTextElement_h
    28 #define MathMLTextElement_h
     27#pragma once
    2928
    3029#if ENABLE(MATHML)
     
    3635public:
    3736    static Ref<MathMLTextElement> create(const QualifiedName& tagName, Document&);
    38     void didAttachRenderers() override;
    39 
    40     bool isPresentationMathML() const override { return true; }
    4137
    4238private:
    4339    MathMLTextElement(const QualifiedName& tagName, Document&);
    4440
    45     RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
    46     bool childShouldCreateRenderer(const Node&) const override;
     41    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
     42    bool childShouldCreateRenderer(const Node&) const final;
    4743
    48     void childrenChanged(const ChildChange&) override;
    49     void parseAttribute(const QualifiedName&, const AtomicString&) override;
     44    void childrenChanged(const ChildChange&) final;
     45    void parseAttribute(const QualifiedName&, const AtomicString&) final;
     46    void didAttachRenderers() final;
     47
     48    bool isPresentationMathML() const final { return true; }
    5049};
    5150
     
    5352
    5453#endif // ENABLE(MATHML)
    55 #endif // MathMLTextElement_h
  • trunk/Source/WebCore/rendering/mathml/MathMLStyle.h

    r203072 r203228  
    2424 */
    2525
    26 #ifndef MathMLStyle_h
    27 #define MathMLStyle_h
    2826#pragma once
    2927
     
    8785
    8886#endif // ENABLE(MATHML)
    89 #endif // MathMLStyle_h
  • trunk/Source/WebCore/rendering/mathml/MathOperator.h

    r202271 r203228  
    2424 */
    2525
    26 #ifndef MathOperator_h
    27 #define MathOperator_h
     26#pragma once
    2827
    2928#if ENABLE(MATHML)
     
    105104
    106105#endif // ENABLE(MATHML)
    107 #endif // MathOperator_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h

    r203106 r203228  
    2525 */
    2626
    27 #ifndef RenderMathMLBlock_h
    28 #define RenderMathMLBlock_h
     27#pragma once
    2928
    3029#if ENABLE(MATHML)
     
    105104    }
    106105
    107     Optional<int> firstLineBaseline() const override;
    108106
    109107    MathMLStyle* mathMLStyle() const { return const_cast<MathMLStyle*>(&m_mathMLStyle.get()); }
    110108
    111109private:
    112     bool isRenderMathMLTable() const override { return true; }
    113     const char* renderName() const override { return "RenderMathMLTable"; }
     110    bool isRenderMathMLTable() const final { return true; }
     111    const char* renderName() const final { return "RenderMathMLTable"; }
     112    Optional<int> firstLineBaseline() const final;
    114113
    115114    Ref<MathMLStyle> m_mathMLStyle;
     
    126125
    127126#endif // ENABLE(MATHML)
    128 #endif // RenderMathMLBlock_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h

    r202727 r203228  
    2424 */
    2525
    26 #ifndef RenderMathMLFenced_h
    27 #define RenderMathMLFenced_h
     26#pragma once
    2827
    2928#if ENABLE(MATHML)
     
    4140
    4241private:
    43     bool isRenderMathMLFenced() const override { return true; }
    44     const char* renderName() const override { return "RenderMathMLFenced"; }
    45     void addChild(RenderObject* child, RenderObject* beforeChild) override;
    46     void updateFromElement() override;
     42    bool isRenderMathMLFenced() const final { return true; }
     43    const char* renderName() const final { return "RenderMathMLFenced"; }
     44    void addChild(RenderObject* child, RenderObject* beforeChild) final;
     45    void updateFromElement() final;
    4746
    4847    RenderPtr<RenderMathMLOperator> createMathMLOperator(const String& operatorString, MathMLOperatorDictionary::Form, MathMLOperatorDictionary::Flag);
     
    5958
    6059#endif // ENABLE(MATHML)
    61 
    62 #endif // RenderMathMLFenced_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.h

    r203073 r203228  
    2626 */
    2727
    28 #ifndef RenderMathMLFraction_h
    29 #define RenderMathMLFraction_h
     28#pragma once
    3029
    3130#if ENABLE(MATHML)
     
    4342    float relativeLineThickness() const { return m_defaultLineThickness ? m_lineThickness / m_defaultLineThickness : LayoutUnit(0); }
    4443
    45     void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    4644    void updateFromElement() final;
    47 
    48 protected:
    49     void computePreferredLogicalWidths() final;
    5045
    5146private:
     
    5348    const char* renderName() const final { return "RenderMathMLFraction"; }
    5449
     50    void computePreferredLogicalWidths() final;
     51    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    5552    Optional<int> firstLineBaseline() const final;
    5653    void paint(PaintInfo&, const LayoutPoint&) final;
     
    9592
    9693#endif // ENABLE(MATHML)
    97 
    98 #endif // RenderMathMLFraction_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLMath.h

    r202727 r203228  
    2424 */
    2525
    26 #ifndef RenderMathMLMath_h
    27 #define RenderMathMLMath_h
     26#pragma once
    2827
    2928#if ENABLE(MATHML)
     
    3837
    3938private:
    40     bool isRenderMathMLMath() const override { return true; }
    41     const char* renderName() const override { return "RenderMathMLMath"; }
     39    bool isRenderMathMLMath() const final { return true; }
     40    const char* renderName() const final { return "RenderMathMLMath"; }
    4241};
    4342
     
    4746
    4847#endif // ENABLE(MATHML)
    49 #endif // RenderMathMLMath_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.h

    r202727 r203228  
    2525 */
    2626
    27 #ifndef RenderMathMLMenclose_h
    28 #define RenderMathMLMenclose_h
     27#pragma once
    2928
    3029#if ENABLE(MATHML)
     
    5958
    6059#endif // ENABLE(MATHML)
    61 #endif // RenderMathMLMenclose_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h

    r202970 r203228  
    2424 */
    2525
    26 #ifndef RenderMathMLOperator_h
    27 #define RenderMathMLOperator_h
     26#pragma once
    2827
    2928#if ENABLE(MATHML)
    3029
    31 #include "Font.h"
    32 #include "GlyphPage.h"
    3330#include "MathMLElement.h"
    3431#include "MathMLOperatorDictionary.h"
    3532#include "MathOperator.h"
    36 #include "OpenTypeMathData.h"
    3733#include "RenderMathMLToken.h"
    3834
    3935namespace WebCore {
    4036
    41 class RenderMathMLOperator : public RenderMathMLToken {
     37class RenderMathMLOperator final : public RenderMathMLToken {
    4238public:
    4339    RenderMathMLOperator(MathMLElement&, RenderStyle&&);
     
    5551    LayoutUnit italicCorrection() const { return m_mathOperator.italicCorrection(); }
    5652
    57     void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
    58 
    59     void paint(PaintInfo&, const LayoutPoint&) final;
    60 
    6153    void updateTokenContent(const String& operatorString);
    6254    void updateTokenContent() final;
     
    6557    UChar textContent() const { return m_textContent; }
    6658
    67 protected:
     59private:
    6860    virtual void setOperatorProperties();
     61    void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
    6962    void computePreferredLogicalWidths() final;
    7063    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
     64    void paint(PaintInfo&, const LayoutPoint&) final;
     65
    7166    void setLeadingSpace(LayoutUnit leadingSpace) { m_leadingSpace = leadingSpace; }
    7267    void setTrailingSpace(LayoutUnit trailingSpace) { m_trailingSpace = trailingSpace; }
    7368
    74 private:
    75     const char* renderName() const override { return isAnonymous() ? "RenderMathMLOperator (anonymous)" : "RenderMathMLOperator"; }
     69    const char* renderName() const final { return isAnonymous() ? "RenderMathMLOperator (anonymous)" : "RenderMathMLOperator"; }
    7670    void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;
    7771    bool isRenderMathMLOperator() const final { return true; }
     
    110104
    111105#endif // ENABLE(MATHML)
    112 #endif // RenderMathMLOperator_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLPadded.h

    r203150 r203228  
    2424 */
    2525
    26 #ifndef RenderMathMLPadded_h
    27 #define RenderMathMLPadded_h
    2826#pragma once
    2927
     
    6260
    6361#endif // ENABLE(MATHML)
    64 #endif // RenderMathMLPadded_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h

    r202960 r203228  
    2525 */
    2626
    27 #ifndef RenderMathMLRoot_h
    28 #define RenderMathMLRoot_h
     27#pragma once
    2928
    3029#if ENABLE(MATHML)
     
    3635namespace WebCore {
    3736
    38 class RenderMathMLMenclose;
    39 
    4037// Render base^(1/index), or sqrt(base) using radical notation.
    41 class RenderMathMLRoot : public RenderMathMLRow {
    42 
    43 friend class RenderMathMLRootWrapper;
     38class RenderMathMLRoot final : public RenderMathMLRow {
    4439
    4540public:
    4641    RenderMathMLRoot(Element&, RenderStyle&&);
    47     void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
    4842    void updateFromElement() final;
    49 
    50     void computePreferredLogicalWidths() final;
    51     void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    5243    void updateStyle();
    53 
    54 protected:
    55     void paint(PaintInfo&, const LayoutPoint&) final;
    5644
    5745private:
     
    6149    bool isRenderMathMLRoot() const final { return true; }
    6250    const char* renderName() const final { return "RenderMathMLRoot"; }
     51
     52    void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
     53
     54    void computePreferredLogicalWidths() final;
     55    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
     56    void paint(PaintInfo&, const LayoutPoint&) final;
    6357
    6458    MathOperator m_radicalOperator;
     
    8276
    8377#endif // ENABLE(MATHML)
    84 
    85 #endif // RenderMathMLRoot_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp

    r202934 r203228  
    4242RenderMathMLRow::RenderMathMLRow(Element& element, RenderStyle&& style)
    4343    : RenderMathMLBlock(element, WTFMove(style))
    44 {
    45 }
    46 
    47 RenderMathMLRow::RenderMathMLRow(Document& document, RenderStyle&& style)
    48     : RenderMathMLBlock(document, WTFMove(style))
    4944{
    5045}
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h

    r202934 r203228  
    2525 */
    2626
    27 #ifndef RenderMathMLRow_h
    28 #define RenderMathMLRow_h
     27#pragma once
    2928
    3029#if ENABLE(MATHML)
     
    3433namespace WebCore {
    3534
    36 class RenderMathMLRoot;
    37 
    3835class RenderMathMLRow : public RenderMathMLBlock {
    3936public:
    4037    RenderMathMLRow(Element&, RenderStyle&&);
    41     RenderMathMLRow(Document&, RenderStyle&&);
    4238
    4339    void updateOperatorProperties();
    4440
     41protected:
    4542    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
    4643    Optional<int> firstLineBaseline() const override;
    4744
    48 protected:
    4945    void layoutRowItems(LayoutUnit& ascent, LayoutUnit& descent);
    5046    void computeLineVerticalStretch(LayoutUnit& ascent, LayoutUnit& descent);
     
    6157
    6258#endif // ENABLE(MATHML)
    63 #endif // RenderMathMLRow_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h

    r202970 r203228  
    2626 */
    2727
    28 #ifndef RenderMathMLScripts_h
    29 #define RenderMathMLScripts_h
     28#pragma once
    3029
    3130#if ENABLE(MATHML)
     
    3938    RenderMathMLScripts(Element&, RenderStyle&&);
    4039    RenderMathMLOperator* unembellishedOperator() final;
    41     Optional<int> firstLineBaseline() const final;
    42     void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
    4340
    4441protected:
     
    4643    const char* renderName() const override { return "RenderMathMLScripts"; }
    4744    void computePreferredLogicalWidths() override;
     45    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
    4846
    4947    enum ScriptsType { Sub, Super, SubSup, Multiscripts, Under, Over, UnderOver };
     
    5149
    5250private:
     51    Optional<int> firstLineBaseline() const final;
    5352    bool getBaseAndScripts(RenderBox*& base, RenderBox*& firstPostScript, RenderBox*& firstPreScript);
    5453    LayoutUnit spaceAfterScript();
     
    6261
    6362#endif // ENABLE(MATHML)
    64 
    65 #endif // RenderMathMLScripts_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLSpace.h

    r203108 r203228  
    2424 */
    2525
    26 #ifndef RenderMathMLSpace_h
    27 #define RenderMathMLSpace_h
     26#pragma once
    2827
    2928#if ENABLE(MATHML)
     
    5655
    5756#endif // ENABLE(MATHML)
    58 #endif // RenderMathMLSpace_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h

    r202727 r203228  
    2525 */
    2626
    27 #ifndef RenderMathMLToken_h
    28 #define RenderMathMLToken_h
     27#pragma once
    2928
    3029#if ENABLE(MATHML)
     
    3231#include "MathMLTextElement.h"
    3332#include "RenderMathMLBlock.h"
    34 #include "RenderText.h"
    3533
    3634namespace WebCore {
     
    4341    MathMLTextElement& element() { return static_cast<MathMLTextElement&>(nodeForNonAnonymous()); }
    4442
    45     bool isChildAllowed(const RenderObject&, const RenderStyle&) const override { return true; };
    4643    virtual void updateTokenContent();
    4744    void updateFromElement() override;
    4845
     46protected:
    4947    void paint(PaintInfo&, const LayoutPoint&) override;
    5048    void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) override;
     
    5654    bool isRenderMathMLToken() const final { return true; }
    5755    const char* renderName() const override { return "RenderMathMLToken"; }
     56    bool isChildAllowed(const RenderObject&, const RenderStyle&) const final { return true; };
    5857    void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
    5958    void updateMathVariantGlyph();
     
    7271
    7372#endif // ENABLE(MATHML)
    74 #endif // RenderMathMLToken_h
  • trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h

    r203074 r203228  
    2525 */
    2626
    27 #ifndef RenderMathMLUnderOver_h
    28 #define RenderMathMLUnderOver_h
     27#pragma once
    2928
    3029#if ENABLE(MATHML)
     
    3736public:
    3837    RenderMathMLUnderOver(Element&, RenderStyle&&);
    39     void computePreferredLogicalWidths() final;
    40     void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    4138
    4239private:
    4340    bool isRenderMathMLScripts() const final { return false; }
    44     bool isRenderMathMLUnderOver() const override { return true; }
    45     const char* renderName() const override { return "RenderMathMLUnderOver"; }
     41    bool isRenderMathMLUnderOver() const final { return true; }
     42    const char* renderName() const final { return "RenderMathMLUnderOver"; }
     43
     44    void computePreferredLogicalWidths() final;
     45    void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
    4646
    4747    void computeOperatorsHorizontalStretch();
     
    6262
    6363#endif // ENABLE(MATHML)
    64 
    65 #endif // RenderMathMLUnderOver_h
Note: See TracChangeset for help on using the changeset viewer.