aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlimageelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* changed `match` to 'matches!' (#31850)Aarya Khandelwal2024-03-251-4/+1
|
* Fixed the .clone() warnings. (#31819)Aarya Khandelwal2024-03-221-1/+1
|
* Clippy: Fixed warnings in htmlimageelement.rs (#31800)Aarya Khandelwal2024-03-211-17/+17
| | | | | * Fixed warnings in htmlimageelement.rs * making changes for test-tidy to run without errors.
* Clippy: Fixed clippy warnings in components/script/dom (#31801)Aarya Khandelwal2024-03-211-7/+7
| | | | | | | | | * fixed clippy warnings in htmlformelement.rs * Fixed clippy warnings * Fixed warnings related to matches! * made changes to compile "test-tidy" successfully
* clippy: Fix redundant field names warnings (#31793)Oluwatobi Sofela2024-03-201-5/+2
|
* style: Remove dependency on servo_url (#31358)Martin Robinson2024-02-161-5/+6
| | | | | In order for stylo to be a separate crate, it needs to depend on less things from Servo. This change makes it so that stylo no longer depends on servo_url.
* rustdoc: Fix many rustdoc errors (#31147)Martin Robinson2024-01-221-4/+5
| | | | 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.
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-241-0/+2
|
* Use Foo_Binding instead of FooBinding for namespace modules (#30447)Samson2023-09-301-3/+3
| | | | | * Update Codegen.py to emit Foo_Binding instead of FooBinding * s/FooBinding/Foo_Binding/g
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-46/+48
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-1/+1
| | | | | | | | | | | * 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>
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-1/+6
|
* Enter realms more consistently during the script event loop.Josh Matthews2023-05-201-0/+9
|
* Make url for "client" referrer mandatoryMatthias Deiml2020-06-171-2/+4
|
* Don't send a load event when a loaded image is actually the placeholderBastien Orivel2020-05-081-3/+11
| | | | | | | | | | | | The image cache returns an `ImageCacheResult::ImageAvailable `the second time you try getting the placeholder. This means that in some cases, the loading of an image would fail, then the same image would get fetched from the cache, the placeholder would be loaded from that but would be seen as a normal image, firing a load event. This made the tests in `fetch/cross-origin-resource-policy/image-loads.html` fail depending on their order.
* Auto merge of #26450 - ↵bors-servo2020-05-071-2/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PeterZhizhin:add_referrerpolicy_to_list_of_relevant_mutations, r=jdm Add referrerpolicy to list of relevant mutations <!-- Please describe your changes on the following line: --> `img.referrerPolicy` change now mutates the image. Not all `referrerPolicy` attribute changes result in an image update event. Only valid changes are reflected. All referrerpolicy tests inside `relevant-mutations.html` WPT test now pass. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #26388 <!-- Either: --> - [x] These have tests: ``` ./mach test-wpt tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html ```
| * Added referrerpolicy as relevant mutation for imgPeterZhizhin2020-05-071-2/+40
| | | | | | | | | | | | | | | | This fixes #26388. referrerPolicy is now calls onload for image mutations. Not all referrerPolicy attribute changes result in an image update event. Only valid changes are reflected. Referrerpolicy tests now pass.
* | Use a restyle for animation ticksMartin Robinson2020-05-051-4/+2
|/ | | | | | | | | | | | | | This change corrects synchronization issues with animations, by reworking the animation processing model to do a quick restyle and incremental layout when ticking animations. While this change adds overhead to animation ticks, the idea is that this will be the fallback when synchronous behavior is required to fulfill specification requirements. In the optimistic case, many animations could be updated and applied off-the-main-thread and then resynchronized when style information is queried by script. Fixes #13865.
* Refactor ImageCache::find_image_or_metadata API.Julien Tregoat2020-04-171-85/+67
|
* Introduce <LayoutDom<HTMLImageElement>>::current_requestAnthony Ramine2020-04-011-32/+19
| | | | | This safe helper contains the only source of unsafety from the actual image layout helpers methods, making them completely safe.
* Introduce <LayoutDom<Element>>::attrs()Anthony Ramine2020-03-311-16/+10
| | | | | | This safe method is the basic block to access element attributes from layout. We reuse it in the other attr-related layout methods to remove a pretty big source of rampant unsafe code between script and layout.
* Merge RawLayoutElementHelpers into LayoutElementHelpersAnthony Ramine2020-03-311-3/+3
|
* Make LayoutHTMLImageElementHelpers methods take selfAnthony Ramine2020-03-291-16/+12
|
* Give a lifetime parameter to LayoutDomAnthony Ramine2020-03-281-1/+1
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Handle nonexistent images in CanvasRenderingContext2D.createPattern()pylbrecht2020-03-131-7/+4
|
* Names should now be consistently atomsPatrick Shaughnessy2020-02-131-3/+2
|
* Add image usability checks to drawImage()pylbrecht2020-02-031-1/+21
|
* Remove unnecessary LocalName::from(constant) callsPatrick Shaughnessy2020-01-281-1/+1
|
* Auto merge of #25515 - pshaughn:checkpoints, r=jdmbors-servo2020-01-251-10/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add microtask checkpoints to script elements and custom elements Servo had a microtask checkpoint at the end of running a script, but there was also supposed to be one at the end of HTML-parsing a script element before Javascript-parsing the script itself, and there were supposed to be checkpoints immediately after the call to a custom element constructor. This adds those, passing all cases of one WPT test file. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25016 except for the remaining not-really-about-microtasks case #25514 <!-- Either: --> - [X] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * Add microtask checkpoints on </script> and CE constructPatrick Shaughnessy2020-01-151-10/+4
| |
* | Auto merge of #25431 - warren-fisher:create-html-element, r=jdmbors-servo2020-01-211-4/+13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use create_html_element for HTMLAudioElement and HTMLImageElement <!-- Please describe your changes on the following line: --> Updated the Image and Audio constructors to use `create_html_element` via the Element::create method. This was done to meet these specifications of "Let (audio/image) be the result of **creating an element** given document, audio, and the HTML namespace." for [dom-image](https://html.spec.whatwg.org/multipage/embedded-content.html#dom-image) and [dom-audio](https://html.spec.whatwg.org/multipage/media.html#dom-audio) Not sure what _is_ is according to the [create-element guidelines](https://dom.spec.whatwg.org/#concept-create-element) so I left it as None copying from #25393. Also copied the ElementCreator and CustomElementCreationMode from #25393 as I do not know what they do. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25421 (GitHub issue number if applicable) <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because it is a small swap out of the way used to generate these HTML elements. The pre-existing tests should be sufficient. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
| * | use create_html_element for HTMLAudioElement and HTMLImageElementWarren Fisher2020-01-041-4/+13
| | |
* | | Modify `script` to prevent further violations of snake_caseKunal Mohan2020-01-181-2/+3
| |/ |/|
* | Add accountable-refcell as optional build time featureKunal Mohan2020-01-081-2/+2
|/
* Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-151-1/+1
| | | | CC https://github.com/rust-lang/rust/issues/66079
* Correct inverted logic for available image checks.Josh Matthews2019-11-061-4/+1
|
* Add useful debug output for HTTP response and image cache.Josh Matthews2019-10-041-0/+1
|
* Support CORS attributes for image elements.Josh Matthews2019-10-041-5/+33
|
* Double key image cache by requesting origin, and store CORS status with ↵Josh Matthews2019-10-041-1/+8
| | | | cached images.
* Prefetch img and scripts during parsingAlan Jeffrey2019-09-101-3/+18
|
* Remove <img>'s historical progress eventsBastien Orivel2019-09-011-23/+2
| | | | Fixes #24011
* Fix some new warningsSimon Sapin2019-06-221-1/+1
|
* Introduce BindContext with in_doc and connected flagsFernando Jiménez Moreno2019-04-261-4/+6
| | | | Fix some is_in_doc -> is_connected mistakes
* Introduce ShadowIncluding enum for tree traversalsFernando Jiménez Moreno2019-04-261-2/+3
|
* Implement concept of shadow including tree orderFernando Jiménez Moreno2019-04-261-1/+1
|
* Add is_connected flag to node and use it to replace most uses of is_in_docFernando Jiménez Moreno2019-04-261-3/+3
|
* Implementing the builder pattern for RequestInitLucas Fantacuci2019-04-101-7/+4
|