Initial patch.
[vuplus_webkit] / Source / WebCore / rendering / LayoutState.cpp
index 354b5bf..07fdfda 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "ColumnInfo.h"
 #include "RenderArena.h"
+#include "RenderFlowThread.h"
 #include "RenderInline.h"
 #include "RenderLayer.h"
 #include "RenderView.h"
@@ -82,7 +83,7 @@ LayoutState::LayoutState(LayoutState* prev, RenderBox* renderer, const LayoutSiz
 
     // If we establish a new page height, then cache the offset to the top of the first page.
     // We can compare this later on to figure out what part of the page we're actually on,
-    if (pageLogicalHeight || m_columnInfo || renderer->isRenderFlowThread()) {
+    if (pageLogicalHeight || m_columnInfo) {
         m_pageLogicalHeight = pageLogicalHeight;
         m_pageOffset = LayoutSize(m_layoutOffset.width() + renderer->borderLeft() + renderer->paddingLeft(),
                                m_layoutOffset.height() + renderer->borderTop() + renderer->paddingTop());
@@ -103,11 +104,30 @@ LayoutState::LayoutState(LayoutState* prev, RenderBox* renderer, const LayoutSiz
 
     m_layoutDelta = m_next->m_layoutDelta;
     
+    m_isPaginated = m_pageLogicalHeight || m_columnInfo;
+    
     // FIXME: <http://bugs.webkit.org/show_bug.cgi?id=13443> Apply control clip if present.
 }
 
+LayoutState::LayoutState(LayoutState* prev, RenderFlowThread* flowThread)
+    : m_clipped(false)
+    , m_isPaginated(true)
+    , m_pageLogicalHeight(1) // Use a fake height here. That value is not important, just needs to be non-zero.
+    , m_pageLogicalHeightChanged(false)
+    , m_columnInfo(0)
+    , m_next(prev)
+#ifndef NDEBUG
+    , m_renderer(flowThread)
+#endif
+{
+#ifdef NDEBUG
+    UNUSED_PARAM(flowThread);
+#endif
+}
+
 LayoutState::LayoutState(RenderObject* root)
     : m_clipped(false)
+    , m_isPaginated(false)
     , m_pageLogicalHeight(0)
     , m_pageLogicalHeightChanged(false)
     , m_columnInfo(0)