OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 , m_lineTop(0) | 56 , m_lineTop(0) |
57 , m_lineBottom(0) | 57 , m_lineBottom(0) |
58 , m_lineTopWithLeading(0) | 58 , m_lineTopWithLeading(0) |
59 , m_lineBottomWithLeading(0) | 59 , m_lineBottomWithLeading(0) |
60 , m_selectionBottom(0) | 60 , m_selectionBottom(0) |
61 , m_paginationStrut(0) | 61 , m_paginationStrut(0) |
62 { | 62 { |
63 setIsHorizontal(block.isHorizontalWritingMode()); | 63 setIsHorizontal(block.isHorizontalWritingMode()); |
64 } | 64 } |
65 | 65 |
66 | |
67 void RootInlineBox::destroy() | 66 void RootInlineBox::destroy() |
68 { | 67 { |
69 detachEllipsisBox(); | 68 detachEllipsisBox(); |
70 InlineFlowBox::destroy(); | 69 InlineFlowBox::destroy(); |
71 } | 70 } |
72 | 71 |
73 void RootInlineBox::detachEllipsisBox() | 72 void RootInlineBox::detachEllipsisBox() |
74 { | 73 { |
75 if (hasEllipsisBox()) { | 74 if (hasEllipsisBox()) { |
76 EllipsisBox* box = gEllipsisBoxMap->take(this); | 75 EllipsisBox* box = gEllipsisBoxMap->take(this); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 LayoutUnit lineTopIncludingMargins = heightOfBlock; | 220 LayoutUnit lineTopIncludingMargins = heightOfBlock; |
222 LayoutUnit lineBottomIncludingMargins = heightOfBlock; | 221 LayoutUnit lineBottomIncludingMargins = heightOfBlock; |
223 LayoutUnit selectionBottom = heightOfBlock; | 222 LayoutUnit selectionBottom = heightOfBlock; |
224 bool setLineTop = false; | 223 bool setLineTop = false; |
225 bool hasAnnotationsBefore = false; | 224 bool hasAnnotationsBefore = false; |
226 bool hasAnnotationsAfter = false; | 225 bool hasAnnotationsAfter = false; |
227 placeBoxesInBlockDirection(heightOfBlock, maxHeight, maxAscent, noQuirksMode
, lineTop, lineBottom, selectionBottom, setLineTop, lineTopIncludingMargins, lin
eBottomIncludingMargins, hasAnnotationsBefore, hasAnnotationsAfter, baselineType
()); | 226 placeBoxesInBlockDirection(heightOfBlock, maxHeight, maxAscent, noQuirksMode
, lineTop, lineBottom, selectionBottom, setLineTop, lineTopIncludingMargins, lin
eBottomIncludingMargins, hasAnnotationsBefore, hasAnnotationsAfter, baselineType
()); |
228 m_hasAnnotationsBefore = hasAnnotationsBefore; | 227 m_hasAnnotationsBefore = hasAnnotationsBefore; |
229 m_hasAnnotationsAfter = hasAnnotationsAfter; | 228 m_hasAnnotationsAfter = hasAnnotationsAfter; |
230 | 229 |
231 maxHeight = std::max<LayoutUnit>(0, maxHeight); // FIXME: Is this really nec
essary? | 230 maxHeight = std::max<LayoutUnit>(0, maxHeight); |
232 | 231 |
233 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock
+ maxHeight, selectionBottom); | 232 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock
+ maxHeight, selectionBottom); |
234 | 233 |
235 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment(); | 234 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment(); |
236 if (annotationsAdjustment) { | 235 if (annotationsAdjustment) { |
237 // FIXME: Need to handle pagination here. We might have to move to the n
ext page/column as a result of the | 236 // FIXME: Need to handle pagination here. We might have to move to the n
ext page/column as a result of the |
238 // ruby expansion. | 237 // ruby expansion. |
239 moveInBlockDirection(annotationsAdjustment); | 238 moveInBlockDirection(annotationsAdjustment); |
240 heightOfBlock += annotationsAdjustment; | 239 heightOfBlock += annotationsAdjustment; |
241 } | 240 } |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 endBox = nullptr; | 848 endBox = nullptr; |
850 return nullptr; | 849 return nullptr; |
851 } | 850 } |
852 | 851 |
853 const char* RootInlineBox::boxName() const | 852 const char* RootInlineBox::boxName() const |
854 { | 853 { |
855 return "RootInlineBox"; | 854 return "RootInlineBox"; |
856 } | 855 } |
857 | 856 |
858 } // namespace blink | 857 } // namespace blink |
OLD | NEW |