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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_units.h

Issue 2525033002: Deprecate NGPhysicalConstraintSpace (Closed)
Patch Set: Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_units.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_units.h b/third_party/WebKit/Source/core/layout/ng/ng_units.h
index 02774a38c2412371d75d6f23bc351e41b5e1ae3b..2c515e39626d53f217f2a3fc456c0756f13eaaaa 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.h
@@ -184,6 +184,24 @@ struct CORE_EXPORT NGExclusion {
Type type;
};
+struct CORE_EXPORT NGExclusions {
+ Vector<std::unique_ptr<const NGExclusion>> storage;
+
+ // Last left/right float exclusions are used to enforce the top edge alignment
+ // rule for floats and for the support of CSS "clear" property.
+ const NGExclusion* last_left_float; // Owned by storage.
+ const NGExclusion* last_right_float; // Owned by storage.
+
+ void Add(const NGExclusion& exclusion) {
+ storage.append(makeUnique<NGExclusion>(exclusion));
+ if (exclusion.type == NGExclusion::NG_FLOAT_LEFT) {
+ last_left_float = storage.rbegin()->get();
+ } else if (exclusion.type == NGExclusion::NG_FLOAT_RIGHT) {
+ last_right_float = storage.rbegin()->get();
+ }
+ }
+};
+
struct NGPixelSnappedPhysicalRect {
int top;
int left;

Powered by Google App Engine
This is Rietveld 408576698