diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderTextControlMultiLine.h')
-rw-r--r-- | Source/WebCore/rendering/RenderTextControlMultiLine.h | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/Source/WebCore/rendering/RenderTextControlMultiLine.h b/Source/WebCore/rendering/RenderTextControlMultiLine.h index 42ff33194..5ffc2fba1 100644 --- a/Source/WebCore/rendering/RenderTextControlMultiLine.h +++ b/Source/WebCore/rendering/RenderTextControlMultiLine.h @@ -19,40 +19,41 @@ * */ -#ifndef RenderTextControlMultiLine_h -#define RenderTextControlMultiLine_h +#pragma once +#include "HTMLTextAreaElement.h" #include "RenderTextControl.h" namespace WebCore { -class HTMLTextAreaElement; - class RenderTextControlMultiLine final : public RenderTextControl { public: - RenderTextControlMultiLine(HTMLTextAreaElement&, PassRef<RenderStyle>); + RenderTextControlMultiLine(HTMLTextAreaElement&, RenderStyle&&); virtual ~RenderTextControlMultiLine(); HTMLTextAreaElement& textAreaElement() const; private: + void willBeDestroyed() override; void element() const = delete; - virtual bool isTextArea() const { return true; } + bool isTextArea() const override { return true; } - virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override; + bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override; - virtual float getAvgCharWidth(AtomicString family); - virtual LayoutUnit preferredContentLogicalWidth(float charWidth) const; - virtual LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const override; - virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const; + float getAverageCharWidth() override; + LayoutUnit preferredContentLogicalWidth(float charWidth) const override; + LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit nonContentHeight) const override; + int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode = PositionOnContainingLine) const override; - virtual PassRef<RenderStyle> createInnerTextStyle(const RenderStyle* startStyle) const; - virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren); + RenderObject* layoutSpecialExcludedChild(bool relayoutChildren) override; }; -RENDER_OBJECT_TYPE_CASTS(RenderTextControlMultiLine, isTextArea()) - +inline RenderTextControlMultiLine* HTMLTextAreaElement::renderer() const +{ + return downcast<RenderTextControlMultiLine>(HTMLTextFormControlElement::renderer()); } -#endif +} // namespace WebCore + +SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderTextControlMultiLine, isTextArea()) |