Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Side by Side Diff: Source/core/rendering/RenderFlowThread.h

Issue 246403015: [New Multicolumn] Create RenderMultiColumnSet during renderer creation, not during layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/rendering/RenderFlowThread.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 virtual bool isRenderFlowThread() const OVERRIDE FINAL { return true; } 60 virtual bool isRenderFlowThread() const OVERRIDE FINAL { return true; }
61 61
62 virtual void layout() OVERRIDE FINAL; 62 virtual void layout() OVERRIDE FINAL;
63 63
64 // Always create a RenderLayer for the RenderFlowThread so that we 64 // Always create a RenderLayer for the RenderFlowThread so that we
65 // can easily avoid drawing the children directly. 65 // can easily avoid drawing the children directly.
66 virtual LayerType layerTypeRequired() const OVERRIDE FINAL { return NormalLa yer; } 66 virtual LayerType layerTypeRequired() const OVERRIDE FINAL { return NormalLa yer; }
67 67
68 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE FINAL; 68 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) OVERRIDE FINAL;
69 69
70 virtual void addRegionToThread(RenderRegion*); 70 virtual void addRegionToThread(RenderRegion*) = 0;
71 virtual void removeRegionFromThread(RenderRegion*); 71 virtual void removeRegionFromThread(RenderRegion*);
72 const RenderRegionList& renderRegionList() const { return m_regionList; } 72 const RenderRegionList& renderRegionList() const { return m_regionList; }
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 void repaintRectangleInRegions(const LayoutRect&) const; 83 void repaintRectangleInRegions(const LayoutRect&) const;
84 84
85 LayoutPoint adjustedPositionRelativeToOffsetParent(const RenderBoxModelObjec t&, const LayoutPoint&); 85 LayoutPoint adjustedPositionRelativeToOffsetParent(const RenderBoxModelObjec t&, const LayoutPoint&);
86 86
87 LayoutUnit pageLogicalTopForOffset(LayoutUnit); 87 LayoutUnit pageLogicalTopForOffset(LayoutUnit);
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 enum RegionAutoGenerationPolicy { 94 virtual RenderRegion* regionAtBlockOffset(LayoutUnit) const;
95 AllowRegionAutoGeneration,
96 DisallowRegionAutoGeneration,
97 };
98 RenderRegion* regionAtBlockOffset(LayoutUnit, bool extendLastRegion = false, RegionAutoGenerationPolicy = AllowRegionAutoGeneration);
99 95
100 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo gicalHeight; } 96 bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLo gicalHeight; }
101 97
102 RenderRegion* mapFromFlowToRegion(TransformState&) const; 98 RenderRegion* mapFromFlowToRegion(TransformState&) const;
103 99
104 RenderRegion* firstRegion() const; 100 RenderRegion* firstRegion() const;
105 RenderRegion* lastRegion() const; 101 RenderRegion* lastRegion() const;
106 102
107 void setRegionRangeForBox(const RenderBox*, LayoutUnit offsetFromLogicalTopO fFirstPage); 103 void setRegionRangeForBox(const RenderBox*, LayoutUnit offsetFromLogicalTopO fFirstPage);
108 void getRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, Rend erRegion*& endRegion) const; 104 void getRegionRangeForBox(const RenderBox*, RenderRegion*& startRegion, Rend erRegion*& endRegion) const;
(...skipping 19 matching lines...) Expand all
128 124
129 // Overridden by columns/pages to set up an initial logical width of the pag e width even when 125 // Overridden by columns/pages to set up an initial logical width of the pag e width even when
130 // no regions have been generated yet. 126 // no regions have been generated yet.
131 virtual LayoutUnit initialLogicalWidth() const { return 0; }; 127 virtual LayoutUnit initialLogicalWidth() const { return 0; };
132 128
133 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE FINAL; 129 virtual void mapLocalToContainer(const RenderLayerModelObject* repaintContai ner, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = 0) const OVERRIDE FINAL;
134 130
135 void updateRegionsFlowThreadPortionRect(); 131 void updateRegionsFlowThreadPortionRect();
136 bool shouldRepaint(const LayoutRect&) const; 132 bool shouldRepaint(const LayoutRect&) const;
137 133
138 virtual void autoGenerateRegionsToBlockOffset(LayoutUnit) { }
139
140 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&) const; 134 bool cachedOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit&) const;
141 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit); 135 void setOffsetFromLogicalTopOfFirstRegion(const RenderBox*, LayoutUnit);
142 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*); 136 void clearOffsetFromLogicalTopOfFirstRegion(const RenderBox*);
143 137
144 const RenderBox* currentStatePusherRenderBox() const; 138 const RenderBox* currentStatePusherRenderBox() const;
145 139
146 RenderRegionList m_regionList; 140 RenderRegionList m_regionList;
147 141
148 class RenderRegionRange { 142 class RenderRegionRange {
149 public: 143 public:
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 }; 224 };
231 225
232 template <> struct ValueToString<RenderRegion*> { 226 template <> struct ValueToString<RenderRegion*> {
233 static String string(const RenderRegion* value) { return String::format("%p" , value); } 227 static String string(const RenderRegion* value) { return String::format("%p" , value); }
234 }; 228 };
235 #endif 229 #endif
236 230
237 } // namespace WebCore 231 } // namespace WebCore
238 232
239 #endif // RenderFlowThread_h 233 #endif // RenderFlowThread_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/rendering/RenderFlowThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698