WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
14060
[CAIRO] SVG support
https://bugs.webkit.org/show_bug.cgi?id=14060
Summary
[CAIRO] SVG support
Alp Toker
Reported
2007-06-10 01:03:51 PDT
Now that the known issues in the Cairo graphics backend have been fixed, it is possible to provide SVG support using Cairo.
Attachments
Cairo SVG support
(25.30 KB, patch)
2007-06-13 07:45 PDT
,
Alp Toker
rwlbuis
: review-
Details
Formatted Diff
Diff
Cairo SVG support, take two
(25.09 KB, patch)
2007-06-13 11:05 PDT
,
Alp Toker
rwlbuis
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alp Toker
Comment 1
2007-06-13 07:45:06 PDT
Created
attachment 15001
[details]
Cairo SVG support ChangeLog | 29 ++ WebCore.pro | 15 + platform/graphics/svg/SVGPaintServerPattern.h | 2 platform/graphics/svg/SVGPaintServerSolid.h | 2 platform/graphics/svg/cairo/RenderPathCairo.cpp | 58 +++++ platform/graphics/svg/cairo/SVGPaintServerCairo.cpp | 71 +++++++ platform/graphics/svg/cairo/SVGPaintServerGradientCairo.cpp | 118 ++++++++++++ platform/graphics/svg/cairo/SVGPaintServerPatternCairo.cpp | 42 ++++ platform/graphics/svg/cairo/SVGPaintServerSolidCairo.cpp | 78 +++++++ platform/graphics/svg/cairo/SVGResourceClipperCairo.cpp | 69 +++++++ platform/graphics/svg/cairo/SVGResourceMaskerCairo.cpp | 50 +++++ 11 files changed, 532 insertions(+), 2 deletions(-) Support is fairly complete except for gradients, but there are still some TODOs and extensive testing against the SVG test suite is still needed.
Rob Buis
Comment 2
2007-06-13 10:17:44 PDT
Comment on
attachment 15001
[details]
Cairo SVG support
>+ >+ if (boundingBoxMode()) { >+ // TODO: use RenderPathCairo's strokeBBox? >+ double x1, y1, x2, y2; >+ cairo_fill_extents(cr, &x1, &y1, &x2, &y2); >+ cairo_matrix_translate(&matrix, x1, y1); >+ cairo_matrix_scale(&matrix, x2 - x1, y2 - y1); >+ cairo_matrix_multiply(&matrix, &matrix, &gradient_matrix); >+ cairo_matrix_invert(&matrix); >+ { >+ double x0, x1, y0, y1; >+ x0 = linear->gradientStart().x(); >+ y0 = linear->gradientStart().y(); >+ x1 = linear->gradientEnd().x(); >+ y1 = linear->gradientEnd().y(); >+ pattern = cairo_pattern_create_linear(x0, y0, x1, y1); >+ } >+ } else return false;
I can't tell what is going on there, do you mean a if/ilse? If it is an anonymous block, that is hard to read, please rewrite so it doesnt have one.
>+ delete dsh;
Should use delete[].
>+ if(path.isEmpty()) >+ if(!surface)
Style issues. So all issues need fixing. Cheers, Rob.
Alp Toker
Comment 3
2007-06-13 11:05:41 PDT
Created
attachment 15003
[details]
Cairo SVG support, take two This patch addresses the style concerns in the review plus a couple of cleanups.
Rob Buis
Comment 4
2007-06-13 11:17:05 PDT
Comment on
attachment 15003
[details]
Cairo SVG support, take two Its fine. One minor thing, you may want to lose x0, x1, y0, y1 and just write out the calls, but its a preference thing I think.
Alp Toker
Comment 5
2007-06-13 11:29:38 PDT
(In reply to
comment #4
)
> (From update of
attachment 15003
[details]
[edit]) > Its fine. One minor thing, you may want to lose x0, x1, y0, y1 and just write > out the calls, but its a preference thing I think. >
I'm OK with it as-is for now. The gradient code will be re-visited soon anyway, as it still needs work and probably won't look like this when it's finished.
Mark Rowe (bdash)
Comment 6
2007-06-13 13:51:09 PDT
Landed in
r23507
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug