aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/textencoder.rs
Commit message (Collapse)AuthorAgeFilesLines
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-1/+1
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* refactor: add CanGc as argument to create_buffer_source (#35597)Yerkebulan Tulibergenov2025-02-221-2/+2
| | | Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Restrict reexport visibility of DOM types. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Mass pub->pub(crate) conversion. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Hide existing dead code warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy warnings. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix unit tests. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * More formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Generate a trait abstracting over all known DOM interfaces (#34357)Josh Matthews2024-11-241-1/+1
| | | | | | | | | | | | | | | | | * script: Generate trait for all DOM interfaces and parameterize generated Methods traits over it. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Update trait implementations with new generic type. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Formatting. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Include constructors and static methods in generated DOM traits (#33665)Josh Matthews2024-10-081-4/+3
| | | | | | | | | | | | | | | | | * Add all constructors, special operations, and static methods to generated DOM interface traits. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Move all constructors and static methods defined in bare impl blocks inside FooMethods trait impls. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Add missing doc links. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Implement `TextEncoder::encodeInto()` (#33360)webbeef2024-09-091-4/+59
| | | | | | | | | | | | | | | | | | | * Implement TextEncoder::encodeInto() Signed-off-by: webbeef <me@webbeef.org> * Update components/script/dom/textencoder.rs Signed-off-by: Martin Robinson <mrobinson@igalia.com> * Update components/script/dom/textencoder.rs Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: webbeef <me@webbeef.org> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Start marking functions that can transitively trigger a GC (#33144)Josh Matthews2024-08-221-4/+14
| | | | | | | | | | | | | | | | | * Mark JS reflector wrappers as CanGc. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Propagate CanGc from reflect_dom_object_with_proto. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Mark DOM constructors as GC operations. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* clippy: Fix many warnings in `components/script` (#31717)Richard Dushime2024-03-191-1/+1
| | | | | | | | | | | | | | | | | * Fix Several clippy warnings * Fix Build errors * Fix Unused import * Fix requested changes * Fix rustfmt * Minor fixes --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Rename buffer_source_type to buffer_source (#31426)Taym Haddadi2024-02-261-2/+2
| | | | | | | | | | | | | * Rename buffer_source_type to buffer_source Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Code format Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* WedIDL: bring dom/bindings/typedarray further in line with spec (#31375)Taym Haddadi2024-02-251-2/+2
| | | | | | | | | | | | | | | | | * WedIDL: bring dom/bindings/typedarray further in line with spec Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Rename HeapBufferSourceTypes to HeapBufferSource Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * fmt code Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Use Uint8Array for TextEncoder (#31145)Taym Haddadi2024-01-231-13/+6
| | | Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-6/+8
| | | | | * strict imports formatting * Reformat all imports
* Rename reflect_dom_object2.Josh Matthews2023-05-311-2/+2
|
* Formatting.Josh Matthews2023-05-281-1/+4
|
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-5/+6
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-6/+1
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+1
|
* Convert CGTraitInterface to use safe JSContext instead of raw JSContextmarmeladema2019-07-241-7/+11
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-7/+7
|
* Format script componentchansuke2018-09-191-4/+8
|
* Replace NonNullJSObjectPtr with std::ptr::NonNull<JSObject>Simon Sapin2018-01-221-3/+3
|
* Fix tyvar_behind_raw_pointer warningsSimon Sapin2018-01-101-2/+2
| | | | https://github.com/rust-lang/rust/issues/46906
* Replace NonZero<*mut JSObject> with a wrapper to enable local trait impls.Simon Sapin2017-10-161-4/+4
|
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | 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.
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26)Simon Sapin2017-07-271-1/+1
|
* Remove some usage of rust-encodingSimon Sapin2017-05-271-5/+2
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Update js.Ms2ger2017-02-151-2/+2
| | | | Fixes #15553.
* Rewrite TextEncoder::Encode to use typed array API. Fixes #15504Michael Nelson2017-02-131-9/+5
|
* script creates methods taking '*mut JSContext' unsafeAbelardo E. Mendoza2016-11-141-12/+10
| | | | rebase + marked the necessary new code as unsafe
* Pass a &GlobalScope to WebIDL static methods and constructorsAnthony Ramine2016-10-061-3/+2
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-2/+3
|
* removed support for UTF-16 in TextEncoderAshwin R2016-09-271-31/+10
|
* Compile WebIDL return type "object" to NonZero<*mut JSObject>Anthony Ramine2016-08-301-2/+3
|
* Root js_object in TextEncoder::EncodeAnthony Ramine2016-08-301-3/+4
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-2/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Removed unused importsPer Lundberg2016-05-151-1/+1
| | | | This fixes #11185.
* Update SpiderMonkeyAnthony Ramine2016-05-031-2/+3
|
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-1/+1
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-1/+1
| | | | | | | | | | 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.
* merge from masterrohan.prinja2015-11-031-7/+5
|\
| * Remove the pointless TextEncoder::encoding field.Ms2ger2015-10-301-7/+5
| |
* | rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-1/+1
| |
* | more refactoringrohan.prinja2015-10-301-1/+1
|/
* Refactor Error enum usage to consistently be qualifiedAnthony Urena2015-10-061-4/+3
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-2/+2
|