aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-11-01 23:45:06 +0100
committerSimon Sapin <simon.sapin@exyr.org>2018-11-06 15:26:02 +0100
commit45f7199eee82c66637ec68287eafa40a651001c4 (patch)
tree8c0802f4ac7b89c2ce4d73063c8f65b9ee5face9 /components/script/dom
parent86f148fb97601413c0d983f21b760d973ade7a75 (diff)
downloadservo-45f7199eee82c66637ec68287eafa40a651001c4.tar.gz
servo-45f7199eee82c66637ec68287eafa40a651001c4.zip
`cargo fix --edition`
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/abstractworker.rs8
-rw-r--r--components/script/dom/abstractworkerglobalscope.rs18
-rw-r--r--components/script/dom/activation.rs18
-rw-r--r--components/script/dom/analysernode.rs24
-rw-r--r--components/script/dom/attr.rs26
-rw-r--r--components/script/dom/audiobuffer.rs16
-rw-r--r--components/script/dom/audiobuffersourcenode.rs30
-rw-r--r--components/script/dom/audiocontext.rs30
-rw-r--r--components/script/dom/audiodestinationnode.rs16
-rw-r--r--components/script/dom/audiolistener.rs14
-rw-r--r--components/script/dom/audionode.rs18
-rw-r--r--components/script/dom/audioparam.rs14
-rw-r--r--components/script/dom/audioscheduledsourcenode.rs18
-rw-r--r--components/script/dom/baseaudiocontext.rs74
-rw-r--r--components/script/dom/beforeunloadevent.rs20
-rw-r--r--components/script/dom/bindings/callback.rs12
-rw-r--r--components/script/dom/bindings/conversions.rs20
-rw-r--r--components/script/dom/bindings/error.rs14
-rw-r--r--components/script/dom/bindings/htmlconstructor.rs150
-rw-r--r--components/script/dom/bindings/inheritance.rs8
-rw-r--r--components/script/dom/bindings/interface.rs12
-rw-r--r--components/script/dom/bindings/iterable.rs14
-rw-r--r--components/script/dom/bindings/mozmap.rs6
-rw-r--r--components/script/dom/bindings/namespace.rs4
-rw-r--r--components/script/dom/bindings/proxyhandler.rs4
-rw-r--r--components/script/dom/bindings/refcounted.rs14
-rw-r--r--components/script/dom/bindings/reflector.rs6
-rw-r--r--components/script/dom/bindings/root.rs12
-rw-r--r--components/script/dom/bindings/settings_stack.rs6
-rw-r--r--components/script/dom/bindings/structuredclone.rs12
-rw-r--r--components/script/dom/bindings/trace.rs20
-rw-r--r--components/script/dom/bindings/utils.rs18
-rw-r--r--components/script/dom/bindings/weakref.rs8
-rw-r--r--components/script/dom/bindings/xmlname.rs4
-rw-r--r--components/script/dom/biquadfilternode.rs24
-rw-r--r--components/script/dom/blob.rs18
-rw-r--r--components/script/dom/bluetooth.rs42
-rw-r--r--components/script/dom/bluetoothadvertisingevent.rs24
-rw-r--r--components/script/dom/bluetoothcharacteristicproperties.rs10
-rw-r--r--components/script/dom/bluetoothdevice.rs38
-rw-r--r--components/script/dom/bluetoothpermissionresult.rs30
-rw-r--r--components/script/dom/bluetoothremotegattcharacteristic.rs38
-rw-r--r--components/script/dom/bluetoothremotegattdescriptor.rs30
-rw-r--r--components/script/dom/bluetoothremotegattserver.rs24
-rw-r--r--components/script/dom/bluetoothremotegattservice.rs26
-rw-r--r--components/script/dom/bluetoothuuid.rs12
-rw-r--r--components/script/dom/canvasgradient.rs18
-rw-r--r--components/script/dom/canvaspattern.rs10
-rw-r--r--components/script/dom/canvasrenderingcontext2d.rs46
-rw-r--r--components/script/dom/channelmergernode.rs16
-rw-r--r--components/script/dom/characterdata.rs36
-rw-r--r--components/script/dom/client.rs14
-rw-r--r--components/script/dom/closeevent.rs20
-rw-r--r--components/script/dom/comment.rs18
-rw-r--r--components/script/dom/compositionevent.rs16
-rw-r--r--components/script/dom/console.rs8
-rw-r--r--components/script/dom/create.rs154
-rw-r--r--components/script/dom/crypto.rs14
-rw-r--r--components/script/dom/css.rs14
-rw-r--r--components/script/dom/cssconditionrule.rs14
-rw-r--r--components/script/dom/cssfontfacerule.rs16
-rw-r--r--components/script/dom/cssgroupingrule.rs18
-rw-r--r--components/script/dom/cssimportrule.rs16
-rw-r--r--components/script/dom/csskeyframerule.rs20
-rw-r--r--components/script/dom/csskeyframesrule.rs26
-rw-r--r--components/script/dom/cssmediarule.rs24
-rw-r--r--components/script/dom/cssnamespacerule.rs18
-rw-r--r--components/script/dom/cssrule.rs32
-rw-r--r--components/script/dom/cssrulelist.rs20
-rw-r--r--components/script/dom/cssstyledeclaration.rs22
-rw-r--r--components/script/dom/cssstylerule.rs22
-rw-r--r--components/script/dom/cssstylesheet.rs22
-rw-r--r--components/script/dom/cssstylevalue.rs14
-rw-r--r--components/script/dom/csssupportsrule.rs20
-rw-r--r--components/script/dom/cssviewportrule.rs16
-rw-r--r--components/script/dom/customelementregistry.rs50
-rw-r--r--components/script/dom/customevent.rs22
-rw-r--r--components/script/dom/dedicatedworkerglobalscope.rs48
-rw-r--r--components/script/dom/dissimilaroriginlocation.rs18
-rw-r--r--components/script/dom/dissimilaroriginwindow.rs20
-rw-r--r--components/script/dom/document.rs182
-rw-r--r--components/script/dom/documentfragment.rs28
-rw-r--r--components/script/dom/documenttype.rs18
-rw-r--r--components/script/dom/domexception.rs14
-rw-r--r--components/script/dom/domimplementation.rs42
-rw-r--r--components/script/dom/dommatrix.rs16
-rw-r--r--components/script/dom/dommatrixreadonly.rs22
-rw-r--r--components/script/dom/domparser.rs34
-rw-r--r--components/script/dom/dompoint.rs14
-rw-r--r--components/script/dom/dompointreadonly.rs10
-rw-r--r--components/script/dom/domquad.rs18
-rw-r--r--components/script/dom/domrect.rs16
-rw-r--r--components/script/dom/domrectreadonly.rs10
-rw-r--r--components/script/dom/domstringmap.rs16
-rw-r--r--components/script/dom/domtokenlist.rs18
-rw-r--r--components/script/dom/element.rs148
-rw-r--r--components/script/dom/errorevent.rs24
-rw-r--r--components/script/dom/event.rs34
-rw-r--r--components/script/dom/eventsource.rs32
-rw-r--r--components/script/dom/eventtarget.rs60
-rw-r--r--components/script/dom/extendableevent.rs18
-rw-r--r--components/script/dom/extendablemessageevent.rs26
-rw-r--r--components/script/dom/file.rs22
-rw-r--r--components/script/dom/filelist.rs12
-rw-r--r--components/script/dom/filereader.rs40
-rw-r--r--components/script/dom/filereadersync.rs18
-rw-r--r--components/script/dom/focusevent.rs24
-rw-r--r--components/script/dom/formdata.rs28
-rw-r--r--components/script/dom/gainnode.rs20
-rw-r--r--components/script/dom/gamepad.rs26
-rw-r--r--components/script/dom/gamepadbutton.rs12
-rw-r--r--components/script/dom/gamepadbuttonlist.rs12
-rw-r--r--components/script/dom/gamepadevent.rs24
-rw-r--r--components/script/dom/gamepadlist.rs14
-rw-r--r--components/script/dom/globalscope.rs70
-rw-r--r--components/script/dom/hashchangeevent.rs20
-rw-r--r--components/script/dom/headers.rs16
-rw-r--r--components/script/dom/history.rs32
-rw-r--r--components/script/dom/htmlanchorelement.rs44
-rw-r--r--components/script/dom/htmlareaelement.rs32
-rw-r--r--components/script/dom/htmlaudioelement.rs10
-rw-r--r--components/script/dom/htmlbaseelement.rs22
-rw-r--r--components/script/dom/htmlbodyelement.rs24
-rw-r--r--components/script/dom/htmlbrelement.rs10
-rwxr-xr-xcomponents/script/dom/htmlbuttonelement.rs42
-rw-r--r--components/script/dom/htmlcanvaselement.rs42
-rw-r--r--components/script/dom/htmlcollection.rs22
-rw-r--r--components/script/dom/htmldataelement.rs14
-rw-r--r--components/script/dom/htmldatalistelement.rs20
-rw-r--r--components/script/dom/htmldetailselement.rs26
-rw-r--r--components/script/dom/htmldialogelement.rs22
-rw-r--r--components/script/dom/htmldirectoryelement.rs10
-rw-r--r--components/script/dom/htmldivelement.rs12
-rw-r--r--components/script/dom/htmldlistelement.rs10
-rw-r--r--components/script/dom/htmlelement.rs60
-rw-r--r--components/script/dom/htmlembedelement.rs10
-rw-r--r--components/script/dom/htmlfieldsetelement.rs28
-rw-r--r--components/script/dom/htmlfontelement.rs22
-rw-r--r--components/script/dom/htmlformcontrolscollection.rs24
-rwxr-xr-xcomponents/script/dom/htmlformelement.rs84
-rw-r--r--components/script/dom/htmlframeelement.rs10
-rw-r--r--components/script/dom/htmlframesetelement.rs14
-rw-r--r--components/script/dom/htmlheadelement.rs22
-rw-r--r--components/script/dom/htmlheadingelement.rs10
-rw-r--r--components/script/dom/htmlhrelement.rs18
-rw-r--r--components/script/dom/htmlhtmlelement.rs10
-rw-r--r--components/script/dom/htmliframeelement.rs46
-rw-r--r--components/script/dom/htmlimageelement.rs76
-rwxr-xr-xcomponents/script/dom/htmlinputelement.rs74
-rw-r--r--components/script/dom/htmllabelelement.rs30
-rw-r--r--components/script/dom/htmllegendelement.rs24
-rw-r--r--components/script/dom/htmllielement.rs18
-rw-r--r--components/script/dom/htmllinkelement.rs36
-rw-r--r--components/script/dom/htmlmapelement.rs14
-rw-r--r--components/script/dom/htmlmediaelement.rs70
-rw-r--r--components/script/dom/htmlmetaelement.rs30
-rw-r--r--components/script/dom/htmlmeterelement.rs14
-rw-r--r--components/script/dom/htmlmodelement.rs10
-rwxr-xr-xcomponents/script/dom/htmlobjectelement.rs30
-rw-r--r--components/script/dom/htmlolistelement.rs10
-rw-r--r--components/script/dom/htmloptgroupelement.rs22
-rw-r--r--components/script/dom/htmloptionelement.rs40
-rw-r--r--components/script/dom/htmloptionscollection.rs36
-rw-r--r--components/script/dom/htmloutputelement.rs26
-rw-r--r--components/script/dom/htmlparagraphelement.rs10
-rw-r--r--components/script/dom/htmlparamelement.rs10
-rw-r--r--components/script/dom/htmlpictureelement.rs10
-rw-r--r--components/script/dom/htmlpreelement.rs10
-rw-r--r--components/script/dom/htmlprogresselement.rs14
-rw-r--r--components/script/dom/htmlquoteelement.rs10
-rw-r--r--components/script/dom/htmlscriptelement.rs54
-rwxr-xr-xcomponents/script/dom/htmlselectelement.rs54
-rw-r--r--components/script/dom/htmlsourceelement.rs30
-rw-r--r--components/script/dom/htmlspanelement.rs10
-rw-r--r--components/script/dom/htmlstyleelement.rs28
-rw-r--r--components/script/dom/htmltablecaptionelement.rs10
-rw-r--r--components/script/dom/htmltablecellelement.rs26
-rw-r--r--components/script/dom/htmltablecolelement.rs10
-rw-r--r--components/script/dom/htmltableelement.rs38
-rw-r--r--components/script/dom/htmltablerowelement.rs34
-rw-r--r--components/script/dom/htmltablesectionelement.rs26
-rw-r--r--components/script/dom/htmltemplateelement.rs22
-rwxr-xr-xcomponents/script/dom/htmltextareaelement.rs54
-rw-r--r--components/script/dom/htmltimeelement.rs14
-rw-r--r--components/script/dom/htmltitleelement.rs20
-rw-r--r--components/script/dom/htmltrackelement.rs10
-rw-r--r--components/script/dom/htmlulistelement.rs10
-rw-r--r--components/script/dom/htmlunknownelement.rs10
-rw-r--r--components/script/dom/htmlvideoelement.rs12
-rw-r--r--components/script/dom/imagedata.rs12
-rw-r--r--components/script/dom/inputevent.rs16
-rw-r--r--components/script/dom/keyboardevent.rs24
-rw-r--r--components/script/dom/location.rs20
-rw-r--r--components/script/dom/macros.rs104
-rw-r--r--components/script/dom/mediaerror.rs10
-rw-r--r--components/script/dom/medialist.rs16
-rw-r--r--components/script/dom/mediaquerylist.rs20
-rw-r--r--components/script/dom/mediaquerylistevent.rs24
-rw-r--r--components/script/dom/messageevent.rs24
-rw-r--r--components/script/dom/mimetype.rs10
-rw-r--r--components/script/dom/mimetypearray.rs14
-rw-r--r--components/script/dom/mouseevent.rs24
-rw-r--r--components/script/dom/mutationobserver.rs30
-rw-r--r--components/script/dom/mutationrecord.rs14
-rw-r--r--components/script/dom/namednodemap.rs22
-rw-r--r--components/script/dom/navigator.rs32
-rw-r--r--components/script/dom/navigatorinfo.rs2
-rw-r--r--components/script/dom/node.rs102
-rw-r--r--components/script/dom/nodeiterator.rs22
-rw-r--r--components/script/dom/nodelist.rs14
-rw-r--r--components/script/dom/offlineaudiocompletionevent.rs24
-rw-r--r--components/script/dom/offlineaudiocontext.rs38
-rw-r--r--components/script/dom/oscillatornode.rs22
-rw-r--r--components/script/dom/pagetransitionevent.rs20
-rw-r--r--components/script/dom/paintrenderingcontext2d.rs40
-rw-r--r--components/script/dom/paintsize.rs14
-rw-r--r--components/script/dom/paintworkletglobalscope.rs42
-rw-r--r--components/script/dom/pannernode.rs26
-rw-r--r--components/script/dom/performance.rs34
-rw-r--r--components/script/dom/performanceentry.rs14
-rw-r--r--components/script/dom/performanceobserver.rs30
-rw-r--r--components/script/dom/performanceobserverentrylist.rs18
-rw-r--r--components/script/dom/performancepainttiming.rs12
-rw-r--r--components/script/dom/performancetiming.rs14
-rw-r--r--components/script/dom/permissions.rs22
-rw-r--r--components/script/dom/permissionstatus.rs14
-rw-r--r--components/script/dom/plugin.rs10
-rw-r--r--components/script/dom/pluginarray.rs14
-rw-r--r--components/script/dom/popstateevent.rs24
-rw-r--r--components/script/dom/processinginstruction.rs14
-rw-r--r--components/script/dom/progressevent.rs20
-rw-r--r--components/script/dom/promise.rs12
-rw-r--r--components/script/dom/promisenativehandler.rs10
-rw-r--r--components/script/dom/promiserejectionevent.rs24
-rw-r--r--components/script/dom/radionodelist.rs24
-rw-r--r--components/script/dom/range.rs48
-rw-r--r--components/script/dom/request.rs44
-rw-r--r--components/script/dom/response.rs30
-rw-r--r--components/script/dom/screen.rs18
-rw-r--r--components/script/dom/serviceworker.rs26
-rw-r--r--components/script/dom/serviceworkercontainer.rs26
-rw-r--r--components/script/dom/serviceworkerglobalscope.rs40
-rw-r--r--components/script/dom/serviceworkerregistration.rs18
-rw-r--r--components/script/dom/servoparser/async_html.rs32
-rw-r--r--components/script/dom/servoparser/html.rs26
-rw-r--r--components/script/dom/servoparser/mod.rs58
-rw-r--r--components/script/dom/servoparser/xml.rs12
-rw-r--r--components/script/dom/storage.rs24
-rw-r--r--components/script/dom/storageevent.rs24
-rw-r--r--components/script/dom/stylepropertymapreadonly.rs16
-rw-r--r--components/script/dom/stylesheet.rs16
-rw-r--r--components/script/dom/stylesheetlist.rs14
-rw-r--r--components/script/dom/svgelement.rs8
-rw-r--r--components/script/dom/svggraphicselement.rs8
-rw-r--r--components/script/dom/svgsvgelement.rs20
-rw-r--r--components/script/dom/testbinding.rs60
-rw-r--r--components/script/dom/testbindingiterable.rs14
-rw-r--r--components/script/dom/testbindingpairiterable.rs18
-rw-r--r--components/script/dom/testbindingproxy.rs6
-rw-r--r--components/script/dom/testrunner.rs14
-rw-r--r--components/script/dom/testworklet.rs30
-rw-r--r--components/script/dom/testworkletglobalscope.rs16
-rw-r--r--components/script/dom/text.rs26
-rw-r--r--components/script/dom/textcontrol.rs18
-rw-r--r--components/script/dom/textdecoder.rs16
-rw-r--r--components/script/dom/textencoder.rs14
-rw-r--r--components/script/dom/timeranges.rs16
-rw-r--r--components/script/dom/touch.rs14
-rw-r--r--components/script/dom/touchevent.rs22
-rw-r--r--components/script/dom/touchlist.rs12
-rw-r--r--components/script/dom/transitionevent.rs22
-rw-r--r--components/script/dom/treewalker.rs22
-rw-r--r--components/script/dom/uievent.rs20
-rw-r--r--components/script/dom/url.rs20
-rw-r--r--components/script/dom/urlhelper.rs2
-rw-r--r--components/script/dom/urlsearchparams.rs24
-rw-r--r--components/script/dom/userscripts.rs8
-rwxr-xr-xcomponents/script/dom/validation.rs2
-rwxr-xr-xcomponents/script/dom/validitystate.rs12
-rw-r--r--components/script/dom/virtualmethods.rs98
-rw-r--r--components/script/dom/vr.rs32
-rw-r--r--components/script/dom/vrdisplay.rs60
-rw-r--r--components/script/dom/vrdisplaycapabilities.rs12
-rw-r--r--components/script/dom/vrdisplayevent.rs26
-rw-r--r--components/script/dom/vreyeparameters.rs14
-rw-r--r--components/script/dom/vrfieldofview.rs14
-rw-r--r--components/script/dom/vrframedata.rs18
-rw-r--r--components/script/dom/vrpose.rs10
-rw-r--r--components/script/dom/vrstageparameters.rs14
-rw-r--r--components/script/dom/webgl2renderingcontext.rs50
-rw-r--r--components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs12
-rw-r--r--components/script/dom/webgl_extensions/ext/extblendminmax.rs8
-rw-r--r--components/script/dom/webgl_extensions/ext/extcolorbufferhalffloat.rs10
-rw-r--r--components/script/dom/webgl_extensions/ext/extshadertexturelod.rs8
-rw-r--r--components/script/dom/webgl_extensions/ext/exttexturefilteranisotropic.rs10
-rw-r--r--components/script/dom/webgl_extensions/ext/mod.rs2
-rw-r--r--components/script/dom/webgl_extensions/ext/oeselementindexuint.rs8
-rw-r--r--components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs10
-rw-r--r--components/script/dom/webgl_extensions/ext/oestexturefloat.rs8
-rw-r--r--components/script/dom/webgl_extensions/ext/oestexturefloatlinear.rs8
-rw-r--r--components/script/dom/webgl_extensions/ext/oestexturehalffloat.rs8
-rw-r--r--components/script/dom/webgl_extensions/ext/oestexturehalffloatlinear.rs10
-rw-r--r--components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs12
-rw-r--r--components/script/dom/webgl_extensions/ext/webglcolorbufferfloat.rs10
-rw-r--r--components/script/dom/webgl_extensions/extension.rs8
-rw-r--r--components/script/dom/webgl_extensions/extensions.rs26
-rw-r--r--components/script/dom/webgl_extensions/wrapper.rs10
-rw-r--r--components/script/dom/webgl_validations/tex_image_2d.rs6
-rw-r--r--components/script/dom/webgl_validations/types.rs4
-rw-r--r--components/script/dom/webglactiveinfo.rs12
-rw-r--r--components/script/dom/webglbuffer.rs14
-rw-r--r--components/script/dom/webglcontextevent.rs22
-rw-r--r--components/script/dom/webglframebuffer.rs20
-rw-r--r--components/script/dom/webglobject.rs6
-rw-r--r--components/script/dom/webglprogram.rs24
-rw-r--r--components/script/dom/webglrenderbuffer.rs20
-rw-r--r--components/script/dom/webglrenderingcontext.rs80
-rw-r--r--components/script/dom/webglshader.rs22
-rw-r--r--components/script/dom/webglshaderprecisionformat.rs10
-rw-r--r--components/script/dom/webgltexture.rs20
-rw-r--r--components/script/dom/webgluniformlocation.rs8
-rw-r--r--components/script/dom/webglvertexarrayobjectoes.rs18
-rw-r--r--components/script/dom/websocket.rs46
-rw-r--r--components/script/dom/window.rs130
-rw-r--r--components/script/dom/windowproxy.rs32
-rw-r--r--components/script/dom/worker.rs34
-rw-r--r--components/script/dom/workerglobalscope.rs60
-rw-r--r--components/script/dom/workerlocation.rs14
-rw-r--r--components/script/dom/workernavigator.rs16
-rw-r--r--components/script/dom/worklet.rs58
-rw-r--r--components/script/dom/workletglobalscope.rs18
-rw-r--r--components/script/dom/xmldocument.rs22
-rw-r--r--components/script/dom/xmlhttprequest.rs82
-rw-r--r--components/script/dom/xmlhttprequesteventtarget.rs4
-rw-r--r--components/script/dom/xmlhttprequestupload.rs10
335 files changed, 4114 insertions, 4114 deletions
diff --git a/components/script/dom/abstractworker.rs b/components/script/dom/abstractworker.rs
index 2038ff62476..05b120a5284 100644
--- a/components/script/dom/abstractworker.rs
+++ b/components/script/dom/abstractworker.rs
@@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::structuredclone::StructuredCloneData;
-use script_runtime::CommonScriptMsg;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::structuredclone::StructuredCloneData;
+use crate::script_runtime::CommonScriptMsg;
/// Messages used to control the worker event loops
pub enum WorkerScriptMsg {
diff --git a/components/script/dom/abstractworkerglobalscope.rs b/components/script/dom/abstractworkerglobalscope.rs
index 051469520ec..4efc60d58c6 100644
--- a/components/script/dom/abstractworkerglobalscope.rs
+++ b/components/script/dom/abstractworkerglobalscope.rs
@@ -3,16 +3,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::DevtoolScriptControlMsg;
-use dom::abstractworker::WorkerScriptMsg;
-use dom::bindings::conversions::DerivedFrom;
-use dom::bindings::reflector::DomObject;
-use dom::dedicatedworkerglobalscope::{AutoWorkerReset, DedicatedWorkerScriptMsg};
-use dom::globalscope::GlobalScope;
-use dom::worker::TrustedWorkerAddress;
-use dom::workerglobalscope::WorkerGlobalScope;
-use script_runtime::{ScriptChan, CommonScriptMsg, ScriptPort};
+use crate::dom::abstractworker::WorkerScriptMsg;
+use crate::dom::bindings::conversions::DerivedFrom;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::dedicatedworkerglobalscope::{AutoWorkerReset, DedicatedWorkerScriptMsg};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::worker::TrustedWorkerAddress;
+use crate::dom::workerglobalscope::WorkerGlobalScope;
+use crate::script_runtime::{ScriptChan, CommonScriptMsg, ScriptPort};
use servo_channel::{Receiver, Sender};
-use task_queue::{QueuedTaskConversion, TaskQueue};
+use crate::task_queue::{QueuedTaskConversion, TaskQueue};
/// A ScriptChan that can be cloned freely and will silently send a TrustedWorkerAddress with
/// common event loop messages. While this SendableWorkerScriptChan is alive, the associated
diff --git a/components/script/dom/activation.rs b/components/script/dom/activation.rs
index 9498f17bf17..c36151c2581 100644
--- a/components/script/dom/activation.rs
+++ b/components/script/dom/activation.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::str::DOMString;
-use dom::element::Element;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventtarget::EventTarget;
-use dom::mouseevent::MouseEvent;
-use dom::node::window_from_node;
-use dom::window::ReflowReason;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::element::Element;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::mouseevent::MouseEvent;
+use crate::dom::node::window_from_node;
+use crate::dom::window::ReflowReason;
use script_layout_interface::message::ReflowGoal;
/// Trait for elements with defined activation behavior
diff --git a/components/script/dom/analysernode.rs b/components/script/dom/analysernode.rs
index 27f2f27b386..48c71c456c5 100644
--- a/components/script/dom/analysernode.rs
+++ b/components/script/dom/analysernode.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audionode::AudioNode;
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::AnalyserNodeBinding::{self, AnalyserNodeMethods, AnalyserOptions};
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::num::Finite;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::window::Window;
+use crate::dom::audionode::AudioNode;
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::AnalyserNodeBinding::{self, AnalyserNodeMethods, AnalyserOptions};
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use ipc_channel::ipc::{self, IpcReceiver};
use ipc_channel::router::ROUTER;
@@ -21,7 +21,7 @@ use js::typedarray::{Float32Array, Uint8Array};
use servo_media::audio::analyser_node::AnalysisEngine;
use servo_media::audio::block::Block;
use servo_media::audio::node::AudioNodeInit;
-use task_source::{TaskSource, TaskSourceName};
+use crate::task_source::{TaskSource, TaskSourceName};
#[dom_struct]
pub struct AnalyserNode {
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs
index e14dadec1a0..bf9b41034d7 100644
--- a/components/script/dom/attr.rs
+++ b/components/script/dom/attr.rs
@@ -3,21 +3,21 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::AttrInfo;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::customelementregistry::CallbackReaction;
-use dom::element::{AttributeMutation, Element};
-use dom::mutationobserver::{Mutation, MutationObserver};
-use dom::node::Node;
-use dom::virtualmethods::vtable_for;
-use dom::window::Window;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::AttrBinding::{self, AttrMethods};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::customelementregistry::CallbackReaction;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::mutationobserver::{Mutation, MutationObserver};
+use crate::dom::node::Node;
+use crate::dom::virtualmethods::vtable_for;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use html5ever::{Prefix, LocalName, Namespace};
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use servo_atoms::Atom;
use std::borrow::ToOwned;
use std::cell::Ref;
diff --git a/components/script/dom/audiobuffer.rs b/components/script/dom/audiobuffer.rs
index 92040be9bbf..149867590e4 100644
--- a/components/script/dom/audiobuffer.rs
+++ b/components/script/dom/audiobuffer.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audionode::MAX_CHANNEL_COUNT;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::AudioBufferBinding::{self, AudioBufferMethods, AudioBufferOptions};
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::window::Window;
+use crate::dom::audionode::MAX_CHANNEL_COUNT;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::AudioBufferBinding::{self, AudioBufferMethods, AudioBufferOptions};
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSAutoCompartment, JSContext, JSObject};
use js::jsapi::JS_GetArrayBufferViewBuffer;
diff --git a/components/script/dom/audiobuffersourcenode.rs b/components/script/dom/audiobuffersourcenode.rs
index da5329350fc..7dbe2550b62 100644
--- a/components/script/dom/audiobuffersourcenode.rs
+++ b/components/script/dom/audiobuffersourcenode.rs
@@ -2,21 +2,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audiobuffer::AudioBuffer;
-use dom::audioparam::AudioParam;
-use dom::audioscheduledsourcenode::AudioScheduledSourceNode;
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding;
-use dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceNodeMethods;
-use dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceOptions;
-use dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
-use dom::bindings::codegen::Bindings::AudioScheduledSourceNodeBinding::AudioScheduledSourceNodeMethods;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::window::Window;
+use crate::dom::audiobuffer::AudioBuffer;
+use crate::dom::audioparam::AudioParam;
+use crate::dom::audioscheduledsourcenode::AudioScheduledSourceNode;
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding;
+use crate::dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceNodeMethods;
+use crate::dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceOptions;
+use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
+use crate::dom::bindings::codegen::Bindings::AudioScheduledSourceNodeBinding::AudioScheduledSourceNodeMethods;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_media::audio::buffer_source_node::AudioBufferSourceNodeMessage;
use servo_media::audio::buffer_source_node::AudioBufferSourceNodeOptions;
diff --git a/components/script/dom/audiocontext.rs b/components/script/dom/audiocontext.rs
index eef971fcba5..5bf022fb96f 100644
--- a/components/script/dom/audiocontext.rs
+++ b/components/script/dom/audiocontext.rs
@@ -2,24 +2,24 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::baseaudiocontext::{BaseAudioContext, BaseAudioContextOptions};
-use dom::bindings::codegen::Bindings::AudioContextBinding;
-use dom::bindings::codegen::Bindings::AudioContextBinding::{AudioContextLatencyCategory, AudioContextMethods};
-use dom::bindings::codegen::Bindings::AudioContextBinding::{AudioContextOptions, AudioTimestamp};
-use dom::bindings::codegen::Bindings::BaseAudioContextBinding::AudioContextState;
-use dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextBinding::BaseAudioContextMethods;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::refcounted::{Trusted, TrustedPromise};
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::promise::Promise;
-use dom::window::Window;
+use crate::dom::baseaudiocontext::{BaseAudioContext, BaseAudioContextOptions};
+use crate::dom::bindings::codegen::Bindings::AudioContextBinding;
+use crate::dom::bindings::codegen::Bindings::AudioContextBinding::{AudioContextLatencyCategory, AudioContextMethods};
+use crate::dom::bindings::codegen::Bindings::AudioContextBinding::{AudioContextOptions, AudioTimestamp};
+use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::AudioContextState;
+use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextBinding::BaseAudioContextMethods;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::promise::Promise;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_media::audio::context::{LatencyCategory, ProcessingState, RealTimeAudioContextOptions};
use std::rc::Rc;
-use task_source::TaskSource;
+use crate::task_source::TaskSource;
#[dom_struct]
pub struct AudioContext {
diff --git a/components/script/dom/audiodestinationnode.rs b/components/script/dom/audiodestinationnode.rs
index 4c394919671..e2e8905774b 100644
--- a/components/script/dom/audiodestinationnode.rs
+++ b/components/script/dom/audiodestinationnode.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audionode::{AudioNode, MAX_CHANNEL_COUNT};
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioDestinationNodeBinding::{self, AudioDestinationNodeMethods};
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
-use dom::bindings::codegen::Bindings::AudioNodeBinding::AudioNodeOptions;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::audionode::{AudioNode, MAX_CHANNEL_COUNT};
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioDestinationNodeBinding::{self, AudioDestinationNodeMethods};
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::AudioNodeOptions;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/audiolistener.rs b/components/script/dom/audiolistener.rs
index 0287816f921..ef2be88799d 100644
--- a/components/script/dom/audiolistener.rs
+++ b/components/script/dom/audiolistener.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audioparam::AudioParam;
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioListenerBinding::{self, AudioListenerMethods};
-use dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::window::Window;
+use crate::dom::audioparam::AudioParam;
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioListenerBinding::{self, AudioListenerMethods};
+use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_media::audio::param::{ParamType, ParamDir};
use std::f32;
diff --git a/components/script/dom/audionode.rs b/components/script/dom/audionode.rs
index e227f7282ff..b96dde64a4c 100644
--- a/components/script/dom/audionode.rs
+++ b/components/script/dom/audionode.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audioparam::AudioParam;
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{AudioNodeMethods, AudioNodeOptions};
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
-use dom::bindings::codegen::InheritTypes::{AudioNodeTypeId, EventTargetTypeId};
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::eventtarget::EventTarget;
+use crate::dom::audioparam::AudioParam;
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{AudioNodeMethods, AudioNodeOptions};
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
+use crate::dom::bindings::codegen::InheritTypes::{AudioNodeTypeId, EventTargetTypeId};
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::eventtarget::EventTarget;
use dom_struct::dom_struct;
use servo_media::audio::graph::NodeId;
use servo_media::audio::node::{AudioNodeMessage, AudioNodeInit, ChannelInfo};
diff --git a/components/script/dom/audioparam.rs b/components/script/dom/audioparam.rs
index 40826790cbf..d35bac52c44 100644
--- a/components/script/dom/audioparam.rs
+++ b/components/script/dom/audioparam.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioParamBinding;
-use dom::bindings::codegen::Bindings::AudioParamBinding::{AudioParamMethods, AutomationRate};
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::window::Window;
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioParamBinding;
+use crate::dom::bindings::codegen::Bindings::AudioParamBinding::{AudioParamMethods, AutomationRate};
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_media::audio::graph::NodeId;
use servo_media::audio::node::AudioNodeMessage;
diff --git a/components/script/dom/audioscheduledsourcenode.rs b/components/script/dom/audioscheduledsourcenode.rs
index 2614a0aa40a..2f1917364ee 100644
--- a/components/script/dom/audioscheduledsourcenode.rs
+++ b/components/script/dom/audioscheduledsourcenode.rs
@@ -1,19 +1,19 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audionode::{AudioNode, UnwrappedAudioNodeOptions};
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioScheduledSourceNodeBinding::AudioScheduledSourceNodeMethods;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::DomObject;
+use crate::dom::audionode::{AudioNode, UnwrappedAudioNodeOptions};
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioScheduledSourceNodeBinding::AudioScheduledSourceNodeMethods;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
use dom_struct::dom_struct;
use servo_media::audio::node::{AudioNodeMessage, AudioNodeInit, AudioScheduledSourceNodeMessage};
use servo_media::audio::node::OnEndedCallback;
use std::cell::Cell;
-use task_source::{TaskSource, TaskSourceName};
+use crate::task_source::{TaskSource, TaskSourceName};
#[dom_struct]
pub struct AudioScheduledSourceNode {
diff --git a/components/script/dom/baseaudiocontext.rs b/components/script/dom/baseaudiocontext.rs
index 0cb60a2fd80..6a07b6b43b8 100644
--- a/components/script/dom/baseaudiocontext.rs
+++ b/components/script/dom/baseaudiocontext.rs
@@ -2,42 +2,42 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::analysernode::AnalyserNode;
-use dom::audiobuffer::AudioBuffer;
-use dom::audiobuffersourcenode::AudioBufferSourceNode;
-use dom::audiodestinationnode::AudioDestinationNode;
-use dom::audiolistener::AudioListener;
-use dom::audionode::MAX_CHANNEL_COUNT;
-use dom::bindings::callback::ExceptionHandling;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::AnalyserNodeBinding::AnalyserOptions;
-use dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceOptions;
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
-use dom::bindings::codegen::Bindings::AudioNodeBinding::AudioNodeOptions;
-use dom::bindings::codegen::Bindings::BaseAudioContextBinding::AudioContextState;
-use dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextMethods;
-use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeErrorCallback;
-use dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeSuccessCallback;
-use dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::BiquadFilterOptions;
-use dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::ChannelMergerOptions;
-use dom::bindings::codegen::Bindings::GainNodeBinding::GainOptions;
-use dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions;
-use dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::biquadfilternode::BiquadFilterNode;
-use dom::channelmergernode::ChannelMergerNode;
-use dom::domexception::{DOMErrorName, DOMException};
-use dom::eventtarget::EventTarget;
-use dom::gainnode::GainNode;
-use dom::oscillatornode::OscillatorNode;
-use dom::pannernode::PannerNode;
-use dom::promise::Promise;
-use dom::window::Window;
+use crate::dom::analysernode::AnalyserNode;
+use crate::dom::audiobuffer::AudioBuffer;
+use crate::dom::audiobuffersourcenode::AudioBufferSourceNode;
+use crate::dom::audiodestinationnode::AudioDestinationNode;
+use crate::dom::audiolistener::AudioListener;
+use crate::dom::audionode::MAX_CHANNEL_COUNT;
+use crate::dom::bindings::callback::ExceptionHandling;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::AnalyserNodeBinding::AnalyserOptions;
+use crate::dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceOptions;
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::AudioNodeOptions;
+use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::AudioContextState;
+use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextMethods;
+use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeErrorCallback;
+use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::DecodeSuccessCallback;
+use crate::dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::BiquadFilterOptions;
+use crate::dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::ChannelMergerOptions;
+use crate::dom::bindings::codegen::Bindings::GainNodeBinding::GainOptions;
+use crate::dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorOptions;
+use crate::dom::bindings::codegen::Bindings::PannerNodeBinding::PannerOptions;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::biquadfilternode::BiquadFilterNode;
+use crate::dom::channelmergernode::ChannelMergerNode;
+use crate::dom::domexception::{DOMErrorName, DOMException};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::gainnode::GainNode;
+use crate::dom::oscillatornode::OscillatorNode;
+use crate::dom::pannernode::PannerNode;
+use crate::dom::promise::Promise;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use js::rust::CustomAutoRooterGuard;
use js::typedarray::ArrayBuffer;
@@ -51,7 +51,7 @@ use std::collections::{HashMap, VecDeque};
use std::mem;
use std::rc::Rc;
use std::sync::{Arc, Mutex};
-use task_source::{TaskSource, TaskSourceName};
+use crate::task_source::{TaskSource, TaskSourceName};
use uuid::Uuid;
#[allow(dead_code)]
diff --git a/components/script/dom/beforeunloadevent.rs b/components/script/dom/beforeunloadevent.rs
index 43f37a117e4..a0422a7f786 100644
--- a/components/script/dom/beforeunloadevent.rs
+++ b/components/script/dom/beforeunloadevent.rs
@@ -4,16 +4,16 @@
#![allow(dead_code)]
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BeforeUnloadEventBinding;
-use dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventMethods;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::window::Window;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BeforeUnloadEventBinding;
+use crate::dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventMethods;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/bindings/callback.rs b/components/script/dom/bindings/callback.rs
index ddc11ce25da..4db1fdf22cd 100644
--- a/components/script/dom/bindings/callback.rs
+++ b/components/script/dom/bindings/callback.rs
@@ -4,12 +4,12 @@
//! Base classes to work with IDL callbacks.
-use dom::bindings::error::{Error, Fallible, report_pending_exception};
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::settings_stack::{AutoEntryScript, AutoIncumbentScript};
-use dom::bindings::utils::AsCCharPtrPtr;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::error::{Error, Fallible, report_pending_exception};
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::settings_stack::{AutoEntryScript, AutoIncumbentScript};
+use crate::dom::bindings::utils::AsCCharPtrPtr;
+use crate::dom::globalscope::GlobalScope;
use js::jsapi::{IsCallable, JSContext, JSObject, AddRawValueRoot};
use js::jsapi::{JSCompartment, JS_EnterCompartment, JS_LeaveCompartment, RemoveRawValueRoot};
use js::jsapi::Heap;
diff --git a/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs
index 4f848ea97d7..aecaf0c1a04 100644
--- a/components/script/dom/bindings/conversions.rs
+++ b/components/script/dom/bindings/conversions.rs
@@ -32,14 +32,14 @@
//! | sequences | `Vec<T>` | |
//! | union types | `T` | |
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{DomObject, Reflector};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::{ByteString, DOMString, USVString};
-use dom::bindings::trace::{JSTraceable, RootedTraceableBox};
-use dom::bindings::utils::DOMClass;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{DomObject, Reflector};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::{ByteString, DOMString, USVString};
+use crate::dom::bindings::trace::{JSTraceable, RootedTraceableBox};
+use crate::dom::bindings::utils::DOMClass;
use js;
pub use js::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible};
pub use js::conversions::ConversionBehavior;
@@ -65,7 +65,7 @@ use std::{char, ffi, ptr, slice};
/// A trait to check whether a given `JSObject` implements an IDL interface.
pub trait IDLInterface {
/// Returns whether the given DOM class derives that interface.
- fn derives(&'static DOMClass) -> bool;
+ fn derives(_: &'static DOMClass) -> bool;
}
/// A trait to mark an IDL interface as deriving from another one.
@@ -384,7 +384,7 @@ pub unsafe fn private_from_object(obj: *mut JSObject) -> *const libc::c_void {
/// Get the `DOMClass` from `obj`, or `Err(())` if `obj` is not a DOM object.
pub unsafe fn get_dom_class(obj: *mut JSObject) -> Result<&'static DOMClass, ()> {
- use dom::bindings::utils::DOMJSClass;
+ use crate::dom::bindings::utils::DOMJSClass;
use js::glue::GetProxyHandlerExtra;
let clasp = get_object_class(obj);
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs
index 64b581f316d..c2d0be39a44 100644
--- a/components/script/dom/bindings/error.rs
+++ b/components/script/dom/bindings/error.rs
@@ -8,13 +8,13 @@
use backtrace::Backtrace;
#[cfg(feature = "js_backtrace")]
use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods;
-use dom::bindings::codegen::PrototypeList::proto_id_to_name;
-use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible};
-use dom::bindings::conversions::root_from_object;
-use dom::bindings::str::USVString;
-use dom::domexception::{DOMErrorName, DOMException};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods;
+use crate::dom::bindings::codegen::PrototypeList::proto_id_to_name;
+use crate::dom::bindings::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible};
+use crate::dom::bindings::conversions::root_from_object;
+use crate::dom::bindings::str::USVString;
+use crate::dom::domexception::{DOMErrorName, DOMException};
+use crate::dom::globalscope::GlobalScope;
use js::error::{throw_range_error, throw_type_error};
use js::jsapi::JSContext;
use js::jsapi::JS_ClearPendingException;
diff --git a/components/script/dom/bindings/htmlconstructor.rs b/components/script/dom/bindings/htmlconstructor.rs
index c8f7e63358e..282c9e556a1 100644
--- a/components/script/dom/bindings/htmlconstructor.rs
+++ b/components/script/dom/bindings/htmlconstructor.rs
@@ -2,80 +2,80 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLAnchorElementBinding;
-use dom::bindings::codegen::Bindings::HTMLAreaElementBinding;
-use dom::bindings::codegen::Bindings::HTMLAudioElementBinding;
-use dom::bindings::codegen::Bindings::HTMLBRElementBinding;
-use dom::bindings::codegen::Bindings::HTMLBaseElementBinding;
-use dom::bindings::codegen::Bindings::HTMLBodyElementBinding;
-use dom::bindings::codegen::Bindings::HTMLButtonElementBinding;
-use dom::bindings::codegen::Bindings::HTMLCanvasElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDListElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDataElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDataListElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDetailsElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDialogElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDirectoryElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDivElementBinding;
-use dom::bindings::codegen::Bindings::HTMLElementBinding;
-use dom::bindings::codegen::Bindings::HTMLEmbedElementBinding;
-use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding;
-use dom::bindings::codegen::Bindings::HTMLFontElementBinding;
-use dom::bindings::codegen::Bindings::HTMLFormElementBinding;
-use dom::bindings::codegen::Bindings::HTMLFrameElementBinding;
-use dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding;
-use dom::bindings::codegen::Bindings::HTMLHRElementBinding;
-use dom::bindings::codegen::Bindings::HTMLHeadElementBinding;
-use dom::bindings::codegen::Bindings::HTMLHeadingElementBinding;
-use dom::bindings::codegen::Bindings::HTMLHtmlElementBinding;
-use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding;
-use dom::bindings::codegen::Bindings::HTMLImageElementBinding;
-use dom::bindings::codegen::Bindings::HTMLInputElementBinding;
-use dom::bindings::codegen::Bindings::HTMLLIElementBinding;
-use dom::bindings::codegen::Bindings::HTMLLabelElementBinding;
-use dom::bindings::codegen::Bindings::HTMLLegendElementBinding;
-use dom::bindings::codegen::Bindings::HTMLLinkElementBinding;
-use dom::bindings::codegen::Bindings::HTMLMapElementBinding;
-use dom::bindings::codegen::Bindings::HTMLMetaElementBinding;
-use dom::bindings::codegen::Bindings::HTMLMeterElementBinding;
-use dom::bindings::codegen::Bindings::HTMLModElementBinding;
-use dom::bindings::codegen::Bindings::HTMLOListElementBinding;
-use dom::bindings::codegen::Bindings::HTMLObjectElementBinding;
-use dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding;
-use dom::bindings::codegen::Bindings::HTMLOptionElementBinding;
-use dom::bindings::codegen::Bindings::HTMLOutputElementBinding;
-use dom::bindings::codegen::Bindings::HTMLParagraphElementBinding;
-use dom::bindings::codegen::Bindings::HTMLParamElementBinding;
-use dom::bindings::codegen::Bindings::HTMLPreElementBinding;
-use dom::bindings::codegen::Bindings::HTMLProgressElementBinding;
-use dom::bindings::codegen::Bindings::HTMLQuoteElementBinding;
-use dom::bindings::codegen::Bindings::HTMLScriptElementBinding;
-use dom::bindings::codegen::Bindings::HTMLSelectElementBinding;
-use dom::bindings::codegen::Bindings::HTMLSourceElementBinding;
-use dom::bindings::codegen::Bindings::HTMLSpanElementBinding;
-use dom::bindings::codegen::Bindings::HTMLStyleElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTableCaptionElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTableCellElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTableColElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTableElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTableRowElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTimeElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTitleElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTrackElementBinding;
-use dom::bindings::codegen::Bindings::HTMLUListElementBinding;
-use dom::bindings::codegen::Bindings::HTMLVideoElementBinding;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::conversions::DerivedFrom;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::root::DomRoot;
-use dom::create::create_native_html_element;
-use dom::customelementregistry::ConstructionStackEntry;
-use dom::element::{CustomElementState, Element, ElementCreator};
-use dom::htmlelement::HTMLElement;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::HTMLAnchorElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLAreaElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLAudioElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLBRElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLBaseElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLBodyElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLButtonElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLCanvasElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDListElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDataElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDataListElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDetailsElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDialogElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDirectoryElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDivElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLEmbedElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLFormElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLFrameElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLHRElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLHeadElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLHeadingElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLHtmlElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLIFrameElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLImageElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLInputElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLLIElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLLabelElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLLegendElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLLinkElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLMapElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLMetaElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLMeterElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLModElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLOListElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLObjectElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLOptionElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLOutputElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLParagraphElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLParamElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLPreElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLProgressElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLQuoteElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLScriptElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLSelectElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLSourceElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLSpanElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLStyleElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTableCaptionElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTableCellElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTableColElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTableElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTableRowElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTimeElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTitleElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTrackElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLUListElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLVideoElementBinding;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::conversions::DerivedFrom;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::create::create_native_html_element;
+use crate::dom::customelementregistry::ConstructionStackEntry;
+use crate::dom::element::{CustomElementState, Element, ElementCreator};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::window::Window;
use html5ever::LocalName;
use html5ever::interface::QualName;
use js::glue::UnwrapObject;
@@ -83,7 +83,7 @@ use js::jsapi::{CallArgs, CurrentGlobalOrNull};
use js::jsapi::{JSAutoCompartment, JSContext, JSObject};
use js::rust::HandleObject;
use js::rust::MutableHandleObject;
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use std::ptr;
// https://html.spec.whatwg.org/multipage/#htmlconstructor
diff --git a/components/script/dom/bindings/inheritance.rs b/components/script/dom/bindings/inheritance.rs
index eaf394e594d..5e535a0a0ba 100644
--- a/components/script/dom/bindings/inheritance.rs
+++ b/components/script/dom/bindings/inheritance.rs
@@ -4,11 +4,11 @@
//! The `Castable` trait.
-pub use dom::bindings::codegen::InheritTypes::*;
+pub use crate::dom::bindings::codegen::InheritTypes::*;
-use dom::bindings::conversions::{DerivedFrom, IDLInterface};
-use dom::bindings::conversions::get_dom_class;
-use dom::bindings::reflector::DomObject;
+use crate::dom::bindings::conversions::{DerivedFrom, IDLInterface};
+use crate::dom::bindings::conversions::get_dom_class;
+use crate::dom::bindings::reflector::DomObject;
use std::mem;
/// A trait to hold the cast functions of IDL interfaces that either derive
diff --git a/components/script/dom/bindings/interface.rs b/components/script/dom/bindings/interface.rs
index 210e9ae5576..e390eb54742 100644
--- a/components/script/dom/bindings/interface.rs
+++ b/components/script/dom/bindings/interface.rs
@@ -4,12 +4,12 @@
//! Machinery to initialise interface prototype objects and interface objects.
-use dom::bindings::codegen::InterfaceObjectMap::Globals;
-use dom::bindings::codegen::PrototypeList;
-use dom::bindings::constant::{define_constants, ConstantSpec};
-use dom::bindings::conversions::{get_dom_class, DOM_OBJECT_SLOT};
-use dom::bindings::guard::Guard;
-use dom::bindings::utils::{get_proto_or_iface_array, ProtoOrIfaceArray, DOM_PROTOTYPE_SLOT};
+use crate::dom::bindings::codegen::InterfaceObjectMap::Globals;
+use crate::dom::bindings::codegen::PrototypeList;
+use crate::dom::bindings::constant::{define_constants, ConstantSpec};
+use crate::dom::bindings::conversions::{get_dom_class, DOM_OBJECT_SLOT};
+use crate::dom::bindings::guard::Guard;
+use crate::dom::bindings::utils::{get_proto_or_iface_array, ProtoOrIfaceArray, DOM_PROTOTYPE_SLOT};
use js::error::throw_type_error;
use js::glue::{UncheckedUnwrapObject, RUST_SYMBOL_TO_JSID};
use js::jsapi::{Class, ClassOps, CompartmentOptions};
diff --git a/components/script/dom/bindings/iterable.rs b/components/script/dom/bindings/iterable.rs
index 488714d3d0b..c8b6caf5f42 100644
--- a/components/script/dom/bindings/iterable.rs
+++ b/components/script/dom/bindings/iterable.rs
@@ -6,13 +6,13 @@
//! Implementation of `iterable<...>` and `iterable<..., ...>` WebIDL declarations.
-use dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyAndValueResult;
-use dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyOrValueResult;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::trace::{JSTraceable, RootedTraceableBox};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyAndValueResult;
+use crate::dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyOrValueResult;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::trace::{JSTraceable, RootedTraceableBox};
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::conversions::ToJSValConvertible;
use js::jsapi::{Heap, JSContext, JSObject};
diff --git a/components/script/dom/bindings/mozmap.rs b/components/script/dom/bindings/mozmap.rs
index 68ea9fa382d..5c0451cca71 100644
--- a/components/script/dom/bindings/mozmap.rs
+++ b/components/script/dom/bindings/mozmap.rs
@@ -4,9 +4,9 @@
//! The `MozMap` (open-ended dictionary) type.
-use dom::bindings::conversions::jsid_to_string;
-use dom::bindings::error::report_pending_exception;
-use dom::bindings::str::DOMString;
+use crate::dom::bindings::conversions::jsid_to_string;
+use crate::dom::bindings::error::report_pending_exception;
+use crate::dom::bindings::str::DOMString;
use js::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible};
use js::jsapi::JSContext;
use js::jsapi::JSITER_HIDDEN;
diff --git a/components/script/dom/bindings/namespace.rs b/components/script/dom/bindings/namespace.rs
index 64b67b33e1e..505a5335830 100644
--- a/components/script/dom/bindings/namespace.rs
+++ b/components/script/dom/bindings/namespace.rs
@@ -4,8 +4,8 @@
//! Machinery to initialise namespace objects.
-use dom::bindings::guard::Guard;
-use dom::bindings::interface::{create_object, define_on_global_object};
+use crate::dom::bindings::guard::Guard;
+use crate::dom::bindings::interface::{create_object, define_on_global_object};
use js::jsapi::{JSClass, JSContext, JSFunctionSpec};
use js::rust::{HandleObject, MutableHandleObject};
use libc;
diff --git a/components/script/dom/bindings/proxyhandler.rs b/components/script/dom/bindings/proxyhandler.rs
index 86b7d81667c..924696ecb26 100644
--- a/components/script/dom/bindings/proxyhandler.rs
+++ b/components/script/dom/bindings/proxyhandler.rs
@@ -6,8 +6,8 @@
#![deny(missing_docs)]
-use dom::bindings::conversions::is_dom_proxy;
-use dom::bindings::utils::delete_property_by_id;
+use crate::dom::bindings::conversions::is_dom_proxy;
+use crate::dom::bindings::utils::delete_property_by_id;
use js::glue::{GetProxyHandler, GetProxyHandlerFamily};
use js::glue::{GetProxyPrivate, SetProxyPrivate};
use js::glue::InvokeGetOwnPropertyDescriptor;
diff --git a/components/script/dom/bindings/refcounted.rs b/components/script/dom/bindings/refcounted.rs
index 49add72e114..f74fba6355f 100644
--- a/components/script/dom/bindings/refcounted.rs
+++ b/components/script/dom/bindings/refcounted.rs
@@ -22,12 +22,12 @@
//! its hash table during the next GC. During GC, the entries of the hash table are counted
//! as JS roots.
-use dom::bindings::conversions::ToJSValConvertible;
-use dom::bindings::error::Error;
-use dom::bindings::reflector::{DomObject, Reflector};
-use dom::bindings::root::DomRoot;
-use dom::bindings::trace::trace_reflector;
-use dom::promise::Promise;
+use crate::dom::bindings::conversions::ToJSValConvertible;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::reflector::{DomObject, Reflector};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::trace::trace_reflector;
+use crate::dom::promise::Promise;
use js::jsapi::JSTracer;
use libc;
use std::cell::RefCell;
@@ -37,7 +37,7 @@ use std::hash::Hash;
use std::marker::PhantomData;
use std::rc::Rc;
use std::sync::{Arc, Weak};
-use task::TaskOnce;
+use crate::task::TaskOnce;
#[allow(missing_docs)] // FIXME
mod dummy {
diff --git a/components/script/dom/bindings/reflector.rs b/components/script/dom/bindings/reflector.rs
index 2bf1983d40e..a86f502e235 100644
--- a/components/script/dom/bindings/reflector.rs
+++ b/components/script/dom/bindings/reflector.rs
@@ -4,9 +4,9 @@
//! The `Reflector` struct.
-use dom::bindings::conversions::DerivedFrom;
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::conversions::DerivedFrom;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use js::jsapi::{JSContext, JSObject, Heap};
use js::rust::HandleObject;
use std::default::Default;
diff --git a/components/script/dom/bindings/root.rs b/components/script/dom/bindings/root.rs
index d974e75737c..8c4a528b67a 100644
--- a/components/script/dom/bindings/root.rs
+++ b/components/script/dom/bindings/root.rs
@@ -24,12 +24,12 @@
//! originating `DomRoot<T>`.
//!
-use dom::bindings::conversions::DerivedFrom;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, Reflector};
-use dom::bindings::trace::JSTraceable;
-use dom::bindings::trace::trace_reflector;
-use dom::node::Node;
+use crate::dom::bindings::conversions::DerivedFrom;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, Reflector};
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::bindings::trace::trace_reflector;
+use crate::dom::node::Node;
use js::jsapi::{JSObject, JSTracer, Heap};
use js::rust::GCMethods;
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
diff --git a/components/script/dom/bindings/settings_stack.rs b/components/script/dom/bindings/settings_stack.rs
index e5efea05e98..da26bff3db7 100644
--- a/components/script/dom/bindings/settings_stack.rs
+++ b/components/script/dom/bindings/settings_stack.rs
@@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::trace::JSTraceable;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::globalscope::GlobalScope;
use js::jsapi::GetScriptedCallerGlobal;
use js::jsapi::HideScriptedCaller;
use js::jsapi::JSTracer;
diff --git a/components/script/dom/bindings/structuredclone.rs b/components/script/dom/bindings/structuredclone.rs
index c4a68547247..094749ff875 100644
--- a/components/script/dom/bindings/structuredclone.rs
+++ b/components/script/dom/bindings/structuredclone.rs
@@ -5,12 +5,12 @@
//! This module implements structured cloning, as defined by [HTML]
//! (https://html.spec.whatwg.org/multipage/#safe-passing-of-structured-data).
-use dom::bindings::conversions::root_from_handleobject;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::DomRoot;
-use dom::blob::{Blob, BlobImpl};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::conversions::root_from_handleobject;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::blob::{Blob, BlobImpl};
+use crate::dom::globalscope::GlobalScope;
use js::glue::CopyJSStructuredCloneData;
use js::glue::DeleteJSAutoStructuredCloneBuffer;
use js::glue::GetLengthOfJSStructuredCloneData;
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index 75fcfb42c16..e6758dacaf2 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -39,16 +39,16 @@ use canvas_traits::webgl::{WebGLSLVersion, WebGLSender, WebGLShaderId, WebGLText
use canvas_traits::webgl::{WebGLVersion, WebGLVertexArrayId};
use cssparser::RGBA;
use devtools_traits::{CSSError, TimelineMarkerType, WorkerId};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::error::Error;
-use dom::bindings::refcounted::{Trusted, TrustedPromise};
-use dom::bindings::reflector::{DomObject, Reflector};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::{DOMString, USVString};
-use dom::bindings::utils::WindowProxyHandler;
-use dom::document::PendingRestyle;
-use dom::htmlimageelement::SourceSet;
-use dom::htmlmediaelement::MediaFrameRenderer;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
+use crate::dom::bindings::reflector::{DomObject, Reflector};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::bindings::utils::WindowProxyHandler;
+use crate::dom::document::PendingRestyle;
+use crate::dom::htmlimageelement::SourceSet;
+use crate::dom::htmlmediaelement::MediaFrameRenderer;
use encoding_rs::{Decoder, Encoding};
use euclid::{Transform2D, Transform3D, Point2D, Vector2D, Rect, TypedSize2D, TypedScale};
use euclid::Length as EuclidLength;
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs
index 7366401af51..8579103afd5 100644
--- a/components/script/dom/bindings/utils.rs
+++ b/components/script/dom/bindings/utils.rs
@@ -4,15 +4,15 @@
//! Various utilities to glue JavaScript and the DOM implementation together.
-use dom::bindings::codegen::InterfaceObjectMap;
-use dom::bindings::codegen::PrototypeList;
-use dom::bindings::codegen::PrototypeList::{MAX_PROTO_CHAIN_LENGTH, PROTO_OR_IFACE_LENGTH};
-use dom::bindings::conversions::{jsstring_to_str, private_from_proto_check};
-use dom::bindings::error::throw_invalid_this;
-use dom::bindings::inheritance::TopTypeId;
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::trace_object;
-use dom::windowproxy;
+use crate::dom::bindings::codegen::InterfaceObjectMap;
+use crate::dom::bindings::codegen::PrototypeList;
+use crate::dom::bindings::codegen::PrototypeList::{MAX_PROTO_CHAIN_LENGTH, PROTO_OR_IFACE_LENGTH};
+use crate::dom::bindings::conversions::{jsstring_to_str, private_from_proto_check};
+use crate::dom::bindings::error::throw_invalid_this;
+use crate::dom::bindings::inheritance::TopTypeId;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::trace_object;
+use crate::dom::windowproxy;
use js;
use js::JS_CALLEE;
use js::glue::{CallJitGetterOp, CallJitMethodOp, CallJitSetterOp, IsWrapper};
diff --git a/components/script/dom/bindings/weakref.rs b/components/script/dom/bindings/weakref.rs
index aed0d9ec6f8..6e46d0268df 100644
--- a/components/script/dom/bindings/weakref.rs
+++ b/components/script/dom/bindings/weakref.rs
@@ -11,10 +11,10 @@
//! slot. When all associated `WeakRef` values are dropped, the
//! `WeakBox` itself is dropped too.
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::DomRoot;
-use dom::bindings::trace::JSTraceable;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::trace::JSTraceable;
use js::glue::JS_GetReservedSlot;
use js::jsapi::{JSTracer, JS_SetReservedSlot};
use js::jsval::PrivateValue;
diff --git a/components/script/dom/bindings/xmlname.rs b/components/script/dom/bindings/xmlname.rs
index 2a2b8a462a0..d547355e423 100644
--- a/components/script/dom/bindings/xmlname.rs
+++ b/components/script/dom/bindings/xmlname.rs
@@ -4,8 +4,8 @@
//! Functions for validating and extracting qualified XML names.
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::str::DOMString;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::str::DOMString;
use html5ever::{Prefix, LocalName, Namespace};
/// Validate a qualified name. See https://dom.spec.whatwg.org/#validate for details.
diff --git a/components/script/dom/biquadfilternode.rs b/components/script/dom/biquadfilternode.rs
index 2ee309498be..ca74d42f2c6 100644
--- a/components/script/dom/biquadfilternode.rs
+++ b/components/script/dom/biquadfilternode.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audionode::AudioNode;
-use dom::audioparam::AudioParam;
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
-use dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
-use dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::{self, BiquadFilterNodeMethods};
-use dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::BiquadFilterOptions;
-use dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::BiquadFilterType;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::window::Window;
+use crate::dom::audionode::AudioNode;
+use crate::dom::audioparam::AudioParam;
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
+use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
+use crate::dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::{self, BiquadFilterNodeMethods};
+use crate::dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::BiquadFilterOptions;
+use crate::dom::bindings::codegen::Bindings::BiquadFilterNodeBinding::BiquadFilterType;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_media::audio::biquad_filter_node::{BiquadFilterNodeOptions, FilterType};
use servo_media::audio::biquad_filter_node::BiquadFilterNodeMessage;
diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs
index 490404bbf32..41a2971b55d 100644
--- a/components/script/dom/blob.rs
+++ b/components/script/dom/blob.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BlobBinding;
-use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
-use dom::bindings::codegen::UnionTypes::ArrayBufferOrArrayBufferViewOrBlobOrString;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BlobBinding;
+use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
+use crate::dom::bindings::codegen::UnionTypes::ArrayBufferOrArrayBufferViewOrBlobOrString;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use net_traits::{CoreResourceMsg, IpcSend};
use net_traits::blob_url_store::{BlobBuf, get_blob_origin};
diff --git a/components/script/dom/bluetooth.rs b/components/script/dom/bluetooth.rs
index 99c02576a1b..1b5c911d2d5 100644
--- a/components/script/dom/bluetooth.rs
+++ b/components/script/dom/bluetooth.rs
@@ -7,27 +7,27 @@ use bluetooth_traits::{BluetoothResponse, BluetoothResponseResult};
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence};
use bluetooth_traits::scanfilter::{RequestDeviceoptions, ServiceUUIDSequence};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BluetoothBinding::{self, BluetoothDataFilterInit, BluetoothLEScanFilterInit};
-use dom::bindings::codegen::Bindings::BluetoothBinding::{BluetoothMethods, RequestDeviceOptions};
-use dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::BluetoothPermissionDescriptor;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerBinding::
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{self, BluetoothDataFilterInit, BluetoothLEScanFilterInit};
+use crate::dom::bindings::codegen::Bindings::BluetoothBinding::{BluetoothMethods, RequestDeviceOptions};
+use crate::dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::BluetoothPermissionDescriptor;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerBinding::
BluetoothRemoteGATTServerMethods;
-use dom::bindings::codegen::Bindings::PermissionStatusBinding::{PermissionName, PermissionState};
-use dom::bindings::codegen::UnionTypes::{ArrayBufferViewOrArrayBuffer, StringOrUnsignedLong};
-use dom::bindings::error::Error::{self, Network, Security, Type};
-use dom::bindings::error::Fallible;
-use dom::bindings::refcounted::{Trusted, TrustedPromise};
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::bluetoothdevice::BluetoothDevice;
-use dom::bluetoothpermissionresult::BluetoothPermissionResult;
-use dom::bluetoothuuid::{BluetoothServiceUUID, BluetoothUUID, UUID};
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::permissions::{get_descriptor_permission_state, PermissionAlgorithm};
-use dom::promise::Promise;
+use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::{PermissionName, PermissionState};
+use crate::dom::bindings::codegen::UnionTypes::{ArrayBufferViewOrArrayBuffer, StringOrUnsignedLong};
+use crate::dom::bindings::error::Error::{self, Network, Security, Type};
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bluetoothdevice::BluetoothDevice;
+use crate::dom::bluetoothpermissionresult::BluetoothPermissionResult;
+use crate::dom::bluetoothuuid::{BluetoothServiceUUID, BluetoothUUID, UUID};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::permissions::{get_descriptor_permission_state, PermissionAlgorithm};
+use crate::dom::promise::Promise;
use dom_struct::dom_struct;
use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::router::ROUTER;
@@ -40,7 +40,7 @@ use std::collections::HashMap;
use std::rc::Rc;
use std::str::FromStr;
use std::sync::{Arc, Mutex};
-use task::TaskOnce;
+use crate::task::TaskOnce;
const KEY_CONVERSION_ERROR: &'static str =
"This `manufacturerData` key can not be parsed as unsigned short:";
diff --git a/components/script/dom/bluetoothadvertisingevent.rs b/components/script/dom/bluetoothadvertisingevent.rs
index 2dffb0a4dfc..f32837ee89c 100644
--- a/components/script/dom/bluetoothadvertisingevent.rs
+++ b/components/script/dom/bluetoothadvertisingevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::BluetoothAdvertisingEventBinding::{self, BluetoothAdvertisingEventInit};
-use dom::bindings::codegen::Bindings::BluetoothAdvertisingEventBinding::BluetoothAdvertisingEventMethods;
-use dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::bluetoothdevice::BluetoothDevice;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::globalscope::GlobalScope;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::BluetoothAdvertisingEventBinding::{self, BluetoothAdvertisingEventInit};
+use crate::dom::bindings::codegen::Bindings::BluetoothAdvertisingEventBinding::BluetoothAdvertisingEventMethods;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bluetoothdevice::BluetoothDevice;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/bluetoothcharacteristicproperties.rs b/components/script/dom/bluetoothcharacteristicproperties.rs
index 900ec257c7d..73b279c0904 100644
--- a/components/script/dom/bluetoothcharacteristicproperties.rs
+++ b/components/script/dom/bluetoothcharacteristicproperties.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding;
-use dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding::
+use crate::dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding;
+use crate::dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding::
BluetoothCharacteristicPropertiesMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
// https://webbluetoothcg.github.io/web-bluetooth/#characteristicproperties
diff --git a/components/script/dom/bluetoothdevice.rs b/components/script/dom/bluetoothdevice.rs
index ae97626b60e..9455f3bb460 100644
--- a/components/script/dom/bluetoothdevice.rs
+++ b/components/script/dom/bluetoothdevice.rs
@@ -4,25 +4,25 @@
use bluetooth_traits::{BluetoothCharacteristicMsg, BluetoothDescriptorMsg};
use bluetooth_traits::{BluetoothRequest, BluetoothResponse, BluetoothServiceMsg};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BluetoothDeviceBinding;
-use dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
-use dom::bindings::error::Error;
-use dom::bindings::error::ErrorResult;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::bluetooth::{AsyncBluetoothListener, Bluetooth, response_async};
-use dom::bluetoothcharacteristicproperties::BluetoothCharacteristicProperties;
-use dom::bluetoothremotegattcharacteristic::BluetoothRemoteGATTCharacteristic;
-use dom::bluetoothremotegattdescriptor::BluetoothRemoteGATTDescriptor;
-use dom::bluetoothremotegattserver::BluetoothRemoteGATTServer;
-use dom::bluetoothremotegattservice::BluetoothRemoteGATTService;
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BluetoothDeviceBinding;
+use crate::dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::error::ErrorResult;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bluetooth::{AsyncBluetoothListener, Bluetooth, response_async};
+use crate::dom::bluetoothcharacteristicproperties::BluetoothCharacteristicProperties;
+use crate::dom::bluetoothremotegattcharacteristic::BluetoothRemoteGATTCharacteristic;
+use crate::dom::bluetoothremotegattdescriptor::BluetoothRemoteGATTDescriptor;
+use crate::dom::bluetoothremotegattserver::BluetoothRemoteGATTServer;
+use crate::dom::bluetoothremotegattservice::BluetoothRemoteGATTService;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use profile_traits::ipc;
diff --git a/components/script/dom/bluetoothpermissionresult.rs b/components/script/dom/bluetoothpermissionresult.rs
index a9208ed8cb2..048f6e636b9 100644
--- a/components/script/dom/bluetoothpermissionresult.rs
+++ b/components/script/dom/bluetoothpermissionresult.rs
@@ -3,21 +3,21 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bluetooth_traits::{BluetoothRequest, BluetoothResponse};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::{self, BluetoothPermissionResultMethods};
-use dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorBinding::NavigatorMethods;
-use dom::bindings::codegen::Bindings::PermissionStatusBinding::{PermissionName, PermissionState};
-use dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionStatusBinding::PermissionStatusMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::error::Error;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::bluetooth::{AsyncBluetoothListener, Bluetooth, AllowedBluetoothDevice};
-use dom::bluetoothdevice::BluetoothDevice;
-use dom::globalscope::GlobalScope;
-use dom::permissionstatus::PermissionStatus;
-use dom::promise::Promise;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::{self, BluetoothPermissionResultMethods};
+use crate::dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorBinding::NavigatorMethods;
+use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::{PermissionName, PermissionState};
+use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionStatusBinding::PermissionStatusMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bluetooth::{AsyncBluetoothListener, Bluetooth, AllowedBluetoothDevice};
+use crate::dom::bluetoothdevice::BluetoothDevice;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::permissionstatus::PermissionStatus;
+use crate::dom::promise::Promise;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use std::rc::Rc;
diff --git a/components/script/dom/bluetoothremotegattcharacteristic.rs b/components/script/dom/bluetoothremotegattcharacteristic.rs
index 70cbf23ffd2..dbeddd1ab5b 100644
--- a/components/script/dom/bluetoothremotegattcharacteristic.rs
+++ b/components/script/dom/bluetoothremotegattcharacteristic.rs
@@ -4,27 +4,27 @@
use bluetooth_traits::{BluetoothRequest, BluetoothResponse, GATTType};
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding::
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding::
BluetoothCharacteristicPropertiesMethods;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding::
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding::
BluetoothRemoteGATTCharacteristicMethods;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods;
-use dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
-use dom::bindings::error::Error::{self, InvalidModification, Network, NotSupported, Security};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::{ByteString, DOMString};
-use dom::bluetooth::{AsyncBluetoothListener, get_gatt_children, response_async};
-use dom::bluetoothcharacteristicproperties::BluetoothCharacteristicProperties;
-use dom::bluetoothremotegattservice::BluetoothRemoteGATTService;
-use dom::bluetoothuuid::{BluetoothDescriptorUUID, BluetoothUUID};
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods;
+use crate::dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
+use crate::dom::bindings::error::Error::{self, InvalidModification, Network, NotSupported, Security};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::{ByteString, DOMString};
+use crate::dom::bluetooth::{AsyncBluetoothListener, get_gatt_children, response_async};
+use crate::dom::bluetoothcharacteristicproperties::BluetoothCharacteristicProperties;
+use crate::dom::bluetoothremotegattservice::BluetoothRemoteGATTService;
+use crate::dom::bluetoothuuid::{BluetoothDescriptorUUID, BluetoothUUID};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use std::rc::Rc;
diff --git a/components/script/dom/bluetoothremotegattdescriptor.rs b/components/script/dom/bluetoothremotegattdescriptor.rs
index b0eb6476fe3..876f297f656 100644
--- a/components/script/dom/bluetoothremotegattdescriptor.rs
+++ b/components/script/dom/bluetoothremotegattdescriptor.rs
@@ -4,22 +4,22 @@
use bluetooth_traits::{BluetoothRequest, BluetoothResponse};
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding::
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding::
BluetoothRemoteGATTCharacteristicMethods;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTDescriptorBinding;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTDescriptorBinding::BluetoothRemoteGATTDescriptorMethods;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods;
-use dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
-use dom::bindings::error::Error::{self, InvalidModification, Network, Security};
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::{ByteString, DOMString};
-use dom::bluetooth::{AsyncBluetoothListener, response_async};
-use dom::bluetoothremotegattcharacteristic::{BluetoothRemoteGATTCharacteristic, MAXIMUM_ATTRIBUTE_LENGTH};
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTDescriptorBinding;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTDescriptorBinding::BluetoothRemoteGATTDescriptorMethods;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods;
+use crate::dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
+use crate::dom::bindings::error::Error::{self, InvalidModification, Network, Security};
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::{ByteString, DOMString};
+use crate::dom::bluetooth::{AsyncBluetoothListener, response_async};
+use crate::dom::bluetoothremotegattcharacteristic::{BluetoothRemoteGATTCharacteristic, MAXIMUM_ATTRIBUTE_LENGTH};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use std::rc::Rc;
diff --git a/components/script/dom/bluetoothremotegattserver.rs b/components/script/dom/bluetoothremotegattserver.rs
index 3d4e5125b3e..64b4a9032a7 100644
--- a/components/script/dom/bluetoothremotegattserver.rs
+++ b/components/script/dom/bluetoothremotegattserver.rs
@@ -3,18 +3,18 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bluetooth_traits::{BluetoothRequest, BluetoothResponse, GATTType};
-use dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
-use dom::bindings::error::Error;
-use dom::bindings::error::ErrorResult;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bluetooth::{AsyncBluetoothListener, get_gatt_children, response_async};
-use dom::bluetoothdevice::BluetoothDevice;
-use dom::bluetoothuuid::{BluetoothServiceUUID, BluetoothUUID};
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
+use crate::dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::error::ErrorResult;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bluetooth::{AsyncBluetoothListener, get_gatt_children, response_async};
+use crate::dom::bluetoothdevice::BluetoothDevice;
+use crate::dom::bluetoothuuid::{BluetoothServiceUUID, BluetoothUUID};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use std::cell::Cell;
diff --git a/components/script/dom/bluetoothremotegattservice.rs b/components/script/dom/bluetoothremotegattservice.rs
index 85aa40c874c..c4f032dd356 100644
--- a/components/script/dom/bluetoothremotegattservice.rs
+++ b/components/script/dom/bluetoothremotegattservice.rs
@@ -3,19 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bluetooth_traits::{BluetoothResponse, GATTType};
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding;
-use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods;
-use dom::bindings::error::Error;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::bluetooth::{AsyncBluetoothListener, get_gatt_children};
-use dom::bluetoothdevice::BluetoothDevice;
-use dom::bluetoothuuid::{BluetoothCharacteristicUUID, BluetoothServiceUUID, BluetoothUUID};
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding;
+use crate::dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding::BluetoothRemoteGATTServiceMethods;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bluetooth::{AsyncBluetoothListener, get_gatt_children};
+use crate::dom::bluetoothdevice::BluetoothDevice;
+use crate::dom::bluetoothuuid::{BluetoothCharacteristicUUID, BluetoothServiceUUID, BluetoothUUID};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
use dom_struct::dom_struct;
use std::rc::Rc;
diff --git a/components/script/dom/bluetoothuuid.rs b/components/script/dom/bluetoothuuid.rs
index 212318650c7..05b21ab1633 100644
--- a/components/script/dom/bluetoothuuid.rs
+++ b/components/script/dom/bluetoothuuid.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::UnionTypes::StringOrUnsignedLong;
-use dom::bindings::error::Error::Type;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::str::DOMString;
-use dom::window::Window;
+use crate::dom::bindings::codegen::UnionTypes::StringOrUnsignedLong;
+use crate::dom::bindings::error::Error::Type;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use regex::Regex;
diff --git a/components/script/dom/canvasgradient.rs b/components/script/dom/canvasgradient.rs
index e3f4ea54f4b..d16662e8bd8 100644
--- a/components/script/dom/canvasgradient.rs
+++ b/components/script/dom/canvasgradient.rs
@@ -5,15 +5,15 @@
use canvas_traits::canvas::{CanvasGradientStop, FillOrStrokeStyle, LinearGradientStyle, RadialGradientStyle};
use cssparser::{Parser, ParserInput, RGBA};
use cssparser::Color as CSSColor;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::CanvasGradientBinding;
-use dom::bindings::codegen::Bindings::CanvasGradientBinding::CanvasGradientMethods;
-use dom::bindings::error::{Error, ErrorResult};
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding;
+use crate::dom::bindings::codegen::Bindings::CanvasGradientBinding::CanvasGradientMethods;
+use crate::dom::bindings::error::{Error, ErrorResult};
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
// https://html.spec.whatwg.org/multipage/#canvasgradient
diff --git a/components/script/dom/canvaspattern.rs b/components/script/dom/canvaspattern.rs
index bcc6e35f5f5..fe8de52dc75 100644
--- a/components/script/dom/canvaspattern.rs
+++ b/components/script/dom/canvaspattern.rs
@@ -3,11 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::canvas::{FillOrStrokeStyle, RepetitionStyle, SurfaceStyle};
-use dom::bindings::codegen::Bindings::CanvasPatternBinding;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::canvasgradient::ToFillOrStrokeStyle;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::CanvasPatternBinding;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::canvasgradient::ToFillOrStrokeStyle;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use euclid::Size2D;
diff --git a/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs
index f88ae42e452..99cb8399557 100644
--- a/components/script/dom/canvasrenderingcontext2d.rs
+++ b/components/script/dom/canvasrenderingcontext2d.rs
@@ -8,28 +8,28 @@ use canvas_traits::canvas::{LineCapStyle, LineJoinStyle, LinearGradientStyle};
use canvas_traits::canvas::{RadialGradientStyle, RepetitionStyle};
use cssparser::{Parser, ParserInput, RGBA};
use cssparser::Color as CSSColor;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasFillRule;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasImageSource;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineCap;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineJoin;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasRenderingContext2DMethods;
-use dom::bindings::codegen::Bindings::ImageDataBinding::ImageDataMethods;
-use dom::bindings::codegen::UnionTypes::StringOrCanvasGradientOrCanvasPattern;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, LayoutDom};
-use dom::bindings::str::DOMString;
-use dom::canvasgradient::{CanvasGradient, CanvasGradientStyle, ToFillOrStrokeStyle};
-use dom::canvaspattern::CanvasPattern;
-use dom::element::Element;
-use dom::globalscope::GlobalScope;
-use dom::htmlcanvaselement::{CanvasContext, HTMLCanvasElement};
-use dom::imagedata::ImageData;
-use dom::node::{Node, NodeDamage, window_from_node};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasFillRule;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasImageSource;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineCap;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineJoin;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasRenderingContext2DMethods;
+use crate::dom::bindings::codegen::Bindings::ImageDataBinding::ImageDataMethods;
+use crate::dom::bindings::codegen::UnionTypes::StringOrCanvasGradientOrCanvasPattern;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::canvasgradient::{CanvasGradient, CanvasGradientStyle, ToFillOrStrokeStyle};
+use crate::dom::canvaspattern::CanvasPattern;
+use crate::dom::element::Element;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlcanvaselement::{CanvasContext, HTMLCanvasElement};
+use crate::dom::imagedata::ImageData;
+use crate::dom::node::{Node, NodeDamage, window_from_node};
use dom_struct::dom_struct;
use euclid::{Transform2D, Point2D, Rect, Size2D, vec2};
use ipc_channel::ipc::{self, IpcSender};
@@ -48,7 +48,7 @@ use std::{fmt, mem};
use std::cell::Cell;
use std::str::FromStr;
use std::sync::Arc;
-use unpremultiplytable::UNPREMULTIPLY_TABLE;
+use crate::unpremultiplytable::UNPREMULTIPLY_TABLE;
#[must_root]
#[derive(Clone, JSTraceable, MallocSizeOf)]
diff --git a/components/script/dom/channelmergernode.rs b/components/script/dom/channelmergernode.rs
index 33f00927909..3602b5a7139 100644
--- a/components/script/dom/channelmergernode.rs
+++ b/components/script/dom/channelmergernode.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audionode::{AudioNode, MAX_CHANNEL_COUNT};
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
-use dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::{self, ChannelMergerOptions};
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::window::Window;
+use crate::dom::audionode::{AudioNode, MAX_CHANNEL_COUNT};
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
+use crate::dom::bindings::codegen::Bindings::ChannelMergerNodeBinding::{self, ChannelMergerOptions};
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_media::audio::channel_node::ChannelNodeOptions;
use servo_media::audio::node::AudioNodeInit;
diff --git a/components/script/dom/characterdata.rs b/components/script/dom/characterdata.rs
index 4b6676ec955..0b614a0f18c 100644
--- a/components/script/dom/characterdata.rs
+++ b/components/script/dom/characterdata.rs
@@ -4,24 +4,24 @@
//! DOM bindings for `CharacterData`.
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::ProcessingInstructionBinding::ProcessingInstructionMethods;
-use dom::bindings::codegen::InheritTypes::{CharacterDataTypeId, NodeTypeId};
-use dom::bindings::codegen::UnionTypes::NodeOrString;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, LayoutDom};
-use dom::bindings::str::DOMString;
-use dom::comment::Comment;
-use dom::document::Document;
-use dom::element::Element;
-use dom::mutationobserver::{Mutation, MutationObserver};
-use dom::node::{ChildrenMutation, Node, NodeDamage};
-use dom::processinginstruction::ProcessingInstruction;
-use dom::text::Text;
-use dom::virtualmethods::vtable_for;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::ProcessingInstructionBinding::ProcessingInstructionMethods;
+use crate::dom::bindings::codegen::InheritTypes::{CharacterDataTypeId, NodeTypeId};
+use crate::dom::bindings::codegen::UnionTypes::NodeOrString;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, LayoutDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::comment::Comment;
+use crate::dom::document::Document;
+use crate::dom::element::Element;
+use crate::dom::mutationobserver::{Mutation, MutationObserver};
+use crate::dom::node::{ChildrenMutation, Node, NodeDamage};
+use crate::dom::processinginstruction::ProcessingInstruction;
+use crate::dom::text::Text;
+use crate::dom::virtualmethods::vtable_for;
use dom_struct::dom_struct;
use servo_config::opts;
use std::cell::Ref;
diff --git a/components/script/dom/client.rs b/components/script/dom/client.rs
index ff63979c4ef..ec20e59258c 100644
--- a/components/script/dom/client.rs
+++ b/components/script/dom/client.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::ClientBinding::{ClientMethods, Wrap};
-use dom::bindings::codegen::Bindings::ClientBinding::FrameType;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::{DOMString, USVString};
-use dom::serviceworker::ServiceWorker;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::ClientBinding::{ClientMethods, Wrap};
+use crate::dom::bindings::codegen::Bindings::ClientBinding::FrameType;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::serviceworker::ServiceWorker;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_url::ServoUrl;
use std::default::Default;
diff --git a/components/script/dom/closeevent.rs b/components/script/dom/closeevent.rs
index 0c353b68188..dc8d175deaf 100644
--- a/components/script/dom/closeevent.rs
+++ b/components/script/dom/closeevent.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CloseEventBinding;
-use dom::bindings::codegen::Bindings::CloseEventBinding::CloseEventMethods;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::CloseEventBinding;
+use crate::dom::bindings::codegen::Bindings::CloseEventBinding::CloseEventMethods;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/comment.rs b/components/script/dom/comment.rs
index 9901a834a41..615e3a4cd2f 100644
--- a/components/script/dom/comment.rs
+++ b/components/script/dom/comment.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CommentBinding;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::characterdata::CharacterData;
-use dom::document::Document;
-use dom::node::Node;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CommentBinding;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::characterdata::CharacterData;
+use crate::dom::document::Document;
+use crate::dom::node::Node;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
/// An HTML comment.
diff --git a/components/script/dom/compositionevent.rs b/components/script/dom/compositionevent.rs
index 191572b51ab..7763ec41600 100644
--- a/components/script/dom/compositionevent.rs
+++ b/components/script/dom/compositionevent.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CompositionEventBinding::{self, CompositionEventMethods};
-use dom::bindings::codegen::Bindings::UIEventBinding::UIEventBinding::UIEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::uievent::UIEvent;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CompositionEventBinding::{self, CompositionEventMethods};
+use crate::dom::bindings::codegen::Bindings::UIEventBinding::UIEventBinding::UIEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::uievent::UIEvent;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/console.rs b/components/script/dom/console.rs
index 410477a79d3..ba8a9d45afe 100644
--- a/components/script/dom/console.rs
+++ b/components/script/dom/console.rs
@@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{ConsoleMessage, LogLevel, ScriptToDevtoolsControlMsg};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
-use dom::workerglobalscope::WorkerGlobalScope;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::workerglobalscope::WorkerGlobalScope;
use std::io;
// https://developer.mozilla.org/en-US/docs/Web/API/Console
diff --git a/components/script/dom/create.rs b/components/script/dom/create.rs
index e1949ccc559..b8afe815b8e 100644
--- a/components/script/dom/create.rs
+++ b/components/script/dom/create.rs
@@ -2,85 +2,85 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::error::{report_pending_exception, throw_dom_exception};
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::DomRoot;
-use dom::customelementregistry::{is_valid_custom_element_name, upgrade_element};
-use dom::document::Document;
-use dom::element::{CustomElementCreationMode, CustomElementState, Element, ElementCreator};
-use dom::globalscope::GlobalScope;
-use dom::htmlanchorelement::HTMLAnchorElement;
-use dom::htmlareaelement::HTMLAreaElement;
-use dom::htmlaudioelement::HTMLAudioElement;
-use dom::htmlbaseelement::HTMLBaseElement;
-use dom::htmlbodyelement::HTMLBodyElement;
-use dom::htmlbrelement::HTMLBRElement;
-use dom::htmlbuttonelement::HTMLButtonElement;
-use dom::htmlcanvaselement::HTMLCanvasElement;
-use dom::htmldataelement::HTMLDataElement;
-use dom::htmldatalistelement::HTMLDataListElement;
-use dom::htmldetailselement::HTMLDetailsElement;
-use dom::htmldialogelement::HTMLDialogElement;
-use dom::htmldirectoryelement::HTMLDirectoryElement;
-use dom::htmldivelement::HTMLDivElement;
-use dom::htmldlistelement::HTMLDListElement;
-use dom::htmlelement::HTMLElement;
-use dom::htmlembedelement::HTMLEmbedElement;
-use dom::htmlfieldsetelement::HTMLFieldSetElement;
-use dom::htmlfontelement::HTMLFontElement;
-use dom::htmlformelement::HTMLFormElement;
-use dom::htmlframeelement::HTMLFrameElement;
-use dom::htmlframesetelement::HTMLFrameSetElement;
-use dom::htmlheadelement::HTMLHeadElement;
-use dom::htmlheadingelement::HTMLHeadingElement;
-use dom::htmlheadingelement::HeadingLevel;
-use dom::htmlhrelement::HTMLHRElement;
-use dom::htmlhtmlelement::HTMLHtmlElement;
-use dom::htmliframeelement::HTMLIFrameElement;
-use dom::htmlimageelement::HTMLImageElement;
-use dom::htmlinputelement::HTMLInputElement;
-use dom::htmllabelelement::HTMLLabelElement;
-use dom::htmllegendelement::HTMLLegendElement;
-use dom::htmllielement::HTMLLIElement;
-use dom::htmllinkelement::HTMLLinkElement;
-use dom::htmlmapelement::HTMLMapElement;
-use dom::htmlmetaelement::HTMLMetaElement;
-use dom::htmlmeterelement::HTMLMeterElement;
-use dom::htmlmodelement::HTMLModElement;
-use dom::htmlobjectelement::HTMLObjectElement;
-use dom::htmlolistelement::HTMLOListElement;
-use dom::htmloptgroupelement::HTMLOptGroupElement;
-use dom::htmloptionelement::HTMLOptionElement;
-use dom::htmloutputelement::HTMLOutputElement;
-use dom::htmlparagraphelement::HTMLParagraphElement;
-use dom::htmlparamelement::HTMLParamElement;
-use dom::htmlpictureelement::HTMLPictureElement;
-use dom::htmlpreelement::HTMLPreElement;
-use dom::htmlprogresselement::HTMLProgressElement;
-use dom::htmlquoteelement::HTMLQuoteElement;
-use dom::htmlscriptelement::HTMLScriptElement;
-use dom::htmlselectelement::HTMLSelectElement;
-use dom::htmlsourceelement::HTMLSourceElement;
-use dom::htmlspanelement::HTMLSpanElement;
-use dom::htmlstyleelement::HTMLStyleElement;
-use dom::htmltablecaptionelement::HTMLTableCaptionElement;
-use dom::htmltablecellelement::HTMLTableCellElement;
-use dom::htmltablecolelement::HTMLTableColElement;
-use dom::htmltableelement::HTMLTableElement;
-use dom::htmltablerowelement::HTMLTableRowElement;
-use dom::htmltablesectionelement::HTMLTableSectionElement;
-use dom::htmltemplateelement::HTMLTemplateElement;
-use dom::htmltextareaelement::HTMLTextAreaElement;
-use dom::htmltimeelement::HTMLTimeElement;
-use dom::htmltitleelement::HTMLTitleElement;
-use dom::htmltrackelement::HTMLTrackElement;
-use dom::htmlulistelement::HTMLUListElement;
-use dom::htmlunknownelement::HTMLUnknownElement;
-use dom::htmlvideoelement::HTMLVideoElement;
-use dom::svgsvgelement::SVGSVGElement;
+use crate::dom::bindings::error::{report_pending_exception, throw_dom_exception};
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::customelementregistry::{is_valid_custom_element_name, upgrade_element};
+use crate::dom::document::Document;
+use crate::dom::element::{CustomElementCreationMode, CustomElementState, Element, ElementCreator};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlanchorelement::HTMLAnchorElement;
+use crate::dom::htmlareaelement::HTMLAreaElement;
+use crate::dom::htmlaudioelement::HTMLAudioElement;
+use crate::dom::htmlbaseelement::HTMLBaseElement;
+use crate::dom::htmlbodyelement::HTMLBodyElement;
+use crate::dom::htmlbrelement::HTMLBRElement;
+use crate::dom::htmlbuttonelement::HTMLButtonElement;
+use crate::dom::htmlcanvaselement::HTMLCanvasElement;
+use crate::dom::htmldataelement::HTMLDataElement;
+use crate::dom::htmldatalistelement::HTMLDataListElement;
+use crate::dom::htmldetailselement::HTMLDetailsElement;
+use crate::dom::htmldialogelement::HTMLDialogElement;
+use crate::dom::htmldirectoryelement::HTMLDirectoryElement;
+use crate::dom::htmldivelement::HTMLDivElement;
+use crate::dom::htmldlistelement::HTMLDListElement;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlembedelement::HTMLEmbedElement;
+use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
+use crate::dom::htmlfontelement::HTMLFontElement;
+use crate::dom::htmlformelement::HTMLFormElement;
+use crate::dom::htmlframeelement::HTMLFrameElement;
+use crate::dom::htmlframesetelement::HTMLFrameSetElement;
+use crate::dom::htmlheadelement::HTMLHeadElement;
+use crate::dom::htmlheadingelement::HTMLHeadingElement;
+use crate::dom::htmlheadingelement::HeadingLevel;
+use crate::dom::htmlhrelement::HTMLHRElement;
+use crate::dom::htmlhtmlelement::HTMLHtmlElement;
+use crate::dom::htmliframeelement::HTMLIFrameElement;
+use crate::dom::htmlimageelement::HTMLImageElement;
+use crate::dom::htmlinputelement::HTMLInputElement;
+use crate::dom::htmllabelelement::HTMLLabelElement;
+use crate::dom::htmllegendelement::HTMLLegendElement;
+use crate::dom::htmllielement::HTMLLIElement;
+use crate::dom::htmllinkelement::HTMLLinkElement;
+use crate::dom::htmlmapelement::HTMLMapElement;
+use crate::dom::htmlmetaelement::HTMLMetaElement;
+use crate::dom::htmlmeterelement::HTMLMeterElement;
+use crate::dom::htmlmodelement::HTMLModElement;
+use crate::dom::htmlobjectelement::HTMLObjectElement;
+use crate::dom::htmlolistelement::HTMLOListElement;
+use crate::dom::htmloptgroupelement::HTMLOptGroupElement;
+use crate::dom::htmloptionelement::HTMLOptionElement;
+use crate::dom::htmloutputelement::HTMLOutputElement;
+use crate::dom::htmlparagraphelement::HTMLParagraphElement;
+use crate::dom::htmlparamelement::HTMLParamElement;
+use crate::dom::htmlpictureelement::HTMLPictureElement;
+use crate::dom::htmlpreelement::HTMLPreElement;
+use crate::dom::htmlprogresselement::HTMLProgressElement;
+use crate::dom::htmlquoteelement::HTMLQuoteElement;
+use crate::dom::htmlscriptelement::HTMLScriptElement;
+use crate::dom::htmlselectelement::HTMLSelectElement;
+use crate::dom::htmlsourceelement::HTMLSourceElement;
+use crate::dom::htmlspanelement::HTMLSpanElement;
+use crate::dom::htmlstyleelement::HTMLStyleElement;
+use crate::dom::htmltablecaptionelement::HTMLTableCaptionElement;
+use crate::dom::htmltablecellelement::HTMLTableCellElement;
+use crate::dom::htmltablecolelement::HTMLTableColElement;
+use crate::dom::htmltableelement::HTMLTableElement;
+use crate::dom::htmltablerowelement::HTMLTableRowElement;
+use crate::dom::htmltablesectionelement::HTMLTableSectionElement;
+use crate::dom::htmltemplateelement::HTMLTemplateElement;
+use crate::dom::htmltextareaelement::HTMLTextAreaElement;
+use crate::dom::htmltimeelement::HTMLTimeElement;
+use crate::dom::htmltitleelement::HTMLTitleElement;
+use crate::dom::htmltrackelement::HTMLTrackElement;
+use crate::dom::htmlulistelement::HTMLUListElement;
+use crate::dom::htmlunknownelement::HTMLUnknownElement;
+use crate::dom::htmlvideoelement::HTMLVideoElement;
+use crate::dom::svgsvgelement::SVGSVGElement;
use html5ever::{LocalName, Prefix, QualName};
use js::jsapi::JSAutoCompartment;
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use servo_config::prefs::PREFS;
fn create_svg_element(
diff --git a/components/script/dom/crypto.rs b/components/script/dom/crypto.rs
index cc17c8a00f3..a9a8efe2b4a 100644
--- a/components/script/dom/crypto.rs
+++ b/components/script/dom/crypto.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::CryptoBinding;
-use dom::bindings::codegen::Bindings::CryptoBinding::CryptoMethods;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::CryptoBinding;
+use crate::dom::bindings::codegen::Bindings::CryptoBinding::CryptoMethods;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::{JSContext, JSObject};
use js::jsapi::Type;
diff --git a/components/script/dom/css.rs b/components/script/dom/css.rs
index 0f3c929460e..123828a0690 100644
--- a/components/script/dom/css.rs
+++ b/components/script/dom/css.rs
@@ -3,13 +3,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser, ParserInput, serialize_identifier};
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::window::Window;
-use dom::worklet::Worklet;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::window::Window;
+use crate::dom::worklet::Worklet;
use dom_struct::dom_struct;
use style::context::QuirksMode;
use style::parser::ParserContext;
diff --git a/components/script/dom/cssconditionrule.rs b/components/script/dom/cssconditionrule.rs
index beef32f8a42..6b839b6ef4a 100644
--- a/components/script/dom/cssconditionrule.rs
+++ b/components/script/dom/cssconditionrule.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CSSConditionRuleBinding::CSSConditionRuleMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::str::DOMString;
-use dom::cssgroupingrule::CSSGroupingRule;
-use dom::cssmediarule::CSSMediaRule;
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::csssupportsrule::CSSSupportsRule;
+use crate::dom::bindings::codegen::Bindings::CSSConditionRuleBinding::CSSConditionRuleMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssgroupingrule::CSSGroupingRule;
+use crate::dom::cssmediarule::CSSMediaRule;
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::csssupportsrule::CSSSupportsRule;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::{SharedRwLock, Locked};
diff --git a/components/script/dom/cssfontfacerule.rs b/components/script/dom/cssfontfacerule.rs
index 5865ec76008..82fe5159ac6 100644
--- a/components/script/dom/cssfontfacerule.rs
+++ b/components/script/dom/cssfontfacerule.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CSSFontFaceRuleBinding;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::cssrule::{CSSRule, SpecificCSSRule};
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSFontFaceRuleBinding;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::{Locked, ToCssWithGuard};
@@ -51,7 +51,7 @@ impl CSSFontFaceRule {
impl SpecificCSSRule for CSSFontFaceRule {
fn ty(&self) -> u16 {
- use dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
+ use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
CSSRuleConstants::FONT_FACE_RULE
}
diff --git a/components/script/dom/cssgroupingrule.rs b/components/script/dom/cssgroupingrule.rs
index 9324035b0b0..c7295f46b85 100644
--- a/components/script/dom/cssgroupingrule.rs
+++ b/components/script/dom/cssgroupingrule.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CSSGroupingRuleBinding::CSSGroupingRuleMethods;
-use dom::bindings::error::{ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::cssrule::CSSRule;
-use dom::cssrulelist::{CSSRuleList, RulesSource};
-use dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::bindings::codegen::Bindings::CSSGroupingRuleBinding::CSSGroupingRuleMethods;
+use crate::dom::bindings::error::{ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssrule::CSSRule;
+use crate::dom::cssrulelist::{CSSRuleList, RulesSource};
+use crate::dom::cssstylesheet::CSSStyleSheet;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::{SharedRwLock, Locked};
diff --git a/components/script/dom/cssimportrule.rs b/components/script/dom/cssimportrule.rs
index c8675c0457b..7ab8a4d5ac3 100644
--- a/components/script/dom/cssimportrule.rs
+++ b/components/script/dom/cssimportrule.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CSSImportRuleBinding;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::cssrule::{CSSRule, SpecificCSSRule};
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSImportRuleBinding;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::{Locked, ToCssWithGuard};
@@ -48,7 +48,7 @@ impl CSSImportRule {
impl SpecificCSSRule for CSSImportRule {
fn ty(&self) -> u16 {
- use dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
+ use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
CSSRuleConstants::IMPORT_RULE
}
diff --git a/components/script/dom/csskeyframerule.rs b/components/script/dom/csskeyframerule.rs
index 7d579447491..948e5938fe3 100644
--- a/components/script/dom/csskeyframerule.rs
+++ b/components/script/dom/csskeyframerule.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CSSKeyframeRuleBinding::{self, CSSKeyframeRuleMethods};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::cssrule::{CSSRule, SpecificCSSRule};
-use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSKeyframeRuleBinding::{self, CSSKeyframeRuleMethods};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
+use crate::dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::{Locked, ToCssWithGuard};
@@ -73,7 +73,7 @@ impl CSSKeyframeRuleMethods for CSSKeyframeRule {
impl SpecificCSSRule for CSSKeyframeRule {
fn ty(&self) -> u16 {
- use dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
+ use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
CSSRuleConstants::KEYFRAME_RULE
}
diff --git a/components/script/dom/csskeyframesrule.rs b/components/script/dom/csskeyframesrule.rs
index 4c8902c6edd..82e53c06402 100644
--- a/components/script/dom/csskeyframesrule.rs
+++ b/components/script/dom/csskeyframesrule.rs
@@ -3,18 +3,18 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser, ParserInput};
-use dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding;
-use dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding::CSSKeyframesRuleMethods;
-use dom::bindings::error::ErrorResult;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::csskeyframerule::CSSKeyframeRule;
-use dom::cssrule::{CSSRule, SpecificCSSRule};
-use dom::cssrulelist::{CSSRuleList, RulesSource};
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding;
+use crate::dom::bindings::codegen::Bindings::CSSKeyframesRuleBinding::CSSKeyframesRuleMethods;
+use crate::dom::bindings::error::ErrorResult;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::csskeyframerule::CSSKeyframeRule;
+use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
+use crate::dom::cssrulelist::{CSSRuleList, RulesSource};
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::{Locked, ToCssWithGuard};
@@ -146,7 +146,7 @@ impl CSSKeyframesRuleMethods for CSSKeyframesRule {
impl SpecificCSSRule for CSSKeyframesRule {
fn ty(&self) -> u16 {
- use dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
+ use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
CSSRuleConstants::KEYFRAMES_RULE
}
diff --git a/components/script/dom/cssmediarule.rs b/components/script/dom/cssmediarule.rs
index 9c8bc87d89b..7e15c0e9da8 100644
--- a/components/script/dom/cssmediarule.rs
+++ b/components/script/dom/cssmediarule.rs
@@ -3,17 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser, ParserInput};
-use dom::bindings::codegen::Bindings::CSSMediaRuleBinding;
-use dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::cssconditionrule::CSSConditionRule;
-use dom::cssrule::SpecificCSSRule;
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::medialist::MediaList;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding;
+use crate::dom::bindings::codegen::Bindings::CSSMediaRuleBinding::CSSMediaRuleMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssconditionrule::CSSConditionRule;
+use crate::dom::cssrule::SpecificCSSRule;
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::medialist::MediaList;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::media_queries::MediaList as StyleMediaList;
@@ -109,7 +109,7 @@ impl CSSMediaRule {
impl SpecificCSSRule for CSSMediaRule {
fn ty(&self) -> u16 {
- use dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
+ use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
CSSRuleConstants::MEDIA_RULE
}
diff --git a/components/script/dom/cssnamespacerule.rs b/components/script/dom/cssnamespacerule.rs
index b0340fecfeb..c70939eeb36 100644
--- a/components/script/dom/cssnamespacerule.rs
+++ b/components/script/dom/cssnamespacerule.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CSSNamespaceRuleBinding;
-use dom::bindings::codegen::Bindings::CSSNamespaceRuleBinding::CSSNamespaceRuleMethods;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::cssrule::{CSSRule, SpecificCSSRule};
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSNamespaceRuleBinding;
+use crate::dom::bindings::codegen::Bindings::CSSNamespaceRuleBinding::CSSNamespaceRuleMethods;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::{Locked, ToCssWithGuard};
@@ -71,7 +71,7 @@ impl CSSNamespaceRuleMethods for CSSNamespaceRule {
impl SpecificCSSRule for CSSNamespaceRule {
fn ty(&self) -> u16 {
- use dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
+ use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
CSSRuleConstants::NAMESPACE_RULE
}
diff --git a/components/script/dom/cssrule.rs b/components/script/dom/cssrule.rs
index 71f8ab5844c..51dc17d3343 100644
--- a/components/script/dom/cssrule.rs
+++ b/components/script/dom/cssrule.rs
@@ -2,22 +2,22 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::cssfontfacerule::CSSFontFaceRule;
-use dom::cssimportrule::CSSImportRule;
-use dom::csskeyframerule::CSSKeyframeRule;
-use dom::csskeyframesrule::CSSKeyframesRule;
-use dom::cssmediarule::CSSMediaRule;
-use dom::cssnamespacerule::CSSNamespaceRule;
-use dom::cssstylerule::CSSStyleRule;
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::csssupportsrule::CSSSupportsRule;
-use dom::cssviewportrule::CSSViewportRule;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssfontfacerule::CSSFontFaceRule;
+use crate::dom::cssimportrule::CSSImportRule;
+use crate::dom::csskeyframerule::CSSKeyframeRule;
+use crate::dom::csskeyframesrule::CSSKeyframesRule;
+use crate::dom::cssmediarule::CSSMediaRule;
+use crate::dom::cssnamespacerule::CSSNamespaceRule;
+use crate::dom::cssstylerule::CSSStyleRule;
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::csssupportsrule::CSSSupportsRule;
+use crate::dom::cssviewportrule::CSSViewportRule;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use std::cell::Cell;
use style::shared_lock::SharedRwLock;
diff --git a/components/script/dom/cssrulelist.rs b/components/script/dom/cssrulelist.rs
index f6668763e59..c5889eb066c 100644
--- a/components/script/dom/cssrulelist.rs
+++ b/components/script/dom/cssrulelist.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::CSSRuleListBinding;
-use dom::bindings::codegen::Bindings::CSSRuleListBinding::CSSRuleListMethods;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::csskeyframerule::CSSKeyframeRule;
-use dom::cssrule::CSSRule;
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::CSSRuleListBinding;
+use crate::dom::bindings::codegen::Bindings::CSSRuleListBinding::CSSRuleListMethods;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::csskeyframerule::CSSKeyframeRule;
+use crate::dom::cssrule::CSSRule;
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::Locked;
diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs
index 795e401a5d3..455bcbdd08f 100644
--- a/components/script/dom/cssstyledeclaration.rs
+++ b/components/script/dom/cssstyledeclaration.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::{self, CSSStyleDeclarationMethods};
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::cssrule::CSSRule;
-use dom::element::Element;
-use dom::node::{Node, window_from_node, document_from_node};
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSStyleDeclarationBinding::{self, CSSStyleDeclarationMethods};
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssrule::CSSRule;
+use crate::dom::element::Element;
+use crate::dom::node::{Node, window_from_node, document_from_node};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use servo_url::ServoUrl;
diff --git a/components/script/dom/cssstylerule.rs b/components/script/dom/cssstylerule.rs
index 788b72927b5..9d3b5fed9bb 100644
--- a/components/script/dom/cssstylerule.rs
+++ b/components/script/dom/cssstylerule.rs
@@ -4,16 +4,16 @@
use cssparser::{Parser as CssParser, ParserInput as CssParserInput};
use cssparser::ToCss;
-use dom::bindings::codegen::Bindings::CSSStyleRuleBinding::{self, CSSStyleRuleMethods};
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::cssrule::{CSSRule, SpecificCSSRule};
-use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSStyleRuleBinding::{self, CSSStyleRuleMethods};
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
+use crate::dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use selectors::parser::SelectorList;
use servo_arc::Arc;
@@ -58,7 +58,7 @@ impl CSSStyleRule {
impl SpecificCSSRule for CSSStyleRule {
fn ty(&self) -> u16 {
- use dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
+ use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
CSSRuleConstants::STYLE_RULE
}
diff --git a/components/script/dom/cssstylesheet.rs b/components/script/dom/cssstylesheet.rs
index def0f26bc77..74b04a24dac 100644
--- a/components/script/dom/cssstylesheet.rs
+++ b/components/script/dom/cssstylesheet.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CSSStyleSheetBinding;
-use dom::bindings::codegen::Bindings::CSSStyleSheetBinding::CSSStyleSheetMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::reflector::{reflect_dom_object, DomObject};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::cssrulelist::{CSSRuleList, RulesSource};
-use dom::element::Element;
-use dom::stylesheet::StyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSStyleSheetBinding;
+use crate::dom::bindings::codegen::Bindings::CSSStyleSheetBinding::CSSStyleSheetMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::reflector::{reflect_dom_object, DomObject};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssrulelist::{CSSRuleList, RulesSource};
+use crate::dom::element::Element;
+use crate::dom::stylesheet::StyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use std::cell::Cell;
diff --git a/components/script/dom/cssstylevalue.rs b/components/script/dom/cssstylevalue.rs
index 2ecdbbe357f..032d6c6aced 100644
--- a/components/script/dom/cssstylevalue.rs
+++ b/components/script/dom/cssstylevalue.rs
@@ -4,13 +4,13 @@
use cssparser::Parser;
use cssparser::ParserInput;
-use dom::bindings::codegen::Bindings::CSSStyleValueBinding::CSSStyleValueMethods;
-use dom::bindings::codegen::Bindings::CSSStyleValueBinding::Wrap;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::CSSStyleValueMethods;
+use crate::dom::bindings::codegen::Bindings::CSSStyleValueBinding::Wrap;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use servo_url::ServoUrl;
diff --git a/components/script/dom/csssupportsrule.rs b/components/script/dom/csssupportsrule.rs
index 030a6c56be9..b3976bea646 100644
--- a/components/script/dom/csssupportsrule.rs
+++ b/components/script/dom/csssupportsrule.rs
@@ -3,15 +3,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser, ParserInput};
-use dom::bindings::codegen::Bindings::CSSSupportsRuleBinding;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::cssconditionrule::CSSConditionRule;
-use dom::cssrule::SpecificCSSRule;
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSSupportsRuleBinding;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssconditionrule::CSSConditionRule;
+use crate::dom::cssrule::SpecificCSSRule;
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::parser::ParserContext;
@@ -102,7 +102,7 @@ impl CSSSupportsRule {
impl SpecificCSSRule for CSSSupportsRule {
fn ty(&self) -> u16 {
- use dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
+ use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
CSSRuleConstants::SUPPORTS_RULE
}
diff --git a/components/script/dom/cssviewportrule.rs b/components/script/dom/cssviewportrule.rs
index 8f0dbaa8c15..9c19033601d 100644
--- a/components/script/dom/cssviewportrule.rs
+++ b/components/script/dom/cssviewportrule.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CSSViewportRuleBinding;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::cssrule::{CSSRule, SpecificCSSRule};
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CSSViewportRuleBinding;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssrule::{CSSRule, SpecificCSSRule};
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::shared_lock::{Locked, ToCssWithGuard};
@@ -51,7 +51,7 @@ impl CSSViewportRule {
impl SpecificCSSRule for CSSViewportRule {
fn ty(&self) -> u16 {
- use dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
+ use crate::dom::bindings::codegen::Bindings::CSSRuleBinding::CSSRuleConstants;
CSSRuleConstants::VIEWPORT_RULE
}
diff --git a/components/script/dom/customelementregistry.rs b/components/script/dom/customelementregistry.rs
index 7239a99b0c0..4f53210a8c1 100644
--- a/components/script/dom/customelementregistry.rs
+++ b/components/script/dom/customelementregistry.rs
@@ -2,29 +2,29 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::callback::{CallbackContainer, ExceptionHandling};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::CustomElementRegistryBinding;
-use dom::bindings::codegen::Bindings::CustomElementRegistryBinding::CustomElementConstructor;
-use dom::bindings::codegen::Bindings::CustomElementRegistryBinding::CustomElementRegistryMethods;
-use dom::bindings::codegen::Bindings::CustomElementRegistryBinding::ElementDefinitionOptions;
-use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
-use dom::bindings::codegen::Bindings::FunctionBinding::Function;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::conversions::{ConversionResult, FromJSValConvertible, StringificationBehavior};
-use dom::bindings::error::{Error, ErrorResult, Fallible, report_pending_exception, throw_dom_exception};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::domexception::{DOMErrorName, DOMException};
-use dom::element::{CustomElementState, Element};
-use dom::globalscope::GlobalScope;
-use dom::htmlelement::HTMLElement;
-use dom::node::{document_from_node, Node, window_from_node};
-use dom::promise::Promise;
-use dom::window::Window;
+use crate::dom::bindings::callback::{CallbackContainer, ExceptionHandling};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::CustomElementRegistryBinding;
+use crate::dom::bindings::codegen::Bindings::CustomElementRegistryBinding::CustomElementConstructor;
+use crate::dom::bindings::codegen::Bindings::CustomElementRegistryBinding::CustomElementRegistryMethods;
+use crate::dom::bindings::codegen::Bindings::CustomElementRegistryBinding::ElementDefinitionOptions;
+use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
+use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::conversions::{ConversionResult, FromJSValConvertible, StringificationBehavior};
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible, report_pending_exception, throw_dom_exception};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::domexception::{DOMErrorName, DOMException};
+use crate::dom::element::{CustomElementState, Element};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{document_from_node, Node, window_from_node};
+use crate::dom::promise::Promise;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use html5ever::{LocalName, Namespace, Prefix};
use js::conversions::ToJSValConvertible;
@@ -34,8 +34,8 @@ use js::jsapi::{JSAutoCompartment, JSContext, JSObject};
use js::jsval::{JSVal, NullValue, ObjectValue, UndefinedValue};
use js::rust::{HandleObject, HandleValue, MutableHandleValue};
use js::rust::wrappers::{JS_GetProperty, Construct1, JS_SameValue};
-use microtask::Microtask;
-use script_thread::ScriptThread;
+use crate::microtask::Microtask;
+use crate::script_thread::ScriptThread;
use std::cell::Cell;
use std::collections::{HashMap, VecDeque};
use std::mem;
diff --git a/components/script/dom/customevent.rs b/components/script/dom/customevent.rs
index b054d1a0dcb..3a4a4e78a3a 100644
--- a/components/script/dom/customevent.rs
+++ b/components/script/dom/customevent.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CustomEventBinding;
-use dom::bindings::codegen::Bindings::CustomEventBinding::CustomEventMethods;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::RootedTraceableBox;
-use dom::event::Event;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::CustomEventBinding;
+use crate::dom::bindings::codegen::Bindings::CustomEventBinding::CustomEventMethods;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::event::Event;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext};
use js::jsval::JSVal;
diff --git a/components/script/dom/dedicatedworkerglobalscope.rs b/components/script/dom/dedicatedworkerglobalscope.rs
index dac95aeb4c5..59f0f393be8 100644
--- a/components/script/dom/dedicatedworkerglobalscope.rs
+++ b/components/script/dom/dedicatedworkerglobalscope.rs
@@ -2,27 +2,27 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use devtools;
+use crate::devtools;
use devtools_traits::DevtoolScriptControlMsg;
-use dom::abstractworker::{SimpleWorkerErrorHandler, WorkerScriptMsg};
-use dom::abstractworkerglobalscope::{SendableWorkerScriptChan, WorkerThreadWorkerChan};
-use dom::abstractworkerglobalscope::{WorkerEventLoopMethods, run_worker_event_loop};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding;
-use dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding::DedicatedWorkerGlobalScopeMethods;
-use dom::bindings::error::{ErrorInfo, ErrorResult};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{DomRoot, RootCollection, ThreadLocalStackRoots};
-use dom::bindings::str::DOMString;
-use dom::bindings::structuredclone::StructuredCloneData;
-use dom::errorevent::ErrorEvent;
-use dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::messageevent::MessageEvent;
-use dom::worker::{TrustedWorkerAddress, Worker};
-use dom::workerglobalscope::WorkerGlobalScope;
+use crate::dom::abstractworker::{SimpleWorkerErrorHandler, WorkerScriptMsg};
+use crate::dom::abstractworkerglobalscope::{SendableWorkerScriptChan, WorkerThreadWorkerChan};
+use crate::dom::abstractworkerglobalscope::{WorkerEventLoopMethods, run_worker_event_loop};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding;
+use crate::dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding::DedicatedWorkerGlobalScopeMethods;
+use crate::dom::bindings::error::{ErrorInfo, ErrorResult};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{DomRoot, RootCollection, ThreadLocalStackRoots};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::structuredclone::StructuredCloneData;
+use crate::dom::errorevent::ErrorEvent;
+use crate::dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::messageevent::MessageEvent;
+use crate::dom::worker::{TrustedWorkerAddress, Worker};
+use crate::dom::workerglobalscope::WorkerGlobalScope;
use dom_struct::dom_struct;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
@@ -33,8 +33,8 @@ use js::rust::HandleValue;
use msg::constellation_msg::TopLevelBrowsingContextId;
use net_traits::{IpcSend, load_whole_resource};
use net_traits::request::{CredentialsMode, Destination, RequestInit};
-use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, new_rt_and_cx, Runtime};
-use script_runtime::ScriptThreadEventCategory::WorkerEvent;
+use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, new_rt_and_cx, Runtime};
+use crate::script_runtime::ScriptThreadEventCategory::WorkerEvent;
use script_traits::{TimerEvent, TimerSource, WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
use servo_channel::{channel, route_ipc_receiver_to_new_servo_sender, Sender, Receiver};
use servo_rand::random;
@@ -44,8 +44,8 @@ use std::sync::Arc;
use std::sync::atomic::AtomicBool;
use std::thread;
use style::thread_state::{self, ThreadState};
-use task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
-use task_source::TaskSourceName;
+use crate::task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
+use crate::task_source::TaskSourceName;
/// Set the `worker` field of a related DedicatedWorkerGlobalScope object to a particular
/// value for the duration of this object's lifetime. This ensures that the related Worker
diff --git a/components/script/dom/dissimilaroriginlocation.rs b/components/script/dom/dissimilaroriginlocation.rs
index 0f8fe5bd394..feea9d93b21 100644
--- a/components/script/dom/dissimilaroriginlocation.rs
+++ b/components/script/dom/dissimilaroriginlocation.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DissimilarOriginLocationBinding;
-use dom::bindings::codegen::Bindings::DissimilarOriginLocationBinding::DissimilarOriginLocationMethods;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::reflector::Reflector;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::bindings::str::USVString;
-use dom::dissimilaroriginwindow::DissimilarOriginWindow;
+use crate::dom::bindings::codegen::Bindings::DissimilarOriginLocationBinding;
+use crate::dom::bindings::codegen::Bindings::DissimilarOriginLocationBinding::DissimilarOriginLocationMethods;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::str::USVString;
+use crate::dom::dissimilaroriginwindow::DissimilarOriginWindow;
use dom_struct::dom_struct;
use servo_url::MutableOrigin;
diff --git a/components/script/dom/dissimilaroriginwindow.rs b/components/script/dom/dissimilaroriginwindow.rs
index 40897b2bf52..417c0d82f72 100644
--- a/components/script/dom/dissimilaroriginwindow.rs
+++ b/components/script/dom/dissimilaroriginwindow.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding;
-use dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding::DissimilarOriginWindowMethods;
-use dom::bindings::error::{Error, ErrorResult};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::bindings::structuredclone::StructuredCloneData;
-use dom::dissimilaroriginlocation::DissimilarOriginLocation;
-use dom::globalscope::GlobalScope;
-use dom::windowproxy::WindowProxy;
+use crate::dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding;
+use crate::dom::bindings::codegen::Bindings::DissimilarOriginWindowBinding::DissimilarOriginWindowMethods;
+use crate::dom::bindings::error::{Error, ErrorResult};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::structuredclone::StructuredCloneData;
+use crate::dom::dissimilaroriginlocation::DissimilarOriginLocation;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::windowproxy::WindowProxy;
use dom_struct::dom_struct;
use ipc_channel::ipc;
use js::jsapi::JSContext;
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 75527a90efc..fb8e7b37bfd 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -2,98 +2,98 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use cookie_rs;
+use crate::cookie_rs;
use devtools_traits::ScriptToDevtoolsControlMsg;
-use document_loader::{DocumentLoader, LoadType};
-use dom::activation::{ActivationSource, synthetic_click_activation};
-use dom::attr::Attr;
-use dom::beforeunloadevent::BeforeUnloadEvent;
-use dom::bindings::callback::ExceptionHandling;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventBinding::BeforeUnloadEventMethods;
-use dom::bindings::codegen::Bindings::DocumentBinding;
-use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState, ElementCreationOptions};
-use dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementBinding::HTMLIFrameElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter;
-use dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceMethods;
-use dom::bindings::codegen::Bindings::TouchBinding::TouchMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::{FrameRequestCallback, ScrollBehavior, WindowMethods};
-use dom::bindings::codegen::UnionTypes::NodeOrString;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
-use dom::bindings::num::Finite;
-use dom::bindings::refcounted::{Trusted, TrustedPromise};
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
-use dom::bindings::str::{DOMString, USVString};
-use dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
-use dom::bindings::xmlname::XMLName::InvalidXMLName;
-use dom::closeevent::CloseEvent;
-use dom::comment::Comment;
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::customelementregistry::CustomElementDefinition;
-use dom::customevent::CustomEvent;
-use dom::documentfragment::DocumentFragment;
-use dom::documenttype::DocumentType;
-use dom::domimplementation::DOMImplementation;
-use dom::element::{Element, ElementCreator, ElementPerformFullscreenEnter, ElementPerformFullscreenExit};
-use dom::element::CustomElementCreationMode;
-use dom::errorevent::ErrorEvent;
-use dom::event::{Event, EventBubbles, EventCancelable, EventDefault, EventStatus};
-use dom::eventtarget::EventTarget;
-use dom::focusevent::FocusEvent;
-use dom::globalscope::GlobalScope;
-use dom::hashchangeevent::HashChangeEvent;
-use dom::htmlanchorelement::HTMLAnchorElement;
-use dom::htmlareaelement::HTMLAreaElement;
-use dom::htmlbaseelement::HTMLBaseElement;
-use dom::htmlbodyelement::HTMLBodyElement;
-use dom::htmlcollection::{CollectionFilter, HTMLCollection};
-use dom::htmlelement::HTMLElement;
-use dom::htmlembedelement::HTMLEmbedElement;
-use dom::htmlformelement::{FormControl, FormControlElementHelpers, HTMLFormElement};
-use dom::htmlheadelement::HTMLHeadElement;
-use dom::htmlhtmlelement::HTMLHtmlElement;
-use dom::htmliframeelement::HTMLIFrameElement;
-use dom::htmlimageelement::HTMLImageElement;
-use dom::htmlmetaelement::HTMLMetaElement;
-use dom::htmlscriptelement::{HTMLScriptElement, ScriptResult};
-use dom::htmltitleelement::HTMLTitleElement;
-use dom::keyboardevent::KeyboardEvent;
-use dom::location::Location;
-use dom::messageevent::MessageEvent;
-use dom::mouseevent::MouseEvent;
-use dom::node::{self, CloneChildrenFlag, document_from_node, window_from_node};
-use dom::node::{Node, NodeDamage, NodeFlags, LayoutNodeHelpers};
-use dom::node::VecPreOrderInsertionHelper;
-use dom::nodeiterator::NodeIterator;
-use dom::nodelist::NodeList;
-use dom::pagetransitionevent::PageTransitionEvent;
-use dom::popstateevent::PopStateEvent;
-use dom::processinginstruction::ProcessingInstruction;
-use dom::progressevent::ProgressEvent;
-use dom::promise::Promise;
-use dom::range::Range;
-use dom::servoparser::ServoParser;
-use dom::storageevent::StorageEvent;
-use dom::stylesheetlist::StyleSheetList;
-use dom::text::Text;
-use dom::touch::Touch;
-use dom::touchevent::TouchEvent;
-use dom::touchlist::TouchList;
-use dom::treewalker::TreeWalker;
-use dom::uievent::UIEvent;
-use dom::virtualmethods::vtable_for;
-use dom::webglcontextevent::WebGLContextEvent;
-use dom::window::{ReflowReason, Window};
-use dom::windowproxy::WindowProxy;
+use crate::document_loader::{DocumentLoader, LoadType};
+use crate::dom::activation::{ActivationSource, synthetic_click_activation};
+use crate::dom::attr::Attr;
+use crate::dom::beforeunloadevent::BeforeUnloadEvent;
+use crate::dom::bindings::callback::ExceptionHandling;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventBinding::BeforeUnloadEventMethods;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState, ElementCreationOptions};
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementBinding::HTMLIFrameElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter;
+use crate::dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceMethods;
+use crate::dom::bindings::codegen::Bindings::TouchBinding::TouchMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::{FrameRequestCallback, ScrollBehavior, WindowMethods};
+use crate::dom::bindings::codegen::UnionTypes::NodeOrString;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
+use crate::dom::bindings::xmlname::XMLName::InvalidXMLName;
+use crate::dom::closeevent::CloseEvent;
+use crate::dom::comment::Comment;
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::customelementregistry::CustomElementDefinition;
+use crate::dom::customevent::CustomEvent;
+use crate::dom::documentfragment::DocumentFragment;
+use crate::dom::documenttype::DocumentType;
+use crate::dom::domimplementation::DOMImplementation;
+use crate::dom::element::{Element, ElementCreator, ElementPerformFullscreenEnter, ElementPerformFullscreenExit};
+use crate::dom::element::CustomElementCreationMode;
+use crate::dom::errorevent::ErrorEvent;
+use crate::dom::event::{Event, EventBubbles, EventCancelable, EventDefault, EventStatus};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::focusevent::FocusEvent;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::hashchangeevent::HashChangeEvent;
+use crate::dom::htmlanchorelement::HTMLAnchorElement;
+use crate::dom::htmlareaelement::HTMLAreaElement;
+use crate::dom::htmlbaseelement::HTMLBaseElement;
+use crate::dom::htmlbodyelement::HTMLBodyElement;
+use crate::dom::htmlcollection::{CollectionFilter, HTMLCollection};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlembedelement::HTMLEmbedElement;
+use crate::dom::htmlformelement::{FormControl, FormControlElementHelpers, HTMLFormElement};
+use crate::dom::htmlheadelement::HTMLHeadElement;
+use crate::dom::htmlhtmlelement::HTMLHtmlElement;
+use crate::dom::htmliframeelement::HTMLIFrameElement;
+use crate::dom::htmlimageelement::HTMLImageElement;
+use crate::dom::htmlmetaelement::HTMLMetaElement;
+use crate::dom::htmlscriptelement::{HTMLScriptElement, ScriptResult};
+use crate::dom::htmltitleelement::HTMLTitleElement;
+use crate::dom::keyboardevent::KeyboardEvent;
+use crate::dom::location::Location;
+use crate::dom::messageevent::MessageEvent;
+use crate::dom::mouseevent::MouseEvent;
+use crate::dom::node::{self, CloneChildrenFlag, document_from_node, window_from_node};
+use crate::dom::node::{Node, NodeDamage, NodeFlags, LayoutNodeHelpers};
+use crate::dom::node::VecPreOrderInsertionHelper;
+use crate::dom::nodeiterator::NodeIterator;
+use crate::dom::nodelist::NodeList;
+use crate::dom::pagetransitionevent::PageTransitionEvent;
+use crate::dom::popstateevent::PopStateEvent;
+use crate::dom::processinginstruction::ProcessingInstruction;
+use crate::dom::progressevent::ProgressEvent;
+use crate::dom::promise::Promise;
+use crate::dom::range::Range;
+use crate::dom::servoparser::ServoParser;
+use crate::dom::storageevent::StorageEvent;
+use crate::dom::stylesheetlist::StyleSheetList;
+use crate::dom::text::Text;
+use crate::dom::touch::Touch;
+use crate::dom::touchevent::TouchEvent;
+use crate::dom::touchlist::TouchList;
+use crate::dom::treewalker::TreeWalker;
+use crate::dom::uievent::UIEvent;
+use crate::dom::virtualmethods::vtable_for;
+use crate::dom::webglcontextevent::WebGLContextEvent;
+use crate::dom::window::{ReflowReason, Window};
+use crate::dom::windowproxy::WindowProxy;
use dom_struct::dom_struct;
use embedder_traits::EmbedderMsg;
use encoding_rs::{Encoding, UTF_8};
use euclid::Point2D;
-use fetch::FetchCanceller;
+use crate::fetch::FetchCanceller;
use html5ever::{LocalName, Namespace, QualName};
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcSender};
@@ -114,8 +114,8 @@ use profile_traits::ipc as profile_ipc;
use profile_traits::time::{TimerMetadata, TimerMetadataFrameType, TimerMetadataReflowType};
use ref_slice::ref_slice;
use script_layout_interface::message::{Msg, NodesFromPointQueryType, QueryMsg, ReflowGoal};
-use script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
-use script_thread::{MainThreadScriptMsg, ScriptThread};
+use crate::script_runtime::{CommonScriptMsg, ScriptThreadEventCategory};
+use crate::script_thread::{MainThreadScriptMsg, ScriptThread};
use script_traits::{AnimationState, DocumentActivity, MouseButton, MouseEventType};
use script_traits::{MsDuration, ScriptMsg, TouchEventType, TouchId, UntrustedNodeAddress};
use servo_arc::Arc;
@@ -141,9 +141,9 @@ use style::shared_lock::{SharedRwLock as StyleSharedRwLock, SharedRwLockReadGuar
use style::str::{split_html_space_chars, str_join};
use style::stylesheet_set::DocumentStylesheetSet;
use style::stylesheets::{CssRule, Stylesheet, Origin, OriginSet};
-use task_source::{TaskSource, TaskSourceName};
+use crate::task_source::{TaskSource, TaskSourceName};
use time;
-use timers::OneshotTimerCallback;
+use crate::timers::OneshotTimerCallback;
use url::Host;
use url::percent_encoding::percent_decode;
diff --git a/components/script/dom/documentfragment.rs b/components/script/dom/documentfragment.rs
index 444398700bc..43b7a8d4c5a 100644
--- a/components/script/dom/documentfragment.rs
+++ b/components/script/dom/documentfragment.rs
@@ -2,20 +2,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DocumentFragmentBinding;
-use dom::bindings::codegen::Bindings::DocumentFragmentBinding::DocumentFragmentMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::codegen::UnionTypes::NodeOrString;
-use dom::bindings::error::{ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::Element;
-use dom::htmlcollection::HTMLCollection;
-use dom::node::{Node, window_from_node};
-use dom::nodelist::NodeList;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::DocumentFragmentBinding;
+use crate::dom::bindings::codegen::Bindings::DocumentFragmentBinding::DocumentFragmentMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::codegen::UnionTypes::NodeOrString;
+use crate::dom::bindings::error::{ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::Element;
+use crate::dom::htmlcollection::HTMLCollection;
+use crate::dom::node::{Node, window_from_node};
+use crate::dom::nodelist::NodeList;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/documenttype.rs b/components/script/dom/documenttype.rs
index 007790abe4d..9ae3c05557b 100644
--- a/components/script/dom/documenttype.rs
+++ b/components/script/dom/documenttype.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DocumentTypeBinding;
-use dom::bindings::codegen::Bindings::DocumentTypeBinding::DocumentTypeMethods;
-use dom::bindings::codegen::UnionTypes::NodeOrString;
-use dom::bindings::error::ErrorResult;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::DocumentTypeBinding;
+use crate::dom::bindings::codegen::Bindings::DocumentTypeBinding::DocumentTypeMethods;
+use crate::dom::bindings::codegen::UnionTypes::NodeOrString;
+use crate::dom::bindings::error::ErrorResult;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
// https://dom.spec.whatwg.org/#documenttype
diff --git a/components/script/dom/domexception.rs b/components/script/dom/domexception.rs
index 92debdc825e..623a5b3adf2 100644
--- a/components/script/dom/domexception.rs
+++ b/components/script/dom/domexception.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DOMExceptionBinding;
-use dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionConstants;
-use dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding;
+use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionConstants;
+use crate::dom::bindings::codegen::Bindings::DOMExceptionBinding::DOMExceptionMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
#[repr(u16)]
diff --git a/components/script/dom/domimplementation.rs b/components/script/dom/domimplementation.rs
index 8936cc8b391..6ebc5b6fe08 100644
--- a/components/script/dom/domimplementation.rs
+++ b/components/script/dom/domimplementation.rs
@@ -2,27 +2,27 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use document_loader::DocumentLoader;
-use dom::bindings::codegen::Bindings::DOMImplementationBinding;
-use dom::bindings::codegen::Bindings::DOMImplementationBinding::DOMImplementationMethods;
-use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, ElementCreationOptions};
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::bindings::xmlname::{namespace_from_domstring, validate_qualified_name};
-use dom::document::{Document, HasBrowsingContext, IsHTMLDocument};
-use dom::document::DocumentSource;
-use dom::documenttype::DocumentType;
-use dom::htmlbodyelement::HTMLBodyElement;
-use dom::htmlheadelement::HTMLHeadElement;
-use dom::htmlhtmlelement::HTMLHtmlElement;
-use dom::htmltitleelement::HTMLTitleElement;
-use dom::node::Node;
-use dom::text::Text;
-use dom::xmldocument::XMLDocument;
+use crate::document_loader::DocumentLoader;
+use crate::dom::bindings::codegen::Bindings::DOMImplementationBinding;
+use crate::dom::bindings::codegen::Bindings::DOMImplementationBinding::DOMImplementationMethods;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, ElementCreationOptions};
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::xmlname::{namespace_from_domstring, validate_qualified_name};
+use crate::dom::document::{Document, HasBrowsingContext, IsHTMLDocument};
+use crate::dom::document::DocumentSource;
+use crate::dom::documenttype::DocumentType;
+use crate::dom::htmlbodyelement::HTMLBodyElement;
+use crate::dom::htmlheadelement::HTMLHeadElement;
+use crate::dom::htmlhtmlelement::HTMLHtmlElement;
+use crate::dom::htmltitleelement::HTMLTitleElement;
+use crate::dom::node::Node;
+use crate::dom::text::Text;
+use crate::dom::xmldocument::XMLDocument;
use dom_struct::dom_struct;
use mime;
use script_traits::DocumentActivity;
diff --git a/components/script/dom/dommatrix.rs b/components/script/dom/dommatrix.rs
index 6e6a2098774..2baf094e869 100644
--- a/components/script/dom/dommatrix.rs
+++ b/components/script/dom/dommatrix.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DOMMatrixBinding::{Wrap, DOMMatrixMethods, DOMMatrixInit};
-use dom::bindings::codegen::Bindings::DOMMatrixReadOnlyBinding::DOMMatrixReadOnlyMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::dommatrixreadonly::{dommatrixinit_to_matrix, DOMMatrixReadOnly, entries_to_matrix};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::DOMMatrixBinding::{Wrap, DOMMatrixMethods, DOMMatrixInit};
+use crate::dom::bindings::codegen::Bindings::DOMMatrixReadOnlyBinding::DOMMatrixReadOnlyMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::dommatrixreadonly::{dommatrixinit_to_matrix, DOMMatrixReadOnly, entries_to_matrix};
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use euclid::Transform3D;
use js::rust::CustomAutoRooterGuard;
diff --git a/components/script/dom/dommatrixreadonly.rs b/components/script/dom/dommatrixreadonly.rs
index a698ba81111..65278b1f7d1 100644
--- a/components/script/dom/dommatrixreadonly.rs
+++ b/components/script/dom/dommatrixreadonly.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::DOMMatrixBinding::{DOMMatrixInit, DOMMatrixMethods};
-use dom::bindings::codegen::Bindings::DOMMatrixReadOnlyBinding::{DOMMatrixReadOnlyMethods, Wrap};
-use dom::bindings::codegen::Bindings::DOMPointBinding::DOMPointInit;
-use dom::bindings::error;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
-use dom::bindings::root::DomRoot;
-use dom::dommatrix::DOMMatrix;
-use dom::dompoint::DOMPoint;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::DOMMatrixBinding::{DOMMatrixInit, DOMMatrixMethods};
+use crate::dom::bindings::codegen::Bindings::DOMMatrixReadOnlyBinding::{DOMMatrixReadOnlyMethods, Wrap};
+use crate::dom::bindings::codegen::Bindings::DOMPointBinding::DOMPointInit;
+use crate::dom::bindings::error;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::dommatrix::DOMMatrix;
+use crate::dom::dompoint::DOMPoint;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use euclid::{Transform3D, Angle};
use js::jsapi::{JSObject, JSContext};
diff --git a/components/script/dom/domparser.rs b/components/script/dom/domparser.rs
index d2b5ac80b95..334137499e7 100644
--- a/components/script/dom/domparser.rs
+++ b/components/script/dom/domparser.rs
@@ -2,23 +2,23 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use document_loader::DocumentLoader;
-use dom::bindings::codegen::Bindings::DOMParserBinding;
-use dom::bindings::codegen::Bindings::DOMParserBinding::DOMParserMethods;
-use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Application_xhtml_xml;
-use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Application_xml;
-use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Text_html;
-use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Text_xml;
-use dom::bindings::codegen::Bindings::DocumentBinding::DocumentReadyState;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::document::{Document, HasBrowsingContext, IsHTMLDocument};
-use dom::document::DocumentSource;
-use dom::servoparser::ServoParser;
-use dom::window::Window;
+use crate::document_loader::DocumentLoader;
+use crate::dom::bindings::codegen::Bindings::DOMParserBinding;
+use crate::dom::bindings::codegen::Bindings::DOMParserBinding::DOMParserMethods;
+use crate::dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Application_xhtml_xml;
+use crate::dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Application_xml;
+use crate::dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Text_html;
+use crate::dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::Text_xml;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentReadyState;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::{Document, HasBrowsingContext, IsHTMLDocument};
+use crate::dom::document::DocumentSource;
+use crate::dom::servoparser::ServoParser;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use script_traits::DocumentActivity;
diff --git a/components/script/dom/dompoint.rs b/components/script/dom/dompoint.rs
index ec0e96062bd..456153b6504 100644
--- a/components/script/dom/dompoint.rs
+++ b/components/script/dom/dompoint.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOMPointMethods, Wrap};
-use dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::DOMPointReadOnlyMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::dompointreadonly::{DOMPointReadOnly, DOMPointWriteMethods};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOMPointMethods, Wrap};
+use crate::dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::DOMPointReadOnlyMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::dompointreadonly::{DOMPointReadOnly, DOMPointWriteMethods};
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
// http://dev.w3.org/fxtf/geometry/Overview.html#dompoint
diff --git a/components/script/dom/dompointreadonly.rs b/components/script/dom/dompointreadonly.rs
index 28b3fea458f..ea6414aa186 100644
--- a/components/script/dom/dompointreadonly.rs
+++ b/components/script/dom/dompointreadonly.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::{DOMPointReadOnlyMethods, Wrap};
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::DOMPointReadOnlyBinding::{DOMPointReadOnlyMethods, Wrap};
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use std::cell::Cell;
diff --git a/components/script/dom/domquad.rs b/components/script/dom/domquad.rs
index b4270898d3f..3d0cb09b733 100644
--- a/components/script/dom/domquad.rs
+++ b/components/script/dom/domquad.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOMPointMethods};
-use dom::bindings::codegen::Bindings::DOMQuadBinding::{DOMQuadInit, DOMQuadMethods, Wrap};
-use dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectInit;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::dompoint::DOMPoint;
-use dom::domrect::DOMRect;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::DOMPointBinding::{DOMPointInit, DOMPointMethods};
+use crate::dom::bindings::codegen::Bindings::DOMQuadBinding::{DOMQuadInit, DOMQuadMethods, Wrap};
+use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectInit;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::dompoint::DOMPoint;
+use crate::dom::domrect::DOMRect;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
// https://drafts.fxtf.org/geometry/#DOMQuad
diff --git a/components/script/dom/domrect.rs b/components/script/dom/domrect.rs
index cb5b3caadb9..6b149d171c0 100644
--- a/components/script/dom/domrect.rs
+++ b/components/script/dom/domrect.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DOMRectBinding;
-use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods;
-use dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectReadOnlyMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::domrectreadonly::DOMRectReadOnly;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::DOMRectBinding;
+use crate::dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods;
+use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::DOMRectReadOnlyMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::domrectreadonly::DOMRectReadOnly;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/domrectreadonly.rs b/components/script/dom/domrectreadonly.rs
index 86eeab0b2fd..e1bb8252b8d 100644
--- a/components/script/dom/domrectreadonly.rs
+++ b/components/script/dom/domrectreadonly.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::{DOMRectReadOnlyMethods, Wrap};
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::DOMRectReadOnlyBinding::{DOMRectReadOnlyMethods, Wrap};
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use std::cell::Cell;
diff --git a/components/script/dom/domstringmap.rs b/components/script/dom/domstringmap.rs
index 514781c9a1d..d62b4fd49f9 100644
--- a/components/script/dom/domstringmap.rs
+++ b/components/script/dom/domstringmap.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DOMStringMapBinding;
-use dom::bindings::codegen::Bindings::DOMStringMapBinding::DOMStringMapMethods;
-use dom::bindings::error::ErrorResult;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::htmlelement::HTMLElement;
-use dom::node::window_from_node;
+use crate::dom::bindings::codegen::Bindings::DOMStringMapBinding;
+use crate::dom::bindings::codegen::Bindings::DOMStringMapBinding::DOMStringMapMethods;
+use crate::dom::bindings::error::ErrorResult;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::window_from_node;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/domtokenlist.rs b/components/script/dom/domtokenlist.rs
index f1244ab4936..4c74b69d3a8 100644
--- a/components/script/dom/domtokenlist.rs
+++ b/components/script/dom/domtokenlist.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::DOMTokenListBinding;
-use dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListMethods;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::element::Element;
-use dom::node::window_from_node;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::DOMTokenListBinding;
+use crate::dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListMethods;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::element::Element;
+use crate::dom::node::window_from_node;
use dom_struct::dom_struct;
use html5ever::LocalName;
use servo_atoms::Atom;
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 4144bb972ca..0cbf11fab78 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -5,76 +5,76 @@
//! Element nodes.
use devtools_traits::AttrInfo;
-use dom::activation::Activatable;
-use dom::attr::{Attr, AttrHelpersForLayout};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
-use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
-use dom::bindings::codegen::Bindings::ElementBinding;
-use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::FunctionBinding::Function;
-use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::{ScrollBehavior, ScrollToOptions};
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::codegen::UnionTypes::NodeOrString;
-use dom::bindings::conversions::DerivedFrom;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
-use dom::bindings::refcounted::{Trusted, TrustedPromise};
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
-use dom::bindings::xmlname::XMLName::InvalidXMLName;
-use dom::characterdata::CharacterData;
-use dom::create::create_element;
-use dom::customelementregistry::{CallbackReaction, CustomElementDefinition, CustomElementReaction};
-use dom::document::{Document, LayoutDocumentHelpers};
-use dom::documentfragment::DocumentFragment;
-use dom::domrect::DOMRect;
-use dom::domtokenlist::DOMTokenList;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::htmlanchorelement::HTMLAnchorElement;
-use dom::htmlbodyelement::{HTMLBodyElement, HTMLBodyElementLayoutHelpers};
-use dom::htmlbuttonelement::HTMLButtonElement;
-use dom::htmlcanvaselement::{HTMLCanvasElement, LayoutHTMLCanvasElementHelpers};
-use dom::htmlcollection::HTMLCollection;
-use dom::htmlelement::HTMLElement;
-use dom::htmlfieldsetelement::HTMLFieldSetElement;
-use dom::htmlfontelement::{HTMLFontElement, HTMLFontElementLayoutHelpers};
-use dom::htmlformelement::FormControlElementHelpers;
-use dom::htmlhrelement::{HTMLHRElement, HTMLHRLayoutHelpers};
-use dom::htmliframeelement::{HTMLIFrameElement, HTMLIFrameElementLayoutMethods};
-use dom::htmlimageelement::{HTMLImageElement, LayoutHTMLImageElementHelpers};
-use dom::htmlinputelement::{HTMLInputElement, LayoutHTMLInputElementHelpers};
-use dom::htmllabelelement::HTMLLabelElement;
-use dom::htmllegendelement::HTMLLegendElement;
-use dom::htmllinkelement::HTMLLinkElement;
-use dom::htmlobjectelement::HTMLObjectElement;
-use dom::htmloptgroupelement::HTMLOptGroupElement;
-use dom::htmlselectelement::HTMLSelectElement;
-use dom::htmlstyleelement::HTMLStyleElement;
-use dom::htmltablecellelement::{HTMLTableCellElement, HTMLTableCellElementLayoutHelpers};
-use dom::htmltableelement::{HTMLTableElement, HTMLTableElementLayoutHelpers};
-use dom::htmltablerowelement::{HTMLTableRowElement, HTMLTableRowElementLayoutHelpers};
-use dom::htmltablesectionelement::{HTMLTableSectionElement, HTMLTableSectionElementLayoutHelpers};
-use dom::htmltemplateelement::HTMLTemplateElement;
-use dom::htmltextareaelement::{HTMLTextAreaElement, LayoutHTMLTextAreaElementHelpers};
-use dom::mutationobserver::{Mutation, MutationObserver};
-use dom::namednodemap::NamedNodeMap;
-use dom::node::{ChildrenMutation, LayoutNodeHelpers, Node};
-use dom::node::{NodeDamage, NodeFlags, UnbindContext};
-use dom::node::{document_from_node, window_from_node};
-use dom::nodelist::NodeList;
-use dom::promise::Promise;
-use dom::servoparser::ServoParser;
-use dom::text::Text;
-use dom::validation::Validatable;
-use dom::virtualmethods::{VirtualMethods, vtable_for};
-use dom::window::ReflowReason;
+use crate::dom::activation::Activatable;
+use crate::dom::attr::{Attr, AttrHelpersForLayout};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
+use crate::dom::bindings::codegen::Bindings::ElementBinding;
+use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function;
+use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::{ScrollBehavior, ScrollToOptions};
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::codegen::UnionTypes::NodeOrString;
+use crate::dom::bindings::conversions::DerivedFrom;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
+use crate::dom::bindings::refcounted::{Trusted, TrustedPromise};
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::xmlname::{namespace_from_domstring, validate_and_extract, xml_name_type};
+use crate::dom::bindings::xmlname::XMLName::InvalidXMLName;
+use crate::dom::characterdata::CharacterData;
+use crate::dom::create::create_element;
+use crate::dom::customelementregistry::{CallbackReaction, CustomElementDefinition, CustomElementReaction};
+use crate::dom::document::{Document, LayoutDocumentHelpers};
+use crate::dom::documentfragment::DocumentFragment;
+use crate::dom::domrect::DOMRect;
+use crate::dom::domtokenlist::DOMTokenList;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlanchorelement::HTMLAnchorElement;
+use crate::dom::htmlbodyelement::{HTMLBodyElement, HTMLBodyElementLayoutHelpers};
+use crate::dom::htmlbuttonelement::HTMLButtonElement;
+use crate::dom::htmlcanvaselement::{HTMLCanvasElement, LayoutHTMLCanvasElementHelpers};
+use crate::dom::htmlcollection::HTMLCollection;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
+use crate::dom::htmlfontelement::{HTMLFontElement, HTMLFontElementLayoutHelpers};
+use crate::dom::htmlformelement::FormControlElementHelpers;
+use crate::dom::htmlhrelement::{HTMLHRElement, HTMLHRLayoutHelpers};
+use crate::dom::htmliframeelement::{HTMLIFrameElement, HTMLIFrameElementLayoutMethods};
+use crate::dom::htmlimageelement::{HTMLImageElement, LayoutHTMLImageElementHelpers};
+use crate::dom::htmlinputelement::{HTMLInputElement, LayoutHTMLInputElementHelpers};
+use crate::dom::htmllabelelement::HTMLLabelElement;
+use crate::dom::htmllegendelement::HTMLLegendElement;
+use crate::dom::htmllinkelement::HTMLLinkElement;
+use crate::dom::htmlobjectelement::HTMLObjectElement;
+use crate::dom::htmloptgroupelement::HTMLOptGroupElement;
+use crate::dom::htmlselectelement::HTMLSelectElement;
+use crate::dom::htmlstyleelement::HTMLStyleElement;
+use crate::dom::htmltablecellelement::{HTMLTableCellElement, HTMLTableCellElementLayoutHelpers};
+use crate::dom::htmltableelement::{HTMLTableElement, HTMLTableElementLayoutHelpers};
+use crate::dom::htmltablerowelement::{HTMLTableRowElement, HTMLTableRowElementLayoutHelpers};
+use crate::dom::htmltablesectionelement::{HTMLTableSectionElement, HTMLTableSectionElementLayoutHelpers};
+use crate::dom::htmltemplateelement::HTMLTemplateElement;
+use crate::dom::htmltextareaelement::{HTMLTextAreaElement, LayoutHTMLTextAreaElementHelpers};
+use crate::dom::mutationobserver::{Mutation, MutationObserver};
+use crate::dom::namednodemap::NamedNodeMap;
+use crate::dom::node::{ChildrenMutation, LayoutNodeHelpers, Node};
+use crate::dom::node::{NodeDamage, NodeFlags, UnbindContext};
+use crate::dom::node::{document_from_node, window_from_node};
+use crate::dom::nodelist::NodeList;
+use crate::dom::promise::Promise;
+use crate::dom::servoparser::ServoParser;
+use crate::dom::text::Text;
+use crate::dom::validation::Validatable;
+use crate::dom::virtualmethods::{VirtualMethods, vtable_for};
+use crate::dom::window::ReflowReason;
use dom_struct::dom_struct;
use html5ever::{Prefix, LocalName, Namespace, QualName};
use html5ever::serialize;
@@ -87,7 +87,7 @@ use msg::constellation_msg::InputMethodType;
use net_traits::request::CorsSettings;
use ref_filter_map::ref_filter_map;
use script_layout_interface::message::ReflowGoal;
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use selectors::Element as SelectorsElement;
use selectors::attr::{AttrSelectorOperation, NamespaceConstraint, CaseSensitivity};
use selectors::matching::{ElementSelectorFlags, MatchingContext};
@@ -119,8 +119,8 @@ use style::shared_lock::{SharedRwLock, Locked};
use style::thread_state;
use style::values::{CSSFloat, Either};
use style::values::{specified, computed};
-use stylesheet_loader::StylesheetOwner;
-use task::TaskOnce;
+use crate::stylesheet_loader::StylesheetOwner;
+use crate::task::TaskOnce;
use xml5ever::serialize as xmlSerialize;
use xml5ever::serialize::SerializeOpts as XmlSerializeOpts;
use xml5ever::serialize::TraversalScope as XmlTraversalScope;
@@ -502,7 +502,7 @@ pub trait LayoutElementHelpers {
unsafe fn get_classes_for_layout(&self) -> Option<&'static [Atom]>;
#[allow(unsafe_code)]
- unsafe fn synthesize_presentational_hints_for_legacy_attributes<V>(&self, &mut V)
+ unsafe fn synthesize_presentational_hints_for_legacy_attributes<V>(&self, _: &mut V)
where
V: Push<ApplicableDeclarationBlock>;
#[allow(unsafe_code)]
diff --git a/components/script/dom/errorevent.rs b/components/script/dom/errorevent.rs
index 3056175f89f..f74b770557e 100644
--- a/components/script/dom/errorevent.rs
+++ b/components/script/dom/errorevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::ErrorEventBinding;
-use dom::bindings::codegen::Bindings::ErrorEventBinding::ErrorEventMethods;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::RootedTraceableBox;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::ErrorEventBinding;
+use crate::dom::bindings::codegen::Bindings::ErrorEventBinding::ErrorEventMethods;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext};
use js::jsval::JSVal;
diff --git a/components/script/dom/event.rs b/components/script/dom/event.rs
index 46150cee78c..7999eed6423 100644
--- a/components/script/dom/event.rs
+++ b/components/script/dom/event.rs
@@ -3,27 +3,27 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{TimelineMarker, TimelineMarkerType};
-use dom::bindings::callback::ExceptionHandling;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::EventBinding;
-use dom::bindings::codegen::Bindings::EventBinding::{EventConstants, EventMethods};
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::eventtarget::{CompiledEventListener, EventTarget, ListenerPhase};
-use dom::globalscope::GlobalScope;
-use dom::node::Node;
-use dom::virtualmethods::vtable_for;
-use dom::window::Window;
+use crate::dom::bindings::callback::ExceptionHandling;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::EventBinding;
+use crate::dom::bindings::codegen::Bindings::EventBinding::{EventConstants, EventMethods};
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::eventtarget::{CompiledEventListener, EventTarget, ListenerPhase};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::node::Node;
+use crate::dom::virtualmethods::vtable_for;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
use std::cell::Cell;
use std::default::Default;
-use task::TaskOnce;
+use crate::task::TaskOnce;
use time;
#[dom_struct]
diff --git a/components/script/dom/eventsource.rs b/components/script/dom/eventsource.rs
index 208d8aee8ed..a1869e108f0 100644
--- a/components/script/dom/eventsource.rs
+++ b/components/script/dom/eventsource.rs
@@ -2,21 +2,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::EventSourceBinding::{EventSourceInit, EventSourceMethods, Wrap};
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::messageevent::MessageEvent;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::EventSourceBinding::{EventSourceInit, EventSourceMethods, Wrap};
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::messageevent::MessageEvent;
use dom_struct::dom_struct;
use euclid::Length;
-use fetch::FetchCanceller;
+use crate::fetch::FetchCanceller;
use headers_ext::ContentType;
use http::header::{self, HeaderName, HeaderValue};
use ipc_channel::ipc;
@@ -29,15 +29,15 @@ use net_traits::{CoreResourceMsg, FetchChannels, FetchMetadata};
use net_traits::{FetchResponseMsg, FetchResponseListener, NetworkError};
use net_traits::request::{CacheMode, CorsSettings, CredentialsMode};
use net_traits::request::{RequestInit, RequestMode};
-use network_listener::{NetworkListener, PreInvoke};
+use crate::network_listener::{NetworkListener, PreInvoke};
use servo_atoms::Atom;
use servo_url::ServoUrl;
use std::cell::Cell;
use std::mem;
use std::str::{Chars, FromStr};
use std::sync::{Arc, Mutex};
-use task_source::{TaskSource, TaskSourceName};
-use timers::OneshotTimerCallback;
+use crate::task_source::{TaskSource, TaskSourceName};
+use crate::timers::OneshotTimerCallback;
use utf8;
diff --git a/components/script/dom/eventtarget.rs b/components/script/dom/eventtarget.rs
index e012f2f13ff..1b03a2ac8ff 100644
--- a/components/script/dom/eventtarget.rs
+++ b/components/script/dom/eventtarget.rs
@@ -2,36 +2,36 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::beforeunloadevent::BeforeUnloadEvent;
-use dom::bindings::callback::{CallbackContainer, ExceptionHandling, CallbackFunction};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventMethods;
-use dom::bindings::codegen::Bindings::ErrorEventBinding::ErrorEventMethods;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
-use dom::bindings::codegen::Bindings::EventHandlerBinding::OnBeforeUnloadEventHandlerNonNull;
-use dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull;
-use dom::bindings::codegen::Bindings::EventListenerBinding::EventListener;
-use dom::bindings::codegen::Bindings::EventTargetBinding::AddEventListenerOptions;
-use dom::bindings::codegen::Bindings::EventTargetBinding::EventListenerOptions;
-use dom::bindings::codegen::Bindings::EventTargetBinding::EventTargetMethods;
-use dom::bindings::codegen::Bindings::EventTargetBinding::Wrap;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::codegen::UnionTypes::AddEventListenerOptionsOrBoolean;
-use dom::bindings::codegen::UnionTypes::EventListenerOptionsOrBoolean;
-use dom::bindings::codegen::UnionTypes::EventOrString;
-use dom::bindings::error::{Error, Fallible, report_pending_exception};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::element::Element;
-use dom::errorevent::ErrorEvent;
-use dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
-use dom::globalscope::GlobalScope;
-use dom::node::document_from_node;
-use dom::virtualmethods::VirtualMethods;
-use dom::window::Window;
+use crate::dom::beforeunloadevent::BeforeUnloadEvent;
+use crate::dom::bindings::callback::{CallbackContainer, ExceptionHandling, CallbackFunction};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BeforeUnloadEventBinding::BeforeUnloadEventMethods;
+use crate::dom::bindings::codegen::Bindings::ErrorEventBinding::ErrorEventMethods;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
+use crate::dom::bindings::codegen::Bindings::EventHandlerBinding::OnBeforeUnloadEventHandlerNonNull;
+use crate::dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull;
+use crate::dom::bindings::codegen::Bindings::EventListenerBinding::EventListener;
+use crate::dom::bindings::codegen::Bindings::EventTargetBinding::AddEventListenerOptions;
+use crate::dom::bindings::codegen::Bindings::EventTargetBinding::EventListenerOptions;
+use crate::dom::bindings::codegen::Bindings::EventTargetBinding::EventTargetMethods;
+use crate::dom::bindings::codegen::Bindings::EventTargetBinding::Wrap;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::codegen::UnionTypes::AddEventListenerOptionsOrBoolean;
+use crate::dom::bindings::codegen::UnionTypes::EventListenerOptionsOrBoolean;
+use crate::dom::bindings::codegen::UnionTypes::EventOrString;
+use crate::dom::bindings::error::{Error, Fallible, report_pending_exception};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::element::Element;
+use crate::dom::errorevent::ErrorEvent;
+use crate::dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::node::document_from_node;
+use crate::dom::virtualmethods::VirtualMethods;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use fnv::FnvHasher;
use js::jsapi::{JS_GetFunctionObject, JSAutoCompartment, JSFunction};
diff --git a/components/script/dom/extendableevent.rs b/components/script/dom/extendableevent.rs
index 4f7462746c2..80d2fb4dd08 100644
--- a/components/script/dom/extendableevent.rs
+++ b/components/script/dom/extendableevent.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::{self, EventMethods};
-use dom::bindings::codegen::Bindings::ExtendableEventBinding;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::event::Event;
-use dom::serviceworkerglobalscope::ServiceWorkerGlobalScope;
+use crate::dom::bindings::codegen::Bindings::EventBinding::{self, EventMethods};
+use crate::dom::bindings::codegen::Bindings::ExtendableEventBinding;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::Event;
+use crate::dom::serviceworkerglobalscope::ServiceWorkerGlobalScope;
use dom_struct::dom_struct;
use js::jsapi::JSContext;
use js::rust::HandleValue;
diff --git a/components/script/dom/extendablemessageevent.rs b/components/script/dom/extendablemessageevent.rs
index 0e3119db1f5..c7b2ce22091 100644
--- a/components/script/dom/extendablemessageevent.rs
+++ b/components/script/dom/extendablemessageevent.rs
@@ -2,19 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::ExtendableMessageEventBinding;
-use dom::bindings::codegen::Bindings::ExtendableMessageEventBinding::ExtendableMessageEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::RootedTraceableBox;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::extendableevent::ExtendableEvent;
-use dom::globalscope::GlobalScope;
-use dom::serviceworkerglobalscope::ServiceWorkerGlobalScope;
+use crate::dom::bindings::codegen::Bindings::ExtendableMessageEventBinding;
+use crate::dom::bindings::codegen::Bindings::ExtendableMessageEventBinding::ExtendableMessageEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::extendableevent::ExtendableEvent;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::serviceworkerglobalscope::ServiceWorkerGlobalScope;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext};
use js::jsval::JSVal;
diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs
index 47fd4920bb6..3046e122417 100644
--- a/components/script/dom/file.rs
+++ b/components/script/dom/file.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::FileBinding;
-use dom::bindings::codegen::Bindings::FileBinding::FileMethods;
-use dom::bindings::codegen::UnionTypes::ArrayBufferOrArrayBufferViewOrBlobOrString;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::blob::{Blob, BlobImpl, blob_parts_to_bytes};
-use dom::globalscope::GlobalScope;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::FileBinding;
+use crate::dom::bindings::codegen::Bindings::FileBinding::FileMethods;
+use crate::dom::bindings::codegen::UnionTypes::ArrayBufferOrArrayBufferViewOrBlobOrString;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::blob::{Blob, BlobImpl, blob_parts_to_bytes};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use net_traits::filemanager_thread::SelectedFile;
use time;
diff --git a/components/script/dom/filelist.rs b/components/script/dom/filelist.rs
index 92d39e5b539..0049f8fca4a 100644
--- a/components/script/dom/filelist.rs
+++ b/components/script/dom/filelist.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::FileListBinding;
-use dom::bindings::codegen::Bindings::FileListBinding::FileListMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::file::File;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::FileListBinding;
+use crate::dom::bindings::codegen::Bindings::FileListBinding::FileListMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::file::File;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use std::slice::Iter;
diff --git a/components/script/dom/filereader.rs b/components/script/dom/filereader.rs
index 69ca537a75b..c5baeede050 100644
--- a/components/script/dom/filereader.rs
+++ b/components/script/dom/filereader.rs
@@ -3,23 +3,23 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use base64;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
-use dom::bindings::codegen::Bindings::FileReaderBinding::{self, FileReaderConstants, FileReaderMethods};
-use dom::bindings::codegen::UnionTypes::StringOrObject;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::RootedTraceableBox;
-use dom::blob::Blob;
-use dom::domexception::{DOMErrorName, DOMException};
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::progressevent::ProgressEvent;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
+use crate::dom::bindings::codegen::Bindings::FileReaderBinding::{self, FileReaderConstants, FileReaderMethods};
+use crate::dom::bindings::codegen::UnionTypes::StringOrObject;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::blob::Blob;
+use crate::dom::domexception::{DOMErrorName, DOMException};
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::progressevent::ProgressEvent;
use dom_struct::dom_struct;
use encoding_rs::{Encoding, UTF_8};
use js::jsapi::Heap;
@@ -34,9 +34,9 @@ use std::cell::Cell;
use std::ptr;
use std::sync::Arc;
use std::thread;
-use task::TaskCanceller;
-use task_source::{TaskSource, TaskSourceName};
-use task_source::file_reading::{FileReadingTask, FileReadingTaskSource};
+use crate::task::TaskCanceller;
+use crate::task_source::{TaskSource, TaskSourceName};
+use crate::task_source::file_reading::{FileReadingTask, FileReadingTaskSource};
#[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)]
pub enum FileReaderFunction {
diff --git a/components/script/dom/filereadersync.rs b/components/script/dom/filereadersync.rs
index 10095db4961..dab475c86ef 100644
--- a/components/script/dom/filereadersync.rs
+++ b/components/script/dom/filereadersync.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
-use dom::bindings::codegen::Bindings::FileReaderSyncBinding::{FileReaderSyncBinding, FileReaderSyncMethods};
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::blob::Blob;
-use dom::filereader::FileReaderSharedFunctionality;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
+use crate::dom::bindings::codegen::Bindings::FileReaderSyncBinding::{FileReaderSyncBinding, FileReaderSyncMethods};
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::blob::Blob;
+use crate::dom::filereader::FileReaderSharedFunctionality;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::{JSContext, JSObject};
use js::typedarray::{ArrayBuffer, CreateWith};
diff --git a/components/script/dom/focusevent.rs b/components/script/dom/focusevent.rs
index ce751df8754..f10f02412ae 100644
--- a/components/script/dom/focusevent.rs
+++ b/components/script/dom/focusevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::FocusEventBinding;
-use dom::bindings::codegen::Bindings::FocusEventBinding::FocusEventMethods;
-use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::event::{EventBubbles, EventCancelable};
-use dom::eventtarget::EventTarget;
-use dom::uievent::UIEvent;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::FocusEventBinding;
+use crate::dom::bindings::codegen::Bindings::FocusEventBinding::FocusEventMethods;
+use crate::dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{EventBubbles, EventCancelable};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::uievent::UIEvent;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use std::default::Default;
diff --git a/components/script/dom/formdata.rs b/components/script/dom/formdata.rs
index 7511941abb9..0bb77306bce 100644
--- a/components/script/dom/formdata.rs
+++ b/components/script/dom/formdata.rs
@@ -2,20 +2,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::FormDataBinding::FormDataMethods;
-use dom::bindings::codegen::Bindings::FormDataBinding::FormDataWrap;
-use dom::bindings::codegen::UnionTypes::FileOrUSVString;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::iterable::Iterable;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::{DOMString, USVString};
-use dom::blob::{Blob, BlobImpl};
-use dom::file::File;
-use dom::globalscope::GlobalScope;
-use dom::htmlformelement::{HTMLFormElement, FormDatumValue, FormDatum};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::FormDataBinding::FormDataMethods;
+use crate::dom::bindings::codegen::Bindings::FormDataBinding::FormDataWrap;
+use crate::dom::bindings::codegen::UnionTypes::FileOrUSVString;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::iterable::Iterable;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::blob::{Blob, BlobImpl};
+use crate::dom::file::File;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlformelement::{HTMLFormElement, FormDatumValue, FormDatum};
use dom_struct::dom_struct;
use html5ever::LocalName;
use std::collections::BTreeMap;
diff --git a/components/script/dom/gainnode.rs b/components/script/dom/gainnode.rs
index 7e2235f5e80..5d8639b2ba8 100644
--- a/components/script/dom/gainnode.rs
+++ b/components/script/dom/gainnode.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audionode::AudioNode;
-use dom::audioparam::AudioParam;
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
-use dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
-use dom::bindings::codegen::Bindings::GainNodeBinding::{self, GainNodeMethods, GainOptions};
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::window::Window;
+use crate::dom::audionode::AudioNode;
+use crate::dom::audioparam::AudioParam;
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
+use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
+use crate::dom::bindings::codegen::Bindings::GainNodeBinding::{self, GainNodeMethods, GainOptions};
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_media::audio::gain_node::GainNodeOptions;
use servo_media::audio::node::AudioNodeInit;
diff --git a/components/script/dom/gamepad.rs b/components/script/dom/gamepad.rs
index d4858de99f8..24177b70bfc 100644
--- a/components/script/dom/gamepad.rs
+++ b/components/script/dom/gamepad.rs
@@ -2,19 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::GamepadBinding;
-use dom::bindings::codegen::Bindings::GamepadBinding::GamepadMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::gamepadbuttonlist::GamepadButtonList;
-use dom::gamepadevent::{GamepadEvent, GamepadEventType};
-use dom::globalscope::GlobalScope;
-use dom::vrpose::VRPose;
+use crate::dom::bindings::codegen::Bindings::GamepadBinding;
+use crate::dom::bindings::codegen::Bindings::GamepadBinding::GamepadMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::gamepadbuttonlist::GamepadButtonList;
+use crate::dom::gamepadevent::{GamepadEvent, GamepadEventType};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::vrpose::VRPose;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext, JSObject};
use js::typedarray::{Float64Array, CreateWith};
diff --git a/components/script/dom/gamepadbutton.rs b/components/script/dom/gamepadbutton.rs
index df28f9e6a8e..8162aefc845 100644
--- a/components/script/dom/gamepadbutton.rs
+++ b/components/script/dom/gamepadbutton.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::GamepadButtonBinding;
-use dom::bindings::codegen::Bindings::GamepadButtonBinding::GamepadButtonMethods;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::GamepadButtonBinding;
+use crate::dom::bindings::codegen::Bindings::GamepadButtonBinding::GamepadButtonMethods;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use std::cell::Cell;
diff --git a/components/script/dom/gamepadbuttonlist.rs b/components/script/dom/gamepadbuttonlist.rs
index 22e79c98100..87608789fed 100644
--- a/components/script/dom/gamepadbuttonlist.rs
+++ b/components/script/dom/gamepadbuttonlist.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::GamepadButtonListBinding;
-use dom::bindings::codegen::Bindings::GamepadButtonListBinding::GamepadButtonListMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, RootedReference};
-use dom::gamepadbutton::GamepadButton;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::GamepadButtonListBinding;
+use crate::dom::bindings::codegen::Bindings::GamepadButtonListBinding::GamepadButtonListMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, RootedReference};
+use crate::dom::gamepadbutton::GamepadButton;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use webvr_traits::WebVRGamepadButton;
diff --git a/components/script/dom/gamepadevent.rs b/components/script/dom/gamepadevent.rs
index b8bd371f088..e25b1de6731 100644
--- a/components/script/dom/gamepadevent.rs
+++ b/components/script/dom/gamepadevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::GamepadEventBinding;
-use dom::bindings::codegen::Bindings::GamepadEventBinding::GamepadEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::event::Event;
-use dom::gamepad::Gamepad;
-use dom::globalscope::GlobalScope;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::GamepadEventBinding;
+use crate::dom::bindings::codegen::Bindings::GamepadEventBinding::GamepadEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::Event;
+use crate::dom::gamepad::Gamepad;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/gamepadlist.rs b/components/script/dom/gamepadlist.rs
index 1e48e7560ea..f207f8316a0 100644
--- a/components/script/dom/gamepadlist.rs
+++ b/components/script/dom/gamepadlist.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::GamepadListBinding;
-use dom::bindings::codegen::Bindings::GamepadListBinding::GamepadListMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::gamepad::Gamepad;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::GamepadListBinding;
+use crate::dom::bindings::codegen::Bindings::GamepadListBinding::GamepadListMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::gamepad::Gamepad;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
// https://www.w3.org/TR/gamepad/
diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs
index a3e879326bc..f974e2f4d50 100644
--- a/components/script/dom/globalscope.rs
+++ b/components/script/dom/globalscope.rs
@@ -3,28 +3,28 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::EventSourceBinding::EventSourceBinding::EventSourceMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::codegen::Bindings::WorkerGlobalScopeBinding::WorkerGlobalScopeMethods;
-use dom::bindings::conversions::root_from_object;
-use dom::bindings::error::{ErrorInfo, report_pending_exception};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::settings_stack::{AutoEntryScript, entry_global, incumbent_global};
-use dom::bindings::str::DOMString;
-use dom::bindings::weakref::DOMTracker;
-use dom::crypto::Crypto;
-use dom::dedicatedworkerglobalscope::DedicatedWorkerGlobalScope;
-use dom::errorevent::ErrorEvent;
-use dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
-use dom::eventsource::EventSource;
-use dom::eventtarget::EventTarget;
-use dom::performance::Performance;
-use dom::window::Window;
-use dom::workerglobalscope::WorkerGlobalScope;
-use dom::workletglobalscope::WorkletGlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::EventSourceBinding::EventSourceBinding::EventSourceMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::codegen::Bindings::WorkerGlobalScopeBinding::WorkerGlobalScopeMethods;
+use crate::dom::bindings::conversions::root_from_object;
+use crate::dom::bindings::error::{ErrorInfo, report_pending_exception};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::settings_stack::{AutoEntryScript, entry_global, incumbent_global};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::weakref::DOMTracker;
+use crate::dom::crypto::Crypto;
+use crate::dom::dedicatedworkerglobalscope::DedicatedWorkerGlobalScope;
+use crate::dom::errorevent::ErrorEvent;
+use crate::dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
+use crate::dom::eventsource::EventSource;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::performance::Performance;
+use crate::dom::window::Window;
+use crate::dom::workerglobalscope::WorkerGlobalScope;
+use crate::dom::workletglobalscope::WorkletGlobalScope;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL};
@@ -38,12 +38,12 @@ use js::rust::{CompileOptionsWrapper, Runtime, get_object_class};
use js::rust::{HandleValue, MutableHandleValue};
use js::rust::wrappers::Evaluate2;
use libc;
-use microtask::{Microtask, MicrotaskQueue};
+use crate::microtask::{Microtask, MicrotaskQueue};
use msg::constellation_msg::PipelineId;
use net_traits::{CoreResourceThread, ResourceThreads, IpcSend};
use profile_traits::{mem, time};
-use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
-use script_thread::{MainThreadScriptChan, ScriptThread};
+use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort};
+use crate::script_thread::{MainThreadScriptChan, ScriptThread};
use script_traits::{MsDuration, ScriptToConstellationChan, TimerEvent};
use script_traits::{TimerEventId, TimerSchedulerMsg, TimerSource};
use servo_url::{MutableOrigin, ServoUrl};
@@ -54,17 +54,17 @@ use std::ffi::CString;
use std::rc::Rc;
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
-use task::TaskCanceller;
-use task_source::TaskSourceName;
-use task_source::dom_manipulation::DOMManipulationTaskSource;
-use task_source::file_reading::FileReadingTaskSource;
-use task_source::networking::NetworkingTaskSource;
-use task_source::performance_timeline::PerformanceTimelineTaskSource;
-use task_source::remote_event::RemoteEventTaskSource;
-use task_source::websocket::WebsocketTaskSource;
+use crate::task::TaskCanceller;
+use crate::task_source::TaskSourceName;
+use crate::task_source::dom_manipulation::DOMManipulationTaskSource;
+use crate::task_source::file_reading::FileReadingTaskSource;
+use crate::task_source::networking::NetworkingTaskSource;
+use crate::task_source::performance_timeline::PerformanceTimelineTaskSource;
+use crate::task_source::remote_event::RemoteEventTaskSource;
+use crate::task_source::websocket::WebsocketTaskSource;
use time::{Timespec, get_time};
-use timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle};
-use timers::{OneshotTimers, TimerCallback};
+use crate::timers::{IsInterval, OneshotTimerCallback, OneshotTimerHandle};
+use crate::timers::{OneshotTimers, TimerCallback};
#[derive(JSTraceable)]
pub struct AutoCloseWorker(Arc<AtomicBool>);
diff --git a/components/script/dom/hashchangeevent.rs b/components/script/dom/hashchangeevent.rs
index e32c64a779f..4771f6d8d51 100644
--- a/components/script/dom/hashchangeevent.rs
+++ b/components/script/dom/hashchangeevent.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::HashChangeEventBinding;
-use dom::bindings::codegen::Bindings::HashChangeEventBinding::HashChangeEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::{DOMString, USVString};
-use dom::event::Event;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::HashChangeEventBinding;
+use crate::dom::bindings::codegen::Bindings::HashChangeEventBinding::HashChangeEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::event::Event;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/headers.rs b/components/script/dom/headers.rs
index 2cdb955b43f..5ce4e84e49e 100644
--- a/components/script/dom/headers.rs
+++ b/components/script/dom/headers.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods, HeadersWrap};
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::iterable::Iterable;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::{ByteString, is_token};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods, HeadersWrap};
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::iterable::Iterable;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::{ByteString, is_token};
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use http::header::{self, HeaderMap as HyperHeaders, HeaderName, HeaderValue};
use mime::{self, Mime};
diff --git a/components/script/dom/history.rs b/components/script/dom/history.rs
index ee5c38e8c89..b23b4a2d330 100644
--- a/components/script/dom/history.rs
+++ b/components/script/dom/history.rs
@@ -2,22 +2,22 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HistoryBinding;
-use dom::bindings::codegen::Bindings::HistoryBinding::HistoryMethods;
-use dom::bindings::codegen::Bindings::LocationBinding::LocationBinding::LocationMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::{DOMString, USVString};
-use dom::bindings::structuredclone::StructuredCloneData;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::hashchangeevent::HashChangeEvent;
-use dom::popstateevent::PopStateEvent;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::HistoryBinding;
+use crate::dom::bindings::codegen::Bindings::HistoryBinding::HistoryMethods;
+use crate::dom::bindings::codegen::Bindings::LocationBinding::LocationBinding::LocationMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::bindings::structuredclone::StructuredCloneData;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::hashchangeevent::HashChangeEvent;
+use crate::dom::popstateevent::PopStateEvent;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext};
use js::jsval::{JSVal, NullValue, UndefinedValue};
diff --git a/components/script/dom/htmlanchorelement.rs b/components/script/dom/htmlanchorelement.rs
index a5d70ad9e3d..b6c45b33cfd 100644
--- a/components/script/dom/htmlanchorelement.rs
+++ b/components/script/dom/htmlanchorelement.rs
@@ -2,28 +2,28 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::activation::Activatable;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
-use dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListMethods;
-use dom::bindings::codegen::Bindings::HTMLAnchorElementBinding;
-use dom::bindings::codegen::Bindings::HTMLAnchorElementBinding::HTMLAnchorElementMethods;
-use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::{DOMString, USVString};
-use dom::document::Document;
-use dom::domtokenlist::DOMTokenList;
-use dom::element::Element;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::htmlelement::HTMLElement;
-use dom::htmlimageelement::HTMLImageElement;
-use dom::mouseevent::MouseEvent;
-use dom::node::{Node, document_from_node};
-use dom::urlhelper::UrlHelper;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::activation::Activatable;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
+use crate::dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLAnchorElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLAnchorElementBinding::HTMLAnchorElementMethods;
+use crate::dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::document::Document;
+use crate::dom::domtokenlist::DOMTokenList;
+use crate::dom::element::Element;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlimageelement::HTMLImageElement;
+use crate::dom::mouseevent::MouseEvent;
+use crate::dom::node::{Node, document_from_node};
+use crate::dom::urlhelper::UrlHelper;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use net_traits::ReferrerPolicy;
diff --git a/components/script/dom/htmlareaelement.rs b/components/script/dom/htmlareaelement.rs
index 303b72a55f2..686740ef818 100644
--- a/components/script/dom/htmlareaelement.rs
+++ b/components/script/dom/htmlareaelement.rs
@@ -2,22 +2,22 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::activation::Activatable;
-use dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListMethods;
-use dom::bindings::codegen::Bindings::HTMLAreaElementBinding;
-use dom::bindings::codegen::Bindings::HTMLAreaElementBinding::HTMLAreaElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::domtokenlist::DOMTokenList;
-use dom::element::Element;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::htmlanchorelement::follow_hyperlink;
-use dom::htmlelement::HTMLElement;
-use dom::node::{Node, document_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::activation::Activatable;
+use crate::dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLAreaElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLAreaElementBinding::HTMLAreaElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::domtokenlist::DOMTokenList;
+use crate::dom::element::Element;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlanchorelement::follow_hyperlink;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{Node, document_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use euclid::Point2D;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlaudioelement.rs b/components/script/dom/htmlaudioelement.rs
index 354e138089b..68ab802cbe1 100644
--- a/components/script/dom/htmlaudioelement.rs
+++ b/components/script/dom/htmlaudioelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLAudioElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlmediaelement::HTMLMediaElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLAudioElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlmediaelement::HTMLMediaElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlbaseelement.rs b/components/script/dom/htmlbaseelement.rs
index fbda8679239..141d74f3223 100644
--- a/components/script/dom/htmlbaseelement.rs
+++ b/components/script/dom/htmlbaseelement.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLBaseElementBinding;
-use dom::bindings::codegen::Bindings::HTMLBaseElementBinding::HTMLBaseElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::htmlelement::HTMLElement;
-use dom::node::{Node, UnbindContext, document_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLBaseElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLBaseElementBinding::HTMLBaseElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{Node, UnbindContext, document_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use servo_url::ServoUrl;
diff --git a/components/script/dom/htmlbodyelement.rs b/components/script/dom/htmlbodyelement.rs
index da0c641e5c3..2af9d637d5e 100644
--- a/components/script/dom/htmlbodyelement.rs
+++ b/components/script/dom/htmlbodyelement.rs
@@ -3,18 +3,18 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{self, HTMLBodyElementMethods};
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{LayoutDom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
-use dom::eventtarget::EventTarget;
-use dom::htmlelement::HTMLElement;
-use dom::node::{Node, document_from_node, window_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLBodyElementBinding::{self, HTMLBodyElementMethods};
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{LayoutDom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{Node, document_from_node, window_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use embedder_traits::EmbedderMsg;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlbrelement.rs b/components/script/dom/htmlbrelement.rs
index 87e5c024901..fed712cabba 100644
--- a/components/script/dom/htmlbrelement.rs
+++ b/components/script/dom/htmlbrelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLBRElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLBRElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs
index d404c13ff9d..c7e28a672c1 100755
--- a/components/script/dom/htmlbuttonelement.rs
+++ b/components/script/dom/htmlbuttonelement.rs
@@ -2,27 +2,27 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::activation::{Activatable, ActivationSource, synthetic_click_activation};
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLButtonElementBinding;
-use dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::htmlelement::HTMLElement;
-use dom::htmlfieldsetelement::HTMLFieldSetElement;
-use dom::htmlformelement::{FormControl, FormDatum, FormDatumValue};
-use dom::htmlformelement::{FormSubmitter, ResetFrom, SubmittedFrom};
-use dom::htmlformelement::HTMLFormElement;
-use dom::node::{Node, UnbindContext, document_from_node, window_from_node};
-use dom::nodelist::NodeList;
-use dom::validation::Validatable;
-use dom::validitystate::{ValidityState, ValidationFlags};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::activation::{Activatable, ActivationSource, synthetic_click_activation};
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLButtonElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
+use crate::dom::htmlformelement::{FormControl, FormDatum, FormDatumValue};
+use crate::dom::htmlformelement::{FormSubmitter, ResetFrom, SubmittedFrom};
+use crate::dom::htmlformelement::HTMLFormElement;
+use crate::dom::node::{Node, UnbindContext, document_from_node, window_from_node};
+use crate::dom::nodelist::NodeList;
+use crate::dom::validation::Validatable;
+use crate::dom::validitystate::{ValidityState, ValidationFlags};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use std::cell::Cell;
diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs
index 8f572336573..af5029a9015 100644
--- a/components/script/dom/htmlcanvaselement.rs
+++ b/components/script/dom/htmlcanvaselement.rs
@@ -5,26 +5,26 @@
use base64;
use canvas_traits::canvas::{CanvasMsg, CanvasId, FromScriptMsg};
use canvas_traits::webgl::WebGLVersion;
-use dom::attr::Attr;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::HTMLCanvasElementBinding;
-use dom::bindings::codegen::Bindings::HTMLCanvasElementBinding::{HTMLCanvasElementMethods, RenderingContext};
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes;
-use dom::bindings::conversions::ConversionResult;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, DomRoot, LayoutDom};
-use dom::bindings::str::{DOMString, USVString};
-use dom::canvasrenderingcontext2d::{CanvasRenderingContext2D, LayoutCanvasRenderingContext2DHelpers};
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
-use dom::globalscope::GlobalScope;
-use dom::htmlelement::HTMLElement;
-use dom::node::{Node, window_from_node};
-use dom::virtualmethods::VirtualMethods;
-use dom::webgl2renderingcontext::WebGL2RenderingContext;
-use dom::webglrenderingcontext::{LayoutCanvasWebGLRenderingContextHelpers, WebGLRenderingContext};
+use crate::dom::attr::Attr;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::HTMLCanvasElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLCanvasElementBinding::{HTMLCanvasElementMethods, RenderingContext};
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes;
+use crate::dom::bindings::conversions::ConversionResult;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::canvasrenderingcontext2d::{CanvasRenderingContext2D, LayoutCanvasRenderingContext2DHelpers};
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{Node, window_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
+use crate::dom::webgl2renderingcontext::WebGL2RenderingContext;
+use crate::dom::webglrenderingcontext::{LayoutCanvasWebGLRenderingContextHelpers, WebGLRenderingContext};
use dom_struct::dom_struct;
use euclid::{Rect, Size2D};
use html5ever::{LocalName, Prefix};
@@ -439,7 +439,7 @@ impl<'a> From<&'a WebGLContextAttributes> for GLContextAttributes {
}
pub mod utils {
- use dom::window::Window;
+ use crate::dom::window::Window;
use net_traits::image_cache::{ImageResponse, UsePlaceholder, ImageOrMetadataAvailable};
use net_traits::image_cache::CanRequestImages;
use servo_url::ServoUrl;
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs
index d94607635e4..cb2853e1307 100644
--- a/components/script/dom/htmlcollection.rs
+++ b/components/script/dom/htmlcollection.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLCollectionBinding;
-use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::JSTraceable;
-use dom::bindings::xmlname::namespace_from_domstring;
-use dom::element::Element;
-use dom::node::{Node, document_from_node};
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::bindings::xmlname::namespace_from_domstring;
+use crate::dom::element::Element;
+use crate::dom::node::{Node, document_from_node};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use html5ever::{LocalName, QualName};
use servo_atoms::Atom;
diff --git a/components/script/dom/htmldataelement.rs b/components/script/dom/htmldataelement.rs
index 07a2d0f2442..29ad49f1370 100644
--- a/components/script/dom/htmldataelement.rs
+++ b/components/script/dom/htmldataelement.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLDataElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDataElementBinding::HTMLDataElementMethods;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLDataElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDataElementBinding::HTMLDataElementMethods;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmldatalistelement.rs b/components/script/dom/htmldatalistelement.rs
index e99a9324520..de7230a441d 100644
--- a/components/script/dom/htmldatalistelement.rs
+++ b/components/script/dom/htmldatalistelement.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLDataListElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDataListElementBinding::HTMLDataListElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::element::Element;
-use dom::htmlcollection::{CollectionFilter, HTMLCollection};
-use dom::htmlelement::HTMLElement;
-use dom::htmloptionelement::HTMLOptionElement;
-use dom::node::{Node, window_from_node};
+use crate::dom::bindings::codegen::Bindings::HTMLDataListElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDataListElementBinding::HTMLDataListElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::element::Element;
+use crate::dom::htmlcollection::{CollectionFilter, HTMLCollection};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmloptionelement::HTMLOptionElement;
+use crate::dom::node::{Node, window_from_node};
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmldetailselement.rs b/components/script/dom/htmldetailselement.rs
index b764b0174ca..e838c24bde0 100644
--- a/components/script/dom/htmldetailselement.rs
+++ b/components/script/dom/htmldetailselement.rs
@@ -2,22 +2,22 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLDetailsElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDetailsElementBinding::HTMLDetailsElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::element::AttributeMutation;
-use dom::eventtarget::EventTarget;
-use dom::htmlelement::HTMLElement;
-use dom::node::{Node, window_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLDetailsElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDetailsElementBinding::HTMLDetailsElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::element::AttributeMutation;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{Node, window_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use std::cell::Cell;
-use task_source::TaskSource;
+use crate::task_source::TaskSource;
#[dom_struct]
pub struct HTMLDetailsElement {
diff --git a/components/script/dom/htmldialogelement.rs b/components/script/dom/htmldialogelement.rs
index 97643bf691f..e54ef512ac6 100644
--- a/components/script/dom/htmldialogelement.rs
+++ b/components/script/dom/htmldialogelement.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::HTMLDialogElementBinding;
-use dom::bindings::codegen::Bindings::HTMLDialogElementBinding::HTMLDialogElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::Element;
-use dom::eventtarget::EventTarget;
-use dom::htmlelement::HTMLElement;
-use dom::node::{Node, window_from_node};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::HTMLDialogElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLDialogElementBinding::HTMLDialogElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::Element;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{Node, window_from_node};
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmldirectoryelement.rs b/components/script/dom/htmldirectoryelement.rs
index 541a8abfa03..7de2e1c4a6a 100644
--- a/components/script/dom/htmldirectoryelement.rs
+++ b/components/script/dom/htmldirectoryelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLDirectoryElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLDirectoryElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmldivelement.rs b/components/script/dom/htmldivelement.rs
index 3de1af4e568..90d462dcc35 100644
--- a/components/script/dom/htmldivelement.rs
+++ b/components/script/dom/htmldivelement.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLDivElementBinding::{self, HTMLDivElementMethods};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLDivElementBinding::{self, HTMLDivElementMethods};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmldlistelement.rs b/components/script/dom/htmldlistelement.rs
index b63f0225095..05e8be1bb2a 100644
--- a/components/script/dom/htmldlistelement.rs
+++ b/components/script/dom/htmldlistelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLDListElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLDListElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs
index 9279f8fdbe1..5b29b8957f3 100644
--- a/components/script/dom/htmlelement.rs
+++ b/components/script/dom/htmlelement.rs
@@ -2,36 +2,36 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::activation::{ActivationSource, synthetic_click_activation};
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
-use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
-use dom::bindings::codegen::Bindings::HTMLElementBinding;
-use dom::bindings::codegen::Bindings::HTMLElementBinding::HTMLElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::error::{Error, ErrorResult};
-use dom::bindings::inheritance::{ElementTypeId, HTMLElementTypeId, NodeTypeId};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
-use dom::document::{Document, FocusType};
-use dom::documentfragment::DocumentFragment;
-use dom::domstringmap::DOMStringMap;
-use dom::element::{AttributeMutation, Element};
-use dom::eventtarget::EventTarget;
-use dom::htmlbodyelement::HTMLBodyElement;
-use dom::htmlbrelement::HTMLBRElement;
-use dom::htmlframesetelement::HTMLFrameSetElement;
-use dom::htmlhtmlelement::HTMLHtmlElement;
-use dom::htmlinputelement::{HTMLInputElement, InputType};
-use dom::htmllabelelement::HTMLLabelElement;
-use dom::node::{Node, NodeFlags};
-use dom::node::{document_from_node, window_from_node};
-use dom::nodelist::NodeList;
-use dom::text::Text;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::activation::{ActivationSource, synthetic_click_activation};
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
+use crate::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
+use crate::dom::bindings::codegen::Bindings::HTMLElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLElementBinding::HTMLElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::{Error, ErrorResult};
+use crate::dom::bindings::inheritance::{ElementTypeId, HTMLElementTypeId, NodeTypeId};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
+use crate::dom::document::{Document, FocusType};
+use crate::dom::documentfragment::DocumentFragment;
+use crate::dom::domstringmap::DOMStringMap;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlbodyelement::HTMLBodyElement;
+use crate::dom::htmlbrelement::HTMLBRElement;
+use crate::dom::htmlframesetelement::HTMLFrameSetElement;
+use crate::dom::htmlhtmlelement::HTMLHtmlElement;
+use crate::dom::htmlinputelement::{HTMLInputElement, InputType};
+use crate::dom::htmllabelelement::HTMLLabelElement;
+use crate::dom::node::{Node, NodeFlags};
+use crate::dom::node::{document_from_node, window_from_node};
+use crate::dom::nodelist::NodeList;
+use crate::dom::text::Text;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use script_layout_interface::message::QueryMsg;
diff --git a/components/script/dom/htmlembedelement.rs b/components/script/dom/htmlembedelement.rs
index 84266f06019..e8f967dab51 100644
--- a/components/script/dom/htmlembedelement.rs
+++ b/components/script/dom/htmlembedelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLEmbedElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLEmbedElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlfieldsetelement.rs b/components/script/dom/htmlfieldsetelement.rs
index 2b9ca9539c5..2f5ffa9a042 100644
--- a/components/script/dom/htmlfieldsetelement.rs
+++ b/components/script/dom/htmlfieldsetelement.rs
@@ -2,20 +2,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding;
-use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding::HTMLFieldSetElementMethods;
-use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::htmlcollection::{CollectionFilter, HTMLCollection};
-use dom::htmlelement::HTMLElement;
-use dom::htmlformelement::{FormControl, HTMLFormElement};
-use dom::htmllegendelement::HTMLLegendElement;
-use dom::node::{Node, window_from_node};
-use dom::validitystate::ValidityState;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding::HTMLFieldSetElementMethods;
+use crate::dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::htmlcollection::{CollectionFilter, HTMLCollection};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlformelement::{FormControl, HTMLFormElement};
+use crate::dom::htmllegendelement::HTMLLegendElement;
+use crate::dom::node::{Node, window_from_node};
+use crate::dom::validitystate::ValidityState;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use std::default::Default;
diff --git a/components/script/dom/htmlfontelement.rs b/components/script/dom/htmlfontelement.rs
index f704b5fc986..b06df92d75a 100644
--- a/components/script/dom/htmlfontelement.rs
+++ b/components/script/dom/htmlfontelement.rs
@@ -3,17 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLFontElementBinding;
-use dom::bindings::codegen::Bindings::HTMLFontElementBinding::HTMLFontElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, LayoutDom};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{Element, RawLayoutElementHelpers};
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLFontElementBinding::HTMLFontElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, LayoutDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{Element, RawLayoutElementHelpers};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use servo_atoms::Atom;
diff --git a/components/script/dom/htmlformcontrolscollection.rs b/components/script/dom/htmlformcontrolscollection.rs
index b06810ca9fc..bf23f85bdce 100644
--- a/components/script/dom/htmlformcontrolscollection.rs
+++ b/components/script/dom/htmlformcontrolscollection.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
-use dom::bindings::codegen::Bindings::HTMLFormControlsCollectionBinding;
-use dom::bindings::codegen::Bindings::HTMLFormControlsCollectionBinding::HTMLFormControlsCollectionMethods;
-use dom::bindings::codegen::UnionTypes::RadioNodeListOrElement;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::element::Element;
-use dom::htmlcollection::{CollectionFilter, HTMLCollection};
-use dom::node::Node;
-use dom::radionodelist::RadioNodeList;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLFormControlsCollectionBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLFormControlsCollectionBinding::HTMLFormControlsCollectionMethods;
+use crate::dom::bindings::codegen::UnionTypes::RadioNodeListOrElement;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::element::Element;
+use crate::dom::htmlcollection::{CollectionFilter, HTMLCollection};
+use crate::dom::node::Node;
+use crate::dom::radionodelist::RadioNodeList;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use std::iter;
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs
index c1c3e0e4446..ef3cce2ecce 100755
--- a/components/script/dom/htmlformelement.rs
+++ b/components/script/dom/htmlformelement.rs
@@ -2,46 +2,46 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
-use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods;
-use dom::bindings::codegen::Bindings::HTMLFormControlsCollectionBinding::HTMLFormControlsCollectionMethods;
-use dom::bindings::codegen::Bindings::HTMLFormElementBinding;
-use dom::bindings::codegen::Bindings::HTMLFormElementBinding::HTMLFormElementMethods;
-use dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods;
-use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods;
-use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, DomOnceCell, DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::blob::Blob;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::eventtarget::EventTarget;
-use dom::file::File;
-use dom::globalscope::GlobalScope;
-use dom::htmlbuttonelement::HTMLButtonElement;
-use dom::htmlcollection::CollectionFilter;
-use dom::htmldatalistelement::HTMLDataListElement;
-use dom::htmlelement::HTMLElement;
-use dom::htmlfieldsetelement::HTMLFieldSetElement;
-use dom::htmlformcontrolscollection::HTMLFormControlsCollection;
-use dom::htmlimageelement::HTMLImageElement;
-use dom::htmlinputelement::{HTMLInputElement, InputType};
-use dom::htmllabelelement::HTMLLabelElement;
-use dom::htmllegendelement::HTMLLegendElement;
-use dom::htmlobjectelement::HTMLObjectElement;
-use dom::htmloutputelement::HTMLOutputElement;
-use dom::htmlselectelement::HTMLSelectElement;
-use dom::htmltextareaelement::HTMLTextAreaElement;
-use dom::node::{Node, NodeFlags, UnbindContext, VecPreOrderInsertionHelper};
-use dom::node::{document_from_node, window_from_node};
-use dom::validitystate::ValidationFlags;
-use dom::virtualmethods::VirtualMethods;
-use dom::window::Window;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLButtonElementBinding::HTMLButtonElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLFormControlsCollectionBinding::HTMLFormControlsCollectionMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLFormElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLFormElementBinding::HTMLFormElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods;
+use crate::dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{Dom, DomOnceCell, DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::blob::Blob;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::file::File;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlbuttonelement::HTMLButtonElement;
+use crate::dom::htmlcollection::CollectionFilter;
+use crate::dom::htmldatalistelement::HTMLDataListElement;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
+use crate::dom::htmlformcontrolscollection::HTMLFormControlsCollection;
+use crate::dom::htmlimageelement::HTMLImageElement;
+use crate::dom::htmlinputelement::{HTMLInputElement, InputType};
+use crate::dom::htmllabelelement::HTMLLabelElement;
+use crate::dom::htmllegendelement::HTMLLegendElement;
+use crate::dom::htmlobjectelement::HTMLObjectElement;
+use crate::dom::htmloutputelement::HTMLOutputElement;
+use crate::dom::htmlselectelement::HTMLSelectElement;
+use crate::dom::htmltextareaelement::HTMLTextAreaElement;
+use crate::dom::node::{Node, NodeFlags, UnbindContext, VecPreOrderInsertionHelper};
+use crate::dom::node::{document_from_node, window_from_node};
+use crate::dom::validitystate::ValidationFlags;
+use crate::dom::virtualmethods::VirtualMethods;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use encoding_rs::{Encoding, UTF_8};
use headers_core::HeaderMapExt;
@@ -49,15 +49,15 @@ use headers_ext::ContentType;
use html5ever::{LocalName, Prefix};
use hyper::Method;
use mime::{self, Mime};
+use crate::script_thread::MainThreadScriptMsg;
use net_traits::http_percent_encode;
-use script_thread::MainThreadScriptMsg;
use script_traits::LoadData;
use servo_rand::random;
use std::borrow::ToOwned;
use std::cell::Cell;
use style::attr::AttrValue;
use style::str::split_html_space_chars;
-use task_source::TaskSource;
+use crate::task_source::TaskSource;
use url::UrlQuery;
use url::form_urlencoded::Serializer;
diff --git a/components/script/dom/htmlframeelement.rs b/components/script/dom/htmlframeelement.rs
index 83ad119ada7..83e070c12ad 100644
--- a/components/script/dom/htmlframeelement.rs
+++ b/components/script/dom/htmlframeelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLFrameElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLFrameElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlframesetelement.rs b/components/script/dom/htmlframesetelement.rs
index a507b82481a..686b908f8a5 100644
--- a/components/script/dom/htmlframesetelement.rs
+++ b/components/script/dom/htmlframesetelement.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding;
-use dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding::HTMLFrameSetElementMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::{Node, document_from_node};
+use crate::dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding::HTMLFrameSetElementMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{Node, document_from_node};
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlheadelement.rs b/components/script/dom/htmlheadelement.rs
index de0c06a08e6..2b5d9e5a69f 100644
--- a/components/script/dom/htmlheadelement.rs
+++ b/components/script/dom/htmlheadelement.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
-use dom::bindings::codegen::Bindings::HTMLHeadElementBinding;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, RootedReference};
-use dom::document::{Document, determine_policy_for_token};
-use dom::element::Element;
-use dom::htmlelement::HTMLElement;
-use dom::htmlmetaelement::HTMLMetaElement;
-use dom::node::{Node, document_from_node};
-use dom::userscripts::load_script;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLHeadElementBinding;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, RootedReference};
+use crate::dom::document::{Document, determine_policy_for_token};
+use crate::dom::element::Element;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlmetaelement::HTMLMetaElement;
+use crate::dom::node::{Node, document_from_node};
+use crate::dom::userscripts::load_script;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlheadingelement.rs b/components/script/dom/htmlheadingelement.rs
index e74df498645..40ce29597dc 100644
--- a/components/script/dom/htmlheadingelement.rs
+++ b/components/script/dom/htmlheadingelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLHeadingElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLHeadingElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlhrelement.rs b/components/script/dom/htmlhrelement.rs
index 7396c9013e7..e9724984aaf 100644
--- a/components/script/dom/htmlhrelement.rs
+++ b/components/script/dom/htmlhrelement.rs
@@ -3,15 +3,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
-use dom::bindings::codegen::Bindings::HTMLHRElementBinding::{self, HTMLHRElementMethods};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, LayoutDom};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{Element, RawLayoutElementHelpers};
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLHRElementBinding::{self, HTMLHRElementMethods};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, LayoutDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{Element, RawLayoutElementHelpers};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
diff --git a/components/script/dom/htmlhtmlelement.rs b/components/script/dom/htmlhtmlelement.rs
index f9fd18fd693..c25408b32f1 100644
--- a/components/script/dom/htmlhtmlelement.rs
+++ b/components/script/dom/htmlhtmlelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLHtmlElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLHtmlElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index c44ed04b265..ed79eb5412b 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -2,34 +2,34 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use document_loader::{LoadBlocker, LoadType};
-use dom::attr::Attr;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding;
-use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{LayoutDom, DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::domtokenlist::DOMTokenList;
-use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::htmlelement::HTMLElement;
-use dom::node::{Node, NodeDamage, UnbindContext, document_from_node, window_from_node};
-use dom::virtualmethods::VirtualMethods;
-use dom::window::ReflowReason;
-use dom::windowproxy::WindowProxy;
+use crate::document_loader::{LoadBlocker, LoadType};
+use crate::dom::attr::Attr;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::HTMLIFrameElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{LayoutDom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::domtokenlist::DOMTokenList;
+use crate::dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{Node, NodeDamage, UnbindContext, document_from_node, window_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
+use crate::dom::window::ReflowReason;
+use crate::dom::windowproxy::WindowProxy;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use ipc_channel::ipc;
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
use profile_traits::ipc as ProfiledIpc;
use script_layout_interface::message::ReflowGoal;
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use script_traits::{IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, UpdatePipelineIdReason};
use script_traits::{NewLayoutInfo, ScriptMsg};
use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
@@ -37,7 +37,7 @@ use servo_config::prefs::PREFS;
use servo_url::ServoUrl;
use std::cell::Cell;
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
-use task_source::TaskSource;
+use crate::task_source::TaskSource;
bitflags! {
#[derive(JSTraceable, MallocSizeOf)]
diff --git a/components/script/dom/htmlimageelement.rs b/components/script/dom/htmlimageelement.rs
index c9de1995230..4dab7af24cd 100644
--- a/components/script/dom/htmlimageelement.rs
+++ b/components/script/dom/htmlimageelement.rs
@@ -4,46 +4,46 @@
use app_units::{Au, AU_PER_PX};
use cssparser::{Parser, ParserInput};
-use document_loader::{LoadType, LoadBlocker};
-use dom::activation::Activatable;
-use dom::attr::Attr;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectBinding::DOMRectMethods;
-use dom::bindings::codegen::Bindings::ElementBinding::ElementBinding::ElementMethods;
-use dom::bindings::codegen::Bindings::HTMLImageElementBinding;
-use dom::bindings::codegen::Bindings::HTMLImageElementBinding::HTMLImageElementMethods;
-use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
-use dom::element::{reflect_cross_origin_attribute, set_cross_origin_attribute};
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventtarget::EventTarget;
-use dom::htmlareaelement::HTMLAreaElement;
-use dom::htmlelement::HTMLElement;
-use dom::htmlformelement::{FormControl, HTMLFormElement};
-use dom::htmlmapelement::HTMLMapElement;
-use dom::htmlpictureelement::HTMLPictureElement;
-use dom::htmlsourceelement::HTMLSourceElement;
-use dom::mouseevent::MouseEvent;
-use dom::node::{Node, NodeDamage, document_from_node, window_from_node, UnbindContext};
-use dom::progressevent::ProgressEvent;
-use dom::values::UNSIGNED_LONG_MAX;
-use dom::virtualmethods::VirtualMethods;
-use dom::window::Window;
+use crate::document_loader::{LoadType, LoadBlocker};
+use crate::dom::activation::Activatable;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectBinding::DOMRectMethods;
+use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementBinding::ElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLImageElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLImageElementBinding::HTMLImageElementMethods;
+use crate::dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
+use crate::dom::element::{reflect_cross_origin_attribute, set_cross_origin_attribute};
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlareaelement::HTMLAreaElement;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlformelement::{FormControl, HTMLFormElement};
+use crate::dom::htmlmapelement::HTMLMapElement;
+use crate::dom::htmlpictureelement::HTMLPictureElement;
+use crate::dom::htmlsourceelement::HTMLSourceElement;
+use crate::dom::mouseevent::MouseEvent;
+use crate::dom::node::{Node, NodeDamage, document_from_node, window_from_node, UnbindContext};
+use crate::dom::progressevent::ProgressEvent;
+use crate::dom::values::UNSIGNED_LONG_MAX;
+use crate::dom::virtualmethods::VirtualMethods;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use euclid::Point2D;
use html5ever::{LocalName, Prefix};
use ipc_channel::ipc;
use ipc_channel::router::ROUTER;
-use microtask::{Microtask, MicrotaskRunnable};
+use crate::microtask::{Microtask, MicrotaskRunnable};
use mime::{self, Mime};
use net_traits::{FetchResponseListener, FetchMetadata, NetworkError, FetchResponseMsg};
use net_traits::image::base::{Image, ImageMetadata};
@@ -51,9 +51,9 @@ use net_traits::image_cache::{CanRequestImages, ImageCache, ImageOrMetadataAvail
use net_traits::image_cache::{ImageResponder, ImageResponse, ImageState, PendingImageId};
use net_traits::image_cache::UsePlaceholder;
use net_traits::request::RequestInit;
-use network_listener::{NetworkListener, PreInvoke};
+use crate::network_listener::{NetworkListener, PreInvoke};
use num_traits::ToPrimitive;
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use servo_url::ServoUrl;
use servo_url::origin::MutableOrigin;
use std::cell::{Cell, RefMut};
@@ -72,7 +72,7 @@ use style::stylesheets::{CssRuleType, Origin};
use style::values::specified::{AbsoluteLength, source_size_list::SourceSizeList};
use style::values::specified::length::{Length, NoCalcLength};
use style_traits::ParsingMode;
-use task_source::{TaskSource, TaskSourceName};
+use crate::task_source::{TaskSource, TaskSourceName};
enum ParseState {
InDescriptor,
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index 163a85cbdb6..d1d8d7350df 100755
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -3,40 +3,40 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use caseless::compatibility_caseless_match_str;
-use dom::activation::{Activatable, ActivationSource, synthetic_click_activation};
-use dom::attr::Attr;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::FileListBinding::FileListMethods;
-use dom::bindings::codegen::Bindings::HTMLFormElementBinding::SelectionMode;
-use dom::bindings::codegen::Bindings::HTMLInputElementBinding;
-use dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods;
-use dom::bindings::codegen::Bindings::KeyboardEventBinding::KeyboardEventMethods;
-use dom::bindings::error::{Error, ErrorResult};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element, LayoutElementHelpers, RawLayoutElementHelpers};
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventtarget::EventTarget;
-use dom::file::File;
-use dom::filelist::FileList;
-use dom::globalscope::GlobalScope;
-use dom::htmlelement::HTMLElement;
-use dom::htmlfieldsetelement::HTMLFieldSetElement;
-use dom::htmlformelement::{FormControl, FormDatum, FormDatumValue, FormSubmitter, HTMLFormElement};
-use dom::htmlformelement::{ResetFrom, SubmittedFrom};
-use dom::keyboardevent::KeyboardEvent;
-use dom::mouseevent::MouseEvent;
-use dom::node::{Node, NodeDamage, UnbindContext};
-use dom::node::{document_from_node, window_from_node};
-use dom::nodelist::NodeList;
-use dom::textcontrol::{TextControlElement, TextControlSelection};
-use dom::validation::Validatable;
-use dom::validitystate::ValidationFlags;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::activation::{Activatable, ActivationSource, synthetic_click_activation};
+use crate::dom::attr::Attr;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::FileListBinding::FileListMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLFormElementBinding::SelectionMode;
+use crate::dom::bindings::codegen::Bindings::HTMLInputElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods;
+use crate::dom::bindings::codegen::Bindings::KeyboardEventBinding::KeyboardEventMethods;
+use crate::dom::bindings::error::{Error, ErrorResult};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element, LayoutElementHelpers, RawLayoutElementHelpers};
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::file::File;
+use crate::dom::filelist::FileList;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
+use crate::dom::htmlformelement::{FormControl, FormDatum, FormDatumValue, FormSubmitter, HTMLFormElement};
+use crate::dom::htmlformelement::{ResetFrom, SubmittedFrom};
+use crate::dom::keyboardevent::KeyboardEvent;
+use crate::dom::mouseevent::MouseEvent;
+use crate::dom::node::{Node, NodeDamage, UnbindContext};
+use crate::dom::node::{document_from_node, window_from_node};
+use crate::dom::nodelist::NodeList;
+use crate::dom::textcontrol::{TextControlElement, TextControlSelection};
+use crate::dom::validation::Validatable;
+use crate::dom::validitystate::ValidationFlags;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use embedder_traits::FilterPattern;
use html5ever::{LocalName, Prefix};
@@ -55,9 +55,9 @@ use std::ops::Range;
use style::attr::AttrValue;
use style::element_state::ElementState;
use style::str::split_commas;
-use textinput::{Direction, SelectionDirection, TextInput};
-use textinput::KeyReaction::{DispatchInput, Nothing, RedrawSelection, TriggerDefaultAction};
-use textinput::Lines::Single;
+use crate::textinput::{Direction, SelectionDirection, TextInput};
+use crate::textinput::KeyReaction::{DispatchInput, Nothing, RedrawSelection, TriggerDefaultAction};
+use crate::textinput::Lines::Single;
const DEFAULT_SUBMIT_VALUE: &'static str = "Submit";
const DEFAULT_RESET_VALUE: &'static str = "Reset";
diff --git a/components/script/dom/htmllabelelement.rs b/components/script/dom/htmllabelelement.rs
index 0233294e970..7294c205937 100644
--- a/components/script/dom/htmllabelelement.rs
+++ b/components/script/dom/htmllabelelement.rs
@@ -2,21 +2,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::activation::{Activatable, ActivationSource, synthetic_click_activation};
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLLabelElementBinding;
-use dom::bindings::codegen::Bindings::HTMLLabelElementBinding::HTMLLabelElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::htmlelement::HTMLElement;
-use dom::htmlformelement::{FormControl, FormControlElementHelpers, HTMLFormElement};
-use dom::node::{document_from_node, Node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::activation::{Activatable, ActivationSource, synthetic_click_activation};
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLLabelElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLLabelElementBinding::HTMLLabelElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlformelement::{FormControl, FormControlElementHelpers, HTMLFormElement};
+use crate::dom::node::{document_from_node, Node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use style::attr::AttrValue;
diff --git a/components/script/dom/htmllegendelement.rs b/components/script/dom/htmllegendelement.rs
index 57d81f67857..f69f2ff6362 100644
--- a/components/script/dom/htmllegendelement.rs
+++ b/components/script/dom/htmllegendelement.rs
@@ -2,18 +2,18 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use dom::bindings::codegen::Bindings::HTMLLegendElementBinding;
-use dom::bindings::codegen::Bindings::HTMLLegendElementBinding::HTMLLegendElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::document::Document;
-use dom::element::Element;
-use dom::htmlelement::HTMLElement;
-use dom::htmlfieldsetelement::HTMLFieldSetElement;
-use dom::htmlformelement::{HTMLFormElement, FormControl};
-use dom::node::{Node, UnbindContext};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLLegendElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLLegendElementBinding::HTMLLegendElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::document::Document;
+use crate::dom::element::Element;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
+use crate::dom::htmlformelement::{HTMLFormElement, FormControl};
+use crate::dom::node::{Node, UnbindContext};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmllielement.rs b/components/script/dom/htmllielement.rs
index c36ea5716b3..b1b913e86e9 100644
--- a/components/script/dom/htmllielement.rs
+++ b/components/script/dom/htmllielement.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLLIElementBinding;
-use dom::bindings::codegen::Bindings::HTMLLIElementBinding::HTMLLIElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLLIElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLLIElementBinding::HTMLLIElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use style::attr::AttrValue;
diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs
index 7cb04d6f124..949a5dacd0f 100644
--- a/components/script/dom/htmllinkelement.rs
+++ b/components/script/dom/htmllinkelement.rs
@@ -3,23 +3,23 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser as CssParser, ParserInput};
-use dom::attr::Attr;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListBinding::DOMTokenListMethods;
-use dom::bindings::codegen::Bindings::HTMLLinkElementBinding;
-use dom::bindings::codegen::Bindings::HTMLLinkElementBinding::HTMLLinkElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::document::Document;
-use dom::domtokenlist::DOMTokenList;
-use dom::element::{AttributeMutation, Element, ElementCreator};
-use dom::element::{cors_setting_for_element, reflect_cross_origin_attribute, set_cross_origin_attribute};
-use dom::htmlelement::HTMLElement;
-use dom::node::{Node, UnbindContext, document_from_node, window_from_node};
-use dom::stylesheet::StyleSheet as DOMStyleSheet;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::DOMTokenListBinding::DOMTokenListBinding::DOMTokenListMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLLinkElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLLinkElementBinding::HTMLLinkElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::document::Document;
+use crate::dom::domtokenlist::DOMTokenList;
+use crate::dom::element::{AttributeMutation, Element, ElementCreator};
+use crate::dom::element::{cors_setting_for_element, reflect_cross_origin_attribute, set_cross_origin_attribute};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{Node, UnbindContext, document_from_node, window_from_node};
+use crate::dom::stylesheet::StyleSheet as DOMStyleSheet;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use embedder_traits::EmbedderMsg;
use html5ever::{LocalName, Prefix};
@@ -34,7 +34,7 @@ use style::parser::ParserContext as CssParserContext;
use style::str::HTML_SPACE_CHARACTERS;
use style::stylesheets::{CssRuleType, Stylesheet};
use style_traits::ParsingMode;
-use stylesheet_loader::{StylesheetLoader, StylesheetContextSource, StylesheetOwner};
+use crate::stylesheet_loader::{StylesheetLoader, StylesheetContextSource, StylesheetOwner};
#[derive(Clone, Copy, JSTraceable, MallocSizeOf, PartialEq)]
pub struct RequestGenerationId(u32);
diff --git a/components/script/dom/htmlmapelement.rs b/components/script/dom/htmlmapelement.rs
index 2ccc78df0a9..37602aca298 100644
--- a/components/script/dom/htmlmapelement.rs
+++ b/components/script/dom/htmlmapelement.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLMapElementBinding;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlareaelement::HTMLAreaElement;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLMapElementBinding;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlareaelement::HTMLAreaElement;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index 1cd0b5e825a..0747f67a653 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -2,52 +2,52 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use document_loader::{LoadBlocker, LoadType};
-use dom::attr::Attr;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
-use dom::bindings::codegen::Bindings::HTMLMediaElementBinding::CanPlayTypeResult;
-use dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementConstants;
-use dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementMethods;
-use dom::bindings::codegen::Bindings::HTMLSourceElementBinding::HTMLSourceElementMethods;
-use dom::bindings::codegen::Bindings::MediaErrorBinding::MediaErrorConstants::*;
-use dom::bindings::codegen::Bindings::MediaErrorBinding::MediaErrorMethods;
-use dom::bindings::codegen::InheritTypes::{ElementTypeId, HTMLElementTypeId};
-use dom::bindings::codegen::InheritTypes::{HTMLMediaElementTypeId, NodeTypeId};
-use dom::bindings::error::{Error, ErrorResult};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::blob::Blob;
-use dom::document::Document;
-use dom::element::{Element, AttributeMutation};
-use dom::eventtarget::EventTarget;
-use dom::htmlelement::HTMLElement;
-use dom::htmlsourceelement::HTMLSourceElement;
-use dom::htmlvideoelement::HTMLVideoElement;
-use dom::mediaerror::MediaError;
-use dom::node::{document_from_node, window_from_node, Node, NodeDamage, UnbindContext};
-use dom::promise::Promise;
-use dom::virtualmethods::VirtualMethods;
+use crate::document_loader::{LoadBlocker, LoadType};
+use crate::dom::attr::Attr;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLMediaElementBinding::CanPlayTypeResult;
+use crate::dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementConstants;
+use crate::dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLSourceElementBinding::HTMLSourceElementMethods;
+use crate::dom::bindings::codegen::Bindings::MediaErrorBinding::MediaErrorConstants::*;
+use crate::dom::bindings::codegen::Bindings::MediaErrorBinding::MediaErrorMethods;
+use crate::dom::bindings::codegen::InheritTypes::{ElementTypeId, HTMLElementTypeId};
+use crate::dom::bindings::codegen::InheritTypes::{HTMLMediaElementTypeId, NodeTypeId};
+use crate::dom::bindings::error::{Error, ErrorResult};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::blob::Blob;
+use crate::dom::document::Document;
+use crate::dom::element::{Element, AttributeMutation};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlsourceelement::HTMLSourceElement;
+use crate::dom::htmlvideoelement::HTMLVideoElement;
+use crate::dom::mediaerror::MediaError;
+use crate::dom::node::{document_from_node, window_from_node, Node, NodeDamage, UnbindContext};
+use crate::dom::promise::Promise;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
-use fetch::FetchCanceller;
+use crate::fetch::FetchCanceller;
use headers_core::HeaderMapExt;
use headers_ext::ContentLength;
use html5ever::{LocalName, Prefix};
use http::header::{self, HeaderMap, HeaderValue};
use ipc_channel::ipc;
use ipc_channel::router::ROUTER;
-use microtask::{Microtask, MicrotaskRunnable};
+use crate::microtask::{Microtask, MicrotaskRunnable};
use mime::{self, Mime};
use net_traits::{CoreResourceMsg, FetchChannels, FetchResponseListener, FetchMetadata, Metadata};
use net_traits::NetworkError;
use net_traits::request::{CredentialsMode, Destination, RequestInit};
-use network_listener::{NetworkListener, PreInvoke};
+use crate::network_listener::{NetworkListener, PreInvoke};
use script_layout_interface::HTMLMediaData;
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use servo_media::Error as ServoMediaError;
use servo_media::ServoMedia;
use servo_media::player::{PlaybackState, Player, PlayerEvent, StreamType};
@@ -59,7 +59,7 @@ use std::f64;
use std::mem;
use std::rc::Rc;
use std::sync::{Arc, Mutex};
-use task_source::{TaskSource, TaskSourceName};
+use crate::task_source::{TaskSource, TaskSourceName};
use time::{self, Timespec, Duration};
use webrender_api::{ImageData, ImageDescriptor, ImageFormat, ImageKey, RenderApi};
use webrender_api::{RenderApiSender, Transaction};
diff --git a/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs
index 94408954d5c..c73ff578c4c 100644
--- a/components/script/dom/htmlmetaelement.rs
+++ b/components/script/dom/htmlmetaelement.rs
@@ -2,21 +2,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::HTMLMetaElementBinding;
-use dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::htmlelement::HTMLElement;
-use dom::htmlheadelement::HTMLHeadElement;
-use dom::node::{Node, UnbindContext, document_from_node, window_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::HTMLMetaElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlheadelement::HTMLHeadElement;
+use crate::dom::node::{Node, UnbindContext, document_from_node, window_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use parking_lot::RwLock;
diff --git a/components/script/dom/htmlmeterelement.rs b/components/script/dom/htmlmeterelement.rs
index 31d50500fe0..002bb435f38 100644
--- a/components/script/dom/htmlmeterelement.rs
+++ b/components/script/dom/htmlmeterelement.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLMeterElementBinding::{self, HTMLMeterElementMethods};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
-use dom::nodelist::NodeList;
+use crate::dom::bindings::codegen::Bindings::HTMLMeterElementBinding::{self, HTMLMeterElementMethods};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
+use crate::dom::nodelist::NodeList;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlmodelement.rs b/components/script/dom/htmlmodelement.rs
index ac459681b10..e77054be037 100644
--- a/components/script/dom/htmlmodelement.rs
+++ b/components/script/dom/htmlmodelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLModElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLModElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlobjectelement.rs b/components/script/dom/htmlobjectelement.rs
index 439a5c69f2d..7fd39a7d258 100755
--- a/components/script/dom/htmlobjectelement.rs
+++ b/components/script/dom/htmlobjectelement.rs
@@ -2,21 +2,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::HTMLObjectElementBinding;
-use dom::bindings::codegen::Bindings::HTMLObjectElementBinding::HTMLObjectElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::htmlelement::HTMLElement;
-use dom::htmlformelement::{FormControl, HTMLFormElement};
-use dom::node::{Node, window_from_node};
-use dom::validation::Validatable;
-use dom::validitystate::{ValidityState, ValidationFlags};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::HTMLObjectElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLObjectElementBinding::HTMLObjectElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlformelement::{FormControl, HTMLFormElement};
+use crate::dom::node::{Node, window_from_node};
+use crate::dom::validation::Validatable;
+use crate::dom::validitystate::{ValidityState, ValidationFlags};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use net_traits::image::base::Image;
diff --git a/components/script/dom/htmlolistelement.rs b/components/script/dom/htmlolistelement.rs
index c79e824dd8f..cfc20479405 100644
--- a/components/script/dom/htmlolistelement.rs
+++ b/components/script/dom/htmlolistelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLOListElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLOListElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmloptgroupelement.rs b/components/script/dom/htmloptgroupelement.rs
index f1bf1b10ca0..9c6b9e9695f 100644
--- a/components/script/dom/htmloptgroupelement.rs
+++ b/components/script/dom/htmloptgroupelement.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding;
-use dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding::HTMLOptGroupElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::htmlelement::HTMLElement;
-use dom::htmloptionelement::HTMLOptionElement;
-use dom::node::Node;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding::HTMLOptGroupElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmloptionelement::HTMLOptionElement;
+use crate::dom::node::Node;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use style::element_state::ElementState;
diff --git a/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs
index 2521ec1d94c..a2d9e3609dd 100644
--- a/components/script/dom/htmloptionelement.rs
+++ b/components/script/dom/htmloptionelement.rs
@@ -2,26 +2,26 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
-use dom::bindings::codegen::Bindings::HTMLOptionElementBinding;
-use dom::bindings::codegen::Bindings::HTMLOptionElementBinding::HTMLOptionElementMethods;
-use dom::bindings::codegen::Bindings::HTMLSelectElementBinding::HTMLSelectElementBinding::HTMLSelectElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::characterdata::CharacterData;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::htmlelement::HTMLElement;
-use dom::htmlformelement::HTMLFormElement;
-use dom::htmloptgroupelement::HTMLOptGroupElement;
-use dom::htmlscriptelement::HTMLScriptElement;
-use dom::htmlselectelement::HTMLSelectElement;
-use dom::node::{Node, UnbindContext};
-use dom::text::Text;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLOptionElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLOptionElementBinding::HTMLOptionElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLSelectElementBinding::HTMLSelectElementBinding::HTMLSelectElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::characterdata::CharacterData;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlformelement::HTMLFormElement;
+use crate::dom::htmloptgroupelement::HTMLOptGroupElement;
+use crate::dom::htmlscriptelement::HTMLScriptElement;
+use crate::dom::htmlselectelement::HTMLSelectElement;
+use crate::dom::node::{Node, UnbindContext};
+use crate::dom::text::Text;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use std::cell::Cell;
diff --git a/components/script/dom/htmloptionscollection.rs b/components/script/dom/htmloptionscollection.rs
index 1d296cccda8..46cb34f248f 100644
--- a/components/script/dom/htmloptionscollection.rs
+++ b/components/script/dom/htmloptionscollection.rs
@@ -2,24 +2,24 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
-use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
-use dom::bindings::codegen::Bindings::HTMLOptionsCollectionBinding;
-use dom::bindings::codegen::Bindings::HTMLOptionsCollectionBinding::HTMLOptionsCollectionMethods;
-use dom::bindings::codegen::Bindings::HTMLSelectElementBinding::HTMLSelectElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
-use dom::bindings::codegen::UnionTypes::{HTMLOptionElementOrHTMLOptGroupElement, HTMLElementOrLong};
-use dom::bindings::error::{Error, ErrorResult};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::element::Element;
-use dom::htmlcollection::{CollectionFilter, HTMLCollection};
-use dom::htmloptionelement::HTMLOptionElement;
-use dom::htmlselectelement::HTMLSelectElement;
-use dom::node::{document_from_node, Node};
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLOptionsCollectionBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLOptionsCollectionBinding::HTMLOptionsCollectionMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLSelectElementBinding::HTMLSelectElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::UnionTypes::{HTMLOptionElementOrHTMLOptGroupElement, HTMLElementOrLong};
+use crate::dom::bindings::error::{Error, ErrorResult};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::element::Element;
+use crate::dom::htmlcollection::{CollectionFilter, HTMLCollection};
+use crate::dom::htmloptionelement::HTMLOptionElement;
+use crate::dom::htmlselectelement::HTMLSelectElement;
+use crate::dom::node::{document_from_node, Node};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/htmloutputelement.rs b/components/script/dom/htmloutputelement.rs
index f91d09ae42d..0e9f4bad6b6 100644
--- a/components/script/dom/htmloutputelement.rs
+++ b/components/script/dom/htmloutputelement.rs
@@ -2,19 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLOutputElementBinding;
-use dom::bindings::codegen::Bindings::HTMLOutputElementBinding::HTMLOutputElementMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::htmlelement::HTMLElement;
-use dom::htmlformelement::{FormControl, HTMLFormElement};
-use dom::node::{Node, window_from_node};
-use dom::nodelist::NodeList;
-use dom::validitystate::ValidityState;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLOutputElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLOutputElementBinding::HTMLOutputElementMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlformelement::{FormControl, HTMLFormElement};
+use crate::dom::node::{Node, window_from_node};
+use crate::dom::nodelist::NodeList;
+use crate::dom::validitystate::ValidityState;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlparagraphelement.rs b/components/script/dom/htmlparagraphelement.rs
index d2372d72ad3..c578dde8de2 100644
--- a/components/script/dom/htmlparagraphelement.rs
+++ b/components/script/dom/htmlparagraphelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLParagraphElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLParagraphElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlparamelement.rs b/components/script/dom/htmlparamelement.rs
index 704a9822be3..79168831181 100644
--- a/components/script/dom/htmlparamelement.rs
+++ b/components/script/dom/htmlparamelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLParamElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLParamElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlpictureelement.rs b/components/script/dom/htmlpictureelement.rs
index 4a28220eaba..f7f2594a89f 100644
--- a/components/script/dom/htmlpictureelement.rs
+++ b/components/script/dom/htmlpictureelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLPictureElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLPictureElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlpreelement.rs b/components/script/dom/htmlpreelement.rs
index cfbfe11564b..23b68671678 100644
--- a/components/script/dom/htmlpreelement.rs
+++ b/components/script/dom/htmlpreelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLPreElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLPreElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlprogresselement.rs b/components/script/dom/htmlprogresselement.rs
index 30b5ccaf519..752589fcea7 100644
--- a/components/script/dom/htmlprogresselement.rs
+++ b/components/script/dom/htmlprogresselement.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLProgressElementBinding::{self, HTMLProgressElementMethods};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
-use dom::nodelist::NodeList;
+use crate::dom::bindings::codegen::Bindings::HTMLProgressElementBinding::{self, HTMLProgressElementMethods};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
+use crate::dom::nodelist::NodeList;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlquoteelement.rs b/components/script/dom/htmlquoteelement.rs
index e1a428e60e1..cb580f4f5bf 100644
--- a/components/script/dom/htmlquoteelement.rs
+++ b/components/script/dom/htmlquoteelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLQuoteElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLQuoteElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs
index d78a04e93e0..10ecc1786c0 100644
--- a/components/script/dom/htmlscriptelement.rs
+++ b/components/script/dom/htmlscriptelement.rs
@@ -2,26 +2,26 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use document_loader::LoadType;
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
-use dom::bindings::codegen::Bindings::HTMLScriptElementBinding;
-use dom::bindings::codegen::Bindings::HTMLScriptElementBinding::HTMLScriptElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element, ElementCreator};
-use dom::element::{cors_setting_for_element, reflect_cross_origin_attribute, set_cross_origin_attribute};
-use dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
-use dom::globalscope::GlobalScope;
-use dom::htmlelement::HTMLElement;
-use dom::node::{ChildrenMutation, CloneChildrenFlag, Node};
-use dom::node::{document_from_node, window_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::document_loader::LoadType;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLScriptElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLScriptElementBinding::HTMLScriptElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{Dom, DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element, ElementCreator};
+use crate::dom::element::{cors_setting_for_element, reflect_cross_origin_attribute, set_cross_origin_attribute};
+use crate::dom::event::{Event, EventBubbles, EventCancelable, EventStatus};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{ChildrenMutation, CloneChildrenFlag, Node};
+use crate::dom::node::{document_from_node, window_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use encoding_rs::Encoding;
use html5ever::{LocalName, Prefix};
@@ -30,7 +30,7 @@ use ipc_channel::router::ROUTER;
use js::jsval::UndefinedValue;
use net_traits::{FetchMetadata, FetchResponseListener, Metadata, NetworkError};
use net_traits::request::{CorsSettings, CredentialsMode, Destination, RequestInit, RequestMode};
-use network_listener::{NetworkListener, PreInvoke};
+use crate::network_listener::{NetworkListener, PreInvoke};
use servo_atoms::Atom;
use servo_config::opts;
use servo_url::ServoUrl;
@@ -41,7 +41,7 @@ use std::path::PathBuf;
use std::process::{Command, Stdio};
use std::sync::{Arc, Mutex};
use style::str::{HTML_SPACE_CHARACTERS, StaticStringVec};
-use task_source::TaskSourceName;
+use crate::task_source::TaskSourceName;
use uuid::Uuid;
#[dom_struct]
@@ -320,9 +320,9 @@ impl HTMLScriptElement {
// Step 3.
let element = self.upcast::<Element>();
- let async = element.has_attribute(&local_name!("async"));
+ let r#async = element.has_attribute(&local_name!("async"));
// Note: confusingly, this is done if the element does *not* have an "async" attribute.
- if was_parser_inserted && !async {
+ if was_parser_inserted && !r#async {
self.non_blocking.set(true);
}
@@ -438,13 +438,13 @@ impl HTMLScriptElement {
// Preparation for step 23.
let kind =
- if element.has_attribute(&local_name!("defer")) && was_parser_inserted && !async {
+ if element.has_attribute(&local_name!("defer")) && was_parser_inserted && !r#async {
// Step 23.a: classic, has src, has defer, was parser-inserted, is not async.
ExternalScriptKind::Deferred
- } else if was_parser_inserted && !async {
+ } else if was_parser_inserted && !r#async {
// Step 23.c: classic, has src, was parser-inserted, is not async.
ExternalScriptKind::ParsingBlocking
- } else if !async && !self.non_blocking.get() {
+ } else if !r#async && !self.non_blocking.get() {
// Step 23.d: classic, has src, is not async, is not non-blocking.
ExternalScriptKind::AsapInOrder
} else {
diff --git a/components/script/dom/htmlselectelement.rs b/components/script/dom/htmlselectelement.rs
index 4fec663a356..31a1a150d81 100755
--- a/components/script/dom/htmlselectelement.rs
+++ b/components/script/dom/htmlselectelement.rs
@@ -2,34 +2,34 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
-use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
-use dom::bindings::codegen::Bindings::HTMLOptionElementBinding::HTMLOptionElementMethods;
-use dom::bindings::codegen::Bindings::HTMLOptionsCollectionBinding::HTMLOptionsCollectionMethods;
-use dom::bindings::codegen::Bindings::HTMLSelectElementBinding;
-use dom::bindings::codegen::Bindings::HTMLSelectElementBinding::HTMLSelectElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::codegen::UnionTypes::HTMLElementOrLong;
-use dom::bindings::codegen::UnionTypes::HTMLOptionElementOrHTMLOptGroupElement;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLOptionElementBinding::HTMLOptionElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLOptionsCollectionBinding::HTMLOptionsCollectionMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLSelectElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLSelectElementBinding::HTMLSelectElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::UnionTypes::HTMLElementOrLong;
+use crate::dom::bindings::codegen::UnionTypes::HTMLOptionElementOrHTMLOptGroupElement;
//use dom::bindings::error::ErrorResult;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::htmlcollection::CollectionFilter;
-use dom::htmlelement::HTMLElement;
-use dom::htmlfieldsetelement::HTMLFieldSetElement;
-use dom::htmlformelement::{FormDatumValue, FormControl, FormDatum, HTMLFormElement};
-use dom::htmloptgroupelement::HTMLOptGroupElement;
-use dom::htmloptionelement::HTMLOptionElement;
-use dom::htmloptionscollection::HTMLOptionsCollection;
-use dom::node::{Node, UnbindContext, window_from_node};
-use dom::nodelist::NodeList;
-use dom::validation::Validatable;
-use dom::validitystate::{ValidityState, ValidationFlags};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::htmlcollection::CollectionFilter;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
+use crate::dom::htmlformelement::{FormDatumValue, FormControl, FormDatum, HTMLFormElement};
+use crate::dom::htmloptgroupelement::HTMLOptGroupElement;
+use crate::dom::htmloptionelement::HTMLOptionElement;
+use crate::dom::htmloptionscollection::HTMLOptionsCollection;
+use crate::dom::node::{Node, UnbindContext, window_from_node};
+use crate::dom::nodelist::NodeList;
+use crate::dom::validation::Validatable;
+use crate::dom::validitystate::{ValidityState, ValidationFlags};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use std::default::Default;
diff --git a/components/script/dom/htmlsourceelement.rs b/components/script/dom/htmlsourceelement.rs
index 4f175d29c63..b04117e299f 100644
--- a/components/script/dom/htmlsourceelement.rs
+++ b/components/script/dom/htmlsourceelement.rs
@@ -2,21 +2,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLSourceElementBinding;
-use dom::bindings::codegen::Bindings::HTMLSourceElementBinding::HTMLSourceElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, Root};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::AttributeMutation;
-use dom::htmlelement::HTMLElement;
-use dom::htmlimageelement::HTMLImageElement;
-use dom::htmlmediaelement::HTMLMediaElement;
-use dom::node::{Node, UnbindContext};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLSourceElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLSourceElementBinding::HTMLSourceElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{Dom, Root};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::AttributeMutation;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlimageelement::HTMLImageElement;
+use crate::dom::htmlmediaelement::HTMLMediaElement;
+use crate::dom::node::{Node, UnbindContext};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlspanelement.rs b/components/script/dom/htmlspanelement.rs
index a626455c823..ffd6ea1236a 100644
--- a/components/script/dom/htmlspanelement.rs
+++ b/components/script/dom/htmlspanelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLSpanElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLSpanElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlstyleelement.rs b/components/script/dom/htmlstyleelement.rs
index cd0448fb602..bca4d177c32 100644
--- a/components/script/dom/htmlstyleelement.rs
+++ b/components/script/dom/htmlstyleelement.rs
@@ -3,19 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser as CssParser, ParserInput};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::HTMLStyleElementBinding;
-use dom::bindings::codegen::Bindings::HTMLStyleElementBinding::HTMLStyleElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::document::Document;
-use dom::element::{Element, ElementCreator};
-use dom::htmlelement::HTMLElement;
-use dom::node::{ChildrenMutation, Node, UnbindContext, document_from_node, window_from_node};
-use dom::stylesheet::StyleSheet as DOMStyleSheet;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::HTMLStyleElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLStyleElementBinding::HTMLStyleElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::document::Document;
+use crate::dom::element::{Element, ElementCreator};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{ChildrenMutation, Node, UnbindContext, document_from_node, window_from_node};
+use crate::dom::stylesheet::StyleSheet as DOMStyleSheet;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use net_traits::ReferrerPolicy;
@@ -25,7 +25,7 @@ use style::media_queries::MediaList;
use style::parser::ParserContext as CssParserContext;
use style::stylesheets::{CssRuleType, Stylesheet, Origin};
use style_traits::ParsingMode;
-use stylesheet_loader::{StylesheetLoader, StylesheetOwner};
+use crate::stylesheet_loader::{StylesheetLoader, StylesheetOwner};
#[dom_struct]
pub struct HTMLStyleElement {
diff --git a/components/script/dom/htmltablecaptionelement.rs b/components/script/dom/htmltablecaptionelement.rs
index 9f20ef716c5..9e999744bbb 100644
--- a/components/script/dom/htmltablecaptionelement.rs
+++ b/components/script/dom/htmltablecaptionelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLTableCaptionElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLTableCaptionElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs
index ec4819b80ea..07bcc24feb8 100644
--- a/components/script/dom/htmltablecellelement.rs
+++ b/components/script/dom/htmltablecellelement.rs
@@ -3,19 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
-use dom::bindings::codegen::Bindings::HTMLTableCellElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTableCellElementBinding::HTMLTableCellElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::bindings::root::LayoutDom;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{Element, RawLayoutElementHelpers};
-use dom::htmlelement::HTMLElement;
-use dom::htmltablerowelement::HTMLTableRowElement;
-use dom::node::Node;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLTableCellElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTableCellElementBinding::HTMLTableCellElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::root::LayoutDom;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{Element, RawLayoutElementHelpers};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmltablerowelement::HTMLTableRowElement;
+use crate::dom::node::Node;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
diff --git a/components/script/dom/htmltablecolelement.rs b/components/script/dom/htmltablecolelement.rs
index 040a412121a..9014e33fc35 100644
--- a/components/script/dom/htmltablecolelement.rs
+++ b/components/script/dom/htmltablecolelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLTableColElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLTableColElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs
index a9826aea9d0..25ad9fbf094 100644
--- a/components/script/dom/htmltableelement.rs
+++ b/components/script/dom/htmltableelement.rs
@@ -3,25 +3,25 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
-use dom::bindings::codegen::Bindings::HTMLTableElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
-use dom::htmlcollection::{CollectionFilter, HTMLCollection};
-use dom::htmlelement::HTMLElement;
-use dom::htmltablecaptionelement::HTMLTableCaptionElement;
-use dom::htmltablecolelement::HTMLTableColElement;
-use dom::htmltablerowelement::HTMLTableRowElement;
-use dom::htmltablesectionelement::HTMLTableSectionElement;
-use dom::node::{Node, document_from_node, window_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLTableElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
+use crate::dom::htmlcollection::{CollectionFilter, HTMLCollection};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmltablecaptionelement::HTMLTableCaptionElement;
+use crate::dom::htmltablecolelement::HTMLTableColElement;
+use crate::dom::htmltablerowelement::HTMLTableRowElement;
+use crate::dom::htmltablesectionelement::HTMLTableSectionElement;
+use crate::dom::node::{Node, document_from_node, window_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use std::cell::Cell;
diff --git a/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs
index 52bf3ebdfdc..0666c9a90ed 100644
--- a/components/script/dom/htmltablerowelement.rs
+++ b/components/script/dom/htmltablerowelement.rs
@@ -3,23 +3,23 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
-use dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementMethods;
-use dom::bindings::codegen::Bindings::HTMLTableRowElementBinding::{self, HTMLTableRowElementMethods};
-use dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::HTMLTableSectionElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::error::{ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{Element, RawLayoutElementHelpers};
-use dom::htmlcollection::{CollectionFilter, HTMLCollection};
-use dom::htmlelement::HTMLElement;
-use dom::htmltablecellelement::HTMLTableCellElement;
-use dom::htmltableelement::HTMLTableElement;
-use dom::htmltablesectionelement::HTMLTableSectionElement;
-use dom::node::{Node, window_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLTableRowElementBinding::{self, HTMLTableRowElementMethods};
+use crate::dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::HTMLTableSectionElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::error::{ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{Element, RawLayoutElementHelpers};
+use crate::dom::htmlcollection::{CollectionFilter, HTMLCollection};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmltablecellelement::HTMLTableCellElement;
+use crate::dom::htmltableelement::HTMLTableElement;
+use crate::dom::htmltablesectionelement::HTMLTableSectionElement;
+use crate::dom::node::{Node, window_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use style::attr::AttrValue;
diff --git a/components/script/dom/htmltablesectionelement.rs b/components/script/dom/htmltablesectionelement.rs
index 885b03e018d..18a9488e70f 100644
--- a/components/script/dom/htmltablesectionelement.rs
+++ b/components/script/dom/htmltablesectionelement.rs
@@ -3,19 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::RGBA;
-use dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::{self, HTMLTableSectionElementMethods};
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::error::{ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, LayoutDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{Element, RawLayoutElementHelpers};
-use dom::htmlcollection::{CollectionFilter, HTMLCollection};
-use dom::htmlelement::HTMLElement;
-use dom::htmltablerowelement::HTMLTableRowElement;
-use dom::node::{Node, window_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::{self, HTMLTableSectionElementMethods};
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::error::{ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, LayoutDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{Element, RawLayoutElementHelpers};
+use crate::dom::htmlcollection::{CollectionFilter, HTMLCollection};
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmltablerowelement::HTMLTableRowElement;
+use crate::dom::node::{Node, window_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use style::attr::AttrValue;
diff --git a/components/script/dom/htmltemplateelement.rs b/components/script/dom/htmltemplateelement.rs
index 8cfa662332d..f9d8783d975 100644
--- a/components/script/dom/htmltemplateelement.rs
+++ b/components/script/dom/htmltemplateelement.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
-use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::document::Document;
-use dom::documentfragment::DocumentFragment;
-use dom::htmlelement::HTMLElement;
-use dom::node::{CloneChildrenFlag, Node, document_from_node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::document::Document;
+use crate::dom::documentfragment::DocumentFragment;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{CloneChildrenFlag, Node, document_from_node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs
index f3b8a301f74..fbbbd49a3ac 100755
--- a/components/script/dom/htmltextareaelement.rs
+++ b/components/script/dom/htmltextareaelement.rs
@@ -2,32 +2,32 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::HTMLFormElementBinding::SelectionMode;
-use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::error::ErrorResult;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::element::RawLayoutElementHelpers;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::globalscope::GlobalScope;
-use dom::htmlelement::HTMLElement;
-use dom::htmlfieldsetelement::HTMLFieldSetElement;
-use dom::htmlformelement::{FormControl, HTMLFormElement};
-use dom::keyboardevent::KeyboardEvent;
-use dom::node::{CloneChildrenFlag, ChildrenMutation, Node, NodeDamage, UnbindContext};
-use dom::node::{document_from_node, window_from_node};
-use dom::nodelist::NodeList;
-use dom::textcontrol::{TextControlElement, TextControlSelection};
-use dom::validation::Validatable;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLFormElementBinding::SelectionMode;
+use crate::dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTextAreaElementBinding::HTMLTextAreaElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::error::ErrorResult;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::element::RawLayoutElementHelpers;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
+use crate::dom::htmlformelement::{FormControl, HTMLFormElement};
+use crate::dom::keyboardevent::KeyboardEvent;
+use crate::dom::node::{CloneChildrenFlag, ChildrenMutation, Node, NodeDamage, UnbindContext};
+use crate::dom::node::{document_from_node, window_from_node};
+use crate::dom::nodelist::NodeList;
+use crate::dom::textcontrol::{TextControlElement, TextControlSelection};
+use crate::dom::validation::Validatable;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use script_traits::ScriptToConstellationChan;
@@ -36,7 +36,7 @@ use std::default::Default;
use std::ops::Range;
use style::attr::AttrValue;
use style::element_state::ElementState;
-use textinput::{Direction, KeyReaction, Lines, SelectionDirection, TextInput};
+use crate::textinput::{Direction, KeyReaction, Lines, SelectionDirection, TextInput};
#[dom_struct]
pub struct HTMLTextAreaElement {
diff --git a/components/script/dom/htmltimeelement.rs b/components/script/dom/htmltimeelement.rs
index 80f04df41f7..8cf353c2e03 100644
--- a/components/script/dom/htmltimeelement.rs
+++ b/components/script/dom/htmltimeelement.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLTimeElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTimeElementBinding::HTMLTimeElementMethods;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLTimeElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTimeElementBinding::HTMLTimeElementMethods;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmltitleelement.rs b/components/script/dom/htmltitleelement.rs
index bbb8e569394..da4414d9a91 100644
--- a/components/script/dom/htmltitleelement.rs
+++ b/components/script/dom/htmltitleelement.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLTitleElementBinding;
-use dom::bindings::codegen::Bindings::HTMLTitleElementBinding::HTMLTitleElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::{ChildrenMutation, Node};
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLTitleElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLTitleElementBinding::HTMLTitleElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::{ChildrenMutation, Node};
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmltrackelement.rs b/components/script/dom/htmltrackelement.rs
index 6f8112825cb..542e6683d16 100644
--- a/components/script/dom/htmltrackelement.rs
+++ b/components/script/dom/htmltrackelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLTrackElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLTrackElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlulistelement.rs b/components/script/dom/htmlulistelement.rs
index cfab0f3b6fb..41d4026c025 100644
--- a/components/script/dom/htmlulistelement.rs
+++ b/components/script/dom/htmlulistelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLUListElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLUListElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlunknownelement.rs b/components/script/dom/htmlunknownelement.rs
index fa1a14326e3..055d4244d91 100644
--- a/components/script/dom/htmlunknownelement.rs
+++ b/components/script/dom/htmlunknownelement.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLUnknownElementBinding;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlelement::HTMLElement;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLUnknownElementBinding;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
diff --git a/components/script/dom/htmlvideoelement.rs b/components/script/dom/htmlvideoelement.rs
index 25fe6c2d8ed..3f618418268 100644
--- a/components/script/dom/htmlvideoelement.rs
+++ b/components/script/dom/htmlvideoelement.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLVideoElementBinding;
-use dom::bindings::codegen::Bindings::HTMLVideoElementBinding::HTMLVideoElementMethods;
-use dom::bindings::root::DomRoot;
-use dom::document::Document;
-use dom::htmlmediaelement::{HTMLMediaElement, ReadyState};
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::HTMLVideoElementBinding;
+use crate::dom::bindings::codegen::Bindings::HTMLVideoElementBinding::HTMLVideoElementMethods;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::document::Document;
+use crate::dom::htmlmediaelement::{HTMLMediaElement, ReadyState};
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use std::cell::Cell;
diff --git a/components/script/dom/imagedata.rs b/components/script/dom/imagedata.rs
index f72ea49c0ff..82f914a3b86 100644
--- a/components/script/dom/imagedata.rs
+++ b/components/script/dom/imagedata.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::ImageDataBinding;
-use dom::bindings::codegen::Bindings::ImageDataBinding::ImageDataMethods;
-use dom::bindings::error::{Fallible, Error};
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::ImageDataBinding;
+use crate::dom::bindings::codegen::Bindings::ImageDataBinding::ImageDataMethods;
+use crate::dom::bindings::error::{Fallible, Error};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use euclid::{Rect, Size2D};
use js::jsapi::{Heap, JSContext, JSObject};
diff --git a/components/script/dom/inputevent.rs b/components/script/dom/inputevent.rs
index aa4befe8f8a..9159817581f 100644
--- a/components/script/dom/inputevent.rs
+++ b/components/script/dom/inputevent.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::InputEventBinding::{self, InputEventMethods};
-use dom::bindings::codegen::Bindings::UIEventBinding::UIEventBinding::UIEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::uievent::UIEvent;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::InputEventBinding::{self, InputEventMethods};
+use crate::dom::bindings::codegen::Bindings::UIEventBinding::UIEventBinding::UIEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::uievent::UIEvent;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/keyboardevent.rs b/components/script/dom/keyboardevent.rs
index 5f755e98369..03408818663 100644
--- a/components/script/dom/keyboardevent.rs
+++ b/components/script/dom/keyboardevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::KeyboardEventBinding;
-use dom::bindings::codegen::Bindings::KeyboardEventBinding::KeyboardEventMethods;
-use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::event::Event;
-use dom::uievent::UIEvent;
-use dom::window::Window;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::KeyboardEventBinding;
+use crate::dom::bindings::codegen::Bindings::KeyboardEventBinding::KeyboardEventMethods;
+use crate::dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::Event;
+use crate::dom::uievent::UIEvent;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use keyboard_types::{Key, Modifiers};
use std::cell::Cell;
diff --git a/components/script/dom/location.rs b/components/script/dom/location.rs
index 696819b9b47..284b25ee467 100644
--- a/components/script/dom/location.rs
+++ b/components/script/dom/location.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::LocationBinding;
-use dom::bindings::codegen::Bindings::LocationBinding::LocationMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::{DOMString, USVString};
-use dom::globalscope::GlobalScope;
-use dom::urlhelper::UrlHelper;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::LocationBinding;
+use crate::dom::bindings::codegen::Bindings::LocationBinding::LocationMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::urlhelper::UrlHelper;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_url::{MutableOrigin, ServoUrl};
diff --git a/components/script/dom/macros.rs b/components/script/dom/macros.rs
index d7281e5bc9c..1343908c8d7 100644
--- a/components/script/dom/macros.rs
+++ b/components/script/dom/macros.rs
@@ -6,8 +6,8 @@
macro_rules! make_getter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self) -> DOMString {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
element.get_string_attribute(&local_name!($htmlname))
}
@@ -18,8 +18,8 @@ macro_rules! make_getter(
macro_rules! make_bool_getter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self) -> bool {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
element.has_attribute(&local_name!($htmlname))
}
@@ -30,8 +30,8 @@ macro_rules! make_bool_getter(
macro_rules! make_limited_int_setter(
($attr:ident, $htmlname:tt, $default:expr) => (
fn $attr(&self, value: i32) -> $crate::dom::bindings::error::ErrorResult {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let value = if value < 0 {
return Err($crate::dom::bindings::error::Error::IndexSize);
@@ -50,8 +50,8 @@ macro_rules! make_limited_int_setter(
macro_rules! make_int_setter(
($attr:ident, $htmlname:tt, $default:expr) => (
fn $attr(&self, value: i32) {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
element.set_int_attribute(&local_name!($htmlname), value)
@@ -66,8 +66,8 @@ macro_rules! make_int_setter(
macro_rules! make_int_getter(
($attr:ident, $htmlname:tt, $default:expr) => (
fn $attr(&self) -> i32 {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
element.get_int_attribute(&local_name!($htmlname), $default)
}
@@ -82,8 +82,8 @@ macro_rules! make_int_getter(
macro_rules! make_uint_getter(
($attr:ident, $htmlname:tt, $default:expr) => (
fn $attr(&self) -> u32 {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
element.get_uint_attribute(&local_name!($htmlname), $default)
}
@@ -97,8 +97,8 @@ macro_rules! make_uint_getter(
macro_rules! make_url_getter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self) -> DOMString {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
element.get_url_attribute(&local_name!($htmlname))
}
@@ -109,10 +109,10 @@ macro_rules! make_url_getter(
macro_rules! make_form_action_getter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self) -> DOMString {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
- let doc = ::dom::node::document_from_node(self);
+ let doc = crate::dom::node::document_from_node(self);
let attr = element.get_attribute(&ns!(), &local_name!($htmlname));
let value = attr.as_ref().map(|attr| attr.value());
let value = match value {
@@ -131,8 +131,8 @@ macro_rules! make_form_action_getter(
macro_rules! make_enumerated_getter(
( $attr:ident, $htmlname:tt, $default:expr, $($choices: pat)|+) => (
fn $attr(&self) -> DOMString {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
let mut val = element.get_string_attribute(&local_name!($htmlname));
val.make_ascii_lowercase();
@@ -151,8 +151,8 @@ macro_rules! make_enumerated_getter(
macro_rules! make_setter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self, value: DOMString) {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
element.set_string_attribute(&local_name!($htmlname), value)
}
@@ -163,8 +163,8 @@ macro_rules! make_setter(
macro_rules! make_bool_setter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self, value: bool) {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
element.set_bool_attribute(&local_name!($htmlname), value)
}
@@ -187,9 +187,9 @@ macro_rules! make_url_setter(
macro_rules! make_uint_setter(
($attr:ident, $htmlname:tt, $default:expr) => (
fn $attr(&self, value: u32) {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
- use dom::values::UNSIGNED_LONG_MAX;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
+ use crate::dom::values::UNSIGNED_LONG_MAX;
let value = if value > UNSIGNED_LONG_MAX {
$default
} else {
@@ -208,9 +208,9 @@ macro_rules! make_uint_setter(
macro_rules! make_limited_uint_setter(
($attr:ident, $htmlname:tt, $default:expr) => (
fn $attr(&self, value: u32) -> $crate::dom::bindings::error::ErrorResult {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
- use dom::values::UNSIGNED_LONG_MAX;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
+ use crate::dom::values::UNSIGNED_LONG_MAX;
let value = if value == 0 {
return Err($crate::dom::bindings::error::Error::IndexSize);
} else if value > UNSIGNED_LONG_MAX {
@@ -232,8 +232,8 @@ macro_rules! make_limited_uint_setter(
macro_rules! make_atomic_setter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self, value: DOMString) {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
element.set_atomic_attribute(&local_name!($htmlname), value)
}
@@ -244,8 +244,8 @@ macro_rules! make_atomic_setter(
macro_rules! make_legacy_color_setter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self, value: DOMString) {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
use style::attr::AttrValue;
let element = self.upcast::<Element>();
let value = AttrValue::from_legacy_color(value.into());
@@ -258,8 +258,8 @@ macro_rules! make_legacy_color_setter(
macro_rules! make_dimension_setter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self, value: DOMString) {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
let value = AttrValue::from_dimension(value.into());
element.set_attribute(&local_name!($htmlname), value)
@@ -271,8 +271,8 @@ macro_rules! make_dimension_setter(
macro_rules! make_nonzero_dimension_setter(
( $attr:ident, $htmlname:tt ) => (
fn $attr(&self, value: DOMString) {
- use dom::bindings::inheritance::Castable;
- use dom::element::Element;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::element::Element;
let element = self.upcast::<Element>();
let value = AttrValue::from_nonzero_dimension(value.into());
element.set_attribute(&local_name!($htmlname), value)
@@ -316,15 +316,15 @@ macro_rules! jsmanaged_array(
macro_rules! define_event_handler(
($handler: ty, $event_type: ident, $getter: ident, $setter: ident, $setter_fn: ident) => (
fn $getter(&self) -> Option<::std::rc::Rc<$handler>> {
- use dom::bindings::inheritance::Castable;
- use dom::eventtarget::EventTarget;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::eventtarget::EventTarget;
let eventtarget = self.upcast::<EventTarget>();
eventtarget.get_event_handler_common(stringify!($event_type))
}
fn $setter(&self, listener: Option<::std::rc::Rc<$handler>>) {
- use dom::bindings::inheritance::Castable;
- use dom::eventtarget::EventTarget;
+ use crate::dom::bindings::inheritance::Castable;
+ use crate::dom::eventtarget::EventTarget;
let eventtarget = self.upcast::<EventTarget>();
eventtarget.$setter_fn(stringify!($event_type), listener)
}
@@ -354,7 +354,7 @@ macro_rules! define_window_owned_event_handler(
macro_rules! event_handler(
($event_type: ident, $getter: ident, $setter: ident) => (
define_event_handler!(
- ::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull,
+ crate::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull,
$event_type,
$getter,
$setter,
@@ -366,7 +366,7 @@ macro_rules! event_handler(
macro_rules! error_event_handler(
($event_type: ident, $getter: ident, $setter: ident) => (
define_event_handler!(
- ::dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull,
+ crate::dom::bindings::codegen::Bindings::EventHandlerBinding::OnErrorEventHandlerNonNull,
$event_type,
$getter,
$setter,
@@ -378,7 +378,7 @@ macro_rules! error_event_handler(
macro_rules! beforeunload_event_handler(
($event_type: ident, $getter: ident, $setter: ident) => (
define_event_handler!(
- ::dom::bindings::codegen::Bindings::EventHandlerBinding::OnBeforeUnloadEventHandlerNonNull,
+ crate::dom::bindings::codegen::Bindings::EventHandlerBinding::OnBeforeUnloadEventHandlerNonNull,
$event_type,
$getter,
$setter,
@@ -390,7 +390,7 @@ macro_rules! beforeunload_event_handler(
macro_rules! window_owned_event_handler(
($event_type: ident, $getter: ident, $setter: ident) => (
define_window_owned_event_handler!(
- ::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull,
+ crate::dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull,
$event_type,
$getter,
$setter
@@ -401,7 +401,7 @@ macro_rules! window_owned_event_handler(
macro_rules! window_owned_beforeunload_event_handler(
($event_type: ident, $getter: ident, $setter: ident) => (
define_window_owned_event_handler!(
- ::dom::bindings::codegen::Bindings::EventHandlerBinding::OnBeforeUnloadEventHandlerNonNull,
+ crate::dom::bindings::codegen::Bindings::EventHandlerBinding::OnBeforeUnloadEventHandlerNonNull,
$event_type,
$getter,
$setter
@@ -579,12 +579,12 @@ macro_rules! rooted_vec {
/// DOM struct implementation for simple interfaces inheriting from PerformanceEntry.
macro_rules! impl_performance_entry_struct(
($binding:ident, $struct:ident, $type:expr) => (
- use dom::bindings::codegen::Bindings::$binding;
- use dom::bindings::reflector::reflect_dom_object;
- use dom::bindings::root::DomRoot;
- use dom::bindings::str::DOMString;
- use dom::globalscope::GlobalScope;
- use dom::performanceentry::PerformanceEntry;
+ use crate::dom::bindings::codegen::Bindings::$binding;
+ use crate::dom::bindings::reflector::reflect_dom_object;
+ use crate::dom::bindings::root::DomRoot;
+ use crate::dom::bindings::str::DOMString;
+ use crate::dom::globalscope::GlobalScope;
+ use crate::dom::performanceentry::PerformanceEntry;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/mediaerror.rs b/components/script/dom/mediaerror.rs
index 11521af2fcc..6da1cceb101 100644
--- a/components/script/dom/mediaerror.rs
+++ b/components/script/dom/mediaerror.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::MediaErrorBinding::{self, MediaErrorMethods};
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::MediaErrorBinding::{self, MediaErrorMethods};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/medialist.rs b/components/script/dom/medialist.rs
index cf918e236d4..f9bb9d4f38d 100644
--- a/components/script/dom/medialist.rs
+++ b/components/script/dom/medialist.rs
@@ -3,14 +3,14 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cssparser::{Parser, ParserInput};
-use dom::bindings::codegen::Bindings::MediaListBinding;
-use dom::bindings::codegen::Bindings::MediaListBinding::MediaListMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::MediaListBinding;
+use crate::dom::bindings::codegen::Bindings::MediaListBinding::MediaListMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_arc::Arc;
use style::media_queries::MediaList as StyleMediaList;
diff --git a/components/script/dom/mediaquerylist.rs b/components/script/dom/mediaquerylist.rs
index 93941cf2163..5e8cce2c9e8 100644
--- a/components/script/dom/mediaquerylist.rs
+++ b/components/script/dom/mediaquerylist.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventListenerBinding::EventListener;
-use dom::bindings::codegen::Bindings::EventTargetBinding::AddEventListenerOptions;
-use dom::bindings::codegen::Bindings::EventTargetBinding::EventListenerOptions;
-use dom::bindings::codegen::Bindings::MediaQueryListBinding::{self, MediaQueryListMethods};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::eventtarget::EventTarget;
+use crate::dom::bindings::codegen::Bindings::EventListenerBinding::EventListener;
+use crate::dom::bindings::codegen::Bindings::EventTargetBinding::AddEventListenerOptions;
+use crate::dom::bindings::codegen::Bindings::EventTargetBinding::EventListenerOptions;
+use crate::dom::bindings::codegen::Bindings::MediaQueryListBinding::{self, MediaQueryListMethods};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::eventtarget::EventTarget;
use dom_struct::dom_struct;
use std::cell::Cell;
use std::rc::Rc;
diff --git a/components/script/dom/mediaquerylistevent.rs b/components/script/dom/mediaquerylistevent.rs
index 42db9ec5f2d..c21dfa0b984 100644
--- a/components/script/dom/mediaquerylistevent.rs
+++ b/components/script/dom/mediaquerylistevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::MediaQueryListEventBinding;
-use dom::bindings::codegen::Bindings::MediaQueryListEventBinding::MediaQueryListEventInit;
-use dom::bindings::codegen::Bindings::MediaQueryListEventBinding::MediaQueryListEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::event::Event;
-use dom::globalscope::GlobalScope;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::MediaQueryListEventBinding;
+use crate::dom::bindings::codegen::Bindings::MediaQueryListEventBinding::MediaQueryListEventInit;
+use crate::dom::bindings::codegen::Bindings::MediaQueryListEventBinding::MediaQueryListEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::Event;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
use std::cell::Cell;
diff --git a/components/script/dom/messageevent.rs b/components/script/dom/messageevent.rs
index 9e357f1b4d0..74a1891fa1d 100644
--- a/components/script/dom/messageevent.rs
+++ b/components/script/dom/messageevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::MessageEventBinding;
-use dom::bindings::codegen::Bindings::MessageEventBinding::MessageEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::RootedTraceableBox;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::MessageEventBinding;
+use crate::dom::bindings::codegen::Bindings::MessageEventBinding::MessageEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext};
use js::jsval::JSVal;
diff --git a/components/script/dom/mimetype.rs b/components/script/dom/mimetype.rs
index ecef40321e5..d3e2ff64226 100644
--- a/components/script/dom/mimetype.rs
+++ b/components/script/dom/mimetype.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::MimeTypeBinding::MimeTypeMethods;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::plugin::Plugin;
+use crate::dom::bindings::codegen::Bindings::MimeTypeBinding::MimeTypeMethods;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::plugin::Plugin;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/mimetypearray.rs b/components/script/dom/mimetypearray.rs
index e53df85db64..dd1e78ff9ab 100644
--- a/components/script/dom/mimetypearray.rs
+++ b/components/script/dom/mimetypearray.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::MimeTypeArrayBinding;
-use dom::bindings::codegen::Bindings::MimeTypeArrayBinding::MimeTypeArrayMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
-use dom::mimetype::MimeType;
+use crate::dom::bindings::codegen::Bindings::MimeTypeArrayBinding;
+use crate::dom::bindings::codegen::Bindings::MimeTypeArrayBinding::MimeTypeArrayMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::mimetype::MimeType;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/mouseevent.rs b/components/script/dom/mouseevent.rs
index 7524846c839..56ace0c5bd9 100644
--- a/components/script/dom/mouseevent.rs
+++ b/components/script/dom/mouseevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::MouseEventBinding;
-use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
-use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventtarget::EventTarget;
-use dom::uievent::UIEvent;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::MouseEventBinding;
+use crate::dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
+use crate::dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::uievent::UIEvent;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use euclid::Point2D;
use servo_config::prefs::PREFS;
diff --git a/components/script/dom/mutationobserver.rs b/components/script/dom/mutationobserver.rs
index 57f5cf80168..31a0b8a37a3 100644
--- a/components/script/dom/mutationobserver.rs
+++ b/components/script/dom/mutationobserver.rs
@@ -2,23 +2,23 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::callback::ExceptionHandling;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::MutationObserverBinding;
-use dom::bindings::codegen::Bindings::MutationObserverBinding::MutationCallback;
-use dom::bindings::codegen::Bindings::MutationObserverBinding::MutationObserverBinding::MutationObserverMethods;
-use dom::bindings::codegen::Bindings::MutationObserverBinding::MutationObserverInit;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{Reflector, reflect_dom_object, DomObject};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::mutationrecord::MutationRecord;
-use dom::node::Node;
-use dom::window::Window;
+use crate::dom::bindings::callback::ExceptionHandling;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::MutationObserverBinding;
+use crate::dom::bindings::codegen::Bindings::MutationObserverBinding::MutationCallback;
+use crate::dom::bindings::codegen::Bindings::MutationObserverBinding::MutationObserverBinding::MutationObserverMethods;
+use crate::dom::bindings::codegen::Bindings::MutationObserverBinding::MutationObserverInit;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object, DomObject};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::mutationrecord::MutationRecord;
+use crate::dom::node::Node;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use html5ever::{Namespace, LocalName};
-use microtask::Microtask;
-use script_thread::ScriptThread;
+use crate::microtask::Microtask;
+use crate::script_thread::ScriptThread;
use std::rc::Rc;
#[dom_struct]
diff --git a/components/script/dom/mutationrecord.rs b/components/script/dom/mutationrecord.rs
index a3f988e1732..7cf337f5207 100644
--- a/components/script/dom/mutationrecord.rs
+++ b/components/script/dom/mutationrecord.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding;
-use dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding::MutationRecordMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::node::{Node, window_from_node};
-use dom::nodelist::NodeList;
+use crate::dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding;
+use crate::dom::bindings::codegen::Bindings::MutationRecordBinding::MutationRecordBinding::MutationRecordMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::node::{Node, window_from_node};
+use crate::dom::nodelist::NodeList;
use dom_struct::dom_struct;
use html5ever::{LocalName, Namespace};
diff --git a/components/script/dom/namednodemap.rs b/components/script/dom/namednodemap.rs
index c0ed5744355..0303234f783 100644
--- a/components/script/dom/namednodemap.rs
+++ b/components/script/dom/namednodemap.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
-use dom::bindings::codegen::Bindings::NamedNodeMapBinding;
-use dom::bindings::codegen::Bindings::NamedNodeMapBinding::NamedNodeMapMethods;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::bindings::xmlname::namespace_from_domstring;
-use dom::element::Element;
-use dom::window::Window;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
+use crate::dom::bindings::codegen::Bindings::NamedNodeMapBinding;
+use crate::dom::bindings::codegen::Bindings::NamedNodeMapBinding::NamedNodeMapMethods;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::xmlname::namespace_from_domstring;
+use crate::dom::element::Element;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use html5ever::LocalName;
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs
index 486692062e4..44b0fcf632d 100644
--- a/components/script/dom/navigator.rs
+++ b/components/script/dom/navigator.rs
@@ -2,22 +2,22 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::NavigatorBinding;
-use dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods;
-use dom::bindings::codegen::Bindings::VRBinding::VRBinding::VRMethods;
-use dom::bindings::reflector::{Reflector, DomObject, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::bluetooth::Bluetooth;
-use dom::gamepadlist::GamepadList;
-use dom::mimetypearray::MimeTypeArray;
-use dom::navigatorinfo;
-use dom::permissions::Permissions;
-use dom::pluginarray::PluginArray;
-use dom::promise::Promise;
-use dom::serviceworkercontainer::ServiceWorkerContainer;
-use dom::vr::VR;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::NavigatorBinding;
+use crate::dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods;
+use crate::dom::bindings::codegen::Bindings::VRBinding::VRBinding::VRMethods;
+use crate::dom::bindings::reflector::{Reflector, DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bluetooth::Bluetooth;
+use crate::dom::gamepadlist::GamepadList;
+use crate::dom::mimetypearray::MimeTypeArray;
+use crate::dom::navigatorinfo;
+use crate::dom::permissions::Permissions;
+use crate::dom::pluginarray::PluginArray;
+use crate::dom::promise::Promise;
+use crate::dom::serviceworkercontainer::ServiceWorkerContainer;
+use crate::dom::vr::VR;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use std::rc::Rc;
diff --git a/components/script/dom/navigatorinfo.rs b/components/script/dom/navigatorinfo.rs
index fb356623db4..508298562e1 100644
--- a/components/script/dom/navigatorinfo.rs
+++ b/components/script/dom/navigatorinfo.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::str::DOMString;
+use crate::dom::bindings::str::DOMString;
use servo_config::opts;
pub fn Product() -> DOMString {
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 8024f2a04a7..636c5c6e37e 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -6,55 +6,55 @@
use app_units::Au;
use devtools_traits::NodeInfo;
-use document_loader::DocumentLoader;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
-use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
-use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
-use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::{NodeConstants, NodeMethods};
-use dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
-use dom::bindings::codegen::Bindings::ProcessingInstructionBinding::ProcessingInstructionMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::codegen::UnionTypes::NodeOrString;
-use dom::bindings::conversions::{self, DerivedFrom};
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::{Castable, CharacterDataTypeId, ElementTypeId};
-use dom::bindings::inheritance::{EventTargetTypeId, HTMLElementTypeId, NodeTypeId};
-use dom::bindings::inheritance::{SVGElementTypeId, SVGGraphicsElementTypeId};
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
-use dom::bindings::str::{DOMString, USVString};
-use dom::bindings::xmlname::namespace_from_domstring;
-use dom::characterdata::{CharacterData, LayoutCharacterDataHelpers};
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::customelementregistry::{CallbackReaction, try_upgrade_element};
-use dom::document::{Document, DocumentSource, HasBrowsingContext, IsHTMLDocument};
-use dom::documentfragment::DocumentFragment;
-use dom::documenttype::DocumentType;
-use dom::element::{CustomElementCreationMode, Element, ElementCreator};
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::htmlbodyelement::HTMLBodyElement;
-use dom::htmlcanvaselement::{HTMLCanvasElement, LayoutHTMLCanvasElementHelpers};
-use dom::htmlcollection::HTMLCollection;
-use dom::htmlelement::HTMLElement;
-use dom::htmliframeelement::{HTMLIFrameElement, HTMLIFrameElementLayoutMethods};
-use dom::htmlimageelement::{HTMLImageElement, LayoutHTMLImageElementHelpers};
-use dom::htmlinputelement::{HTMLInputElement, LayoutHTMLInputElementHelpers};
-use dom::htmllinkelement::HTMLLinkElement;
-use dom::htmlmediaelement::{HTMLMediaElement, LayoutHTMLMediaElementHelpers};
-use dom::htmlmetaelement::HTMLMetaElement;
-use dom::htmlstyleelement::HTMLStyleElement;
-use dom::htmltextareaelement::{HTMLTextAreaElement, LayoutHTMLTextAreaElementHelpers};
-use dom::mutationobserver::{Mutation, MutationObserver, RegisteredObserver};
-use dom::nodelist::NodeList;
-use dom::processinginstruction::ProcessingInstruction;
-use dom::range::WeakRangeVec;
-use dom::svgsvgelement::{SVGSVGElement, LayoutSVGSVGElementHelpers};
-use dom::text::Text;
-use dom::virtualmethods::{VirtualMethods, vtable_for};
-use dom::window::Window;
+use crate::document_loader::DocumentLoader;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
+use crate::dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::{NodeConstants, NodeMethods};
+use crate::dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
+use crate::dom::bindings::codegen::Bindings::ProcessingInstructionBinding::ProcessingInstructionMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::codegen::UnionTypes::NodeOrString;
+use crate::dom::bindings::conversions::{self, DerivedFrom};
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::{Castable, CharacterDataTypeId, ElementTypeId};
+use crate::dom::bindings::inheritance::{EventTargetTypeId, HTMLElementTypeId, NodeTypeId};
+use crate::dom::bindings::inheritance::{SVGElementTypeId, SVGGraphicsElementTypeId};
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::bindings::xmlname::namespace_from_domstring;
+use crate::dom::characterdata::{CharacterData, LayoutCharacterDataHelpers};
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::customelementregistry::{CallbackReaction, try_upgrade_element};
+use crate::dom::document::{Document, DocumentSource, HasBrowsingContext, IsHTMLDocument};
+use crate::dom::documentfragment::DocumentFragment;
+use crate::dom::documenttype::DocumentType;
+use crate::dom::element::{CustomElementCreationMode, Element, ElementCreator};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlbodyelement::HTMLBodyElement;
+use crate::dom::htmlcanvaselement::{HTMLCanvasElement, LayoutHTMLCanvasElementHelpers};
+use crate::dom::htmlcollection::HTMLCollection;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmliframeelement::{HTMLIFrameElement, HTMLIFrameElementLayoutMethods};
+use crate::dom::htmlimageelement::{HTMLImageElement, LayoutHTMLImageElementHelpers};
+use crate::dom::htmlinputelement::{HTMLInputElement, LayoutHTMLInputElementHelpers};
+use crate::dom::htmllinkelement::HTMLLinkElement;
+use crate::dom::htmlmediaelement::{HTMLMediaElement, LayoutHTMLMediaElementHelpers};
+use crate::dom::htmlmetaelement::HTMLMetaElement;
+use crate::dom::htmlstyleelement::HTMLStyleElement;
+use crate::dom::htmltextareaelement::{HTMLTextAreaElement, LayoutHTMLTextAreaElementHelpers};
+use crate::dom::mutationobserver::{Mutation, MutationObserver, RegisteredObserver};
+use crate::dom::nodelist::NodeList;
+use crate::dom::processinginstruction::ProcessingInstruction;
+use crate::dom::range::WeakRangeVec;
+use crate::dom::svgsvgelement::{SVGSVGElement, LayoutSVGSVGElementHelpers};
+use crate::dom::text::Text;
+use crate::dom::virtualmethods::{VirtualMethods, vtable_for};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use euclid::{Point2D, Vector2D, Rect, Size2D};
use html5ever::{Prefix, Namespace, QualName};
@@ -67,7 +67,7 @@ use ref_slice::ref_slice;
use script_layout_interface::{HTMLCanvasData, HTMLMediaData, LayoutElementType, LayoutNodeType};
use script_layout_interface::{OpaqueStyleAndLayoutData, SVGSVGData, TrustedNodeAddress};
use script_layout_interface::message::Msg;
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use script_traits::DocumentActivity;
use script_traits::UntrustedNodeAddress;
use selectors::matching::{matches_selector_list, MatchingContext, MatchingMode};
@@ -1081,7 +1081,7 @@ pub trait LayoutNodeHelpers {
unsafe fn children_count(&self) -> u32;
unsafe fn get_style_and_layout_data(&self) -> Option<OpaqueStyleAndLayoutData>;
- unsafe fn init_style_and_layout_data(&self, OpaqueStyleAndLayoutData);
+ unsafe fn init_style_and_layout_data(&self, _: OpaqueStyleAndLayoutData);
unsafe fn take_style_and_layout_data(&self) -> OpaqueStyleAndLayoutData;
fn text_content(&self) -> String;
diff --git a/components/script/dom/nodeiterator.rs b/components/script/dom/nodeiterator.rs
index 155bfa980f1..965bbf1a83f 100644
--- a/components/script/dom/nodeiterator.rs
+++ b/components/script/dom/nodeiterator.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::callback::ExceptionHandling::Rethrow;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter;
-use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilterConstants;
-use dom::bindings::codegen::Bindings::NodeIteratorBinding;
-use dom::bindings::codegen::Bindings::NodeIteratorBinding::NodeIteratorMethods;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutDom};
-use dom::document::Document;
-use dom::node::Node;
+use crate::dom::bindings::callback::ExceptionHandling::Rethrow;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter;
+use crate::dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilterConstants;
+use crate::dom::bindings::codegen::Bindings::NodeIteratorBinding;
+use crate::dom::bindings::codegen::Bindings::NodeIteratorBinding::NodeIteratorMethods;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutDom};
+use crate::dom::document::Document;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use std::cell::Cell;
use std::rc::Rc;
diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs
index 6d3fed9a5af..ddf78a350ed 100644
--- a/components/script/dom/nodelist.rs
+++ b/components/script/dom/nodelist.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::NodeListBinding;
-use dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom, RootedReference};
-use dom::node::{ChildrenMutation, Node};
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::NodeListBinding;
+use crate::dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom, RootedReference};
+use crate::dom::node::{ChildrenMutation, Node};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use std::cell::Cell;
diff --git a/components/script/dom/offlineaudiocompletionevent.rs b/components/script/dom/offlineaudiocompletionevent.rs
index 91edf35338c..045e0ad2242 100644
--- a/components/script/dom/offlineaudiocompletionevent.rs
+++ b/components/script/dom/offlineaudiocompletionevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audiobuffer::AudioBuffer;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::OfflineAudioCompletionEventBinding;
-use dom::bindings::codegen::Bindings::OfflineAudioCompletionEventBinding::OfflineAudioCompletionEventInit;
-use dom::bindings::codegen::Bindings::OfflineAudioCompletionEventBinding::OfflineAudioCompletionEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::window::Window;
+use crate::dom::audiobuffer::AudioBuffer;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::OfflineAudioCompletionEventBinding;
+use crate::dom::bindings::codegen::Bindings::OfflineAudioCompletionEventBinding::OfflineAudioCompletionEventInit;
+use crate::dom::bindings::codegen::Bindings::OfflineAudioCompletionEventBinding::OfflineAudioCompletionEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/offlineaudiocontext.rs b/components/script/dom/offlineaudiocontext.rs
index 7e967d0078a..d6acf4a11d3 100644
--- a/components/script/dom/offlineaudiocontext.rs
+++ b/components/script/dom/offlineaudiocontext.rs
@@ -2,24 +2,24 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audiobuffer::{AudioBuffer, MAX_SAMPLE_RATE, MIN_SAMPLE_RATE};
-use dom::audionode::MAX_CHANNEL_COUNT;
-use dom::baseaudiocontext::{BaseAudioContext, BaseAudioContextOptions};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextBinding::BaseAudioContextMethods;
-use dom::bindings::codegen::Bindings::OfflineAudioContextBinding;
-use dom::bindings::codegen::Bindings::OfflineAudioContextBinding::OfflineAudioContextMethods;
-use dom::bindings::codegen::Bindings::OfflineAudioContextBinding::OfflineAudioContextOptions;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::offlineaudiocompletionevent::OfflineAudioCompletionEvent;
-use dom::promise::Promise;
-use dom::window::Window;
+use crate::dom::audiobuffer::{AudioBuffer, MAX_SAMPLE_RATE, MIN_SAMPLE_RATE};
+use crate::dom::audionode::MAX_CHANNEL_COUNT;
+use crate::dom::baseaudiocontext::{BaseAudioContext, BaseAudioContextOptions};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BaseAudioContextBinding::BaseAudioContextBinding::BaseAudioContextMethods;
+use crate::dom::bindings::codegen::Bindings::OfflineAudioContextBinding;
+use crate::dom::bindings::codegen::Bindings::OfflineAudioContextBinding::OfflineAudioContextMethods;
+use crate::dom::bindings::codegen::Bindings::OfflineAudioContextBinding::OfflineAudioContextOptions;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::offlineaudiocompletionevent::OfflineAudioCompletionEvent;
+use crate::dom::promise::Promise;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_media::audio::context::OfflineAudioContextOptions as ServoMediaOfflineAudioContextOptions;
use std::cell::Cell;
@@ -27,7 +27,7 @@ use std::rc::Rc;
use std::sync::{Arc, Mutex};
use std::sync::mpsc;
use std::thread::Builder;
-use task_source::{TaskSource, TaskSourceName};
+use crate::task_source::{TaskSource, TaskSourceName};
#[dom_struct]
pub struct OfflineAudioContext {
diff --git a/components/script/dom/oscillatornode.rs b/components/script/dom/oscillatornode.rs
index b79368cbf38..0263be2d161 100644
--- a/components/script/dom/oscillatornode.rs
+++ b/components/script/dom/oscillatornode.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audioparam::AudioParam;
-use dom::audioscheduledsourcenode::AudioScheduledSourceNode;
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
-use dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
-use dom::bindings::codegen::Bindings::OscillatorNodeBinding::{self, OscillatorOptions, OscillatorType};
-use dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorNodeMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::window::Window;
+use crate::dom::audioparam::AudioParam;
+use crate::dom::audioscheduledsourcenode::AudioScheduledSourceNode;
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
+use crate::dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
+use crate::dom::bindings::codegen::Bindings::OscillatorNodeBinding::{self, OscillatorOptions, OscillatorType};
+use crate::dom::bindings::codegen::Bindings::OscillatorNodeBinding::OscillatorNodeMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_media::audio::node::AudioNodeInit;
use servo_media::audio::oscillator_node::OscillatorNodeOptions as ServoMediaOscillatorOptions;
diff --git a/components/script/dom/pagetransitionevent.rs b/components/script/dom/pagetransitionevent.rs
index 6bcedd977b1..d6811989a11 100644
--- a/components/script/dom/pagetransitionevent.rs
+++ b/components/script/dom/pagetransitionevent.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::PageTransitionEventBinding;
-use dom::bindings::codegen::Bindings::PageTransitionEventBinding::PageTransitionEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::event::Event;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::PageTransitionEventBinding;
+use crate::dom::bindings::codegen::Bindings::PageTransitionEventBinding::PageTransitionEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::Event;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
use std::cell::Cell;
diff --git a/components/script/dom/paintrenderingcontext2d.rs b/components/script/dom/paintrenderingcontext2d.rs
index 1389dddcf3a..756471b998b 100644
--- a/components/script/dom/paintrenderingcontext2d.rs
+++ b/components/script/dom/paintrenderingcontext2d.rs
@@ -5,26 +5,26 @@
use canvas_traits::canvas::CanvasImageData;
use canvas_traits::canvas::CanvasMsg;
use canvas_traits::canvas::FromLayoutMsg;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasFillRule;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasImageSource;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineCap;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineJoin;
-use dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasRenderingContext2DMethods;
-use dom::bindings::codegen::Bindings::PaintRenderingContext2DBinding;
-use dom::bindings::codegen::Bindings::PaintRenderingContext2DBinding::PaintRenderingContext2DMethods;
-use dom::bindings::codegen::UnionTypes::StringOrCanvasGradientOrCanvasPattern;
-use dom::bindings::error::ErrorResult;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::canvasgradient::CanvasGradient;
-use dom::canvaspattern::CanvasPattern;
-use dom::canvasrenderingcontext2d::CanvasRenderingContext2D;
-use dom::paintworkletglobalscope::PaintWorkletGlobalScope;
-use dom::workletglobalscope::WorkletGlobalScope;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasFillRule;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasImageSource;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineCap;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasLineJoin;
+use crate::dom::bindings::codegen::Bindings::CanvasRenderingContext2DBinding::CanvasRenderingContext2DMethods;
+use crate::dom::bindings::codegen::Bindings::PaintRenderingContext2DBinding;
+use crate::dom::bindings::codegen::Bindings::PaintRenderingContext2DBinding::PaintRenderingContext2DMethods;
+use crate::dom::bindings::codegen::UnionTypes::StringOrCanvasGradientOrCanvasPattern;
+use crate::dom::bindings::error::ErrorResult;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::canvasgradient::CanvasGradient;
+use crate::dom::canvaspattern::CanvasPattern;
+use crate::dom::canvasrenderingcontext2d::CanvasRenderingContext2D;
+use crate::dom::paintworkletglobalscope::PaintWorkletGlobalScope;
+use crate::dom::workletglobalscope::WorkletGlobalScope;
use dom_struct::dom_struct;
use euclid::Size2D;
use euclid::TypedScale;
diff --git a/components/script/dom/paintsize.rs b/components/script/dom/paintsize.rs
index cc8458c2856..cbf46a9ddbe 100644
--- a/components/script/dom/paintsize.rs
+++ b/components/script/dom/paintsize.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::PaintSizeBinding;
-use dom::bindings::codegen::Bindings::PaintSizeBinding::PaintSizeMethods;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::paintworkletglobalscope::PaintWorkletGlobalScope;
+use crate::dom::bindings::codegen::Bindings::PaintSizeBinding;
+use crate::dom::bindings::codegen::Bindings::PaintSizeBinding::PaintSizeMethods;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::paintworkletglobalscope::PaintWorkletGlobalScope;
use dom_struct::dom_struct;
use euclid::TypedSize2D;
use style_traits::CSSPixel;
diff --git a/components/script/dom/paintworkletglobalscope.rs b/components/script/dom/paintworkletglobalscope.rs
index cc58a07b960..b6d693a1f22 100644
--- a/components/script/dom/paintworkletglobalscope.rs
+++ b/components/script/dom/paintworkletglobalscope.rs
@@ -2,27 +2,27 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::callback::CallbackContainer;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::PaintWorkletGlobalScopeBinding;
-use dom::bindings::codegen::Bindings::PaintWorkletGlobalScopeBinding::PaintWorkletGlobalScopeMethods;
-use dom::bindings::codegen::Bindings::VoidFunctionBinding::VoidFunction;
-use dom::bindings::conversions::get_property;
-use dom::bindings::conversions::get_property_jsval;
-use dom::bindings::error::Error;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::cssstylevalue::CSSStyleValue;
-use dom::paintrenderingcontext2d::PaintRenderingContext2D;
-use dom::paintsize::PaintSize;
-use dom::stylepropertymapreadonly::StylePropertyMapReadOnly;
-use dom::worklet::WorkletExecutor;
-use dom::workletglobalscope::WorkletGlobalScope;
-use dom::workletglobalscope::WorkletGlobalScopeInit;
-use dom::workletglobalscope::WorkletTask;
+use crate::dom::bindings::callback::CallbackContainer;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::PaintWorkletGlobalScopeBinding;
+use crate::dom::bindings::codegen::Bindings::PaintWorkletGlobalScopeBinding::PaintWorkletGlobalScopeMethods;
+use crate::dom::bindings::codegen::Bindings::VoidFunctionBinding::VoidFunction;
+use crate::dom::bindings::conversions::get_property;
+use crate::dom::bindings::conversions::get_property_jsval;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssstylevalue::CSSStyleValue;
+use crate::dom::paintrenderingcontext2d::PaintRenderingContext2D;
+use crate::dom::paintsize::PaintSize;
+use crate::dom::stylepropertymapreadonly::StylePropertyMapReadOnly;
+use crate::dom::worklet::WorkletExecutor;
+use crate::dom::workletglobalscope::WorkletGlobalScope;
+use crate::dom::workletglobalscope::WorkletGlobalScopeInit;
+use crate::dom::workletglobalscope::WorkletTask;
use dom_struct::dom_struct;
use euclid::TypedScale;
use euclid::TypedSize2D;
diff --git a/components/script/dom/pannernode.rs b/components/script/dom/pannernode.rs
index 80453693d6a..b63ab59957f 100644
--- a/components/script/dom/pannernode.rs
+++ b/components/script/dom/pannernode.rs
@@ -2,19 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::audionode::AudioNode;
-use dom::audioparam::AudioParam;
-use dom::baseaudiocontext::BaseAudioContext;
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
-use dom::bindings::codegen::Bindings::AudioParamBinding::{AudioParamMethods, AutomationRate};
-use dom::bindings::codegen::Bindings::PannerNodeBinding::{self, PannerNodeMethods, PannerOptions};
-use dom::bindings::codegen::Bindings::PannerNodeBinding::{DistanceModelType, PanningModelType};
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::window::Window;
+use crate::dom::audionode::AudioNode;
+use crate::dom::audioparam::AudioParam;
+use crate::dom::baseaudiocontext::BaseAudioContext;
+use crate::dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
+use crate::dom::bindings::codegen::Bindings::AudioParamBinding::{AudioParamMethods, AutomationRate};
+use crate::dom::bindings::codegen::Bindings::PannerNodeBinding::{self, PannerNodeMethods, PannerOptions};
+use crate::dom::bindings::codegen::Bindings::PannerNodeBinding::{DistanceModelType, PanningModelType};
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_media::audio::node::{AudioNodeInit, AudioNodeMessage};
use servo_media::audio::panner_node::{DistanceModel, PannerNodeOptions, PanningModel};
diff --git a/components/script/dom/performance.rs b/components/script/dom/performance.rs
index f421822fc86..f8eeaf06966 100644
--- a/components/script/dom/performance.rs
+++ b/components/script/dom/performance.rs
@@ -2,23 +2,23 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::PerformanceBinding;
-use dom::bindings::codegen::Bindings::PerformanceBinding::{DOMHighResTimeStamp, PerformanceMethods};
-use dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceEntryList as DOMPerformanceEntryList;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
-use dom::performanceentry::PerformanceEntry;
-use dom::performancemark::PerformanceMark;
-use dom::performancemeasure::PerformanceMeasure;
-use dom::performanceobserver::PerformanceObserver as DOMPerformanceObserver;
-use dom::performancetiming::PerformanceTiming;
-use dom::window::Window;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::PerformanceBinding;
+use crate::dom::bindings::codegen::Bindings::PerformanceBinding::{DOMHighResTimeStamp, PerformanceMethods};
+use crate::dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceEntryList as DOMPerformanceEntryList;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::performanceentry::PerformanceEntry;
+use crate::dom::performancemark::PerformanceMark;
+use crate::dom::performancemeasure::PerformanceMeasure;
+use crate::dom::performanceobserver::PerformanceObserver as DOMPerformanceObserver;
+use crate::dom::performancetiming::PerformanceTiming;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use metrics::ToMs;
use std::cell::Cell;
diff --git a/components/script/dom/performanceentry.rs b/components/script/dom/performanceentry.rs
index 71ab83fb42b..f00c654dce0 100644
--- a/components/script/dom/performanceentry.rs
+++ b/components/script/dom/performanceentry.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::PerformanceEntryBinding;
-use dom::bindings::codegen::Bindings::PerformanceEntryBinding::PerformanceEntryMethods;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::PerformanceEntryBinding;
+use crate::dom::bindings::codegen::Bindings::PerformanceEntryBinding::PerformanceEntryMethods;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/performanceobserver.rs b/components/script/dom/performanceobserver.rs
index fd51faafbe6..2cc68f79e74 100644
--- a/components/script/dom/performanceobserver.rs
+++ b/components/script/dom/performanceobserver.rs
@@ -2,21 +2,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::callback::ExceptionHandling;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceEntryList as DOMPerformanceEntryList;
-use dom::bindings::codegen::Bindings::PerformanceObserverBinding;
-use dom::bindings::codegen::Bindings::PerformanceObserverBinding::PerformanceObserverCallback;
-use dom::bindings::codegen::Bindings::PerformanceObserverBinding::PerformanceObserverInit;
-use dom::bindings::codegen::Bindings::PerformanceObserverBinding::PerformanceObserverMethods;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
-use dom::performance::PerformanceEntryList;
-use dom::performanceentry::PerformanceEntry;
-use dom::performanceobserverentrylist::PerformanceObserverEntryList;
+use crate::dom::bindings::callback::ExceptionHandling;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceEntryList as DOMPerformanceEntryList;
+use crate::dom::bindings::codegen::Bindings::PerformanceObserverBinding;
+use crate::dom::bindings::codegen::Bindings::PerformanceObserverBinding::PerformanceObserverCallback;
+use crate::dom::bindings::codegen::Bindings::PerformanceObserverBinding::PerformanceObserverInit;
+use crate::dom::bindings::codegen::Bindings::PerformanceObserverBinding::PerformanceObserverMethods;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::performance::PerformanceEntryList;
+use crate::dom::performanceentry::PerformanceEntry;
+use crate::dom::performanceobserverentrylist::PerformanceObserverEntryList;
use dom_struct::dom_struct;
use std::rc::Rc;
diff --git a/components/script/dom/performanceobserverentrylist.rs b/components/script/dom/performanceobserverentrylist.rs
index 5b45a7267fb..0fcac36848c 100644
--- a/components/script/dom/performanceobserverentrylist.rs
+++ b/components/script/dom/performanceobserverentrylist.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::PerformanceObserverEntryListBinding;
-use dom::bindings::codegen::Bindings::PerformanceObserverEntryListBinding::PerformanceObserverEntryListMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
-use dom::performance::PerformanceEntryList;
-use dom::performanceentry::PerformanceEntry;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::PerformanceObserverEntryListBinding;
+use crate::dom::bindings::codegen::Bindings::PerformanceObserverEntryListBinding::PerformanceObserverEntryListMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::performance::PerformanceEntryList;
+use crate::dom::performanceentry::PerformanceEntry;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/performancepainttiming.rs b/components/script/dom/performancepainttiming.rs
index bef691a99cd..898f5c1b623 100644
--- a/components/script/dom/performancepainttiming.rs
+++ b/components/script/dom/performancepainttiming.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::PerformancePaintTimingBinding;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
-use dom::performanceentry::PerformanceEntry;
+use crate::dom::bindings::codegen::Bindings::PerformancePaintTimingBinding;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::performanceentry::PerformanceEntry;
use dom_struct::dom_struct;
use metrics::ToMs;
use script_traits::ProgressiveWebMetricType;
diff --git a/components/script/dom/performancetiming.rs b/components/script/dom/performancetiming.rs
index 22dd840d019..7e2dd68c2d1 100644
--- a/components/script/dom/performancetiming.rs
+++ b/components/script/dom/performancetiming.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::PerformanceTimingBinding;
-use dom::bindings::codegen::Bindings::PerformanceTimingBinding::PerformanceTimingMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::document::Document;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::PerformanceTimingBinding;
+use crate::dom::bindings::codegen::Bindings::PerformanceTimingBinding::PerformanceTimingMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::document::Document;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/permissions.rs b/components/script/dom/permissions.rs
index 325485ee950..9e6dd0b2cc4 100644
--- a/components/script/dom/permissions.rs
+++ b/components/script/dom/permissions.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::PermissionStatusBinding::{PermissionDescriptor, PermissionName, PermissionState};
-use dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionStatusMethods;
-use dom::bindings::codegen::Bindings::PermissionsBinding::{self, PermissionsMethods};
-use dom::bindings::error::Error;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bluetooth::Bluetooth;
-use dom::bluetoothpermissionresult::BluetoothPermissionResult;
-use dom::globalscope::GlobalScope;
-use dom::permissionstatus::PermissionStatus;
-use dom::promise::Promise;
+use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::{PermissionDescriptor, PermissionName, PermissionState};
+use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionStatusMethods;
+use crate::dom::bindings::codegen::Bindings::PermissionsBinding::{self, PermissionsMethods};
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bluetooth::Bluetooth;
+use crate::dom::bluetoothpermissionresult::BluetoothPermissionResult;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::permissionstatus::PermissionStatus;
+use crate::dom::promise::Promise;
use dom_struct::dom_struct;
use js::conversions::ConversionResult;
use js::jsapi::{JSContext, JSObject};
diff --git a/components/script/dom/permissionstatus.rs b/components/script/dom/permissionstatus.rs
index 6121f8c9496..1782eef5351 100644
--- a/components/script/dom/permissionstatus.rs
+++ b/components/script/dom/permissionstatus.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::PermissionStatusBinding::{self, PermissionDescriptor, PermissionName};
-use dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionState;
-use dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionStatusMethods;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::{self, PermissionDescriptor, PermissionName};
+use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionState;
+use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionStatusMethods;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use std::cell::Cell;
use std::fmt::{self, Display, Formatter};
diff --git a/components/script/dom/plugin.rs b/components/script/dom/plugin.rs
index ebdd5478280..1f80e2d8bd9 100644
--- a/components/script/dom/plugin.rs
+++ b/components/script/dom/plugin.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::PluginBinding::PluginMethods;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::mimetype::MimeType;
+use crate::dom::bindings::codegen::Bindings::PluginBinding::PluginMethods;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::mimetype::MimeType;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/pluginarray.rs b/components/script/dom/pluginarray.rs
index 38a53baef50..c151d5c617f 100644
--- a/components/script/dom/pluginarray.rs
+++ b/components/script/dom/pluginarray.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::PluginArrayBinding;
-use dom::bindings::codegen::Bindings::PluginArrayBinding::PluginArrayMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
-use dom::plugin::Plugin;
+use crate::dom::bindings::codegen::Bindings::PluginArrayBinding;
+use crate::dom::bindings::codegen::Bindings::PluginArrayBinding::PluginArrayMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::plugin::Plugin;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/popstateevent.rs b/components/script/dom/popstateevent.rs
index 44b9e0f6e9f..2fc72682094 100644
--- a/components/script/dom/popstateevent.rs
+++ b/components/script/dom/popstateevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::PopStateEventBinding;
-use dom::bindings::codegen::Bindings::PopStateEventBinding::PopStateEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::RootedTraceableBox;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::PopStateEventBinding;
+use crate::dom::bindings::codegen::Bindings::PopStateEventBinding::PopStateEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext};
use js::jsval::JSVal;
diff --git a/components/script/dom/processinginstruction.rs b/components/script/dom/processinginstruction.rs
index 605a6210485..5be09ea452d 100644
--- a/components/script/dom/processinginstruction.rs
+++ b/components/script/dom/processinginstruction.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::ProcessingInstructionBinding;
-use dom::bindings::codegen::Bindings::ProcessingInstructionBinding::ProcessingInstructionMethods;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::characterdata::CharacterData;
-use dom::document::Document;
-use dom::node::Node;
+use crate::dom::bindings::codegen::Bindings::ProcessingInstructionBinding;
+use crate::dom::bindings::codegen::Bindings::ProcessingInstructionBinding::ProcessingInstructionMethods;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::characterdata::CharacterData;
+use crate::dom::document::Document;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
/// An HTML processing instruction node.
diff --git a/components/script/dom/progressevent.rs b/components/script/dom/progressevent.rs
index a2516ea4442..b5f964d02fc 100644
--- a/components/script/dom/progressevent.rs
+++ b/components/script/dom/progressevent.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::ProgressEventBinding;
-use dom::bindings::codegen::Bindings::ProgressEventBinding::ProgressEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::ProgressEventBinding;
+use crate::dom::bindings::codegen::Bindings::ProgressEventBinding::ProgressEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/promise.rs b/components/script/dom/promise.rs
index e7e40fb188b..f348bd1b8c5 100644
--- a/components/script/dom/promise.rs
+++ b/components/script/dom/promise.rs
@@ -11,12 +11,12 @@
//! native Promise values that refer to the same JS value yet are distinct native objects
//! (ie. address equality for the native objects is meaningless).
-use dom::bindings::conversions::root_from_object;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{DomObject, MutDomObject, Reflector};
-use dom::bindings::utils::AsCCharPtrPtr;
-use dom::globalscope::GlobalScope;
-use dom::promisenativehandler::PromiseNativeHandler;
+use crate::dom::bindings::conversions::root_from_object;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{DomObject, MutDomObject, Reflector};
+use crate::dom::bindings::utils::AsCCharPtrPtr;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promisenativehandler::PromiseNativeHandler;
use dom_struct::dom_struct;
use js::conversions::ToJSValConvertible;
use js::jsapi::{AddRawValueRoot, CallArgs, GetFunctionNativeReserved};
diff --git a/components/script/dom/promisenativehandler.rs b/components/script/dom/promisenativehandler.rs
index fa54d454b1a..3ebb8c58b79 100644
--- a/components/script/dom/promisenativehandler.rs
+++ b/components/script/dom/promisenativehandler.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::PromiseNativeHandlerBinding;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::trace::JSTraceable;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::PromiseNativeHandlerBinding;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::JSContext;
use js::rust::HandleValue;
diff --git a/components/script/dom/promiserejectionevent.rs b/components/script/dom/promiserejectionevent.rs
index 500e59643cd..8791108e643 100644
--- a/components/script/dom/promiserejectionevent.rs
+++ b/components/script/dom/promiserejectionevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::PromiseRejectionEventBinding;
-use dom::bindings::codegen::Bindings::PromiseRejectionEventBinding::PromiseRejectionEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::RootedTraceableBox;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::PromiseRejectionEventBinding;
+use crate::dom::bindings::codegen::Bindings::PromiseRejectionEventBinding::PromiseRejectionEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext};
use js::jsval::JSVal;
diff --git a/components/script/dom/radionodelist.rs b/components/script/dom/radionodelist.rs
index 956b0bf3313..8ab5dddd53f 100644
--- a/components/script/dom/radionodelist.rs
+++ b/components/script/dom/radionodelist.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods;
-use dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
-use dom::bindings::codegen::Bindings::RadioNodeListBinding;
-use dom::bindings::codegen::Bindings::RadioNodeListBinding::RadioNodeListMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::htmlinputelement::{HTMLInputElement, InputType};
-use dom::node::Node;
-use dom::nodelist::{NodeList, NodeListType};
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::HTMLInputElementBinding::HTMLInputElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
+use crate::dom::bindings::codegen::Bindings::RadioNodeListBinding;
+use crate::dom::bindings::codegen::Bindings::RadioNodeListBinding::RadioNodeListMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::htmlinputelement::{HTMLInputElement, InputType};
+use crate::dom::node::Node;
+use crate::dom::nodelist::{NodeList, NodeListType};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/range.rs b/components/script/dom/range.rs
index 9123a2c67e3..7bba5ad9f00 100644
--- a/components/script/dom/range.rs
+++ b/components/script/dom/range.rs
@@ -2,30 +2,30 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeConstants;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
-use dom::bindings::codegen::Bindings::RangeBinding::{self, RangeConstants};
-use dom::bindings::codegen::Bindings::RangeBinding::RangeMethods;
-use dom::bindings::codegen::Bindings::TextBinding::TextMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::{CharacterDataTypeId, NodeTypeId};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::JSTraceable;
-use dom::bindings::weakref::{WeakRef, WeakRefVec};
-use dom::characterdata::CharacterData;
-use dom::document::Document;
-use dom::documentfragment::DocumentFragment;
-use dom::element::Element;
-use dom::htmlscriptelement::HTMLScriptElement;
-use dom::node::{Node, UnbindContext};
-use dom::text::Text;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeConstants;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods;
+use crate::dom::bindings::codegen::Bindings::RangeBinding::{self, RangeConstants};
+use crate::dom::bindings::codegen::Bindings::RangeBinding::RangeMethods;
+use crate::dom::bindings::codegen::Bindings::TextBinding::TextMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::{CharacterDataTypeId, NodeTypeId};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::bindings::weakref::{WeakRef, WeakRefVec};
+use crate::dom::characterdata::CharacterData;
+use crate::dom::document::Document;
+use crate::dom::documentfragment::DocumentFragment;
+use crate::dom::element::Element;
+use crate::dom::htmlscriptelement::HTMLScriptElement;
+use crate::dom::node::{Node, UnbindContext};
+use crate::dom::text::Text;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use js::jsapi::JSTracer;
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
diff --git a/components/script/dom/request.rs b/components/script/dom/request.rs
index ceb64ec45ce..8a6d7108a0f 100644
--- a/components/script/dom/request.rs
+++ b/components/script/dom/request.rs
@@ -2,28 +2,28 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use body::{BodyOperations, BodyType, consume_body};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods};
-use dom::bindings::codegen::Bindings::RequestBinding;
-use dom::bindings::codegen::Bindings::RequestBinding::ReferrerPolicy;
-use dom::bindings::codegen::Bindings::RequestBinding::RequestCache;
-use dom::bindings::codegen::Bindings::RequestBinding::RequestCredentials;
-use dom::bindings::codegen::Bindings::RequestBinding::RequestDestination;
-use dom::bindings::codegen::Bindings::RequestBinding::RequestInfo;
-use dom::bindings::codegen::Bindings::RequestBinding::RequestInit;
-use dom::bindings::codegen::Bindings::RequestBinding::RequestMethods;
-use dom::bindings::codegen::Bindings::RequestBinding::RequestMode;
-use dom::bindings::codegen::Bindings::RequestBinding::RequestRedirect;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::{ByteString, DOMString, USVString};
-use dom::bindings::trace::RootedTraceableBox;
-use dom::globalscope::GlobalScope;
-use dom::headers::{Guard, Headers};
-use dom::promise::Promise;
-use dom::xmlhttprequest::Extractable;
+use crate::body::{BodyOperations, BodyType, consume_body};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods};
+use crate::dom::bindings::codegen::Bindings::RequestBinding;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::ReferrerPolicy;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestCache;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestCredentials;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestDestination;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestInfo;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestInit;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestMethods;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestMode;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestRedirect;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::{ByteString, DOMString, USVString};
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::headers::{Guard, Headers};
+use crate::dom::promise::Promise;
+use crate::dom::xmlhttprequest::Extractable;
use dom_struct::dom_struct;
use http::Method as HttpMethod;
use http::method::InvalidMethod;
diff --git a/components/script/dom/response.rs b/components/script/dom/response.rs
index 828dfc56515..174b6782b1c 100644
--- a/components/script/dom/response.rs
+++ b/components/script/dom/response.rs
@@ -2,21 +2,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use body::{BodyOperations, BodyType, consume_body, consume_body_with_promise};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods};
-use dom::bindings::codegen::Bindings::ResponseBinding;
-use dom::bindings::codegen::Bindings::ResponseBinding::{ResponseMethods, ResponseType as DOMResponseType};
-use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::BodyInit;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::{ByteString, USVString};
-use dom::globalscope::GlobalScope;
-use dom::headers::{Headers, Guard};
-use dom::headers::{is_vchar, is_obs_text};
-use dom::promise::Promise;
-use dom::xmlhttprequest::Extractable;
+use crate::body::{BodyOperations, BodyType, consume_body, consume_body_with_promise};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::HeadersBinding::{HeadersInit, HeadersMethods};
+use crate::dom::bindings::codegen::Bindings::ResponseBinding;
+use crate::dom::bindings::codegen::Bindings::ResponseBinding::{ResponseMethods, ResponseType as DOMResponseType};
+use crate::dom::bindings::codegen::Bindings::XMLHttpRequestBinding::BodyInit;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::{ByteString, USVString};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::headers::{Headers, Guard};
+use crate::dom::headers::{is_vchar, is_obs_text};
+use crate::dom::promise::Promise;
+use crate::dom::xmlhttprequest::Extractable;
use dom_struct::dom_struct;
use http::header::HeaderMap as HyperHeaders;
use hyper::StatusCode;
diff --git a/components/script/dom/screen.rs b/components/script/dom/screen.rs
index d5a67de4ab9..0e8b853ad79 100644
--- a/components/script/dom/screen.rs
+++ b/components/script/dom/screen.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::ScreenBinding;
-use dom::bindings::codegen::Bindings::ScreenBinding::ScreenMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::globalscope::GlobalScope;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::ScreenBinding;
+use crate::dom::bindings::codegen::Bindings::ScreenBinding::ScreenMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use euclid::TypedSize2D;
use profile_traits::ipc;
diff --git a/components/script/dom/serviceworker.rs b/components/script/dom/serviceworker.rs
index dcc20407c29..b6fce511a9f 100644
--- a/components/script/dom/serviceworker.rs
+++ b/components/script/dom/serviceworker.rs
@@ -2,25 +2,25 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::abstractworker::SimpleWorkerErrorHandler;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::ServiceWorkerBinding::{ServiceWorkerMethods, ServiceWorkerState, Wrap};
-use dom::bindings::error::{ErrorResult, Error};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::USVString;
-use dom::bindings::structuredclone::StructuredCloneData;
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
+use crate::dom::abstractworker::SimpleWorkerErrorHandler;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::ServiceWorkerBinding::{ServiceWorkerMethods, ServiceWorkerState, Wrap};
+use crate::dom::bindings::error::{ErrorResult, Error};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::USVString;
+use crate::dom::bindings::structuredclone::StructuredCloneData;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::JSContext;
use js::rust::HandleValue;
use script_traits::{ScriptMsg, DOMMessage};
use servo_url::ServoUrl;
use std::cell::Cell;
-use task::TaskOnce;
+use crate::task::TaskOnce;
pub type TrustedServiceWorkerAddress = Trusted<ServiceWorker>;
diff --git a/components/script/dom/serviceworkercontainer.rs b/components/script/dom/serviceworkercontainer.rs
index 2b73927adab..2eafbfc1031 100644
--- a/components/script/dom/serviceworkercontainer.rs
+++ b/components/script/dom/serviceworkercontainer.rs
@@ -2,20 +2,20 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::{ServiceWorkerContainerMethods, Wrap};
-use dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::RegistrationOptions;
-use dom::bindings::error::Error;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::bindings::str::USVString;
-use dom::client::Client;
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
-use dom::serviceworker::ServiceWorker;
+use crate::dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::{ServiceWorkerContainerMethods, Wrap};
+use crate::dom::bindings::codegen::Bindings::ServiceWorkerContainerBinding::RegistrationOptions;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::USVString;
+use crate::dom::client::Client;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
+use crate::dom::serviceworker::ServiceWorker;
use dom_struct::dom_struct;
-use script_thread::ScriptThread;
-use serviceworkerjob::{Job, JobType};
+use crate::script_thread::ScriptThread;
+use crate::serviceworkerjob::{Job, JobType};
use std::default::Default;
use std::rc::Rc;
diff --git a/components/script/dom/serviceworkerglobalscope.rs b/components/script/dom/serviceworkerglobalscope.rs
index 0c008fdaf6e..4f79cd493ff 100644
--- a/components/script/dom/serviceworkerglobalscope.rs
+++ b/components/script/dom/serviceworkerglobalscope.rs
@@ -2,31 +2,31 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use devtools;
+use crate::devtools;
use devtools_traits::DevtoolScriptControlMsg;
-use dom::abstractworker::WorkerScriptMsg;
-use dom::abstractworkerglobalscope::{WorkerEventLoopMethods, run_worker_event_loop};
-use dom::bindings::codegen::Bindings::ServiceWorkerGlobalScopeBinding;
-use dom::bindings::codegen::Bindings::ServiceWorkerGlobalScopeBinding::ServiceWorkerGlobalScopeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{DomRoot, RootCollection, ThreadLocalStackRoots};
-use dom::bindings::str::DOMString;
-use dom::dedicatedworkerglobalscope::AutoWorkerReset;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::extendableevent::ExtendableEvent;
-use dom::extendablemessageevent::ExtendableMessageEvent;
-use dom::globalscope::GlobalScope;
-use dom::worker::TrustedWorkerAddress;
-use dom::workerglobalscope::WorkerGlobalScope;
+use crate::dom::abstractworker::WorkerScriptMsg;
+use crate::dom::abstractworkerglobalscope::{WorkerEventLoopMethods, run_worker_event_loop};
+use crate::dom::bindings::codegen::Bindings::ServiceWorkerGlobalScopeBinding;
+use crate::dom::bindings::codegen::Bindings::ServiceWorkerGlobalScopeBinding::ServiceWorkerGlobalScopeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{DomRoot, RootCollection, ThreadLocalStackRoots};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::dedicatedworkerglobalscope::AutoWorkerReset;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::extendableevent::ExtendableEvent;
+use crate::dom::extendablemessageevent::ExtendableMessageEvent;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::worker::TrustedWorkerAddress;
+use crate::dom::workerglobalscope::WorkerGlobalScope;
use dom_struct::dom_struct;
use ipc_channel::ipc::{self, IpcSender, IpcReceiver};
use js::jsapi::{JSAutoCompartment, JSContext, JS_AddInterruptCallback};
use js::jsval::UndefinedValue;
use net_traits::{load_whole_resource, IpcSend, CustomResponseMediator};
use net_traits::request::{CredentialsMode, Destination, RequestInit};
-use script_runtime::{CommonScriptMsg, ScriptChan, new_rt_and_cx, Runtime};
+use crate::script_runtime::{CommonScriptMsg, ScriptChan, new_rt_and_cx, Runtime};
use script_traits::{TimerEvent, WorkerGlobalScopeInit, ScopeThings, ServiceWorkerMsg, WorkerScriptLoadOrigin};
use servo_channel::{channel, route_ipc_receiver_to_new_servo_sender, Receiver, Sender};
use servo_config::prefs::PREFS;
@@ -35,8 +35,8 @@ use servo_url::ServoUrl;
use std::thread;
use std::time::Duration;
use style::thread_state::{self, ThreadState};
-use task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
-use task_source::TaskSourceName;
+use crate::task_queue::{QueuedTask, QueuedTaskConversion, TaskQueue};
+use crate::task_source::TaskSourceName;
/// Messages used to control service worker event loop
pub enum ServiceWorkerScriptMsg {
diff --git a/components/script/dom/serviceworkerregistration.rs b/components/script/dom/serviceworkerregistration.rs
index ecdf4d6ed04..9d10ed574a7 100644
--- a/components/script/dom/serviceworkerregistration.rs
+++ b/components/script/dom/serviceworkerregistration.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::ServiceWorkerBinding::ServiceWorkerState;
-use dom::bindings::codegen::Bindings::ServiceWorkerRegistrationBinding::{ServiceWorkerRegistrationMethods, Wrap};
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::USVString;
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::serviceworker::ServiceWorker;
-use dom::workerglobalscope::prepare_workerscope_init;
+use crate::dom::bindings::codegen::Bindings::ServiceWorkerBinding::ServiceWorkerState;
+use crate::dom::bindings::codegen::Bindings::ServiceWorkerRegistrationBinding::{ServiceWorkerRegistrationMethods, Wrap};
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::USVString;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::serviceworker::ServiceWorker;
+use crate::dom::workerglobalscope::prepare_workerscope_init;
use dom_struct::dom_struct;
use script_traits::{WorkerScriptLoadOrigin, ScopeThings};
use servo_url::ServoUrl;
diff --git a/components/script/dom/servoparser/async_html.rs b/components/script/dom/servoparser/async_html.rs
index 051ea86cfb0..86e1b77675b 100644
--- a/components/script/dom/servoparser/async_html.rs
+++ b/components/script/dom/servoparser/async_html.rs
@@ -4,22 +4,22 @@
#![allow(unrooted_must_root)]
-use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::comment::Comment;
-use dom::document::Document;
-use dom::documenttype::DocumentType;
-use dom::element::{Element, ElementCreator};
-use dom::htmlformelement::{FormControlElementHelpers, HTMLFormElement};
-use dom::htmlscriptelement::HTMLScriptElement;
-use dom::htmltemplateelement::HTMLTemplateElement;
-use dom::node::Node;
-use dom::processinginstruction::ProcessingInstruction;
-use dom::servoparser::{ElementAttribute, create_element_for_token, ParsingAlgorithm};
-use dom::virtualmethods::vtable_for;
+use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::comment::Comment;
+use crate::dom::document::Document;
+use crate::dom::documenttype::DocumentType;
+use crate::dom::element::{Element, ElementCreator};
+use crate::dom::htmlformelement::{FormControlElementHelpers, HTMLFormElement};
+use crate::dom::htmlscriptelement::HTMLScriptElement;
+use crate::dom::htmltemplateelement::HTMLTemplateElement;
+use crate::dom::node::Node;
+use crate::dom::processinginstruction::ProcessingInstruction;
+use crate::dom::servoparser::{ElementAttribute, create_element_for_token, ParsingAlgorithm};
+use crate::dom::virtualmethods::vtable_for;
use html5ever::{Attribute as HtmlAttribute, ExpandedName, QualName};
use html5ever::buffer_queue::BufferQueue;
use html5ever::tendril::{SendTendril, StrTendril, Tendril};
diff --git a/components/script/dom/servoparser/html.rs b/components/script/dom/servoparser/html.rs
index 59fcd01fd6a..1ec6b1feca7 100644
--- a/components/script/dom/servoparser/html.rs
+++ b/components/script/dom/servoparser/html.rs
@@ -4,19 +4,19 @@
#![allow(unrooted_must_root)]
-use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
-use dom::bindings::inheritance::{Castable, CharacterDataTypeId, NodeTypeId};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::trace::JSTraceable;
-use dom::characterdata::CharacterData;
-use dom::document::Document;
-use dom::documenttype::DocumentType;
-use dom::element::Element;
-use dom::htmlscriptelement::HTMLScriptElement;
-use dom::htmltemplateelement::HTMLTemplateElement;
-use dom::node::Node;
-use dom::processinginstruction::ProcessingInstruction;
-use dom::servoparser::{ParsingAlgorithm, Sink};
+use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
+use crate::dom::bindings::inheritance::{Castable, CharacterDataTypeId, NodeTypeId};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::characterdata::CharacterData;
+use crate::dom::document::Document;
+use crate::dom::documenttype::DocumentType;
+use crate::dom::element::Element;
+use crate::dom::htmlscriptelement::HTMLScriptElement;
+use crate::dom::htmltemplateelement::HTMLTemplateElement;
+use crate::dom::node::Node;
+use crate::dom::processinginstruction::ProcessingInstruction;
+use crate::dom::servoparser::{ParsingAlgorithm, Sink};
use html5ever::QualName;
use html5ever::buffer_queue::BufferQueue;
use html5ever::serialize::{AttrRef, Serialize, Serializer};
diff --git a/components/script/dom/servoparser/mod.rs b/components/script/dom/servoparser/mod.rs
index cacd54d2f1a..f52499f8270 100644
--- a/components/script/dom/servoparser/mod.rs
+++ b/components/script/dom/servoparser/mod.rs
@@ -2,33 +2,33 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use document_loader::{DocumentLoader, LoadType};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState};
-use dom::bindings::codegen::Bindings::HTMLImageElementBinding::HTMLImageElementMethods;
-use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::ServoParserBinding;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom, RootedReference};
-use dom::bindings::settings_stack::is_execution_stack_empty;
-use dom::bindings::str::DOMString;
-use dom::characterdata::CharacterData;
-use dom::comment::Comment;
-use dom::document::{Document, DocumentSource, HasBrowsingContext, IsHTMLDocument};
-use dom::documenttype::DocumentType;
-use dom::element::{Element, ElementCreator, CustomElementCreationMode};
-use dom::globalscope::GlobalScope;
-use dom::htmlformelement::{FormControlElementHelpers, HTMLFormElement};
-use dom::htmlimageelement::HTMLImageElement;
-use dom::htmlscriptelement::{HTMLScriptElement, ScriptResult};
-use dom::htmltemplateelement::HTMLTemplateElement;
-use dom::node::Node;
-use dom::processinginstruction::ProcessingInstruction;
-use dom::text::Text;
-use dom::virtualmethods::vtable_for;
+use crate::document_loader::{DocumentLoader, LoadType};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState};
+use crate::dom::bindings::codegen::Bindings::HTMLImageElementBinding::HTMLImageElementMethods;
+use crate::dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateElementMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::ServoParserBinding;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom, RootedReference};
+use crate::dom::bindings::settings_stack::is_execution_stack_empty;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::characterdata::CharacterData;
+use crate::dom::comment::Comment;
+use crate::dom::document::{Document, DocumentSource, HasBrowsingContext, IsHTMLDocument};
+use crate::dom::documenttype::DocumentType;
+use crate::dom::element::{Element, ElementCreator, CustomElementCreationMode};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlformelement::{FormControlElementHelpers, HTMLFormElement};
+use crate::dom::htmlimageelement::HTMLImageElement;
+use crate::dom::htmlscriptelement::{HTMLScriptElement, ScriptResult};
+use crate::dom::htmltemplateelement::HTMLTemplateElement;
+use crate::dom::node::Node;
+use crate::dom::processinginstruction::ProcessingInstruction;
+use crate::dom::text::Text;
+use crate::dom::virtualmethods::vtable_for;
use dom_struct::dom_struct;
use embedder_traits::resources::{self, Resource};
use html5ever::{Attribute, ExpandedName, LocalName, QualName};
@@ -39,10 +39,10 @@ use hyper_serde::Serde;
use mime::{self, Mime};
use msg::constellation_msg::PipelineId;
use net_traits::{FetchMetadata, FetchResponseListener, Metadata, NetworkError};
-use network_listener::PreInvoke;
+use crate::network_listener::PreInvoke;
use profile_traits::time::{TimerMetadata, TimerMetadataFrameType};
use profile_traits::time::{TimerMetadataReflowType, ProfilerCategory, profile};
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use script_traits::DocumentActivity;
use servo_config::prefs::PREFS;
use servo_url::ServoUrl;
diff --git a/components/script/dom/servoparser/xml.rs b/components/script/dom/servoparser/xml.rs
index defac0eab44..6f1a1ba099d 100644
--- a/components/script/dom/servoparser/xml.rs
+++ b/components/script/dom/servoparser/xml.rs
@@ -4,12 +4,12 @@
#![allow(unrooted_must_root)]
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::trace::JSTraceable;
-use dom::document::Document;
-use dom::htmlscriptelement::HTMLScriptElement;
-use dom::node::Node;
-use dom::servoparser::{ParsingAlgorithm, Sink};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::document::Document;
+use crate::dom::htmlscriptelement::HTMLScriptElement;
+use crate::dom::node::Node;
+use crate::dom::servoparser::{ParsingAlgorithm, Sink};
use js::jsapi::JSTracer;
use servo_url::ServoUrl;
use xml5ever::buffer_queue::BufferQueue;
diff --git a/components/script/dom/storage.rs b/components/script/dom/storage.rs
index 31d0dd5f84f..251719eb809 100644
--- a/components/script/dom/storage.rs
+++ b/components/script/dom/storage.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::StorageBinding;
-use dom::bindings::codegen::Bindings::StorageBinding::StorageMethods;
-use dom::bindings::error::{Error, ErrorResult};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::storageevent::StorageEvent;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::StorageBinding;
+use crate::dom::bindings::codegen::Bindings::StorageBinding::StorageMethods;
+use crate::dom::bindings::error::{Error, ErrorResult};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::storageevent::StorageEvent;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use net_traits::IpcSend;
@@ -20,7 +20,7 @@ use net_traits::storage_thread::{StorageThreadMsg, StorageType};
use profile_traits::ipc;
use script_traits::ScriptMsg;
use servo_url::ServoUrl;
-use task_source::TaskSource;
+use crate::task_source::TaskSource;
#[dom_struct]
pub struct Storage {
diff --git a/components/script/dom/storageevent.rs b/components/script/dom/storageevent.rs
index ac61e599dd9..7f0549bb5cf 100644
--- a/components/script/dom/storageevent.rs
+++ b/components/script/dom/storageevent.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::StorageEventBinding;
-use dom::bindings::codegen::Bindings::StorageEventBinding::StorageEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
-use dom::bindings::str::{DOMString, USVString};
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::storage::Storage;
-use dom::window::Window;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::StorageEventBinding;
+use crate::dom::bindings::codegen::Bindings::StorageEventBinding::StorageEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::storage::Storage;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/stylepropertymapreadonly.rs b/components/script/dom/stylepropertymapreadonly.rs
index c76a053f407..c6b78cc9f7a 100644
--- a/components/script/dom/stylepropertymapreadonly.rs
+++ b/components/script/dom/stylepropertymapreadonly.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::StylePropertyMapReadOnlyBinding::StylePropertyMapReadOnlyMethods;
-use dom::bindings::codegen::Bindings::StylePropertyMapReadOnlyBinding::Wrap;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::cssstylevalue::CSSStyleValue;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::StylePropertyMapReadOnlyBinding::StylePropertyMapReadOnlyMethods;
+use crate::dom::bindings::codegen::Bindings::StylePropertyMapReadOnlyBinding::Wrap;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssstylevalue::CSSStyleValue;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use servo_atoms::Atom;
use std::cmp::Ordering;
diff --git a/components/script/dom/stylesheet.rs b/components/script/dom/stylesheet.rs
index 94a26755699..daeb028e31a 100644
--- a/components/script/dom/stylesheet.rs
+++ b/components/script/dom/stylesheet.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::StyleSheetBinding;
-use dom::bindings::codegen::Bindings::StyleSheetBinding::StyleSheetMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::cssstylesheet::CSSStyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::StyleSheetBinding;
+use crate::dom::bindings::codegen::Bindings::StyleSheetBinding::StyleSheetMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::cssstylesheet::CSSStyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/stylesheetlist.rs b/components/script/dom/stylesheetlist.rs
index e4c6b5f649b..fa295c1adc4 100644
--- a/components/script/dom/stylesheetlist.rs
+++ b/components/script/dom/stylesheetlist.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::StyleSheetListBinding;
-use dom::bindings::codegen::Bindings::StyleSheetListBinding::StyleSheetListMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::document::Document;
-use dom::stylesheet::StyleSheet;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::StyleSheetListBinding;
+use crate::dom::bindings::codegen::Bindings::StyleSheetListBinding::StyleSheetListMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::document::Document;
+use crate::dom::stylesheet::StyleSheet;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/svgelement.rs b/components/script/dom/svgelement.rs
index bc554416090..39dbbf3b161 100644
--- a/components/script/dom/svgelement.rs
+++ b/components/script/dom/svgelement.rs
@@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::inheritance::Castable;
-use dom::document::Document;
-use dom::element::Element;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::document::Document;
+use crate::dom::element::Element;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use style::element_state::ElementState;
diff --git a/components/script/dom/svggraphicselement.rs b/components/script/dom/svggraphicselement.rs
index 71b272b8737..713efced553 100644
--- a/components/script/dom/svggraphicselement.rs
+++ b/components/script/dom/svggraphicselement.rs
@@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::inheritance::Castable;
-use dom::document::Document;
-use dom::svgelement::SVGElement;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::document::Document;
+use crate::dom::svgelement::SVGElement;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use style::element_state::ElementState;
diff --git a/components/script/dom/svgsvgelement.rs b/components/script/dom/svgsvgelement.rs
index 4894edc1202..60c90544aca 100644
--- a/components/script/dom/svgsvgelement.rs
+++ b/components/script/dom/svgsvgelement.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::codegen::Bindings::SVGSVGElementBinding;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, LayoutDom};
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
-use dom::node::Node;
-use dom::svggraphicselement::SVGGraphicsElement;
-use dom::virtualmethods::VirtualMethods;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::codegen::Bindings::SVGSVGElementBinding;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, LayoutDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
+use crate::dom::node::Node;
+use crate::dom::svggraphicselement::SVGGraphicsElement;
+use crate::dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use script_layout_interface::SVGSVGData;
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs
index 91ea4b8e9d0..9e87a0f12db 100644
--- a/components/script/dom/testbinding.rs
+++ b/components/script/dom/testbinding.rs
@@ -4,35 +4,35 @@
// check-tidy: no specs after this line
-use dom::bindings::callback::ExceptionHandling;
-use dom::bindings::codegen::Bindings::EventListenerBinding::EventListener;
-use dom::bindings::codegen::Bindings::FunctionBinding::Function;
-use dom::bindings::codegen::Bindings::TestBindingBinding::{self, SimpleCallback};
-use dom::bindings::codegen::Bindings::TestBindingBinding::{TestBindingMethods, TestDictionary};
-use dom::bindings::codegen::Bindings::TestBindingBinding::{TestDictionaryDefaults, TestEnum};
-use dom::bindings::codegen::UnionTypes;
-use dom::bindings::codegen::UnionTypes::{BlobOrBoolean, BlobOrBlobSequence, LongOrLongSequenceSequence};
-use dom::bindings::codegen::UnionTypes::{BlobOrString, BlobOrUnsignedLong, EventOrString};
-use dom::bindings::codegen::UnionTypes::{ByteStringOrLong, ByteStringSequenceOrLongOrString};
-use dom::bindings::codegen::UnionTypes::{ByteStringSequenceOrLong, DocumentOrTestTypedef};
-use dom::bindings::codegen::UnionTypes::{EventOrUSVString, HTMLElementOrLong, LongSequenceOrTestTypedef};
-use dom::bindings::codegen::UnionTypes::{HTMLElementOrUnsignedLongOrStringOrBoolean, LongSequenceOrBoolean};
-use dom::bindings::codegen::UnionTypes::{StringOrLongSequence, StringOrStringSequence, StringSequenceOrUnsignedLong};
-use dom::bindings::codegen::UnionTypes::{StringOrUnsignedLong, StringOrBoolean, UnsignedLongOrBoolean};
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::mozmap::MozMap;
-use dom::bindings::num::Finite;
-use dom::bindings::refcounted::TrustedPromise;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::{ByteString, DOMString, USVString};
-use dom::bindings::trace::RootedTraceableBox;
-use dom::bindings::weakref::MutableWeakRef;
-use dom::blob::{Blob, BlobImpl};
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
-use dom::promisenativehandler::{PromiseNativeHandler, Callback};
-use dom::url::URL;
+use crate::dom::bindings::callback::ExceptionHandling;
+use crate::dom::bindings::codegen::Bindings::EventListenerBinding::EventListener;
+use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function;
+use crate::dom::bindings::codegen::Bindings::TestBindingBinding::{self, SimpleCallback};
+use crate::dom::bindings::codegen::Bindings::TestBindingBinding::{TestBindingMethods, TestDictionary};
+use crate::dom::bindings::codegen::Bindings::TestBindingBinding::{TestDictionaryDefaults, TestEnum};
+use crate::dom::bindings::codegen::UnionTypes;
+use crate::dom::bindings::codegen::UnionTypes::{BlobOrBoolean, BlobOrBlobSequence, LongOrLongSequenceSequence};
+use crate::dom::bindings::codegen::UnionTypes::{BlobOrString, BlobOrUnsignedLong, EventOrString};
+use crate::dom::bindings::codegen::UnionTypes::{ByteStringOrLong, ByteStringSequenceOrLongOrString};
+use crate::dom::bindings::codegen::UnionTypes::{ByteStringSequenceOrLong, DocumentOrTestTypedef};
+use crate::dom::bindings::codegen::UnionTypes::{EventOrUSVString, HTMLElementOrLong, LongSequenceOrTestTypedef};
+use crate::dom::bindings::codegen::UnionTypes::{HTMLElementOrUnsignedLongOrStringOrBoolean, LongSequenceOrBoolean};
+use crate::dom::bindings::codegen::UnionTypes::{StringOrLongSequence, StringOrStringSequence, StringSequenceOrUnsignedLong};
+use crate::dom::bindings::codegen::UnionTypes::{StringOrUnsignedLong, StringOrBoolean, UnsignedLongOrBoolean};
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::mozmap::MozMap;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::refcounted::TrustedPromise;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::{ByteString, DOMString, USVString};
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::bindings::weakref::MutableWeakRef;
+use crate::dom::blob::{Blob, BlobImpl};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
+use crate::dom::promisenativehandler::{PromiseNativeHandler, Callback};
+use crate::dom::url::URL;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext, JSObject};
use js::jsapi::{JS_NewPlainObject, JS_NewUint8ClampedArray};
@@ -46,7 +46,7 @@ use std::borrow::ToOwned;
use std::ptr;
use std::ptr::NonNull;
use std::rc::Rc;
-use timers::OneshotTimerCallback;
+use crate::timers::OneshotTimerCallback;
#[dom_struct]
pub struct TestBinding {
diff --git a/components/script/dom/testbindingiterable.rs b/components/script/dom/testbindingiterable.rs
index 60c345ce9f1..90079a8355a 100644
--- a/components/script/dom/testbindingiterable.rs
+++ b/components/script/dom/testbindingiterable.rs
@@ -4,13 +4,13 @@
// check-tidy: no specs after this line
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::TestBindingIterableBinding::{self, TestBindingIterableMethods};
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::TestBindingIterableBinding::{self, TestBindingIterableMethods};
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/testbindingpairiterable.rs b/components/script/dom/testbindingpairiterable.rs
index 79e3154c6f3..6ba99a720aa 100644
--- a/components/script/dom/testbindingpairiterable.rs
+++ b/components/script/dom/testbindingpairiterable.rs
@@ -4,15 +4,15 @@
// check-tidy: no specs after this line
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::TestBindingPairIterableBinding;
-use dom::bindings::codegen::Bindings::TestBindingPairIterableBinding::TestBindingPairIterableMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::iterable::Iterable;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::TestBindingPairIterableBinding;
+use crate::dom::bindings::codegen::Bindings::TestBindingPairIterableBinding::TestBindingPairIterableMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::iterable::Iterable;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/testbindingproxy.rs b/components/script/dom/testbindingproxy.rs
index 8c0766c250e..37b4c9652d5 100644
--- a/components/script/dom/testbindingproxy.rs
+++ b/components/script/dom/testbindingproxy.rs
@@ -4,9 +4,9 @@
// check-tidy: no specs after this line
-use dom::bindings::codegen::Bindings::TestBindingProxyBinding::TestBindingProxyMethods;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::str::DOMString;
+use crate::dom::bindings::codegen::Bindings::TestBindingProxyBinding::TestBindingProxyMethods;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::str::DOMString;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/testrunner.rs b/components/script/dom/testrunner.rs
index 4a7276deb50..b25ed715f7a 100644
--- a/components/script/dom/testrunner.rs
+++ b/components/script/dom/testrunner.rs
@@ -3,13 +3,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use bluetooth_traits::BluetoothRequest;
-use dom::bindings::codegen::Bindings::TestRunnerBinding;
-use dom::bindings::codegen::Bindings::TestRunnerBinding::TestRunnerMethods;
-use dom::bindings::error::{Error, ErrorResult};
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::TestRunnerBinding;
+use crate::dom::bindings::codegen::Bindings::TestRunnerBinding::TestRunnerMethods;
+use crate::dom::bindings::error::{Error, ErrorResult};
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use profile_traits::ipc;
diff --git a/components/script/dom/testworklet.rs b/components/script/dom/testworklet.rs
index 61726d90c04..e6fa2150274 100644
--- a/components/script/dom/testworklet.rs
+++ b/components/script/dom/testworklet.rs
@@ -4,22 +4,22 @@
// check-tidy: no specs after this line
-use dom::bindings::codegen::Bindings::TestWorkletBinding::TestWorkletMethods;
-use dom::bindings::codegen::Bindings::TestWorkletBinding::Wrap;
-use dom::bindings::codegen::Bindings::WorkletBinding::WorkletBinding::WorkletMethods;
-use dom::bindings::codegen::Bindings::WorkletBinding::WorkletOptions;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::bindings::str::USVString;
-use dom::promise::Promise;
-use dom::window::Window;
-use dom::worklet::Worklet;
-use dom::workletglobalscope::WorkletGlobalScopeType;
+use crate::dom::bindings::codegen::Bindings::TestWorkletBinding::TestWorkletMethods;
+use crate::dom::bindings::codegen::Bindings::TestWorkletBinding::Wrap;
+use crate::dom::bindings::codegen::Bindings::WorkletBinding::WorkletBinding::WorkletMethods;
+use crate::dom::bindings::codegen::Bindings::WorkletBinding::WorkletOptions;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::str::USVString;
+use crate::dom::promise::Promise;
+use crate::dom::window::Window;
+use crate::dom::worklet::Worklet;
+use crate::dom::workletglobalscope::WorkletGlobalScopeType;
use dom_struct::dom_struct;
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use std::rc::Rc;
#[dom_struct]
diff --git a/components/script/dom/testworkletglobalscope.rs b/components/script/dom/testworkletglobalscope.rs
index 49b8d8bd963..e443dfa8e6b 100644
--- a/components/script/dom/testworkletglobalscope.rs
+++ b/components/script/dom/testworkletglobalscope.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::TestWorkletGlobalScopeBinding;
-use dom::bindings::codegen::Bindings::TestWorkletGlobalScopeBinding::TestWorkletGlobalScopeMethods;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::worklet::WorkletExecutor;
-use dom::workletglobalscope::WorkletGlobalScope;
-use dom::workletglobalscope::WorkletGlobalScopeInit;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::TestWorkletGlobalScopeBinding;
+use crate::dom::bindings::codegen::Bindings::TestWorkletGlobalScopeBinding::TestWorkletGlobalScopeMethods;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::worklet::WorkletExecutor;
+use crate::dom::workletglobalscope::WorkletGlobalScope;
+use crate::dom::workletglobalscope::WorkletGlobalScopeInit;
use dom_struct::dom_struct;
use js::rust::Runtime;
use msg::constellation_msg::PipelineId;
diff --git a/components/script/dom/text.rs b/components/script/dom/text.rs
index 0b2d6a5b7c9..b6cc0617042 100644
--- a/components/script/dom/text.rs
+++ b/components/script/dom/text.rs
@@ -2,19 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
-use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::TextBinding::{self, TextMethods};
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::{DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::characterdata::CharacterData;
-use dom::document::Document;
-use dom::node::Node;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::TextBinding::{self, TextMethods};
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::{DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::characterdata::CharacterData;
+use crate::dom::document::Document;
+use crate::dom::node::Node;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
/// An HTML text node.
diff --git a/components/script/dom/textcontrol.rs b/components/script/dom/textcontrol.rs
index 9abe8d03a69..ef4f547537b 100644
--- a/components/script/dom/textcontrol.rs
+++ b/components/script/dom/textcontrol.rs
@@ -7,16 +7,16 @@
//!
//! https://html.spec.whatwg.org/multipage/#textFieldSelection
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::HTMLFormElementBinding::SelectionMode;
-use dom::bindings::conversions::DerivedFrom;
-use dom::bindings::error::{Error, ErrorResult};
-use dom::bindings::str::DOMString;
-use dom::event::{EventBubbles, EventCancelable};
-use dom::eventtarget::EventTarget;
-use dom::node::{Node, NodeDamage, window_from_node};
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::HTMLFormElementBinding::SelectionMode;
+use crate::dom::bindings::conversions::DerivedFrom;
+use crate::dom::bindings::error::{Error, ErrorResult};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{EventBubbles, EventCancelable};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::node::{Node, NodeDamage, window_from_node};
use script_traits::ScriptToConstellationChan;
-use textinput::{SelectionDirection, SelectionState, TextInput};
+use crate::textinput::{SelectionDirection, SelectionState, TextInput};
pub trait TextControlElement: DerivedFrom<EventTarget> + DerivedFrom<Node> {
fn selection_api_applies(&self) -> bool;
diff --git a/components/script/dom/textdecoder.rs b/components/script/dom/textdecoder.rs
index 1db4a32768a..ef66a88132f 100644
--- a/components/script/dom/textdecoder.rs
+++ b/components/script/dom/textdecoder.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::TextDecoderBinding;
-use dom::bindings::codegen::Bindings::TextDecoderBinding::{TextDecoderMethods, TextDecodeOptions};
-use dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::{DOMString, USVString};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::TextDecoderBinding;
+use crate::dom::bindings::codegen::Bindings::TextDecoderBinding::{TextDecoderMethods, TextDecodeOptions};
+use crate::dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use encoding_rs::{Decoder, DecoderResult, Encoding};
use std::borrow::ToOwned;
diff --git a/components/script/dom/textencoder.rs b/components/script/dom/textencoder.rs
index 9a9e7925e49..f1ebd4cb6b1 100644
--- a/components/script/dom/textencoder.rs
+++ b/components/script/dom/textencoder.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::TextEncoderBinding;
-use dom::bindings::codegen::Bindings::TextEncoderBinding::TextEncoderMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::{DOMString, USVString};
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::TextEncoderBinding;
+use crate::dom::bindings::codegen::Bindings::TextEncoderBinding::TextEncoderMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::{JSContext, JSObject};
use js::typedarray::{Uint8Array, CreateWith};
diff --git a/components/script/dom/timeranges.rs b/components/script/dom/timeranges.rs
index aab121c8a7f..5edddc0acd5 100644
--- a/components/script/dom/timeranges.rs
+++ b/components/script/dom/timeranges.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::TimeRangesBinding;
-use dom::bindings::codegen::Bindings::TimeRangesBinding::TimeRangesMethods;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::window::Window;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::TimeRangesBinding;
+use crate::dom::bindings::codegen::Bindings::TimeRangesBinding::TimeRangesMethods;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use std::fmt;
diff --git a/components/script/dom/touch.rs b/components/script/dom/touch.rs
index c1b47a4df94..e89310cb231 100644
--- a/components/script/dom/touch.rs
+++ b/components/script/dom/touch.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::TouchBinding;
-use dom::bindings::codegen::Bindings::TouchBinding::TouchMethods;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutDom};
-use dom::eventtarget::EventTarget;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::TouchBinding;
+use crate::dom::bindings::codegen::Bindings::TouchBinding::TouchMethods;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutDom};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/touchevent.rs b/components/script/dom/touchevent.rs
index 021cefec52e..5fc3cbd0a86 100644
--- a/components/script/dom/touchevent.rs
+++ b/components/script/dom/touchevent.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::TouchEventBinding;
-use dom::bindings::codegen::Bindings::TouchEventBinding::TouchEventMethods;
-use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{DomRoot, MutDom};
-use dom::bindings::str::DOMString;
-use dom::event::{EventBubbles, EventCancelable};
-use dom::touchlist::TouchList;
-use dom::uievent::UIEvent;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::TouchEventBinding;
+use crate::dom::bindings::codegen::Bindings::TouchEventBinding::TouchEventMethods;
+use crate::dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{DomRoot, MutDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{EventBubbles, EventCancelable};
+use crate::dom::touchlist::TouchList;
+use crate::dom::uievent::UIEvent;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use std::cell::Cell;
diff --git a/components/script/dom/touchlist.rs b/components/script/dom/touchlist.rs
index ae9de896113..5f760daba87 100644
--- a/components/script/dom/touchlist.rs
+++ b/components/script/dom/touchlist.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::TouchListBinding;
-use dom::bindings::codegen::Bindings::TouchListBinding::TouchListMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::touch::Touch;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::TouchListBinding;
+use crate::dom::bindings::codegen::Bindings::TouchListBinding::TouchListMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::touch::Touch;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/transitionevent.rs b/components/script/dom/transitionevent.rs
index 9176fe18595..a855fbc1f14 100644
--- a/components/script/dom/transitionevent.rs
+++ b/components/script/dom/transitionevent.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::TransitionEventBinding;
-use dom::bindings::codegen::Bindings::TransitionEventBinding::{TransitionEventInit, TransitionEventMethods};
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::event::Event;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::TransitionEventBinding;
+use crate::dom::bindings::codegen::Bindings::TransitionEventBinding::{TransitionEventInit, TransitionEventMethods};
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::Event;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/treewalker.rs b/components/script/dom/treewalker.rs
index ce57b9f8453..11b462becf3 100644
--- a/components/script/dom/treewalker.rs
+++ b/components/script/dom/treewalker.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::callback::ExceptionHandling::Rethrow;
-use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
-use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter;
-use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilterConstants;
-use dom::bindings::codegen::Bindings::TreeWalkerBinding;
-use dom::bindings::codegen::Bindings::TreeWalkerBinding::TreeWalkerMethods;
-use dom::bindings::error::{Error, Fallible};
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutDom};
-use dom::document::Document;
-use dom::node::Node;
+use crate::dom::bindings::callback::ExceptionHandling::Rethrow;
+use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
+use crate::dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter;
+use crate::dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilterConstants;
+use crate::dom::bindings::codegen::Bindings::TreeWalkerBinding;
+use crate::dom::bindings::codegen::Bindings::TreeWalkerBinding::TreeWalkerMethods;
+use crate::dom::bindings::error::{Error, Fallible};
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutDom};
+use crate::dom::document::Document;
+use crate::dom::node::Node;
use dom_struct::dom_struct;
use std::cell::Cell;
use std::rc::Rc;
diff --git a/components/script/dom/uievent.rs b/components/script/dom/uievent.rs
index 7eef5be3910..fbe173d906c 100644
--- a/components/script/dom/uievent.rs
+++ b/components/script/dom/uievent.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::UIEventBinding;
-use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::UIEventBinding;
+use crate::dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
use std::cell::Cell;
diff --git a/components/script/dom/url.rs b/components/script/dom/url.rs
index 0e0c5e02017..a8e389e0758 100644
--- a/components/script/dom/url.rs
+++ b/components/script/dom/url.rs
@@ -2,16 +2,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::URLBinding::{self, URLMethods};
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::{DOMString, USVString};
-use dom::blob::Blob;
-use dom::globalscope::GlobalScope;
-use dom::urlhelper::UrlHelper;
-use dom::urlsearchparams::URLSearchParams;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::URLBinding::{self, URLMethods};
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::blob::Blob;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::urlhelper::UrlHelper;
+use crate::dom::urlsearchparams::URLSearchParams;
use dom_struct::dom_struct;
use net_traits::{CoreResourceMsg, IpcSend};
use net_traits::blob_url_store::{get_blob_origin, parse_blob_url};
diff --git a/components/script/dom/urlhelper.rs b/components/script/dom/urlhelper.rs
index d98dcc438bf..3c14f4b4e08 100644
--- a/components/script/dom/urlhelper.rs
+++ b/components/script/dom/urlhelper.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::str::USVString;
+use crate::dom::bindings::str::USVString;
use servo_url::ServoUrl;
use std::borrow::ToOwned;
use url::quirks;
diff --git a/components/script/dom/urlsearchparams.rs b/components/script/dom/urlsearchparams.rs
index 17867c63283..d83162eb463 100644
--- a/components/script/dom/urlsearchparams.rs
+++ b/components/script/dom/urlsearchparams.rs
@@ -2,18 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::URLSearchParamsBinding::URLSearchParamsMethods;
-use dom::bindings::codegen::Bindings::URLSearchParamsBinding::URLSearchParamsWrap;
-use dom::bindings::codegen::UnionTypes::USVStringOrURLSearchParams;
-use dom::bindings::error::Fallible;
-use dom::bindings::iterable::Iterable;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::{DOMString, USVString};
-use dom::bindings::weakref::MutableWeakRef;
-use dom::globalscope::GlobalScope;
-use dom::url::URL;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::URLSearchParamsBinding::URLSearchParamsMethods;
+use crate::dom::bindings::codegen::Bindings::URLSearchParamsBinding::URLSearchParamsWrap;
+use crate::dom::bindings::codegen::UnionTypes::USVStringOrURLSearchParams;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::iterable::Iterable;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::bindings::weakref::MutableWeakRef;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::url::URL;
use dom_struct::dom_struct;
use url::form_urlencoded;
diff --git a/components/script/dom/userscripts.rs b/components/script/dom/userscripts.rs
index 1180b0c8279..bbd0e2f45a8 100644
--- a/components/script/dom/userscripts.rs
+++ b/components/script/dom/userscripts.rs
@@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::inheritance::Castable;
-use dom::globalscope::GlobalScope;
-use dom::htmlheadelement::HTMLHeadElement;
-use dom::node::Node;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::htmlheadelement::HTMLHeadElement;
+use crate::dom::node::Node;
use js::jsval::UndefinedValue;
use servo_config::opts;
use std::fs::{File, read_dir};
diff --git a/components/script/dom/validation.rs b/components/script/dom/validation.rs
index 3945654ec55..a1b8c7901eb 100755
--- a/components/script/dom/validation.rs
+++ b/components/script/dom/validation.rs
@@ -1,7 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::validitystate::ValidationFlags;
+use crate::dom::validitystate::ValidationFlags;
pub trait Validatable {
fn is_instance_validatable(&self) -> bool {
diff --git a/components/script/dom/validitystate.rs b/components/script/dom/validitystate.rs
index c0488c39ce8..0ef35ea455f 100755
--- a/components/script/dom/validitystate.rs
+++ b/components/script/dom/validitystate.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::ValidityStateBinding;
-use dom::bindings::codegen::Bindings::ValidityStateBinding::ValidityStateMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::element::Element;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::ValidityStateBinding;
+use crate::dom::bindings::codegen::Bindings::ValidityStateBinding::ValidityStateMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::element::Element;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
// https://html.spec.whatwg.org/multipage/#validity-states
diff --git a/components/script/dom/virtualmethods.rs b/components/script/dom/virtualmethods.rs
index fce8126eb09..3e28f02587d 100644
--- a/components/script/dom/virtualmethods.rs
+++ b/components/script/dom/virtualmethods.rs
@@ -2,55 +2,55 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::attr::Attr;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::inheritance::ElementTypeId;
-use dom::bindings::inheritance::HTMLElementTypeId;
-use dom::bindings::inheritance::NodeTypeId;
-use dom::bindings::inheritance::SVGElementTypeId;
-use dom::bindings::inheritance::SVGGraphicsElementTypeId;
-use dom::bindings::str::DOMString;
-use dom::document::Document;
-use dom::element::{AttributeMutation, Element};
-use dom::event::Event;
-use dom::htmlanchorelement::HTMLAnchorElement;
-use dom::htmlareaelement::HTMLAreaElement;
-use dom::htmlbaseelement::HTMLBaseElement;
-use dom::htmlbodyelement::HTMLBodyElement;
-use dom::htmlbuttonelement::HTMLButtonElement;
-use dom::htmlcanvaselement::HTMLCanvasElement;
-use dom::htmldetailselement::HTMLDetailsElement;
-use dom::htmlelement::HTMLElement;
-use dom::htmlfieldsetelement::HTMLFieldSetElement;
-use dom::htmlfontelement::HTMLFontElement;
-use dom::htmlformelement::HTMLFormElement;
-use dom::htmlheadelement::HTMLHeadElement;
-use dom::htmlhrelement::HTMLHRElement;
-use dom::htmliframeelement::HTMLIFrameElement;
-use dom::htmlimageelement::HTMLImageElement;
-use dom::htmlinputelement::HTMLInputElement;
-use dom::htmllabelelement::HTMLLabelElement;
-use dom::htmllielement::HTMLLIElement;
-use dom::htmllinkelement::HTMLLinkElement;
-use dom::htmlmediaelement::HTMLMediaElement;
-use dom::htmlmetaelement::HTMLMetaElement;
-use dom::htmlobjectelement::HTMLObjectElement;
-use dom::htmloptgroupelement::HTMLOptGroupElement;
-use dom::htmloptionelement::HTMLOptionElement;
-use dom::htmloutputelement::HTMLOutputElement;
-use dom::htmlscriptelement::HTMLScriptElement;
-use dom::htmlselectelement::HTMLSelectElement;
-use dom::htmlsourceelement::HTMLSourceElement;
-use dom::htmlstyleelement::HTMLStyleElement;
-use dom::htmltablecellelement::HTMLTableCellElement;
-use dom::htmltableelement::HTMLTableElement;
-use dom::htmltablerowelement::HTMLTableRowElement;
-use dom::htmltablesectionelement::HTMLTableSectionElement;
-use dom::htmltemplateelement::HTMLTemplateElement;
-use dom::htmltextareaelement::HTMLTextAreaElement;
-use dom::htmltitleelement::HTMLTitleElement;
-use dom::node::{ChildrenMutation, CloneChildrenFlag, Node, UnbindContext};
-use dom::svgsvgelement::SVGSVGElement;
+use crate::dom::attr::Attr;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::inheritance::ElementTypeId;
+use crate::dom::bindings::inheritance::HTMLElementTypeId;
+use crate::dom::bindings::inheritance::NodeTypeId;
+use crate::dom::bindings::inheritance::SVGElementTypeId;
+use crate::dom::bindings::inheritance::SVGGraphicsElementTypeId;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::Document;
+use crate::dom::element::{AttributeMutation, Element};
+use crate::dom::event::Event;
+use crate::dom::htmlanchorelement::HTMLAnchorElement;
+use crate::dom::htmlareaelement::HTMLAreaElement;
+use crate::dom::htmlbaseelement::HTMLBaseElement;
+use crate::dom::htmlbodyelement::HTMLBodyElement;
+use crate::dom::htmlbuttonelement::HTMLButtonElement;
+use crate::dom::htmlcanvaselement::HTMLCanvasElement;
+use crate::dom::htmldetailselement::HTMLDetailsElement;
+use crate::dom::htmlelement::HTMLElement;
+use crate::dom::htmlfieldsetelement::HTMLFieldSetElement;
+use crate::dom::htmlfontelement::HTMLFontElement;
+use crate::dom::htmlformelement::HTMLFormElement;
+use crate::dom::htmlheadelement::HTMLHeadElement;
+use crate::dom::htmlhrelement::HTMLHRElement;
+use crate::dom::htmliframeelement::HTMLIFrameElement;
+use crate::dom::htmlimageelement::HTMLImageElement;
+use crate::dom::htmlinputelement::HTMLInputElement;
+use crate::dom::htmllabelelement::HTMLLabelElement;
+use crate::dom::htmllielement::HTMLLIElement;
+use crate::dom::htmllinkelement::HTMLLinkElement;
+use crate::dom::htmlmediaelement::HTMLMediaElement;
+use crate::dom::htmlmetaelement::HTMLMetaElement;
+use crate::dom::htmlobjectelement::HTMLObjectElement;
+use crate::dom::htmloptgroupelement::HTMLOptGroupElement;
+use crate::dom::htmloptionelement::HTMLOptionElement;
+use crate::dom::htmloutputelement::HTMLOutputElement;
+use crate::dom::htmlscriptelement::HTMLScriptElement;
+use crate::dom::htmlselectelement::HTMLSelectElement;
+use crate::dom::htmlsourceelement::HTMLSourceElement;
+use crate::dom::htmlstyleelement::HTMLStyleElement;
+use crate::dom::htmltablecellelement::HTMLTableCellElement;
+use crate::dom::htmltableelement::HTMLTableElement;
+use crate::dom::htmltablerowelement::HTMLTableRowElement;
+use crate::dom::htmltablesectionelement::HTMLTableSectionElement;
+use crate::dom::htmltemplateelement::HTMLTemplateElement;
+use crate::dom::htmltextareaelement::HTMLTextAreaElement;
+use crate::dom::htmltitleelement::HTMLTitleElement;
+use crate::dom::node::{ChildrenMutation, CloneChildrenFlag, Node, UnbindContext};
+use crate::dom::svgsvgelement::SVGSVGElement;
use html5ever::LocalName;
use style::attr::AttrValue;
diff --git a/components/script/dom/vr.rs b/components/script/dom/vr.rs
index f41360bbb1a..eb6fc7cd88f 100644
--- a/components/script/dom/vr.rs
+++ b/components/script/dom/vr.rs
@@ -2,22 +2,22 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::VRBinding;
-use dom::bindings::codegen::Bindings::VRBinding::VRMethods;
-use dom::bindings::codegen::Bindings::VRDisplayBinding::VRDisplayMethods;
-use dom::bindings::error::Error;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::gamepad::Gamepad;
-use dom::gamepadevent::GamepadEventType;
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
-use dom::vrdisplay::VRDisplay;
-use dom::vrdisplayevent::VRDisplayEvent;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::VRBinding;
+use crate::dom::bindings::codegen::Bindings::VRBinding::VRMethods;
+use crate::dom::bindings::codegen::Bindings::VRDisplayBinding::VRDisplayMethods;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::gamepad::Gamepad;
+use crate::dom::gamepadevent::GamepadEventType;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
+use crate::dom::vrdisplay::VRDisplay;
+use crate::dom::vrdisplayevent::VRDisplayEvent;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use profile_traits::ipc;
diff --git a/components/script/dom/vrdisplay.rs b/components/script/dom/vrdisplay.rs
index 9efd763989e..6f8e111b4ea 100644
--- a/components/script/dom/vrdisplay.rs
+++ b/components/script/dom/vrdisplay.rs
@@ -3,38 +3,38 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::{webgl_channel, WebGLReceiver, WebVRCommand};
-use dom::bindings::callback::ExceptionHandling;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceBinding::PerformanceMethods;
-use dom::bindings::codegen::Bindings::VRDisplayBinding;
-use dom::bindings::codegen::Bindings::VRDisplayBinding::VRDisplayMethods;
-use dom::bindings::codegen::Bindings::VRDisplayBinding::VREye;
-use dom::bindings::codegen::Bindings::VRLayerBinding::VRLayer;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::FrameRequestCallback;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutDom, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
-use dom::vrdisplaycapabilities::VRDisplayCapabilities;
-use dom::vrdisplayevent::VRDisplayEvent;
-use dom::vreyeparameters::VREyeParameters;
-use dom::vrframedata::VRFrameData;
-use dom::vrpose::VRPose;
-use dom::vrstageparameters::VRStageParameters;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::callback::ExceptionHandling;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceBinding::PerformanceMethods;
+use crate::dom::bindings::codegen::Bindings::VRDisplayBinding;
+use crate::dom::bindings::codegen::Bindings::VRDisplayBinding::VRDisplayMethods;
+use crate::dom::bindings::codegen::Bindings::VRDisplayBinding::VREye;
+use crate::dom::bindings::codegen::Bindings::VRLayerBinding::VRLayer;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::FrameRequestCallback;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutDom, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
+use crate::dom::vrdisplaycapabilities::VRDisplayCapabilities;
+use crate::dom::vrdisplayevent::VRDisplayEvent;
+use crate::dom::vreyeparameters::VREyeParameters;
+use crate::dom::vrframedata::VRFrameData;
+use crate::dom::vrpose::VRPose;
+use crate::dom::vrstageparameters::VRStageParameters;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use ipc_channel::ipc::IpcSender;
use profile_traits::ipc;
-use script_runtime::CommonScriptMsg;
-use script_runtime::ScriptThreadEventCategory::WebVREvent;
+use crate::script_runtime::CommonScriptMsg;
+use crate::script_runtime::ScriptThreadEventCategory::WebVREvent;
use serde_bytes::ByteBuf;
use servo_channel::{channel, Sender};
use std::cell::Cell;
@@ -42,7 +42,7 @@ use std::mem;
use std::ops::Deref;
use std::rc::Rc;
use std::thread;
-use task_source::TaskSourceName;
+use crate::task_source::TaskSourceName;
use webvr_traits::{WebVRDisplayData, WebVRDisplayEvent, WebVRFrameData, WebVRLayer, WebVRMsg};
#[dom_struct]
diff --git a/components/script/dom/vrdisplaycapabilities.rs b/components/script/dom/vrdisplaycapabilities.rs
index 4b1b2132555..a4e7025432a 100644
--- a/components/script/dom/vrdisplaycapabilities.rs
+++ b/components/script/dom/vrdisplaycapabilities.rs
@@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::VRDisplayCapabilitiesBinding;
-use dom::bindings::codegen::Bindings::VRDisplayCapabilitiesBinding::VRDisplayCapabilitiesMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::VRDisplayCapabilitiesBinding;
+use crate::dom::bindings::codegen::Bindings::VRDisplayCapabilitiesBinding::VRDisplayCapabilitiesMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use webvr_traits::WebVRDisplayCapabilities;
diff --git a/components/script/dom/vrdisplayevent.rs b/components/script/dom/vrdisplayevent.rs
index b5776080ce8..abfb9075e52 100644
--- a/components/script/dom/vrdisplayevent.rs
+++ b/components/script/dom/vrdisplayevent.rs
@@ -2,19 +2,19 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::VRDisplayEventBinding;
-use dom::bindings::codegen::Bindings::VRDisplayEventBinding::VRDisplayEventMethods;
-use dom::bindings::codegen::Bindings::VRDisplayEventBinding::VRDisplayEventReason;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::bindings::str::DOMString;
-use dom::event::Event;
-use dom::globalscope::GlobalScope;
-use dom::vrdisplay::VRDisplay;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::VRDisplayEventBinding;
+use crate::dom::bindings::codegen::Bindings::VRDisplayEventBinding::VRDisplayEventMethods;
+use crate::dom::bindings::codegen::Bindings::VRDisplayEventBinding::VRDisplayEventReason;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::Event;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::vrdisplay::VRDisplay;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
use webvr_traits::{WebVRDisplayEvent, WebVRDisplayEventReason};
diff --git a/components/script/dom/vreyeparameters.rs b/components/script/dom/vreyeparameters.rs
index 18fc221db03..aaf6f3d517a 100644
--- a/components/script/dom/vreyeparameters.rs
+++ b/components/script/dom/vreyeparameters.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::VREyeParametersBinding;
-use dom::bindings::codegen::Bindings::VREyeParametersBinding::VREyeParametersMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::globalscope::GlobalScope;
-use dom::vrfieldofview::VRFieldOfView;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::VREyeParametersBinding;
+use crate::dom::bindings::codegen::Bindings::VREyeParametersBinding::VREyeParametersMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::vrfieldofview::VRFieldOfView;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext, JSObject};
use js::typedarray::{Float32Array, CreateWith};
diff --git a/components/script/dom/vrfieldofview.rs b/components/script/dom/vrfieldofview.rs
index c33d6387011..fa9d69d4086 100644
--- a/components/script/dom/vrfieldofview.rs
+++ b/components/script/dom/vrfieldofview.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::VRFieldOfViewBinding;
-use dom::bindings::codegen::Bindings::VRFieldOfViewBinding::VRFieldOfViewMethods;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::VRFieldOfViewBinding;
+use crate::dom::bindings::codegen::Bindings::VRFieldOfViewBinding::VRFieldOfViewMethods;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use webvr_traits::WebVRFieldOfView;
diff --git a/components/script/dom/vrframedata.rs b/components/script/dom/vrframedata.rs
index dc251165e51..054e5b973ab 100644
--- a/components/script/dom/vrframedata.rs
+++ b/components/script/dom/vrframedata.rs
@@ -2,15 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::VRFrameDataBinding;
-use dom::bindings::codegen::Bindings::VRFrameDataBinding::VRFrameDataMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::globalscope::GlobalScope;
-use dom::vrpose::VRPose;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::VRFrameDataBinding;
+use crate::dom::bindings::codegen::Bindings::VRFrameDataBinding::VRFrameDataMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::vrpose::VRPose;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext, JSObject};
use js::typedarray::{Float32Array, CreateWith};
diff --git a/components/script/dom/vrpose.rs b/components/script/dom/vrpose.rs
index 75faa41d20c..c325828ccd4 100644
--- a/components/script/dom/vrpose.rs
+++ b/components/script/dom/vrpose.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::VRPoseBinding;
-use dom::bindings::codegen::Bindings::VRPoseBinding::VRPoseMethods;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::codegen::Bindings::VRPoseBinding;
+use crate::dom::bindings::codegen::Bindings::VRPoseBinding::VRPoseMethods;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext, JSObject};
use js::typedarray::{Float32Array, CreateWith};
diff --git a/components/script/dom/vrstageparameters.rs b/components/script/dom/vrstageparameters.rs
index 61d31036b91..f7dddfc3ec2 100644
--- a/components/script/dom/vrstageparameters.rs
+++ b/components/script/dom/vrstageparameters.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::VRStageParametersBinding;
-use dom::bindings::codegen::Bindings::VRStageParametersBinding::VRStageParametersMethods;
-use dom::bindings::num::Finite;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::VRStageParametersBinding;
+use crate::dom::bindings::codegen::Bindings::VRStageParametersBinding::VRStageParametersMethods;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
use dom_struct::dom_struct;
use js::jsapi::{Heap, JSContext, JSObject};
use js::typedarray::{Float32Array, CreateWith};
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs
index ec839bf3fbf..c63c105a01e 100644
--- a/components/script/dom/webgl2renderingcontext.rs
+++ b/components/script/dom/webgl2renderingcontext.rs
@@ -4,31 +4,31 @@
/// https://www.khronos.org/registry/webgl/specs/latest/2.0/webgl.idl
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding;
-use dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextMethods;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods;
-use dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
-use dom::bindings::codegen::UnionTypes::Float32ArrayOrUnrestrictedFloatSequence;
-use dom::bindings::codegen::UnionTypes::ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement;
-use dom::bindings::codegen::UnionTypes::Int32ArrayOrLongSequence;
-use dom::bindings::error::{ErrorResult, Fallible};
-use dom::bindings::reflector::{reflect_dom_object, Reflector};
-use dom::bindings::root::{Dom, DomRoot, LayoutDom};
-use dom::bindings::str::DOMString;
-use dom::htmlcanvaselement::HTMLCanvasElement;
-use dom::htmliframeelement::HTMLIFrameElement;
-use dom::webglactiveinfo::WebGLActiveInfo;
-use dom::webglbuffer::WebGLBuffer;
-use dom::webglframebuffer::WebGLFramebuffer;
-use dom::webglprogram::WebGLProgram;
-use dom::webglrenderbuffer::WebGLRenderbuffer;
-use dom::webglrenderingcontext::{LayoutCanvasWebGLRenderingContextHelpers, WebGLRenderingContext};
-use dom::webglshader::WebGLShader;
-use dom::webglshaderprecisionformat::WebGLShaderPrecisionFormat;
-use dom::webgltexture::WebGLTexture;
-use dom::webgluniformlocation::WebGLUniformLocation;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding;
+use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextMethods;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods;
+use crate::dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
+use crate::dom::bindings::codegen::UnionTypes::Float32ArrayOrUnrestrictedFloatSequence;
+use crate::dom::bindings::codegen::UnionTypes::ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement;
+use crate::dom::bindings::codegen::UnionTypes::Int32ArrayOrLongSequence;
+use crate::dom::bindings::error::{ErrorResult, Fallible};
+use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
+use crate::dom::bindings::root::{Dom, DomRoot, LayoutDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::htmlcanvaselement::HTMLCanvasElement;
+use crate::dom::htmliframeelement::HTMLIFrameElement;
+use crate::dom::webglactiveinfo::WebGLActiveInfo;
+use crate::dom::webglbuffer::WebGLBuffer;
+use crate::dom::webglframebuffer::WebGLFramebuffer;
+use crate::dom::webglprogram::WebGLProgram;
+use crate::dom::webglrenderbuffer::WebGLRenderbuffer;
+use crate::dom::webglrenderingcontext::{LayoutCanvasWebGLRenderingContextHelpers, WebGLRenderingContext};
+use crate::dom::webglshader::WebGLShader;
+use crate::dom::webglshaderprecisionformat::WebGLShaderPrecisionFormat;
+use crate::dom::webgltexture::WebGLTexture;
+use crate::dom::webgluniformlocation::WebGLUniformLocation;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use euclid::Size2D;
use js::jsapi::{JSContext, JSObject};
diff --git a/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs b/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs
index 030146b8d3a..74d779a94a3 100644
--- a/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs
+++ b/components/script/dom/webgl_extensions/ext/angleinstancedarrays.rs
@@ -3,12 +3,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding;
-use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
-use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysMethods;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding;
+use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
+use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysMethods;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/extblendminmax.rs b/components/script/dom/webgl_extensions/ext/extblendminmax.rs
index 78c4c5bcb78..060595f5c51 100644
--- a/components/script/dom/webgl_extensions/ext/extblendminmax.rs
+++ b/components/script/dom/webgl_extensions/ext/extblendminmax.rs
@@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/extcolorbufferhalffloat.rs b/components/script/dom/webgl_extensions/ext/extcolorbufferhalffloat.rs
index d43880c5998..5f54ba2c609 100644
--- a/components/script/dom/webgl_extensions/ext/extcolorbufferhalffloat.rs
+++ b/components/script/dom/webgl_extensions/ext/extcolorbufferhalffloat.rs
@@ -3,11 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::codegen::Bindings::EXTColorBufferHalfFloatBinding;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webgl_extensions::ext::oestexturehalffloat::OESTextureHalfFloat;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::EXTColorBufferHalfFloatBinding;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webgl_extensions::ext::oestexturehalffloat::OESTextureHalfFloat;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs b/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs
index 2082d771f02..4faf199bfde 100644
--- a/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs
+++ b/components/script/dom/webgl_extensions/ext/extshadertexturelod.rs
@@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::{WebGLVersion, is_gles};
-use dom::bindings::codegen::Bindings::EXTShaderTextureLodBinding;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::EXTShaderTextureLodBinding;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/exttexturefilteranisotropic.rs b/components/script/dom/webgl_extensions/ext/exttexturefilteranisotropic.rs
index ce8e6f840cc..9b491c685bf 100644
--- a/components/script/dom/webgl_extensions/ext/exttexturefilteranisotropic.rs
+++ b/components/script/dom/webgl_extensions/ext/exttexturefilteranisotropic.rs
@@ -3,11 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding;
-use dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding;
+use crate::dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/mod.rs b/components/script/dom/webgl_extensions/ext/mod.rs
index d1a82c24756..54290ceb9eb 100644
--- a/components/script/dom/webgl_extensions/ext/mod.rs
+++ b/components/script/dom/webgl_extensions/ext/mod.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
use super::{ext_constants, WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
pub mod angleinstancedarrays;
diff --git a/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs b/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs
index c3c96bd5891..65e6829831f 100644
--- a/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs
+++ b/components/script/dom/webgl_extensions/ext/oeselementindexuint.rs
@@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::{WebGLVersion, is_gles};
-use dom::bindings::codegen::Bindings::OESElementIndexUintBinding;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::OESElementIndexUintBinding;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs b/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs
index a9142d2fb88..6afef692953 100644
--- a/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs
+++ b/components/script/dom/webgl_extensions/ext/oesstandardderivatives.rs
@@ -3,11 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::{WebGLVersion, is_gles};
-use dom::bindings::codegen::Bindings::OESStandardDerivativesBinding;
-use dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::OESStandardDerivativesBinding;
+use crate::dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/oestexturefloat.rs b/components/script/dom/webgl_extensions/ext/oestexturefloat.rs
index 643f250900f..0c468cf1fa2 100644
--- a/components/script/dom/webgl_extensions/ext/oestexturefloat.rs
+++ b/components/script/dom/webgl_extensions/ext/oestexturefloat.rs
@@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::codegen::Bindings::OESTextureFloatBinding;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::OESTextureFloatBinding;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{constants as webgl, ext_constants as gl, WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/oestexturefloatlinear.rs b/components/script/dom/webgl_extensions/ext/oestexturefloatlinear.rs
index 264dd8fe41d..57d7a594c22 100644
--- a/components/script/dom/webgl_extensions/ext/oestexturefloatlinear.rs
+++ b/components/script/dom/webgl_extensions/ext/oestexturefloatlinear.rs
@@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::OESTextureFloatLinearBinding;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::OESTextureFloatLinearBinding;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{constants as webgl, WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/oestexturehalffloat.rs b/components/script/dom/webgl_extensions/ext/oestexturehalffloat.rs
index 15204a67836..695d77ee67b 100644
--- a/components/script/dom/webgl_extensions/ext/oestexturehalffloat.rs
+++ b/components/script/dom/webgl_extensions/ext/oestexturehalffloat.rs
@@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::{self, OESTextureHalfFloatConstants};
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::{self, OESTextureHalfFloatConstants};
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{constants as webgl, ext_constants as gl, WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/oestexturehalffloatlinear.rs b/components/script/dom/webgl_extensions/ext/oestexturehalffloatlinear.rs
index 80a0583f822..dd44caca9ca 100644
--- a/components/script/dom/webgl_extensions/ext/oestexturehalffloatlinear.rs
+++ b/components/script/dom/webgl_extensions/ext/oestexturehalffloatlinear.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
-use dom::bindings::codegen::Bindings::OESTextureHalfFloatLinearBinding;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
+use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatLinearBinding;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
index 630088ab029..ba1256538d4 100644
--- a/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
+++ b/components/script/dom/webgl_extensions/ext/oesvertexarrayobject.rs
@@ -3,12 +3,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::{self, OESVertexArrayObjectMethods};
-use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::webglrenderingcontext::WebGLRenderingContext;
-use dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES;
+use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::{self, OESVertexArrayObjectMethods};
+use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/ext/webglcolorbufferfloat.rs b/components/script/dom/webgl_extensions/ext/webglcolorbufferfloat.rs
index bc754f1bb5a..7858598e4c6 100644
--- a/components/script/dom/webgl_extensions/ext/webglcolorbufferfloat.rs
+++ b/components/script/dom/webgl_extensions/ext/webglcolorbufferfloat.rs
@@ -3,11 +3,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::codegen::Bindings::WEBGLColorBufferFloatBinding;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webgl_extensions::ext::oestexturefloat::OESTextureFloat;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::WEBGLColorBufferFloatBinding;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webgl_extensions::ext::oestexturefloat::OESTextureFloat;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use super::{WebGLExtension, WebGLExtensions, WebGLExtensionSpec};
diff --git a/components/script/dom/webgl_extensions/extension.rs b/components/script/dom/webgl_extensions/extension.rs
index 8610fcc6e80..6256eb4b608 100644
--- a/components/script/dom/webgl_extensions/extension.rs
+++ b/components/script/dom/webgl_extensions/extension.rs
@@ -3,10 +3,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::DomRoot;
-use dom::bindings::trace::JSTraceable;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use super::WebGLExtensions;
/// Trait implemented by WebGL extensions.
diff --git a/components/script/dom/webgl_extensions/extensions.rs b/components/script/dom/webgl_extensions/extensions.rs
index 560d699cedd..b7fb6c58e8e 100644
--- a/components/script/dom/webgl_extensions/extensions.rs
+++ b/components/script/dom/webgl_extensions/extensions.rs
@@ -3,19 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLVersion;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
-use dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants;
-use dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants;
-use dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
-use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
-use dom::bindings::trace::JSTraceable;
-use dom::extcolorbufferhalffloat::EXTColorBufferHalfFloat;
-use dom::oestexturefloat::OESTextureFloat;
-use dom::oestexturehalffloat::OESTextureHalfFloat;
-use dom::webglcolorbufferfloat::WEBGLColorBufferFloat;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
+use crate::dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants;
+use crate::dom::bindings::codegen::Bindings::OESStandardDerivativesBinding::OESStandardDerivativesConstants;
+use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
+use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::extcolorbufferhalffloat::EXTColorBufferHalfFloat;
+use crate::dom::oestexturefloat::OESTextureFloat;
+use crate::dom::oestexturehalffloat::OESTextureHalfFloat;
+use crate::dom::webglcolorbufferfloat::WEBGLColorBufferFloat;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use fnv::{FnvHashMap, FnvHashSet};
use gleam::gl::{self, GLenum};
use js::jsapi::JSObject;
diff --git a/components/script/dom/webgl_extensions/wrapper.rs b/components/script/dom/webgl_extensions/wrapper.rs
index f45d3ff8045..6b39fc0e2bc 100644
--- a/components/script/dom/webgl_extensions/wrapper.rs
+++ b/components/script/dom/webgl_extensions/wrapper.rs
@@ -2,10 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::MutNullableDom;
-use dom::bindings::trace::JSTraceable;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::MutNullableDom;
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use js::jsapi::JSObject;
use malloc_size_of::MallocSizeOf;
use std::any::Any;
@@ -21,7 +21,7 @@ pub trait WebGLExtensionWrapper: JSTraceable + MallocSizeOf {
ext: &WebGLExtensions,
) -> NonNull<JSObject>;
fn spec(&self) -> WebGLExtensionSpec;
- fn is_supported(&self, &WebGLExtensions) -> bool;
+ fn is_supported(&self, _: &WebGLExtensions) -> bool;
fn is_enabled(&self) -> bool;
fn enable(&self, ext: &WebGLExtensions);
fn name(&self) -> &'static str;
diff --git a/components/script/dom/webgl_validations/tex_image_2d.rs b/components/script/dom/webgl_validations/tex_image_2d.rs
index 46b85dddec7..b60189f9382 100644
--- a/components/script/dom/webgl_validations/tex_image_2d.rs
+++ b/components/script/dom/webgl_validations/tex_image_2d.rs
@@ -3,9 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::WebGLError::*;
-use dom::bindings::root::DomRoot;
-use dom::webglrenderingcontext::WebGLRenderingContext;
-use dom::webgltexture::WebGLTexture;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::webgltexture::WebGLTexture;
use std::{self, fmt};
use super::WebGLValidator;
use super::types::{TexImageTarget, TexDataType, TexFormat};
diff --git a/components/script/dom/webgl_validations/types.rs b/components/script/dom/webgl_validations/types.rs
index f3741d218f7..adcc51bf1ff 100644
--- a/components/script/dom/webgl_validations/types.rs
+++ b/components/script/dom/webgl_validations/types.rs
@@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
+use crate::dom::bindings::codegen::Bindings::OESTextureHalfFloatBinding::OESTextureHalfFloatConstants;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
/// This macro creates type-safe wrappers for WebGL types, associating variants
/// with gl constants.
diff --git a/components/script/dom/webglactiveinfo.rs b/components/script/dom/webglactiveinfo.rs
index 11eb96a7a0f..2f6d9ee54f0 100644
--- a/components/script/dom/webglactiveinfo.rs
+++ b/components/script/dom/webglactiveinfo.rs
@@ -3,12 +3,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
-use dom::bindings::codegen::Bindings::WebGLActiveInfoBinding;
-use dom::bindings::codegen::Bindings::WebGLActiveInfoBinding::WebGLActiveInfoMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::WebGLActiveInfoBinding;
+use crate::dom::bindings::codegen::Bindings::WebGLActiveInfoBinding::WebGLActiveInfoMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/webglbuffer.rs b/components/script/dom/webglbuffer.rs
index 6aa0e04dd3f..28f0f7f1aa6 100644
--- a/components/script/dom/webglbuffer.rs
+++ b/components/script/dom/webglbuffer.rs
@@ -5,13 +5,13 @@
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
use canvas_traits::webgl::{WebGLBufferId, WebGLCommand, WebGLError, WebGLResult};
use canvas_traits::webgl::webgl_channel;
-use dom::bindings::codegen::Bindings::WebGLBufferBinding;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglobject::WebGLObject;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::WebGLBufferBinding;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglobject::WebGLObject;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use ipc_channel::ipc;
use std::cell::Cell;
diff --git a/components/script/dom/webglcontextevent.rs b/components/script/dom/webglcontextevent.rs
index bdecb299bd0..ba1eb291547 100644
--- a/components/script/dom/webglcontextevent.rs
+++ b/components/script/dom/webglcontextevent.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::EventBinding::EventMethods;
-use dom::bindings::codegen::Bindings::WebGLContextEventBinding;
-use dom::bindings::codegen::Bindings::WebGLContextEventBinding::WebGLContextEventInit;
-use dom::bindings::codegen::Bindings::WebGLContextEventBinding::WebGLContextEventMethods;
-use dom::bindings::error::Fallible;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::EventBinding::EventMethods;
+use crate::dom::bindings::codegen::Bindings::WebGLContextEventBinding;
+use crate::dom::bindings::codegen::Bindings::WebGLContextEventBinding::WebGLContextEventInit;
+use crate::dom::bindings::codegen::Bindings::WebGLContextEventBinding::WebGLContextEventMethods;
+use crate::dom::bindings::error::Fallible;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use servo_atoms::Atom;
diff --git a/components/script/dom/webglframebuffer.rs b/components/script/dom/webglframebuffer.rs
index c9da9ae39a5..a5a130efea6 100644
--- a/components/script/dom/webglframebuffer.rs
+++ b/components/script/dom/webglframebuffer.rs
@@ -5,16 +5,16 @@
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
use canvas_traits::webgl::{WebGLCommand, WebGLFramebufferBindingRequest, WebGLFramebufferId};
use canvas_traits::webgl::{WebGLResult, WebGLError, webgl_channel};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::WebGLFramebufferBinding;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot};
-use dom::webglobject::WebGLObject;
-use dom::webglrenderbuffer::WebGLRenderbuffer;
-use dom::webglrenderingcontext::WebGLRenderingContext;
-use dom::webgltexture::WebGLTexture;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::WebGLFramebufferBinding;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot};
+use crate::dom::webglobject::WebGLObject;
+use crate::dom::webglrenderbuffer::WebGLRenderbuffer;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::webgltexture::WebGLTexture;
use dom_struct::dom_struct;
use std::cell::Cell;
diff --git a/components/script/dom/webglobject.rs b/components/script/dom/webglobject.rs
index 7d4dbabc998..fc4092402bf 100644
--- a/components/script/dom/webglobject.rs
+++ b/components/script/dom/webglobject.rs
@@ -3,9 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
-use dom::bindings::reflector::Reflector;
-use dom::bindings::root::Dom;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::root::Dom;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/webglprogram.rs b/components/script/dom/webglprogram.rs
index 5f857188481..1a835da8c8d 100644
--- a/components/script/dom/webglprogram.rs
+++ b/components/script/dom/webglprogram.rs
@@ -5,18 +5,18 @@
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
use canvas_traits::webgl::{ActiveAttribInfo, ActiveUniformInfo, WebGLCommand, WebGLError};
use canvas_traits::webgl::{WebGLProgramId, WebGLResult, webgl_channel};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::WebGLProgramBinding;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::webglactiveinfo::WebGLActiveInfo;
-use dom::webglobject::WebGLObject;
-use dom::webglrenderingcontext::WebGLRenderingContext;
-use dom::webglshader::WebGLShader;
-use dom::webgluniformlocation::WebGLUniformLocation;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::WebGLProgramBinding;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::webglactiveinfo::WebGLActiveInfo;
+use crate::dom::webglobject::WebGLObject;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::webglshader::WebGLShader;
+use crate::dom::webgluniformlocation::WebGLUniformLocation;
use dom_struct::dom_struct;
use fnv::FnvHashSet;
use std::cell::{Cell, Ref};
diff --git a/components/script/dom/webglrenderbuffer.rs b/components/script/dom/webglrenderbuffer.rs
index 2447ef28c09..7176194e6a9 100644
--- a/components/script/dom/webglrenderbuffer.rs
+++ b/components/script/dom/webglrenderbuffer.rs
@@ -4,16 +4,16 @@
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
use canvas_traits::webgl::{WebGLCommand, WebGLError, WebGLRenderbufferId, WebGLResult, is_gles, webgl_channel};
-use dom::bindings::codegen::Bindings::EXTColorBufferHalfFloatBinding::EXTColorBufferHalfFloatConstants;
-use dom::bindings::codegen::Bindings::WEBGLColorBufferFloatBinding::WEBGLColorBufferFloatConstants;
-use dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants;
-use dom::bindings::codegen::Bindings::WebGLRenderbufferBinding;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webglobject::WebGLObject;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::codegen::Bindings::EXTColorBufferHalfFloatBinding::EXTColorBufferHalfFloatConstants;
+use crate::dom::bindings::codegen::Bindings::WEBGLColorBufferFloatBinding::WEBGLColorBufferFloatConstants;
+use crate::dom::bindings::codegen::Bindings::WebGL2RenderingContextBinding::WebGL2RenderingContextConstants;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderbufferBinding;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webglobject::WebGLObject;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use std::cell::Cell;
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs
index 786e3f71c33..7a9c53a415b 100644
--- a/components/script/dom/webglrenderingcontext.rs
+++ b/components/script/dom/webglrenderingcontext.rs
@@ -11,46 +11,46 @@ use canvas_traits::webgl::{WebGLFramebufferBindingRequest, WebGLMsg, WebGLMsgSen
use canvas_traits::webgl::{WebGLProgramId, WebGLResult, WebGLSLVersion, WebGLSender};
use canvas_traits::webgl::{WebGLVersion, WebVRCommand, webgl_channel};
use canvas_traits::webgl::WebGLError::*;
-use dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
-use dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding::EXTBlendMinmaxConstants;
-use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::TexImageSource;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods;
-use dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
-use dom::bindings::codegen::UnionTypes::Float32ArrayOrUnrestrictedFloatSequence;
-use dom::bindings::codegen::UnionTypes::Int32ArrayOrLongSequence;
-use dom::bindings::conversions::{DerivedFrom, ToJSValConvertible};
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{Dom, DomOnceCell, DomRoot, LayoutDom, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::htmlcanvaselement::HTMLCanvasElement;
-use dom::htmlcanvaselement::utils as canvas_utils;
-use dom::htmliframeelement::HTMLIFrameElement;
-use dom::node::{Node, NodeDamage, document_from_node, window_from_node};
-use dom::webgl_extensions::WebGLExtensions;
-use dom::webgl_validations::WebGLValidator;
-use dom::webgl_validations::tex_image_2d::{CommonTexImage2DValidator, CommonTexImage2DValidatorResult};
-use dom::webgl_validations::tex_image_2d::{TexImage2DValidator, TexImage2DValidatorResult};
-use dom::webgl_validations::types::{TexDataType, TexFormat, TexImageTarget};
-use dom::webglactiveinfo::WebGLActiveInfo;
-use dom::webglbuffer::WebGLBuffer;
-use dom::webglcontextevent::WebGLContextEvent;
-use dom::webglframebuffer::{WebGLFramebuffer, WebGLFramebufferAttachmentRoot, CompleteForRendering};
-use dom::webglobject::WebGLObject;
-use dom::webglprogram::WebGLProgram;
-use dom::webglrenderbuffer::WebGLRenderbuffer;
-use dom::webglshader::WebGLShader;
-use dom::webglshaderprecisionformat::WebGLShaderPrecisionFormat;
-use dom::webgltexture::{TexParameterValue, WebGLTexture};
-use dom::webgluniformlocation::WebGLUniformLocation;
-use dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::ANGLEInstancedArraysBinding::ANGLEInstancedArraysConstants;
+use crate::dom::bindings::codegen::Bindings::EXTBlendMinmaxBinding::EXTBlendMinmaxConstants;
+use crate::dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::TexImageSource;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLContextAttributes;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextMethods;
+use crate::dom::bindings::codegen::UnionTypes::ArrayBufferViewOrArrayBuffer;
+use crate::dom::bindings::codegen::UnionTypes::Float32ArrayOrUnrestrictedFloatSequence;
+use crate::dom::bindings::codegen::UnionTypes::Int32ArrayOrLongSequence;
+use crate::dom::bindings::conversions::{DerivedFrom, ToJSValConvertible};
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomOnceCell, DomRoot, LayoutDom, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::htmlcanvaselement::HTMLCanvasElement;
+use crate::dom::htmlcanvaselement::utils as canvas_utils;
+use crate::dom::htmliframeelement::HTMLIFrameElement;
+use crate::dom::node::{Node, NodeDamage, document_from_node, window_from_node};
+use crate::dom::webgl_extensions::WebGLExtensions;
+use crate::dom::webgl_validations::WebGLValidator;
+use crate::dom::webgl_validations::tex_image_2d::{CommonTexImage2DValidator, CommonTexImage2DValidatorResult};
+use crate::dom::webgl_validations::tex_image_2d::{TexImage2DValidator, TexImage2DValidatorResult};
+use crate::dom::webgl_validations::types::{TexDataType, TexFormat, TexImageTarget};
+use crate::dom::webglactiveinfo::WebGLActiveInfo;
+use crate::dom::webglbuffer::WebGLBuffer;
+use crate::dom::webglcontextevent::WebGLContextEvent;
+use crate::dom::webglframebuffer::{WebGLFramebuffer, WebGLFramebufferAttachmentRoot, CompleteForRendering};
+use crate::dom::webglobject::WebGLObject;
+use crate::dom::webglprogram::WebGLProgram;
+use crate::dom::webglrenderbuffer::WebGLRenderbuffer;
+use crate::dom::webglshader::WebGLShader;
+use crate::dom::webglshaderprecisionformat::WebGLShaderPrecisionFormat;
+use crate::dom::webgltexture::{TexParameterValue, WebGLTexture};
+use crate::dom::webgluniformlocation::WebGLUniformLocation;
+use crate::dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use euclid::{Point2D, Rect, Size2D};
use half::f16;
diff --git a/components/script/dom/webglshader.rs b/components/script/dom/webglshader.rs
index 685ae99505a..9add3e686b5 100644
--- a/components/script/dom/webglshader.rs
+++ b/components/script/dom/webglshader.rs
@@ -6,17 +6,17 @@
use canvas_traits::webgl::{WebGLCommand, WebGLError};
use canvas_traits::webgl::{WebGLResult, WebGLSLVersion, WebGLShaderId};
use canvas_traits::webgl::{WebGLVersion, webgl_channel};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::WebGLShaderBinding;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::webgl_extensions::WebGLExtensions;
-use dom::webgl_extensions::ext::extshadertexturelod::EXTShaderTextureLod;
-use dom::webgl_extensions::ext::oesstandardderivatives::OESStandardDerivatives;
-use dom::webglobject::WebGLObject;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::WebGLShaderBinding;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::webgl_extensions::WebGLExtensions;
+use crate::dom::webgl_extensions::ext::extshadertexturelod::EXTShaderTextureLod;
+use crate::dom::webgl_extensions::ext::oesstandardderivatives::OESStandardDerivatives;
+use crate::dom::webglobject::WebGLObject;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use mozangle::shaders::{BuiltInResources, Output, ShaderValidator};
use offscreen_gl_context::GLLimits;
diff --git a/components/script/dom/webglshaderprecisionformat.rs b/components/script/dom/webglshaderprecisionformat.rs
index 5ac6c770c6c..d0551554a96 100644
--- a/components/script/dom/webglshaderprecisionformat.rs
+++ b/components/script/dom/webglshaderprecisionformat.rs
@@ -5,11 +5,11 @@
#![allow(dead_code)]
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
-use dom::bindings::codegen::Bindings::WebGLShaderPrecisionFormatBinding;
-use dom::bindings::codegen::Bindings::WebGLShaderPrecisionFormatBinding::WebGLShaderPrecisionFormatMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::WebGLShaderPrecisionFormatBinding;
+use crate::dom::bindings::codegen::Bindings::WebGLShaderPrecisionFormatBinding::WebGLShaderPrecisionFormatMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/webgltexture.rs b/components/script/dom/webgltexture.rs
index 7037656ed5c..443c5d031a1 100644
--- a/components/script/dom/webgltexture.rs
+++ b/components/script/dom/webgltexture.rs
@@ -6,16 +6,16 @@
use canvas_traits::webgl::{DOMToTextureCommand, WebGLCommand, WebGLError};
use canvas_traits::webgl::{WebGLResult, WebGLTextureId, webgl_channel};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
-use dom::bindings::codegen::Bindings::WebGLTextureBinding;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::webgl_validations::types::{TexImageTarget, TexFormat, TexDataType};
-use dom::webglobject::WebGLObject;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::EXTTextureFilterAnisotropicBinding::EXTTextureFilterAnisotropicConstants;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
+use crate::dom::bindings::codegen::Bindings::WebGLTextureBinding;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::webgl_validations::types::{TexImageTarget, TexFormat, TexDataType};
+use crate::dom::webglobject::WebGLObject;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use std::cell::Cell;
use std::cmp;
diff --git a/components/script/dom/webgluniformlocation.rs b/components/script/dom/webgluniformlocation.rs
index de3a39bf2c4..58e51048f54 100644
--- a/components/script/dom/webgluniformlocation.rs
+++ b/components/script/dom/webgluniformlocation.rs
@@ -4,10 +4,10 @@
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
use canvas_traits::webgl::WebGLProgramId;
-use dom::bindings::codegen::Bindings::WebGLUniformLocationBinding;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::window::Window;
+use crate::dom::bindings::codegen::Bindings::WebGLUniformLocationBinding;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/webglvertexarrayobjectoes.rs b/components/script/dom/webglvertexarrayobjectoes.rs
index 899f49d0635..101e68679c6 100644
--- a/components/script/dom/webglvertexarrayobjectoes.rs
+++ b/components/script/dom/webglvertexarrayobjectoes.rs
@@ -3,15 +3,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::webgl::{ActiveAttribInfo, WebGLCommand, WebGLError, WebGLResult, WebGLVertexArrayId};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
-use dom::bindings::codegen::Bindings::WebGLVertexArrayObjectOESBinding;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::webglbuffer::WebGLBuffer;
-use dom::webglobject::WebGLObject;
-use dom::webglrenderingcontext::WebGLRenderingContext;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGLRenderingContextConstants as constants;
+use crate::dom::bindings::codegen::Bindings::WebGLVertexArrayObjectOESBinding;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::webglbuffer::WebGLBuffer;
+use crate::dom::webglobject::WebGLObject;
+use crate::dom::webglrenderingcontext::WebGLRenderingContext;
use dom_struct::dom_struct;
use ref_filter_map::ref_filter_map;
use std::cell::{Cell, Ref};
diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs
index 33b4098b01e..117a5a1244a 100644
--- a/components/script/dom/websocket.rs
+++ b/components/script/dom/websocket.rs
@@ -2,24 +2,24 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
-use dom::bindings::codegen::Bindings::WebSocketBinding;
-use dom::bindings::codegen::Bindings::WebSocketBinding::{BinaryType, WebSocketMethods};
-use dom::bindings::codegen::UnionTypes::StringOrStringSequence;
-use dom::bindings::conversions::ToJSValConvertible;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::{DOMString, USVString, is_token};
-use dom::blob::{Blob, BlobImpl};
-use dom::closeevent::CloseEvent;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::messageevent::MessageEvent;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobMethods;
+use crate::dom::bindings::codegen::Bindings::WebSocketBinding;
+use crate::dom::bindings::codegen::Bindings::WebSocketBinding::{BinaryType, WebSocketMethods};
+use crate::dom::bindings::codegen::UnionTypes::StringOrStringSequence;
+use crate::dom::bindings::conversions::ToJSValConvertible;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::{DOMString, USVString, is_token};
+use crate::dom::blob::{Blob, BlobImpl};
+use crate::dom::closeevent::CloseEvent;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::messageevent::MessageEvent;
use dom_struct::dom_struct;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use js::jsapi::{JSAutoCompartment, JSObject};
@@ -31,16 +31,16 @@ use net_traits::{WebSocketDomAction, WebSocketNetworkEvent};
use net_traits::MessageData;
use net_traits::request::{RequestInit, RequestMode};
use profile_traits::ipc as ProfiledIpc;
-use script_runtime::CommonScriptMsg;
-use script_runtime::ScriptThreadEventCategory::WebSocketEvent;
+use crate::script_runtime::CommonScriptMsg;
+use crate::script_runtime::ScriptThreadEventCategory::WebSocketEvent;
use servo_url::{ImmutableOrigin, ServoUrl};
use std::borrow::ToOwned;
use std::cell::Cell;
use std::ptr;
use std::thread;
-use task::{TaskOnce, TaskCanceller};
-use task_source::TaskSource;
-use task_source::websocket::WebsocketTaskSource;
+use crate::task::{TaskOnce, TaskCanceller};
+use crate::task_source::TaskSource;
+use crate::task_source::websocket::WebsocketTaskSource;
#[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf, PartialEq)]
enum WebSocketRequestState {
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index e3ae0634b93..b9ad630825c 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -8,56 +8,56 @@ use bluetooth_traits::BluetoothRequest;
use canvas_traits::webgl::WebGLChan;
use cssparser::{Parser, ParserInput};
use devtools_traits::{ScriptToDevtoolsControlMsg, TimelineMarker, TimelineMarkerType};
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState};
-use dom::bindings::codegen::Bindings::FunctionBinding::Function;
-use dom::bindings::codegen::Bindings::HistoryBinding::HistoryBinding::HistoryMethods;
-use dom::bindings::codegen::Bindings::MediaQueryListBinding::MediaQueryListBinding::MediaQueryListMethods;
-use dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionState;
-use dom::bindings::codegen::Bindings::RequestBinding::RequestInit;
-use dom::bindings::codegen::Bindings::WindowBinding::{self, FrameRequestCallback, WindowMethods};
-use dom::bindings::codegen::Bindings::WindowBinding::{ScrollBehavior, ScrollToOptions};
-use dom::bindings::codegen::UnionTypes::RequestOrUSVString;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::num::Finite;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::bindings::str::{DOMString, USVString};
-use dom::bindings::structuredclone::StructuredCloneData;
-use dom::bindings::trace::RootedTraceableBox;
-use dom::bindings::utils::{GlobalStaticData, WindowProxyHandler};
-use dom::bindings::weakref::DOMTracker;
-use dom::bluetooth::BluetoothExtraPermissionData;
-use dom::crypto::Crypto;
-use dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
-use dom::customelementregistry::CustomElementRegistry;
-use dom::document::{AnimationFrameCallback, Document};
-use dom::element::Element;
-use dom::event::Event;
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::hashchangeevent::HashChangeEvent;
-use dom::history::History;
-use dom::location::Location;
-use dom::mediaquerylist::{MediaQueryList, MediaQueryListMatchState};
-use dom::mediaquerylistevent::MediaQueryListEvent;
-use dom::messageevent::MessageEvent;
-use dom::navigator::Navigator;
-use dom::node::{Node, NodeDamage, document_from_node, from_untrusted_node_address};
-use dom::performance::Performance;
-use dom::promise::Promise;
-use dom::screen::Screen;
-use dom::storage::Storage;
-use dom::testrunner::TestRunner;
-use dom::windowproxy::WindowProxy;
-use dom::worklet::Worklet;
-use dom::workletglobalscope::WorkletGlobalScopeType;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::{DocumentMethods, DocumentReadyState};
+use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function;
+use crate::dom::bindings::codegen::Bindings::HistoryBinding::HistoryBinding::HistoryMethods;
+use crate::dom::bindings::codegen::Bindings::MediaQueryListBinding::MediaQueryListBinding::MediaQueryListMethods;
+use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionState;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestInit;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::{self, FrameRequestCallback, WindowMethods};
+use crate::dom::bindings::codegen::Bindings::WindowBinding::{ScrollBehavior, ScrollToOptions};
+use crate::dom::bindings::codegen::UnionTypes::RequestOrUSVString;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::num::Finite;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::bindings::structuredclone::StructuredCloneData;
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::bindings::utils::{GlobalStaticData, WindowProxyHandler};
+use crate::dom::bindings::weakref::DOMTracker;
+use crate::dom::bluetooth::BluetoothExtraPermissionData;
+use crate::dom::crypto::Crypto;
+use crate::dom::cssstyledeclaration::{CSSModificationAccess, CSSStyleDeclaration, CSSStyleOwner};
+use crate::dom::customelementregistry::CustomElementRegistry;
+use crate::dom::document::{AnimationFrameCallback, Document};
+use crate::dom::element::Element;
+use crate::dom::event::Event;
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::hashchangeevent::HashChangeEvent;
+use crate::dom::history::History;
+use crate::dom::location::Location;
+use crate::dom::mediaquerylist::{MediaQueryList, MediaQueryListMatchState};
+use crate::dom::mediaquerylistevent::MediaQueryListEvent;
+use crate::dom::messageevent::MessageEvent;
+use crate::dom::navigator::Navigator;
+use crate::dom::node::{Node, NodeDamage, document_from_node, from_untrusted_node_address};
+use crate::dom::performance::Performance;
+use crate::dom::promise::Promise;
+use crate::dom::screen::Screen;
+use crate::dom::storage::Storage;
+use crate::dom::testrunner::TestRunner;
+use crate::dom::windowproxy::WindowProxy;
+use crate::dom::worklet::Worklet;
+use crate::dom::workletglobalscope::WorkletGlobalScopeType;
use dom_struct::dom_struct;
use embedder_traits::EmbedderMsg;
use euclid::{Point2D, Vector2D, Rect, Size2D, TypedPoint2D, TypedScale, TypedSize2D};
-use fetch;
+use crate::fetch;
use ipc_channel::ipc::IpcSender;
use ipc_channel::router::ROUTER;
use js::jsapi::JSAutoCompartment;
@@ -68,9 +68,9 @@ use js::jsval::JSVal;
use js::jsval::UndefinedValue;
use js::rust::HandleValue;
use js::rust::wrappers::JS_DefineProperty;
-use layout_image::fetch_image_for_layout;
+use crate::layout_image::fetch_image_for_layout;
use libc;
-use microtask::MicrotaskQueue;
+use crate::microtask::MicrotaskQueue;
use msg::constellation_msg::PipelineId;
use net_traits::{ResourceThreads, ReferrerPolicy};
use net_traits::image_cache::{ImageCache, ImageResponder, ImageResponse};
@@ -85,9 +85,9 @@ use script_layout_interface::message::{Msg, Reflow, QueryMsg, ReflowGoal, Script
use script_layout_interface::reporter::CSSErrorReporter;
use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC};
use script_layout_interface::rpc::{NodeScrollIdResponse, ResolvedStyleResponse, TextIndexResponse};
-use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, ScriptThreadEventCategory, Runtime};
-use script_thread::{ImageCacheMsg, MainThreadScriptChan, MainThreadScriptMsg};
-use script_thread::{ScriptThread, SendableMainThreadScriptChan};
+use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, ScriptThreadEventCategory, Runtime};
+use crate::script_thread::{ImageCacheMsg, MainThreadScriptChan, MainThreadScriptMsg};
+use crate::script_thread::{ScriptThread, SendableMainThreadScriptChan};
use script_traits::{ConstellationControlMsg, DocumentState, LoadData};
use script_traits::{ScriptToConstellationChan, ScriptMsg, ScrollState, TimerEvent, TimerEventId};
use script_traits::{TimerSchedulerMsg, UntrustedNodeAddress, WindowSizeData, WindowSizeType};
@@ -118,21 +118,21 @@ use style::selector_parser::PseudoElement;
use style::str::HTML_SPACE_CHARACTERS;
use style::stylesheets::CssRuleType;
use style_traits::{CSSPixel, DevicePixel, ParsingMode};
-use task::TaskCanceller;
-use task_source::TaskSourceName;
-use task_source::dom_manipulation::DOMManipulationTaskSource;
-use task_source::file_reading::FileReadingTaskSource;
-use task_source::history_traversal::HistoryTraversalTaskSource;
-use task_source::media_element::MediaElementTaskSource;
-use task_source::networking::NetworkingTaskSource;
-use task_source::performance_timeline::PerformanceTimelineTaskSource;
-use task_source::remote_event::RemoteEventTaskSource;
-use task_source::user_interaction::UserInteractionTaskSource;
-use task_source::websocket::WebsocketTaskSource;
+use crate::task::TaskCanceller;
+use crate::task_source::TaskSourceName;
+use crate::task_source::dom_manipulation::DOMManipulationTaskSource;
+use crate::task_source::file_reading::FileReadingTaskSource;
+use crate::task_source::history_traversal::HistoryTraversalTaskSource;
+use crate::task_source::media_element::MediaElementTaskSource;
+use crate::task_source::networking::NetworkingTaskSource;
+use crate::task_source::performance_timeline::PerformanceTimelineTaskSource;
+use crate::task_source::remote_event::RemoteEventTaskSource;
+use crate::task_source::user_interaction::UserInteractionTaskSource;
+use crate::task_source::websocket::WebsocketTaskSource;
use time;
-use timers::{IsInterval, TimerCallback};
+use crate::timers::{IsInterval, TimerCallback};
use url::Position;
-use webdriver_handlers::jsval_to_webdriver;
+use crate::webdriver_handlers::jsval_to_webdriver;
use webrender_api::{DeviceIntPoint, DeviceUintSize, DocumentId, ExternalScrollId, RenderApiSender};
use webvr_traits::WebVRMsg;
diff --git a/components/script/dom/windowproxy.rs b/components/script/dom/windowproxy.rs
index d1b5c185565..0cbcf7c2df5 100644
--- a/components/script/dom/windowproxy.rs
+++ b/components/script/dom/windowproxy.rs
@@ -2,21 +2,21 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::conversions::{ToJSValConvertible, root_from_handleobject};
-use dom::bindings::error::{Error, throw_dom_exception};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::proxyhandler::{fill_property_descriptor, get_property_descriptor};
-use dom::bindings::reflector::{DomObject, Reflector};
-use dom::bindings::root::{Dom, DomRoot, RootedReference};
-use dom::bindings::str::DOMString;
-use dom::bindings::trace::JSTraceable;
-use dom::bindings::utils::{WindowProxyHandler, get_array_index_from_id, AsVoidPtr};
-use dom::dissimilaroriginwindow::DissimilarOriginWindow;
-use dom::document::Document;
-use dom::element::Element;
-use dom::globalscope::GlobalScope;
-use dom::window::Window;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::conversions::{ToJSValConvertible, root_from_handleobject};
+use crate::dom::bindings::error::{Error, throw_dom_exception};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::proxyhandler::{fill_property_descriptor, get_property_descriptor};
+use crate::dom::bindings::reflector::{DomObject, Reflector};
+use crate::dom::bindings::root::{Dom, DomRoot, RootedReference};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::bindings::utils::{WindowProxyHandler, get_array_index_from_id, AsVoidPtr};
+use crate::dom::dissimilaroriginwindow::DissimilarOriginWindow;
+use crate::dom::document::Document;
+use crate::dom::element::Element;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use embedder_traits::EmbedderMsg;
use ipc_channel::ipc;
@@ -43,7 +43,7 @@ use js::rust::wrappers::{NewWindowProxy, SetWindowProxy, JS_TransplantObject};
use msg::constellation_msg::BrowsingContextId;
use msg::constellation_msg::PipelineId;
use msg::constellation_msg::TopLevelBrowsingContextId;
-use script_thread::ScriptThread;
+use crate::script_thread::ScriptThread;
use script_traits::{AuxiliaryBrowsingContextLoadInfo, LoadData, NewLayoutInfo, ScriptMsg};
use servo_config::prefs::PREFS;
use servo_url::ServoUrl;
diff --git a/components/script/dom/worker.rs b/components/script/dom/worker.rs
index 8b6a96d8489..d3455845cbf 100644
--- a/components/script/dom/worker.rs
+++ b/components/script/dom/worker.rs
@@ -3,22 +3,22 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{DevtoolsPageInfo, ScriptToDevtoolsControlMsg};
-use dom::abstractworker::SimpleWorkerErrorHandler;
-use dom::abstractworker::WorkerScriptMsg;
-use dom::bindings::codegen::Bindings::WorkerBinding;
-use dom::bindings::codegen::Bindings::WorkerBinding::WorkerMethods;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::bindings::structuredclone::StructuredCloneData;
-use dom::dedicatedworkerglobalscope::{DedicatedWorkerGlobalScope, DedicatedWorkerScriptMsg};
-use dom::eventtarget::EventTarget;
-use dom::globalscope::GlobalScope;
-use dom::messageevent::MessageEvent;
-use dom::workerglobalscope::prepare_workerscope_init;
+use crate::dom::abstractworker::SimpleWorkerErrorHandler;
+use crate::dom::abstractworker::WorkerScriptMsg;
+use crate::dom::bindings::codegen::Bindings::WorkerBinding;
+use crate::dom::bindings::codegen::Bindings::WorkerBinding::WorkerMethods;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::bindings::structuredclone::StructuredCloneData;
+use crate::dom::dedicatedworkerglobalscope::{DedicatedWorkerGlobalScope, DedicatedWorkerScriptMsg};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::messageevent::MessageEvent;
+use crate::dom::workerglobalscope::prepare_workerscope_init;
use dom_struct::dom_struct;
use ipc_channel::ipc;
use js::jsapi::{JSAutoCompartment, JSContext, JS_RequestInterruptCallback};
@@ -29,7 +29,7 @@ use servo_channel::{channel, Sender};
use std::cell::Cell;
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
-use task::TaskOnce;
+use crate::task::TaskOnce;
pub type TrustedWorkerAddress = Trusted<Worker>;
diff --git a/components/script/dom/workerglobalscope.rs b/components/script/dom/workerglobalscope.rs
index edcdb329af8..8ca6aed86fc 100644
--- a/components/script/dom/workerglobalscope.rs
+++ b/components/script/dom/workerglobalscope.rs
@@ -3,28 +3,28 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::{DevtoolScriptControlMsg, WorkerId};
-use dom::bindings::codegen::Bindings::FunctionBinding::Function;
-use dom::bindings::codegen::Bindings::RequestBinding::RequestInit;
-use dom::bindings::codegen::Bindings::WorkerGlobalScopeBinding::WorkerGlobalScopeMethods;
-use dom::bindings::codegen::UnionTypes::RequestOrUSVString;
-use dom::bindings::error::{Error, ErrorResult, Fallible, report_pending_exception};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::DomObject;
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::settings_stack::AutoEntryScript;
-use dom::bindings::str::{DOMString, USVString};
-use dom::bindings::trace::RootedTraceableBox;
-use dom::crypto::Crypto;
-use dom::dedicatedworkerglobalscope::DedicatedWorkerGlobalScope;
-use dom::globalscope::GlobalScope;
-use dom::performance::Performance;
-use dom::promise::Promise;
-use dom::serviceworkerglobalscope::ServiceWorkerGlobalScope;
-use dom::window::{base64_atob, base64_btoa};
-use dom::workerlocation::WorkerLocation;
-use dom::workernavigator::WorkerNavigator;
+use crate::dom::bindings::codegen::Bindings::FunctionBinding::Function;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestInit;
+use crate::dom::bindings::codegen::Bindings::WorkerGlobalScopeBinding::WorkerGlobalScopeMethods;
+use crate::dom::bindings::codegen::UnionTypes::RequestOrUSVString;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible, report_pending_exception};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::DomObject;
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::settings_stack::AutoEntryScript;
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::crypto::Crypto;
+use crate::dom::dedicatedworkerglobalscope::DedicatedWorkerGlobalScope;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::performance::Performance;
+use crate::dom::promise::Promise;
+use crate::dom::serviceworkerglobalscope::ServiceWorkerGlobalScope;
+use crate::dom::window::{base64_atob, base64_btoa};
+use crate::dom::workerlocation::WorkerLocation;
+use crate::dom::workernavigator::WorkerNavigator;
use dom_struct::dom_struct;
-use fetch;
+use crate::fetch;
use ipc_channel::ipc::IpcSender;
use js::jsapi::{JSAutoCompartment, JSContext};
use js::jsval::UndefinedValue;
@@ -33,7 +33,7 @@ use js::rust::HandleValue;
use msg::constellation_msg::PipelineId;
use net_traits::{IpcSend, load_whole_resource};
use net_traits::request::{CredentialsMode, Destination, RequestInit as NetRequestInit};
-use script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, get_reports, Runtime};
+use crate::script_runtime::{CommonScriptMsg, ScriptChan, ScriptPort, get_reports, Runtime};
use script_traits::{TimerEvent, TimerEventId};
use script_traits::WorkerGlobalScopeInit;
use servo_channel::Receiver;
@@ -42,15 +42,15 @@ use std::default::Default;
use std::rc::Rc;
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
-use task::TaskCanceller;
-use task_source::dom_manipulation::DOMManipulationTaskSource;
-use task_source::file_reading::FileReadingTaskSource;
-use task_source::networking::NetworkingTaskSource;
-use task_source::performance_timeline::PerformanceTimelineTaskSource;
-use task_source::remote_event::RemoteEventTaskSource;
-use task_source::websocket::WebsocketTaskSource;
+use crate::task::TaskCanceller;
+use crate::task_source::dom_manipulation::DOMManipulationTaskSource;
+use crate::task_source::file_reading::FileReadingTaskSource;
+use crate::task_source::networking::NetworkingTaskSource;
+use crate::task_source::performance_timeline::PerformanceTimelineTaskSource;
+use crate::task_source::remote_event::RemoteEventTaskSource;
+use crate::task_source::websocket::WebsocketTaskSource;
use time::precise_time_ns;
-use timers::{IsInterval, TimerCallback};
+use crate::timers::{IsInterval, TimerCallback};
pub fn prepare_workerscope_init(
global: &GlobalScope,
diff --git a/components/script/dom/workerlocation.rs b/components/script/dom/workerlocation.rs
index 1227982d1c0..5ff7c05961c 100644
--- a/components/script/dom/workerlocation.rs
+++ b/components/script/dom/workerlocation.rs
@@ -2,13 +2,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::WorkerLocationBinding;
-use dom::bindings::codegen::Bindings::WorkerLocationBinding::WorkerLocationMethods;
-use dom::bindings::reflector::{Reflector, reflect_dom_object};
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::{DOMString, USVString};
-use dom::urlhelper::UrlHelper;
-use dom::workerglobalscope::WorkerGlobalScope;
+use crate::dom::bindings::codegen::Bindings::WorkerLocationBinding;
+use crate::dom::bindings::codegen::Bindings::WorkerLocationBinding::WorkerLocationMethods;
+use crate::dom::bindings::reflector::{Reflector, reflect_dom_object};
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::{DOMString, USVString};
+use crate::dom::urlhelper::UrlHelper;
+use crate::dom::workerglobalscope::WorkerGlobalScope;
use dom_struct::dom_struct;
use servo_url::ServoUrl;
diff --git a/components/script/dom/workernavigator.rs b/components/script/dom/workernavigator.rs
index d4b2eef4b17..6c1f5526a15 100644
--- a/components/script/dom/workernavigator.rs
+++ b/components/script/dom/workernavigator.rs
@@ -2,14 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::WorkerNavigatorBinding;
-use dom::bindings::codegen::Bindings::WorkerNavigatorBinding::WorkerNavigatorMethods;
-use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
-use dom::bindings::root::{DomRoot, MutNullableDom};
-use dom::bindings::str::DOMString;
-use dom::navigatorinfo;
-use dom::permissions::Permissions;
-use dom::workerglobalscope::WorkerGlobalScope;
+use crate::dom::bindings::codegen::Bindings::WorkerNavigatorBinding;
+use crate::dom::bindings::codegen::Bindings::WorkerNavigatorBinding::WorkerNavigatorMethods;
+use crate::dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
+use crate::dom::bindings::root::{DomRoot, MutNullableDom};
+use crate::dom::bindings::str::DOMString;
+use crate::dom::navigatorinfo;
+use crate::dom::permissions::Permissions;
+use crate::dom::workerglobalscope::WorkerGlobalScope;
use dom_struct::dom_struct;
// https://html.spec.whatwg.org/multipage/#workernavigator
diff --git a/components/script/dom/worklet.rs b/components/script/dom/worklet.rs
index 5bcf81956e8..519c0fbe65d 100644
--- a/components/script/dom/worklet.rs
+++ b/components/script/dom/worklet.rs
@@ -10,28 +10,28 @@
//! thread pool implementation, which only performs GC or code loading on
//! a backup thread, not on the primary worklet thread.
-use dom::bindings::codegen::Bindings::RequestBinding::RequestCredentials;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
-use dom::bindings::codegen::Bindings::WorkletBinding::WorkletMethods;
-use dom::bindings::codegen::Bindings::WorkletBinding::WorkletOptions;
-use dom::bindings::codegen::Bindings::WorkletBinding::Wrap;
-use dom::bindings::error::Error;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::TrustedPromise;
-use dom::bindings::reflector::Reflector;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::{Dom, DomRoot, RootCollection, ThreadLocalStackRoots};
-use dom::bindings::str::USVString;
-use dom::bindings::trace::JSTraceable;
-use dom::bindings::trace::RootedTraceableBox;
-use dom::globalscope::GlobalScope;
-use dom::promise::Promise;
-use dom::testworkletglobalscope::TestWorkletTask;
-use dom::window::Window;
-use dom::workletglobalscope::WorkletGlobalScope;
-use dom::workletglobalscope::WorkletGlobalScopeInit;
-use dom::workletglobalscope::WorkletGlobalScopeType;
-use dom::workletglobalscope::WorkletTask;
+use crate::dom::bindings::codegen::Bindings::RequestBinding::RequestCredentials;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods;
+use crate::dom::bindings::codegen::Bindings::WorkletBinding::WorkletMethods;
+use crate::dom::bindings::codegen::Bindings::WorkletBinding::WorkletOptions;
+use crate::dom::bindings::codegen::Bindings::WorkletBinding::Wrap;
+use crate::dom::bindings::error::Error;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::TrustedPromise;
+use crate::dom::bindings::reflector::Reflector;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::{Dom, DomRoot, RootCollection, ThreadLocalStackRoots};
+use crate::dom::bindings::str::USVString;
+use crate::dom::bindings::trace::JSTraceable;
+use crate::dom::bindings::trace::RootedTraceableBox;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::promise::Promise;
+use crate::dom::testworkletglobalscope::TestWorkletTask;
+use crate::dom::window::Window;
+use crate::dom::workletglobalscope::WorkletGlobalScope;
+use crate::dom::workletglobalscope::WorkletGlobalScopeInit;
+use crate::dom::workletglobalscope::WorkletGlobalScopeType;
+use crate::dom::workletglobalscope::WorkletTask;
use dom_struct::dom_struct;
use js::jsapi::JSGCParamKey;
use js::jsapi::JSTracer;
@@ -43,11 +43,11 @@ use net_traits::load_whole_resource;
use net_traits::request::Destination;
use net_traits::request::RequestInit;
use net_traits::request::RequestMode;
-use script_runtime::CommonScriptMsg;
-use script_runtime::Runtime;
-use script_runtime::ScriptThreadEventCategory;
-use script_runtime::new_rt_and_cx;
-use script_thread::{MainThreadScriptMsg, ScriptThread};
+use crate::script_runtime::CommonScriptMsg;
+use crate::script_runtime::Runtime;
+use crate::script_runtime::ScriptThreadEventCategory;
+use crate::script_runtime::new_rt_and_cx;
+use crate::script_thread::{MainThreadScriptMsg, ScriptThread};
use servo_channel::{channel, Sender, Receiver};
use servo_rand;
use servo_url::ImmutableOrigin;
@@ -63,8 +63,8 @@ use std::thread;
use style::thread_state::{self, ThreadState};
use swapper::Swapper;
use swapper::swapper;
-use task::TaskBox;
-use task_source::TaskSourceName;
+use crate::task::TaskBox;
+use crate::task_source::TaskSourceName;
use uuid::Uuid;
// Magic numbers
diff --git a/components/script/dom/workletglobalscope.rs b/components/script/dom/workletglobalscope.rs
index 4a352535893..4cd27de3e87 100644
--- a/components/script/dom/workletglobalscope.rs
+++ b/components/script/dom/workletglobalscope.rs
@@ -3,14 +3,14 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools_traits::ScriptToDevtoolsControlMsg;
-use dom::bindings::inheritance::Castable;
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
-use dom::paintworkletglobalscope::PaintWorkletGlobalScope;
-use dom::paintworkletglobalscope::PaintWorkletTask;
-use dom::testworkletglobalscope::TestWorkletGlobalScope;
-use dom::testworkletglobalscope::TestWorkletTask;
-use dom::worklet::WorkletExecutor;
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::paintworkletglobalscope::PaintWorkletGlobalScope;
+use crate::dom::paintworkletglobalscope::PaintWorkletTask;
+use crate::dom::testworkletglobalscope::TestWorkletGlobalScope;
+use crate::dom::testworkletglobalscope::TestWorkletTask;
+use crate::dom::worklet::WorkletExecutor;
use dom_struct::dom_struct;
use ipc_channel::ipc;
use ipc_channel::ipc::IpcSender;
@@ -22,7 +22,7 @@ use net_traits::ResourceThreads;
use net_traits::image_cache::ImageCache;
use profile_traits::mem;
use profile_traits::time;
-use script_thread::MainThreadScriptMsg;
+use crate::script_thread::MainThreadScriptMsg;
use script_traits::{Painter, ScriptMsg};
use script_traits::{ScriptToConstellationChan, TimerSchedulerMsg};
use servo_atoms::Atom;
diff --git a/components/script/dom/xmldocument.rs b/components/script/dom/xmldocument.rs
index 9854d503ed4..693c08bf572 100644
--- a/components/script/dom/xmldocument.rs
+++ b/components/script/dom/xmldocument.rs
@@ -2,17 +2,17 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use document_loader::DocumentLoader;
-use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
-use dom::bindings::codegen::Bindings::XMLDocumentBinding::{self, XMLDocumentMethods};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::bindings::str::DOMString;
-use dom::document::{Document, DocumentSource, HasBrowsingContext, IsHTMLDocument};
-use dom::location::Location;
-use dom::node::Node;
-use dom::window::Window;
+use crate::document_loader::DocumentLoader;
+use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
+use crate::dom::bindings::codegen::Bindings::XMLDocumentBinding::{self, XMLDocumentMethods};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::bindings::str::DOMString;
+use crate::dom::document::{Document, DocumentSource, HasBrowsingContext, IsHTMLDocument};
+use crate::dom::location::Location;
+use crate::dom::node::Node;
+use crate::dom::window::Window;
use dom_struct::dom_struct;
use js::jsapi::JSContext;
use js::jsapi::JSObject;
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index 6ed6a7ffab4..df9d6374970 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -2,43 +2,43 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use document_loader::DocumentLoader;
-use dom::bindings::cell::DomRefCell;
-use dom::bindings::codegen::Bindings::BlobBinding::BlobBinding::BlobMethods;
-use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
-use dom::bindings::codegen::Bindings::XMLHttpRequestBinding;
-use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::BodyInit;
-use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestMethods;
-use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType;
-use dom::bindings::codegen::UnionTypes::DocumentOrBodyInit;
-use dom::bindings::conversions::ToJSValConvertible;
-use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::inheritance::Castable;
-use dom::bindings::refcounted::Trusted;
-use dom::bindings::reflector::{DomObject, reflect_dom_object};
-use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
-use dom::bindings::str::{ByteString, DOMString, USVString, is_token};
-use dom::blob::{Blob, BlobImpl};
-use dom::document::{Document, HasBrowsingContext, IsHTMLDocument};
-use dom::document::DocumentSource;
-use dom::event::{Event, EventBubbles, EventCancelable};
-use dom::eventtarget::EventTarget;
-use dom::formdata::FormData;
-use dom::globalscope::GlobalScope;
-use dom::headers::is_forbidden_header_name;
-use dom::htmlformelement::{encode_multipart_form_data, generate_boundary};
-use dom::node::Node;
-use dom::progressevent::ProgressEvent;
-use dom::servoparser::ServoParser;
-use dom::urlsearchparams::URLSearchParams;
-use dom::window::Window;
-use dom::workerglobalscope::WorkerGlobalScope;
-use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget;
-use dom::xmlhttprequestupload::XMLHttpRequestUpload;
+use crate::document_loader::DocumentLoader;
+use crate::dom::bindings::cell::DomRefCell;
+use crate::dom::bindings::codegen::Bindings::BlobBinding::BlobBinding::BlobMethods;
+use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
+use crate::dom::bindings::codegen::Bindings::XMLHttpRequestBinding;
+use crate::dom::bindings::codegen::Bindings::XMLHttpRequestBinding::BodyInit;
+use crate::dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestMethods;
+use crate::dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType;
+use crate::dom::bindings::codegen::UnionTypes::DocumentOrBodyInit;
+use crate::dom::bindings::conversions::ToJSValConvertible;
+use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
+use crate::dom::bindings::inheritance::Castable;
+use crate::dom::bindings::refcounted::Trusted;
+use crate::dom::bindings::reflector::{DomObject, reflect_dom_object};
+use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom};
+use crate::dom::bindings::str::{ByteString, DOMString, USVString, is_token};
+use crate::dom::blob::{Blob, BlobImpl};
+use crate::dom::document::{Document, HasBrowsingContext, IsHTMLDocument};
+use crate::dom::document::DocumentSource;
+use crate::dom::event::{Event, EventBubbles, EventCancelable};
+use crate::dom::eventtarget::EventTarget;
+use crate::dom::formdata::FormData;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::headers::is_forbidden_header_name;
+use crate::dom::htmlformelement::{encode_multipart_form_data, generate_boundary};
+use crate::dom::node::Node;
+use crate::dom::progressevent::ProgressEvent;
+use crate::dom::servoparser::ServoParser;
+use crate::dom::urlsearchparams::URLSearchParams;
+use crate::dom::window::Window;
+use crate::dom::workerglobalscope::WorkerGlobalScope;
+use crate::dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget;
+use crate::dom::xmlhttprequestupload::XMLHttpRequestUpload;
use dom_struct::dom_struct;
use encoding_rs::{Encoding, UTF_8};
use euclid::Length;
-use fetch::FetchCanceller;
+use crate::fetch::FetchCanceller;
use headers_core::HeaderMapExt;
use headers_ext::{ContentLength, ContentType};
use html5ever::serialize;
@@ -59,7 +59,7 @@ use net_traits::{FetchResponseListener, NetworkError, ReferrerPolicy};
use net_traits::CoreResourceMsg::Fetch;
use net_traits::request::{CredentialsMode, Destination, RequestInit, RequestMode};
use net_traits::trim_http_whitespace;
-use network_listener::{NetworkListener, PreInvoke};
+use crate::network_listener::{NetworkListener, PreInvoke};
use script_traits::DocumentActivity;
use servo_atoms::Atom;
use servo_url::ServoUrl;
@@ -71,10 +71,10 @@ use std::ptr::NonNull;
use std::slice;
use std::str::{self, FromStr};
use std::sync::{Arc, Mutex};
-use task_source::TaskSourceName;
-use task_source::networking::NetworkingTaskSource;
+use crate::task_source::TaskSourceName;
+use crate::task_source::networking::NetworkingTaskSource;
use time;
-use timers::{OneshotTimerCallback, OneshotTimerHandle};
+use crate::timers::{OneshotTimerCallback, OneshotTimerHandle};
use url::Position;
#[derive(Clone, Copy, Debug, JSTraceable, MallocSizeOf, PartialEq)]
@@ -319,7 +319,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
&self,
method: ByteString,
url: USVString,
- async: bool,
+ r#async: bool,
username: Option<USVString>,
password: Option<USVString>,
) -> ErrorResult {
@@ -375,7 +375,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
}
// Step 10
- if !async {
+ if !r#async {
// FIXME: This should only happen if the global environment is a document environment
if self.timeout.get() != 0 ||
self.response_type.get() != XMLHttpRequestResponseType::_empty
@@ -395,7 +395,7 @@ impl XMLHttpRequestMethods for XMLHttpRequest {
// Step 12
*self.request_method.borrow_mut() = parsed_method;
*self.request_url.borrow_mut() = Some(parsed_url);
- self.sync.set(!async);
+ self.sync.set(!r#async);
*self.request_headers.borrow_mut() = HeaderMap::new();
self.send_flag.set(false);
*self.status_text.borrow_mut() = ByteString::new(vec![]);
diff --git a/components/script/dom/xmlhttprequesteventtarget.rs b/components/script/dom/xmlhttprequesteventtarget.rs
index 2779b62bc09..39b610762b1 100644
--- a/components/script/dom/xmlhttprequesteventtarget.rs
+++ b/components/script/dom/xmlhttprequesteventtarget.rs
@@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::XMLHttpRequestEventTargetBinding::XMLHttpRequestEventTargetMethods;
-use dom::eventtarget::EventTarget;
+use crate::dom::bindings::codegen::Bindings::XMLHttpRequestEventTargetBinding::XMLHttpRequestEventTargetMethods;
+use crate::dom::eventtarget::EventTarget;
use dom_struct::dom_struct;
#[dom_struct]
diff --git a/components/script/dom/xmlhttprequestupload.rs b/components/script/dom/xmlhttprequestupload.rs
index af377aa7eee..53ef853a2cf 100644
--- a/components/script/dom/xmlhttprequestupload.rs
+++ b/components/script/dom/xmlhttprequestupload.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use dom::bindings::codegen::Bindings::XMLHttpRequestUploadBinding;
-use dom::bindings::reflector::reflect_dom_object;
-use dom::bindings::root::DomRoot;
-use dom::globalscope::GlobalScope;
-use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget;
+use crate::dom::bindings::codegen::Bindings::XMLHttpRequestUploadBinding;
+use crate::dom::bindings::reflector::reflect_dom_object;
+use crate::dom::bindings::root::DomRoot;
+use crate::dom::globalscope::GlobalScope;
+use crate::dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget;
use dom_struct::dom_struct;
#[dom_struct]