Diff
Modified: trunk/Source/WebCore/ChangeLog (203227 => 203228)
--- trunk/Source/WebCore/ChangeLog 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/ChangeLog 2016-07-14 17:59:17 UTC (rev 203228)
@@ -1,3 +1,46 @@
+2016-07-14 Frederic Wang <[email protected]>
+
+ 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:
+
2016-07-14 Alex Christensen <[email protected]>
Pass SessionID to WebSocketHandle constructor
Modified: trunk/Source/WebCore/mathml/MathMLElement.h (203227 => 203228)
--- trunk/Source/WebCore/mathml/MathMLElement.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/mathml/MathMLElement.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -25,8 +25,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathMLElement_h
-#define MathMLElement_h
+#pragma once
#if ENABLE(MATHML)
@@ -113,5 +112,3 @@
#include "MathMLElementTypeHelpers.h"
#endif // ENABLE(MATHML)
-
-#endif // MathMLElement_h
Modified: trunk/Source/WebCore/mathml/MathMLInlineContainerElement.h (203227 => 203228)
--- trunk/Source/WebCore/mathml/MathMLInlineContainerElement.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/mathml/MathMLInlineContainerElement.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -24,8 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathMLInlineContainerElement_h
-#define MathMLInlineContainerElement_h
+#pragma once
#if ENABLE(MATHML)
#include "MathMLElement.h"
@@ -36,8 +35,6 @@
public:
static Ref<MathMLInlineContainerElement> create(const QualifiedName& tagName, Document&);
- bool isPresentationMathML() const override { return true; }
-
protected:
MathMLInlineContainerElement(const QualifiedName& tagName, Document&);
void childrenChanged(const ChildChange&) override;
@@ -45,9 +42,9 @@
private:
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
+ bool isPresentationMathML() const final { return true; }
};
}
#endif // ENABLE(MATHML)
-#endif // MathMLInlineContainerElement_h
Modified: trunk/Source/WebCore/mathml/MathMLMathElement.h (203227 => 203228)
--- trunk/Source/WebCore/mathml/MathMLMathElement.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/mathml/MathMLMathElement.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -24,8 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathMLMathElement_h
-#define MathMLMathElement_h
+#pragma once
#if ENABLE(MATHML)
#include "MathMLInlineContainerElement.h"
@@ -32,21 +31,18 @@
namespace WebCore {
-class MathMLMathElement : public MathMLInlineContainerElement {
+class MathMLMathElement final : public MathMLInlineContainerElement {
public:
static Ref<MathMLMathElement> create(const QualifiedName& tagName, Document&);
-protected:
- void didAttachRenderers() final;
-
private:
MathMLMathElement(const QualifiedName& tagName, Document&);
void parseAttribute(const QualifiedName&, const AtomicString&) final;
+ void didAttachRenderers() final;
- RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
+ RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
};
}
#endif // ENABLE(MATHML)
-#endif // MathMLMathElement_h
Modified: trunk/Source/WebCore/mathml/MathMLMencloseElement.h (203227 => 203228)
--- trunk/Source/WebCore/mathml/MathMLMencloseElement.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/mathml/MathMLMencloseElement.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -24,8 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathMLMencloseElement_h
-#define MathMLMencloseElement_h
+#pragma once
#if ENABLE(MATHML)
#include "Element.h"
@@ -36,7 +35,6 @@
class MathMLMencloseElement final: public MathMLInlineContainerElement {
public:
static Ref<MathMLMencloseElement> create(const QualifiedName& tagName, Document&);
- void parseAttribute(const QualifiedName&, const AtomicString&) final;
enum MencloseNotationFlag {
LongDiv = 1 << 1,
@@ -59,6 +57,7 @@
private:
MathMLMencloseElement(const QualifiedName&, Document&);
RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
+ void parseAttribute(const QualifiedName&, const AtomicString&) final;
void clearNotations() { m_notationFlags = 0; }
void addNotation(MencloseNotationFlag notationFlag) { m_notationFlags |= notationFlag; }
unsigned short m_notationFlags;
@@ -67,4 +66,3 @@
}
#endif // ENABLE(MATHML)
-#endif // MathMLMencloseElement_h
Modified: trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h (203227 => 203228)
--- trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathMLOperatorDictionary_h
-#define MathMLOperatorDictionary_h
+#pragma once
#if ENABLE(MATHML)
@@ -57,4 +56,3 @@
}
#endif // ENABLE(MATHML)
-#endif // MathMLOperatorDictionary_h
Modified: trunk/Source/WebCore/mathml/MathMLPaddedElement.h (203227 => 203228)
--- trunk/Source/WebCore/mathml/MathMLPaddedElement.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/mathml/MathMLPaddedElement.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathMLPaddedElement_h
-#define MathMLPaddedElement_h
+#pragma once
#if ENABLE(MATHML)
#include "MathMLInlineContainerElement.h"
@@ -55,4 +54,3 @@
}
#endif // ENABLE(MATHML)
-#endif // MathMLPaddedElement_h
Modified: trunk/Source/WebCore/mathml/MathMLSelectElement.h (203227 => 203228)
--- trunk/Source/WebCore/mathml/MathMLSelectElement.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/mathml/MathMLSelectElement.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathMLSelectElement_h
-#define MathMLSelectElement_h
+#pragma once
#if ENABLE(MATHML)
#include "MathMLInlineContainerElement.h"
@@ -40,15 +39,15 @@
private:
MathMLSelectElement(const QualifiedName& tagName, Document&);
- RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
+ RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
- bool childShouldCreateRenderer(const Node&) const override;
+ bool childShouldCreateRenderer(const Node&) const final;
- void finishParsingChildren() override;
- void childrenChanged(const ChildChange&) override;
- void attributeChanged(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue, AttributeModificationReason = ModifiedDirectly) override;
- void defaultEventHandler(Event*) override;
- bool willRespondToMouseClickEvents() override;
+ void finishParsingChildren() final;
+ void childrenChanged(const ChildChange&) final;
+ void attributeChanged(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue, AttributeModificationReason = ModifiedDirectly) final;
+ void defaultEventHandler(Event*) final;
+ bool willRespondToMouseClickEvents() final;
void toggle();
int getSelectedActionChildAndIndex(Element*& selectedChild);
@@ -55,7 +54,7 @@
Element* getSelectedActionChild();
Element* getSelectedSemanticsChild();
- void updateSelectedChild() override;
+ void updateSelectedChild() final;
RefPtr<Element> m_selectedChild;
};
@@ -62,4 +61,3 @@
}
#endif // ENABLE(MATHML)
-#endif // MathMLSelectElement_h
Modified: trunk/Source/WebCore/mathml/MathMLSpaceElement.h (203227 => 203228)
--- trunk/Source/WebCore/mathml/MathMLSpaceElement.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/mathml/MathMLSpaceElement.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathMLSpaceElement_h
-#define MathMLSpaceElement_h
+#pragma once
#if ENABLE(MATHML)
#include "MathMLElement.h"
@@ -51,4 +50,3 @@
}
#endif // ENABLE(MATHML)
-#endif // MathMLSpaceElement_h
Modified: trunk/Source/WebCore/mathml/MathMLTextElement.h (203227 => 203228)
--- trunk/Source/WebCore/mathml/MathMLTextElement.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/mathml/MathMLTextElement.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -24,8 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathMLTextElement_h
-#define MathMLTextElement_h
+#pragma once
#if ENABLE(MATHML)
#include "MathMLElement.h"
@@ -35,21 +34,20 @@
class MathMLTextElement final : public MathMLElement {
public:
static Ref<MathMLTextElement> create(const QualifiedName& tagName, Document&);
- void didAttachRenderers() override;
- bool isPresentationMathML() const override { return true; }
-
private:
MathMLTextElement(const QualifiedName& tagName, Document&);
- RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) override;
- bool childShouldCreateRenderer(const Node&) const override;
+ RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;
+ bool childShouldCreateRenderer(const Node&) const final;
- void childrenChanged(const ChildChange&) override;
- void parseAttribute(const QualifiedName&, const AtomicString&) override;
+ void childrenChanged(const ChildChange&) final;
+ void parseAttribute(const QualifiedName&, const AtomicString&) final;
+ void didAttachRenderers() final;
+
+ bool isPresentationMathML() const final { return true; }
};
}
#endif // ENABLE(MATHML)
-#endif // MathMLTextElement_h
Modified: trunk/Source/WebCore/rendering/mathml/MathMLStyle.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/MathMLStyle.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/MathMLStyle.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,8 +23,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathMLStyle_h
-#define MathMLStyle_h
#pragma once
#if ENABLE(MATHML)
@@ -86,4 +84,3 @@
}
#endif // ENABLE(MATHML)
-#endif // MathMLStyle_h
Modified: trunk/Source/WebCore/rendering/mathml/MathOperator.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/MathOperator.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/MathOperator.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MathOperator_h
-#define MathOperator_h
+#pragma once
#if ENABLE(MATHML)
#include "GlyphPage.h"
@@ -104,4 +103,3 @@
}
#endif // ENABLE(MATHML)
-#endif // MathOperator_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLBlock.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -24,8 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLBlock_h
-#define RenderMathMLBlock_h
+#pragma once
#if ENABLE(MATHML)
@@ -104,13 +103,13 @@
{
}
- Optional<int> firstLineBaseline() const override;
MathMLStyle* mathMLStyle() const { return const_cast<MathMLStyle*>(&m_mathMLStyle.get()); }
private:
- bool isRenderMathMLTable() const override { return true; }
- const char* renderName() const override { return "RenderMathMLTable"; }
+ bool isRenderMathMLTable() const final { return true; }
+ const char* renderName() const final { return "RenderMathMLTable"; }
+ Optional<int> firstLineBaseline() const final;
Ref<MathMLStyle> m_mathMLStyle;
};
@@ -125,4 +124,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLTable, isRenderMathMLTable())
#endif // ENABLE(MATHML)
-#endif // RenderMathMLBlock_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLFenced.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLFenced_h
-#define RenderMathMLFenced_h
+#pragma once
#if ENABLE(MATHML)
@@ -40,10 +39,10 @@
MathMLInlineContainerElement& element() { return static_cast<MathMLInlineContainerElement&>(nodeForNonAnonymous()); }
private:
- bool isRenderMathMLFenced() const override { return true; }
- const char* renderName() const override { return "RenderMathMLFenced"; }
- void addChild(RenderObject* child, RenderObject* beforeChild) override;
- void updateFromElement() override;
+ bool isRenderMathMLFenced() const final { return true; }
+ const char* renderName() const final { return "RenderMathMLFenced"; }
+ void addChild(RenderObject* child, RenderObject* beforeChild) final;
+ void updateFromElement() final;
RenderPtr<RenderMathMLOperator> createMathMLOperator(const String& operatorString, MathMLOperatorDictionary::Form, MathMLOperatorDictionary::Flag);
void makeFences();
@@ -58,5 +57,3 @@
}
#endif // ENABLE(MATHML)
-
-#endif // RenderMathMLFenced_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLFraction.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -25,8 +25,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLFraction_h
-#define RenderMathMLFraction_h
+#pragma once
#if ENABLE(MATHML)
@@ -42,16 +41,14 @@
MathMLInlineContainerElement& element() { return static_cast<MathMLInlineContainerElement&>(nodeForNonAnonymous()); }
float relativeLineThickness() const { return m_defaultLineThickness ? m_lineThickness / m_defaultLineThickness : LayoutUnit(0); }
- void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
void updateFromElement() final;
-protected:
- void computePreferredLogicalWidths() final;
-
private:
bool isRenderMathMLFraction() const final { return true; }
const char* renderName() const final { return "RenderMathMLFraction"; }
+ void computePreferredLogicalWidths() final;
+ void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
Optional<int> firstLineBaseline() const final;
void paint(PaintInfo&, const LayoutPoint&) final;
RenderMathMLOperator* unembellishedOperator() final;
@@ -94,5 +91,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLFraction, isRenderMathMLFraction())
#endif // ENABLE(MATHML)
-
-#endif // RenderMathMLFraction_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLMath.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLMath.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLMath.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLMath_h
-#define RenderMathMLMath_h
+#pragma once
#if ENABLE(MATHML)
@@ -37,8 +36,8 @@
RenderMathMLMath(Element&, RenderStyle&&);
private:
- bool isRenderMathMLMath() const override { return true; }
- const char* renderName() const override { return "RenderMathMLMath"; }
+ bool isRenderMathMLMath() const final { return true; }
+ const char* renderName() const final { return "RenderMathMLMath"; }
};
}
@@ -46,4 +45,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLMath, isRenderMathMLMath())
#endif // ENABLE(MATHML)
-#endif // RenderMathMLMath_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLMenclose.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -24,8 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLMenclose_h
-#define RenderMathMLMenclose_h
+#pragma once
#if ENABLE(MATHML)
#include "MathMLMencloseElement.h"
@@ -58,4 +57,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLMenclose, isRenderMathMLMenclose())
#endif // ENABLE(MATHML)
-#endif // RenderMathMLMenclose_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLOperator.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,22 +23,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLOperator_h
-#define RenderMathMLOperator_h
+#pragma once
#if ENABLE(MATHML)
-#include "Font.h"
-#include "GlyphPage.h"
#include "MathMLElement.h"
#include "MathMLOperatorDictionary.h"
#include "MathOperator.h"
-#include "OpenTypeMathData.h"
#include "RenderMathMLToken.h"
namespace WebCore {
-class RenderMathMLOperator : public RenderMathMLToken {
+class RenderMathMLOperator final : public RenderMathMLToken {
public:
RenderMathMLOperator(MathMLElement&, RenderStyle&&);
RenderMathMLOperator(Document&, RenderStyle&&, const String& operatorString, MathMLOperatorDictionary::Form, unsigned short flags = 0);
@@ -54,10 +50,6 @@
bool isVertical() const { return m_isVertical; }
LayoutUnit italicCorrection() const { return m_mathOperator.italicCorrection(); }
- void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
-
- void paint(PaintInfo&, const LayoutPoint&) final;
-
void updateTokenContent(const String& operatorString);
void updateTokenContent() final;
void updateOperatorProperties();
@@ -64,15 +56,17 @@
void updateFromElement() final;
UChar textContent() const { return m_textContent; }
-protected:
+private:
virtual void setOperatorProperties();
+ void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
void computePreferredLogicalWidths() final;
void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
+ void paint(PaintInfo&, const LayoutPoint&) final;
+
void setLeadingSpace(LayoutUnit leadingSpace) { m_leadingSpace = leadingSpace; }
void setTrailingSpace(LayoutUnit trailingSpace) { m_trailingSpace = trailingSpace; }
-private:
- const char* renderName() const override { return isAnonymous() ? "RenderMathMLOperator (anonymous)" : "RenderMathMLOperator"; }
+ const char* renderName() const final { return isAnonymous() ? "RenderMathMLOperator (anonymous)" : "RenderMathMLOperator"; }
void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) final;
bool isRenderMathMLOperator() const final { return true; }
// The following operators are invisible: U+2061 FUNCTION APPLICATION, U+2062 INVISIBLE TIMES, U+2063 INVISIBLE SEPARATOR, U+2064 INVISIBLE PLUS.
@@ -109,4 +103,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLOperator, isRenderMathMLOperator())
#endif // ENABLE(MATHML)
-#endif // RenderMathMLOperator_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLPadded.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLPadded.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLPadded.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,8 +23,6 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLPadded_h
-#define RenderMathMLPadded_h
#pragma once
#if ENABLE(MATHML)
@@ -61,4 +59,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLPadded, isRenderMathMLPadded())
#endif // ENABLE(MATHML)
-#endif // RenderMathMLPadded_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRoot.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -24,8 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLRoot_h
-#define RenderMathMLRoot_h
+#pragma once
#if ENABLE(MATHML)
@@ -35,25 +34,14 @@
namespace WebCore {
-class RenderMathMLMenclose;
-
// Render base^(1/index), or sqrt(base) using radical notation.
-class RenderMathMLRoot : public RenderMathMLRow {
+class RenderMathMLRoot final : public RenderMathMLRow {
-friend class RenderMathMLRootWrapper;
-
public:
RenderMathMLRoot(Element&, RenderStyle&&);
- void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
void updateFromElement() final;
-
- void computePreferredLogicalWidths() final;
- void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
void updateStyle();
-protected:
- void paint(PaintInfo&, const LayoutPoint&) final;
-
private:
bool isValid() const;
RenderBox& getBase() const;
@@ -61,6 +49,12 @@
bool isRenderMathMLRoot() const final { return true; }
const char* renderName() const final { return "RenderMathMLRoot"; }
+ void styleDidChange(StyleDifference, const RenderStyle* oldStyle) final;
+
+ void computePreferredLogicalWidths() final;
+ void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
+ void paint(PaintInfo&, const LayoutPoint&) final;
+
MathOperator m_radicalOperator;
LayoutUnit m_verticalGap;
LayoutUnit m_ruleThickness;
@@ -81,5 +75,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLRoot, isRenderMathMLRoot())
#endif // ENABLE(MATHML)
-
-#endif // RenderMathMLRoot_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.cpp 2016-07-14 17:59:17 UTC (rev 203228)
@@ -44,11 +44,6 @@
{
}
-RenderMathMLRow::RenderMathMLRow(Document& document, RenderStyle&& style)
- : RenderMathMLBlock(document, WTFMove(style))
-{
-}
-
void RenderMathMLRow::updateOperatorProperties()
{
for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLRow.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -24,8 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLRow_h
-#define RenderMathMLRow_h
+#pragma once
#if ENABLE(MATHML)
@@ -33,19 +32,16 @@
namespace WebCore {
-class RenderMathMLRoot;
-
class RenderMathMLRow : public RenderMathMLBlock {
public:
RenderMathMLRow(Element&, RenderStyle&&);
- RenderMathMLRow(Document&, RenderStyle&&);
void updateOperatorProperties();
+protected:
void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
Optional<int> firstLineBaseline() const override;
-protected:
void layoutRowItems(LayoutUnit& ascent, LayoutUnit& descent);
void computeLineVerticalStretch(LayoutUnit& ascent, LayoutUnit& descent);
void computePreferredLogicalWidths() override;
@@ -60,4 +56,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLRow, isRenderMathMLRow())
#endif // ENABLE(MATHML)
-#endif // RenderMathMLRow_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLScripts.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -25,8 +25,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLScripts_h
-#define RenderMathMLScripts_h
+#pragma once
#if ENABLE(MATHML)
@@ -38,18 +37,18 @@
public:
RenderMathMLScripts(Element&, RenderStyle&&);
RenderMathMLOperator* unembellishedOperator() final;
- Optional<int> firstLineBaseline() const final;
- void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
protected:
bool isRenderMathMLScripts() const override { return true; }
const char* renderName() const override { return "RenderMathMLScripts"; }
void computePreferredLogicalWidths() override;
+ void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) override;
enum ScriptsType { Sub, Super, SubSup, Multiscripts, Under, Over, UnderOver };
ScriptsType m_scriptType;
private:
+ Optional<int> firstLineBaseline() const final;
bool getBaseAndScripts(RenderBox*& base, RenderBox*& firstPostScript, RenderBox*& firstPreScript);
LayoutUnit spaceAfterScript();
LayoutUnit italicCorrection(RenderBox* base);
@@ -61,5 +60,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLScripts, isRenderMathMLScripts())
#endif // ENABLE(MATHML)
-
-#endif // RenderMathMLScripts_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLSpace.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLSpace.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLSpace.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -23,8 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLSpace_h
-#define RenderMathMLSpace_h
+#pragma once
#if ENABLE(MATHML)
@@ -55,4 +54,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLSpace, isRenderMathMLSpace())
#endif // ENABLE(MATHML)
-#endif // RenderMathMLSpace_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLToken.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -24,14 +24,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLToken_h
-#define RenderMathMLToken_h
+#pragma once
#if ENABLE(MATHML)
#include "MathMLTextElement.h"
#include "RenderMathMLBlock.h"
-#include "RenderText.h"
namespace WebCore {
@@ -42,10 +40,10 @@
MathMLTextElement& element() { return static_cast<MathMLTextElement&>(nodeForNonAnonymous()); }
- bool isChildAllowed(const RenderObject&, const RenderStyle&) const override { return true; };
virtual void updateTokenContent();
void updateFromElement() override;
+protected:
void paint(PaintInfo&, const LayoutPoint&) override;
void paintChildren(PaintInfo& forSelf, const LayoutPoint&, PaintInfo& forChild, bool usePrintRect) override;
Optional<int> firstLineBaseline() const override;
@@ -55,6 +53,7 @@
private:
bool isRenderMathMLToken() const final { return true; }
const char* renderName() const override { return "RenderMathMLToken"; }
+ bool isChildAllowed(const RenderObject&, const RenderStyle&) const final { return true; };
void styleDidChange(StyleDifference, const RenderStyle* oldStyle) override;
void updateMathVariantGlyph();
void setMathVariantGlyphDirty()
@@ -71,4 +70,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLToken, isRenderMathMLToken())
#endif // ENABLE(MATHML)
-#endif // RenderMathMLToken_h
Modified: trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h (203227 => 203228)
--- trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h 2016-07-14 17:50:46 UTC (rev 203227)
+++ trunk/Source/WebCore/rendering/mathml/RenderMathMLUnderOver.h 2016-07-14 17:59:17 UTC (rev 203228)
@@ -24,8 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RenderMathMLUnderOver_h
-#define RenderMathMLUnderOver_h
+#pragma once
#if ENABLE(MATHML)
@@ -36,14 +35,15 @@
class RenderMathMLUnderOver final : public RenderMathMLScripts {
public:
RenderMathMLUnderOver(Element&, RenderStyle&&);
- void computePreferredLogicalWidths() final;
- void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
private:
bool isRenderMathMLScripts() const final { return false; }
- bool isRenderMathMLUnderOver() const override { return true; }
- const char* renderName() const override { return "RenderMathMLUnderOver"; }
+ bool isRenderMathMLUnderOver() const final { return true; }
+ const char* renderName() const final { return "RenderMathMLUnderOver"; }
+ void computePreferredLogicalWidths() final;
+ void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final;
+
void computeOperatorsHorizontalStretch();
bool isValid() const;
bool shouldMoveLimits();
@@ -61,5 +61,3 @@
SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLUnderOver, isRenderMathMLUnderOver())
#endif // ENABLE(MATHML)
-
-#endif // RenderMathMLUnderOver_h