| 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 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1782 return; | 1782 return; |
| 1783 m_descendantsWithFloatsMarkedForLayout |= !floatToRemove; | 1783 m_descendantsWithFloatsMarkedForLayout |= !floatToRemove; |
| 1784 | 1784 |
| 1785 MarkingBehavior markParents = inLayout ? MarkOnlyThis : MarkContainerChain; | 1785 MarkingBehavior markParents = inLayout ? MarkOnlyThis : MarkContainerChain; |
| 1786 setChildNeedsLayout(markParents); | 1786 setChildNeedsLayout(markParents); |
| 1787 | 1787 |
| 1788 if (floatToRemove) | 1788 if (floatToRemove) |
| 1789 removeFloatingObject(floatToRemove); | 1789 removeFloatingObject(floatToRemove); |
| 1790 | 1790 |
| 1791 // Iterate over our children and mark them as needed. | 1791 // Iterate over our children and mark them as needed. |
| 1792 if (!childrenInline() || floatToRemove) { | 1792 if (!childrenInline()) { |
| 1793 for (LayoutObject* child = firstChild(); child; child = child->nextSibli
ng()) { | 1793 for (LayoutObject* child = firstChild(); child; child = child->nextSibli
ng()) { |
| 1794 if ((!floatToRemove && child->isFloatingOrOutOfFlowPositioned()) ||
!child->isLayoutBlock()) | 1794 if ((!floatToRemove && child->isFloatingOrOutOfFlowPositioned()) ||
!child->isLayoutBlock()) |
| 1795 continue; | 1795 continue; |
| 1796 if (!child->isLayoutBlockFlow()) { | 1796 if (!child->isLayoutBlockFlow()) { |
| 1797 LayoutBlock* childBlock = toLayoutBlock(child); | 1797 LayoutBlock* childBlock = toLayoutBlock(child); |
| 1798 if (childBlock->shrinkToAvoidFloats() && childBlock->everHadLayo
ut()) | 1798 if (childBlock->shrinkToAvoidFloats() && childBlock->everHadLayo
ut()) |
| 1799 childBlock->setChildNeedsLayout(markParents); | 1799 childBlock->setChildNeedsLayout(markParents); |
| 1800 continue; | 1800 continue; |
| 1801 } | 1801 } |
| 1802 LayoutBlockFlow* childBlockFlow = toLayoutBlockFlow(child); | 1802 LayoutBlockFlow* childBlockFlow = toLayoutBlockFlow(child); |
| (...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3086 FrameView* frameView = document().view(); | 3086 FrameView* frameView = document().view(); |
| 3087 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); | 3087 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr
ollOffset().height(); |
| 3088 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); | 3088 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height(
); |
| 3089 if (size().height() < visibleHeight) | 3089 if (size().height() < visibleHeight) |
| 3090 top += (visibleHeight - size().height()) / 2; | 3090 top += (visibleHeight - size().height()) / 2; |
| 3091 setY(top); | 3091 setY(top); |
| 3092 dialog->setCentered(top); | 3092 dialog->setCentered(top); |
| 3093 } | 3093 } |
| 3094 | 3094 |
| 3095 } // namespace blink | 3095 } // namespace blink |
| OLD | NEW |