aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/devtools.rs
Commit message (Collapse)AuthorAgeFilesLines
* script: Update the rendering when receiving IPC messages instead of just ↵Martin Robinson2024-12-091-16/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | reflowing (#34486) This changes fixes two issues: 1. A reflow of all `Document`s currently done unconditionally after receving IPC messages in the `ScriptThread`. Reflowing without first updating the animation timeline can lead to transitions finshing as soon as they start (because it looks like time advancement is measaured between calls to `update-the-rendering`). 2. Fix an issue where not all `Pipeline`s were updated during *update the rendering*. The previous code only took into account top level frames and their children. It's not guaranteed that a particular `ScriptThread` is managing any top level frames, depending on the origens of those frames. We should update the rendering of those non-top-level iframes regardless. The new code attempts to order the frames according to the specification as much as possible without knowing the entire frame tree, without skipping any documents managed by the `ScriptThread` in question. In addition, `Documents` is pulled out the `script_thread.rs` and renamed to `DocumentCollection`. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* cangc fixes in several files + event.rs + rtcpeerconnection.rs (#34002)chickenleaf2024-10-251-3/+10
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* cangc fixes in node.rs (#33984)chickenleaf2024-10-231-0/+2
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* CanGc fixes in `errorevent.rs` (#33960)tanishka2024-10-221-1/+7
| | | | | | | | | | | | | * CanGc fixes in errorevent.rs Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Allow too_many_arguments to avoid lint error Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* CanGc changes from fontfaceset.rs (#33920)chickenleaf2024-10-211-3/+3
| | | | | | | | | | | | | | | | * CanGc changes from fontfaceset.rs Signed-off-by: L Ashwin B <lashwinib@gmail.com> * Update components/script/dom/bindings/codegen/Bindings.conf Co-authored-by: Josh Matthews <josh@joshmatthews.net> Signed-off-by: chickenleaf <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com> Signed-off-by: chickenleaf <lashwinib@gmail.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* CanGc fixes from constantsourcenode.rs & window.rs (#33931)tanishka2024-10-201-2/+2
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Various CanGc fixes in 8 files (#33893)chickenleaf2024-10-181-1/+2
| | | | | | | | | | | | | * Various CanGc fixes in 8 files Signed-off-by: L Ashwin B <lashwinib@gmail.com> * fixed merge conflicts and formatting Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Replace CanGc::note() calls with arguments in `components/script/dom` (#33692)tanishka2024-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | | * Replace CanGc::note() calls with arguments in components/script/dom Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Add methods to Bindings.conf Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Modify existing interface sections Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Resolve conflicts Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* clippy: Fix suggestions in `script`, `libservo`, and `servoshell` (#33453)Ali2024-09-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * fix clone on copy warning in servoshell Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Remove unecessary borrow in libservo Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Ignore too many arguments warning on create_constellation() Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * fix explicit auto-deref warning Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> * Autofix multiple clippy warnings in components/script Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com> --------- Signed-off-by: Ali Zein Yousuf <azy5030@gmail.com>
* jsstring_to_str should accept a NonNull argument for the JS string (#33306)Andriy Sultanov2024-09-051-2/+3
| | | | | | Instead of asserting the raw pointer is not null, force callers to produce a NonNull pointer. Signed-off-by: Andriy Sultanov <sultanovandriy@gmail.com>
* DevTools: Inspect node styles (#33025)eri2024-08-251-4/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: retrieve applied styles Signed-off-by: eri <eri@inventati.org> * feat: preliminary style showing Signed-off-by: eri <eri@inventati.org> * chore: some style tests Signed-off-by: eri <eri@inventati.org> * feat: edit style rules Signed-off-by: eri <eri@inventati.org> * feat: css database Signed-off-by: eri <eri@inventati.org> * feat: computed styles Signed-off-by: eri <eri@inventati.org> * feat: inherited styles Signed-off-by: eri <eri@inventati.org> * feat: get stylesheet styles Signed-off-by: eri <eri@inventati.org> * feat: all styles in inspector Signed-off-by: eri <eri@inventati.org> * feat: multiple stylesheets Signed-off-by: eri <eri@inventati.org> * refactor: clean up Signed-off-by: eri <eri@inventati.org> * Some minor cleanup Signed-off-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: eri <eri@inventati.org> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* DevTools: Allow modification of attributes (#32888)eri2024-08-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | * feat: allow modification of attributes Signed-off-by: eri <eri@inventati.org> * fix: tidiness Signed-off-by: eri <eri@inventati.org> * feat: clean walker name generation Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: eri <eri@inventati.org> * fix: missed out parameter Signed-off-by: eri <eri@inventati.org> --------- Signed-off-by: eri <eri@inventati.org> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* DevTools: Inline text and clean whitespace (#32884)eri2024-07-301-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: inline text contents Signed-off-by: eri <eri@inventati.org> * feat: filter whitespace only nodes Signed-off-by: eri <eri@inventati.org> * chore: cleanup Signed-off-by: eri <eri@inventati.org> * fix: url fix Signed-off-by: eri <eri@inventati.org> * fix: review fixes Signed-off-by: eri <eri@inventati.org> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Signed-off-by: eri <eri@inventati.org> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* DevTools: Replace camel case variable names (#32726)eri2024-07-081-18/+18
| | | | | | | | | * refactor: rename to snake case * refactor: more renaming * chore: format * chore: clean
* Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)Martin Robinson2024-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | For a long time, `gfx_traits` has held a lot of things unrelated to graphics and also unrelated to the `gfx` crate (which is mostly about fonts). This is a cleanup which does a few things: 1. Move non `gfx` crate things out of `gfx_traits`. This is important in order to prevent dependency cycles with a different integration between layout, script, and fonts. 2. Rename the `msg` crate to `base`. It didn't really contain anything to do with messages and instead mostly holds ids, which are used across many different crates in Servo. This new crate will hold the *rare* data types that are widely used. Details: - All BackgroundHangMonitor-related things from base to a new `background_hang_monitor_api` crate. - Moved `TraversalDirection` to `script_traits` - Moved `Epoch`-related things from `gfx_traits` to `base`. - Moved `PrintTree` to base. This should be widely useful in Servo. - Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it to `WebRenderFontApi`.
* clippy: fixed some warnings in components/script (#31888)Ekta Siwach2024-03-261-1/+1
|
* clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)Oluwatobi Sofela2024-03-231-3/+3
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* clippy: Fix needless borrow warnings (#31813)Oluwatobi Sofela2024-03-211-1/+1
|
* clippy: Fix several warnings (#31710)RustAndMetal2024-03-181-2/+2
| | | Signed-off-by: RustAndMetal <111676747+RustAndMetal@users.noreply.github.com>
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-9/+13
| | | | | * strict imports formatting * Reformat all imports
* Make GlobalScope.get_cx a static method.Josh Matthews2023-05-201-1/+1
|
* Update mozjs.Josh Matthews2021-02-181-6/+4
|
* Added off thread compilationAbhishekSharma1022020-07-211-1/+4
| | | | | Co-authored-by: Gregory Terzian <2792687+gterzian@users.noreply.github.com> Co-authored-by: Abhishek Sharma <20724848+AbhishekSharma102@users.noreply.github.com>
* Set private reference for classic scriptCYBAI2020-07-181-1/+9
| | | | | | | | | | | | Web developers can use `Dynamic Import` in a classic script; thus, we need to save the script's private reference so that we can reuse it when we're going to fetch a dynamic import module for a classic script. Besides, because it's possible to use different executing context for a dynamic import module (like `dynamic-import/string-compilation-other-document.html` WPT test), we can't initialize a module owner at the timing of `SetScriptPrivate`; thus, if the private module script doesn't hold an owner, we'll use a DynamicImport owner for it.
* Report real caller information for console APIs to devtools.Josh Matthews2020-04-281-1/+1
|
* Don't go through the layout thread to retrieve a node's primary styleAnthony Ramine2020-04-071-4/+3
|
* rename compartment to realmKunal Mohan2020-01-241-1/+1
|
* devtools: save and send cached messagesPaul Rouget2019-12-061-47/+1
|
* Modify *::get_cx methods to return a safe JSContext instead of a raw onemarmeladema2019-07-241-5/+5
|
* Create a helper API for entering a DOM object's compartmentKamil Niski2019-06-291-4/+2
| | | | | | Revert some unnecessary changes Fix fmt errors
* Update to SpiderMonkey 66.Josh Matthews2019-05-101-2/+2
|
* Make devtools find node by unique id function include shadow treesFernando Jiménez Moreno2019-04-261-1/+1
|
* Introduce ShadowIncluding enum for tree traversalsFernando Jiménez Moreno2019-04-261-2/+2
|
* Implement concept of shadow including tree orderFernando Jiménez Moreno2019-04-261-1/+1
|
* Fix servo build.Emilio Cobos Álvarez2019-02-101-5/+4
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-9/+7
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-3/+3
|
* Format remaining filesPyfisch2018-11-061-1/+2
|
* Sort `use` statementsSimon Sapin2018-11-061-5/+5
|
* `cargo fix --edition`Simon Sapin2018-11-061-16/+16
|
* Format script componentchansuke2018-09-191-79/+114
|
* Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393Marcin Mielniczuk2018-03-281-1/+2
|
* Add layout RPC query for getting an element's styleJon Leighton2018-01-281-5/+6
| | | | | | | | This enables us to implement Element::has_css_layout_box() in a more direct way, and also enables us to remove some of the existing more specific queries. Fixes #19811.
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-4/+4
|
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-4/+4
| | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-4/+4
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-2/+2
| | | | | | | 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
|
* Added some same-origin-domain checks.Alan Jeffrey2017-03-141-2/+1
|