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

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

Issue 1419703006: Don't propagate pagination struts to flow threads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Capitalize ALL THE THINGS. Or at least the first word in each sentence. Created 5 years, 1 month 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/LayoutTests/fast/multicol/soft-break-before-first-child-expected.txt ('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 2869 matching lines...) Expand 10 before | Expand all | Expand 10 after
2880 { 2880 {
2881 // The block needs to be contained by a LayoutBlockFlow (and not by e.g. a f lexbox, grid, or a 2881 // The block needs to be contained by a LayoutBlockFlow (and not by e.g. a f lexbox, grid, or a
2882 // table (the latter being the case for table cell or table caption)). The r eason for this 2882 // table (the latter being the case for table cell or table caption)). The r eason for this
2883 // limitation is simply that LayoutBlockFlow child layout code is the only p lace where we pick 2883 // limitation is simply that LayoutBlockFlow child layout code is the only p lace where we pick
2884 // up the struts and handle them. We handle floats and regular in-flow child ren, and that's 2884 // up the struts and handle them. We handle floats and regular in-flow child ren, and that's
2885 // all. We could handle this in other layout modes as well (and even for out -of-flow children), 2885 // all. We could handle this in other layout modes as well (and even for out -of-flow children),
2886 // but currently we don't. 2886 // but currently we don't.
2887 // TODO(mstensho): But we *should*. 2887 // TODO(mstensho): But we *should*.
2888 if (isOutOfFlowPositioned()) 2888 if (isOutOfFlowPositioned())
2889 return false; 2889 return false;
2890 if (isLayoutFlowThread()) {
2891 // Don't let the strut escape the fragmentation context and get lost.
2892 // TODO(mstensho): If we're in a nested fragmentation context, we should ideally convert
2893 // and propagate the strut to the outer fragmentation context, so that t he inner one is
2894 // fully pushed to the next outer fragmentainer, instead of taking up un usable space in the
2895 // previous one. But currently we have no mechanism in place to handle t his.
2896 return false;
2897 }
2890 LayoutBlock* containingBlock = this->containingBlock(); 2898 LayoutBlock* containingBlock = this->containingBlock();
2891 return containingBlock && containingBlock->isLayoutBlockFlow(); 2899 return containingBlock && containingBlock->isLayoutBlockFlow();
2892 } 2900 }
2893 2901
2894 void LayoutBlockFlow::setPaginationStrutPropagatedFromChild(LayoutUnit strut) 2902 void LayoutBlockFlow::setPaginationStrutPropagatedFromChild(LayoutUnit strut)
2895 { 2903 {
2896 if (!m_rareData) { 2904 if (!m_rareData) {
2897 if (!strut) 2905 if (!strut)
2898 return; 2906 return;
2899 m_rareData = adoptPtr(new LayoutBlockFlowRareData(this)); 2907 m_rareData = adoptPtr(new LayoutBlockFlowRareData(this));
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
3066 FrameView* frameView = document().view(); 3074 FrameView* frameView = document().view();
3067 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); 3075 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height();
3068 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); 3076 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( );
3069 if (size().height() < visibleHeight) 3077 if (size().height() < visibleHeight)
3070 top += (visibleHeight - size().height()) / 2; 3078 top += (visibleHeight - size().height()) / 2;
3071 setY(top); 3079 setY(top);
3072 dialog->setCentered(top); 3080 dialog->setCentered(top);
3073 } 3081 }
3074 3082
3075 } // namespace blink 3083 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/multicol/soft-break-before-first-child-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698