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

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

Issue 1328923002: Avoid stack overflow triggered by out-of-band layout of flexbox child. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update test. The previous one started to pass, because of https://codereview.chromium.org/129593300… Created 5 years, 3 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
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 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 } 1027 }
1028 if (child->isColumnSpanAll()) { 1028 if (child->isColumnSpanAll()) {
1029 // This is not the containing block of the spanner. The spanner's pl aceholder will lay 1029 // This is not the containing block of the spanner. The spanner's pl aceholder will lay
1030 // it out in due course. For now we just need to consult our flow th read, so that the 1030 // it out in due course. For now we just need to consult our flow th read, so that the
1031 // columns (if any) preceding and following the spanner are laid out correctly. But 1031 // columns (if any) preceding and following the spanner are laid out correctly. But
1032 // first we apply the pending margin, so that it's taken into consid eration and doesn't 1032 // first we apply the pending margin, so that it's taken into consid eration and doesn't
1033 // end up on the other side of the spanner. 1033 // end up on the other side of the spanner.
1034 setLogicalHeight(logicalHeight() + marginInfo.margin()); 1034 setLogicalHeight(logicalHeight() + marginInfo.margin());
1035 marginInfo.clearMargin(); 1035 marginInfo.clearMargin();
1036 1036
1037 flowThreadContainingBlock()->skipColumnSpanner(child, offsetFromLogi calTopOfFirstPage() + logicalHeight()); 1037 child->spannerPlaceholder()->flowThread()->skipColumnSpanner(child, offsetFromLogicalTopOfFirstPage() + logicalHeight());
1038 continue; 1038 continue;
1039 } 1039 }
1040 1040
1041 // Lay out the child. 1041 // Lay out the child.
1042 layoutBlockChild(*child, marginInfo, previousFloatLogicalBottom); 1042 layoutBlockChild(*child, marginInfo, previousFloatLogicalBottom);
1043 lastNormalFlowChild = child; 1043 lastNormalFlowChild = child;
1044 } 1044 }
1045 1045
1046 // Now do the handling of the bottom of the block, adding in our bottom bord er/padding and 1046 // Now do the handling of the bottom of the block, adding in our bottom bord er/padding and
1047 // determining the correct collapsed bottom margin information. 1047 // determining the correct collapsed bottom margin information.
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after
3060 FrameView* frameView = document().view(); 3060 FrameView* frameView = document().view();
3061 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height(); 3061 LayoutUnit top = (style()->position() == FixedPosition) ? 0 : frameView->scr ollOffset().height();
3062 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( ); 3062 int visibleHeight = frameView->visibleContentRect(IncludeScrollbars).height( );
3063 if (size().height() < visibleHeight) 3063 if (size().height() < visibleHeight)
3064 top += (visibleHeight - size().height()) / 2; 3064 top += (visibleHeight - size().height()) / 2;
3065 setY(top); 3065 setY(top);
3066 dialog->setCentered(top); 3066 dialog->setCentered(top);
3067 } 3067 }
3068 3068
3069 } // namespace blink 3069 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/fast/multicol/flexbox-with-overflow-auto-child-crash-expected.txt ('k') | Source/core/layout/LayoutFlowThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698