| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 void removeRenderBoxRegionInfo(RenderBox*); | 119 void removeRenderBoxRegionInfo(RenderBox*); |
| 120 bool logicalWidthChangedInRegions(const RenderBlock*, LayoutUnit offsetFromL
ogicalTopOfFirstPage); | 120 bool logicalWidthChangedInRegions(const RenderBlock*, LayoutUnit offsetFromL
ogicalTopOfFirstPage); |
| 121 | 121 |
| 122 LayoutUnit contentLogicalWidthOfFirstRegion() const; | 122 LayoutUnit contentLogicalWidthOfFirstRegion() const; |
| 123 LayoutUnit contentLogicalHeightOfFirstRegion() const; | 123 LayoutUnit contentLogicalHeightOfFirstRegion() const; |
| 124 LayoutUnit contentLogicalLeftOfFirstRegion() const; | 124 LayoutUnit contentLogicalLeftOfFirstRegion() const; |
| 125 | 125 |
| 126 RenderRegion* firstRegion() const; | 126 RenderRegion* firstRegion() const; |
| 127 RenderRegion* lastRegion() const; | 127 RenderRegion* lastRegion() const; |
| 128 | 128 |
| 129 bool previousRegionCountChanged() const { return m_previousRegionCount != m_
regionList.size(); } |
| 130 void updatePreviousRegionCount() { m_previousRegionCount = m_regionList.size
(); } |
| 131 |
| 129 void setRegionRangeForBox(const RenderBox*, LayoutUnit offsetFromLogicalTopO
fFirstPage); | 132 void setRegionRangeForBox(const RenderBox*, LayoutUnit offsetFromLogicalTopO
fFirstPage); |
| 130 void getRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, Rend
erRegion*& endRegion) const; | 133 void getRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, Rend
erRegion*& endRegion) const; |
| 131 | 134 |
| 132 void clearRenderObjectCustomStyle(const RenderObject*, | 135 void clearRenderObjectCustomStyle(const RenderObject*, |
| 133 const RenderRegion* oldStartRegion = 0, const RenderRegion* oldEndRegion
= 0, | 136 const RenderRegion* oldStartRegion = 0, const RenderRegion* oldEndRegion
= 0, |
| 134 const RenderRegion* newStartRegion = 0, const RenderRegion* newEndRegion
= 0); | 137 const RenderRegion* newStartRegion = 0, const RenderRegion* newEndRegion
= 0); |
| 135 | 138 |
| 136 void computeOverflowStateForRegions(LayoutUnit oldClientAfterEdge); | 139 void computeOversetStateForRegions(LayoutUnit oldClientAfterEdge); |
| 137 | 140 |
| 138 bool overset() const { return m_overset; } | 141 bool overset() const { return m_overset; } |
| 139 | 142 |
| 140 // Check if the object is in region and the region is part of this flow thre
ad. | 143 // Check if the object is in region and the region is part of this flow thre
ad. |
| 141 bool objectInFlowRegion(const RenderObject*, const RenderRegion*) const; | 144 bool objectInFlowRegion(const RenderObject*, const RenderRegion*) const; |
| 142 | 145 |
| 143 void markAutoLogicalHeightRegionsForLayout(); | 146 void markAutoLogicalHeightRegionsForLayout(); |
| 144 | 147 |
| 145 bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool isBefor
e, LayoutUnit* offsetBreakAdjustment = 0); | 148 bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool isBefor
e, LayoutUnit* offsetBreakAdjustment = 0); |
| 146 void applyBreakAfterContent(LayoutUnit); | 149 void applyBreakAfterContent(LayoutUnit); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 174 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE; | 177 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai
ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed =
0) const OVERRIDE; |
| 175 | 178 |
| 176 void updateRegionsFlowThreadPortionRect(const RenderRegion* = 0); | 179 void updateRegionsFlowThreadPortionRect(const RenderRegion* = 0); |
| 177 bool shouldRepaint(const LayoutRect&) const; | 180 bool shouldRepaint(const LayoutRect&) const; |
| 178 bool regionInRange(const RenderRegion* targetRegion, const RenderRegion* sta
rtRegion, const RenderRegion* endRegion) const; | 181 bool regionInRange(const RenderRegion* targetRegion, const RenderRegion* sta
rtRegion, const RenderRegion* endRegion) const; |
| 179 | 182 |
| 180 LayoutRect computeRegionClippingRect(const LayoutPoint&, const LayoutRect&,
const LayoutRect&) const; | 183 LayoutRect computeRegionClippingRect(const LayoutPoint&, const LayoutRect&,
const LayoutRect&) const; |
| 181 | 184 |
| 182 void setDispatchRegionLayoutUpdateEvent(bool value) { m_dispatchRegionLayout
UpdateEvent = value; } | 185 void setDispatchRegionLayoutUpdateEvent(bool value) { m_dispatchRegionLayout
UpdateEvent = value; } |
| 183 bool shouldDispatchRegionLayoutUpdateEvent() { return m_dispatchRegionLayout
UpdateEvent; } | 186 bool shouldDispatchRegionLayoutUpdateEvent() { return m_dispatchRegionLayout
UpdateEvent; } |
| 187 |
| 188 void setDispatchRegionOversetChangeEvent(bool value) { m_dispatchRegionOvers
etChangeEvent = value; } |
| 189 bool shouldDispatchRegionOversetChangeEvent() const { return m_dispatchRegio
nOversetChangeEvent; } |
| 184 | 190 |
| 185 // Override if the flow thread implementation supports dispatching events wh
en the flow layout is updated (e.g. for named flows) | 191 // Override if the flow thread implementation supports dispatching events wh
en the flow layout is updated (e.g. for named flows) |
| 186 virtual void dispatchRegionLayoutUpdateEvent() { m_dispatchRegionLayoutUpdat
eEvent = false; } | 192 virtual void dispatchRegionLayoutUpdateEvent() { m_dispatchRegionLayoutUpdat
eEvent = false; } |
| 193 virtual void dispatchRegionOversetChangeEvent() { m_dispatchRegionOversetCha
ngeEvent = false; } |
| 187 | 194 |
| 188 void initializeRegionsOverrideLogicalContentHeight(RenderRegion* = 0); | 195 void initializeRegionsOverrideLogicalContentHeight(RenderRegion* = 0); |
| 189 | 196 |
| 190 virtual void autoGenerateRegionsToBlockOffset(LayoutUnit) { }; | 197 virtual void autoGenerateRegionsToBlockOffset(LayoutUnit) { }; |
| 191 | 198 |
| 192 RenderRegionList m_regionList; | 199 RenderRegionList m_regionList; |
| 200 unsigned short m_previousRegionCount; |
| 193 | 201 |
| 194 class RenderRegionRange { | 202 class RenderRegionRange { |
| 195 public: | 203 public: |
| 196 RenderRegionRange() | 204 RenderRegionRange() |
| 197 { | 205 { |
| 198 setRange(0, 0); | 206 setRange(0, 0); |
| 199 } | 207 } |
| 200 | 208 |
| 201 RenderRegionRange(RenderRegion* start, RenderRegion* end) | 209 RenderRegionRange(RenderRegion* start, RenderRegion* end) |
| 202 { | 210 { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 unsigned m_autoLogicalHeightRegionsCount; | 258 unsigned m_autoLogicalHeightRegionsCount; |
| 251 | 259 |
| 252 RegionIntervalTree m_regionIntervalTree; | 260 RegionIntervalTree m_regionIntervalTree; |
| 253 | 261 |
| 254 bool m_regionsInvalidated : 1; | 262 bool m_regionsInvalidated : 1; |
| 255 bool m_regionsHaveUniformLogicalWidth : 1; | 263 bool m_regionsHaveUniformLogicalWidth : 1; |
| 256 bool m_regionsHaveUniformLogicalHeight : 1; | 264 bool m_regionsHaveUniformLogicalHeight : 1; |
| 257 bool m_overset : 1; | 265 bool m_overset : 1; |
| 258 bool m_hasRegionsWithStyling : 1; | 266 bool m_hasRegionsWithStyling : 1; |
| 259 bool m_dispatchRegionLayoutUpdateEvent : 1; | 267 bool m_dispatchRegionLayoutUpdateEvent : 1; |
| 268 bool m_dispatchRegionOversetChangeEvent : 1; |
| 260 bool m_pageLogicalSizeChanged : 1; | 269 bool m_pageLogicalSizeChanged : 1; |
| 261 bool m_inConstrainedLayoutPhase : 1; | 270 bool m_inConstrainedLayoutPhase : 1; |
| 262 bool m_needsTwoPhasesLayout : 1; | 271 bool m_needsTwoPhasesLayout : 1; |
| 263 }; | 272 }; |
| 264 | 273 |
| 265 inline RenderFlowThread* toRenderFlowThread(RenderObject* object) | 274 inline RenderFlowThread* toRenderFlowThread(RenderObject* object) |
| 266 { | 275 { |
| 267 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderFlowThread()); | 276 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderFlowThread()); |
| 268 return static_cast<RenderFlowThread*>(object); | 277 return static_cast<RenderFlowThread*>(object); |
| 269 } | 278 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 294 }; | 303 }; |
| 295 | 304 |
| 296 template <> struct ValueToString<RenderRegion*> { | 305 template <> struct ValueToString<RenderRegion*> { |
| 297 static String string(const RenderRegion* value) { return String::format("%p"
, value); } | 306 static String string(const RenderRegion* value) { return String::format("%p"
, value); } |
| 298 }; | 307 }; |
| 299 #endif | 308 #endif |
| 300 | 309 |
| 301 } // namespace WebCore | 310 } // namespace WebCore |
| 302 | 311 |
| 303 #endif // RenderFlowThread_h | 312 #endif // RenderFlowThread_h |
| OLD | NEW |