OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 #include "core/rendering/RenderPagedFlowThread.h" |
| 7 |
| 8 namespace WebCore { |
| 9 |
| 10 RenderPagedFlowThread* RenderPagedFlowThread::createAnonymous(Document& document
, RenderStyle* parentStyle) |
| 11 { |
| 12 RenderPagedFlowThread* renderer = new RenderPagedFlowThread(); |
| 13 renderer->setDocumentForAnonymous(&document); |
| 14 renderer->setStyle(RenderStyle::createAnonymousStyleWithDisplay(parentStyle,
BLOCK)); |
| 15 return renderer; |
| 16 } |
| 17 |
| 18 const char* RenderPagedFlowThread::renderName() const |
| 19 { |
| 20 return "RenderPagedFlowThread"; |
| 21 } |
| 22 |
| 23 bool RenderPagedFlowThread::needsNewWidth() const |
| 24 { |
| 25 return progressionIsInline() != pagedBlockFlow()->style()->hasInlinePaginati
onAxis(); |
| 26 } |
| 27 |
| 28 void RenderPagedFlowThread::updateLogicalWidth() |
| 29 { |
| 30 // As long as we inherit from RenderMultiColumnFlowThread, we need to bypass
its implementation |
| 31 // here. We're not split into columns, so the flow thread width will just be
whatever is |
| 32 // available in the containing block. |
| 33 RenderFlowThread::updateLogicalWidth(); |
| 34 } |
| 35 |
| 36 void RenderPagedFlowThread::layout() |
| 37 { |
| 38 setProgressionIsInline(pagedBlockFlow()->style()->hasInlinePaginationAxis())
; |
| 39 RenderMultiColumnFlowThread::layout(); |
| 40 } |
| 41 |
| 42 } // namespace WebCore |
OLD | NEW |