Commit 6833fb95 authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Chromium LUCI CQ

Don't apply the resize property to generated content

The spec says the behavior is currently undefined and implementations
should not apply the property to generated content. It is still part of
the computed styles, so add a test for that as well.

Bug: 397265
Change-Id: I5391c54c2e3035c90cb5b8db38aa55a77c5ef0b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2584970Reviewed-by: default avatarAnders Hartvoll Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836071}
parent f478c331
......@@ -2154,7 +2154,9 @@ class ComputedStyle : public ComputedStyleBase,
void ClearCursorList();
// Resize utility functions.
bool HasResize() const { return ResizeInternal() != EResize::kNone; }
bool HasResize() const {
return StyleType() == kPseudoIdNone && ResizeInternal() != EResize::kNone;
}
EResize UnresolvedResize() const { return ResizeInternal(); }
EResize Resize(const ComputedStyle& cb_style) const {
......
......@@ -16,6 +16,8 @@ test_computed_value("resize", "none");
test_computed_value("resize", "both");
test_computed_value("resize", "horizontal");
test_computed_value("resize", "vertical");
test_pseudo_computed_value("::before", "resize", "both");
test_pseudo_computed_value("::after", "resize", "vertical");
</script>
</body>
</html>
<!doctype html>
<meta charset="utf-8">
<title>CSS Basic User Interface Test: resize - generated content</title>
<meta name="assert" content="The resize property should not apply to generated content, the behavior is undefined">
<link rel="help" href="http://drafts.csswg.org/css-ui/#resize">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<style>
#test::before {
content: "";
display: block;
width: 100px;
height: 100px;
overflow: hidden;
resize: both;
background: green;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="test"></div>
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