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

Side by Side Diff: Source/core/layout/TableLayoutAlgorithmAuto.h

Issue 1177653002: Revert "Don't add artifical 1 pixel width to empty tables" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License. 8 * version 2 of the License.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 15 matching lines...) Expand all
26 #include "platform/Length.h" 26 #include "platform/Length.h"
27 #include "wtf/Vector.h" 27 #include "wtf/Vector.h"
28 28
29 namespace blink { 29 namespace blink {
30 30
31 class LayoutTable; 31 class LayoutTable;
32 class LayoutTableCell; 32 class LayoutTableCell;
33 33
34 enum CellsToProcess { 34 enum CellsToProcess {
35 AllCells, 35 AllCells,
36 NonEmptyCells, 36 NonEmptyCells
37 EmptyCells
38 }; 37 };
39 38
40 enum DistributionMode { 39 enum DistributionMode {
41 ExtraWidth, 40 ExtraWidth,
42 InitialWidth, 41 InitialWidth,
43 LeftoverWidth 42 LeftoverWidth
44 }; 43 };
45 44
46 enum DistributionDirection { 45 enum DistributionDirection {
47 StartToEnd, 46 StartToEnd,
(...skipping 21 matching lines...) Expand all
69 void insertSpanCell(LayoutTableCell*); 68 void insertSpanCell(LayoutTableCell*);
70 69
71 struct Layout { 70 struct Layout {
72 Layout() 71 Layout()
73 : minLogicalWidth(0) 72 : minLogicalWidth(0)
74 , maxLogicalWidth(0) 73 , maxLogicalWidth(0)
75 , effectiveMinLogicalWidth(0) 74 , effectiveMinLogicalWidth(0)
76 , effectiveMaxLogicalWidth(0) 75 , effectiveMaxLogicalWidth(0)
77 , computedLogicalWidth(0) 76 , computedLogicalWidth(0)
78 , emptyCellsOnly(true) 77 , emptyCellsOnly(true)
79 , columnHasNoCells(true)
80 { 78 {
81 } 79 }
82 80
83 Length logicalWidth; 81 Length logicalWidth;
84 Length effectiveLogicalWidth; 82 Length effectiveLogicalWidth;
85 int minLogicalWidth; 83 int minLogicalWidth;
86 int maxLogicalWidth; 84 int maxLogicalWidth;
87 int effectiveMinLogicalWidth; 85 int effectiveMinLogicalWidth;
88 int effectiveMaxLogicalWidth; 86 int effectiveMaxLogicalWidth;
89 int computedLogicalWidth; 87 int computedLogicalWidth;
90 bool emptyCellsOnly; 88 bool emptyCellsOnly;
91 bool columnHasNoCells;
92 int clampedEffectiveMaxLogicalWidth() { return std::max<int>(1, effectiv eMaxLogicalWidth); }
93 }; 89 };
94 90
95 Vector<Layout, 4> m_layoutStruct; 91 Vector<Layout, 4> m_layoutStruct;
96 Vector<LayoutTableCell*, 4> m_spanCells; 92 Vector<LayoutTableCell*, 4> m_spanCells;
97 bool m_hasPercent : 1; 93 bool m_hasPercent : 1;
98 mutable bool m_effectiveLogicalWidthDirty : 1; 94 mutable bool m_effectiveLogicalWidthDirty : 1;
99 }; 95 };
100 96
101 } // namespace blink 97 } // namespace blink
102 98
103 #endif // TableLayoutAlgorithmAuto 99 #endif // TableLayoutAlgorithmAuto
OLDNEW
« no previous file with comments | « LayoutTests/tables/mozilla/bugs/bug222336-expected.txt ('k') | Source/core/layout/TableLayoutAlgorithmAuto.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698