Commit graph

70 commits

Author SHA1 Message Date
Samson
711dbbd4af
remove extern crate (#30311)
* remove extern crate

* Update components/script_plugins/lib.rs

Co-authored-by: Martin Robinson <mrobinson@igalia.com>

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2023-09-08 12:11:31 +00:00
Josh Matthews
dbff26bce0 Support arbitrary protos when wrapping DOM objects with constructors. 2023-05-28 23:23:12 -04:00
Josh Matthews
f79e1e327d Make GlobalScope.get_cx a static method. 2023-05-20 11:05:09 -04:00
CYBAI
c561a3eb0e Introduce ElementCSSInlineStyle for SVGElement 2020-06-05 00:10:19 +09:00
CYBAI
403ffcf1eb Always pass InRealm to GlobalScope::from_context to avoid getting null global 2020-02-16 09:55:10 +09:00
Patrick Shaughnessy
8ca4db2cd6 :defined works 2020-01-30 10:09:51 -05:00
Patrick Shaughnessy
c1a23a85b2 Implement HTMLMenuElement 2020-01-23 18:04:48 -05:00
Patrick Shaughnessy
14d278ff1c apply is: to Document.createElement even when name isn't registered yet 2019-12-22 20:46:31 -05:00
marmeladema
0703a1ad6d Use safe JSContext as first argument for throw_dom_exception 2019-08-09 00:43:28 +01:00
marmeladema
88cacfb009 Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
Josh Matthews
4328713f71 Update to SpiderMonkey 66. 2019-05-10 22:43:43 -04:00
Fernando Jiménez Moreno
c75da615bd Add custom elements related stuff into ElementRareData 2019-04-26 11:31:19 +02:00
Peter Hall
8bfd4dc1e2 #8539 Config preferences backend restructure 2019-03-20 15:01:26 +00:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Simon Pieters
9b74f0af24 Remove the HTMLTable{Header,Data}CellElement interfaces
Fixes #17222.
2018-10-02 19:23:02 +02:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
Rakhi Sharma
d47ce855ce Implement HTMLPictureElement interface. 2018-01-29 20:27:54 -05:00
CYBAI
5486335708 Use specific assertion for DOM create 2018-01-26 01:18:56 +08:00
Emilio Cobos Álvarez
8b0f58c8af
script: Remove HTMLAppletElement.
It was removed from the spec, there's no reason to keep it in tree.
2017-11-06 17:08:14 +01:00
Anthony Ramine
f87c2a8d76 Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> will be able to handle all the things that need to be
rooted that have a stable traceable address that doesn't move for the
whole lifetime of the root. Stay tuned.
2017-09-26 09:49:10 +02:00
Anthony Ramine
0e3c54c191 Rename dom::bindings::js to dom::bindings::root 2017-09-26 02:19:05 +02:00
Connor Brewster
9f51c7df21 Track custom element state 2017-08-09 14:36:22 -06:00
Connor Brewster
6d9d4add61 Enqueue upgrades 2017-08-09 14:36:18 -06:00
Connor Brewster
41371208a5 Check namespace during ce def lookup 2017-08-09 14:36:16 -06:00
Connor Brewster
37cbc85727 Use HTMLElement interface for possible CEs 2017-08-09 14:36:13 -06:00
Connor Brewster
4665991503 Support custom element callback reactions 2017-07-17 22:23:45 -06:00
Connor Brewster
37e8b89377 Allow element prefix to be set
Implements step 6.1.10 of
https://dom.spec.whatwg.org/#concept-create-element
2017-06-23 21:10:01 -06:00
Connor Brewster
062b128688 Add flag for sync/async CE creation 2017-06-23 21:09:57 -06:00
Connor Brewster
2f36d3544f Support is option when creating elements 2017-06-23 21:09:55 -06:00
Connor Brewster
6697f5469d Hook CE registry into element creation 2017-06-23 21:09:53 -06:00
Connor Brewster
2333b39569 Implement HTMLConstructor 2017-06-15 21:32:22 -06:00
Christian Poveda
62821a6915 Solving merge conficts related to the html5ever_atoms -> html5ever change 2017-05-03 12:57:49 -05:00
Christian Poveda
875e422fe6 Changed all prefixes from DOMString to the atomic Prefix from html5ever 2017-05-03 10:17:42 -05:00
Simon Sapin
6c518c89b9 Upgrade to html5ever 0.16 2017-05-02 19:24:28 +02:00
Emilio Cobos Álvarez
21bf91c386
script: Add infrastructure to track subresource loads in <link> and <style> elements. 2016-12-16 16:57:20 +01:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Alexandrov Sergey
9876020c22 add SVGElement, SVGGraphicsElement interfaces and SVGSVGElement element 2016-10-06 18:22:53 +03:00
Anthony Ramine
cdc7bca944 Move DOMString back to script
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Lanza
cfc3500dbf Implement HTMLDetailsElement. Fixes #9216 2016-01-20 16:15:37 +01:00
Eli Friedman
e42dcb3712 Remove unnecessary conversion to/from DOMString for localName. 2015-12-02 13:42:45 -08:00
Alan Jeffrey
3dec6edd10 Update string_cache to 0.2.
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
Ms2ger
0c61be7a57 Rustfmt some of script. 2015-11-18 11:14:05 +01:00
Alan Jeffrey
84bde75b42 Replaced DOMString constructor by conversion functions.
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
2015-11-12 17:52:59 -06:00
Till Schneidereit
543703e3d8 Move Stylesheet loading and ownership from the layout task into HTML elements
Stylesheets for `HTMLLinkElement`s are now loaded by the resource task, triggered by the element in question. Stylesheets are owned by the elements they're associated with, which can be `HTMLStyleElement`, `HTMLLinkElement`, and `HTMLMetaElement` (for `<meta name="viewport">).

Additionally, the quirks mode stylesheet (just as the user and user agent stylesheets a couple of commits ago), is implemented as a lazy static, loaded once per process and shared between all documents.

This all has various nice consequences:
 - Stylesheet loading becomes a non-blocking operation.
 - Stylesheets are removed when the element they're associated with is removed from the document.
 - It'll be possible to implement the CSSOM APIs that require direct access to the stylesheets (i.e., ~ all of them).
 - Various subtle correctness issues are fixed.

One piece of interesting follow-up work would be to move parsing of external stylesheets to the resource task, too. Right now, it happens in the link element once loading is complete, so blocks the script task. Moving it to the resource task would probably be fairly straight-forward as it doesn't require access to any external state.
2015-11-07 18:11:29 +01:00
Ms2ger
6b75078503 Make DOMString a newtype around String, rather than a typedef.
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.

Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
2015-11-04 12:09:11 +01:00
Keith Yeung
1fc50af8d3 Add HTMLPreElement type to xml and plaintext DOM nodes 2015-10-26 10:22:04 -07:00
Anthony Ramine
68014af78e Clean up the cast calls 2015-10-21 11:40:34 +02:00