Skip to content

Commit

Permalink
[layoutng] Correctly set the exclusion space when cloning
Browse files Browse the repository at this point in the history
Due to variable shadowing the exclusion space was always null after
cloning, causing problems with fragment caching.

R=eae@chromium.org
BUG=635619

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I5aca88fdc693f1ad64848f43a108953bf1fc8f65
Reviewed-on: https://chromium-review.googlesource.com/986992
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547045}
  • Loading branch information
cbiesinger authored and Commit Bot committed Mar 30, 2018
1 parent b2cff99 commit 41daf53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions third_party/WebKit/Source/core/layout/ng/ng_layout_result.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ scoped_refptr<NGLayoutResult> NGLayoutResult::CloneWithoutOffset() const {
// TODO(layoutng) Replace this with DCHECK(exclusion_space_) when
// callers guarantee exclusion_space_ != null.
if (exclusion_space_) {
std::unique_ptr<const NGExclusionSpace> exclusion_space(
std::make_unique<NGExclusionSpace>(*exclusion_space_));
exclusion_space = std::make_unique<NGExclusionSpace>(*exclusion_space_);
}
return base::AdoptRef(new NGLayoutResult(
physical_fragment_->CloneWithoutOffset(), oof_positioned_descendants,
Expand Down

0 comments on commit 41daf53

Please sign in to comment.