| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2002 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2002 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2002 Dirk Mueller (mueller@kde.org) | 3 * (C) 2002 Dirk Mueller (mueller@kde.org) |
| 4 * Copyright (C) 2003, 2006, 2008, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2006, 2008, 2010 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License. | 9 * version 2 of the License. |
| 10 * | 10 * |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // we need to clear their dirty bits so that if we call | 50 // we need to clear their dirty bits so that if we call |
| 51 // setPreferredWidthsDirty(true) on a col or one of its descendants, we'll | 51 // setPreferredWidthsDirty(true) on a col or one of its descendants, we'll |
| 52 // mark it's ancestors as dirty. | 52 // mark it's ancestors as dirty. |
| 53 ToLayoutTableCol(child)->ClearPreferredLogicalWidthsDirtyBits(); | 53 ToLayoutTableCol(child)->ClearPreferredLogicalWidthsDirtyBits(); |
| 54 } else if (child->IsTableSection()) { | 54 } else if (child->IsTableSection()) { |
| 55 LayoutTableSection* section = ToLayoutTableSection(child); | 55 LayoutTableSection* section = ToLayoutTableSection(child); |
| 56 unsigned num_rows = section->NumRows(); | 56 unsigned num_rows = section->NumRows(); |
| 57 for (unsigned i = 0; i < num_rows; i++) { | 57 for (unsigned i = 0; i < num_rows; i++) { |
| 58 if (eff_col >= section->NumCols(i)) | 58 if (eff_col >= section->NumCols(i)) |
| 59 continue; | 59 continue; |
| 60 LayoutTableSection::CellStruct current = section->CellAt(i, eff_col); | 60 auto& grid_cell = section->GridCellAt(i, eff_col); |
| 61 LayoutTableCell* cell = current.PrimaryCell(); | 61 LayoutTableCell* cell = grid_cell.PrimaryCell(); |
| 62 | 62 |
| 63 if (current.in_col_span || !cell) | 63 if (grid_cell.InColSpan() || !cell) |
| 64 continue; | 64 continue; |
| 65 column_layout.column_has_no_cells = false; | 65 column_layout.column_has_no_cells = false; |
| 66 | 66 |
| 67 if (cell->MaxPreferredLogicalWidth()) | 67 if (cell->MaxPreferredLogicalWidth()) |
| 68 column_layout.empty_cells_only = false; | 68 column_layout.empty_cells_only = false; |
| 69 | 69 |
| 70 if (cell->ColSpan() == 1) { | 70 if (cell->ColSpan() == 1) { |
| 71 column_layout.min_logical_width = | 71 column_layout.min_logical_width = |
| 72 std::max<int>(cell->MinPreferredLogicalWidth().ToInt(), | 72 std::max<int>(cell->MinPreferredLogicalWidth().ToInt(), |
| 73 column_layout.min_logical_width); | 73 column_layout.min_logical_width); |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 int reduce = available * min_max_diff / logical_width_beyond_min; | 873 int reduce = available * min_max_diff / logical_width_beyond_min; |
| 874 layout_struct_[i].computed_logical_width += reduce; | 874 layout_struct_[i].computed_logical_width += reduce; |
| 875 available -= reduce; | 875 available -= reduce; |
| 876 logical_width_beyond_min -= min_max_diff; | 876 logical_width_beyond_min -= min_max_diff; |
| 877 if (available >= 0) | 877 if (available >= 0) |
| 878 break; | 878 break; |
| 879 } | 879 } |
| 880 } | 880 } |
| 881 } | 881 } |
| 882 } // namespace blink | 882 } // namespace blink |
| OLD | NEW |