Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1041)

Unified Diff: Source/core/rendering/RenderPagedFlowThread.cpp

Issue 295373006: [New Multicolumn] Support for paged overflow. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698