From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/rendering/AutoTableLayout.h | 39 +++++++++++------------------- 1 file changed, 14 insertions(+), 25 deletions(-) (limited to 'Source/WebCore/rendering/AutoTableLayout.h') 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 m_layoutStruct; Vector m_spanCells; bool m_hasPercent : 1; mutable bool m_effectiveLogicalWidthDirty : 1; + LayoutUnit m_scaledWidthFromPercentColumns; }; } // namespace WebCore - -#endif // AutoTableLayout_h -- cgit v1.2.1