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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(par
ent()); } | 59 RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(par
ent()); } |
60 RenderMultiColumnFlowThread* multiColumnFlowThread() const | 60 RenderMultiColumnFlowThread* multiColumnFlowThread() const |
61 { | 61 { |
62 ASSERT_WITH_SECURITY_IMPLICATION(!flowThread() || flowThread()->isRender
MultiColumnFlowThread()); | 62 ASSERT_WITH_SECURITY_IMPLICATION(!flowThread() || flowThread()->isRender
MultiColumnFlowThread()); |
63 return static_cast<RenderMultiColumnFlowThread*>(flowThread()); | 63 return static_cast<RenderMultiColumnFlowThread*>(flowThread()); |
64 } | 64 } |
65 | 65 |
66 RenderMultiColumnSet* nextSiblingMultiColumnSet() const; | 66 RenderMultiColumnSet* nextSiblingMultiColumnSet() const; |
67 | 67 |
| 68 LayoutUnit logicalHeightInFlowThread() const { return isHorizontalWritingMod
e() ? flowThreadPortionRect().height() : flowThreadPortionRect().width(); } |
| 69 |
68 unsigned computedColumnCount() const { return m_computedColumnCount; } | 70 unsigned computedColumnCount() const { return m_computedColumnCount; } |
69 LayoutUnit computedColumnWidth() const { return m_computedColumnWidth; } | 71 LayoutUnit computedColumnWidth() const { return m_computedColumnWidth; } |
70 LayoutUnit computedColumnHeight() const { return m_computedColumnHeight; } | 72 LayoutUnit computedColumnHeight() const { return m_computedColumnHeight; } |
71 | 73 |
72 void setComputedColumnWidthAndCount(LayoutUnit width, unsigned count) | 74 void setComputedColumnWidthAndCount(LayoutUnit width, unsigned count) |
73 { | 75 { |
74 m_computedColumnWidth = width; | 76 m_computedColumnWidth = width; |
75 m_computedColumnCount = count; | 77 m_computedColumnCount = count; |
76 } | 78 } |
77 | 79 |
(...skipping 25 matching lines...) Expand all Loading... |
103 | 105 |
104 void prepareForLayout(); | 106 void prepareForLayout(); |
105 | 107 |
106 // Expand this set's flow thread portion rectangle to contain all trailing f
low thread | 108 // Expand this set's flow thread portion rectangle to contain all trailing f
low thread |
107 // overflow. Only to be called on the last set. | 109 // overflow. Only to be called on the last set. |
108 void expandToEncompassFlowThreadContentsIfNeeded(); | 110 void expandToEncompassFlowThreadContentsIfNeeded(); |
109 | 111 |
110 private: | 112 private: |
111 RenderMultiColumnSet(RenderFlowThread*); | 113 RenderMultiColumnSet(RenderFlowThread*); |
112 | 114 |
| 115 virtual void layout() OVERRIDE; |
113 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; | 116 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; |
114 | 117 |
115 virtual void paintObject(PaintInfo&, const LayoutPoint& paintOffset) OVERRID
E; | 118 virtual void paintObject(PaintInfo&, const LayoutPoint& paintOffset) OVERRID
E; |
116 | 119 |
117 virtual LayoutUnit pageLogicalWidth() const OVERRIDE { return m_computedColu
mnWidth; } | 120 virtual LayoutUnit pageLogicalWidth() const OVERRIDE { return m_computedColu
mnWidth; } |
118 virtual LayoutUnit pageLogicalHeight() const OVERRIDE { return m_computedCol
umnHeight; } | 121 virtual LayoutUnit pageLogicalHeight() const OVERRIDE { return m_computedCol
umnHeight; } |
119 | 122 |
120 virtual LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const OVERRIDE
; | 123 virtual LayoutUnit pageLogicalTopForOffset(LayoutUnit offset) const OVERRIDE
; |
121 | 124 |
122 // FIXME: This will change once we have column sets constrained by enclosing
pages, etc. | 125 virtual LayoutUnit logicalHeightOfAllFlowThreadContent() const OVERRIDE { re
turn logicalHeightInFlowThread(); } |
123 virtual LayoutUnit logicalHeightOfAllFlowThreadContent() const OVERRIDE { re
turn m_computedColumnHeight; } | |
124 | 126 |
125 virtual void repaintFlowThreadContent(const LayoutRect& repaintRect) const O
VERRIDE; | 127 virtual void repaintFlowThreadContent(const LayoutRect& repaintRect) const O
VERRIDE; |
126 | 128 |
127 virtual void collectLayerFragments(LayerFragments&, const LayoutRect& layerB
oundingBox, const LayoutRect& dirtyRect) OVERRIDE; | 129 virtual void collectLayerFragments(LayerFragments&, const LayoutRect& layerB
oundingBox, const LayoutRect& dirtyRect) OVERRIDE; |
128 | 130 |
129 virtual const char* renderName() const OVERRIDE; | 131 virtual const char* renderName() const OVERRIDE; |
130 | 132 |
131 void paintColumnRules(PaintInfo&, const LayoutPoint& paintOffset); | 133 void paintColumnRules(PaintInfo&, const LayoutPoint& paintOffset); |
132 | 134 |
133 LayoutUnit columnGap() const; | 135 LayoutUnit columnGap() const; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 }; | 194 }; |
193 Vector<ContentRun, 1> m_contentRuns; | 195 Vector<ContentRun, 1> m_contentRuns; |
194 }; | 196 }; |
195 | 197 |
196 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSet, isRenderMultiColumnSet()); | 198 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderMultiColumnSet, isRenderMultiColumnSet()); |
197 | 199 |
198 } // namespace WebCore | 200 } // namespace WebCore |
199 | 201 |
200 #endif // RenderMultiColumnSet_h | 202 #endif // RenderMultiColumnSet_h |
201 | 203 |
OLD | NEW |