| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 { | 202 { |
| 203 if (box->renderer() == m_lineBreakObj) | 203 if (box->renderer() == m_lineBreakObj) |
| 204 setLineBreakInfo(0, 0, BidiStatus()); | 204 setLineBreakInfo(0, 0, BidiStatus()); |
| 205 | 205 |
| 206 for (RootInlineBox* prev = prevRootBox(); prev && prev->lineBreakObj() == bo
x->renderer(); prev = prev->prevRootBox()) { | 206 for (RootInlineBox* prev = prevRootBox(); prev && prev->lineBreakObj() == bo
x->renderer(); prev = prev->prevRootBox()) { |
| 207 prev->setLineBreakInfo(0, 0, BidiStatus()); | 207 prev->setLineBreakInfo(0, 0, BidiStatus()); |
| 208 prev->markDirty(); | 208 prev->markDirty(); |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 | 211 |
| 212 RenderRegion* RootInlineBox::containingRegion() const | |
| 213 { | |
| 214 RenderRegion* region = m_fragmentationData ? m_fragmentationData->m_containi
ngRegion : 0; | |
| 215 | |
| 216 #ifndef NDEBUG | |
| 217 if (region) { | |
| 218 RenderFlowThread* flowThread = block()->flowThreadContainingBlock(); | |
| 219 const RenderRegionList& regionList = flowThread->renderRegionList(); | |
| 220 ASSERT(regionList.contains(region)); | |
| 221 } | |
| 222 #endif | |
| 223 | |
| 224 return region; | |
| 225 } | |
| 226 | |
| 227 void RootInlineBox::setContainingRegion(RenderRegion* region) | |
| 228 { | |
| 229 ASSERT(!isDirty()); | |
| 230 ASSERT(block()->flowThreadContainingBlock()); | |
| 231 LineFragmentationData* fragmentationData = ensureLineFragmentationData(); | |
| 232 fragmentationData->m_containingRegion = region; | |
| 233 } | |
| 234 | |
| 235 LayoutUnit RootInlineBox::alignBoxesInBlockDirection(LayoutUnit heightOfBlock, G
lyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& vertical
PositionCache) | 212 LayoutUnit RootInlineBox::alignBoxesInBlockDirection(LayoutUnit heightOfBlock, G
lyphOverflowAndFallbackFontsMap& textBoxDataMap, VerticalPositionCache& vertical
PositionCache) |
| 236 { | 213 { |
| 237 // SVG will handle vertical alignment on its own. | 214 // SVG will handle vertical alignment on its own. |
| 238 if (isSVGRootInlineBox()) | 215 if (isSVGRootInlineBox()) |
| 239 return 0; | 216 return 0; |
| 240 | 217 |
| 241 LayoutUnit maxPositionTop = 0; | 218 LayoutUnit maxPositionTop = 0; |
| 242 LayoutUnit maxPositionBottom = 0; | 219 LayoutUnit maxPositionBottom = 0; |
| 243 int maxAscent = 0; | 220 int maxAscent = 0; |
| 244 int maxDescent = 0; | 221 int maxDescent = 0; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 265 bool hasAnnotationsBefore = false; | 242 bool hasAnnotationsBefore = false; |
| 266 bool hasAnnotationsAfter = false; | 243 bool hasAnnotationsAfter = false; |
| 267 placeBoxesInBlockDirection(heightOfBlock, maxHeight, maxAscent, noQuirksMode
, lineTop, lineBottom, setLineTop, | 244 placeBoxesInBlockDirection(heightOfBlock, maxHeight, maxAscent, noQuirksMode
, lineTop, lineBottom, setLineTop, |
| 268 lineTopIncludingMargins, lineBottomIncludingMargi
ns, hasAnnotationsBefore, hasAnnotationsAfter, baselineType()); | 245 lineTopIncludingMargins, lineBottomIncludingMargi
ns, hasAnnotationsBefore, hasAnnotationsAfter, baselineType()); |
| 269 m_hasAnnotationsBefore = hasAnnotationsBefore; | 246 m_hasAnnotationsBefore = hasAnnotationsBefore; |
| 270 m_hasAnnotationsAfter = hasAnnotationsAfter; | 247 m_hasAnnotationsAfter = hasAnnotationsAfter; |
| 271 | 248 |
| 272 maxHeight = max<LayoutUnit>(0, maxHeight); // FIXME: Is this really necessar
y? | 249 maxHeight = max<LayoutUnit>(0, maxHeight); // FIXME: Is this really necessar
y? |
| 273 | 250 |
| 274 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock
+ maxHeight); | 251 setLineTopBottomPositions(lineTop, lineBottom, heightOfBlock, heightOfBlock
+ maxHeight); |
| 275 setPaginatedLineWidth(block()->availableLogicalWidthForContent(heightOfBlock
)); | 252 setPaginatedLineWidth(block()->availableLogicalWidthForContent()); |
| 276 | 253 |
| 277 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment(); | 254 LayoutUnit annotationsAdjustment = beforeAnnotationsAdjustment(); |
| 278 if (annotationsAdjustment) { | 255 if (annotationsAdjustment) { |
| 279 // FIXME: Need to handle pagination here. We might have to move to the n
ext page/column as a result of the | 256 // FIXME: Need to handle pagination here. We might have to move to the n
ext page/column as a result of the |
| 280 // ruby expansion. | 257 // ruby expansion. |
| 281 adjustBlockDirectionPosition(annotationsAdjustment); | 258 adjustBlockDirectionPosition(annotationsAdjustment); |
| 282 heightOfBlock += annotationsAdjustment; | 259 heightOfBlock += annotationsAdjustment; |
| 283 } | 260 } |
| 284 | 261 |
| 285 return heightOfBlock + maxHeight; | 262 return heightOfBlock + maxHeight; |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 } | 869 } |
| 893 | 870 |
| 894 #ifndef NDEBUG | 871 #ifndef NDEBUG |
| 895 const char* RootInlineBox::boxName() const | 872 const char* RootInlineBox::boxName() const |
| 896 { | 873 { |
| 897 return "RootInlineBox"; | 874 return "RootInlineBox"; |
| 898 } | 875 } |
| 899 #endif | 876 #endif |
| 900 | 877 |
| 901 } // namespace WebCore | 878 } // namespace WebCore |
| OLD | NEW |