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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // Always create a RenderLayer for the RenderFlowThread so that we | 65 // Always create a RenderLayer for the RenderFlowThread so that we |
66 // can easily avoid drawing the children directly. | 66 // can easily avoid drawing the children directly. |
67 virtual LayerType layerTypeRequired() const OVERRIDE FINAL { return NormalLa
yer; } | 67 virtual LayerType layerTypeRequired() const OVERRIDE FINAL { return NormalLa
yer; } |
68 | 68 |
69 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE FINAL; | 69 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes
tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct
ion) OVERRIDE FINAL; |
70 | 70 |
71 virtual void addRegionToThread(RenderRegion*) = 0; | 71 virtual void addRegionToThread(RenderRegion*) = 0; |
72 virtual void removeRegionFromThread(RenderRegion*); | 72 virtual void removeRegionFromThread(RenderRegion*); |
73 const RenderRegionList& renderRegionList() const { return m_regionList; } | 73 const RenderRegionList& renderRegionList() const { return m_regionList; } |
74 | 74 |
75 virtual void updateLogicalWidth() OVERRIDE FINAL; | |
76 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; | 75 virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logic
alTop, LogicalExtentComputedValues&) const OVERRIDE; |
77 | 76 |
78 bool hasRegions() const { return m_regionList.size(); } | 77 bool hasRegions() const { return m_regionList.size(); } |
79 | 78 |
80 void validateRegions(); | 79 void validateRegions(); |
81 void invalidateRegions(); | 80 void invalidateRegions(); |
82 bool hasValidRegionInfo() const { return !m_regionsInvalidated && !m_regionL
ist.isEmpty(); } | 81 bool hasValidRegionInfo() const { return !m_regionsInvalidated && !m_regionL
ist.isEmpty(); } |
83 | 82 |
84 void repaintRectangleInRegions(const LayoutRect&) const; | 83 void repaintRectangleInRegions(const LayoutRect&) const; |
85 | 84 |
(...skipping 28 matching lines...) Expand all Loading... |
114 void pushFlowThreadLayoutState(const RenderObject&); | 113 void pushFlowThreadLayoutState(const RenderObject&); |
115 void popFlowThreadLayoutState(); | 114 void popFlowThreadLayoutState(); |
116 LayoutUnit offsetFromLogicalTopOfFirstRegion(const RenderBlock*) const; | 115 LayoutUnit offsetFromLogicalTopOfFirstRegion(const RenderBlock*) const; |
117 | 116 |
118 // Used to estimate the maximum height of the flow thread. | 117 // Used to estimate the maximum height of the flow thread. |
119 static LayoutUnit maxLogicalHeight() { return LayoutUnit::max() / 2; } | 118 static LayoutUnit maxLogicalHeight() { return LayoutUnit::max() / 2; } |
120 | 119 |
121 protected: | 120 protected: |
122 virtual const char* renderName() const = 0; | 121 virtual const char* renderName() const = 0; |
123 | 122 |
124 // Overridden by columns/pages to set up an initial logical width of the pag
e width even when | |
125 // no regions have been generated yet. | |
126 virtual LayoutUnit initialLogicalWidth() const { return 0; }; | |
127 | |
128 void updateRegionsFlowThreadPortionRect(); | 123 void updateRegionsFlowThreadPortionRect(); |
129 bool shouldRepaint(const LayoutRect&) const; | 124 bool shouldRepaint(const LayoutRect&) const; |
130 | 125 |
131 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&)
const; | 126 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&)
const; |
132 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); | 127 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); |
133 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); | 128 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); |
134 | 129 |
135 const RenderBox* currentStatePusherRenderBox() const; | 130 const RenderBox* currentStatePusherRenderBox() const; |
136 | 131 |
137 RenderRegionList m_regionList; | 132 RenderRegionList m_regionList; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 }; | 216 }; |
222 | 217 |
223 template <> struct ValueToString<RenderRegion*> { | 218 template <> struct ValueToString<RenderRegion*> { |
224 static String string(const RenderRegion* value) { return String::format("%p"
, value); } | 219 static String string(const RenderRegion* value) { return String::format("%p"
, value); } |
225 }; | 220 }; |
226 #endif | 221 #endif |
227 | 222 |
228 } // namespace WebCore | 223 } // namespace WebCore |
229 | 224 |
230 #endif // RenderFlowThread_h | 225 #endif // RenderFlowThread_h |
OLD | NEW |