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

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

Issue 988443003: Don't add artifical 1 pixel width to empty tables (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated 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 | Annotate | Revision Log
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
37 }; 38 };
38 39
39 enum DistributionMode { 40 enum DistributionMode {
40 ExtraWidth, 41 ExtraWidth,
41 InitialWidth, 42 InitialWidth,
42 LeftoverWidth 43 LeftoverWidth
43 }; 44 };
44 45
45 enum DistributionDirection { 46 enum DistributionDirection {
46 StartToEnd, 47 StartToEnd,
(...skipping 21 matching lines...) Expand all
68 void insertSpanCell(LayoutTableCell*); 69 void insertSpanCell(LayoutTableCell*);
69 70
70 struct Layout { 71 struct Layout {
71 Layout() 72 Layout()
72 : minLogicalWidth(0) 73 : minLogicalWidth(0)
73 , maxLogicalWidth(0) 74 , maxLogicalWidth(0)
74 , effectiveMinLogicalWidth(0) 75 , effectiveMinLogicalWidth(0)
75 , effectiveMaxLogicalWidth(0) 76 , effectiveMaxLogicalWidth(0)
76 , computedLogicalWidth(0) 77 , computedLogicalWidth(0)
77 , emptyCellsOnly(true) 78 , emptyCellsOnly(true)
79 , columnHasNoCells(true)
78 { 80 {
79 } 81 }
80 82
81 Length logicalWidth; 83 Length logicalWidth;
82 Length effectiveLogicalWidth; 84 Length effectiveLogicalWidth;
83 int minLogicalWidth; 85 int minLogicalWidth;
84 int maxLogicalWidth; 86 int maxLogicalWidth;
85 int effectiveMinLogicalWidth; 87 int effectiveMinLogicalWidth;
86 int effectiveMaxLogicalWidth; 88 int effectiveMaxLogicalWidth;
87 int computedLogicalWidth; 89 int computedLogicalWidth;
88 bool emptyCellsOnly; 90 bool emptyCellsOnly;
91 bool columnHasNoCells;
92 int clampedEffectiveMaxLogicalWidth() { return std::max<int>(1, effectiv eMaxLogicalWidth); }
89 }; 93 };
90 94
91 Vector<Layout, 4> m_layoutStruct; 95 Vector<Layout, 4> m_layoutStruct;
92 Vector<LayoutTableCell*, 4> m_spanCells; 96 Vector<LayoutTableCell*, 4> m_spanCells;
93 bool m_hasPercent : 1; 97 bool m_hasPercent : 1;
94 mutable bool m_effectiveLogicalWidthDirty : 1; 98 mutable bool m_effectiveLogicalWidthDirty : 1;
95 }; 99 };
96 100
97 } // namespace blink 101 } // namespace blink
98 102
99 #endif // TableLayoutAlgorithmAuto 103 #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