Closed
Bug 820230
Opened 13 years ago
Closed 13 years ago
Move PaintSVGGlyph and GetSVGGlyphExtents from nsContentUtils to nsSVGUtils
Categories
(Core :: General, defect)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
Details
Attachments
(1 file)
11.28 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
tdlr: moving them to avoid nsContentUtils.h requiring gfx/ headers
PaintSVGGlyph and GetSVGGlyphExtents requires includes of
#include "gfxContext.h"
#include "gfxFont.h"
which makes any file including nsContentUtils.h depending on GFX.
For example js/xpconnect/loader/mozJSComponentLoader.cpp
It seems to me js/xpconnect depending on gfx/ is a layer violation.
Also, it makes fixing bug 786533 very hard, since std::max requires
<algorithm> which we wrap and thus fails to compile when building
in some configurations. See bug 786533 comment 28 for details.
Assignee | ||
Comment 1•13 years ago
|
||
... well, also just because they really belong in nsSVGUtils.h :-)
Attachment #690666 -
Flags: review?(roc)
Assignee | ||
Comment 2•13 years ago
|
||
I should point out that I cleaned up the code somewhat also, so you don't
miss to review that.
Attachment #690666 -
Flags: review?(roc) → review+
(In reply to Mats Palmgren [:mats] from comment #0)
> It seems to me js/xpconnect depending on gfx/ is a layer violation.
Really it's js/xpconnect depending on nsContentUtils that's a layering violation.
Assignee | ||
Comment 4•13 years ago
|
||
OK, the only use of nsContentUtils is this:
MOZ_ASSERT(nsContentUtils::IsCallerChrome());
(mozJSComponentLoader.cpp compiles without the #include if I remove that line)
Assignee | ||
Comment 5•13 years ago
|
||
Comment 6•13 years ago
|
||
Backed out on suspicion of being the changeset in that push that caused:
https://tbpl.mozilla.org/php/getParsedLog.php?id=17825409&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=17825388&tree=Mozilla-Inbound
etc
https://hg.mozilla.org/integration/mozilla-inbound/rev/db376fcebe62
Assignee | ||
Comment 7•13 years ago
|
||
Sorry about that, I had neglected to add some "b2g platforms" to my default
Try patch (fixed now). The build problem was that gfxFont.h brings in numerous
other headers so when I removed it from nsContentUtils.h it exposed a couple of
dom/ files that didn't include the correct headers for their used APIs
(depending on gfxFont.h for mozilla::services etc).
I'll reland in a moment (with a green Try). (It's just a an added #include
in the affected files so no need to re-review.)
https://hg.mozilla.org/try/rev/ea713cb603fd
Assignee | ||
Comment 8•13 years ago
|
||
Comment 9•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/cbae3f16225b
https://hg.mozilla.org/mozilla-central/rev/1d816bf6e05e
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in
before you can comment on or make changes to this bug.
Description
•