haikuwebkit/LayoutTests/fast/css/stroke-width-fallback-expec...

37 lines
1.4 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html>
<html>
<head>
<style>
div {
font-size: 80px;
color: gray;
text-shadow: none;
The css properties stroke-width/stroke-color and -webkit-text-stroke-width/-webkit-text-stroke-color should not be mixed. https://bugs.webkit.org/show_bug.cgi?id=174737 Reviewed by Antti Koivisto. Source/WebCore: Previously, the stroke width and stroke color would independently fall back to the -webkit-text-stroke-width and -webkit-text-stroke-color values if stroke-width and/or stroke-color were not explicitly specified. This is problematic, since we might end up mixing the new stroke properties with the legacy Webkit stroke properties. The new strategy is to use the stroke-width and stroke-color value combination only if stroke-color has been explicitly specified. This should work well, since there will be no visible stroke when specifying only stroke-width (because stroke-color by default is transparent). We can then safely fall back to the legacy Webkit stroke value combination. In the case where only stroke-color is specified, we should use the stroke-width/ stroke-color combination, since stroke-width by default is 1, and we will then have a visible stroke. No new tests, existing tests have been updated to reflect behavior changes. * rendering/TextDecorationPainter.cpp: (WebCore::decorationColor): * rendering/TextPaintStyle.cpp: (WebCore::computeTextPaintStyle): (WebCore::computeTextSelectionPaintStyle): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::computedStrokeWidth const): (WebCore::RenderStyle::hasPositiveStrokeWidth const): (WebCore::RenderStyle::computedStrokeColor const): * rendering/style/RenderStyle.h: LayoutTests: * fast/css/stroke-color-expected.html: * fast/css/stroke-color-fallback-expected.html: * fast/css/stroke-color-fallback.html: * fast/css/stroke-color.html: * fast/css/stroke-width-expected.html: * fast/css/stroke-width-fallback-expected.html: * fast/css/stroke-width-fallback.html: * fast/css/stroke-width.html: Canonical link: https://commits.webkit.org/195665@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-13 22:13:34 +00:00
display: inline
}
</style>
</head>
<body>
The css properties stroke-width/stroke-color and -webkit-text-stroke-width/-webkit-text-stroke-color should not be mixed. https://bugs.webkit.org/show_bug.cgi?id=174737 Reviewed by Antti Koivisto. Source/WebCore: Previously, the stroke width and stroke color would independently fall back to the -webkit-text-stroke-width and -webkit-text-stroke-color values if stroke-width and/or stroke-color were not explicitly specified. This is problematic, since we might end up mixing the new stroke properties with the legacy Webkit stroke properties. The new strategy is to use the stroke-width and stroke-color value combination only if stroke-color has been explicitly specified. This should work well, since there will be no visible stroke when specifying only stroke-width (because stroke-color by default is transparent). We can then safely fall back to the legacy Webkit stroke value combination. In the case where only stroke-color is specified, we should use the stroke-width/ stroke-color combination, since stroke-width by default is 1, and we will then have a visible stroke. No new tests, existing tests have been updated to reflect behavior changes. * rendering/TextDecorationPainter.cpp: (WebCore::decorationColor): * rendering/TextPaintStyle.cpp: (WebCore::computeTextPaintStyle): (WebCore::computeTextSelectionPaintStyle): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::computedStrokeWidth const): (WebCore::RenderStyle::hasPositiveStrokeWidth const): (WebCore::RenderStyle::computedStrokeColor const): * rendering/style/RenderStyle.h: LayoutTests: * fast/css/stroke-color-expected.html: * fast/css/stroke-color-fallback-expected.html: * fast/css/stroke-color-fallback.html: * fast/css/stroke-color.html: * fast/css/stroke-width-expected.html: * fast/css/stroke-width-fallback-expected.html: * fast/css/stroke-width-fallback.html: * fast/css/stroke-width.html: Canonical link: https://commits.webkit.org/195665@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-13 22:13:34 +00:00
<div>&#x25fc;</div>
<div style="-webkit-text-stroke-width: 25px; -webkit-text-stroke-color: green;">&#x25fc;</div>
<div style="stroke-width: 1px; stroke-color: green;">&#x25fc;</div>
<div style="stroke-width: 10px; stroke-color: blue;">&#x25fc;</div>
<div style="stroke-width: 1px; stroke-color: green;">&#x25fc;</div>
<div style="stroke-width: 10px; stroke-color: blue;">&#x25fc;</div>
<div style="stroke-width: 25px; stroke-color: green;">&#x25fc;</div>
The css properties stroke-width/stroke-color and -webkit-text-stroke-width/-webkit-text-stroke-color should not be mixed. https://bugs.webkit.org/show_bug.cgi?id=174737 Reviewed by Antti Koivisto. Source/WebCore: Previously, the stroke width and stroke color would independently fall back to the -webkit-text-stroke-width and -webkit-text-stroke-color values if stroke-width and/or stroke-color were not explicitly specified. This is problematic, since we might end up mixing the new stroke properties with the legacy Webkit stroke properties. The new strategy is to use the stroke-width and stroke-color value combination only if stroke-color has been explicitly specified. This should work well, since there will be no visible stroke when specifying only stroke-width (because stroke-color by default is transparent). We can then safely fall back to the legacy Webkit stroke value combination. In the case where only stroke-color is specified, we should use the stroke-width/ stroke-color combination, since stroke-width by default is 1, and we will then have a visible stroke. No new tests, existing tests have been updated to reflect behavior changes. * rendering/TextDecorationPainter.cpp: (WebCore::decorationColor): * rendering/TextPaintStyle.cpp: (WebCore::computeTextPaintStyle): (WebCore::computeTextSelectionPaintStyle): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::computedStrokeWidth const): (WebCore::RenderStyle::hasPositiveStrokeWidth const): (WebCore::RenderStyle::computedStrokeColor const): * rendering/style/RenderStyle.h: LayoutTests: * fast/css/stroke-color-expected.html: * fast/css/stroke-color-fallback-expected.html: * fast/css/stroke-color-fallback.html: * fast/css/stroke-color.html: * fast/css/stroke-width-expected.html: * fast/css/stroke-width-fallback-expected.html: * fast/css/stroke-width-fallback.html: * fast/css/stroke-width.html: Canonical link: https://commits.webkit.org/195665@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-13 22:13:34 +00:00
<div style="stroke-width: 10px; stroke-color: blue;"><span>&#x25fc;</span></div>
<div style="stroke-width: 25px; stroke-color: green;"><span>&#x25fc;</span></div>
<div style="stroke-width: 10px; stroke-color: blue;"><span>&#x25fc;</span></div>
<div style="stroke-width: 25px; stroke-color: green;"><span>&#x25fc;</span></div>
<div style="stroke-width: 10px; stroke-color: blue;"><span>&#x25fc;</span></div>
<div style="stroke-width: 1px; stroke-color: green;"><span>&#x25fc;</span></div>
<div style="stroke-width: 10px; stroke-color: blue;"><span>&#x25fc;</span></div>
<div style="stroke-width: 25px; stroke-color: green;"><span>&#x25fc;</span></div>
The css properties stroke-width/stroke-color and -webkit-text-stroke-width/-webkit-text-stroke-color should not be mixed. https://bugs.webkit.org/show_bug.cgi?id=174737 Reviewed by Antti Koivisto. Source/WebCore: Previously, the stroke width and stroke color would independently fall back to the -webkit-text-stroke-width and -webkit-text-stroke-color values if stroke-width and/or stroke-color were not explicitly specified. This is problematic, since we might end up mixing the new stroke properties with the legacy Webkit stroke properties. The new strategy is to use the stroke-width and stroke-color value combination only if stroke-color has been explicitly specified. This should work well, since there will be no visible stroke when specifying only stroke-width (because stroke-color by default is transparent). We can then safely fall back to the legacy Webkit stroke value combination. In the case where only stroke-color is specified, we should use the stroke-width/ stroke-color combination, since stroke-width by default is 1, and we will then have a visible stroke. No new tests, existing tests have been updated to reflect behavior changes. * rendering/TextDecorationPainter.cpp: (WebCore::decorationColor): * rendering/TextPaintStyle.cpp: (WebCore::computeTextPaintStyle): (WebCore::computeTextSelectionPaintStyle): * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::computedStrokeWidth const): (WebCore::RenderStyle::hasPositiveStrokeWidth const): (WebCore::RenderStyle::computedStrokeColor const): * rendering/style/RenderStyle.h: LayoutTests: * fast/css/stroke-color-expected.html: * fast/css/stroke-color-fallback-expected.html: * fast/css/stroke-color-fallback.html: * fast/css/stroke-color.html: * fast/css/stroke-width-expected.html: * fast/css/stroke-width-fallback-expected.html: * fast/css/stroke-width-fallback.html: * fast/css/stroke-width.html: Canonical link: https://commits.webkit.org/195665@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@224780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-11-13 22:13:34 +00:00
<div style="stroke-width: 10px; stroke-color: blue;">&#x25fc;</div>
</body>
</html>