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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 class RenderFlowThread: public RenderBlockFlow { | 55 class RenderFlowThread: public RenderBlockFlow { |
56 public: | 56 public: |
57 RenderFlowThread(); | 57 RenderFlowThread(); |
58 virtual ~RenderFlowThread() { }; | 58 virtual ~RenderFlowThread() { }; |
59 | 59 |
60 virtual bool isRenderFlowThread() const override final { return true; } | 60 virtual bool isRenderFlowThread() const override final { return true; } |
61 virtual bool isRenderMultiColumnFlowThread() const { return false; } | 61 virtual bool isRenderMultiColumnFlowThread() const { return false; } |
62 virtual bool isRenderPagedFlowThread() const { return false; } | 62 virtual bool isRenderPagedFlowThread() const { return false; } |
63 | 63 |
| 64 virtual bool supportsPaintInvalidationStateCachedOffsets() const override {
return false; } |
| 65 |
64 virtual void layout() override; | 66 virtual void layout() override; |
65 | 67 |
66 // Always create a RenderLayer for the RenderFlowThread so that we | 68 // Always create a RenderLayer for the RenderFlowThread so that we |
67 // can easily avoid drawing the children directly. | 69 // can easily avoid drawing the children directly. |
68 virtual LayerType layerTypeRequired() const override final { return NormalLa
yer; } | 70 virtual LayerType layerTypeRequired() const override final { return NormalLa
yer; } |
69 | 71 |
70 virtual void flowThreadDescendantWasInserted(RenderObject*) { } | 72 virtual void flowThreadDescendantWasInserted(RenderObject*) { } |
71 | 73 |
72 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override final; | 74 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) override final; |
73 | 75 |
74 virtual void addRegionToThread(RenderMultiColumnSet*) = 0; | 76 virtual void addRegionToThread(RenderMultiColumnSet*) = 0; |
75 virtual void removeRegionFromThread(RenderMultiColumnSet*); | 77 virtual void removeRegionFromThread(RenderMultiColumnSet*); |
76 | 78 |
77 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const override; | 79 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const override; |
78 | 80 |
79 bool hasRegions() const { return m_multiColumnSetList.size(); } | 81 bool hasRegions() const { return m_multiColumnSetList.size(); } |
80 | 82 |
81 void validateRegions(); | 83 void validateRegions(); |
82 void invalidateRegions(); | 84 void invalidateRegions(); |
83 bool hasValidRegionInfo() const { return !m_regionsInvalidated && !m_multiCo
lumnSetList.isEmpty(); } | 85 bool hasValidRegionInfo() const { return !m_regionsInvalidated && !m_multiCo
lumnSetList.isEmpty(); } |
84 | 86 |
85 void paintInvalidationRectangleInRegions(const LayoutRect&) const; | 87 virtual void mapRectToPaintInvalidationBacking(const RenderLayerModelObject*
paintInvalidationContainer, LayoutRect&, const PaintInvalidationState*) const o
verride; |
86 | 88 |
87 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); | 89 LayoutUnit pageLogicalHeightForOffset(LayoutUnit); |
88 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule
= IncludePageBoundary); | 90 LayoutUnit pageRemainingLogicalHeightForOffset(LayoutUnit, PageBoundaryRule
= IncludePageBoundary); |
89 | 91 |
90 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*
/) { } | 92 virtual void setPageBreak(LayoutUnit /*offset*/, LayoutUnit /*spaceShortage*
/) { } |
91 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min
Height*/) { } | 93 virtual void updateMinimumPageHeight(LayoutUnit /*offset*/, LayoutUnit /*min
Height*/) { } |
92 | 94 |
93 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo
gicalHeight; } | 95 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo
gicalHeight; } |
94 | 96 |
95 // FIXME: These 2 functions should return a RenderMultiColumnSet. | 97 // FIXME: These 2 functions should return a RenderMultiColumnSet. |
96 RenderRegion* firstRegion() const; | 98 RenderRegion* firstRegion() const; |
97 RenderRegion* lastRegion() const; | 99 RenderRegion* lastRegion() const; |
98 | 100 |
99 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool
isBefore, LayoutUnit* offsetBreakAdjustment = 0) { return false; } | 101 virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool
isBefore, LayoutUnit* offsetBreakAdjustment = 0) { return false; } |
100 | 102 |
101 virtual bool isPageLogicalHeightKnown() const { return true; } | 103 virtual bool isPageLogicalHeightKnown() const { return true; } |
102 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; } | 104 bool pageLogicalSizeChanged() const { return m_pageLogicalSizeChanged; } |
103 | 105 |
104 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB
ox, const LayoutRect& dirtyRect); | 106 void collectLayerFragments(LayerFragments&, const LayoutRect& layerBoundingB
ox, const LayoutRect& dirtyRect); |
105 LayoutRect fragmentsBoundingBox(const LayoutRect& layerBoundingBox); | 107 LayoutRect fragmentsBoundingBox(const LayoutRect& layerBoundingBox) const; |
106 | 108 |
107 LayoutPoint flowThreadPointToVisualPoint(const LayoutPoint& flowThreadPoint)
const | 109 LayoutPoint flowThreadPointToVisualPoint(const LayoutPoint& flowThreadPoint)
const |
108 { | 110 { |
109 return flowThreadPoint + columnOffset(flowThreadPoint); | 111 return flowThreadPoint + columnOffset(flowThreadPoint); |
110 } | 112 } |
111 | 113 |
112 void pushFlowThreadLayoutState(const RenderObject&); | 114 void pushFlowThreadLayoutState(const RenderObject&); |
113 void popFlowThreadLayoutState(); | 115 void popFlowThreadLayoutState(); |
114 LayoutUnit offsetFromLogicalTopOfFirstRegion(const RenderBlock*) const; | 116 LayoutUnit offsetFromLogicalTopOfFirstRegion(const RenderBlock*) const; |
115 | 117 |
116 // Used to estimate the maximum height of the flow thread. | 118 // Used to estimate the maximum height of the flow thread. |
117 static LayoutUnit maxLogicalHeight() { return LayoutUnit::max() / 2; } | 119 static LayoutUnit maxLogicalHeight() { return LayoutUnit::max() / 2; } |
118 | 120 |
119 protected: | 121 protected: |
120 virtual const char* renderName() const = 0; | 122 virtual const char* renderName() const = 0; |
121 | 123 |
122 void updateRegionsFlowThreadPortionRect(); | 124 void updateRegionsFlowThreadPortionRect(); |
123 bool shouldIssuePaintInvalidations(const LayoutRect&) const; | |
124 | 125 |
125 virtual RenderMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const = 0; | 126 virtual RenderMultiColumnSet* columnSetAtBlockOffset(LayoutUnit) const = 0; |
126 | 127 |
127 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&)
const; | 128 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&)
const; |
128 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); | 129 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); |
129 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); | 130 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); |
130 | 131 |
131 const RenderBox* currentStatePusherRenderBox() const; | 132 const RenderBox* currentStatePusherRenderBox() const; |
132 | 133 |
133 RenderMultiColumnSetList m_multiColumnSetList; | 134 RenderMultiColumnSetList m_multiColumnSetList; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 }; | 188 }; |
188 | 189 |
189 template <> struct ValueToString<RenderMultiColumnSet*> { | 190 template <> struct ValueToString<RenderMultiColumnSet*> { |
190 static String string(const RenderMultiColumnSet* value) { return String::for
mat("%p", value); } | 191 static String string(const RenderMultiColumnSet* value) { return String::for
mat("%p", value); } |
191 }; | 192 }; |
192 #endif | 193 #endif |
193 | 194 |
194 } // namespace blink | 195 } // namespace blink |
195 | 196 |
196 #endif // RenderFlowThread_h | 197 #endif // RenderFlowThread_h |
OLD | NEW |