Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: Source/core/rendering/RenderBlockFlow.cpp

Issue 850143002: Ensure we remove floats from descendants even if they have become inline (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderHTMLCanvas.cpp » ('j') | Source/core/rendering/RenderHTMLCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698