| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 updateScrollInfoAfterLayout(); | 308 updateScrollInfoAfterLayout(); |
| 309 | 309 |
| 310 if (m_paintInvalidationLogicalTop != m_paintInvalidationLogicalBottom) { | 310 if (m_paintInvalidationLogicalTop != m_paintInvalidationLogicalBottom) { |
| 311 bool hasVisibleContent = style()->visibility() == VISIBLE; | 311 bool hasVisibleContent = style()->visibility() == VISIBLE; |
| 312 if (!hasVisibleContent) { | 312 if (!hasVisibleContent) { |
| 313 DeprecatedPaintLayer* layer = enclosingLayer(); | 313 DeprecatedPaintLayer* layer = enclosingLayer(); |
| 314 layer->updateDescendantDependentFlags(); | 314 layer->updateDescendantDependentFlags(); |
| 315 hasVisibleContent = layer->hasVisibleContent(); | 315 hasVisibleContent = layer->hasVisibleContent(); |
| 316 } | 316 } |
| 317 if (hasVisibleContent) | 317 if (hasVisibleContent) |
| 318 setShouldInvalidateOverflowForPaint(true); | 318 setShouldInvalidateOverflowForPaint(); |
| 319 } | 319 } |
| 320 | 320 |
| 321 if (isHTMLDialogElement(node()) && isOutOfFlowPositioned()) | 321 if (isHTMLDialogElement(node()) && isOutOfFlowPositioned()) |
| 322 positionDialog(); | 322 positionDialog(); |
| 323 | 323 |
| 324 clearNeedsLayout(); | 324 clearNeedsLayout(); |
| 325 } | 325 } |
| 326 | 326 |
| 327 inline bool LayoutBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
pageLogicalHeight, SubtreeLayoutScope& layoutScope) | 327 inline bool LayoutBlockFlow::layoutBlockFlow(bool relayoutChildren, LayoutUnit &
pageLogicalHeight, SubtreeLayoutScope& layoutScope) |
| 328 { | 328 { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); | 379 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); |
| 380 | 380 |
| 381 if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { | 381 if (LayoutMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { |
| 382 if (flowThread->recalculateColumnHeights()) { | 382 if (flowThread->recalculateColumnHeights()) { |
| 383 setChildNeedsLayout(MarkOnlyThis); | 383 setChildNeedsLayout(MarkOnlyThis); |
| 384 return false; | 384 return false; |
| 385 } | 385 } |
| 386 } | 386 } |
| 387 | 387 |
| 388 if (shouldBreakAtLineToAvoidWidow()) { | 388 if (shouldBreakAtLineToAvoidWidow()) { |
| 389 setEverHadLayout(true); | 389 setEverHadLayout(); |
| 390 return false; | 390 return false; |
| 391 } | 391 } |
| 392 | 392 |
| 393 // Calculate our new height. | 393 // Calculate our new height. |
| 394 LayoutUnit oldHeight = logicalHeight(); | 394 LayoutUnit oldHeight = logicalHeight(); |
| 395 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); | 395 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); |
| 396 | 396 |
| 397 updateLogicalHeight(); | 397 updateLogicalHeight(); |
| 398 LayoutUnit newHeight = logicalHeight(); | 398 LayoutUnit newHeight = logicalHeight(); |
| 399 if (!childrenInline()) { | 399 if (!childrenInline()) { |
| (...skipping 2657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3057 FrameView* frameView = document().view(); | 3057 FrameView* frameView = document().view(); |
| 3058 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); | 3058 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); |
| 3059 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); | 3059 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); |
| 3060 if (size().height() < visibleHeight) | 3060 if (size().height() < visibleHeight) |
| 3061 top += (visibleHeight - size().height()) / 2; | 3061 top += (visibleHeight - size().height()) / 2; |
| 3062 setY(top); | 3062 setY(top); |
| 3063 dialog->setCentered(top); | 3063 dialog->setCentered(top); |
| 3064 } | 3064 } |
| 3065 | 3065 |
| 3066 } // namespace blink | 3066 } // namespace blink |
| OLD | NEW |