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

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

Issue 1100823002: [New Multicolumn] Disallow spanners inside floats and absolutely positioned boxes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 | « LayoutTests/fast/multicol/span/inside-float-crash-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) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 380 }
381 if (ancestor->spannerPlaceholder()) { 381 if (ancestor->spannerPlaceholder()) {
382 // FIXME: do we want to support nested spanners in a different way? The outer spanner 382 // FIXME: do we want to support nested spanners in a different way? The outer spanner
383 // has already broken out from the columns to become sized by the mu lticol container, 383 // has already broken out from the columns to become sized by the mu lticol container,
384 // which may be good enough for the inner spanner. But margins, bord ers, padding and 384 // which may be good enough for the inner spanner. But margins, bord ers, padding and
385 // explicit widths on the outer spanner, or on any children between the outer and inner 385 // explicit widths on the outer spanner, or on any children between the outer and inner
386 // spanner, will affect the width of the inner spanner this way, whi ch might be 386 // spanner, will affect the width of the inner spanner this way, whi ch might be
387 // undesirable. The spec has nothing to say on the matter. 387 // undesirable. The spec has nothing to say on the matter.
388 return false; // Ignore nested spanners. 388 return false; // Ignore nested spanners.
389 } 389 }
390 if (ancestor->isFloatingOrOutOfFlowPositioned()) {
391 // TODO(mstensho): It could actually be nice to support this (althou gh the usefulness is
392 // probably very limited), but currently our column balancing algori thm gets confused
393 // when a spanner is inside a float, because a float's position isn' t always known until
394 // after layout. Similarly for absolutely positioned boxes.
395 return false;
396 }
390 if (ancestor->isUnsplittableForPagination()) 397 if (ancestor->isUnsplittableForPagination())
391 return false; 398 return false;
392 } 399 }
393 ASSERT_NOT_REACHED(); 400 ASSERT_NOT_REACHED();
394 return false; 401 return false;
395 } 402 }
396 403
397 void LayoutMultiColumnFlowThread::addRegionToThread(LayoutMultiColumnSet* column Set) 404 void LayoutMultiColumnFlowThread::addRegionToThread(LayoutMultiColumnSet* column Set)
398 { 405 {
399 if (LayoutMultiColumnSet* nextSet = columnSet->nextSiblingMultiColumnSet()) { 406 if (LayoutMultiColumnSet* nextSet = columnSet->nextSiblingMultiColumnSet()) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 } 682 }
676 683
677 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const 684 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const
678 { 685 {
679 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) 686 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet())
680 return columnSet->pageLogicalHeight(); 687 return columnSet->pageLogicalHeight();
681 return false; 688 return false;
682 } 689 }
683 690
684 } 691 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/multicol/span/inside-float-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698