haikuwebkit/LayoutTests/fast/css/translate-invalidate-if-dis...

22 lines
766 B
HTML
Raw Permalink Normal View History

Use Element for checking Settings in CSSComputedStyleDeclaration https://bugs.webkit.org/show_bug.cgi?id=223598 Patch by Rob Buis <rbuis@igalia.com> on 2021-04-01 Reviewed by Darin Adler. Source/WebCore: Use Element for checking Settings in CSSComputedStyleDeclaration. Right now renderer is used but this will not work for non-rendered elements. Tests: fast/css/rotate-invalidate-if-disabled.html fast/css/scale-invalidate-if-disabled.html fast/css/translate-invalidate-if-disabled.html * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): LayoutTests: Adapt tests to verify that non-rendered elements do not expose contain/aspect-ratio when these features are disabled. Add tests for rotate, scale and translate as well. * fast/css/aspect-ratio-invalidate-if-disabled-expected.txt: * fast/css/aspect-ratio-invalidate-if-disabled.html: * fast/css/contain-invalidate-if-disabled-expected.txt: * fast/css/contain-invalidate-if-disabled.html: * fast/css/overscroll-behavior-invalidate-if-disabled-expected.txt: * fast/css/overscroll-behavior-invalidate-if-disabled.html: * fast/css/rotate-invalidate-if-disabled-expected.txt: Added. * fast/css/rotate-invalidate-if-disabled.html: Added. * fast/css/scale-invalidate-if-disabled-expected.txt: Added. * fast/css/scale-invalidate-if-disabled.html: Added. * fast/css/translate-invalidate-if-disabled-expected.txt: Added. * fast/css/translate-invalidate-if-disabled.html: Added. * platform/win/TestExpectations: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@275351 268f45cc-cd09-0410-ab3c-d52691b4dbfc Canonical link: https://commits.webkit.org/236022@main
2021-04-01 10:26:37 +00:00
<!DOCTYPE html><!-- webkit-test-runner [ CSSIndividualTransformPropertiesEnabled=false ] -->
<html>
<head>
<meta charset="utf-8">
<script src="../../resources/js-test.js"></script>
</head>
<body>
<div id="target" style="display: none"></div>
<script>
description("Tests that translate is not exposed when the feature is disabled");
shouldBeFalse("'translate' in document.documentElement.style");
shouldBeFalse("'translate' in getComputedStyle(document.documentElement)");
shouldBeTrue("getComputedStyle(document.getElementById('target')).getPropertyValue('translate') == ''");
shouldBeFalse("CSS.supports('translate: contain')");
shouldBeFalse("CSS.supports('translate: inherit')");
shouldBeFalse("CSS.supports('translate', 'inherit')");
</script>
</body>
</html>