Commit 1fcdb80c authored by Ian Kilpatrick's avatar Ian Kilpatrick Committed by Commit Bot

[webkit-box] Re-attach layout tree when "-webkit-box" with line-clamp goes horizontal.

In https://chromium-review.googlesource.com/1954925 we added a DCHECK
to ensure that a LayoutDeprecatedFlexibleBox was only having layout
performed when it had "-webkit-box-orient: vertical".

This failed external/wpt/css/css-overflow/webkit-line-clamp-026.html
as we weren't reattaching the layout tree when we had a "-webkit-box"
with "-webkit-line-clamp", which then had its "-webkit-orient" set to
"horizontal".

This patch ensures that we reattach the layout-tree in this case.

Bug: 993813
Change-Id: Ifa176010ce53804fc3d055983564eb126355d4f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1975307Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726435}
parent 611431e8
...@@ -220,11 +220,9 @@ bool ComputedStyle::NeedsReattachLayoutTree(const ComputedStyle* old_style, ...@@ -220,11 +220,9 @@ bool ComputedStyle::NeedsReattachLayoutTree(const ComputedStyle* old_style,
// line-clamping is currently only handled by LayoutDeprecatedFlexibleBox, // line-clamping is currently only handled by LayoutDeprecatedFlexibleBox,
// so that if line-clamping changes then the LayoutObject needs to be // so that if line-clamping changes then the LayoutObject needs to be
// recreated. // recreated.
if (new_style->IsDeprecatedWebkitBox() && if (old_style->IsDeprecatedFlexboxUsingFlexLayout() !=
(old_style->HasLineClamp() != new_style->HasLineClamp() && new_style->IsDeprecatedFlexboxUsingFlexLayout())
new_style->BoxOrient() == EBoxOrient::kVertical)) {
return true; return true;
}
// We need to perform a reattach if a "display: layout(foo)" has changed to a // We need to perform a reattach if a "display: layout(foo)" has changed to a
// "display: layout(bar)". This is because one custom layout could be // "display: layout(bar)". This is because one custom layout could be
// registered and the other may not, affecting the box-tree construction. // registered and the other may not, affecting the box-tree construction.
......
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