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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 LayoutUnit previousHeight = logicalHeight(); | 362 LayoutUnit previousHeight = logicalHeight(); |
363 setLogicalHeight(beforeEdge); | 363 setLogicalHeight(beforeEdge); |
364 | 364 |
365 m_paintInvalidationLogicalTop = 0; | 365 m_paintInvalidationLogicalTop = 0; |
366 m_paintInvalidationLogicalBottom = 0; | 366 m_paintInvalidationLogicalBottom = 0; |
367 if (!firstChild() && !isAnonymousBlock()) | 367 if (!firstChild() && !isAnonymousBlock()) |
368 setChildrenInline(true); | 368 setChildrenInline(true); |
369 | 369 |
370 TextAutosizer::LayoutScope textAutosizerLayoutScope(this); | 370 TextAutosizer::LayoutScope textAutosizerLayoutScope(this); |
371 | 371 |
| 372 // Reset the flag here instead of in layoutInlineChildren() in case that |
| 373 // all inline children are removed from this block. |
| 374 setContainsInlineWithOutlineAndContinuation(false); |
372 if (childrenInline()) | 375 if (childrenInline()) |
373 layoutInlineChildren(relayoutChildren, m_paintInvalidationLogicalTop, m_
paintInvalidationLogicalBottom, afterEdge); | 376 layoutInlineChildren(relayoutChildren, m_paintInvalidationLogicalTop, m_
paintInvalidationLogicalBottom, afterEdge); |
374 else | 377 else |
375 layoutBlockChildren(relayoutChildren, layoutScope, beforeEdge, afterEdge
); | 378 layoutBlockChildren(relayoutChildren, layoutScope, beforeEdge, afterEdge
); |
376 | 379 |
377 // Expand our intrinsic height to encompass floats. | 380 // Expand our intrinsic height to encompass floats. |
378 if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsNew
FormattingContext()) | 381 if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && createsNew
FormattingContext()) |
379 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); | 382 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); |
380 | 383 |
381 if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { | 384 if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { |
(...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3057 FrameView* frameView = document().view(); | 3060 FrameView* frameView = document().view(); |
3058 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); | 3061 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); |
3059 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); | 3062 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); |
3060 if (size().height() < visibleHeight) | 3063 if (size().height() < visibleHeight) |
3061 top += (visibleHeight - size().height()) / 2; | 3064 top += (visibleHeight - size().height()) / 2; |
3062 setY(top); | 3065 setY(top); |
3063 dialog->setCentered(top); | 3066 dialog->setCentered(top); |
3064 } | 3067 } |
3065 | 3068 |
3066 } // namespace blink | 3069 } // namespace blink |
OLD | NEW |