| 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 | 335 |
| 336 void LayoutMultiColumnSet::endFlow(LayoutUnit offsetInFlowThread) | 336 void LayoutMultiColumnSet::endFlow(LayoutUnit offsetInFlowThread) |
| 337 { | 337 { |
| 338 // At this point layout is exactly at the end of this set. Store block offse
t from flow thread | 338 // At this point layout is exactly at the end of this set. Store block offse
t from flow thread |
| 339 // start. This set is now considered "flowed", although we may have to revis
it it later (with | 339 // start. This set is now considered "flowed", although we may have to revis
it it later (with |
| 340 // beginFlow()), e.g. if a subtree in the flow thread has to be laid out ove
r again because the | 340 // beginFlow()), e.g. if a subtree in the flow thread has to be laid out ove
r again because the |
| 341 // initial margin collapsing estimates were wrong. | 341 // initial margin collapsing estimates were wrong. |
| 342 m_fragmentainerGroups.last().setLogicalBottomInFlowThread(offsetInFlowThread
); | 342 m_fragmentainerGroups.last().setLogicalBottomInFlowThread(offsetInFlowThread
); |
| 343 } | 343 } |
| 344 | 344 |
| 345 void LayoutMultiColumnSet::styleDidChange(StyleDifference diff, const ComputedSt
yle* oldStyle) |
| 346 { |
| 347 LayoutBlockFlow::styleDidChange(diff, oldStyle); |
| 348 |
| 349 // column-rule is specified on the parent (the multicol container) of this o
bject, but it's the |
| 350 // column sets that are in charge of painting them. A column rule is pretty
much like any other |
| 351 // box decoration, like borders. We need to say that we have box decorations
here, so that the |
| 352 // columnn set is invalidated when it gets laid out. We cannot check here wh
ether the multicol |
| 353 // container actually has a visible column rule or not, because we may not h
ave been inserted |
| 354 // into the tree yet. Painting a column set is cheap anyway, because the onl
y thing it can |
| 355 // paint is the column rule, while actual multicol content is handled by the
flow thread. |
| 356 setHasBoxDecorationBackground(true); |
| 357 } |
| 358 |
| 345 void LayoutMultiColumnSet::layout() | 359 void LayoutMultiColumnSet::layout() |
| 346 { | 360 { |
| 347 if (recalculateColumnHeight()) | 361 if (recalculateColumnHeight()) |
| 348 multiColumnFlowThread()->setColumnHeightsChanged(); | 362 multiColumnFlowThread()->setColumnHeightsChanged(); |
| 349 LayoutBlockFlow::layout(); | 363 LayoutBlockFlow::layout(); |
| 350 } | 364 } |
| 351 | 365 |
| 352 void LayoutMultiColumnSet::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalW
idth, LayoutUnit& maxLogicalWidth) const | 366 void LayoutMultiColumnSet::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalW
idth, LayoutUnit& maxLogicalWidth) const |
| 353 { | 367 { |
| 354 minLogicalWidth = m_flowThread->minPreferredLogicalWidth(); | 368 minLogicalWidth = m_flowThread->minPreferredLogicalWidth(); |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 | 467 |
| 454 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const | 468 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const |
| 455 { | 469 { |
| 456 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); | 470 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); |
| 457 if (!isHorizontalWritingMode()) | 471 if (!isHorizontalWritingMode()) |
| 458 return portionRect.transposedRect(); | 472 return portionRect.transposedRect(); |
| 459 return portionRect; | 473 return portionRect; |
| 460 } | 474 } |
| 461 | 475 |
| 462 } // namespace blink | 476 } // namespace blink |
| OLD | NEW |