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

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

Issue 1887933002: (CANCELED) Fix TextAutosizer not to scheduleRelayout() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplifiedLayout Created 4 years, 8 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, 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 table = cell->table(); 201 table = cell->table();
202 if (cell->colSpan() > 1 || table->isLogicalWidthAuto()) 202 if (cell->colSpan() > 1 || table->isLogicalWidthAuto())
203 return false; 203 return false;
204 } 204 }
205 NOTREACHED(); 205 NOTREACHED();
206 return true; 206 return true;
207 } 207 }
208 208
209 void TableLayoutAlgorithmAuto::computeIntrinsicLogicalWidths(LayoutUnit& minWidt h, LayoutUnit& maxWidth) 209 void TableLayoutAlgorithmAuto::computeIntrinsicLogicalWidths(LayoutUnit& minWidt h, LayoutUnit& maxWidth)
210 { 210 {
211 TextAutosizer::TableLayoutScope textAutosizerTableLayoutScope(m_table); 211 // TODO(kojii): We should give a SubtreeLayoutScope to TextAutosizer if in
212 // layout, but it's hard to get it here.
cbiesinger 2016/04/15 17:08:08 Hmm yeah that one is tricky...
kojii 2016/04/15 17:58:44 Yeah...or, what we really need is to avoid schedul
213 TextAutosizer::TableLayoutScope textAutosizerTableLayoutScope(m_table, nullp tr);
212 214
213 fullRecalc(); 215 fullRecalc();
214 216
215 int spanMaxLogicalWidth = calcEffectiveLogicalWidth(); 217 int spanMaxLogicalWidth = calcEffectiveLogicalWidth();
216 minWidth = LayoutUnit(); 218 minWidth = LayoutUnit();
217 maxWidth = LayoutUnit(); 219 maxWidth = LayoutUnit();
218 float maxPercent = 0; 220 float maxPercent = 0;
219 float maxNonPercent = 0; 221 float maxNonPercent = 0;
220 bool scaleColumns = shouldScaleColumns(m_table); 222 bool scaleColumns = shouldScaleColumns(m_table);
221 223
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 int reduce = available * minMaxDiff / logicalWidthBeyondMin; 696 int reduce = available * minMaxDiff / logicalWidthBeyondMin;
695 m_layoutStruct[i].computedLogicalWidth += reduce; 697 m_layoutStruct[i].computedLogicalWidth += reduce;
696 available -= reduce; 698 available -= reduce;
697 logicalWidthBeyondMin -= minMaxDiff; 699 logicalWidthBeyondMin -= minMaxDiff;
698 if (available >= 0) 700 if (available >= 0)
699 break; 701 break;
700 } 702 }
701 } 703 }
702 } 704 }
703 } // namespace blink 705 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698