Get rid of gfxContext's Stroke() methods

RESOLVED FIXED in mozilla36

Status

()

Core
Graphics
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: jwatt, Assigned: jwatt)

Tracking

(Blocks: 1 bug)

Trunk
mozilla36
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Comment hidden (empty)
(Assignee)

Comment 1

4 years ago
Created attachment 8515966 [details] [diff] [review]
patch
Attachment #8515966 - Flags: review?(matt.woodrow)
Comment on attachment 8515966 [details] [diff] [review]
patch

Review of attachment 8515966 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/svg/SVGContentUtils.cpp
@@ +162,5 @@
>                                    gfxTextContextPaint *aContextPaint,
>                                    StrokeOptionFlags aFlags)
>  {
> +  nsSVGElement* element =
> +    static_cast<nsSVGElement*>(aContent->IsNodeOfType(nsINode::eTEXT) ?

This makes me a little queasy. Can we do this in the caller, or at least document and assert?
Comment on attachment 8515966 [details] [diff] [review]
patch

Review of attachment 8515966 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/svg/SVGContentUtils.cpp
@@ +162,5 @@
>                                    gfxTextContextPaint *aContextPaint,
>                                    StrokeOptionFlags aFlags)
>  {
> +  nsSVGElement* element =
> +    static_cast<nsSVGElement*>(aContent->IsNodeOfType(nsINode::eTEXT) ?

Yeah, agreed. We should be able to do this in the SVGTextFrame caller and not have it here right?
(Assignee)

Comment 4

4 years ago
Created attachment 8516214 [details] [diff] [review]
patch

So boring.

Being more serious, this was just what the old code was doing, but yeah, we can be safer.
Attachment #8515966 - Attachment is obsolete: true
Attachment #8515966 - Flags: review?(matt.woodrow)
Attachment #8516214 - Flags: review?(matt.woodrow)
Attachment #8516214 - Flags: review?(matt.woodrow) → review+
https://hg.mozilla.org/mozilla-central/rev/d960256cdb80
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.