| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2  * Copyright (C) 2003, 2006, 2007, 2008 Apple Inc. All rights reserved. | 
| 3  * | 3  * | 
| 4  * This library is free software; you can redistribute it and/or | 4  * This library is free software; you can redistribute it and/or | 
| 5  * modify it under the terms of the GNU Library General Public | 5  * modify it under the terms of the GNU Library General Public | 
| 6  * License as published by the Free Software Foundation; either | 6  * License as published by the Free Software Foundation; either | 
| 7  * version 2 of the License, or (at your option) any later version. | 7  * version 2 of the License, or (at your option) any later version. | 
| 8  * | 8  * | 
| 9  * This library is distributed in the hope that it will be useful, | 9  * This library is distributed in the hope that it will be useful, | 
| 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 19 matching lines...) Expand all  Loading... | 
| 30 class HitTestResult; | 30 class HitTestResult; | 
| 31 class RenderRegion; | 31 class RenderRegion; | 
| 32 | 32 | 
| 33 struct BidiStatus; | 33 struct BidiStatus; | 
| 34 struct GapRects; | 34 struct GapRects; | 
| 35 | 35 | 
| 36 class RootInlineBox : public InlineFlowBox { | 36 class RootInlineBox : public InlineFlowBox { | 
| 37 public: | 37 public: | 
| 38     explicit RootInlineBox(RenderBlock*); | 38     explicit RootInlineBox(RenderBlock*); | 
| 39 | 39 | 
| 40     virtual void destroy(RenderArena*); | 40     virtual void destroy(RenderArena*) FINAL; | 
| 41 | 41 | 
| 42     virtual bool isRootInlineBox() const { return true; } | 42     virtual bool isRootInlineBox() const FINAL { return true; } | 
| 43 | 43 | 
| 44     void detachEllipsisBox(RenderArena*); | 44     void detachEllipsisBox(RenderArena*); | 
| 45 | 45 | 
| 46     RootInlineBox* nextRootBox() const { return static_cast<RootInlineBox*>(m_ne
     xtLineBox); } | 46     RootInlineBox* nextRootBox() const { return static_cast<RootInlineBox*>(m_ne
     xtLineBox); } | 
| 47     RootInlineBox* prevRootBox() const { return static_cast<RootInlineBox*>(m_pr
     evLineBox); } | 47     RootInlineBox* prevRootBox() const { return static_cast<RootInlineBox*>(m_pr
     evLineBox); } | 
| 48 | 48 | 
| 49     virtual void adjustPosition(float dx, float dy); | 49     virtual void adjustPosition(float dx, float dy) FINAL; | 
| 50 | 50 | 
| 51     LayoutUnit lineTop() const { return m_lineTop; } | 51     LayoutUnit lineTop() const { return m_lineTop; } | 
| 52     LayoutUnit lineBottom() const { return m_lineBottom; } | 52     LayoutUnit lineBottom() const { return m_lineBottom; } | 
| 53 | 53 | 
| 54     LayoutUnit lineTopWithLeading() const { return m_lineTopWithLeading; } | 54     LayoutUnit lineTopWithLeading() const { return m_lineTopWithLeading; } | 
| 55     LayoutUnit lineBottomWithLeading() const { return m_lineBottomWithLeading; } | 55     LayoutUnit lineBottomWithLeading() const { return m_lineBottomWithLeading; } | 
| 56 | 56 | 
| 57     LayoutUnit paginationStrut() const { return m_fragmentationData ? m_fragment
     ationData->m_paginationStrut : LayoutUnit(0); } | 57     LayoutUnit paginationStrut() const { return m_fragmentationData ? m_fragment
     ationData->m_paginationStrut : LayoutUnit(0); } | 
| 58     void setPaginationStrut(LayoutUnit strut) { ensureLineFragmentationData()->m
     _paginationStrut = strut; } | 58     void setPaginationStrut(LayoutUnit strut) { ensureLineFragmentationData()->m
     _paginationStrut = strut; } | 
| 59 | 59 | 
| (...skipping 17 matching lines...) Expand all  Loading... | 
| 77 | 77 | 
| 78     LayoutUnit alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflo
     wAndFallbackFontsMap&, VerticalPositionCache&); | 78     LayoutUnit alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflo
     wAndFallbackFontsMap&, VerticalPositionCache&); | 
| 79     void setLineTopBottomPositions(LayoutUnit top, LayoutUnit bottom, LayoutUnit
      topWithLeading, LayoutUnit bottomWithLeading) | 79     void setLineTopBottomPositions(LayoutUnit top, LayoutUnit bottom, LayoutUnit
      topWithLeading, LayoutUnit bottomWithLeading) | 
| 80     { | 80     { | 
| 81         m_lineTop = top; | 81         m_lineTop = top; | 
| 82         m_lineBottom = bottom; | 82         m_lineBottom = bottom; | 
| 83         m_lineTopWithLeading = topWithLeading; | 83         m_lineTopWithLeading = topWithLeading; | 
| 84         m_lineBottomWithLeading = bottomWithLeading; | 84         m_lineBottomWithLeading = bottomWithLeading; | 
| 85     } | 85     } | 
| 86 | 86 | 
| 87     virtual RenderLineBoxList* rendererLineBoxes() const; | 87     virtual RenderLineBoxList* rendererLineBoxes() const FINAL; | 
| 88 | 88 | 
| 89     RenderObject* lineBreakObj() const { return m_lineBreakObj; } | 89     RenderObject* lineBreakObj() const { return m_lineBreakObj; } | 
| 90     BidiStatus lineBreakBidiStatus() const; | 90     BidiStatus lineBreakBidiStatus() const; | 
| 91     void setLineBreakInfo(RenderObject*, unsigned breakPos, const BidiStatus&); | 91     void setLineBreakInfo(RenderObject*, unsigned breakPos, const BidiStatus&); | 
| 92 | 92 | 
| 93     unsigned lineBreakPos() const { return m_lineBreakPos; } | 93     unsigned lineBreakPos() const { return m_lineBreakPos; } | 
| 94     void setLineBreakPos(unsigned p) { m_lineBreakPos = p; } | 94     void setLineBreakPos(unsigned p) { m_lineBreakPos = p; } | 
| 95 | 95 | 
| 96     using InlineBox::endsWithBreak; | 96     using InlineBox::endsWithBreak; | 
| 97     using InlineBox::setEndsWithBreak; | 97     using InlineBox::setEndsWithBreak; | 
| 98 | 98 | 
| 99     void childRemoved(InlineBox* box); | 99     void childRemoved(InlineBox* box); | 
| 100 | 100 | 
| 101     bool lineCanAccommodateEllipsis(bool ltr, int blockEdge, int lineBoxEdge, in
     t ellipsisWidth); | 101     bool lineCanAccommodateEllipsis(bool ltr, int blockEdge, int lineBoxEdge, in
     t ellipsisWidth); | 
| 102     // Return the truncatedWidth, the width of the truncated text + ellipsis. | 102     // Return the truncatedWidth, the width of the truncated text + ellipsis. | 
| 103     float placeEllipsis(const AtomicString& ellipsisStr, bool ltr, float blockLe
     ftEdge, float blockRightEdge, float ellipsisWidth, InlineBox* markupBox = 0); | 103     float placeEllipsis(const AtomicString& ellipsisStr, bool ltr, float blockLe
     ftEdge, float blockRightEdge, float ellipsisWidth, InlineBox* markupBox = 0); | 
| 104     // Return the position of the EllipsisBox or -1. | 104     // Return the position of the EllipsisBox or -1. | 
| 105     virtual float placeEllipsisBox(bool ltr, float blockLeftEdge, float blockRig
     htEdge, float ellipsisWidth, float &truncatedWidth, bool& foundBox) OVERRIDE; | 105     virtual float placeEllipsisBox(bool ltr, float blockLeftEdge, float blockRig
     htEdge, float ellipsisWidth, float &truncatedWidth, bool& foundBox) OVERRIDE FIN
     AL; | 
| 106 | 106 | 
| 107     using InlineBox::hasEllipsisBox; | 107     using InlineBox::hasEllipsisBox; | 
| 108     EllipsisBox* ellipsisBox() const; | 108     EllipsisBox* ellipsisBox() const; | 
| 109 | 109 | 
| 110     void paintEllipsisBox(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, La
     youtUnit lineBottom) const; | 110     void paintEllipsisBox(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, La
     youtUnit lineBottom) const; | 
| 111 | 111 | 
| 112     virtual void clearTruncation() OVERRIDE; | 112     virtual void clearTruncation() OVERRIDE FINAL; | 
| 113 | 113 | 
| 114     bool isHyphenated() const; | 114     bool isHyphenated() const; | 
| 115 | 115 | 
| 116     virtual int baselinePosition(FontBaseline baselineType) const; | 116     virtual int baselinePosition(FontBaseline baselineType) const FINAL; | 
| 117     virtual LayoutUnit lineHeight() const; | 117     virtual LayoutUnit lineHeight() const FINAL; | 
| 118 | 118 | 
| 119     virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
     tUnit lineBottom); | 119     virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou
     tUnit lineBottom); | 
| 120     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
     tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
      lineTop, LayoutUnit lineBottom) OVERRIDE; | 120     virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
     tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit
      lineTop, LayoutUnit lineBottom) OVERRIDE FINAL; | 
| 121 | 121 | 
| 122     using InlineBox::hasSelectedChildren; | 122     using InlineBox::hasSelectedChildren; | 
| 123     using InlineBox::setHasSelectedChildren; | 123     using InlineBox::setHasSelectedChildren; | 
| 124 | 124 | 
| 125     virtual RenderObject::SelectionState selectionState(); | 125     virtual RenderObject::SelectionState selectionState() FINAL; | 
| 126     InlineBox* firstSelectedBox(); | 126     InlineBox* firstSelectedBox(); | 
| 127     InlineBox* lastSelectedBox(); | 127     InlineBox* lastSelectedBox(); | 
| 128 | 128 | 
| 129     GapRects lineSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlo
     ckPhysicalPosition, const LayoutSize& offsetFromRootBlock, LayoutUnit selTop, La
     youtUnit selHeight, const PaintInfo*); | 129     GapRects lineSelectionGap(RenderBlock* rootBlock, const LayoutPoint& rootBlo
     ckPhysicalPosition, const LayoutSize& offsetFromRootBlock, LayoutUnit selTop, La
     youtUnit selHeight, const PaintInfo*); | 
| 130 | 130 | 
| 131     RenderBlock* block() const; | 131     RenderBlock* block() const; | 
| 132 | 132 | 
| 133     InlineBox* closestLeafChildForPoint(const IntPoint&, bool onlyEditableLeaves
     ); | 133     InlineBox* closestLeafChildForPoint(const IntPoint&, bool onlyEditableLeaves
     ); | 
| 134     InlineBox* closestLeafChildForLogicalLeftPosition(int, bool onlyEditableLeav
     es = false); | 134     InlineBox* closestLeafChildForLogicalLeftPosition(int, bool onlyEditableLeav
     es = false); | 
| 135 | 135 | 
| 136     void appendFloat(RenderBox* floatingBox) | 136     void appendFloat(RenderBox* floatingBox) | 
| 137     { | 137     { | 
| 138         ASSERT(!isDirty()); | 138         ASSERT(!isDirty()); | 
| 139         if (m_floats) | 139         if (m_floats) | 
| 140             m_floats->append(floatingBox); | 140             m_floats->append(floatingBox); | 
| 141         else | 141         else | 
| 142             m_floats= adoptPtr(new Vector<RenderBox*>(1, floatingBox)); | 142             m_floats= adoptPtr(new Vector<RenderBox*>(1, floatingBox)); | 
| 143     } | 143     } | 
| 144 | 144 | 
| 145     Vector<RenderBox*>* floatsPtr() { ASSERT(!isDirty()); return m_floats.get();
      } | 145     Vector<RenderBox*>* floatsPtr() { ASSERT(!isDirty()); return m_floats.get();
      } | 
| 146 | 146 | 
| 147     virtual void extractLineBoxFromRenderObject(); | 147     virtual void extractLineBoxFromRenderObject() FINAL; | 
| 148     virtual void attachLineBoxToRenderObject(); | 148     virtual void attachLineBoxToRenderObject() FINAL; | 
| 149     virtual void removeLineBoxFromRenderObject(); | 149     virtual void removeLineBoxFromRenderObject() FINAL; | 
| 150 | 150 | 
| 151     FontBaseline baselineType() const { return static_cast<FontBaseline>(m_basel
     ineType); } | 151     FontBaseline baselineType() const { return static_cast<FontBaseline>(m_basel
     ineType); } | 
| 152 | 152 | 
| 153     bool hasAnnotationsBefore() const { return m_hasAnnotationsBefore; } | 153     bool hasAnnotationsBefore() const { return m_hasAnnotationsBefore; } | 
| 154     bool hasAnnotationsAfter() const { return m_hasAnnotationsAfter; } | 154     bool hasAnnotationsAfter() const { return m_hasAnnotationsAfter; } | 
| 155 | 155 | 
| 156     LayoutRect paddedLayoutOverflowRect(LayoutUnit endPadding) const; | 156     LayoutRect paddedLayoutOverflowRect(LayoutUnit endPadding) const; | 
| 157 | 157 | 
| 158     void ascentAndDescentForBox(InlineBox*, GlyphOverflowAndFallbackFontsMap&, i
     nt& ascent, int& descent, bool& affectsAscent, bool& affectsDescent) const; | 158     void ascentAndDescentForBox(InlineBox*, GlyphOverflowAndFallbackFontsMap&, i
     nt& ascent, int& descent, bool& affectsAscent, bool& affectsDescent) const; | 
| 159     LayoutUnit verticalPositionForBox(InlineBox*, VerticalPositionCache&); | 159     LayoutUnit verticalPositionForBox(InlineBox*, VerticalPositionCache&); | 
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 249     OwnPtr<LineFragmentationData> m_fragmentationData; | 249     OwnPtr<LineFragmentationData> m_fragmentationData; | 
| 250 | 250 | 
| 251     // Floats hanging off the line are pushed into this vector during layout. It
      is only | 251     // Floats hanging off the line are pushed into this vector during layout. It
      is only | 
| 252     // good for as long as the line has not been marked dirty. | 252     // good for as long as the line has not been marked dirty. | 
| 253     OwnPtr<Vector<RenderBox*> > m_floats; | 253     OwnPtr<Vector<RenderBox*> > m_floats; | 
| 254 }; | 254 }; | 
| 255 | 255 | 
| 256 } // namespace WebCore | 256 } // namespace WebCore | 
| 257 | 257 | 
| 258 #endif // RootInlineBox_h | 258 #endif // RootInlineBox_h | 
| OLD | NEW | 
|---|