| OLD | NEW |
| 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 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 // If there were no adjacent spanners, it has to mean that there's only
one column set, | 635 // If there were no adjacent spanners, it has to mean that there's only
one column set, |
| 636 // since it's only spanners that may cause creation of multiple sets. | 636 // since it's only spanners that may cause creation of multiple sets. |
| 637 columnSetToRemove = firstMultiColumnSet(); | 637 columnSetToRemove = firstMultiColumnSet(); |
| 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) |
| 646 { |
| 647 // If an in-flow descendant goes out-of-flow, we may have to remove a column
set. |
| 648 if (newStyle.hasOutOfFlowPosition() && !styleRef().hasOutOfFlowPosition()) |
| 649 flowThreadDescendantWillBeRemoved(descendant); |
| 650 } |
| 651 |
| 652 void LayoutMultiColumnFlowThread::flowThreadDescendantStyleDidChange(LayoutObjec
t* descendant, StyleDifference diff, const ComputedStyle& oldStyle) |
| 653 { |
| 654 // If an out-of-flow descendant goes in-flow, we may have to insert a column
set. |
| 655 if (oldStyle.hasOutOfFlowPosition() && !styleRef().hasOutOfFlowPosition()) |
| 656 flowThreadDescendantWasInserted(descendant); |
| 657 } |
| 658 |
| 645 void LayoutMultiColumnFlowThread::computePreferredLogicalWidths() | 659 void LayoutMultiColumnFlowThread::computePreferredLogicalWidths() |
| 646 { | 660 { |
| 647 LayoutFlowThread::computePreferredLogicalWidths(); | 661 LayoutFlowThread::computePreferredLogicalWidths(); |
| 648 | 662 |
| 649 // The min/max intrinsic widths calculated really tell how much space elemen
ts need when | 663 // The min/max intrinsic widths calculated really tell how much space elemen
ts need when |
| 650 // laid out inside the columns. In order to eventually end up with the desir
ed column width, | 664 // laid out inside the columns. In order to eventually end up with the desir
ed column width, |
| 651 // we need to convert them to values pertaining to the multicol container. | 665 // we need to convert them to values pertaining to the multicol container. |
| 652 const LayoutBlockFlow* multicolContainer = multiColumnBlockFlow(); | 666 const LayoutBlockFlow* multicolContainer = multiColumnBlockFlow(); |
| 653 const ComputedStyle* multicolStyle = multicolContainer->style(); | 667 const ComputedStyle* multicolStyle = multicolContainer->style(); |
| 654 int columnCount = multicolStyle->hasAutoColumnCount() ? 1 : multicolStyle->c
olumnCount(); | 668 int columnCount = multicolStyle->hasAutoColumnCount() ? 1 : multicolStyle->c
olumnCount(); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 } | 744 } |
| 731 | 745 |
| 732 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const | 746 bool LayoutMultiColumnFlowThread::isPageLogicalHeightKnown() const |
| 733 { | 747 { |
| 734 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) | 748 if (LayoutMultiColumnSet* columnSet = lastMultiColumnSet()) |
| 735 return columnSet->pageLogicalHeight(); | 749 return columnSet->pageLogicalHeight(); |
| 736 return false; | 750 return false; |
| 737 } | 751 } |
| 738 | 752 |
| 739 } | 753 } |
| OLD | NEW |