| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 LayoutUnit m_lineTop; | 212 LayoutUnit m_lineTop; |
| 217 LayoutUnit m_lineBottom; | 213 LayoutUnit m_lineBottom; |
| 218 | 214 |
| 219 LayoutUnit m_lineTopWithLeading; | 215 LayoutUnit m_lineTopWithLeading; |
| 220 LayoutUnit m_lineBottomWithLeading; | 216 LayoutUnit m_lineBottomWithLeading; |
| 221 | 217 |
| 222 struct LineFragmentationData { | 218 struct LineFragmentationData { |
| 223 WTF_MAKE_NONCOPYABLE(LineFragmentationData); WTF_MAKE_FAST_ALLOCATED; | 219 WTF_MAKE_NONCOPYABLE(LineFragmentationData); WTF_MAKE_FAST_ALLOCATED; |
| 224 public: | 220 public: |
| 225 LineFragmentationData() | 221 LineFragmentationData() |
| 226 : m_containingRegion(0) | 222 : m_paginationStrut(0) |
| 227 , m_paginationStrut(0) | |
| 228 , m_paginatedLineWidth(0) | 223 , m_paginatedLineWidth(0) |
| 229 , m_isFirstAfterPageBreak(false) | 224 , m_isFirstAfterPageBreak(false) |
| 230 { | 225 { |
| 231 | 226 |
| 232 } | 227 } |
| 233 | 228 |
| 234 // It should not be assumed the |containingRegion| is always valid. | 229 // It should not be assumed the |containingRegion| is always valid. |
| 235 // It can also be 0 if the flow has no region chain. | 230 // It can also be 0 if the flow has no region chain. |
| 236 RenderRegion* m_containingRegion; | |
| 237 LayoutUnit m_paginationStrut; | 231 LayoutUnit m_paginationStrut; |
| 238 LayoutUnit m_paginatedLineWidth; | 232 LayoutUnit m_paginatedLineWidth; |
| 239 bool m_isFirstAfterPageBreak; | 233 bool m_isFirstAfterPageBreak; |
| 240 }; | 234 }; |
| 241 | 235 |
| 242 OwnPtr<LineFragmentationData> m_fragmentationData; | 236 OwnPtr<LineFragmentationData> m_fragmentationData; |
| 243 | 237 |
| 244 // Floats hanging off the line are pushed into this vector during layout. It
is only | 238 // Floats hanging off the line are pushed into this vector during layout. It
is only |
| 245 // good for as long as the line has not been marked dirty. | 239 // good for as long as the line has not been marked dirty. |
| 246 OwnPtr<Vector<RenderBox*> > m_floats; | 240 OwnPtr<Vector<RenderBox*> > m_floats; |
| 247 }; | 241 }; |
| 248 | 242 |
| 249 } // namespace WebCore | 243 } // namespace WebCore |
| 250 | 244 |
| 251 #endif // RootInlineBox_h | 245 #endif // RootInlineBox_h |
| OLD | NEW |