aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rework “visible” to “throttled” in constellation + script + ↵Delan Azabani2024-03-221-5/+5
| | | | compositor (#31816)
* Clippy: Fixed warnings in htmlimageelement.rs (#31800)Aarya Khandelwal2024-03-211-5/+5
| | | | | * 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-9/+9
| | | | | | | | | * 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-11/+11
|
* script: Do not run layout in a thread (#31346)Martin Robinson2024-02-231-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-1/+1
| | | | 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-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>
* Use Foo_Binding instead of FooBinding for namespace modules (#30447)Samson2023-09-301-1/+1
| | | | | * 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-18/+19
| | | | | * 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>
* build(deps): bump bitflags from 1.3.2 to 2.3.1 (#30273)Martin Robinson2023-09-011-2/+4
| | | | | | Bumps [bitflags](https://github.com/bitflags/bitflags) from 1.3.2 to 2.3.1. - [Release notes](https://github.com/bitflags/bitflags/releases) - [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md) - [Commits](https://github.com/bitflags/bitflags/compare/1.3.2...2.3.1)
* No tracing of nop traceable fields (#29926)Samson2023-08-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/+4
|
* fix(script): "process the iframe attributes" shouldn't invoke the iframe ↵yvt2021-08-071-11/+18
| | | | | | | | | | load event steps anymore This likely originates from a bug that existed in the specification[1]. A `src`-less iframe would fire two `load` events when implemented according to an affected version of the specification. [1]: https://github.com/whatwg/html/commit/f2839722e1b3dc56368c32fd5808f172f3ea3289
* refactor(script): `navigate_or_reload_child_browsing_context` should only ↵yvt2021-08-031-13/+21
| | | | | | | | | | handle cases involving navigation The initial document creation does not involve navigation, and it would cause a confusion if this was done by a function which has `navigation` in its name. This commit renames `navigate_or_reload_child_browsing_ context` to `start_new_pipeline`, and introduces a new function which has the original name and is dedicated to handle navigation.
* Add creation url and Secure ContextsJonathan Kingston2020-11-251-0/+4
|
* Implement DOMTokenList.supports APIVincent Ricard2020-10-051-2/+15
|
* Do not load srcdoc iframes synchronouslyUtsav Oza2020-08-051-1/+1
|
* Make url for "client" referrer mandatoryMatthias Deiml2020-06-171-4/+3
|
* 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 HTMLIFrameElementLayoutMethods methods take selfAnthony Ramine2020-03-291-8/+8
|
* Give a lifetime parameter to LayoutDomAnthony Ramine2020-03-281-1/+1
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Auto merge of #25668 - pshaughn:iframerecursion, r=jdmbors-servo2020-02-241-1/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop iframes from including their ancestors An iframe that included itself would just keep loading until running out of resources; the spec includes protection against that, and now Servo follows (some of) the spec about it. --- <!-- 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 the same-origin case presented in #3931 but not a case in which an intermediate cross-origin iframe is hiding a same-origin ancestor further up. <!-- Either: --> - [X] There is a manual test for these changes in #3931 <!-- 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. -->
| * Iframes can't include an ancestor they know aboutPatrick Shaughnessy2020-02-121-1/+24
| |
* | Names should now be consistently atomsPatrick Shaughnessy2020-02-131-21/+11
|/
* dom: Reduce the scope of iframe's load blocker borrow.Josh Matthews2019-11-121-4/+7
|
* Implement srcdoc support for iframes.jaymodi982019-11-121-2/+47
|
* Ensure layout/script always have a correct viewport size when a new pipeline ↵Josh Matthews2019-11-061-0/+2
| | | | is created.
* dom: Calculate the viewport size of iframes when they are first added to the ↵Josh Matthews2019-11-061-8/+8
| | | | tree.
* improve spec compliance of discarding BCsGregory Terzian2019-09-221-4/+3
| | | | | | | | | | | | | | do not handle compositor input events when BC is being discarded prevent firing of timers for discarded BCs return null for opener is BC has been discarded bundle discard BC steps into window method return null in window.opener, if BC has already been discarded move the window closed check pre-event to script-thread
* restructure content process shutdown ack with threaded sender, without layoutGregory Terzian2019-08-171-1/+0
|
* Update euclid.Emilio Cobos Álvarez2019-07-231-5/+2
| | | | | | | | 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.
* clean-up navigationGregory Terzian2019-07-181-33/+38
| | | | | | | | | | | | | | | | | | | | security: check target and source origin before executing JS url implement replacement-enabled flag as a HistoryEntryReplacement enum add source origin string on loaddata add LoadOrigin iframe: remove optional load-data auxiliaries: add load-data into info constellation: remove url from Pipeline::new check load origin: link to whatwg issue switch loadorigin toplevel to constellation
* Introduce BindContext with in_doc and connected flagsFernando Jiménez Moreno2019-04-261-3/+6
| | | | Fix some is_in_doc -> is_connected mistakes
* Add is_connected flag to node and use it to replace most uses of is_in_docFernando Jiménez Moreno2019-04-261-5/+5
|
* set referrer in window.load_urlRussell Cousineau2019-04-191-2/+3
| | | | | | | | - this conforms to follow-hyperlinks spec step 13 - this conforms to window-open spec step 14.3 - replace uses of `referrer_url` with `referrer` - in Request class, change "no-referrer" to "" - set websocket fetch referrer to "no-referrer"
* Remove SetVisible message from iframeAron Zwaan2019-03-121-10/+0
|
* Make nested browsing context navigations check the loaded status of the ↵Josh Matthews2019-03-071-3/+1
| | | | active document of the nested browsing context.
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-14/+14
|
* Auto merge of #22121 - gterzian:remove_constellation_block_in_navigation, ↵bors-servo2018-12-261-2/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=paulrouget Remove sync constellation -> embedder communication <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #22042 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22121) <!-- Reviewable:end -->
| * implement windowproxy "delay-load-event-mode", and partially document ↵Gregory Terzian2018-12-231-2/+7
| | | | | | | | "completely-loaded"
* | style: Make Servo use a single thread-pool for layout-related tasks per-process.Emilio Cobos Álvarez2018-12-231-2/+0
| | | | | | | | | | | | Instead of per-document. This also allows to reuse this thread-pool if needed for other stuff, like parallel CSS parsing (#22478), and to share more code with Gecko, which is always nice.
* | Auto merge of #22456 - dlrobertson:fix_src, r=ferjmbors-servo2018-12-221-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update src/href attributes to be a USVString The following IDLs have the src/href attributes typed as a `DOMString` while in the spec the attribute has been updated to be a `USVString`: - [HTMLIFrameElement] - [HTMLImageElement] - [HTMLInputElement] - [HTMLLinkElement] - [HTMLMediaElement] - [HTMLScriptElement] Fixes: #22454 [HTMLIFrameElement]: https://html.spec.whatwg.org/multipage/#htmliframeelement [HTMLImageElement]: https://html.spec.whatwg.org/multipage/#htmlimageelement [HTMLInputElement]: https://html.spec.whatwg.org/multipage/#htmlinputelement [HTMLLinkElement]: https://html.spec.whatwg.org/multipage/#htmllinkelement [HTMLMediaElement]: https://html.spec.whatwg.org/multipage/#htmlmediaelement [HTMLScriptElement]: https://html.spec.whatwg.org/multipage/#htmlscriptelement <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22456) <!-- Reviewable:end -->
| * Update src/href attributes to be a USVStringDan Robertson2018-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The following IDLs have the src/href attributes typed as a DOMString while in the spec the attribute has been updated to be a USVString: - HTMLIFrameElement - HTMLImageElement - HTMLInputElement - HTMLLinkElement - HTMLMediaElement - HTMLScriptElement
* | Delay iframe and script element processing until the DOM is stable.Josh Matthews2018-12-141-12/+16
| |
* | Initial window sizes are mandatory.Josh Matthews2018-12-141-2/+2
| |
* | Ensure that all new iframes have a correct initial window size.Josh Matthews2018-12-141-1/+12
|/
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|