aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/mediaquerylist.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix warnings after latest rust upgrade (#33043)Martin Robinson2024-08-141-5/+5
| | | | | | | This fixes various unused code warnings after the recent rust upgrade. Some of the dead code is maintained, as it is quite likely that it will be used in future changes. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* script: Have `Document` own `Layout` (#32316)Martin Robinson2024-05-201-2/+2
| | | | | | Have `Document` own `Layout`. This makes it impossible to have a `Document` without `Layout`, which was true, but now the compiler checks it. In addition, `Layout` is now released when the `Document` is, avoiding leaking the entire `Layout`.
* Revert "script: implement AbortController (#31361)" (#32243)Samson2024-05-071-1/+0
| | | This reverts commit 7fce850cffb72a6fbcf763a40164a9b35b7fa833.
* script: implement AbortController (#31361)Smitty2024-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | | * Implement AbortController Signed-off-by: syvb <me@iter.ca> * Update WPT tests Signed-off-by: syvb <me@iter.ca> * Address review comments * Fix duplicate import generation * Update WPT test expectations * Change expectation to FAIL for flaky test --------- Signed-off-by: syvb <me@iter.ca>
* layout: Add a `FontMetricsProvider` for resolving font-relative units (#31966)Martin Robinson2024-04-041-2/+3
| | | | | | | | | | | | | | | | | | | The only font relative unit that Servo knows how to resolve currently is `rem` (relative to the root font size). This is because Stylo cannot do any font queries. This adds a mechanism to allow this, exposing the ability to properly render `ex` units in Servo. This change only allows resolving some font size relative units thoug, as Servo doesn't collect all the FontMetrics it needs to resolve them all. This capability will be added in followup changes. Some new tests fail: - ex-unit-001.html: This test fails because Servo does not yet have support for setting the weight using @font-face rules on web fonts. - ex-unit-004.html: This test fails because Servo does not yet have support for setting the Unicode range of a web font using @font-face rules. - first-available-font-001.html: This test fails because the above two feature are missing.
* clippy: Fix redundant field names warnings (#31793)Oluwatobi Sofela2024-03-201-1/+1
|
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-7/+10
| | | | | * strict imports formatting * Reformat all imports
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+1
|
* Implement AddEventListenerOptions: onceBastien Orivel2018-12-221-0/+1
| | | | Fixes #13242
* Initial window sizes are mandatory.Josh Matthews2018-12-141-4/+2
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-10/+10
|
* Format script componentchansuke2018-09-191-6/+11
|
* use DOMTracker instead of WeakMediaQueryListVecGregory Terzian2018-07-291-53/+1
|
* Change ToCss to take a CssWriter<W>Anthony Ramine2018-01-231-3/+1
| | | | | | This more concrete wrapper type can write a prefix the very first time something is written to it. This allows removing plenty of useless monomorphisations caused by the former W/SequenceWriter<W> pair of types.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-1/+1
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* 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.
* Implement EventListenerOptions for EventTargetGuillaume Gomez2017-09-301-5/+12
| | | | For now, only "capture" is supported.
* 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 DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-4/+4
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Use absolute paths in the event handlers macrosAnthony Ramine2017-09-011-1/+0
|
* style: Replicate the list of stylesheets on the layout thread.Emilio Cobos Álvarez2017-08-181-8/+3
| | | | | | This is a patch that unifies a bit how Gecko and Stylo stylesheets work, in order to be able to eventually move the stylesheets into the stylist, and be able to incrementally update the invalidation map.
* Rework MediaType to be an atom-based struct instead of an enum.Brad Werth2017-08-091-1/+1
| | | | MozReview-Commit-ID: 1Tfrs9PBkhA
* Fixed scaling artefacts in paint worklets caused by zoom and hidpi.Alan Jeffrey2017-07-201-1/+2
|
* Propagate quirks mode all the way to ParserContextAnthony Ramine2017-04-271-1/+1
| | | | The quirks mode is still not properly propagated in geckolib.
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Introduce CSSPixel as a replacement for ViewportPx and PagePx.Glenn Watson2017-02-241-8/+3
|
* Calling matchMedia during a MQL change event will not panicPrudhvi Rampey2017-02-181-6/+12
|
* Fix #14497: WeakMediaQueryListVec assumes its contents are still alivePavel Potocek2017-01-171-2/+2
|
* Spec conformancebd3392016-12-201-2/+11
| | | | Use MediaQueryListEvent instead of Event, in MediaQueryList.
* Mark JSTraceable and its method as unsafeAnthony Ramine2016-12-061-2/+3
|
* Rename media_queries::MediaQueryList to MediaListXidorn Quan2016-11-081-7/+4
|
* Prefer Servo-specific ToCss for all typesRavi Shankar2016-11-071-2/+1
|
* Remove unneeded #allow(unsafe_code)Stefan Schindler2016-11-051-2/+0
|
* Migrate `EventTarget` event firing functions to use `Atom`s.Corey Farwell2016-11-031-1/+1
| | | | This allows us to utilize more `atom` macros.
* Remove "fire a simple event" concept, refactor event firing API.Corey Farwell2016-11-031-1/+1
| | | | | "fire a simple event" concept was removed in https://github.com/whatwg/html/pull/1933.
* Implement matchMedia and MediaQueryListJack Moffitt2016-11-021-0/+156
Fixes #13376.