Closed Bug 1293786 Opened 8 years ago Closed 8 years ago

Remove SVGDocument

Categories

(Core :: SVG, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: longsonr, Unassigned)

References

Details

(Keywords: dev-doc-complete, site-compat)

Attachments

(3 files)

SVGDocument has been removed in SVG 2
Assignee: nobody → longsonr
Attachment #8779513 - Flags: review?(cam)
Attachment #8779514 - Attachment description: remove SVGDocument interface → part 1 - remove SVGDocument interface
Comment on attachment 8779514 [details] [diff] [review]
part 1 - remove SVGDocument interface

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

r- but only because I think we need to expose rootElement on Document objects, as described in https://svgwg.org/svg2-draft/struct.html#InterfaceDocumentExtensions.  I'm can't test the WebKit change you reference (it doesn't seem to have made it into their Nightly build yet), but it looks like Chrome and Edge both have this implemented.  Chrome and Edge also both expose domain on both HTML and SVG documents, and the HTML spec puts domain on the Document interface, but we only have it on HTMLDocument.  I'm less worried about the lack of domain on SVG documents.  I tested with http://mcc.id.au/temp/root.html.

In terms of the actual type of document object SVG documents are exposed as to script, Edge uses Document and Chrome uses XMLDocument.  I'm fine with us following Chrome here.

Don't forget to get a DOM peer's review too, due to the IDL changes.

::: dom/webidl/moz.build
@@ -451,5 @@
>      'SVGClipPathElement.webidl',
>      'SVGComponentTransferFunctionElement.webidl',
>      'SVGDefsElement.webidl',
>      'SVGDescElement.webidl',
> -    'SVGDocument.webidl',

Please remove the file, too.
Attachment #8779514 - Flags: review?(cam) → review-
Attachment #8779513 - Flags: review?(cam) → review+
Don't know how to do that.
Assignee: longsonr → nobody
Comment on attachment 8779514 [details] [diff] [review]
part 1 - remove SVGDocument interface

With part 2 handling the rootElement moving, r=me on this patch with the other comments I made.
Attachment #8779514 - Flags: review- → review+
Attachment #8780401 - Flags: review?(longsonr) → review+
Ah, so this is just to remove the web exposing part of SVGDocument, not the implementation?
Why that?
Comment on attachment 8780401 [details] [diff] [review]
Part 2: Move rootElement from the now-removed SVGDocument to Document.

But I guess that is fine for now.
Attachment #8780401 - Flags: review?(bugs) → review+
What is the interface which svg documents now use? XMLDocument? What is it in other browsers?
blink uses HTMLDocument, but looks like it isn't really HTMLdocument since things break easily when one tries to use stuff like document.write with it
(In reply to Olli Pettay [:smaug] from comment #11)
> blink uses HTMLDocument, but looks like it isn't really HTMLdocument since
> things break easily when one tries to use stuff like document.write with it

From my testing in comment 4, Edge uses Document and Chrome uses XMLDocument.  Robert's patch makes us use XMLDocument.  And having just tested an updated WebKit Nightly, it too is using XMLDocument.  (But unlike other browsers it makes window.SVGDocument an alias for XMLDocument.)
Comment on attachment 8779514 [details] [diff] [review]
part 1 - remove SVGDocument interface

Need DOM peer's review on this patch too.
Attachment #8779514 - Flags: review?(bugs)
Comment on attachment 8779514 [details] [diff] [review]
part 1 - remove SVGDocument interface

Isn't this missing to actually remove SVGDocument.webidl file?
Please 'hg remove' it
Attachment #8779514 - Flags: review?(bugs) → review+
Why the patches haven't landed?
Flags: needinfo?(longsonr)
Flags: needinfo?(cam)
One of us needs to update the patch to remove the now unused file; I'll look at that tomorrow.
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5c60775f445e
Part 0: Fix existing mochitest. r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/8cba8a0a730c
Part 1: Remove SVGDocument interface. r=heycam,smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/f8911c81ee9a
Part 2: Move rootElement from the now-removed SVGDocument to Document. r=longsonr,smaug
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/fb604e5ff982 - yay unexpected passes in https://treeherder.mozilla.org/logviewer.html#?job_id=36676731&repo=mozilla-inbound but boo unexpected fails that directly want you not to have done that in https://treeherder.mozilla.org/logviewer.html#?job_id=36675866&repo=mozilla-inbound so wpt is going to need an Expectation Adjustment.
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/63b988fc32fa
Part 0: Fix existing mochitest. r=heycam
https://hg.mozilla.org/integration/mozilla-inbound/rev/821c7f813eee
Part 1: Remove SVGDocument interface. r=heycam,smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/7414e0e00acf
Part 2: Move rootElement from the now-removed SVGDocument to Document. r=longsonr,smaug
We never documented SVGDocument, so I updated the one page that sort of talked about it in a roundabout way to include information about the change and to clarify how to get documents in various conditions.

Updated:

https://developer.mozilla.org/en-US/docs/Web/SVG/Scripting#Inter-document_scripting:_referencing_embedded_SVG
https://developer.mozilla.org/en-US/Firefox/Releases/52#SVG

Please let me know if I’ve made any errors or left anything out.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: