WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-222286-20210223103625.patch (text/plain), 4.78 KB, created by
Rob Buis
on 2021-02-23 01:36:27 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Rob Buis
Created:
2021-02-23 01:36:27 PST
Size:
4.78 KB
patch
obsolete
>Subversion Revision: 273245 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a6ca132469c527e60eb2c36f6a34770847d67cff..6854ebfd66182b985ccce2bc29efeec3ca6d717b 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,18 @@ >+2021-02-23 Rob Buis <rbuis@igalia.com> >+ >+ aspect-ratio shows in computed style when disabled >+ https://bugs.webkit.org/show_bug.cgi?id=222286 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make aspect-ratio invisible from style when disabled. >+ >+ Test: fast/css/aspect-ratio-invalidate-if-disabled.html >+ >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): >+ * css/CSSProperties.json: >+ > 2021-02-22 Sam Weinig <weinig@apple.com> > > Add experimental support for CSS Color 5 color-mix() >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index d0f6a9b39932a8bf24a0c316c080c53f9db41f9a..c643c6e2ec10e1506c2f50d83d734a75a3db97c7 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -3461,6 +3461,8 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyInStyle(const RenderSty > case CSSPropertyWebkitAppearance: > return cssValuePool.createValue(style.appearance()); > case CSSPropertyAspectRatio: >+ if (renderer && !renderer->settings().aspectRatioEnabled()) >+ return nullptr; > switch (style.aspectRatioType()) { > case AspectRatioType::Auto: > return cssValuePool.createIdentifierValue(CSSValueAuto); >diff --git a/Source/WebCore/css/CSSProperties.json b/Source/WebCore/css/CSSProperties.json >index c012e5f092399189a46ab7a6d77a4af3b3f47af8..39e615d635604df799efb0ac6d21721fec68e10a 100644 >--- a/Source/WebCore/css/CSSProperties.json >+++ b/Source/WebCore/css/CSSProperties.json >@@ -4556,10 +4556,11 @@ > }, > "aspect-ratio": { > "codegen-properties": { >- "custom": "All" >+ "custom": "All", >+ "settings-flag": "aspectRatio" > }, > "status": { >- "status": "experimental" >+ "status": "in development" > }, > "specification": { > "category": "css-sizing", >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index d1bbc4ba2fc7de673510952bca5e9e57135044f6..9a2cc4f31e930a9c7c6ef4e83236ef9d05093218 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2021-02-23 Rob Buis <rbuis@igalia.com> >+ >+ aspect-ratio shows in computed style when disabled >+ https://bugs.webkit.org/show_bug.cgi?id=222286 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Add test. >+ >+ * fast/css/aspect-ratio-invalidate-if-disabled-expected.txt: Added. >+ * fast/css/aspect-ratio-invalidate-if-disabled.html: Added. >+ > 2021-02-22 Rob Buis <rbuis@igalia.com> > > Resync web-platform-tests/css/css-sizing/aspect-ratio from upstream >diff --git a/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled-expected.txt b/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..3ba93029029e269e1d2e0aa3e3e1dcbee99373e6 >--- /dev/null >+++ b/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled-expected.txt >@@ -0,0 +1,14 @@ >+Tests that aspect-ratio is not exposed when the feature is disabled >+ >+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". >+ >+ >+PASS 'aspectRatio' in document.documentElement.style is false >+PASS 'aspect-ratio' in getComputedStyle(document.documentElement) is false >+PASS CSS.supports('aspect-ratio: 1 / 1') is false >+PASS CSS.supports('aspect-ratio: inherit') is false >+PASS successfullyParsed is true >+Some tests failed. >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled.html b/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled.html >new file mode 100644 >index 0000000000000000000000000000000000000000..20ba86ac9772fce09570fe06e4a8d9d1eed33a88 >--- /dev/null >+++ b/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled.html >@@ -0,0 +1,18 @@ >+<!DOCTYPE html><!-- webkit-test-runner [ AspectRatioEnabled=false ] --> >+<html> >+<head> >+<meta charset="utf-8"> >+<script src="../../resources/js-test.js"></script> >+</head> >+<body> >+<script> >+description("Tests that aspect-ratio is not exposed when the feature is disabled"); >+ >+shouldBeFalse("'aspectRatio' in document.documentElement.style"); >+shouldBeFalse("'aspect-ratio' in getComputedStyle(document.documentElement)"); >+shouldBeFalse("CSS.supports('aspect-ratio: 1 / 1')"); >+shouldBeFalse("CSS.supports('aspect-ratio: inherit')"); >+ >+</script> >+</body> >+</html>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 222286
:
421230
|
421292
|
421302