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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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); | |
84 | |
85 void repaintRectangleInRegions(const LayoutRect&) const; | 83 void repaintRectangleInRegions(const LayoutRect&) const; |
86 | 84 |
87 LayoutPoint adjustedPositionRelativeToOffsetParent(const RenderBoxModelObjec
t&, const LayoutPoint&); | 85 LayoutPoint adjustedPositionRelativeToOffsetParent(const RenderBoxModelObjec
t&, const LayoutPoint&); |
88 | 86 |
89 LayoutUnit pageLogicalTopForOffset(LayoutUnit); | 87 LayoutUnit pageLogicalTopForOffset(LayoutUnit); |
90 LayoutUnit pageLogicalWidthForOffset(LayoutUnit); | |
91 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); | 88 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); |
92 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule
= IncludePageBoundary); | 89 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule
= IncludePageBoundary); |
93 | 90 |
94 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*
/) { } | 91 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*
/) { } |
95 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min
Height*/) { } | 92 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min
Height*/) { } |
96 | 93 |
97 enum RegionAutoGenerationPolicy { | 94 enum RegionAutoGenerationPolicy { |
98 AllowRegionAutoGeneration, | 95 AllowRegionAutoGeneration, |
99 DisallowRegionAutoGeneration, | 96 DisallowRegionAutoGeneration, |
100 }; | 97 }; |
101 RenderRegion* regionAtBlockOffset(LayoutUnit, bool extendLastRegion = false,
RegionAutoGenerationPolicy = AllowRegionAutoGeneration); | 98 RenderRegion* regionAtBlockOffset(LayoutUnit, bool extendLastRegion = false,
RegionAutoGenerationPolicy = AllowRegionAutoGeneration); |
102 | 99 |
103 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo
gicalHeight; } | 100 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo
gicalHeight; } |
104 | 101 |
105 RenderRegion* mapFromFlowToRegion(TransformState&) const; | 102 RenderRegion* mapFromFlowToRegion(TransformState&) const; |
106 | 103 |
107 RenderRegion* firstRegion() const; | 104 RenderRegion* firstRegion() const; |
108 RenderRegion* lastRegion() const; | 105 RenderRegion* lastRegion() const; |
109 | 106 |
110 bool previousRegionCountChanged() const { return m_previousRegionCount != m_
regionList.size(); } | |
111 void updatePreviousRegionCount() { m_previousRegionCount = m_regionList.size
(); } | |
112 | |
113 void setRegionRangeForBox(const RenderBox*, LayoutUnit offsetFromLogicalTopO
fFirstPage); | 107 void setRegionRangeForBox(const RenderBox*, LayoutUnit offsetFromLogicalTopO
fFirstPage); |
114 void getRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, Rend
erRegion*& endRegion) const; | 108 void getRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, Rend
erRegion*& endRegion) const; |
115 | 109 |
116 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool
isBefore, LayoutUnit* offsetBreakAdjustment = 0) { return false; } | 110 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool
isBefore, LayoutUnit* offsetBreakAdjustment = 0) { return false; } |
117 void applyBreakAfterContent(LayoutUnit); | 111 void applyBreakAfterContent(LayoutUnit); |
118 | 112 |
119 virtual bool isPageLogicalHeightKnown() const { return true; } | 113 virtual bool isPageLogicalHeightKnown() const { return true; } |
120 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; } | 114 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; } |
121 | 115 |
122 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB
ox, const LayoutRect& dirtyRect); | 116 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB
ox, const LayoutRect& dirtyRect); |
(...skipping 20 matching lines...) Expand all Loading... |
143 | 137 |
144 virtual void autoGenerateRegionsToBlockOffset(LayoutUnit) { } | 138 virtual void autoGenerateRegionsToBlockOffset(LayoutUnit) { } |
145 | 139 |
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; | |
154 | 147 |
155 class RenderRegionRange { | 148 class RenderRegionRange { |
156 public: | 149 public: |
157 RenderRegionRange() | 150 RenderRegionRange() |
158 { | 151 { |
159 setRange(0, 0); | 152 setRange(0, 0); |
160 } | 153 } |
161 | 154 |
162 RenderRegionRange(RenderRegion* start, RenderRegion* end) | 155 RenderRegionRange(RenderRegion* start, RenderRegion* end) |
163 { | 156 { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 }; | 230 }; |
238 | 231 |
239 template <> struct ValueToString<RenderRegion*> { | 232 template <> struct ValueToString<RenderRegion*> { |
240 static String string(const RenderRegion* value) { return String::format("%p"
, value); } | 233 static String string(const RenderRegion* value) { return String::format("%p"
, value); } |
241 }; | 234 }; |
242 #endif | 235 #endif |
243 | 236 |
244 } // namespace WebCore | 237 } // namespace WebCore |
245 | 238 |
246 #endif // RenderFlowThread_h | 239 #endif // RenderFlowThread_h |
OLD | NEW |