| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #include "core/paint/MultiColumnSetPainter.h" | 32 #include "core/paint/MultiColumnSetPainter.h" |
| 33 | 33 |
| 34 namespace blink { | 34 namespace blink { |
| 35 | 35 |
| 36 LayoutMultiColumnSet::LayoutMultiColumnSet(LayoutFlowThread* flowThread) | 36 LayoutMultiColumnSet::LayoutMultiColumnSet(LayoutFlowThread* flowThread) |
| 37 : LayoutRegion(0, flowThread) | 37 : LayoutRegion(0, flowThread) |
| 38 , m_fragmentainerGroups(*this) | 38 , m_fragmentainerGroups(*this) |
| 39 { | 39 { |
| 40 } | 40 } |
| 41 | 41 |
| 42 LayoutMultiColumnSet* LayoutMultiColumnSet::createAnonymous(LayoutFlowThread& fl
owThread, const LayoutStyle& parentStyle) | 42 LayoutMultiColumnSet* LayoutMultiColumnSet::createAnonymous(LayoutFlowThread& fl
owThread, const ComputedStyle& parentStyle) |
| 43 { | 43 { |
| 44 Document& document = flowThread.document(); | 44 Document& document = flowThread.document(); |
| 45 LayoutMultiColumnSet* renderer = new LayoutMultiColumnSet(&flowThread); | 45 LayoutMultiColumnSet* renderer = new LayoutMultiColumnSet(&flowThread); |
| 46 renderer->setDocumentForAnonymous(&document); | 46 renderer->setDocumentForAnonymous(&document); |
| 47 renderer->setStyle(LayoutStyle::createAnonymousStyleWithDisplay(parentStyle,
BLOCK)); | 47 renderer->setStyle(ComputedStyle::createAnonymousStyleWithDisplay(parentStyl
e, BLOCK)); |
| 48 return renderer; | 48 return renderer; |
| 49 } | 49 } |
| 50 | 50 |
| 51 MultiColumnFragmentainerGroup& LayoutMultiColumnSet::fragmentainerGroupAtFlowThr
eadOffset(LayoutUnit) | 51 MultiColumnFragmentainerGroup& LayoutMultiColumnSet::fragmentainerGroupAtFlowThr
eadOffset(LayoutUnit) |
| 52 { | 52 { |
| 53 // FIXME: implement this, once we have support for multiple rows. | 53 // FIXME: implement this, once we have support for multiple rows. |
| 54 return m_fragmentainerGroups.first(); | 54 return m_fragmentainerGroups.first(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 const MultiColumnFragmentainerGroup& LayoutMultiColumnSet::fragmentainerGroupAtF
lowThreadOffset(LayoutUnit) const | 57 const MultiColumnFragmentainerGroup& LayoutMultiColumnSet::fragmentainerGroupAtF
lowThreadOffset(LayoutUnit) const |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const | 286 LayoutRect LayoutMultiColumnSet::flowThreadPortionRect() const |
| 287 { | 287 { |
| 288 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); | 288 LayoutRect portionRect(LayoutUnit(), logicalTopInFlowThread(), pageLogicalWi
dth(), logicalHeightInFlowThread()); |
| 289 if (!isHorizontalWritingMode()) | 289 if (!isHorizontalWritingMode()) |
| 290 return portionRect.transposedRect(); | 290 return portionRect.transposedRect(); |
| 291 return portionRect; | 291 return portionRect; |
| 292 } | 292 } |
| 293 | 293 |
| 294 } | 294 } |
| OLD | NEW |