Index: Source/core/rendering/RenderPagedFlowThread.cpp |
diff --git a/Source/core/rendering/RenderPagedFlowThread.cpp b/Source/core/rendering/RenderPagedFlowThread.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..08fbb51abd82b802b24151b3cce26fd243733e29 |
--- /dev/null |
+++ b/Source/core/rendering/RenderPagedFlowThread.cpp |
@@ -0,0 +1,42 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "config.h" |
+#include "core/rendering/RenderPagedFlowThread.h" |
+ |
+namespace WebCore { |
+ |
+RenderPagedFlowThread* RenderPagedFlowThread::createAnonymous(Document& document, RenderStyle* parentStyle) |
+{ |
+ RenderPagedFlowThread* renderer = new RenderPagedFlowThread(); |
+ renderer->setDocumentForAnonymous(&document); |
+ renderer->setStyle(RenderStyle::createAnonymousStyleWithDisplay(parentStyle, BLOCK)); |
+ return renderer; |
+} |
+ |
+const char* RenderPagedFlowThread::renderName() const |
+{ |
+ return "RenderPagedFlowThread"; |
+} |
+ |
+bool RenderPagedFlowThread::needsNewWidth() const |
+{ |
+ return progressionIsInline() != pagedBlockFlow()->style()->hasInlinePaginationAxis(); |
+} |
+ |
+void RenderPagedFlowThread::updateLogicalWidth() |
+{ |
+ // As long as we inherit from RenderMultiColumnFlowThread, we need to bypass its implementation |
+ // here. We're not split into columns, so the flow thread width will just be whatever is |
+ // available in the containing block. |
+ RenderFlowThread::updateLogicalWidth(); |
+} |
+ |
+void RenderPagedFlowThread::layout() |
+{ |
+ setProgressionIsInline(pagedBlockFlow()->style()->hasInlinePaginationAxis()); |
+ RenderMultiColumnFlowThread::layout(); |
+} |
+ |
+} // namespace WebCore |