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

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

Issue 2651793013: Fix incorrectly calculated size/position information for writing-modes (Closed)
Patch Set: git rebase-update Created 3 years, 10 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.h ('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_constraint_space_builder.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
index e35cee1649d36187cc10c7ce69b6f8c22d636783..141a3d5da6ec335c285ef58a3e7ed52f6105582a 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
@@ -14,7 +14,7 @@ NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(
percentage_resolution_size_(parent_space->PercentageResolutionSize()),
fragmentainer_space_available_(NGSizeIndefinite),
writing_mode_(parent_space->WritingMode()),
- parent_writing_mode_(writing_mode_),
+ parent_writing_mode_(parent_space->WritingMode()),
is_fixed_size_inline_(false),
is_fixed_size_block_(false),
is_shrink_to_fit_(false),
@@ -117,18 +117,11 @@ NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetWritingMode(
}
NGConstraintSpace* NGConstraintSpaceBuilder::ToConstraintSpace() {
- // Exclusions do not pass the formatting context boundary.
- std::shared_ptr<NGExclusions> exclusions(
- is_new_fc_ ? std::make_shared<NGExclusions>() : exclusions_);
-
// Whether the child and the containing block are parallel to each other.
// Example: vertical-rl and vertical-lr
bool is_in_parallel_flow = (parent_writing_mode_ == kHorizontalTopBottom) ==
(writing_mode_ == kHorizontalTopBottom);
- NGMarginStrut margin_strut = is_new_fc_ ? NGMarginStrut() : margin_strut_;
- NGLogicalOffset bfc_offset = is_new_fc_ ? NGLogicalOffset() : bfc_offset_;
-
if (is_in_parallel_flow) {
return new NGConstraintSpace(
static_cast<NGWritingMode>(writing_mode_),
@@ -141,7 +134,7 @@ NGConstraintSpace* NGConstraintSpaceBuilder::ToConstraintSpace() {
is_inline_direction_triggers_scrollbar_,
is_block_direction_triggers_scrollbar_,
static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_,
- margin_strut, bfc_offset, exclusions);
+ margin_strut_, bfc_offset_, exclusions_);
}
return new NGConstraintSpace(
@@ -155,7 +148,7 @@ NGConstraintSpace* NGConstraintSpaceBuilder::ToConstraintSpace() {
is_block_direction_triggers_scrollbar_,
is_inline_direction_triggers_scrollbar_,
static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_,
- margin_strut, bfc_offset, exclusions);
+ margin_strut_, bfc_offset_, exclusions_);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698