Bug 11979 - SVG text does not respect font-size scaling in bbox calculation
Summary: SVG text does not respect font-size scaling in bbox calculation
Status: RESOLVED DUPLICATE of bug 11984
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: SVGHitList
Depends on:
Blocks:
 
Reported: 2006-12-26 07:48 PST by Eric Seidel (no email)
Modified: 2007-01-08 16:41 PST (History)
1 user (show)

See Also:


Attachments
test demonstrating the incorrect behavior (372 bytes, image/svg+xml)
2006-12-26 07:48 PST, Eric Seidel (no email)
no flags Details
Another test showing how bad our current behavior is (1.40 KB, image/svg+xml)
2006-12-26 08:40 PST, Eric Seidel (no email)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2006-12-26 07:48:16 PST
SVG text does not respect font-size scaling in bbox calculation

See attached testcase.  After fixing bug 11973 our behavior is slightly better than before, but GREEN is still not entirely green.
Comment 1 Eric Seidel (no email) 2006-12-26 07:48:51 PST
Created attachment 12028 [details]
test demonstrating the incorrect behavior
Comment 2 Eric Seidel (no email) 2006-12-26 08:40:03 PST
Created attachment 12032 [details]
Another test showing how bad our current behavior is
Comment 3 Eric Seidel (no email) 2006-12-26 11:17:04 PST
Ok, so this is going to be harder to fix than I originally thought.

This should be split into two bugs.  One to cover the text gradient painting issue, and another to cover text having broken bounding box code.

The problem with gradients is not related to how text calculates bounding boxes, but rather due to the SVG text painting system.  SVG Text makes manual calls into SVGPaintServer::setup() and SVGPaintServer::teardown() instead of calling paint().  SVGPaintServerGradientCG isn't exactly designed for this code path.  The whole SVG text/paintserver interaction looks to be kinda a hack (certainly I am not w/o blame here :), and likely needs to be redesigned.  One example would be passing some sort of "painting text" bool to setup/teardown instead of setting a bool on the paintserver.  Another would be fixing the whole fill/stroke at once problem which we've talked about for so long.
Comment 4 Eric Seidel (no email) 2006-12-26 11:23:54 PST
Comment on attachment 12032 [details]
Another test showing how bad our current behavior is

obsoleting this test as it does not apply to this bug.  I've filed http://bugs.webkit.org/show_bug.cgi?id=11984 to track fixing this test case.
Comment 5 Eric Seidel (no email) 2007-01-07 01:54:51 PST
Wildfox has done some investigation here.
Comment 6 Eric Seidel (no email) 2007-01-08 16:41:10 PST
Fixed by bug 11984.

*** This bug has been marked as a duplicate of 11984 ***