| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 void LayoutBlockFlow::layoutBlock(bool relayoutChildren) | 304 void LayoutBlockFlow::layoutBlock(bool relayoutChildren) |
| 305 { | 305 { |
| 306 ASSERT(needsLayout()); | 306 ASSERT(needsLayout()); |
| 307 ASSERT(isInlineBlockOrInlineTable() || !isInline()); | 307 ASSERT(isInlineBlockOrInlineTable() || !isInline()); |
| 308 | 308 |
| 309 // If we are self-collapsing with self-collapsing descendants this will get
set to save us burrowing through our | 309 // If we are self-collapsing with self-collapsing descendants this will get
set to save us burrowing through our |
| 310 // descendants every time in |isSelfCollapsingBlock|. We reset it here so th
at |isSelfCollapsingBlock| attempts to burrow | 310 // descendants every time in |isSelfCollapsingBlock|. We reset it here so th
at |isSelfCollapsingBlock| attempts to burrow |
| 311 // at least once and so that it always gives a reliable result reflecting th
e latest layout. | 311 // at least once and so that it always gives a reliable result reflecting th
e latest layout. |
| 312 m_hasOnlySelfCollapsingChildren = false; | 312 m_hasOnlySelfCollapsingChildren = false; |
| 313 | 313 |
| 314 if (!relayoutChildren && simplifiedLayout()) | 314 SubtreeLayoutScope layoutScope(*this); |
| 315 |
| 316 if (!relayoutChildren && simplifiedLayout(&layoutScope)) |
| 315 return; | 317 return; |
| 316 | 318 |
| 317 LayoutAnalyzer::BlockScope analyzer(*this); | 319 LayoutAnalyzer::BlockScope analyzer(*this); |
| 318 SubtreeLayoutScope layoutScope(*this); | |
| 319 | 320 |
| 320 // Multiple passes might be required for column based layout. | 321 // Multiple passes might be required for column based layout. |
| 321 // The number of passes could be as high as the number of columns. | 322 // The number of passes could be as high as the number of columns. |
| 322 bool done = false; | 323 bool done = false; |
| 323 LayoutUnit pageLogicalHeight; | 324 LayoutUnit pageLogicalHeight; |
| 324 while (!done) | 325 while (!done) |
| 325 done = layoutBlockFlow(relayoutChildren, pageLogicalHeight, layoutScope)
; | 326 done = layoutBlockFlow(relayoutChildren, pageLogicalHeight, layoutScope)
; |
| 326 | 327 |
| 327 LayoutView* layoutView = view(); | 328 LayoutView* layoutView = view(); |
| 328 if (layoutView->layoutState()->pageLogicalHeight()) | 329 if (layoutView->layoutState()->pageLogicalHeight()) |
| (...skipping 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3030 // FIXME: Glyph overflow will get lost in this case, but not really a big de
al. | 3031 // FIXME: Glyph overflow will get lost in this case, but not really a big de
al. |
| 3031 GlyphOverflowAndFallbackFontsMap textBoxDataMap; | 3032 GlyphOverflowAndFallbackFontsMap textBoxDataMap; |
| 3032 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it
!= lineBoxes.end(); ++it) { | 3033 for (ListHashSet<RootInlineBox*>::const_iterator it = lineBoxes.begin(); it
!= lineBoxes.end(); ++it) { |
| 3033 RootInlineBox* box = *it; | 3034 RootInlineBox* box = *it; |
| 3034 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); | 3035 box->computeOverflow(box->lineTop(), box->lineBottom(), textBoxDataMap); |
| 3035 } | 3036 } |
| 3036 return childrenOverflowChanged; | 3037 return childrenOverflowChanged; |
| 3037 } | 3038 } |
| 3038 | 3039 |
| 3039 } // namespace blink | 3040 } // namespace blink |
| OLD | NEW |