| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NGUnits_h | 5 #ifndef NGUnits_h |
| 6 #define NGUnits_h | 6 #define NGUnits_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "core/layout/ng/ng_writing_mode.h" | 9 #include "core/layout/ng/ng_writing_mode.h" |
| 10 #include "platform/LayoutUnit.h" | 10 #include "platform/LayoutUnit.h" |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 kFloatRight = 2 | 177 kFloatRight = 2 |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 // Rectangle in logical coordinates the represents this exclusion. | 180 // Rectangle in logical coordinates the represents this exclusion. |
| 181 NGLogicalRect rect; | 181 NGLogicalRect rect; |
| 182 | 182 |
| 183 // Type of this exclusion. | 183 // Type of this exclusion. |
| 184 Type type; | 184 Type type; |
| 185 }; | 185 }; |
| 186 | 186 |
| 187 struct CORE_EXPORT NGExclusions { |
| 188 // Default constructor. |
| 189 NGExclusions(); |
| 190 |
| 191 // Copy constructor. |
| 192 NGExclusions(const NGExclusions& other); |
| 193 |
| 194 Vector<std::unique_ptr<const NGExclusion>> storage; |
| 195 |
| 196 // Last left/right float exclusions are used to enforce the top edge alignment |
| 197 // rule for floats and for the support of CSS "clear" property. |
| 198 const NGExclusion* last_left_float; // Owned by storage. |
| 199 const NGExclusion* last_right_float; // Owned by storage. |
| 200 |
| 201 NGExclusions& operator=(const NGExclusions& other); |
| 202 |
| 203 void Add(const NGExclusion& exclusion); |
| 204 }; |
| 205 |
| 187 struct NGPixelSnappedPhysicalRect { | 206 struct NGPixelSnappedPhysicalRect { |
| 188 int top; | 207 int top; |
| 189 int left; | 208 int left; |
| 190 int width; | 209 int width; |
| 191 int height; | 210 int height; |
| 192 }; | 211 }; |
| 193 | 212 |
| 194 // Struct to store physical dimensions, independent of writing mode and | 213 // Struct to store physical dimensions, independent of writing mode and |
| 195 // direction. | 214 // direction. |
| 196 // See https://drafts.csswg.org/css-writing-modes-3/#abstract-box | 215 // See https://drafts.csswg.org/css-writing-modes-3/#abstract-box |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 | 282 |
| 264 // Struct to represent a simple edge that has start and end. | 283 // Struct to represent a simple edge that has start and end. |
| 265 struct NGEdge { | 284 struct NGEdge { |
| 266 LayoutUnit start; | 285 LayoutUnit start; |
| 267 LayoutUnit end; | 286 LayoutUnit end; |
| 268 }; | 287 }; |
| 269 | 288 |
| 270 } // namespace blink | 289 } // namespace blink |
| 271 | 290 |
| 272 #endif // NGUnits_h | 291 #endif // NGUnits_h |
| OLD | NEW |