Title: [208594] trunk/Source/WebCore
- Revision
- 208594
- Author
- [email protected]
- Date
- 2016-11-11 10:52:34 -0800 (Fri, 11 Nov 2016)
Log Message
[CSS Parser] Fix SVG markers and colors
https://bugs.webkit.org/show_bug.cgi?id=164640
Reviewed by Dean Jackson.
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertSVGColor):
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseShorthand):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (208593 => 208594)
--- trunk/Source/WebCore/ChangeLog 2016-11-11 18:38:01 UTC (rev 208593)
+++ trunk/Source/WebCore/ChangeLog 2016-11-11 18:52:34 UTC (rev 208594)
@@ -1,3 +1,15 @@
+2016-11-11 Dave Hyatt <[email protected]>
+
+ [CSS Parser] Fix SVG markers and colors
+ https://bugs.webkit.org/show_bug.cgi?id=164640
+
+ Reviewed by Dean Jackson.
+
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertSVGColor):
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::CSSPropertyParser::parseShorthand):
+
2016-11-11 Wenson Hsieh <[email protected]>
Composition state should be cleared when changing focus to a non-editable element
Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (208593 => 208594)
--- trunk/Source/WebCore/css/StyleBuilderConverter.h 2016-11-11 18:38:01 UTC (rev 208593)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h 2016-11-11 18:52:34 UTC (rev 208594)
@@ -1327,6 +1327,11 @@
inline Color StyleBuilderConverter::convertSVGColor(StyleResolver& styleResolver, const CSSValue& value)
{
+ // FIXME-NEWPARSER: Remove the code that assumes SVGColors.
+ // FIXME: What about visited link support?
+ if (is<CSSPrimitiveValue>(value))
+ return styleResolver.colorFromPrimitiveValue(downcast<CSSPrimitiveValue>(value));
+
auto& svgColor = downcast<SVGColor>(value);
return svgColor.colorType() == SVGColor::SVG_COLORTYPE_CURRENTCOLOR ? styleResolver.style()->color() : svgColor.color();
}
Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (208593 => 208594)
--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2016-11-11 18:38:01 UTC (rev 208593)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2016-11-11 18:52:34 UTC (rev 208594)
@@ -4975,9 +4975,10 @@
RefPtr<CSSValue> marker = parseSingleValue(CSSPropertyMarkerStart);
if (!marker || !m_range.atEnd())
return false;
- addProperty(CSSPropertyMarkerStart, CSSPropertyMarker, marker.releaseNonNull(), important);
- addProperty(CSSPropertyMarkerMid, CSSPropertyMarker, marker.releaseNonNull(), important);
- addProperty(CSSPropertyMarkerEnd, CSSPropertyMarker, marker.releaseNonNull(), important);
+ auto markerRef = marker.releaseNonNull();
+ addProperty(CSSPropertyMarkerStart, CSSPropertyMarker, markerRef.copyRef(), important);
+ addProperty(CSSPropertyMarkerMid, CSSPropertyMarker, markerRef.copyRef(), important);
+ addProperty(CSSPropertyMarkerEnd, CSSPropertyMarker, markerRef.copyRef(), important);
return true;
}
case CSSPropertyFlex:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes