Commit 1c535a35 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

[Squad] Use logical width/height override for media controls.

Gets rid of mutable style access from layout.

Bug: 813068
Change-Id: Ie6af46ed9a0be75b692a8443929fe3de1db774df
Reviewed-on: https://chromium-review.googlesource.com/1039571Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555679}
parent fbeb0f5c
......@@ -92,11 +92,8 @@ void LayoutMedia::UpdateLayout() {
LayoutBox* layout_box = ToLayoutBox(child);
layout_box->SetLocation(new_rect.Location());
// TODO(foolip): Remove the mutableStyleRef() and depend on CSS
// width/height: inherit to match the media element size.
layout_box->MutableStyleRef().SetHeight(Length(new_rect.Height(), kFixed));
layout_box->MutableStyleRef().SetWidth(Length(width, kFixed));
layout_box->SetOverrideLogicalWidth(width);
layout_box->SetOverrideLogicalHeight(new_rect.Height());
layout_box->ForceLayout();
}
......
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