Automatic update from web-platform-tests [Gap Decorations]: Disentangle resolved -width values from -style This CL decouples the resolved value of outline-width and column-rule-width from their corresponding *-style properties. The second part of the CSSWG resolution[1], stipulates that the resolved value for these properties should now be independent of the *-style. Most file changes in this CL involve updating tests to reflect this new behavior. To simplify reverting in the case of a web compat issue, a virtual test suite with the flag disabled and relevant tests as base has been set up. A subsequent CL will be put up to set up use counters to evaluate potential web compat risks associated with this change [1]: https://github.com/w3c/csswg-drafts/issues/11494#issuecomment-2675800489 Bug: 393631108 Change-Id: I241d253b14493f45dc6b143286bfa031261fac27 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6909751 Reviewed-by: Kevin Babbitt <kbabbitt@microsoft.com> Commit-Queue: Sam Davis Omekara <samomekarajr@microsoft.com> Reviewed-by: Alison Maher <almaher@microsoft.com> Reviewed-by: Philip Rogers <pdr@chromium.org> Cr-Commit-Position: refs/heads/main@{#1516261} -- wpt-commits: 7f15bbaf0b6d43a99ba964e42649bc3878e9b819 wpt-pr: 54881
46 lines
1.6 KiB
HTML
46 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>CSS UI Level 3: getComputedStyle().outlineWidth</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-ui-3/#outline-width">
|
|
<meta name="assert" content="outline-width computed value is absolute length, 0 if the outline style is none.">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/css/support/computed-testcommon.js"></script>
|
|
</head>
|
|
<body>
|
|
<style>
|
|
#target {
|
|
font-size: 40px;
|
|
|
|
border-style: dotted; /* Avoid border-*-width computed style 0 */
|
|
border-top-width: thin;
|
|
border-right-width: medium;
|
|
border-bottom-width: thick;
|
|
|
|
outline-style: dotted; /* Avoid outline-width computed style 0 */
|
|
}
|
|
</style>
|
|
<div id="target"></div>
|
|
<script>
|
|
test_computed_value("outline-width", "2.5px", "2px");
|
|
test_computed_value("outline-width", "10px");
|
|
test_computed_value("outline-width", "0.5em", "20px");
|
|
test_computed_value("outline-width", "calc(10px + 0.5em)", "30px");
|
|
test_computed_value("outline-width", "calc(10px - 0.5em)", "0px");
|
|
|
|
test_computed_value("outline-width", "thin", getComputedStyle(target).borderTopWidth);
|
|
test_computed_value("outline-width", "medium", getComputedStyle(target).borderRightWidth);
|
|
test_computed_value("outline-width", "thick", getComputedStyle(target).borderBottomWidth);
|
|
|
|
test(() => {
|
|
target.style['outline-width'] = '10px';
|
|
target.style['outline-style'] = 'none';
|
|
assert_equals(getComputedStyle(target)['outline-width'], '10px');
|
|
target.style['outline-style'] = '';
|
|
}, 'outline-width is independent of the value of outline-style');
|
|
</script>
|
|
</body>
|
|
</html>
|