Closed
Bug 955917
Opened 12 years ago
Closed 12 years ago
Remove unused functions from nsSVGUtils
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: longsonr, Assigned: longsonr)
Details
Attachments
(2 files)
4.89 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
6.52 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → longsonr
OS: Windows Vista → All
Hardware: x86 → All
Assignee | ||
Updated•12 years ago
|
Attachment #8355071 -
Attachment is patch: true
Attachment #8355071 -
Flags: review?(dholbert)
Comment 1•12 years ago
|
||
It looks like nsSVGUtils::SetupContextPaint (made into a private-to-nsSVGUtils.cpp function in this patch) is actually near-identical to SVGTextFrame::SetupContextPaint().
Seems like maybe we should keep the nsSVGUtils method public, and (perhaps in a separate bug) make SVGTextFrame share its code rather than reimplementing it.
Comment 2•12 years ago
|
||
Comment on attachment 8355071 [details] [diff] [review]
utils.txt
Definitely r=me on the rest, though (the non-SetupContextPaint-related, strictly-code-removal parts.
Let's hold off on the SetupContextPaint tweak for now, since per above, I think there may be reasons to keep that function public.
Attachment #8355071 -
Flags: review?(dholbert) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Flags: in-testsuite-
Assignee | ||
Updated•12 years ago
|
Whiteboard: [leave open]
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #8355196 -
Flags: review?(dholbert)
Comment 5•12 years ago
|
||
Comment on attachment 8355196 [details] [diff] [review]
part 2
>diff --git a/layout/svg/SVGTextFrame.cpp b/layout/svg/SVGTextFrame.cpp
>--- a/layout/svg/SVGTextFrame.cpp
>+++ b/layout/svg/SVGTextFrame.cpp
>@@ -5582,56 +5582,26 @@ SVGTextFrame::SetupInheritablePaint(gfxC
> const FramePropertyDescriptor* aProperty)
> {
> const nsStyleSVG *style = aFrame->StyleSVG();
> nsSVGPaintServerFrame *ps =
> nsSVGEffects::GetPaintServer(aFrame, &(style->*aFillOrStroke), aProperty);
>
> if (ps && ps->SetupPaintServer(aContext, aFrame, aFillOrStroke, aOpacity)) {
> aTargetPaint.SetPaintServer(aFrame, aContext->CurrentMatrix(), ps);
>- } else if (SetupContextPaint(aContext, aFrame, aFillOrStroke, aOpacity, aOuterContextPaint)) {
>+ } else if (nsSVGUtils::SetupContextPaint(aContext, aOuterContextPaint,
>+ aFrame->StyleSVG()->*aFillOrStroke,
We already looked up StyleSVG() above, so this last line can just be:
style->*aFillOrStroke
r=me with that
Optional: I'd marginally prefer to have this part split this out from the second half of this patch (dropping PathExtentsToMaxStrokeExtents), because a function-swap is functionally different from unused-code-removal. (It's also conceivable that we'd want to back out the first piece, e.g. if the SetupContextPaint functions were subtly different in a way that we didn't notice; in that case, we wouldn't want to back out the second piece).
If you do that, r=me on both pieces.
Attachment #8355196 -
Flags: review?(dholbert) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Split out into another bug or split out into another patch in this bug?
Comment 7•12 years ago
|
||
I just meant a separate patch (in this bug is fine).
Comment 8•12 years ago
|
||
Assignee | ||
Comment 9•12 years ago
|
||
Assignee | ||
Comment 10•12 years ago
|
||
![]() |
||
Comment 11•12 years ago
|
||
Assignee | ||
Comment 12•12 years ago
|
||
Whiteboard: [leave open]
Comment 13•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in
before you can comment on or make changes to this bug.
Description
•