From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- .../rendering/mathml/RenderMathMLMenclose.h | 38 +++++++++++++++------- 1 file changed, 26 insertions(+), 12 deletions(-) mode change 100755 => 100644 Source/WebCore/rendering/mathml/RenderMathMLMenclose.h (limited to 'Source/WebCore/rendering/mathml/RenderMathMLMenclose.h') diff --git a/Source/WebCore/rendering/mathml/RenderMathMLMenclose.h b/Source/WebCore/rendering/mathml/RenderMathMLMenclose.h old mode 100755 new mode 100644 index 43b463481..e6168a634 --- a/Source/WebCore/rendering/mathml/RenderMathMLMenclose.h +++ b/Source/WebCore/rendering/mathml/RenderMathMLMenclose.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2014 Gurpreet Kaur (k.gurpreet@samsung.com). All rights reserved. + * Copyright (C) 2016 Igalia S.L. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,28 +24,41 @@ * 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" #include "RenderMathMLRow.h" namespace WebCore { - + class RenderMathMLMenclose final: public RenderMathMLRow { public: - RenderMathMLMenclose(Element&, PassRef); + RenderMathMLMenclose(MathMLMencloseElement&, RenderStyle&&); private: - virtual const char* renderName() const { return "RenderMathMLMenclose"; } - virtual void paint(PaintInfo&, const LayoutPoint&) override; - virtual void updateLogicalHeight() override; - virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = nullptr) override; - virtual void computePreferredLogicalWidths() override; - bool checkNotationalValuesValidity(const Vector&) const; + const char* renderName() const final { return "RenderMathMLMenclose"; } + void computePreferredLogicalWidths() final; + void layoutBlock(bool relayoutChildren, LayoutUnit pageLogicalHeight = 0) final; + void paint(PaintInfo&, const LayoutPoint&) final; + + LayoutUnit ruleThickness() const; + bool hasNotation(MathMLMencloseElement::MencloseNotationFlag notationFlag) const { return downcast(element()).hasNotation(notationFlag); } + + struct SpaceAroundContent { + LayoutUnit left; + LayoutUnit right; + LayoutUnit top; + LayoutUnit bottom; + }; + SpaceAroundContent spaceAroundContent(LayoutUnit contentWidth, LayoutUnit contentHeight) const; + + LayoutRect m_contentRect; }; - + } +SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderMathMLMenclose, isRenderMathMLMenclose()) + #endif // ENABLE(MATHML) -#endif // RenderMathMLMenclose_h -- cgit v1.2.1