Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp |
| index b992f1ba0e910c7ba857d00ef63beb29217b8327..0a8a79a27f780c814a2a59f43de81095763912ca 100644 |
| --- a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp |
| +++ b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp |
| @@ -437,7 +437,14 @@ void MultiColumnFragmentainerGroup::columnIntervalForBlockRangeInFlowThread(Layo |
| logicalBottomInFlowThread = std::min(logicalBottomInFlowThread, this->logicalBottomInFlowThread()); |
| ASSERT(logicalTopInFlowThread <= logicalBottomInFlowThread); |
| firstColumn = columnIndexAtOffset(logicalTopInFlowThread, LayoutBox::AssociateWithLatterPage); |
| - lastColumn = columnIndexAtOffset(logicalBottomInFlowThread, LayoutBox::AssociateWithFormerPage); |
| + if (logicalBottomInFlowThread == logicalTopInFlowThread) { |
| + // Zero-height block range. There'll be one column in the interval. Set it right away. This |
| + // is important if we're at a column boundary, since calling columnIndexAtOffset() with the |
| + // end-exclusive bottom offset would actually give us the *previous* column. |
| + lastColumn = firstColumn; |
|
mstensho (USE GERRIT)
2016/09/28 19:58:55
There's something fishy about this whole PageBound
eae
2016/09/28 20:55:17
Yeah, this smells bad. Would you mind filing a bug
mstensho (USE GERRIT)
2016/09/28 21:20:23
Good idea! crbug.com/651213
|
| + } else { |
| + lastColumn = columnIndexAtOffset(logicalBottomInFlowThread, LayoutBox::AssociateWithFormerPage); |
| + } |
| } |
| void MultiColumnFragmentainerGroup::columnIntervalForVisualRect(const LayoutRect& rect, unsigned& firstColumn, unsigned& lastColumn) const |