Give GetCanvasTM knowledge of what the request is for so it can do the right thing when SVG display lists are enabled

RESOLVED FIXED in mozilla16

Status

()

Core
SVG
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

(Depends on: 1 bug)

Trunk
mozilla16
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

5 years ago
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.
Attachment #636157 - Flags: review?(longsonr)
(Assignee)

Updated

5 years ago
Depends on: 767823
(Assignee)

Updated

5 years ago
Summary: Give GetCanvasTM knowledge of what the request is for and have it use that to act on the SVG display list prefs → Give GetCanvasTM knowledge of what the request is for so it can do the right thing when SVG display lists are enabled

Updated

5 years ago
Attachment #636157 - Flags: review?(longsonr) → review+
(Assignee)

Comment 2

5 years ago
Pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/85e7655b9ac0
Whiteboard: [leave open]
https://hg.mozilla.org/mozilla-central/rev/85e7655b9ac0
(Assignee)

Updated

5 years ago
Attachment #636157 - Flags: checkin+
(Assignee)

Comment 4

5 years ago
Created attachment 638072 [details] [diff] [review]
patch
Attachment #638072 - Flags: review?(longsonr)

Comment 5

5 years ago
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
Attachment #638072 - Flags: review?(longsonr) → review+
(Assignee)

Comment 6

5 years ago
Pushed https://hg.mozilla.org/integration/mozilla-inbound/rev/82a0b3fe9fa7
Target Milestone: --- → mozilla16
https://hg.mozilla.org/mozilla-central/rev/82a0b3fe9fa7
(Assignee)

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [leave open]
(Assignee)

Updated

5 years ago
Blocks: 614732

Updated

2 years ago
Depends on: 1126940
You need to log in before you can comment on or make changes to this bug.