| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 TextAutosizer::LayoutScope textAutosizerLayoutScope(this); | 368 TextAutosizer::LayoutScope textAutosizerLayoutScope(this); |
| 369 | 369 |
| 370 // Reset the flag here instead of in layoutInlineChildren() in case that | 370 // Reset the flag here instead of in layoutInlineChildren() in case that |
| 371 // all inline children are removed from this block. | 371 // all inline children are removed from this block. |
| 372 setContainsInlineWithOutlineAndContinuation(false); | 372 setContainsInlineWithOutlineAndContinuation(false); |
| 373 if (childrenInline()) | 373 if (childrenInline()) |
| 374 layoutInlineChildren(relayoutChildren, m_paintInvalidationLogicalTop, m_
paintInvalidationLogicalBottom, afterEdge); | 374 layoutInlineChildren(relayoutChildren, m_paintInvalidationLogicalTop, m_
paintInvalidationLogicalBottom, afterEdge); |
| 375 else | 375 else |
| 376 layoutBlockChildren(relayoutChildren, layoutScope, beforeEdge, afterEdge
); | 376 layoutBlockChildren(relayoutChildren, layoutScope, beforeEdge, afterEdge
); |
| 377 | 377 |
| 378 if (needsRecalcLogicalWidthAfterLayoutChildren()) { | |
| 379 // In perpendicular writing-mode, min-content logicalWidth depends on th
e child's logicalHeight, | |
| 380 // so logicalWidth needs to be updated after children layout is done. | |
| 381 // Strictly speaking, children need re-layout if logicalWidth is changed
, but in most cases, | |
| 382 // perpendicular children do not re-flow according to parent's logicalWi
dth. | |
| 383 clearNeedsRecalcLogicalWidthAfterLayoutChildren(); | |
| 384 setPreferredLogicalWidthsDirty(MarkOnlyThis); | |
| 385 updateLogicalWidthAndColumnWidth(); | |
| 386 } | |
| 387 | |
| 388 // Expand our intrinsic height to encompass floats. | 378 // Expand our intrinsic height to encompass floats. |
| 389 if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsNew
FormattingContext()) | 379 if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsNew
FormattingContext()) |
| 390 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); | 380 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); |
| 391 | 381 |
| 392 if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { | 382 if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { |
| 393 if (flowThread->recalculateColumnHeights()) { | 383 if (flowThread->recalculateColumnHeights()) { |
| 394 setChildNeedsLayout(MarkOnlyThis); | 384 setChildNeedsLayout(MarkOnlyThis); |
| 395 return false; | 385 return false; |
| 396 } | 386 } |
| 397 } | 387 } |
| (...skipping 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3124 FrameView* frameView = document().view(); | 3114 FrameView* frameView = document().view(); |
| 3125 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); | 3115 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); |
| 3126 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); | 3116 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); |
| 3127 if (size().height() < visibleHeight) | 3117 if (size().height() < visibleHeight) |
| 3128 top += (visibleHeight - size().height()) / 2; | 3118 top += (visibleHeight - size().height()) / 2; |
| 3129 setY(top); | 3119 setY(top); |
| 3130 dialog->setCentered(top); | 3120 dialog->setCentered(top); |
| 3131 } | 3121 } |
| 3132 | 3122 |
| 3133 } // namespace blink | 3123 } // namespace blink |
| OLD | NEW |