Bug 5003 - Add temporary "KDOM/KCanvas" Wrapper solution for SVG
Summary: Add temporary "KDOM/KCanvas" Wrapper solution for SVG
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-16 02:21 PDT by Eric Seidel (no email)
Modified: 2005-09-22 20:29 PDT (History)
0 users

See Also:


Attachments
New files necessary for "wrapper" solution. (Incomplete patch) (22.70 KB, patch)
2005-09-16 03:34 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
New files for "wrapper" solution. (23.38 KB, patch)
2005-09-18 04:28 PDT, Eric Seidel (no email)
hyatt: review-
Details | Formatted Diff | Diff
Final patch (fixed leaks, uses QPainter, paints less, etc.) (44.28 KB, patch)
2005-09-21 04:21 PDT, Eric Seidel (no email)
hyatt: review+
Details | Formatted Diff | Diff
Consolidate tools and update to match WebCore+SVG -> WebCore product name. (21.63 KB, patch)
2005-09-22 04:39 PDT, Eric Seidel (no email)
darin: review-
Details | Formatted Diff | Diff
Consolidate tools and update to match WebCore+SVG -> WebCore product name. (23.15 KB, patch)
2005-09-22 05:37 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Updated patch which builds testkjs when necessary. (23.33 KB, patch)
2005-09-22 14:46 PDT, Eric Seidel (no email)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2005-09-16 02:21:52 PDT
Add temporary "KDOM/KCanvas" Wrapper solution for SVG

Add a DOM KDOM node wrapper and a RenderTree KCanvasItem wrapper to WebCore to allow us to render 
SVG in safari prior to the true DOM/RenderTree integration.
Comment 1 Eric Seidel (no email) 2005-09-16 03:34:07 PDT
Created attachment 3909 [details]
New files necessary for "wrapper" solution.  (Incomplete patch)

This patch does not include the (very minimal) necessary changes to WebCore and
WebKit.  I need to make the WebKit changes a bit more elegant first before we
land this.
Comment 2 Eric Seidel (no email) 2005-09-18 04:28:42 PDT
Created attachment 3933 [details]
New files for "wrapper" solution.
Comment 3 Eric Seidel (no email) 2005-09-18 04:29:48 PDT
Comment on attachment 3933 [details]
New files for "wrapper" solution.

Hyatt is probably the best reviewer for this (as he knows the render tree
best).	Mjs or Darin might also have opinions.
Comment 4 Dave Hyatt 2005-09-20 13:31:33 PDT
Comment on attachment 3933 [details]
New files for "wrapper" solution.

Gave comments in person, but will re-summarize here:

(1) NodeTreeWrapper could be folded in to the DocumentImpl subclass.
(2) Check leaks... looks like some objects might be leaking here.
(3) Use QPainter in the paint() method instead of raw CG.
(4) paint() method will paint twice.  Make sure to only paint during the
foreground phase and not during other phases like the outline phase.
(5) Where are scripts handled?
Looks like they aren't.
Comment 5 Eric Seidel (no email) 2005-09-21 04:21:42 PDT
Created attachment 3979 [details]
Final patch (fixed leaks, uses QPainter, paints less, etc.)

With this patch, (many) SVGs now "just work" in Safari.  This fixes the
previously mentioned canvas leak, a overdrawing due to paint()
misunderstanding, and moved off of CG and onto QPainter methods.
Comment 6 Eric Seidel (no email) 2005-09-21 04:22:08 PDT
Comment on attachment 3979 [details]
Final patch (fixed leaks, uses QPainter, paints less, etc.)

Addressed hyatt's issues.  Either hyatt or mjs should be able to review.
Comment 7 Eric Seidel (no email) 2005-09-22 04:39:18 PDT
Created attachment 4002 [details]
Consolidate tools and update to match WebCore+SVG -> WebCore product name.
Comment 8 Eric Seidel (no email) 2005-09-22 04:41:38 PDT
Comment on attachment 4002 [details]
Consolidate tools and update to match WebCore+SVG -> WebCore product name.

This patch gets rid of two (previously separate) SVG scripts, rolling them back
into the original script with a new --svg option.  This patch also updates all
of the SVG tools to use WebCore.framework instead of WebCore+SVG.framework, and
explicity check for SVG symbols in WebCore.

Any of a number of folks could review this one.  Darin may have the strongest
opinions as he wrote most of these tools.
Comment 9 Eric Seidel (no email) 2005-09-22 05:37:41 PDT
Created attachment 4003 [details]
Consolidate tools and update to match WebCore+SVG -> WebCore product name.

Better tools additions, now includes the ability to automatically re-link
JavaScriptCore and WebCore when running build-webkit w/ or w/o the --svg
option, and they've previously been built with the opposite option.
Comment 10 Eric Seidel (no email) 2005-09-22 05:38:25 PDT
Comment on attachment 4003 [details]
Consolidate tools and update to match WebCore+SVG -> WebCore product name.

A better patch for review.
Comment 11 Darin Adler 2005-09-22 11:33:00 PDT
Comment on attachment 4002 [details]
Consolidate tools and update to match WebCore+SVG -> WebCore product name.

Looks like the code to pass -target All when building JavaScriptCore is gone. I
believe this will cause problems because the testkjs program won't get built.

Otherwise, looks good.
Comment 12 Eric Seidel (no email) 2005-09-22 14:46:59 PDT
Created attachment 4013 [details]
Updated patch which builds testkjs when necessary.
Comment 13 Eric Seidel (no email) 2005-09-22 14:49:55 PDT
Comment on attachment 4013 [details]
Updated patch which builds testkjs when necessary.

Fixes build-webkit to make sure that testkjs is built when needed.  I'm still
(intentionally) ignoring the "All" build target, as this solution make for a
cleaner script which handles both JSC and JSC+SVG.  Once JSC+SVG goes away,
this could move back to an equally clean solution using the "All" target if
desired.

Really anyone could review this, darin reviewed the first iteration of this
patch.
Comment 14 Maciej Stachowiak 2005-09-22 20:07:20 PDT
Comment on attachment 4013 [details]
Updated patch which builds testkjs when necessary.

r=me on the tools patch
Comment 15 Eric Seidel (no email) 2005-09-22 20:29:37 PDT
Sweet.  It is now possible w/ TOT to run Safari w/ SVG support!