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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 virtual bool isRenderFlowThread() const OVERRIDE FINAL { return true; } | 60 virtual bool isRenderFlowThread() const OVERRIDE FINAL { return true; } |
61 | 61 |
62 virtual void layout() OVERRIDE FINAL; | 62 virtual void layout() OVERRIDE FINAL; |
63 | 63 |
64 // Always create a RenderLayer for the RenderFlowThread so that we | 64 // Always create a RenderLayer for the RenderFlowThread so that we |
65 // can easily avoid drawing the children directly. | 65 // can easily avoid drawing the children directly. |
66 virtual LayerType layerTypeRequired() const OVERRIDE FINAL { return NormalLa
yer; } | 66 virtual LayerType layerTypeRequired() const OVERRIDE FINAL { return NormalLa
yer; } |
67 | 67 |
68 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE FINAL; | 68 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE FINAL; |
69 | 69 |
70 virtual void addRegionToThread(RenderRegion*); | 70 virtual void addRegionToThread(RenderRegion*) = 0; |
71 virtual void removeRegionFromThread(RenderRegion*); | 71 virtual void removeRegionFromThread(RenderRegion*); |
72 const RenderRegionList& renderRegionList() const { return m_regionList; } | 72 const RenderRegionList& renderRegionList() const { return m_regionList; } |
73 | 73 |
74 virtual void updateLogicalWidth() OVERRIDE FINAL; | 74 virtual void updateLogicalWidth() OVERRIDE FINAL; |
75 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; | 75 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; |
76 | 76 |
77 bool hasRegions() const { return m_regionList.size(); } | 77 bool hasRegions() const { return m_regionList.size(); } |
78 | 78 |
79 void validateRegions(); | 79 void validateRegions(); |
80 void invalidateRegions(); | 80 void invalidateRegions(); |
81 bool hasValidRegionInfo() const { return !m_regionsInvalidated && !m_regionL
ist.isEmpty(); } | 81 bool hasValidRegionInfo() const { return !m_regionsInvalidated && !m_regionL
ist.isEmpty(); } |
82 | 82 |
83 static PassRefPtr<RenderStyle> createFlowThreadStyle(RenderStyle* parentStyl
e); | 83 static PassRefPtr<RenderStyle> createFlowThreadStyle(RenderStyle* parentStyl
e); |
84 | 84 |
85 void repaintRectangleInRegions(const LayoutRect&) const; | 85 void repaintRectangleInRegions(const LayoutRect&) const; |
86 | 86 |
87 LayoutPoint adjustedPositionRelativeToOffsetParent(const RenderBoxModelObjec
t&, const LayoutPoint&); | 87 LayoutPoint adjustedPositionRelativeToOffsetParent(const RenderBoxModelObjec
t&, const LayoutPoint&); |
88 | 88 |
89 LayoutUnit pageLogicalTopForOffset(LayoutUnit); | 89 LayoutUnit pageLogicalTopForOffset(LayoutUnit); |
90 LayoutUnit pageLogicalWidthForOffset(LayoutUnit); | 90 LayoutUnit pageLogicalWidthForOffset(LayoutUnit); |
91 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); | 91 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); |
92 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule
= IncludePageBoundary); | 92 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule
= IncludePageBoundary); |
93 | 93 |
94 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*
/) { } | 94 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*
/) { } |
95 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min
Height*/) { } | 95 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min
Height*/) { } |
96 | 96 |
97 enum RegionAutoGenerationPolicy { | 97 virtual RenderRegion* regionAtBlockOffset(LayoutUnit); |
98 AllowRegionAutoGeneration, | |
99 DisallowRegionAutoGeneration, | |
100 }; | |
101 RenderRegion* regionAtBlockOffset(LayoutUnit, bool extendLastRegion = false,
RegionAutoGenerationPolicy = AllowRegionAutoGeneration); | |
102 | 98 |
103 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo
gicalHeight; } | 99 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo
gicalHeight; } |
104 | 100 |
105 RenderRegion* mapFromFlowToRegion(TransformState&) const; | 101 RenderRegion* mapFromFlowToRegion(TransformState&) const; |
106 | 102 |
107 RenderRegion* firstRegion() const; | 103 RenderRegion* firstRegion() const; |
108 RenderRegion* lastRegion() const; | 104 RenderRegion* lastRegion() const; |
109 | 105 |
110 bool previousRegionCountChanged() const { return m_previousRegionCount != m_
regionList.size(); } | 106 bool previousRegionCountChanged() const { return m_previousRegionCount != m_
regionList.size(); } |
111 void updatePreviousRegionCount() { m_previousRegionCount = m_regionList.size
(); } | 107 void updatePreviousRegionCount() { m_previousRegionCount = m_regionList.size
(); } |
(...skipping 22 matching lines...) Expand all Loading... |
134 | 130 |
135 // Overridden by columns/pages to set up an initial logical width of the pag
e width even when | 131 // Overridden by columns/pages to set up an initial logical width of the pag
e width even when |
136 // no regions have been generated yet. | 132 // no regions have been generated yet. |
137 virtual LayoutUnit initialLogicalWidth() const { return 0; }; | 133 virtual LayoutUnit initialLogicalWidth() const { return 0; }; |
138 | 134 |
139 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE FINAL; | 135 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE FINAL; |
140 | 136 |
141 void updateRegionsFlowThreadPortionRect(); | 137 void updateRegionsFlowThreadPortionRect(); |
142 bool shouldRepaint(const LayoutRect&) const; | 138 bool shouldRepaint(const LayoutRect&) const; |
143 | 139 |
144 virtual void autoGenerateRegionsToBlockOffset(LayoutUnit) { } | |
145 | |
146 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&)
const; | 140 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&)
const; |
147 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); | 141 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); |
148 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); | 142 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); |
149 | 143 |
150 const RenderBox* currentStatePusherRenderBox() const; | 144 const RenderBox* currentStatePusherRenderBox() const; |
151 | 145 |
152 RenderRegionList m_regionList; | 146 RenderRegionList m_regionList; |
153 unsigned short m_previousRegionCount; | 147 unsigned short m_previousRegionCount; |
154 | 148 |
155 class RenderRegionRange { | 149 class RenderRegionRange { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 }; | 231 }; |
238 | 232 |
239 template <> struct ValueToString<RenderRegion*> { | 233 template <> struct ValueToString<RenderRegion*> { |
240 static String string(const RenderRegion* value) { return String::format("%p"
, value); } | 234 static String string(const RenderRegion* value) { return String::format("%p"
, value); } |
241 }; | 235 }; |
242 #endif | 236 #endif |
243 | 237 |
244 } // namespace WebCore | 238 } // namespace WebCore |
245 | 239 |
246 #endif // RenderFlowThread_h | 240 #endif // RenderFlowThread_h |
OLD | NEW |