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

Side by Side Diff: third_party/WebKit/Source/core/layout/TableLayoutAlgorithmFixed.cpp

Issue 2884573002: Replace LayoutTableCell::AbsoluteColumnIndex() with EffectiveColumnIndex()
Patch Set: - Created 3 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
OLDNEW
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, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc.
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 for (LayoutTableCol* col = table_->FirstColumn(); col; 87 for (LayoutTableCol* col = table_->FirstColumn(); col;
88 col = col->NextColumn()) { 88 col = col->NextColumn()) {
89 // LayoutTableCols don't have the concept of preferred logical width, but we 89 // LayoutTableCols don't have the concept of preferred logical width, but we
90 // need to clear their dirty bits so that if we call 90 // need to clear their dirty bits so that if we call
91 // setPreferredWidthsDirty(true) on a col or one of its descendants, we'll 91 // setPreferredWidthsDirty(true) on a col or one of its descendants, we'll
92 // mark it's ancestors as dirty. 92 // mark it's ancestors as dirty.
93 col->ClearPreferredLogicalWidthsDirtyBits(); 93 col->ClearPreferredLogicalWidthsDirtyBits();
94 94
95 // Width specified by column-groups that have column child does not affect 95 // Width specified by column-groups that have column child does not affect
96 // column width in fixed layout tables 96 // column width in fixed layout tables
97 if (col->IsTableColumnGroupWithColumnChildren()) 97 if (!col->IsInnermost())
98 continue; 98 continue;
99 99
100 Length col_style_logical_width = col->Style()->LogicalWidth(); 100 Length col_style_logical_width = col->Style()->LogicalWidth();
101 int effective_col_width = 0; 101 int effective_col_width = 0;
102 if (col_style_logical_width.IsFixed() && 102 if (col_style_logical_width.IsFixed() &&
103 col_style_logical_width.Value() > 0) 103 col_style_logical_width.Value() > 0)
104 effective_col_width = col_style_logical_width.Value(); 104 effective_col_width = col_style_logical_width.Value();
105 105
106 unsigned span = col->Span(); 106 unsigned span = col->Span();
107 while (span) { 107 while (span) {
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 void TableLayoutAlgorithmFixed::WillChangeTableLayout() { 349 void TableLayoutAlgorithmFixed::WillChangeTableLayout() {
350 // When switching table layout algorithm, we need to dirty the preferred 350 // When switching table layout algorithm, we need to dirty the preferred
351 // logical widths as we cleared the bits without computing them. 351 // logical widths as we cleared the bits without computing them.
352 // (see calcWidthArray above.) This optimization is preferred to always 352 // (see calcWidthArray above.) This optimization is preferred to always
353 // computing the logical widths we never intended to use. 353 // computing the logical widths we never intended to use.
354 table_->RecalcSectionsIfNeeded(); 354 table_->RecalcSectionsIfNeeded();
355 table_->MarkAllCellsWidthsDirtyAndOrNeedsLayout(LayoutTable::kMarkDirtyOnly); 355 table_->MarkAllCellsWidthsDirtyAndOrNeedsLayout(LayoutTable::kMarkDirtyOnly);
356 } 356 }
357 357
358 } // namespace blink 358 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698