Title: [159386] trunk/Source/WebCore
Revision
159386
Author
[email protected]
Date
2013-11-17 10:25:34 -0800 (Sun, 17 Nov 2013)

Log Message

Move LineLayoutState.h into rendering/line
<https://webkit.org/b/124458>

Reviewed by Mihnea Ovidenie.

LineLayoutState is a helper class of RenderBlockLineLayout, so I'm moving it into line subdirectory.

No new tests, no behavior change.

* GNUmakefile.list.am:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/line/LineLayoutState.h: Renamed from Source/WebCore/rendering/LineLayoutState.h.
(WebCore::FloatWithRect::FloatWithRect):
(WebCore::LineLayoutState::LineLayoutState):
(WebCore::LineLayoutState::lineInfo):
(WebCore::LineLayoutState::endLineLogicalTop):
(WebCore::LineLayoutState::setEndLineLogicalTop):
(WebCore::LineLayoutState::endLine):
(WebCore::LineLayoutState::setEndLine):
(WebCore::LineLayoutState::lastFloat):
(WebCore::LineLayoutState::setLastFloat):
(WebCore::LineLayoutState::floats):
(WebCore::LineLayoutState::floatIndex):
(WebCore::LineLayoutState::setFloatIndex):
(WebCore::LineLayoutState::adjustedLogicalLineTop):
(WebCore::LineLayoutState::setAdjustedLogicalLineTop):
(WebCore::LineLayoutState::flowThread):
(WebCore::LineLayoutState::setFlowThread):
(WebCore::LineLayoutState::endLineMatched):
(WebCore::LineLayoutState::setEndLineMatched):
(WebCore::LineLayoutState::checkForFloatsFromLastLine):
(WebCore::LineLayoutState::setCheckForFloatsFromLastLine):
(WebCore::LineLayoutState::markForFullLayout):
(WebCore::LineLayoutState::isFullLayout):
(WebCore::LineLayoutState::usesRepaintBounds):
(WebCore::LineLayoutState::setRepaintRange):
(WebCore::LineLayoutState::updateRepaintRangeFromBox):

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (159385 => 159386)


--- trunk/Source/WebCore/ChangeLog	2013-11-17 17:29:29 UTC (rev 159385)
+++ trunk/Source/WebCore/ChangeLog	2013-11-17 18:25:34 UTC (rev 159386)
@@ -1,3 +1,44 @@
+2013-11-17  Zoltan Horvath  <[email protected]>
+
+        Move LineLayoutState.h into rendering/line
+        <https://webkit.org/b/124458>
+
+        Reviewed by Mihnea Ovidenie.
+
+        LineLayoutState is a helper class of RenderBlockLineLayout, so I'm moving it into line subdirectory.
+
+        No new tests, no behavior change.
+
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/line/LineLayoutState.h: Renamed from Source/WebCore/rendering/LineLayoutState.h.
+        (WebCore::FloatWithRect::FloatWithRect):
+        (WebCore::LineLayoutState::LineLayoutState):
+        (WebCore::LineLayoutState::lineInfo):
+        (WebCore::LineLayoutState::endLineLogicalTop):
+        (WebCore::LineLayoutState::setEndLineLogicalTop):
+        (WebCore::LineLayoutState::endLine):
+        (WebCore::LineLayoutState::setEndLine):
+        (WebCore::LineLayoutState::lastFloat):
+        (WebCore::LineLayoutState::setLastFloat):
+        (WebCore::LineLayoutState::floats):
+        (WebCore::LineLayoutState::floatIndex):
+        (WebCore::LineLayoutState::setFloatIndex):
+        (WebCore::LineLayoutState::adjustedLogicalLineTop):
+        (WebCore::LineLayoutState::setAdjustedLogicalLineTop):
+        (WebCore::LineLayoutState::flowThread):
+        (WebCore::LineLayoutState::setFlowThread):
+        (WebCore::LineLayoutState::endLineMatched):
+        (WebCore::LineLayoutState::setEndLineMatched):
+        (WebCore::LineLayoutState::checkForFloatsFromLastLine):
+        (WebCore::LineLayoutState::setCheckForFloatsFromLastLine):
+        (WebCore::LineLayoutState::markForFullLayout):
+        (WebCore::LineLayoutState::isFullLayout):
+        (WebCore::LineLayoutState::usesRepaintBounds):
+        (WebCore::LineLayoutState::setRepaintRange):
+        (WebCore::LineLayoutState::updateRepaintRangeFromBox):
+
 2013-11-17  Antti Koivisto  <[email protected]>
 
         Simple line path does not respect visibility:hidden

Modified: trunk/Source/WebCore/GNUmakefile.list.am (159385 => 159386)


--- trunk/Source/WebCore/GNUmakefile.list.am	2013-11-17 17:29:29 UTC (rev 159385)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2013-11-17 18:25:34 UTC (rev 159386)
@@ -4305,7 +4305,6 @@
 	Source/WebCore/rendering/LogicalSelectionOffsetCaches.h \
 	Source/WebCore/rendering/LayoutRepainter.h \
 	Source/WebCore/rendering/LayoutRepainter.cpp \
-	Source/WebCore/rendering/LineLayoutState.h \
 	Source/WebCore/rendering/LineWidth.h \
 	Source/WebCore/rendering/LineWidth.cpp \
 	Source/WebCore/rendering/OverlapTestRequestClient.h \
@@ -4515,6 +4514,7 @@
 	Source/WebCore/rendering/line/LineBreaker.h \
 	Source/WebCore/rendering/line/LineBreaker.cpp \
 	Source/WebCore/rendering/line/LineInlineHeaders.h \
+	Source/WebCore/rendering/line/LineLayoutState.h \
 	Source/WebCore/rendering/mathml/RenderMathMLBlock.cpp \
 	Source/WebCore/rendering/mathml/RenderMathMLBlock.h \
 	Source/WebCore/rendering/mathml/RenderMathMLFenced.cpp \

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (159385 => 159386)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2013-11-17 17:29:29 UTC (rev 159385)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2013-11-17 18:25:34 UTC (rev 159386)
@@ -19789,7 +19789,6 @@
     <ClInclude Include="..\rendering\InlineTextBox.h" />
     <ClInclude Include="..\rendering\LayoutRepainter.h" />
     <ClInclude Include="..\rendering\LayoutState.h" />
-    <ClInclude Include="..\rendering\LineLayoutState.h" />
     <ClInclude Include="..\rendering\LineWidth.h" />
     <ClInclude Include="..\rendering\OrderIterator.h" />
     <ClInclude Include="..\rendering\PaintInfo.h" />
@@ -19867,6 +19866,7 @@
     <ClInclude Include="..\rendering\line\LineBreaker.h" />
     <ClInclude Include="..\rendering\line\LineInfo.h" />
     <ClInclude Include="..\rendering\line\LineInlineHeaders.h" />
+    <ClInclude Include="..\rendering\line\LineLayoutState.h" />
     <ClInclude Include="..\rendering\shapes\PolygonShape.h" />
     <ClInclude Include="..\rendering\shapes\RasterShape.h" />
     <ClInclude Include="..\rendering\shapes\RectangleShape.h" />

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (159385 => 159386)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2013-11-17 17:29:29 UTC (rev 159385)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2013-11-17 18:25:34 UTC (rev 159386)
@@ -6306,6 +6306,7 @@
 		FFB698CF183402BB00158A31 /* LineInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FFB698CD1833F17600158A31 /* LineInfo.cpp */; };
 		FFD5B97A135CC97800D5E92A /* PageVisibilityState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FFD5B977135CC97800D5E92A /* PageVisibilityState.cpp */; };
 		FFD5B97B135CC97800D5E92A /* PageVisibilityState.h in Headers */ = {isa = PBXBuildFile; fileRef = FFD5B978135CC97800D5E92A /* PageVisibilityState.h */; settings = {ATTRIBUTES = (Private, ); }; };
+		FFEFAB2A18380DA000514534 /* LineLayoutState.h in Headers */ = {isa = PBXBuildFile; fileRef = FFEFAB2918380DA000514534 /* LineLayoutState.h */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -10215,7 +10216,6 @@
 		A024574E16CEAA27000E5671 /* EXTDrawBuffers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EXTDrawBuffers.cpp; path = canvas/EXTDrawBuffers.cpp; sourceTree = "<group>"; };
 		A024574F16CEAA27000E5671 /* EXTDrawBuffers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EXTDrawBuffers.h; path = canvas/EXTDrawBuffers.h; sourceTree = "<group>"; };
 		A024575016CEAA27000E5671 /* EXTDrawBuffers.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = EXTDrawBuffers.idl; path = canvas/EXTDrawBuffers.idl; sourceTree = "<group>"; };
-		A0718BE817E26F1600F6BF44 /* LineLayoutState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineLayoutState.h; sourceTree = "<group>"; };
 		A07D3353152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLShaderPrecisionFormat.cpp; sourceTree = "<group>"; };
 		A07D3354152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLShaderPrecisionFormat.h; sourceTree = "<group>"; };
 		A07D3357152B632D001B6393 /* WebGLShaderPrecisionFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebGLShaderPrecisionFormat.h; path = canvas/WebGLShaderPrecisionFormat.h; sourceTree = "<group>"; };
@@ -13487,6 +13487,7 @@
 		FFB698CE1833F17600158A31 /* LineInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineInfo.h; sourceTree = "<group>"; };
 		FFD5B977135CC97800D5E92A /* PageVisibilityState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageVisibilityState.cpp; sourceTree = "<group>"; };
 		FFD5B978135CC97800D5E92A /* PageVisibilityState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageVisibilityState.h; sourceTree = "<group>"; };
+		FFEFAB2918380DA000514534 /* LineLayoutState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LineLayoutState.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -20967,7 +20968,6 @@
 				A120ACA013F9983700FE4AC7 /* LayoutRepainter.h */,
 				2D9066040BE141D400956998 /* LayoutState.cpp */,
 				2D9066050BE141D400956998 /* LayoutState.h */,
-				A0718BE817E26F1600F6BF44 /* LineLayoutState.h */,
 				A0CB002317DF81AC0017896B /* LineWidth.cpp */,
 				A0CB002117DE9CD00017896B /* LineWidth.h */,
 				9BA273F3172206BB0097CE47 /* LogicalSelectionOffsetCaches.h */,
@@ -21909,6 +21909,7 @@
 		FFB698C81832F10B00158A31 /* line */ = {
 			isa = PBXGroup;
 			children = (
+				FFEFAB2918380DA000514534 /* LineLayoutState.h */,
 				FFB698CD1833F17600158A31 /* LineInfo.cpp */,
 				FFB698CE1833F17600158A31 /* LineInfo.h */,
 				FFB698CA1833EC3800158A31 /* LineBreaker.cpp */,
@@ -22480,6 +22481,7 @@
 				858C382C0AA8E40500B187A4 /* DOMCSSPrimitiveValue.h in Headers */,
 				85909D290ACC7D5500DF01F1 /* DOMCSSPrimitiveValueInternal.h in Headers */,
 				85032DE10AA8C9BE007D3B7D /* DOMCSSRule.h in Headers */,
+				FFEFAB2A18380DA000514534 /* LineLayoutState.h in Headers */,
 				85B498ED0ADB32FB00925CBB /* DOMCSSRuleInternal.h in Headers */,
 				85032DE30AA8C9BE007D3B7D /* DOMCSSRuleList.h in Headers */,
 				85E711920AC5D5350053270F /* DOMCSSRuleListInternal.h in Headers */,

Deleted: trunk/Source/WebCore/rendering/LineLayoutState.h (159385 => 159386)


--- trunk/Source/WebCore/rendering/LineLayoutState.h	2013-11-17 17:29:29 UTC (rev 159385)
+++ trunk/Source/WebCore/rendering/LineLayoutState.h	2013-11-17 18:25:34 UTC (rev 159386)
@@ -1,147 +0,0 @@
-/*
- * Copyright (C) 2000 Lars Knoll ([email protected])
- * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All right reserved.
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2013 ChangSeok Oh <[email protected]>
- * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer.
- * 2. Redistributions in binary form must reproduce the above
- *    copyright notice, this list of conditions and the following
- *    disclaimer in the documentation and/or other materials
- *    provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef LineLayoutState_h
-#define LineLayoutState_h
-
-#include "LayoutRect.h"
-#include "RenderBox.h"
-
-namespace WebCore {
-
-struct FloatWithRect {
-    FloatWithRect(RenderBox& f)
-        : object(f)
-        , rect(LayoutRect(f.x() - f.marginLeft(), f.y() - f.marginTop(), f.width() + f.marginWidth(), f.height() + f.marginHeight()))
-        , everHadLayout(f.everHadLayout())
-    {
-    }
-
-    RenderBox& object;
-    LayoutRect rect;
-    bool everHadLayout;
-};
-
-// Like LayoutState for layout(), LineLayoutState keeps track of global information
-// during an entire linebox tree layout pass (aka layoutInlineChildren).
-class LineLayoutState {
-public:
-    LineLayoutState(bool fullLayout, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom, RenderFlowThread* flowThread)
-        : m_endLineLogicalTop(0)
-        , m_endLine(0)
-        , m_lastFloat(0)
-        , m_floatIndex(0)
-        , m_adjustedLogicalLineTop(0)
-        , m_flowThread(flowThread)
-        , m_repaintLogicalTop(repaintLogicalTop)
-        , m_repaintLogicalBottom(repaintLogicalBottom)
-        , m_endLineMatched(false)
-        , m_checkForFloatsFromLastLine(false)
-        , m_isFullLayout(fullLayout)
-        , m_usesRepaintBounds(false)
-    {
-    }
-
-    LineInfo& lineInfo() { return m_lineInfo; }
-    const LineInfo& lineInfo() const { return m_lineInfo; }
-
-    LayoutUnit endLineLogicalTop() const { return m_endLineLogicalTop; }
-    void setEndLineLogicalTop(LayoutUnit logicalTop) { m_endLineLogicalTop = logicalTop; }
-
-    RootInlineBox* endLine() const { return m_endLine; }
-    void setEndLine(RootInlineBox* line) { m_endLine = line; }
-
-    FloatingObject* lastFloat() const { return m_lastFloat; }
-    void setLastFloat(FloatingObject* lastFloat) { m_lastFloat = lastFloat; }
-
-    Vector<FloatWithRect>& floats() { return m_floats; }
-
-    unsigned floatIndex() const { return m_floatIndex; }
-    void setFloatIndex(unsigned floatIndex) { m_floatIndex = floatIndex; }
-
-    LayoutUnit adjustedLogicalLineTop() const { return m_adjustedLogicalLineTop; }
-    void setAdjustedLogicalLineTop(LayoutUnit value) { m_adjustedLogicalLineTop = value; }
-
-    RenderFlowThread* flowThread() const { return m_flowThread; }
-    void setFlowThread(RenderFlowThread* thread) { m_flowThread = thread; }
-
-    bool endLineMatched() const { return m_endLineMatched; }
-    void setEndLineMatched(bool endLineMatched) { m_endLineMatched = endLineMatched; }
-
-    bool checkForFloatsFromLastLine() const { return m_checkForFloatsFromLastLine; }
-    void setCheckForFloatsFromLastLine(bool check) { m_checkForFloatsFromLastLine = check; }
-
-    void markForFullLayout() { m_isFullLayout = true; }
-    bool isFullLayout() const { return m_isFullLayout; }
-
-    bool usesRepaintBounds() const { return m_usesRepaintBounds; }
-
-    void setRepaintRange(LayoutUnit logicalHeight)
-    {
-        m_usesRepaintBounds = true;
-        m_repaintLogicalTop = m_repaintLogicalBottom = logicalHeight;
-    }
-
-    void updateRepaintRangeFromBox(RootInlineBox* box, LayoutUnit paginationDelta = 0)
-    {
-        m_usesRepaintBounds = true;
-        m_repaintLogicalTop = std::min(m_repaintLogicalTop, box->logicalTopVisualOverflow() + std::min<LayoutUnit>(paginationDelta, 0));
-        m_repaintLogicalBottom = std::max(m_repaintLogicalBottom, box->logicalBottomVisualOverflow() + std::max<LayoutUnit>(paginationDelta, 0));
-    }
-
-private:
-    LineInfo m_lineInfo;
-    LayoutUnit m_endLineLogicalTop;
-    RootInlineBox* m_endLine;
-
-    FloatingObject* m_lastFloat;
-    Vector<FloatWithRect> m_floats;
-    unsigned m_floatIndex;
-
-    LayoutUnit m_adjustedLogicalLineTop;
-
-    RenderFlowThread* m_flowThread;
-
-    // FIXME: Should this be a range object instead of two ints?
-    LayoutUnit& m_repaintLogicalTop;
-    LayoutUnit& m_repaintLogicalBottom;
-
-    bool m_endLineMatched : 1;
-    bool m_checkForFloatsFromLastLine : 1;
-    bool m_isFullLayout : 1;
-    bool m_usesRepaintBounds : 1;
-};
-
-}
-
-#endif // LineLayoutState_h

Copied: trunk/Source/WebCore/rendering/line/LineLayoutState.h (from rev 159385, trunk/Source/WebCore/rendering/LineLayoutState.h) (0 => 159386)


--- trunk/Source/WebCore/rendering/line/LineLayoutState.h	                        (rev 0)
+++ trunk/Source/WebCore/rendering/line/LineLayoutState.h	2013-11-17 18:25:34 UTC (rev 159386)
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2000 Lars Knoll ([email protected])
+ * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All right reserved.
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ * Copyright (C) 2013 ChangSeok Oh <[email protected]>
+ * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer.
+ * 2. Redistributions in binary form must reproduce the above
+ *    copyright notice, this list of conditions and the following
+ *    disclaimer in the documentation and/or other materials
+ *    provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef LineLayoutState_h
+#define LineLayoutState_h
+
+#include "LayoutRect.h"
+#include "RenderBox.h"
+
+namespace WebCore {
+
+struct FloatWithRect {
+    FloatWithRect(RenderBox& f)
+        : object(f)
+        , rect(LayoutRect(f.x() - f.marginLeft(), f.y() - f.marginTop(), f.width() + f.marginWidth(), f.height() + f.marginHeight()))
+        , everHadLayout(f.everHadLayout())
+    {
+    }
+
+    RenderBox& object;
+    LayoutRect rect;
+    bool everHadLayout;
+};
+
+// Like LayoutState for layout(), LineLayoutState keeps track of global information
+// during an entire linebox tree layout pass (aka layoutInlineChildren).
+class LineLayoutState {
+public:
+    LineLayoutState(bool fullLayout, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom, RenderFlowThread* flowThread)
+        : m_endLineLogicalTop(0)
+        , m_endLine(0)
+        , m_lastFloat(0)
+        , m_floatIndex(0)
+        , m_adjustedLogicalLineTop(0)
+        , m_flowThread(flowThread)
+        , m_repaintLogicalTop(repaintLogicalTop)
+        , m_repaintLogicalBottom(repaintLogicalBottom)
+        , m_endLineMatched(false)
+        , m_checkForFloatsFromLastLine(false)
+        , m_isFullLayout(fullLayout)
+        , m_usesRepaintBounds(false)
+    {
+    }
+
+    LineInfo& lineInfo() { return m_lineInfo; }
+    const LineInfo& lineInfo() const { return m_lineInfo; }
+
+    LayoutUnit endLineLogicalTop() const { return m_endLineLogicalTop; }
+    void setEndLineLogicalTop(LayoutUnit logicalTop) { m_endLineLogicalTop = logicalTop; }
+
+    RootInlineBox* endLine() const { return m_endLine; }
+    void setEndLine(RootInlineBox* line) { m_endLine = line; }
+
+    FloatingObject* lastFloat() const { return m_lastFloat; }
+    void setLastFloat(FloatingObject* lastFloat) { m_lastFloat = lastFloat; }
+
+    Vector<FloatWithRect>& floats() { return m_floats; }
+
+    unsigned floatIndex() const { return m_floatIndex; }
+    void setFloatIndex(unsigned floatIndex) { m_floatIndex = floatIndex; }
+
+    LayoutUnit adjustedLogicalLineTop() const { return m_adjustedLogicalLineTop; }
+    void setAdjustedLogicalLineTop(LayoutUnit value) { m_adjustedLogicalLineTop = value; }
+
+    RenderFlowThread* flowThread() const { return m_flowThread; }
+    void setFlowThread(RenderFlowThread* thread) { m_flowThread = thread; }
+
+    bool endLineMatched() const { return m_endLineMatched; }
+    void setEndLineMatched(bool endLineMatched) { m_endLineMatched = endLineMatched; }
+
+    bool checkForFloatsFromLastLine() const { return m_checkForFloatsFromLastLine; }
+    void setCheckForFloatsFromLastLine(bool check) { m_checkForFloatsFromLastLine = check; }
+
+    void markForFullLayout() { m_isFullLayout = true; }
+    bool isFullLayout() const { return m_isFullLayout; }
+
+    bool usesRepaintBounds() const { return m_usesRepaintBounds; }
+
+    void setRepaintRange(LayoutUnit logicalHeight)
+    {
+        m_usesRepaintBounds = true;
+        m_repaintLogicalTop = m_repaintLogicalBottom = logicalHeight;
+    }
+
+    void updateRepaintRangeFromBox(RootInlineBox* box, LayoutUnit paginationDelta = 0)
+    {
+        m_usesRepaintBounds = true;
+        m_repaintLogicalTop = std::min(m_repaintLogicalTop, box->logicalTopVisualOverflow() + std::min<LayoutUnit>(paginationDelta, 0));
+        m_repaintLogicalBottom = std::max(m_repaintLogicalBottom, box->logicalBottomVisualOverflow() + std::max<LayoutUnit>(paginationDelta, 0));
+    }
+
+private:
+    LineInfo m_lineInfo;
+    LayoutUnit m_endLineLogicalTop;
+    RootInlineBox* m_endLine;
+
+    FloatingObject* m_lastFloat;
+    Vector<FloatWithRect> m_floats;
+    unsigned m_floatIndex;
+
+    LayoutUnit m_adjustedLogicalLineTop;
+
+    RenderFlowThread* m_flowThread;
+
+    // FIXME: Should this be a range object instead of two ints?
+    LayoutUnit& m_repaintLogicalTop;
+    LayoutUnit& m_repaintLogicalBottom;
+
+    bool m_endLineMatched : 1;
+    bool m_checkForFloatsFromLastLine : 1;
+    bool m_isFullLayout : 1;
+    bool m_usesRepaintBounds : 1;
+};
+
+}
+
+#endif // LineLayoutState_h
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to