aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/svg/model/SkSVGDOM.cpp
Commit message (Collapse)AuthorAge
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* [SVGDom] Add 'stroke-dashoffset' supportGravatar Florin Malita2017-10-13
| | | | | | | | https://www.w3.org/TR/SVG/painting.html#StrokeDashoffsetProperty Change-Id: Ia25d0048a56ac3835cabcb4e1794d91667367d7c Reviewed-on: https://skia-review.googlesource.com/59820 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [SVGDom] Add 'stroke-dasharray' supportGravatar Florin Malita2017-10-13
| | | | | | | | https://www.w3.org/TR/SVG/painting.html#StrokeDasharrayProperty Change-Id: I9a63ebbd958d661c865ed405570b86cca68f63bf Reviewed-on: https://skia-review.googlesource.com/59700 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* [SVGDom] Add 'visibility' supportGravatar Florin Malita2017-10-12
| | | | | | | | | https://www.w3.org/TR/SVG/painting.html#VisibilityProperty Change-Id: I8b872af26150d93cf39cf8eeba23c91e1decace3 Reviewed-on: https://skia-review.googlesource.com/58863 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [SVGDom] Initial <pattern> supportGravatar Florin Malita2017-10-11
| | | | | | | | | https://www.w3.org/TR/SVG/pservers.html#Patterns Change-Id: I80455c4ae04cf03526f8e8797f40b0b2d24e043f Reviewed-on: https://skia-review.googlesource.com/58461 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* [SVGDom] Initial <use> supportGravatar Florin Malita2017-10-11
| | | | | | | | | https://www.w3.org/TR/SVG/struct.html#UseElement Change-Id: Id85c2648255dcd4763bf11c7bdb8b1490286f1e4 Reviewed-on: https://skia-review.googlesource.com/58260 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* [SVGDom] Add clip-rule supportGravatar Florin Malita2017-10-10
| | | | | | | | | | | | | Currently we use 'fill-rule' when emitting clip paths. This is wrong: per spec [1], clip paths observe 'clip-rule', not 'fill-rule'. [1] https://www.w3.org/TR/SVG/masking.html#ClipRuleProperty Change-Id: Idf81de05e9601663c8dbc9856900ffa679daf4a5 Reviewed-on: https://skia-review.googlesource.com/57661 Reviewed-by: Robert Phillips <robertphillips@google.com> Reviewed-by: Stephan Altmueller <stephana@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [SVGDom] stroke-miterlimit supportGravatar Florin Malita2017-10-10
| | | | | | | | https://www.w3.org/TR/SVG/painting.html#StrokeMiterlimitProperty Change-Id: I5e488e95afe17c4b753e8177ea5783d4820e3d2c Reviewed-on: https://skia-review.googlesource.com/57221 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [SVGDom] Add support for <a> elementsGravatar Florin Malita2017-10-10
| | | | | | | | | | | | | | | https://www.w3.org/TR/SVG/linking.html#AElement The Skia SVG DOM is not a user agent, so link semantics are not particularly interesting. But since <a> can wrap actual content, it is important to not drop it on the floor. The simplest thing to do is turn it into a <g> node and run with it. Change-Id: I4e103553354746ceb49bc1038680a1c477a1320a Reviewed-on: https://skia-review.googlesource.com/57620 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [SVGDom] Radial gradient supportGravatar Florin Malita2017-10-09
| | | | | | | | | | | | Implement support for https://www.w3.org/TR/SVG/pservers.html#RadialGradients. BUG=skia:7074 Change-Id: I19645a4a3bbddfd1ee0d08a2775381a0017acbfc Reviewed-on: https://skia-review.googlesource.com/57340 Commit-Queue: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com>
* Fix SkSVGDOM length & presentation context scopingGravatar Florin Malita2017-09-09
| | | | | | | | | | TBR= BUG=skia:7033 Change-Id: I07584acc35253acfd6ca2c3c91c615bb507f7601 Reviewed-on: https://skia-review.googlesource.com/44620 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [SVGDom] ClipPath supportGravatar Florin Malita2016-12-08
| | | | | | | | | | | | | * clip-path attribute handling * clipPath container element * asPath() SkSVGNode virtual for capturing subtree geometry R=robertphillips@google.com,stephana@google.com Change-Id: I9597534fe3047b631da6309eafac055dff5696e9 Reviewed-on: https://skia-review.googlesource.com/5650 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [SVGDom] Add fill-rule supportGravatar Florin Malita2016-12-06
| | | | | | | | | | | | | | | | There's a bit of friction with this attribute, because per spec it is an inherited presentation attribute, but in Skia it is part of the actual SkPath state. So we must add some plumbing to SkSVGShape & friends to allow overriding the fill type at render-time. R=robertphillips@google.com,stephana@google.com Change-Id: I9c926d653c6211beb3914bffac50d4349dbdd2c0 Reviewed-on: https://skia-review.googlesource.com/5415 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
* [SVGDom] Expose intrinsic size infoGravatar fmalita2016-09-14
| | | | | | | | | | | | | | * expose intrinsic size info on <svg> nodes. * tweak the SkSVGDOM constructor to no longer take an container size param, but instead default to intrinsic size * update clients to call SkSVGDOM::setContainerSize() explicitly, when needed R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2345533002 Review-Url: https://codereview.chromium.org/2345533002
* [SVGDom] Linear gradient 'gradientTransform' supportGravatar fmalita2016-09-13
| | | | | | | R=stephana@google.com,robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2339533002 Review-Url: https://codereview.chromium.org/2339533002
* [SVGDom] Linear gradient 'spreadMethod' supportGravatar fmalita2016-09-13
| | | | | | | R=stephana@google.com,robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2337203002 Review-Url: https://codereview.chromium.org/2337203002
* [SVGDom] Initial linear gradient supportGravatar fmalita2016-09-12
| | | | | | | | | | | | | | | Kind of a big change, to connect several new bits into something useful: * ID tracking & lookup * new asPaint() node virtual to support shader (and in the future filter) based paint servers * <defs>, <linearGradient> and <stop> element support * 'href', 'offset', 'stop-color', 'stop-opacity' attribute support * IRI/FuncIRI and rgb(...) parsing BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2327233003 Review-Url: https://codereview.chromium.org/2327233003
* [SVGDom] Add <line> supportGravatar fmalita2016-08-17
| | | | | | | R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2244223005 Review-Url: https://codereview.chromium.org/2244223005
* [SVGDom] Add <circle>, <ellipse> supportGravatar fmalita2016-08-16
| | | | | | | R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249033003 Review-Url: https://codereview.chromium.org/2249033003
* [SVGDom] Add opacity supportGravatar fmalita2016-08-15
| | | | | | | | | | Group opacity support. Unlike the other presentation attributes we support thus far, group opacity is not inherited. R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2246943002 Review-Url: https://codereview.chromium.org/2246943002
* [SVGDom] SVGPong sample appGravatar fmalita2016-08-12
| | | | | | | | | Shows off SVG dom-based animations. R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2243853003 Review-Url: https://codereview.chromium.org/2243853003
* [SVGDom] <polygon> & <polyline> supportGravatar fmalita2016-08-12
| | | | | | | R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2235273003 Review-Url: https://codereview.chromium.org/2235273003
* [SVGDom] Add more presentation attributes.Gravatar fmalita2016-08-11
| | | | | | | | | | | | | | | | Implement proper presentation attribute inheritance, and add support for * fill-opacity * stroke-linecap * stroke-linejoin * stroke-opacity * stroke-width R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234153002 Review-Url: https://codereview.chromium.org/2234153002
* [SVGDom] Add rx/ry support for <rect>Gravatar fmalita2016-08-10
| | | | | | | R=stephana@google.com,robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234863002 Review-Url: https://codereview.chromium.org/2234863002
* [SVGDom] Disable verbose parsing messages be defaultGravatar fmalita2016-08-10
| | | | | | | | | Guard with SK_VERBOSE_SVG_PARSING R=robertphillips@google.com,rmistry@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2235963003 Review-Url: https://codereview.chromium.org/2235963003
* [SVGDom] Improve whitespace handling in style parsingGravatar fmalita2016-08-08
| | | | | | | | | Handle whitespace-padded style names/values. R=stephana@google.com,robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2225623002 Review-Url: https://codereview.chromium.org/2225623002
* [SVGDom] Improved transform parsingGravatar fmalita2016-08-08
| | | | | | | | | Update 'transform' attribute parsing to a more robust, SkSVGAttributeParser-based implementation. R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2220933003 Review-Url: https://codereview.chromium.org/2220933003
* [SVGDom] Add viewBox supportGravatar fmalita2016-08-08
| | | | | | | | | | | | | | | | | | | | The main feature is <svg> viewBox and proper viewport support, but the CL touches a few other things: * refactor SkSVGRenderContext to auto-restore canvas state, and split the presentation bits into a separate CoW SkSVGPresentationContext * introduce SkSVGNode::onPrepareToRender(), as a way for nodes to push their custom state before the actual onRender() call (instead of relying on non-virtual SkSVGNode to know about all possible state bits) * add a "Type" suffix to SVG types, to disambiguate (e.g. SkSVGRectType vs. SkSVGRect) R=robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2222793002 Review-Url: https://codereview.chromium.org/2222793002
* [SVGDom] Initial SVGLength supportGravatar fmalita2016-08-03
| | | | | | | | | | Mostly plumb new length types, but also introduce a stateful parser, rect shape and named color support. R=reed@google.com,robertphillips@google.com,stephana@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2202053002 Review-Url: https://codereview.chromium.org/2202053002
* [SVGDom] Parse style attributesGravatar fmalita2016-07-29
| | | | | | | | | | Dispatch style-encoded (style="foo: bar; ...") attributes via normal attribute setters. R=reed@google.com,robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2193663002 Review-Url: https://codereview.chromium.org/2193663002
* Initial SVG modelGravatar fmalita2016-07-26
A minimal subset needed to render tiger.svg: <svg>, <g>, <path>, 'd', 'fill'/'stroke' (color-only), 'transform'. R=reed@google.com,robertphillips@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2164193002 Review-Url: https://codereview.chromium.org/2164193002