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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); | 88 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); |
89 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule
= IncludePageBoundary); | 89 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule
= IncludePageBoundary); |
90 | 90 |
91 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*
/) { } | 91 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*
/) { } |
92 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min
Height*/) { } | 92 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min
Height*/) { } |
93 | 93 |
94 virtual RenderRegion* regionAtBlockOffset(LayoutUnit) const; | 94 virtual RenderRegion* regionAtBlockOffset(LayoutUnit) const; |
95 | 95 |
96 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo
gicalHeight; } | 96 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo
gicalHeight; } |
97 | 97 |
98 RenderRegion* mapFromFlowToRegion(TransformState&) const; | |
99 | |
100 RenderRegion* firstRegion() const; | 98 RenderRegion* firstRegion() const; |
101 RenderRegion* lastRegion() const; | 99 RenderRegion* lastRegion() const; |
102 | 100 |
103 void setRegionRangeForBox(const RenderBox*, LayoutUnit offsetFromLogicalTopO
fFirstPage); | 101 void setRegionRangeForBox(const RenderBox*, LayoutUnit offsetFromLogicalTopO
fFirstPage); |
104 void getRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, Rend
erRegion*& endRegion) const; | 102 void getRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, Rend
erRegion*& endRegion) const; |
105 | 103 |
106 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool
isBefore, LayoutUnit* offsetBreakAdjustment = 0) { return false; } | 104 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool
isBefore, LayoutUnit* offsetBreakAdjustment = 0) { return false; } |
107 void applyBreakAfterContent(LayoutUnit); | 105 void applyBreakAfterContent(LayoutUnit); |
108 | 106 |
109 virtual bool isPageLogicalHeightKnown() const { return true; } | 107 virtual bool isPageLogicalHeightKnown() const { return true; } |
110 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; } | 108 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; } |
111 | 109 |
112 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB
ox, const LayoutRect& dirtyRect); | 110 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB
ox, const LayoutRect& dirtyRect); |
113 LayoutRect fragmentsBoundingBox(const LayoutRect& layerBoundingBox); | 111 LayoutRect fragmentsBoundingBox(const LayoutRect& layerBoundingBox); |
114 | 112 |
115 void pushFlowThreadLayoutState(const RenderObject&); | 113 void pushFlowThreadLayoutState(const RenderObject&); |
116 void popFlowThreadLayoutState(); | 114 void popFlowThreadLayoutState(); |
117 LayoutUnit offsetFromLogicalTopOfFirstRegion(const RenderBlock*) const; | 115 LayoutUnit offsetFromLogicalTopOfFirstRegion(const RenderBlock*) const; |
118 | 116 |
119 // Used to estimate the maximum height of the flow thread. | 117 // Used to estimate the maximum height of the flow thread. |
120 static LayoutUnit maxLogicalHeight() { return LayoutUnit::max() / 2; } | 118 static LayoutUnit maxLogicalHeight() { return LayoutUnit::max() / 2; } |
121 | 119 |
122 protected: | 120 protected: |
123 virtual const char* renderName() const = 0; | 121 virtual const char* renderName() const = 0; |
124 | 122 |
125 // Overridden by columns/pages to set up an initial logical width of the pag
e width even when | 123 // Overridden by columns/pages to set up an initial logical width of the pag
e width even when |
126 // no regions have been generated yet. | 124 // no regions have been generated yet. |
127 virtual LayoutUnit initialLogicalWidth() const { return 0; }; | 125 virtual LayoutUnit initialLogicalWidth() const { return 0; }; |
128 | 126 |
129 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE FINAL; | |
130 | |
131 void updateRegionsFlowThreadPortionRect(); | 127 void updateRegionsFlowThreadPortionRect(); |
132 bool shouldRepaint(const LayoutRect&) const; | 128 bool shouldRepaint(const LayoutRect&) const; |
133 | 129 |
134 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&)
const; | 130 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&)
const; |
135 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); | 131 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); |
136 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); | 132 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); |
137 | 133 |
138 const RenderBox* currentStatePusherRenderBox() const; | 134 const RenderBox* currentStatePusherRenderBox() const; |
139 | 135 |
140 RenderRegionList m_regionList; | 136 RenderRegionList m_regionList; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 }; | 220 }; |
225 | 221 |
226 template <> struct ValueToString<RenderRegion*> { | 222 template <> struct ValueToString<RenderRegion*> { |
227 static String string(const RenderRegion* value) { return String::format("%p"
, value); } | 223 static String string(const RenderRegion* value) { return String::format("%p"
, value); } |
228 }; | 224 }; |
229 #endif | 225 #endif |
230 | 226 |
231 } // namespace WebCore | 227 } // namespace WebCore |
232 | 228 |
233 #endif // RenderFlowThread_h | 229 #endif // RenderFlowThread_h |
OLD | NEW |