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

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

Issue 2483683003: [LayoutNG] Split apart storage for AvailableSize and PercentageSize. (Closed)
Patch Set: rebase. 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.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_units.cc b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
index 8fba52f9ad8c5aba69b3afe9daf962dbdba2ea5b..63d4ed9afaa61f162fe8e6ffe275f008067eb05e 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
@@ -50,7 +50,7 @@ String NGLogicalRect::ToString() const {
NGPhysicalOffset NGLogicalOffset::ConvertToPhysical(
NGWritingMode mode,
NGDirection direction,
- NGPhysicalSize container_size,
+ NGPhysicalSize outer_size,
NGPhysicalSize inner_size) const {
switch (mode) {
case HorizontalTopBottom:
@@ -58,30 +58,28 @@ NGPhysicalOffset NGLogicalOffset::ConvertToPhysical(
return NGPhysicalOffset(inline_offset, block_offset);
else
return NGPhysicalOffset(
- container_size.width - inline_offset - inner_size.width,
- block_offset);
+ outer_size.width - inline_offset - inner_size.width, block_offset);
case VerticalRightLeft:
case SidewaysRightLeft:
if (direction == LeftToRight)
return NGPhysicalOffset(
- container_size.width - block_offset - inner_size.width,
- inline_offset);
+ outer_size.width - block_offset - inner_size.width, inline_offset);
else
return NGPhysicalOffset(
- container_size.width - block_offset - inner_size.width,
- container_size.height - inline_offset - inner_size.height);
+ outer_size.width - block_offset - inner_size.width,
+ outer_size.height - inline_offset - inner_size.height);
case VerticalLeftRight:
if (direction == LeftToRight)
return NGPhysicalOffset(block_offset, inline_offset);
else
return NGPhysicalOffset(
block_offset,
- container_size.height - inline_offset - inner_size.height);
+ outer_size.height - inline_offset - inner_size.height);
case SidewaysLeftRight:
if (direction == LeftToRight)
return NGPhysicalOffset(
block_offset,
- container_size.height - inline_offset - inner_size.height);
+ outer_size.height - inline_offset - inner_size.height);
else
return NGPhysicalOffset(block_offset, inline_offset);
default:
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_units.h ('k') | third_party/WebKit/Source/core/layout/ng/ng_units_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698