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

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

Issue 17176018: [CSS Regions] Add new regionOversetChange event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Integrated styling fixes Created 7 years, 6 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 | « Source/core/rendering/RenderNamedFlowThread.cpp ('k') | Source/core/rendering/RenderRegion.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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 PassOwnPtr<RenderBoxRegionInfo> takeRenderBoxRegionInfo(const RenderBox*); 75 PassOwnPtr<RenderBoxRegionInfo> takeRenderBoxRegionInfo(const RenderBox*);
76 void removeRenderBoxRegionInfo(const RenderBox*); 76 void removeRenderBoxRegionInfo(const RenderBox*);
77 77
78 void deleteAllRenderBoxRegionInfo(); 78 void deleteAllRenderBoxRegionInfo();
79 79
80 bool isFirstRegion() const; 80 bool isFirstRegion() const;
81 bool isLastRegion() const; 81 bool isLastRegion() const;
82 82
83 void clearObjectStyleInRegion(const RenderObject*); 83 void clearObjectStyleInRegion(const RenderObject*);
84 84
85 enum RegionState { 85 RegionOversetState regionOversetState() const;
86 RegionUndefined, 86 void setRegionOversetState(RegionOversetState);
87 RegionEmpty,
88 RegionFit,
89 RegionOverset
90 };
91
92 RegionState regionState() const { return isValid() ? m_regionState : RegionU ndefined; }
93 void setRegionState(RegionState regionState) { m_regionState = regionState; }
94 87
95 // These methods represent the width and height of a "page" and for a Render Region they are just the 88 // These methods represent the width and height of a "page" and for a Render Region they are just the
96 // content width and content height of a region. For RenderRegionSets, howev er, they will be the width and 89 // content width and content height of a region. For RenderRegionSets, howev er, they will be the width and
97 // height of a single column or page in the set. 90 // height of a single column or page in the set.
98 virtual LayoutUnit pageLogicalWidth() const; 91 virtual LayoutUnit pageLogicalWidth() const;
99 virtual LayoutUnit pageLogicalHeight() const; 92 virtual LayoutUnit pageLogicalHeight() const;
100 LayoutUnit maxPageLogicalHeight() const; 93 LayoutUnit maxPageLogicalHeight() const;
101 94
102 LayoutUnit logicalTopOfFlowThreadContentRect(const LayoutRect&) const; 95 LayoutUnit logicalTopOfFlowThreadContentRect(const LayoutRect&) const;
103 LayoutUnit logicalBottomOfFlowThreadContentRect(const LayoutRect&) const; 96 LayoutUnit logicalBottomOfFlowThreadContentRect(const LayoutRect&) const;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 RefPtr<RenderStyle> style; 183 RefPtr<RenderStyle> style;
191 // True if the computed style in region is cached. 184 // True if the computed style in region is cached.
192 bool cached; 185 bool cached;
193 }; 186 };
194 typedef HashMap<const RenderObject*, ObjectRegionStyleInfo > RenderObjectReg ionStyleMap; 187 typedef HashMap<const RenderObject*, ObjectRegionStyleInfo > RenderObjectReg ionStyleMap;
195 RenderObjectRegionStyleMap m_renderObjectRegionStyle; 188 RenderObjectRegionStyleMap m_renderObjectRegionStyle;
196 189
197 bool m_isValid : 1; 190 bool m_isValid : 1;
198 bool m_hasCustomRegionStyle : 1; 191 bool m_hasCustomRegionStyle : 1;
199 bool m_hasAutoLogicalHeight : 1; 192 bool m_hasAutoLogicalHeight : 1;
200 RegionState m_regionState;
201 }; 193 };
202 194
203 inline RenderRegion* toRenderRegion(RenderObject* object) 195 inline RenderRegion* toRenderRegion(RenderObject* object)
204 { 196 {
205 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderRegion()); 197 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderRegion());
206 return static_cast<RenderRegion*>(object); 198 return static_cast<RenderRegion*>(object);
207 } 199 }
208 200
209 inline const RenderRegion* toRenderRegion(const RenderObject* object) 201 inline const RenderRegion* toRenderRegion(const RenderObject* object)
210 { 202 {
211 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderRegion()); 203 ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderRegion());
212 return static_cast<const RenderRegion*>(object); 204 return static_cast<const RenderRegion*>(object);
213 } 205 }
214 206
215 // This will catch anyone doing an unnecessary cast. 207 // This will catch anyone doing an unnecessary cast.
216 void toRenderRegion(const RenderRegion*); 208 void toRenderRegion(const RenderRegion*);
217 209
218 } // namespace WebCore 210 } // namespace WebCore
219 211
220 #endif // RenderRegion_h 212 #endif // RenderRegion_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderNamedFlowThread.cpp ('k') | Source/core/rendering/RenderRegion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698