Closed
Bug 756462
Opened 13 years ago
Closed 13 years ago
Stop unnecessary propagating COORD_CONTEXT_CHANGED notifications to descendants of nsSVGInnerSVGFrame
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: jwatt, Assigned: jwatt)
Details
(Keywords: perf)
Attachments
(1 file)
3.33 KB,
patch
|
longsonr
:
review+
|
Details | Diff | Splinter Review |
We should stop unnecessary and wastefully propagating COORD_CONTEXT_CHANGED notifications to descendants of nsSVGInnerSVGFrame. Doing so has the potential to cause us to do much more work than necessary, mainly in the form of repainting a much larger area of the screen than we need to.
![]() |
Assignee | |
Comment 1•13 years ago
|
||
Attachment #625103 -
Flags: review?(longsonr)
![]() |
Assignee | |
Comment 2•13 years ago
|
||
Actually I've changed the comment to the following locally:
// Remove COORD_CONTEXT_CHANGED, since we establish the coordinate
// context for our descendants and this notification won't change its
// dimensions:
Comment 3•13 years ago
|
||
If the inner svg originally had a width or height of 0px and we change to a non-zero px width/height or we have a viewBox and a width/height of 0% and we change to non-zero% width/height then we do need a notification I think as our children won't have had valid user units at all before. Can you add reftests to check each of these cases please and additional logic if necessary.
Comment 4•13 years ago
|
||
You might want to clone and adjust the reftests that went wrong when you sent your original patch for bug 413960 to try.
![]() |
Assignee | |
Comment 5•13 years ago
|
||
NotifySVGChanged is never called on a frame for changes to itself. It's called on descendants of the frame that changed. So in your examples, when the width/height/viewBox of the nsSVGInnerSVGFrame change, then NotifySVGChanged will be called on all its descendants without the opportunity for nsSVGInnerSVGFrame::NotifySVGChanged to stop that, since nsSVGInnerSVGFrame::AttributeChanged calls nsSVGUtils::NotifyChildrenOfSVGChange.
Updated•13 years ago
|
Attachment #625103 -
Flags: review?(longsonr) → review+
Comment 6•13 years ago
|
||
(In reply to Jonathan Watt [:jwatt] from comment #5)
> NotifySVGChanged is never called on a frame for changes to itself. It's
> called on descendants of the frame that changed. So in your examples, when
> the width/height/viewBox of the nsSVGInnerSVGFrame change, then
> NotifySVGChanged will be called on all its descendants without the
> opportunity for nsSVGInnerSVGFrame::NotifySVGChanged to stop that, since
> nsSVGInnerSVGFrame::AttributeChanged calls
> nsSVGUtils::NotifyChildrenOfSVGChange.
OK, I guess I buy that.
![]() |
Assignee | |
Comment 7•13 years ago
|
||
Target Milestone: --- → mozilla15
Comment 8•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•