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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Issue 1397383002: Don't keep float-lists in inline children (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698