aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
Commit message (Collapse)AuthorAgeFilesLines
* fonts: Add support for WOFF2 and properly load web fonts from @imports (#31879)Martin Robinson2024-03-261-3/+10
| | | | | | | | | | | | This change also makes two fixes that are necessary to get WOFF2 fonts working: 1. It adds support for loading web fonts from stylesheets included via @import rules. 2. It ensure that when web fonts are loaded synchronusly they invalidate the font cache. This led to incorrect font rendering when running tests before. Fixes #31598.
* fixed the `unneeded return` statement warnings. (#31863)Aarya Khandelwal2024-03-261-1/+1
|
* fixes dereferencing on an immutable reference (#31864)Aarya Khandelwal2024-03-261-3/+3
|
* clippy: Fix collapsible_if warnings (#31852)Oluwatobi Sofela2024-03-251-4/+2
|
* changed `match` to 'matches!' (#31850)Aarya Khandelwal2024-03-251-27/+19
|
* WebIDL: Remove `JSObject` from `Document::NamedGetter` (#31841)eri2024-03-241-21/+7
| | | | | * WebIDL: Remove `JSObject` from `Document::NamedGetter` * fix: update rustdoc comment
* clippy: Fix `explicit_auto_deref` warnings in `components/script` (#31837)Oluwatobi Sofela2024-03-231-8/+7
| | | | | | | | | * clippy: Fix explicit auto-deref warnings * clippy: Fix explicit auto-deref warnings * refactor: Tidy up code * refactor: Fix method not found errors
* Rework “visible” to “throttled” in constellation + script + ↵Delan Azabani2024-03-221-1/+1
| | | | compositor (#31816)
* clippy: Fix needless borrow warnings (#31813)Oluwatobi Sofela2024-03-211-13/+13
|
* clippy: Fix dereferencing a tuple pattern warnings (#31811)Oluwatobi Sofela2024-03-211-3/+3
|
* clippy: Fix redundant field names warnings (#31793)Oluwatobi Sofela2024-03-201-4/+4
|
* dependencies: Upgrade to WebRender 0.64 (#31486)Martin Robinson2024-03-141-1/+1
| | | | | | | | | This brings the version of WebRender used in Servo up-to-date with Gecko upstream. The big change here is that HiDPI is no longer handled via WebRender. Instead this happens via a scale applied to the root layer in the compositor. In addition to this change, various changes are made to Servo to adapt to the new WebRender API. Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* clippy: Fix assorted warnings in `components/` (#31628)eri2024-03-131-1/+1
| | | | | | | * clippy: fix assorted warnings in `components/` * fix: new and default * fix: review comments
* clippy: Fix warnings in `components/shared` (#31627)eri2024-03-121-1/+1
| | | | | | | * clippy: fix warnings in `components/shared` * fix: formatting derive * fix: rename new to default
* script: Implement `<meta http-equiv="refresh">` (#31468)Smitty2024-03-011-0/+39
| | | | | * script: Implement <meta http-equiv="refresh"> * Address review comments
* script: Do not run layout in a thread (#31346)Martin Robinson2024-02-231-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Do not run layout in a thread Instead of spawning a thread for layout that almost always runs synchronously with script, simply run layout in the script thread. This is a resurrection of #28708, taking just the bits that remove the layout thread. It's a complex change and thus is just a first step toward cleaning up the interface between script and layout. Messages are still passed from script to layout via a `process()` method and script proxies some messages to layout from other threads as well. Big changes: 1. Layout is created in the script thread on Document load, thus every live document is guaranteed to have a layout. This isn't completely hidden in the interface, but we can safely `unwrap()` on a Document's layout. 2. Layout configuration is abstracted away into a LayoutConfig struct and the LayoutFactory is a struct passed around by the Constellation. This is to avoid having to monomorphize the entire script thread for each layout. 3. Instead of having the Constellation block on the layout thread to figure out the current epoch and whether there are pending web fonts loading, updates are sent synchronously to the Constellation when rendering to a screenshot. This practically only used by the WPT. A couple tests start to fail, which is probably inevitable since removing the layout thread has introduced timing changes in "exit after load" and screenshot behavior. Co-authored-by: Josh Matthews <josh@joshmatthews.net> * Update test expectations * Fix some issues found during review * Clarify some comments * Address review comments --------- Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-19/+19
| | | | This fixes many rustdoc errors that occur due to raw URLs in rustdoc comments as well as unescaped Rust code that should be in backticks.
* script: Allow moving back to non-quirks mode (#30898)Martin Robinson2023-12-211-4/+4
| | | | | | | The code in script is written so that the document itself can move from quirks to non-quirks mode, but this is never communicated to layout -- meaning quirky layout keeps happening. This is an issue when rewriting the entire document with `document.write()` which is what some WPT tests do to test quirks mode behavior.
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove script_plugins * Use crown instead of script_plugins * crown_is_not_used * Use crown in command base * bootstrap crown * tidy happy * disable sccache * Bring crown in tree * Install crown from tree * fix windows ci * fix warning * fix mac libscript_plugins.dylib is not available anymore * Update components/script/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> * Update for nightly-2023-03-18 Mostly just based off https://github.com/servo/servo/pull/30630 * Always install crown it's slow only when there is new version * Run crown test with `mach test-unit` * Small fixups; better trace_in_no_trace tests * Better doc * crown in config.toml * Fix tidy for real * no sccache on rustc_wrapper * document rustc overrides * fixup of compiletest * Make a few minor comment adjustments * Fix a typo in python/servo/platform/base.py Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> * Proper test types * Ignore tidy on crown/tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Further changes required by ServoOriol Brufau2023-11-211-1/+1
|
* Use Foo_Binding instead of FooBinding for namespace modules (#30447)Samson2023-09-301-4/+4
| | | | | * Update Codegen.py to emit Foo_Binding instead of FooBinding * s/FooBinding/Foo_Binding/g
* Treat the `keygen` element as obsolete (#30429)Ennui Langeweile2023-09-261-7/+15
| | | | | | | | | * Eradicate the `keygen` element * Run `./mach fmt` * Fix relevant Servo test * Fix outdated manifest
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-74/+76
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-1/+3
| | | | | | | | | | | * 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>
* Use mozjs tracing infrastructure (#29918)Samson2023-08-101-0/+1
| | | | | | | * Update mozjs https://github.com/servo/mozjs/commit/64711ec2e6dc4595df691bffc7f1e5052ab86c8d also fixes https://github.com/servo/servo/issues/30043 * Move to mozjs Traceable and introduce CustomTraceable
* No tracing of nop traceable fields (#29926)Samson2023-08-041-21/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add `no_trace` option to JSTraceable derive * NoTrace wrapper * Port some types to no_trace schematics * Fixing my unsafe mistakes (not tracing traceables) * Add docs & safety guards for no_trace Safety guards (trait shenanigans) guarantees safety usage of `no_trace` * Port canvas_traits to no_trace * Port servo_media to no_trace * Port net_traits to no_trace * Port style to no_trace * Port webgpu to no_trace * Port script_traits to no_trace * Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace * unrooted_must_root lint in seperate file * Add trace_in_no_trace_lint as script_plugin * Composable types in must_not_have_traceable * Introduced HashMapTracedValues wrapper * `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>` * Port rest of servo's types to no_trace * Port html5ever, euclid, mime and http to no_trace * Port remaining externals to no_trace * Port webxr and Arc<Mutex<_>> * Fix spelling in notrace doc
* make the concept of has_listeners_for follow other implementations (#21044)Gregory Terzian2023-07-191-2/+2
| | | Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
* 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-6/+47
|
* Fix formatting.Josh Matthews2023-05-201-2/+1
|
* Remove unused argument from AlreadyInRealm::assert.Josh Matthews2023-05-201-2/+2
|
* Remove global argument from Promise::new_in_current_realm.Josh Matthews2023-05-201-2/+2
|
* Fix flakiness in animation testsMartin Robinson2023-05-021-0/+12
| | | | | | | | | | | | | | 1. When updating the animation timeline, ensure that nodes that are animating are marked dirty, if necessary, so any style queries will force an layout flush. 2. Disable the problematic transition test suites, as they are in Gecko. These suites often fail when Servo is so overloaded that it cannot deliver frames fast enough to get more than two samples during the animation lifecycle. Fixes #28334. Fixes #26435. Fixes #21486.
* clarify todos about exposed objectsDelan Azabani2023-03-231-3/+9
|
* apply pylbrecht/servo/named.window.getter (closes #27952)Delan Azabani2023-03-231-175/+147
|
* Replaced ref_slice::ref_slice with std::slice::from_refAdrian Willenbücher2021-06-101-2/+2
| | | | | | | ref_slice::ref_slice is deprecated in ref_slice-1.2.1, because it's redundant with std since rust 1.28. Signed-off-by: Adrian Willenbücher <willenbuecher@xq-tec.com>
* Improve IME messaging to embedder with insertion point index and multiline flag.Philip Lamb2021-03-291-4/+17
|
* Miscellaneous build / tidy fixes.Emilio Cobos Álvarez2021-02-261-3/+9
|
* fmtteymour-aldridge2021-02-051-1/+1
|
* Remove unused arguments from methods.teymour-aldridge2021-02-051-9/+5
|
* Fix errorsteymour-aldridge2021-02-051-4/+4
|
* Mark methods as unsafe.teymour-aldridge2021-02-051-4/+4
|
* Fix mouse button handlingYUAN LYU2020-12-061-2/+6
|
* Implement ParentNode#replaceChildrenVincent Ricard2020-09-251-0/+5
|
* devtools: Treat session history traversal like a navigation.Josh Matthews2020-08-101-1/+5
|
* Do not panic on navigating across documentsUtsav Oza2020-07-301-5/+8
|
* Fix comments for handle_mouse_move_event methodUtsav Oza2020-07-301-46/+41
|
* Fire mouseenter and mouseleave eventsUtsav Oza2020-07-301-6/+81
|
* Fix ordering of mousemove eventUtsav Oza2020-07-301-75/+71
|