SVGRootInlineBox.h [plain text]
#pragma once
#include "RootInlineBox.h"
#include "SVGTextLayoutEngine.h"
namespace WebCore {
class RenderSVGText;
class SVGInlineTextBox;
class SVGRootInlineBox final : public RootInlineBox {
WTF_MAKE_ISO_ALLOCATED(SVGRootInlineBox);
public:
explicit SVGRootInlineBox(RenderSVGText&);
RenderSVGText& renderSVGText();
float virtualLogicalHeight() const override { return m_logicalHeight; }
void setLogicalHeight(float height) { m_logicalHeight = height; }
void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, LayoutUnit lineBottom) override;
void computePerCharacterLayoutInformation();
InlineBox* closestLeafChildForPosition(const LayoutPoint&);
bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom, HitTestAction) final;
private:
bool isSVGRootInlineBox() const override { return true; }
void reorderValueLists(Vector<SVGTextLayoutAttributes*>&);
void layoutCharactersInTextBoxes(InlineFlowBox*, SVGTextLayoutEngine&);
void layoutChildBoxes(InlineFlowBox*, FloatRect* = nullptr);
void layoutRootBox(const FloatRect&);
float m_logicalHeight;
};
}
SPECIALIZE_TYPE_TRAITS_INLINE_BOX(SVGRootInlineBox, isSVGRootInlineBox())