Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 1439793003: SVG: Promote d to a property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CSSPropertyParser Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
index de1b88ab94adc02521bf8571a43feb6f6f5f4aaf..0cbf4f915a1d45b9e3e448dcd3edf76b4de7eeb0 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -75,6 +75,7 @@
#include "core/style/QuotesData.h"
#include "core/style/SVGComputedStyle.h"
#include "core/style/StyleGeneratedImage.h"
+#include "core/svg/SVGPathUtilities.h"
#include "platform/fonts/FontDescription.h"
#include "wtf/MathExtras.h"
#include "wtf/StdLibExtras.h"
@@ -868,4 +869,23 @@ void StyleBuilderFunctions::applyValueCSSPropertyBaselineShift(StyleResolverStat
}
}
+void StyleBuilderFunctions::applyInitialCSSPropertyD(StyleResolverState& state)
+{
+ state.style()->accessSVGStyle().setD(SVGComputedStyle::initialD());
+}
+
+void StyleBuilderFunctions::applyInheritCSSPropertyD(StyleResolverState& state)
+{
+ state.style()->accessSVGStyle().setD(state.parentStyle()->svgStyle().d());
+}
+
+void StyleBuilderFunctions::applyValueCSSPropertyD(StyleResolverState& state, CSSValue* value)
fs 2015/11/26 12:51:39 Feels like it should be possible to just have a co
+{
+ AtomicString pathString = StyleBuilderConverter::convertString<CSSValueInvalid>(state, *value);
+
+ OwnPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create();
+ buildByteStreamFromString(pathString, *pathByteStream);
+ state.style()->accessSVGStyle().setD(pathByteStream.get());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698