diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/RenderLineBreak.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/rendering/RenderLineBreak.h')
-rw-r--r-- | Source/WebCore/rendering/RenderLineBreak.h | 79 |
1 files changed, 40 insertions, 39 deletions
diff --git a/Source/WebCore/rendering/RenderLineBreak.h b/Source/WebCore/rendering/RenderLineBreak.h index 55f4f597b..26883a8a1 100644 --- a/Source/WebCore/rendering/RenderLineBreak.h +++ b/Source/WebCore/rendering/RenderLineBreak.h @@ -19,8 +19,7 @@ * */ -#ifndef RenderLineBreak_h -#define RenderLineBreak_h +#pragma once #include "RenderBoxModelObject.h" @@ -32,13 +31,13 @@ class Position; class RenderLineBreak final : public RenderBoxModelObject { public: - RenderLineBreak(HTMLElement&, PassRef<RenderStyle>); + RenderLineBreak(HTMLElement&, RenderStyle&&); virtual ~RenderLineBreak(); // FIXME: The lies here keep render tree dump based test results unchanged. - virtual const char* renderName() const override { return m_isWBR ? "RenderWordBreak" : "RenderBR"; } + const char* renderName() const override { return m_isWBR ? "RenderWordBreak" : "RenderBR"; } - virtual bool isWBR() const override { return m_isWBR; } + bool isWBR() const override { return m_isWBR; } std::unique_ptr<InlineElementBox> createInlineBox(); InlineElementBox* inlineBoxWrapper() const { return m_inlineBoxWrapper; } @@ -46,52 +45,54 @@ public: void deleteInlineBoxWrapper(); void replaceInlineBoxWrapper(InlineElementBox&); void dirtyLineBoxes(bool fullLayout); + void deleteLineBoxesBeforeSimpleLineLayout(); IntRect linesBoundingBox() const; - virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override; - virtual void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override; + void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const override; + void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override; +#if PLATFORM(IOS) +void collectSelectionRects(Vector<SelectionRect>&, unsigned startOffset = 0, unsigned endOffset = std::numeric_limits<unsigned>::max()) override; +#endif private: void node() const = delete; - virtual bool canHaveChildren() const override { return false; } - virtual void paint(PaintInfo&, const LayoutPoint&) override final { } - - virtual VisiblePosition positionForPoint(const LayoutPoint&) override; - virtual int caretMinOffset() const override; - virtual int caretMaxOffset() const override; - virtual bool canBeSelectionLeaf() const override; - virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* extraWidthToEndOfLine) override; - virtual void setSelectionState(SelectionState) override; - - virtual LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode) const override; - virtual int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode) const override; - - virtual LayoutUnit marginTop() const override { return 0; } - virtual LayoutUnit marginBottom() const override { return 0; } - virtual LayoutUnit marginLeft() const override { return 0; } - virtual LayoutUnit marginRight() const override { return 0; } - virtual LayoutUnit marginBefore(const RenderStyle*) const override { return 0; } - virtual LayoutUnit marginAfter(const RenderStyle*) const override { return 0; } - virtual LayoutUnit marginStart(const RenderStyle*) const override { return 0; } - virtual LayoutUnit marginEnd(const RenderStyle*) const override { return 0; } - virtual LayoutUnit offsetWidth() const override { return linesBoundingBox().width(); } - virtual LayoutUnit offsetHeight() const override { return linesBoundingBox().height(); } - virtual IntRect borderBoundingBox() const override; - virtual LayoutRect frameRectForStickyPositioning() const override { ASSERT_NOT_REACHED(); return LayoutRect(); } - virtual LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject*) const override { return LayoutRect(); } - - virtual void updateFromStyle() override; - virtual bool requiresLayer() const override { return false; } + bool canHaveChildren() const override { return false; } + void paint(PaintInfo&, const LayoutPoint&) override { } + + VisiblePosition positionForPoint(const LayoutPoint&, const RenderRegion*) override; + int caretMinOffset() const override; + int caretMaxOffset() const override; + bool canBeSelectionLeaf() const override; + LayoutRect localCaretRect(InlineBox*, unsigned caretOffset, LayoutUnit* extraWidthToEndOfLine) override; + void setSelectionState(SelectionState) override; + + LayoutUnit lineHeight(bool firstLine, LineDirectionMode, LinePositionMode) const override; + int baselinePosition(FontBaseline, bool firstLine, LineDirectionMode, LinePositionMode) const override; + + LayoutUnit marginTop() const override { return 0; } + LayoutUnit marginBottom() const override { return 0; } + LayoutUnit marginLeft() const override { return 0; } + LayoutUnit marginRight() const override { return 0; } + LayoutUnit marginBefore(const RenderStyle*) const override { return 0; } + LayoutUnit marginAfter(const RenderStyle*) const override { return 0; } + LayoutUnit marginStart(const RenderStyle*) const override { return 0; } + LayoutUnit marginEnd(const RenderStyle*) const override { return 0; } + LayoutUnit offsetWidth() const override { return linesBoundingBox().width(); } + LayoutUnit offsetHeight() const override { return linesBoundingBox().height(); } + LayoutRect borderBoundingBox() const override { return LayoutRect(LayoutPoint(), linesBoundingBox().size()); } + LayoutRect frameRectForStickyPositioning() const override { ASSERT_NOT_REACHED(); return LayoutRect(); } + LayoutRect clippedOverflowRectForRepaint(const RenderLayerModelObject*) const override { return LayoutRect(); } + + void updateFromStyle() override; + bool requiresLayer() const override { return false; } InlineElementBox* m_inlineBoxWrapper; mutable int m_cachedLineHeight; bool m_isWBR; }; -RENDER_OBJECT_TYPE_CASTS(RenderLineBreak, isLineBreak()) - } // namespace WebCore -#endif // RenderLineBreak_h +SPECIALIZE_TYPE_TRAITS_RENDER_OBJECT(RenderLineBreak, isLineBreak()) |