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

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

Issue 1149333003: Ignore style changes on text node flowthread descendants. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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/multicol-becomes-abspos-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 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 ASSERT(columnSetToRemove); 638 ASSERT(columnSetToRemove);
639 ASSERT(!columnSetToRemove->nextSiblingMultiColumnSet()); 639 ASSERT(!columnSetToRemove->nextSiblingMultiColumnSet());
640 } 640 }
641 ASSERT(columnSetToRemove); 641 ASSERT(columnSetToRemove);
642 columnSetToRemove->destroy(); 642 columnSetToRemove->destroy();
643 } 643 }
644 644
645 void LayoutMultiColumnFlowThread::flowThreadDescendantStyleWillChange(LayoutObje ct* descendant, StyleDifference diff, const ComputedStyle& newStyle) 645 void LayoutMultiColumnFlowThread::flowThreadDescendantStyleWillChange(LayoutObje ct* descendant, StyleDifference diff, const ComputedStyle& newStyle)
646 { 646 {
647 // If an in-flow descendant goes out-of-flow, we may have to remove a column set. 647 // If an in-flow descendant goes out-of-flow, we may have to remove a column set.
648 if (descendant->isText()) {
649 // Text nodes inherit all properties from the parent node (including non -inheritable
dsinclair 2015/05/25 13:42:47 Is the larger bug here that we inherit non-inherit
mstensho (USE GERRIT) 2015/05/25 18:25:13 I've been thinking that doing something as crazy a
650 // ones). We don't care what its 'position' is. In fact, we _must_ ignor e it, since the
651 // parent may be the multicol container, and having that accidentally le aked into children
652 // of the multicol is bad.
653 return;
654 }
648 if (newStyle.hasOutOfFlowPosition() && !styleRef().hasOutOfFlowPosition()) 655 if (newStyle.hasOutOfFlowPosition() && !styleRef().hasOutOfFlowPosition())
649 flowThreadDescendantWillBeRemoved(descendant); 656 flowThreadDescendantWillBeRemoved(descendant);
650 } 657 }
651 658
652 void LayoutMultiColumnFlowThread::flowThreadDescendantStyleDidChange(LayoutObjec t* descendant, StyleDifference diff, const ComputedStyle& oldStyle) 659 void LayoutMultiColumnFlowThread::flowThreadDescendantStyleDidChange(LayoutObjec t* descendant, StyleDifference diff, const ComputedStyle& oldStyle)
653 { 660 {
654 // If an out-of-flow descendant goes in-flow, we may have to insert a column set. 661 // If an out-of-flow descendant goes in-flow, we may have to insert a column set.
662 if (descendant->isText()) {
663 // Text nodes inherit all properties from the parent node (including non -inheritable
664 // ones). We don't care what its 'position' is. In fact, we _must_ ignor e it, since the
665 // parent may be the multicol container, and having that accidentally le aked into children
666 // of the multicol is bad.
667 return;
668 }
655 if (oldStyle.hasOutOfFlowPosition() && !styleRef().hasOutOfFlowPosition()) 669 if (oldStyle.hasOutOfFlowPosition() && !styleRef().hasOutOfFlowPosition())
656 flowThreadDescendantWasInserted(descendant); 670 flowThreadDescendantWasInserted(descendant);
657 } 671 }
658 672
659 void LayoutMultiColumnFlowThread::computePreferredLogicalWidths() 673 void LayoutMultiColumnFlowThread::computePreferredLogicalWidths()
660 { 674 {
661 LayoutFlowThread::computePreferredLogicalWidths(); 675 LayoutFlowThread::computePreferredLogicalWidths();
662 676
663 // The min/max intrinsic widths calculated really tell how much space elemen ts need when 677 // The min/max intrinsic widths calculated really tell how much space elemen ts need when
664 // laid out inside the columns. In order to eventually end up with the desir ed column width, 678 // laid out inside the columns. In order to eventually end up with the desir ed column width,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 } 758 }
745 759
746 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const 760 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const
747 { 761 {
748 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) 762 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet())
749 return columnSet->pageLogicalHeight(); 763 return columnSet->pageLogicalHeight();
750 return false; 764 return false;
751 } 765 }
752 766
753 } 767 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/multicol/multicol-becomes-abspos-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698