| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 LayoutUnit lineTopIncludingMargins = heightOfBlock; | 219 LayoutUnit lineTopIncludingMargins = heightOfBlock; |
| 220 LayoutUnit lineBottomIncludingMargins = heightOfBlock; | 220 LayoutUnit lineBottomIncludingMargins = heightOfBlock; |
| 221 LayoutUnit selectionBottom = heightOfBlock; | 221 LayoutUnit selectionBottom = heightOfBlock; |
| 222 bool setLineTop = false; | 222 bool setLineTop = false; |
| 223 bool hasAnnotationsBefore = false; | 223 bool hasAnnotationsBefore = false; |
| 224 bool hasAnnotationsAfter = false; | 224 bool hasAnnotationsAfter = false; |
| 225 placeBoxesInBlockDirection(heightOfBlock, maxHeight, maxAscent, noQuirksMode
, lineTop, lineBottom, selectionBottom, setLineTop, lineTopIncludingMargins, lin
eBottomIncludingMargins, hasAnnotationsBefore, hasAnnotationsAfter, baselineType
()); | 225 placeBoxesInBlockDirection(heightOfBlock, maxHeight, maxAscent, noQuirksMode
, lineTop, lineBottom, selectionBottom, setLineTop, lineTopIncludingMargins, lin
eBottomIncludingMargins, hasAnnotationsBefore, hasAnnotationsAfter, baselineType
()); |
| 226 m_hasAnnotationsBefore = hasAnnotationsBefore; | 226 m_hasAnnotationsBefore = hasAnnotationsBefore; |
| 227 m_hasAnnotationsAfter = hasAnnotationsAfter; | 227 m_hasAnnotationsAfter = hasAnnotationsAfter; |
| 228 | 228 |
| 229 maxHeight = std::max<LayoutUnit>(0, maxHeight); | 229 maxHeight = maxHeight.clampNegativeToZero(); |
| 230 | 230 |
| 231 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock
+ maxHeight, selectionBottom); | 231 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock
+ maxHeight, selectionBottom); |
| 232 | 232 |
| 233 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment(); | 233 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment(); |
| 234 if (annotationsAdjustment) { | 234 if (annotationsAdjustment) { |
| 235 // FIXME: Need to handle pagination here. We might have to move to the n
ext page/column as a result of the | 235 // FIXME: Need to handle pagination here. We might have to move to the n
ext page/column as a result of the |
| 236 // ruby expansion. | 236 // ruby expansion. |
| 237 moveInBlockDirection(annotationsAdjustment); | 237 moveInBlockDirection(annotationsAdjustment); |
| 238 heightOfBlock += annotationsAdjustment; | 238 heightOfBlock += annotationsAdjustment; |
| 239 } | 239 } |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 endBox = nullptr; | 700 endBox = nullptr; |
| 701 return nullptr; | 701 return nullptr; |
| 702 } | 702 } |
| 703 | 703 |
| 704 const char* RootInlineBox::boxName() const | 704 const char* RootInlineBox::boxName() const |
| 705 { | 705 { |
| 706 return "RootInlineBox"; | 706 return "RootInlineBox"; |
| 707 } | 707 } |
| 708 | 708 |
| 709 } // namespace blink | 709 } // namespace blink |
| OLD | NEW |