Commit cfc7e69c authored by Ian Kilpatrick's avatar Ian Kilpatrick Committed by Commit Bot

[LayoutNG] Use StyleRef inside NGBlockNode::GetScrollbarSizes.

Small cleanup - there should be no behaviour change.

Bug: 635619
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ife84f116812fc949f039418168b5d005096c46c2
Reviewed-on: https://chromium-review.googlesource.com/1052208Reviewed-by: default avatarAleks Totic <atotic@chromium.org>
Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557247}
parent 6b6b446d
......@@ -269,18 +269,17 @@ MinMaxSize NGBlockNode::ComputeMinMaxSize(
NGBoxStrut NGBlockNode::GetScrollbarSizes() const {
NGPhysicalBoxStrut sizes;
const ComputedStyle* style = GetLayoutObject()->Style();
if (!style->IsOverflowVisible()) {
const LayoutBox* box = ToLayoutBox(GetLayoutObject());
LayoutUnit vertical = LayoutUnit(box->VerticalScrollbarWidth());
LayoutUnit horizontal = LayoutUnit(box->HorizontalScrollbarHeight());
const ComputedStyle& style = box_->StyleRef();
if (!style.IsOverflowVisible()) {
LayoutUnit vertical = LayoutUnit(box_->VerticalScrollbarWidth());
LayoutUnit horizontal = LayoutUnit(box_->HorizontalScrollbarHeight());
sizes.bottom = horizontal;
if (box->ShouldPlaceBlockDirectionScrollbarOnLogicalLeft())
if (box_->ShouldPlaceBlockDirectionScrollbarOnLogicalLeft())
sizes.left = vertical;
else
sizes.right = vertical;
}
return sizes.ConvertToLogical(style->GetWritingMode(), style->Direction());
return sizes.ConvertToLogical(style.GetWritingMode(), style.Direction());
}
NGLayoutInputNode NGBlockNode::NextSibling() const {
......
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