aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/console.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>
* script: Add custom logging representation for DOM interfaces. (#35416)Josh Matthews2025-02-181-14/+73
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Feature-gate all crown support. (#35055)Josh Matthews2025-01-181-1/+1
| | | | | | | | | | | | | * script: Feature-gate all crown support. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Use cfg(crown) instead of a cargo feature. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* Support future uses of traits with associated types in rooting analysis (#34359)Josh Matthews2025-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * crown: Support Rc<T::Promise> and callback objects parameterized over a trait.. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * crown: Verify that attributes match between trait associated types and impls. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * crown: Check type aliases as part of associated type checks. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * crown: Add periods to all diagnostic messages. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Tidy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix compile-fail test expectations. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Support syntax highlighting of arguments in the devtools console (#34810)Simon Wülker2025-01-021-52/+115
| | | | | | | | | | | | | | | | | | | | | | | | | * Implement Builder struct for console messages Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Support integer arguments for console methods Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Support floating point arguments to console methods in devtools Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix warnings Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Tidy Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* Implement `console.trace` (#34629)Simon Wülker2024-12-181-14/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Include unimplemented console methods in idl file Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Fix console.assert signature The condition is optional and there can be multiple messages. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Implement console.trace Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * ./mach fmt Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Log stack trace when calling console.trace Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update wpt expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Include line/column info in console.trace logs Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Move option out of constant Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Update mozjs Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* 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-21/+22
| | | | | | | | | | | | | | | | | * 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>
* implement `console.timeLog` (#33377)Simon Wülker2024-09-091-4/+15
| | | | | | | | | | | | | * Implement console.timeLog Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Adjust WPT expectations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* jsstring_to_str should accept a NonNull argument for the JS string (#33306)Andriy Sultanov2024-09-051-5/+7
| | | | | | Instead of asserting the raw pointer is not null, force callers to produce a NonNull pointer. Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
* Handle failed string conversions in console.log. (#33085)Josh Matthews2024-08-161-0/+3
| | | Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* DevTools: Replace camel case variable names (#32726)eri2024-07-081-3/+3
| | | | | | | | | * refactor: rename to snake case * refactor: more renaming * chore: format * chore: clean
* fix redundant closures in component/script/dom (#31917)Ekta Siwach2024-03-281-1/+1
| | | | | | | | | | | | | * fixed unnecessary conversions * resolved conflicts * resolved conflicts * fix redundant closures in component/script/dom * resolved conflicts * fixed formatting
* clippy:fix various clippy problems in components/scripts (#31907)Rosemary Ajayi2024-03-271-5/+5
| | | | | | | | | * manual implementation of an assign operation * manual implementation of an assign operation * single-character string * manual cjheck for common ascii range
* fixed the `unneeded return` statement warnings. (#31863)Aarya Khandelwal2024-03-261-1/+1
|
* Implement console.count/countReset (#31635)Smitty2024-03-171-0/+17
| | | | | | | | | | | * Implement console.count/countReset * Address review comment Signed-off-by: syvb <me@iter.ca> --------- Signed-off-by: syvb <me@iter.ca>
* Fix crash on large console log (#31267)Smitty2024-02-061-5/+15
|
* Make console methods take `any` instead of `string` (#31241)Smitty2024-02-051-24/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Make console methods use `any` for the message Match the Console spec by allowing any value to be passed to console methods, instead of just values that can be converted to a string. Signed-off-by: syvb <me@iter.ca> * Add test for console logging a Symbol Signed-off-by: syvb <me@iter.ca> * Implement object stringification for logs Signed-off-by: syvb <me@iter.ca> * Address review comments Signed-off-by: syvb <me@iter.ca> * Make time/timeEnd accept DOMString to match spec * Update WPT results for layout 2013 --------- Signed-off-by: syvb <me@iter.ca>
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-3/+5
| | | | | * strict imports formatting * Reformat all imports
* Fix formatting.Josh Matthews2023-05-201-1/+2
|
* Make GlobalScope.get_cx a static method.Josh Matthews2023-05-201-1/+1
|
* Console.Clear implementedmustafapc192020-07-291-0/+6
|
* Implement Console grouping APIs.Josh Matthews2020-07-061-51/+46
|
* Report real caller information for console APIs to devtools.Josh Matthews2020-04-281-12/+10
|
* Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-0/+1
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Sort `use` statementsSimon Sapin2018-11-061-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-4/+4
|
* Format script componentchansuke2018-09-191-8/+10
|
* Hold stderr lock when using stdout through Console APIs.Josh Matthews2017-06-161-37/+65
|
* Pass a &GlobalScope to WebIDL static methods and constructorsAnthony Ramine2016-10-061-19/+18
|
* Make Console::send_to_devtools take a &GlobalScopeAnthony Ramine2016-10-061-17/+17
|
* Introduce GlobalScope::pipeline_idAnthony Ramine2016-10-061-2/+3
|
* Introduce GlobalScope::devtools_chanAnthony Ramine2016-10-061-1/+1
|
* Move console timers to GlobalScopeAnthony Ramine2016-10-061-39/+2
|
* Remove GlobalRef::get_worker_idAnthony Ramine2016-10-041-1/+6
|
* More code refactoring (exampleVar to example_var)Arthur Marble2016-09-181-2/+2
|
* Use fn pipeline_id consistently, not fn pipelineAneesh Agrawal2016-09-131-1/+1
| | | | | | | | | | | | Consistently use the name 'pipeline_id' to refer to a function that returns an (optional) PipelineId. This was prompted by discovering both fn pipeline and fn pipeline_id doing the same job in htmliframeelement.rs. Note that there is fn pipeline in components/compositing/compositor.rs, but that actually returns an Option<&CompositionPipeline>, not any kind of PipelineId.
* Make console a namespace (fixes #13010)Anthony Ramine2016-09-101-44/+21
|
* Store Console timers in globalsAnthony Ramine2016-09-071-18/+38
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Implement console#time and console#timeEnd methodsJoshua Holmer2016-01-251-0/+39
| | | | Fixes #9325
* Add global default method for Reflectable traitChad Kimes2016-01-111-3/+3
|
* Introduce Console::send_to_devtoolsAnthony Ramine2016-01-091-17/+19
| | | | This replaces propagate_console_msg and wraps prepare_message.
* Remove the global field from ConsoleAnthony Ramine2016-01-091-6/+4
| | | | We can just go through the reflector.
* Rustfmt some of script.Ms2ger2015-11-181-5/+9
|
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-2/+2
| | | | | | 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-7/+4
| | | | | | | | | | 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.
* more refactoringrohan.prinja2015-10-301-1/+1
|