aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlareaelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* add CanGc as argument to methods in ElementInternals, GlobalScope, ↵Yerkebulan Tulibergenov13 days1-2/+2
| | | | | | | | | | | HTMLAnchorElement, HTMLAreaElement, HTMLCanvasElement (#36492) add CanGc as argument to methods in ElementInternals, GlobalScope, HTMLAnchorElement, HTMLAreaElement, HTMLCanvasElement Testing: These changes do not require tests because they are a refactor. Addresses part of https://github.com/servo/servo/issues/34573. Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
* resolve issue #36074 new_js_regex and matches_js_regex need a CanGc argument ↵Kunga Derick Abongho2025-03-291-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#36111) * new_js_regex and matches_js_regex need a CanGc argument Signed-off-by: dericko681 <abonghoderick@gmail.com> * new_js_regex and matches_js_regex need a CanGc argument Signed-off-by: dericko681 <abonghoderick@gmail.com> * edit Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> * Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> * Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> * Propagate CanGc arguments through new_js_regex and matches_js_regex Signed-off-by: dericko681 <abonghoderick@gmail.com> --------- Signed-off-by: dericko681 <abonghoderick@gmail.com>
* Use new stylo crate renames (#35898)Nico Burns2025-03-121-1/+1
| | | Signed-off-by: Nico Burns <nico@nicoburns.com>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-3/+3
| | | | | | | | | | | | | * 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>
* Propagate `CanGc` arguments through callers in constructors (#35541)Auguste Baum2025-02-201-0/+1
| | | Signed-off-by: Auguste Baum <auguste.apple@gmail.com>
* script: implement HTMLHyperlinkElementUtils for HTMLAreaElement (#35482)shanehandley2025-02-161-4/+120
| | | | | | This makes some common functionality in HTMLAreaElement and HTMLAnchorElement shared code. Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* 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>
* script: Limit public exports. (#34915)Josh Matthews2025-01-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Implement referrerpolicy attribute on remaining elements (#34736)shanehandley2024-12-221-1/+9
| | | | | Fixes #11861 Signed-off-by: Shane Handley <shanehandley@fastmail.com>
* 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>
* cangc fixes in node.rs (#33984)chickenleaf2024-10-231-2/+4
| | | Signed-off-by: L Ashwin B <lashwinib@gmail.com>
* Multiple CanGc fixes in components/script/dom (#33924)tanishka2024-10-201-1/+2
| | | Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
* Properly track `rel` keywords for `<a>`/`<area>`/`<form>` elements (#33462)Simon Wülker2024-09-231-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | * Use linkrelations for all linkable elements Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Document LinkRelations Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Rename linkrelations.rs -> links.rs This module is supposed to include general-purpose link related stuff. Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Parse all "rel" keywords Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* clippy: Fix `unnecessary_cast` warnings in `components/script` (#31823)Oluwatobi Sofela2024-03-221-2/+2
| | | | | | | * clippy: Fix unnecessary cast warnings * clippy: Replace redundant field names with their shorthand alternatives * clippy: Delete struct pattern dereferencings
* clippy: Fix redundant field names warnings (#31793)Oluwatobi Sofela2024-03-201-1/+1
|
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
|
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-10/+11
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-1/+2
| | | | | | | | | | | * 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>
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-1/+4
|
* Implement DOMTokenList.supports APIVincent Ricard2020-10-051-2/+21
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Event dispatch rewritten to resemble spec more often, activate on clicks betterPatrick Shaughnessy2020-02-121-4/+0
|
* [WIP] solve #22782takumi2019-10-181-9/+0
| | | | TODO: write tests for my change
* Update euclid.Emilio Cobos Álvarez2019-07-231-1/+1
| | | | | | | | There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
* Fix some new warningsSimon Sapin2019-06-221-1/+1
|
* Implement the target attribute for HTMLAreaElementGeorge Roman2019-02-111-0/+6
|
* Implement referrer policy for follow_hyperlinkPeijun Ma2019-01-301-7/+1
|
* Refactor follow_hyperlink and its callersPeijun Ma2019-01-301-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now they follow the new spec stated at: https://html.spec.whatwg.org/multipage/links.html#following-hyperlinks-2 It seems like choosing a browsing context is already done in the follow_hyperlink method, so I have removed the TODO in activation_behavior for HTMLAreaElement. The tests in tests/wpt/web-platform-tests/html/semantics/links/following-hyperlinks/ pass in release builds, but still don't pass in dev build, since the timeout in tests/wpt/web-platform-tests/html/semantics/links/following-hyperlinks/activation-behavior.window.js seems to be too short for dev builds. Navigating to error page on failed URL parsing is still not implemented. There seem to be potential code duplication in activation_behavior methods for both htmlanchorelement.rs and htmlareaelement.rs, in: let referrer_policy = match self.RelList().Contains("noreferrer".into()) { true => Some(ReferrerPolicy::NoReferrer), false => None, }; I didn't pull them out to a separate function since I don't know where I would put that new function.
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-2/+2
|
* Reorder importsPyfisch2018-11-061-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-16/+16
|
* Format script componentchansuke2018-09-191-59/+90
|
* 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 MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-2/+2
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Utilize match_ignore_ascii_case! in more places.Corey Farwell2017-07-291-8/+7
|
* Audit usages of unicode case-changing methods.Corey Farwell2017-07-261-7/+8
|
* Refactor HTMLImageElement::handle_event to be idiomaticOmar Akkila2017-07-071-1/+1
| | | | | | | | | | | | Clean up HTMLImageElement::handle_event Area::hit_test now uses a reference instead of taking ownership Fix trailing whitespace Unalign => in match Fix Area::hit_test tests to reflect updated function signature
* Clean up Area::parse (#15834)Omar Akkila2017-07-061-7/+7
| | | | | | | | Replace mutable reference to array with direct use Remove unecessary clone Replace call to unwrap()
* Bump euclid to 0.14.Nicolas Silva2017-06-141-1/+1
|
* Solving merge conficts related to the html5ever_atoms -> html5ever changeChristian Poveda2017-05-031-1/+1
|\
| * Upgrade to html5ever 0.16Simon Sapin2017-05-021-1/+1
| |
* | Changed all prefixes from DOMString to the atomic Prefix from html5everChristian Poveda2017-05-031-3/+3
|/
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* HTML image map supportbachar2017-01-111-1/+255
|
* Remove HeapGCValueAnthony Ramine2016-12-121-2/+2
| | | | | | It could be used to have mutable JSVal fields without GC barriers. With the removal of that trait, MutHeap and MutNullableHeap can respectively be replaced by MutJS and MutNullableJS.
* Update to string-cache 0.3Simon Sapin2016-11-031-6/+6
|