Last Comment Bug 723376 - Removing and adding SVG causes the style attribute to be serialized and reparsed
: Removing and adding SVG causes the style attribute to be serialized and reparsed
Status: NEW
: perf, testcase
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks: randomstyles refdyn 720077
  Show dependency treegraph
 
Reported: 2012-02-01 18:15 PST by Jesse Ruderman
Modified: 2015-07-22 14:22 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (clicking should have no effect) (734 bytes, image/svg+xml)
2012-02-01 18:15 PST, Jesse Ruderman
no flags Details

Description Jesse Ruderman 2012-02-01 18:15:35 PST
Created attachment 593693 [details]
testcase (clicking should have no effect)

Removing and adding SVG causes the style attribute to be serialized and reparsed. This seems inefficient.

Combined with serialization bugs such as bug 475216, this can lead to strange things happening!
Comment 1 Boris Zbarsky [:bz] (still a bit busy) 2012-02-01 18:26:55 PST
Yes, SVG does this very very purposefully.  See nsSVGElement::BindToTree.

We could try to make this better by, say, storing the base URI in the attr value or something, and not doing the reparse if the base URI didn't change....

We wouldn't serialize the CSS decl if we actually have a string it came from, but in this case we don't, since it was built up programmatically.
Comment 2 Tom Klein 2015-07-22 14:22:00 PDT
The testcase here works for me, but bug 720077 looks to be caused by the reparse.

Note You need to log in before you can comment on or make changes to this bug.