diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderRubyText.h')
-rw-r--r-- | Source/WebCore/rendering/RenderRubyText.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/Source/WebCore/rendering/RenderRubyText.h b/Source/WebCore/rendering/RenderRubyText.h index 163b20471..0c46c6c7d 100644 --- a/Source/WebCore/rendering/RenderRubyText.h +++ b/Source/WebCore/rendering/RenderRubyText.h @@ -28,8 +28,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef RenderRubyText_h -#define RenderRubyText_h +#pragma once #include "RenderBlockFlow.h" @@ -37,23 +36,27 @@ namespace WebCore { class RenderRubyText final : public RenderBlockFlow { public: - RenderRubyText(Element&, PassRef<RenderStyle>); + RenderRubyText(Element&, RenderStyle&&); virtual ~RenderRubyText(); - Element& element() const { return toElement(nodeForNonAnonymous()); } - - virtual bool isChildAllowed(const RenderObject&, const RenderStyle&) const override; + Element& element() const { return downcast<Element>(nodeForNonAnonymous()); } + bool isChildAllowed(const RenderObject&, const RenderStyle&) const override; + + RenderRubyRun* rubyRun() const; + + bool canBreakBefore(const LazyLineBreakIterator&) const; + private: - virtual const char* renderName() const override { return "RenderRubyText"; } - virtual bool isRubyText() const override { return true; } + const char* renderName() const override { return "RenderRubyText"; } + bool isRubyText() const override { return true; } - virtual bool avoidsFloats() const override; + bool avoidsFloats() const override; - virtual ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const override; - virtual void adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const override; + ETextAlign textAlignmentForLine(bool endsWithSoftBreak) const override; + void adjustInlineDirectionLineBounds(int expansionOpportunityCount, float& logicalLeft, float& logicalWidth) const override; }; } // namespace WebCore -#endif // RenderRubyText_h +SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderRubyText, isRubyText()) |