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

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

Issue 1236793005: Always include floating children into visual overflow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaselines (see the try job results of the previous patch set for expectation changes) Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutBlockFlow.h ('k') | Source/core/layout/LayoutTableSection.cpp » ('j') | 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 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 1692
1693 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); 1693 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
1694 FloatingObjectSetIterator end = floatingObjectSet.end(); 1694 FloatingObjectSetIterator end = floatingObjectSet.end();
1695 for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++ it) { 1695 for (FloatingObjectSetIterator it = floatingObjectSet.begin(); it != end; ++ it) {
1696 const FloatingObject& floatingObject = *it->get(); 1696 const FloatingObject& floatingObject = *it->get();
1697 if (floatingObject.isDescendant()) 1697 if (floatingObject.isDescendant())
1698 addOverflowFromChild(floatingObject.layoutObject(), LayoutSize(xPosi tionForFloatIncludingMargin(floatingObject), yPositionForFloatIncludingMargin(fl oatingObject))); 1698 addOverflowFromChild(floatingObject.layoutObject(), LayoutSize(xPosi tionForFloatIncludingMargin(floatingObject), yPositionForFloatIncludingMargin(fl oatingObject)));
1699 } 1699 }
1700 } 1700 }
1701 1701
1702 void LayoutBlockFlow::computeOverflow(LayoutUnit oldClientAfterEdge, bool recomp uteFloats) 1702 void LayoutBlockFlow::computeOverflow(LayoutUnit oldClientAfterEdge)
1703 { 1703 {
1704 LayoutBlock::computeOverflow(oldClientAfterEdge, recomputeFloats); 1704 LayoutBlock::computeOverflow(oldClientAfterEdge);
1705 if (recomputeFloats || createsNewFormattingContext() || hasSelfPaintingLayer ()) 1705 addOverflowFromFloats();
1706 addOverflowFromFloats();
1707 } 1706 }
1708 1707
1709 RootInlineBox* LayoutBlockFlow::createAndAppendRootInlineBox() 1708 RootInlineBox* LayoutBlockFlow::createAndAppendRootInlineBox()
1710 { 1709 {
1711 RootInlineBox* rootBox = createRootInlineBox(); 1710 RootInlineBox* rootBox = createRootInlineBox();
1712 m_lineBoxes.appendLineBox(rootBox); 1711 m_lineBoxes.appendLineBox(rootBox);
1713 1712
1714 return rootBox; 1713 return rootBox;
1715 } 1714 }
1716 1715
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after
3050 FrameView* frameView = document().view(); 3049 FrameView* frameView = document().view();
3051 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); 3050 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height();
3052 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); 3051 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( );
3053 if (size().height() < visibleHeight) 3052 if (size().height() < visibleHeight)
3054 top += (visibleHeight - size().height()) / 2; 3053 top += (visibleHeight - size().height()) / 2;
3055 setY(top); 3054 setY(top);
3056 dialog->setCentered(top); 3055 dialog->setCentered(top);
3057 } 3056 }
3058 3057
3059 } // namespace blink 3058 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBlockFlow.h ('k') | Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698