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 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1819 return; | 1819 return; |
1820 m_descendantsWithFloatsMarkedForLayout |= !floatToRemove; | 1820 m_descendantsWithFloatsMarkedForLayout |= !floatToRemove; |
1821 | 1821 |
1822 MarkingBehavior markParents = inLayout ? MarkOnlyThis : MarkContainingBlockC hain; | 1822 MarkingBehavior markParents = inLayout ? MarkOnlyThis : MarkContainingBlockC hain; |
1823 setChildNeedsLayout(markParents); | 1823 setChildNeedsLayout(markParents); |
1824 | 1824 |
1825 if (floatToRemove) | 1825 if (floatToRemove) |
1826 removeFloatingObject(floatToRemove); | 1826 removeFloatingObject(floatToRemove); |
1827 | 1827 |
1828 // Iterate over our children and mark them as needed. | 1828 // Iterate over our children and mark them as needed. |
1829 if (!childrenInline()) { | 1829 if (!childrenInline() || floatToRemove) { |
Julien - ping for review
2015/01/22 14:34:47
Does the childrenInline check still make sense?
| |
1830 for (RenderObject* child = firstChild(); child; child = child->nextSibli ng()) { | 1830 for (RenderObject* child = firstChild(); child; child = child->nextSibli ng()) { |
1831 if ((!floatToRemove && child->isFloatingOrOutOfFlowPositioned()) || !child->isRenderBlock()) | 1831 if ((!floatToRemove && child->isFloatingOrOutOfFlowPositioned()) || !child->isRenderBlock()) |
1832 continue; | 1832 continue; |
1833 if (!child->isRenderBlockFlow()) { | 1833 if (!child->isRenderBlockFlow()) { |
1834 RenderBlock* childBlock = toRenderBlock(child); | 1834 RenderBlock* childBlock = toRenderBlock(child); |
1835 if (childBlock->shrinkToAvoidFloats() && childBlock->everHadLayo ut()) | 1835 if (childBlock->shrinkToAvoidFloats() && childBlock->everHadLayo ut()) |
1836 childBlock->setChildNeedsLayout(markParents); | 1836 childBlock->setChildNeedsLayout(markParents); |
1837 continue; | 1837 continue; |
1838 } | 1838 } |
1839 RenderBlockFlow* childBlockFlow = toRenderBlockFlow(child); | 1839 RenderBlockFlow* childBlockFlow = toRenderBlockFlow(child); |
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3121 FrameView* frameView = document().view(); | 3121 FrameView* frameView = document().view(); |
3122 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); | 3122 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); |
3123 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); | 3123 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); |
3124 if (size().height() < visibleHeight) | 3124 if (size().height() < visibleHeight) |
3125 top += (visibleHeight - size().height()) / 2; | 3125 top += (visibleHeight - size().height()) / 2; |
3126 setY(top); | 3126 setY(top); |
3127 dialog->setCentered(top); | 3127 dialog->setCentered(top); |
3128 } | 3128 } |
3129 | 3129 |
3130 } // namespace blink | 3130 } // namespace blink |
OLD | NEW |