OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above | 8 * 1. Redistributions of source code must retain the above |
9 * copyright notice, this list of conditions and the following | 9 * copyright notice, this list of conditions and the following |
10 * disclaimer. | 10 * disclaimer. |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // can easily avoid drawing the children directly. | 64 // can easily avoid drawing the children directly. |
65 virtual LayerType layerTypeRequired() const override final { return NormalLa
yer; } | 65 virtual LayerType layerTypeRequired() const override final { return NormalLa
yer; } |
66 | 66 |
67 // Skip past a column spanner during flow thread layout. Spanners are not la
id out inside the | 67 // Skip past a column spanner during flow thread layout. Spanners are not la
id out inside the |
68 // flow thread, since the flow thread is not in a spanner's containing block
chain (since the | 68 // flow thread, since the flow thread is not in a spanner's containing block
chain (since the |
69 // containing block is the multicol container). If the spanner follows right
after a column set | 69 // containing block is the multicol container). If the spanner follows right
after a column set |
70 // (as opposed to following another spanner), we may have to stretch the flo
w thread to ensure | 70 // (as opposed to following another spanner), we may have to stretch the flo
w thread to ensure |
71 // completely filled columns in the preceding column set. Return this adjust
ment, if any. | 71 // completely filled columns in the preceding column set. Return this adjust
ment, if any. |
72 virtual LayoutUnit skipColumnSpanner(RenderBox*, LayoutUnit logicalTopInFlow
Thread) { return LayoutUnit(); } | 72 virtual LayoutUnit skipColumnSpanner(RenderBox*, LayoutUnit logicalTopInFlow
Thread) { return LayoutUnit(); } |
73 | 73 |
74 virtual void flowThreadDescendantWasInserted(RenderObject*) { } | 74 virtual void flowThreadDescendantWasInserted(LayoutObject*) { } |
75 virtual void flowThreadDescendantWillBeRemoved(RenderObject*) { } | 75 virtual void flowThreadDescendantWillBeRemoved(LayoutObject*) { } |
76 | 76 |
77 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override final; | 77 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override final; |
78 | 78 |
79 virtual void addRegionToThread(RenderMultiColumnSet*) = 0; | 79 virtual void addRegionToThread(RenderMultiColumnSet*) = 0; |
80 virtual void removeRegionFromThread(RenderMultiColumnSet*); | 80 virtual void removeRegionFromThread(RenderMultiColumnSet*); |
81 | 81 |
82 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const override; | 82 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const override; |
83 | 83 |
84 bool hasRegions() const { return m_multiColumnSetList.size(); } | 84 bool hasRegions() const { return m_multiColumnSetList.size(); } |
85 | 85 |
86 void validateRegions(); | 86 void validateRegions(); |
87 void invalidateRegions(); | 87 void invalidateRegions(); |
88 bool hasValidRegionInfo() const { return !m_regionsInvalidated && !m_multiCo
lumnSetList.isEmpty(); } | 88 bool hasValidRegionInfo() const { return !m_regionsInvalidated && !m_multiCo
lumnSetList.isEmpty(); } |
89 | 89 |
90 virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject*
paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o
verride; | 90 virtual void mapRectToPaintInvalidationBacking(const LayoutLayerModelObject*
paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o
verride; |
91 | 91 |
92 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); | 92 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); |
93 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule
= IncludePageBoundary); | 93 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule
= IncludePageBoundary); |
94 | 94 |
95 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*
/) { } | 95 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*
/) { } |
96 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min
Height*/) { } | 96 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min
Height*/) { } |
97 | 97 |
98 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo
gicalHeight; } | 98 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo
gicalHeight; } |
99 | 99 |
100 // FIXME: These 2 functions should return a RenderMultiColumnSet. | 100 // FIXME: These 2 functions should return a RenderMultiColumnSet. |
101 RenderRegion* firstRegion() const; | 101 RenderRegion* firstRegion() const; |
102 RenderRegion* lastRegion() const; | 102 RenderRegion* lastRegion() const; |
103 | 103 |
104 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool
isBefore, LayoutUnit* offsetBreakAdjustment = 0) { return false; } | 104 virtual bool addForcedRegionBreak(LayoutUnit, LayoutObject* breakChild, bool
isBefore, LayoutUnit* offsetBreakAdjustment = 0) { return false; } |
105 | 105 |
106 virtual bool isPageLogicalHeightKnown() const { return true; } | 106 virtual bool isPageLogicalHeightKnown() const { return true; } |
107 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; } | 107 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; } |
108 | 108 |
109 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB
ox, const LayoutRect& dirtyRect); | 109 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB
ox, const LayoutRect& dirtyRect); |
110 LayoutRect fragmentsBoundingBox(const LayoutRect& layerBoundingBox) const; | 110 LayoutRect fragmentsBoundingBox(const LayoutRect& layerBoundingBox) const; |
111 | 111 |
112 LayoutPoint flowThreadPointToVisualPoint(const LayoutPoint& flowThreadPoint)
const | 112 LayoutPoint flowThreadPointToVisualPoint(const LayoutPoint& flowThreadPoint)
const |
113 { | 113 { |
114 return flowThreadPoint + columnOffset(flowThreadPoint); | 114 return flowThreadPoint + columnOffset(flowThreadPoint); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 RenderMultiColumnSet* m_result; | 148 RenderMultiColumnSet* m_result; |
149 }; | 149 }; |
150 | 150 |
151 MultiColumnSetIntervalTree m_multiColumnSetIntervalTree; | 151 MultiColumnSetIntervalTree m_multiColumnSetIntervalTree; |
152 | 152 |
153 bool m_regionsInvalidated : 1; | 153 bool m_regionsInvalidated : 1; |
154 bool m_regionsHaveUniformLogicalHeight : 1; | 154 bool m_regionsHaveUniformLogicalHeight : 1; |
155 bool m_pageLogicalSizeChanged : 1; | 155 bool m_pageLogicalSizeChanged : 1; |
156 }; | 156 }; |
157 | 157 |
158 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderFlowThread, isRenderFlowThread()); | 158 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(RenderFlowThread, isRenderFlowThread()); |
159 | 159 |
160 // These structures are used by PODIntervalTree for debugging. | 160 // These structures are used by PODIntervalTree for debugging. |
161 #ifndef NDEBUG | 161 #ifndef NDEBUG |
162 template <> struct ValueToString<LayoutUnit> { | 162 template <> struct ValueToString<LayoutUnit> { |
163 static String string(const LayoutUnit value) { return String::number(value.t
oFloat()); } | 163 static String string(const LayoutUnit value) { return String::number(value.t
oFloat()); } |
164 }; | 164 }; |
165 | 165 |
166 template <> struct ValueToString<RenderMultiColumnSet*> { | 166 template <> struct ValueToString<RenderMultiColumnSet*> { |
167 static String string(const RenderMultiColumnSet* value) { return String::for
mat("%p", value); } | 167 static String string(const RenderMultiColumnSet* value) { return String::for
mat("%p", value); } |
168 }; | 168 }; |
169 #endif | 169 #endif |
170 | 170 |
171 } // namespace blink | 171 } // namespace blink |
172 | 172 |
173 #endif // RenderFlowThread_h | 173 #endif // RenderFlowThread_h |
OLD | NEW |