Title: [273529] branches/safari-611-branch
Revision
273529
Author
[email protected]
Date
2021-02-25 18:51:35 -0800 (Thu, 25 Feb 2021)

Log Message

Cherry-pick r273314. rdar://problem/74753260

    aspect-ratio shows in computed style when disabled
    https://bugs.webkit.org/show_bug.cgi?id=222286

    Patch by Rob Buis <[email protected]> on 2021-02-23
    Reviewed by Simon Fraser.

    Source/WebCore:

    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:

    Tools:

    Add support for disabling aspect-ratio in wk1.

    * DumpRenderTree/TestOptions.cpp:
    (WTR::TestOptions::defaults):

    LayoutTests:

    Add test.

    * fast/css/aspect-ratio-invalidate-if-disabled-expected.txt: Added.
    * fast/css/aspect-ratio-invalidate-if-disabled.html: Added.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273314 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-611-branch/LayoutTests/ChangeLog (273528 => 273529)


--- branches/safari-611-branch/LayoutTests/ChangeLog	2021-02-26 02:51:31 UTC (rev 273528)
+++ branches/safari-611-branch/LayoutTests/ChangeLog	2021-02-26 02:51:35 UTC (rev 273529)
@@ -1,3 +1,51 @@
+2021-02-25  Russell Epstein  <[email protected]>
+
+        Cherry-pick r273314. rdar://problem/74753323
+
+    aspect-ratio shows in computed style when disabled
+    https://bugs.webkit.org/show_bug.cgi?id=222286
+    
+    Patch by Rob Buis <[email protected]> on 2021-02-23
+    Reviewed by Simon Fraser.
+    
+    Source/WebCore:
+    
+    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:
+    
+    Tools:
+    
+    Add support for disabling aspect-ratio in wk1.
+    
+    * DumpRenderTree/TestOptions.cpp:
+    (WTR::TestOptions::defaults):
+    
+    LayoutTests:
+    
+    Add test.
+    
+    * fast/css/aspect-ratio-invalidate-if-disabled-expected.txt: Added.
+    * fast/css/aspect-ratio-invalidate-if-disabled.html: Added.
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-02-23  Rob Buis  <[email protected]>
+
+            aspect-ratio shows in computed style when disabled
+            https://bugs.webkit.org/show_bug.cgi?id=222286
+
+            Reviewed by Simon Fraser.
+
+            Add test.
+
+            * fast/css/aspect-ratio-invalidate-if-disabled-expected.txt: Added.
+            * fast/css/aspect-ratio-invalidate-if-disabled.html: Added.
+
 2021-02-25  Alan Coon  <[email protected]>
 
         Cherry-pick r272039. rdar://problem/74451201

Added: branches/safari-611-branch/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled-expected.txt (0 => 273529)


--- branches/safari-611-branch/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled-expected.txt	                        (rev 0)
+++ branches/safari-611-branch/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled-expected.txt	2021-02-26 02:51:35 UTC (rev 273529)
@@ -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
+FAIL CSS.supports('aspect-ratio: inherit') should be false. Was true.
+PASS successfullyParsed is true
+Some tests failed.
+
+TEST COMPLETE
+

Added: branches/safari-611-branch/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled.html (0 => 273529)


--- branches/safari-611-branch/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled.html	                        (rev 0)
+++ branches/safari-611-branch/LayoutTests/fast/css/aspect-ratio-invalidate-if-disabled.html	2021-02-26 02:51:35 UTC (rev 273529)
@@ -0,0 +1,18 @@
+<!DOCTYPE html><!-- webkit-test-runner [ AspectRatioEnabled=false ] -->
+<html>
+<head>
+<meta charset="utf-8">
+<script src=""
+</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>

Modified: branches/safari-611-branch/Source/WebCore/ChangeLog (273528 => 273529)


--- branches/safari-611-branch/Source/WebCore/ChangeLog	2021-02-26 02:51:31 UTC (rev 273528)
+++ branches/safari-611-branch/Source/WebCore/ChangeLog	2021-02-26 02:51:35 UTC (rev 273529)
@@ -1,3 +1,54 @@
+2021-02-25  Russell Epstein  <[email protected]>
+
+        Cherry-pick r273314. rdar://problem/74753323
+
+    aspect-ratio shows in computed style when disabled
+    https://bugs.webkit.org/show_bug.cgi?id=222286
+    
+    Patch by Rob Buis <[email protected]> on 2021-02-23
+    Reviewed by Simon Fraser.
+    
+    Source/WebCore:
+    
+    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:
+    
+    Tools:
+    
+    Add support for disabling aspect-ratio in wk1.
+    
+    * DumpRenderTree/TestOptions.cpp:
+    (WTR::TestOptions::defaults):
+    
+    LayoutTests:
+    
+    Add test.
+    
+    * fast/css/aspect-ratio-invalidate-if-disabled-expected.txt: Added.
+    * fast/css/aspect-ratio-invalidate-if-disabled.html: Added.
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-02-23  Rob Buis  <[email protected]>
+
+            aspect-ratio shows in computed style when disabled
+            https://bugs.webkit.org/show_bug.cgi?id=222286
+
+            Reviewed by Simon Fraser.
+
+            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-01-25  Chris Dumez  <[email protected]>
 
         Unreviewed, add missing header includes to address build issues.

Modified: branches/safari-611-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (273528 => 273529)


--- branches/safari-611-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-02-26 02:51:31 UTC (rev 273528)
+++ branches/safari-611-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-02-26 02:51:35 UTC (rev 273529)
@@ -3469,6 +3469,8 @@
         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);

Modified: branches/safari-611-branch/Source/WebCore/css/CSSProperties.json (273528 => 273529)


--- branches/safari-611-branch/Source/WebCore/css/CSSProperties.json	2021-02-26 02:51:31 UTC (rev 273528)
+++ branches/safari-611-branch/Source/WebCore/css/CSSProperties.json	2021-02-26 02:51:35 UTC (rev 273529)
@@ -4521,7 +4521,8 @@
         },
         "aspect-ratio": {
             "codegen-properties": {
-                "custom": "All"
+                "custom": "All",
+                "settings-flag": "aspectRatio"
             },
             "status": {
                 "status": "experimental"

Modified: branches/safari-611-branch/Tools/ChangeLog (273528 => 273529)


--- branches/safari-611-branch/Tools/ChangeLog	2021-02-26 02:51:31 UTC (rev 273528)
+++ branches/safari-611-branch/Tools/ChangeLog	2021-02-26 02:51:35 UTC (rev 273529)
@@ -1,3 +1,51 @@
+2021-02-25  Russell Epstein  <[email protected]>
+
+        Cherry-pick r273314. rdar://problem/74753323
+
+    aspect-ratio shows in computed style when disabled
+    https://bugs.webkit.org/show_bug.cgi?id=222286
+    
+    Patch by Rob Buis <[email protected]> on 2021-02-23
+    Reviewed by Simon Fraser.
+    
+    Source/WebCore:
+    
+    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:
+    
+    Tools:
+    
+    Add support for disabling aspect-ratio in wk1.
+    
+    * DumpRenderTree/TestOptions.cpp:
+    (WTR::TestOptions::defaults):
+    
+    LayoutTests:
+    
+    Add test.
+    
+    * fast/css/aspect-ratio-invalidate-if-disabled-expected.txt: Added.
+    * fast/css/aspect-ratio-invalidate-if-disabled.html: Added.
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-02-23  Rob Buis  <[email protected]>
+
+            aspect-ratio shows in computed style when disabled
+            https://bugs.webkit.org/show_bug.cgi?id=222286
+
+            Reviewed by Simon Fraser.
+
+            Add support for disabling aspect-ratio in wk1.
+
+            * DumpRenderTree/TestOptions.cpp:
+            (WTR::TestOptions::defaults):
+
 2021-02-23  Alan Coon  <[email protected]>
 
         Cherry-pick r273123. rdar://problem/74623473

Modified: branches/safari-611-branch/Tools/DumpRenderTree/TestOptions.cpp (273528 => 273529)


--- branches/safari-611-branch/Tools/DumpRenderTree/TestOptions.cpp	2021-02-26 02:51:31 UTC (rev 273528)
+++ branches/safari-611-branch/Tools/DumpRenderTree/TestOptions.cpp	2021-02-26 02:51:35 UTC (rev 273529)
@@ -71,6 +71,7 @@
             { "AllowTopNavigationToDataURLs", true },
             { "AllowUniversalAccessFromFileURLs", true },
             { "AspectRatioOfImgFromWidthAndHeightEnabled", false },
+            { "AspectRatioEnabled", true },
             { "AsyncClipboardAPIEnabled", false },
             { "AttachmentElementEnabled", false },
             { "CSSLogicalEnabled", false },
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to