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

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

Issue 2334873002: [LayoutNG] Don't implement ContainerSize() using the physical constraint space. (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c4be357477675a71fb3df86e2c90aa5bbcbbaf2f..67071df2ca5974cfd554940fb0cd659148f8d8a6 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.h
@@ -26,6 +26,13 @@ struct NGLogicalSize {
LayoutUnit block_size;
NGPhysicalSize ConvertToPhysical(NGWritingMode mode) const;
+ NGLogicalSize ConvertToWritingMode(NGWritingMode current_mode,
+ NGWritingMode new_mode) const {
+ if ((current_mode == HorizontalTopBottom) !=
+ (new_mode == HorizontalTopBottom))
+ return NGLogicalSize(block_size, inline_size);
+ return *this;
+ }
};
// NGLogicalOffset is the position of a rect (typically a fragment) relative to
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698