Commit 6f8d7da0 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

[Squad] Clone ComputedStyle before changing for overscroll test.

To prepare for immutable ComputedStyle objects.

Bug: 813068
Change-Id: Id5b4a57940712adfc9d353634856bc32e4ef2a0d
Reviewed-on: https://chromium-review.googlesource.com/979810Reviewed-by: default avatarStefan Zager <szager@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545867}
parent faee7beb
...@@ -61,8 +61,11 @@ void OverscrollBehaviorTest::SetUp() { ...@@ -61,8 +61,11 @@ void OverscrollBehaviorTest::SetUp() {
void OverscrollBehaviorTest::SetInnerOverscrollBehavior(EOverscrollBehavior x, void OverscrollBehaviorTest::SetInnerOverscrollBehavior(EOverscrollBehavior x,
EOverscrollBehavior y) { EOverscrollBehavior y) {
Element* inner = GetDocument().getElementById("inner"); Element* inner = GetDocument().getElementById("inner");
inner->MutableComputedStyle()->SetOverscrollBehaviorX(x); scoped_refptr<ComputedStyle> modified_style =
inner->MutableComputedStyle()->SetOverscrollBehaviorY(y); ComputedStyle::Clone(*inner->GetComputedStyle());
modified_style->SetOverscrollBehaviorX(x);
modified_style->SetOverscrollBehaviorY(y);
inner->GetLayoutObject()->SetStyle(std::move(modified_style));
} }
void OverscrollBehaviorTest::ScrollBegin(double hint_x, double hint_y) { void OverscrollBehaviorTest::ScrollBegin(double hint_x, double hint_y) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment