summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/AutoTableLayout.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/rendering/AutoTableLayout.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/rendering/AutoTableLayout.h')
-rw-r--r--Source/WebCore/rendering/AutoTableLayout.h39
1 files changed, 14 insertions, 25 deletions
diff --git a/Source/WebCore/rendering/AutoTableLayout.h b/Source/WebCore/rendering/AutoTableLayout.h
index 4c0c340b2..86729c39b 100644
--- a/Source/WebCore/rendering/AutoTableLayout.h
+++ b/Source/WebCore/rendering/AutoTableLayout.h
@@ -18,8 +18,7 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef AutoTableLayout_h
-#define AutoTableLayout_h
+#pragma once
#include "LayoutUnit.h"
#include "Length.h"
@@ -31,50 +30,40 @@ namespace WebCore {
class RenderTable;
class RenderTableCell;
-class AutoTableLayout : public TableLayout {
+class AutoTableLayout final : public TableLayout {
public:
explicit AutoTableLayout(RenderTable*);
virtual ~AutoTableLayout();
- virtual void computeIntrinsicLogicalWidths(LayoutUnit& minWidth, LayoutUnit& maxWidth) override;
- virtual void applyPreferredLogicalWidthQuirks(LayoutUnit& minWidth, LayoutUnit& maxWidth) const override;
- virtual void layout() override;
+ void computeIntrinsicLogicalWidths(LayoutUnit& minWidth, LayoutUnit& maxWidth) override;
+ LayoutUnit scaledWidthFromPercentColumns() const override { return m_scaledWidthFromPercentColumns; }
+ void applyPreferredLogicalWidthQuirks(LayoutUnit& minWidth, LayoutUnit& maxWidth) const override;
+ void layout() override;
private:
void fullRecalc();
void recalcColumn(unsigned effCol);
- int calcEffectiveLogicalWidth();
+ float calcEffectiveLogicalWidth();
void insertSpanCell(RenderTableCell*);
struct Layout {
- Layout()
- : minLogicalWidth(0)
- , maxLogicalWidth(0)
- , effectiveMinLogicalWidth(0)
- , effectiveMaxLogicalWidth(0)
- , computedLogicalWidth(0)
- , emptyCellsOnly(true)
- {
- }
-
Length logicalWidth;
Length effectiveLogicalWidth;
- int minLogicalWidth;
- int maxLogicalWidth;
- int effectiveMinLogicalWidth;
- int effectiveMaxLogicalWidth;
- int computedLogicalWidth;
- bool emptyCellsOnly;
+ float minLogicalWidth { 0 };
+ float maxLogicalWidth { 0 };
+ float effectiveMinLogicalWidth { 0 };
+ float effectiveMaxLogicalWidth { 0 };
+ float computedLogicalWidth { 0 };
+ bool emptyCellsOnly { true };
};
Vector<Layout, 4> m_layoutStruct;
Vector<RenderTableCell*, 4> m_spanCells;
bool m_hasPercent : 1;
mutable bool m_effectiveLogicalWidthDirty : 1;
+ LayoutUnit m_scaledWidthFromPercentColumns;
};
} // namespace WebCore
-
-#endif // AutoTableLayout_h