Bug 15389 - SVG renderers should track transform/path changes, instead of pulling every time from SVG DOM
Summary: SVG renderers should track transform/path changes, instead of pulling every t...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://research.sun.com/projects/live...
Keywords:
Depends on: 15388
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-05 22:12 PDT by Eric Seidel (no email)
Modified: 2010-04-13 03:36 PDT (History)
2 users (show)

See Also:


Attachments
test case using setAttribute (527 bytes, application/xml)
2007-10-05 22:12 PDT, Eric Seidel (no email)
no flags Details
another test case using TransformList::initialize (631 bytes, application/xml)
2007-10-05 22:17 PDT, Eric Seidel (no email)
no flags Details
potential fix (889 bytes, patch)
2007-10-05 22:30 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Patch (40.25 KB, patch)
2010-04-11 13:30 PDT, Nikolas Zimmermann
krit: 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) 2007-10-05 22:12:09 PDT
setting the transform on an SVG renderer causes a layout even if no change was made

I think the lively kernel has a "bug" where they are setting the same transform on some of their elements repeatedly.  We relayout (and repaint) those elements, even if the transform hasn't changed.  We shouldn't do that. :(
Comment 1 Eric Seidel (no email) 2007-10-05 22:12:26 PDT
Created attachment 16558 [details]
test case using setAttribute
Comment 2 Eric Seidel (no email) 2007-10-05 22:17:58 PDT
Created attachment 16559 [details]
another test case using TransformList::initialize
Comment 3 Eric Seidel (no email) 2007-10-05 22:30:59 PDT
Created attachment 16560 [details]
potential fix
Comment 4 Eric Seidel (no email) 2007-10-05 23:05:18 PDT
So the "potential fix" doesn't actually work for *either* test case due to notifyAttributeChanged and the ultimate-evil which that function is.  nAC is called indiscriminately *any time* any attribute changes, and is the single "notification method" from tear-off javascript bindings back into SVG DOM elements.  We've had at least one bug on the subject before.
Comment 5 Oliver Hunt 2007-10-05 23:14:33 PDT
Comment on attachment 16560 [details]
potential fix

Looks fine -- we might want to go through and do similar on all the other similar attribute setters.
Comment 6 Eric Seidel (no email) 2007-10-05 23:37:27 PDT
Comment on attachment 16560 [details]
potential fix

Hadn't meant for this to be reviewed.  We could apply this, but it doesn't help us much given nAC has already marked us for layout before we even get to this code. :(
Comment 7 Eric Seidel (no email) 2007-10-06 02:01:15 PDT
The potential fix was landed as part of bug 15388: r26077 on feature-branch.
Comment 8 Nikolas Zimmermann 2010-04-11 12:46:56 PDT
The bug is still valid, though the codebase changed a lot since 2007, so I had to change the title to reflect what is really happening these days.
Uploading a patch to fix this problem soon.
Comment 9 Nikolas Zimmermann 2010-04-11 13:30:16 PDT
Created attachment 53110 [details]
Patch
Comment 10 Dirk Schulze 2010-04-12 11:41:44 PDT
Comment on attachment 53110 [details]
Patch

Fantastic patch! r=me
Comment 11 Nikolas Zimmermann 2010-04-13 03:36:12 PDT
Committed r57509: <http://trac.webkit.org/changeset/57509>