Bug 6448 - <text> does not support custom fills or strokes
Summary: <text> does not support custom fills or strokes
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: Nobody
URL:
Keywords:
: 6478 6669 (view as bug list)
Depends on: 6447 6553
Blocks: 6708
  Show dependency treegraph
 
Reported: 2006-01-09 05:28 PST by Eric Seidel (no email)
Modified: 2006-01-22 02:29 PST (History)
1 user (show)

See Also:


Attachments
support for text fill/strokes (39.51 KB, patch)
2006-01-21 18:58 PST, Alexander Kellett
eric: 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) 2006-01-09 05:28:11 PST
<text> does not support custom fills or strokes

This will first require some additional changes to how KCanvas does its drawing:
http://bugzilla.opendarwin.org/show_bug.cgi?id=6447

Then it will also may require changes to QPainter to call WebCoreTextRenderer in a special way to have it 
not set the current color.  It might be possible to simply augment QPainter to just pass "nil" for the 
NSColor to WebCoreTextRenderer.  I'm not sure.
Comment 1 Eric Seidel (no email) 2006-01-10 19:37:02 PST
*** Bug 6478 has been marked as a duplicate of this bug. ***
Comment 2 Alexander Kellett 2006-01-21 18:58:38 PST
Created attachment 5823 [details]
support for text fill/strokes
Comment 3 Eric Seidel (no email) 2006-01-21 23:08:55 PST
Comment on attachment 5823 [details]
support for text fill/strokes

Unfortunately the patch you've attached does not apply.  It looks to be an svk patch... which svn-apply does not understand.
Comment 4 Eric Seidel (no email) 2006-01-22 00:28:29 PST
Comment on attachment 5823 [details]
support for text fill/strokes

So a few comments.

+    virtual void render(KRenderingDeviceContext* context, const RenderPath* renderPath, KCPaintTargetType type) const { }

these should be pure virtual ( = 0 ) instead.

Everything in WebCore is now in a single namespace.  No need to use khtml:: or KDOM:: in new code.  Also KSVG should be replaced by WebCore in these files as you edit them.

+            int width  = 2048;
+            int height = 2048; // FIXME???
+            IntSize size = IntSize(width, height);

needs to be replaced by some real text measurement code.

The QPainter p; and PaintInfo creation code inside RenderText should be completely unecessary.  You should just be able to pass the exisiting "paintInfo" variable into RenderBlock::paint()
Comment 5 Eric Seidel (no email) 2006-01-22 01:21:03 PST
Comment on attachment 5823 [details]
support for text fill/strokes

Actually, I was able to tweak the patch locally to make it apply.  With that, I made the few minor changes I suggested with the previous comment and I'm now going to go ahead and land this.  This looks good for now.
Comment 6 Eric Seidel (no email) 2006-01-22 01:22:17 PST
Btw, this patch fixes about 40 some test cases, and causes a regression in one:  W3C-SVG-1.1/painting-fill-02-t  That regression is that currentColor is not properly supported for text for some reason now.  But we'll track that with a separate bug.
Comment 7 Eric Seidel (no email) 2006-01-22 02:29:02 PST
*** Bug 6669 has been marked as a duplicate of this bug. ***