Closed
Bug 886416
Opened 12 years ago
Closed 11 years ago
Move SVGLength to WebIDL
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: Ms2ger, Assigned: ehsan.akhgari)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
54.40 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → ehsan
Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 8391986 [details] [diff] [review]
Move SVGLength to WebIDL; r=bzbarsky
https://tbpl.mozilla.org/?tree=Try&rev=b3190ccf4d6f
Attachment #8391986 -
Flags: review?(bzbarsky)
Comment 3•11 years ago
|
||
Comment on attachment 8391986 [details] [diff] [review]
Move SVGLength to WebIDL; r=bzbarsky
Review of attachment 8391986 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/xpconnect/tests/mochitest/test_bug790732.html
@@ -43,1 @@
> is(Ci.nsIDOMNodeFilter, NodeFilter);
I don't think you want to get rid of this - we'd actually want this for the constants even if we got rid of nsIDOMSVGLength
Comment 4•11 years ago
|
||
(In reply to David Zbarsky (:dzbarsky) from comment #3)
> I don't think you want to get rid of this - we'd actually want this for the
> constants even if we got rid of nsIDOMSVGLength
Where do we need this? No in-tree users present. You can get the same constants from the global SVGLength property. Also, it will remove constants from the content-exposed Components shim. The real Components will have the constants which addons will use.
Keywords: site-compat
Comment 5•11 years ago
|
||
FYI I already explained it in bug 893117. Please do not confuse the Components shim with the real Components.
Assignee | ||
Comment 6•11 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #4)
> (In reply to David Zbarsky (:dzbarsky) from comment #3)
> > I don't think you want to get rid of this - we'd actually want this for the
> > constants even if we got rid of nsIDOMSVGLength
>
> Where do we need this? No in-tree users present. You can get the same
> constants from the global SVGLength property. Also, it will remove constants
> from the content-exposed Components shim. The real Components will have the
> constants which addons will use.
Flags: needinfo?(dzbarsky)
Comment 7•11 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #4)
> (In reply to David Zbarsky (:dzbarsky) from comment #3)
> > I don't think you want to get rid of this - we'd actually want this for the
> > constants even if we got rid of nsIDOMSVGLength
>
> Where do we need this? No in-tree users present. You can get the same
> constants from the global SVGLength property. Also, it will remove constants
> from the content-exposed Components shim. The real Components will have the
> constants which addons will use.
Currently Components.interfaces.nsIDOMSVGLength.SVG_LENGTHTYPE_PX works in content scopes, so we should probably try to avoid breaking pages.
Flags: needinfo?(dzbarsky)
Comment 8•11 years ago
|
||
Do you know a concrete example of breaking pages? Those pages will not work browsers other than Firefox anyway. They should update the page using SVGLength.SVG_LENGTHTYPE_PX (if at all present).
Comment 9•11 years ago
|
||
It's probably safe to remove, but better to do that as a separate patch.
Assignee | ||
Comment 11•11 years ago
|
||
I'm not sure if I follow all of the comments here. Boris, please let me know what I should do.
![]() |
||
Comment 12•11 years ago
|
||
I think the proposal is that you leave in that is() bit in the test and the components shim entry for now, and then remove those in bug 984461.
I guess that does minimize risk, though I suspect absolutely no one on the web uses Components.interfaces.nsIDOMSVGLength.
Assignee | ||
Comment 13•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Attachment #8391986 -
Attachment is obsolete: true
Attachment #8391986 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•11 years ago
|
Attachment #8393944 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 14•11 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #12)
> I guess that does minimize risk, though I suspect absolutely no one on the
> web uses Components.interfaces.nsIDOMSVGLength.
Yeah, seriously! And I also completely miss why we wouldn't at least try to see if we can remove this. But I don't want to fight over that here.
![]() |
||
Comment 15•11 years ago
|
||
Comment on attachment 8393944 [details] [diff] [review]
Move SVGLength to WebIDL; r=bzbarsky
You could probably have kept the three separate classes and virtual functions if desired... would just need a shared (pure virtual?) base class. Anyway, I'm fine with having just one class.
>+++ b/content/svg/content/src/DOMSVGLength.cpp
>+DOMSVGLength::~DOMSVGLength()
>+ nsSVGAttrTearoffTable<nsSVGLength2, DOMSVGLength>& table =
This seem like a good use case for "auto"?
>+DOMSVGLength::GetTearOff(nsSVGLength2* aVal, nsSVGElement* aSVGElement,
>+ nsSVGAttrTearoffTable<nsSVGLength2, DOMSVGLength>& table =
And here.
>+ nsRefPtr<DOMSVGLength> element = table.GetTearoff(aVal);
s/element/domLength/?
>+DOMSVGLength::SetValueInSpecifiedUnits(float aValue, ErrorResult& aRv)
>+ if (mVal) {
>+ mVal->SetBaseValueInSpecifiedUnits(aValue, mSVGElement, true);
Need to return after that call, right?
>+DOMSVGLength::SetValueAsString(const nsAString& aValue, ErrorResult& aRv)
>+ if (mVal) {
>+ mVal->SetBaseValueString(aValue, mSVGElement, true);
And here.
>+DOMSVGLength::ConvertToSpecifiedUnits(uint16_t aUnit, ErrorResult& aRv)
>+ if (mVal) {
>+ mVal->ConvertToSpecifiedUnits(aUnit, mSVGElement);
And here.
>+++ b/content/svg/content/src/DOMSVGLength.h
>+ nsISupports* GetParentObject() const {
>+ return nullptr;
Could return Element() if mList, else mSVGElement? I'm not convinced returning null is right.
>+ JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
I assume you merged that to the aScope removal.
r=me with the above fixed. Sorry this took so long... I _think_ I've convinced myself that the lifetime management here is sufficiently unchanged.
Attachment #8393944 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 16•11 years ago
|
||
Comment 17•11 years ago
|
||
Backed out for mochitest failures:
https://tbpl.mozilla.org/php/getParsedLog.php?id=37633036&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=37633114&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=37633352&tree=Mozilla-Inbound
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/eff44f055d4a
Assignee | ||
Comment 18•11 years ago
|
||
Ah, I must have used auto&... Sorry.
Assignee | ||
Comment 19•11 years ago
|
||
Comment 20•11 years ago
|
||
Bunch of valgrind spew, but presuming same cause:
https://tbpl.mozilla.org/php/getParsedLog.php?id=37635977&tree=Mozilla-Inbound
Assignee | ||
Comment 21•11 years ago
|
||
(In reply to comment #20)
> Bunch of valgrind spew, but presuming same cause:
> https://tbpl.mozilla.org/php/getParsedLog.php?id=37635977&tree=Mozilla-Inbound
Yes I think they're the same thing, but we'll know for sure on my try push.
Assignee | ||
Comment 22•11 years ago
|
||
Comment 23•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Assignee | ||
Updated•11 years ago
|
Depends on: CVE-2014-1563
Updated•9 years ago
|
Depends on: CVE-2016-5281
You need to log in
before you can comment on or make changes to this bug.
Description
•