haikuwebkit/LayoutTests/fast/text/trailing-word-detection.html

23 lines
529 B
HTML
Raw Permalink Normal View History

-apple-trailing-word is needed for browser detection https://bugs.webkit.org/show_bug.cgi?id=196575 Unreviewed. PerformanceTests: * MotionMark/resources/debug-runner/motionmark.css: (#intro .start-benchmark p): Source/JavaScriptCore: * Configurations/FeatureDefines.xcconfig: Source/WebCore: This is an unreviewed partial revert of r243819. Turns out there are some websites which use this property to do browser detection. So, we need to continue to parse the property, but we don't need the property to do anything. Test: fast/text/trailing-word-detection.html * Configurations/FeatureDefines.xcconfig: * css/CSSComputedStyleDeclaration.cpp: (WebCore::ComputedStyleExtractor::valueForPropertyinStyle): * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): (WebCore::CSSPrimitiveValue::operator TrailingWord const): * css/CSSProperties.json: * css/CSSValueKeywords.in: * css/parser/CSSParserFastPaths.cpp: (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): (WebCore::CSSParserFastPaths::isKeywordPropertyID): * rendering/style/RenderStyle.h: (WebCore::RenderStyle::trailingWord const): (WebCore::RenderStyle::setTrailingWord): (WebCore::RenderStyle::initialTrailingWord): * rendering/style/RenderStyleConstants.h: Source/WebCore/PAL: * Configurations/FeatureDefines.xcconfig: Source/WebKit: * Configurations/FeatureDefines.xcconfig: Source/WebKitLegacy/mac: * Configurations/FeatureDefines.xcconfig: Tools: * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: LayoutTests: * fast/text/trailing-word-detection-expected.txt: Added. * fast/text/trailing-word-detection.html: Added. * platform/gtk/TestExpectations: * platform/win/TestExpectations: Canonical link: https://commits.webkit.org/210837@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-04 00:16:24 +00:00
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<style>
@supports (-apple-trailing-word: auto) {
#test {
color: rgb(0, 128, 0);
}
}
</style>
</head>
<body>
<div id="test"></div>
<script>
let element = document.getElementById("test");
shouldBeTrue("'-apple-trailing-word' in element.style");
shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue('color')", "rgb(0, 128, 0)");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>