| 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 11 matching lines...) Expand all Loading... |
| 22 #define RootInlineBox_h | 22 #define RootInlineBox_h |
| 23 | 23 |
| 24 #include "core/rendering/InlineFlowBox.h" | 24 #include "core/rendering/InlineFlowBox.h" |
| 25 #include "platform/text/BidiContext.h" | 25 #include "platform/text/BidiContext.h" |
| 26 | 26 |
| 27 namespace WebCore { | 27 namespace WebCore { |
| 28 | 28 |
| 29 class EllipsisBox; | 29 class EllipsisBox; |
| 30 class HitTestResult; | 30 class HitTestResult; |
| 31 class RenderBlockFlow; | 31 class RenderBlockFlow; |
| 32 class RenderRegion; | |
| 33 | 32 |
| 34 struct BidiStatus; | 33 struct BidiStatus; |
| 35 struct GapRects; | 34 struct GapRects; |
| 36 | 35 |
| 37 class RootInlineBox : public InlineFlowBox { | 36 class RootInlineBox : public InlineFlowBox { |
| 38 public: | 37 public: |
| 39 explicit RootInlineBox(RenderBlockFlow*); | 38 explicit RootInlineBox(RenderBlockFlow*); |
| 40 | 39 |
| 41 virtual void destroy() OVERRIDE FINAL; | 40 virtual void destroy() OVERRIDE FINAL; |
| 42 | 41 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 57 | 56 |
| 58 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); } |
| 59 void setPaginationStrut(LayoutUnit strut) { ensureLineFragmentationData()->m
_paginationStrut = strut; } | 58 void setPaginationStrut(LayoutUnit strut) { ensureLineFragmentationData()->m
_paginationStrut = strut; } |
| 60 | 59 |
| 61 bool isFirstAfterPageBreak() const { return m_fragmentationData ? m_fragment
ationData->m_isFirstAfterPageBreak : false; } | 60 bool isFirstAfterPageBreak() const { return m_fragmentationData ? m_fragment
ationData->m_isFirstAfterPageBreak : false; } |
| 62 void setIsFirstAfterPageBreak(bool isFirstAfterPageBreak) { ensureLineFragme
ntationData()->m_isFirstAfterPageBreak = isFirstAfterPageBreak; } | 61 void setIsFirstAfterPageBreak(bool isFirstAfterPageBreak) { ensureLineFragme
ntationData()->m_isFirstAfterPageBreak = isFirstAfterPageBreak; } |
| 63 | 62 |
| 64 LayoutUnit paginatedLineWidth() const { return m_fragmentationData ? m_fragm
entationData->m_paginatedLineWidth : LayoutUnit(0); } | 63 LayoutUnit paginatedLineWidth() const { return m_fragmentationData ? m_fragm
entationData->m_paginatedLineWidth : LayoutUnit(0); } |
| 65 void setPaginatedLineWidth(LayoutUnit width) { ensureLineFragmentationData()
->m_paginatedLineWidth = width; } | 64 void setPaginatedLineWidth(LayoutUnit width) { ensureLineFragmentationData()
->m_paginatedLineWidth = width; } |
| 66 | 65 |
| 67 RenderRegion* containingRegion() const; | |
| 68 void setContainingRegion(RenderRegion*); | |
| 69 | |
| 70 LayoutUnit selectionTop() const; | 66 LayoutUnit selectionTop() const; |
| 71 LayoutUnit selectionBottom() const; | 67 LayoutUnit selectionBottom() const; |
| 72 LayoutUnit selectionHeight() const { return max<LayoutUnit>(0, selectionBott
om() - selectionTop()); } | 68 LayoutUnit selectionHeight() const { return max<LayoutUnit>(0, selectionBott
om() - selectionTop()); } |
| 73 | 69 |
| 74 LayoutUnit selectionTopAdjustedForPrecedingBlock() const; | 70 LayoutUnit selectionTopAdjustedForPrecedingBlock() const; |
| 75 LayoutUnit selectionHeightAdjustedForPrecedingBlock() const { return max<Lay
outUnit>(0, selectionBottom() - selectionTopAdjustedForPrecedingBlock()); } | 71 LayoutUnit selectionHeightAdjustedForPrecedingBlock() const { return max<Lay
outUnit>(0, selectionBottom() - selectionTopAdjustedForPrecedingBlock()); } |
| 76 | 72 |
| 77 int blockDirectionPointInLine() const; | 73 int blockDirectionPointInLine() const; |
| 78 | 74 |
| 79 LayoutUnit alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflo
wAndFallbackFontsMap&, VerticalPositionCache&); | 75 LayoutUnit alignBoxesInBlockDirection(LayoutUnit heightOfBlock, GlyphOverflo
wAndFallbackFontsMap&, VerticalPositionCache&); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 LayoutUnit m_lineTop; | 210 LayoutUnit m_lineTop; |
| 215 LayoutUnit m_lineBottom; | 211 LayoutUnit m_lineBottom; |
| 216 | 212 |
| 217 LayoutUnit m_lineTopWithLeading; | 213 LayoutUnit m_lineTopWithLeading; |
| 218 LayoutUnit m_lineBottomWithLeading; | 214 LayoutUnit m_lineBottomWithLeading; |
| 219 | 215 |
| 220 struct LineFragmentationData { | 216 struct LineFragmentationData { |
| 221 WTF_MAKE_NONCOPYABLE(LineFragmentationData); WTF_MAKE_FAST_ALLOCATED; | 217 WTF_MAKE_NONCOPYABLE(LineFragmentationData); WTF_MAKE_FAST_ALLOCATED; |
| 222 public: | 218 public: |
| 223 LineFragmentationData() | 219 LineFragmentationData() |
| 224 : m_containingRegion(0) | 220 : m_paginationStrut(0) |
| 225 , m_paginationStrut(0) | |
| 226 , m_paginatedLineWidth(0) | 221 , m_paginatedLineWidth(0) |
| 227 , m_isFirstAfterPageBreak(false) | 222 , m_isFirstAfterPageBreak(false) |
| 228 { | 223 { |
| 229 | 224 |
| 230 } | 225 } |
| 231 | 226 |
| 232 // It should not be assumed the |containingRegion| is always valid. | |
| 233 // It can also be 0 if the flow has no region chain. | |
| 234 RenderRegion* m_containingRegion; | |
| 235 LayoutUnit m_paginationStrut; | 227 LayoutUnit m_paginationStrut; |
| 236 LayoutUnit m_paginatedLineWidth; | 228 LayoutUnit m_paginatedLineWidth; |
| 237 bool m_isFirstAfterPageBreak; | 229 bool m_isFirstAfterPageBreak; |
| 238 }; | 230 }; |
| 239 | 231 |
| 240 OwnPtr<LineFragmentationData> m_fragmentationData; | 232 OwnPtr<LineFragmentationData> m_fragmentationData; |
| 241 | 233 |
| 242 // Floats hanging off the line are pushed into this vector during layout. It
is only | 234 // Floats hanging off the line are pushed into this vector during layout. It
is only |
| 243 // good for as long as the line has not been marked dirty. | 235 // good for as long as the line has not been marked dirty. |
| 244 OwnPtr<Vector<RenderBox*> > m_floats; | 236 OwnPtr<Vector<RenderBox*> > m_floats; |
| 245 }; | 237 }; |
| 246 | 238 |
| 247 } // namespace WebCore | 239 } // namespace WebCore |
| 248 | 240 |
| 249 #endif // RootInlineBox_h | 241 #endif // RootInlineBox_h |
| OLD | NEW |