Last Comment Bug 767734 - Give GetCanvasTM knowledge of what the request is for so it can do the right thing when SVG display lists are enabled
: Give GetCanvasTM knowledge of what the request is for so it can do the right ...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: SVG (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: Jonathan Watt [:jwatt] (catching up after vacation)
:
Mentors:
Depends on: 1126940 738192 767823
Blocks: 614732
  Show dependency treegraph
 
Reported: 2012-06-23 12:06 PDT by Jonathan Watt [:jwatt] (catching up after vacation)
Modified: 2015-01-28 20:11 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Require all callers of nsSVGPathGeometryFrame::GeneratePath to pass in the ctm (4.79 KB, patch)
2012-06-24 06:43 PDT, Jonathan Watt [:jwatt] (catching up after vacation)
longsonr: review+
jwatt: checkin+
Details | Diff | Splinter Review
patch (71.60 KB, patch)
2012-06-29 19:24 PDT, Jonathan Watt [:jwatt] (catching up after vacation)
longsonr: review+
Details | Diff | Splinter Review

Description Jonathan Watt [:jwatt] (catching up after vacation) 2012-06-23 12:06:22 PDT
For bug 641732 I need GetCanvasTM to do different things based on whether the call is for painting or hit-testing when the SVG display list painting/hit-testing prefs are enabled, or not, or for a displayed frame, or not.

Basically, for displayed elements being painted or hit-tested through display lists, we need GetCanvasTM to return a simple css-px-to-dev-pixel transform, since the display lists account for any transforms on them or their ancestors. For non-display elements - which are not painted/hit-tested through display lists - we need GetCanvasTM to return the transform as normal. For other calls to GetCanvasTM that are not for painting/hit-testing, we also need GetCanvasTM to return the transform as normal.
Comment 1 Jonathan Watt [:jwatt] (catching up after vacation) 2012-06-24 06:43:56 PDT
Created attachment 636157 [details] [diff] [review]
Require all callers of nsSVGPathGeometryFrame::GeneratePath to pass in the ctm

This is a preliminary patch to change nsSVGPathGeometryFrame::GeneratePath to require all its callers to pass in the ctm they want to use. 3 of the 5 already did. This puts the GetCanvasTM call points at places where we know whether we're being called for painting or hit-testing, making the real, upcoming patch for this bug cleaner.
Comment 2 Jonathan Watt [:jwatt] (catching up after vacation) 2012-06-24 13:24:58 PDT
Pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/85e7655b9ac0
Comment 3 Ryan VanderMeulen [:RyanVM] 2012-06-24 20:07:59 PDT
https://hg.mozilla.org/mozilla-central/rev/85e7655b9ac0
Comment 4 Jonathan Watt [:jwatt] (catching up after vacation) 2012-06-29 19:24:28 PDT
Created attachment 638072 [details] [diff] [review]
patch
Comment 5 Robert Longson 2012-06-30 02:12:18 PDT
Comment on attachment 638072 [details] [diff] [review]
patch

It seems a shame that 

> +  if (!(GetStateBits() & NS_STATE_SVG_NONDISPLAY_CHILD)) {
> +    if ((aFor == FOR_PAINTING && NS_SVGDisplayListPaintingEnabled()) ||
> +        (aFor == FOR_HIT_TESTING && NS_SVGDisplayListHitTestingEnabled())) {
> +      return nsSVGIntegrationUtils::GetCSSPxToDevPxMatrix(this);
> +    }
> +  }

It's a shame this occurs so many time. I don't really have any good ideas for fixing it though.

r=longsonr
Comment 6 Jonathan Watt [:jwatt] (catching up after vacation) 2012-06-30 04:24:11 PDT
Pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/82a0b3fe9fa7
Comment 7 Ryan VanderMeulen [:RyanVM] 2012-06-30 12:41:42 PDT
https://hg.mozilla.org/mozilla-central/rev/82a0b3fe9fa7

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