aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlscriptelement.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Script: removed a few opts::get()oneturkmen2019-06-261-2/+1
|
* Fix some new warningsSimon Sapin2019-06-221-1/+1
|
* Introduce BindContext with in_doc and connected flagsFernando Jiménez Moreno2019-04-261-4/+4
| | | | 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-3/+3
|
* Implement shadow-including root, set node as in doc when connected. Makes JS ↵Fernando Jiménez Moreno2019-04-261-3/+3
| | | | work in shadow trees
* set referrer in window.load_urlRussell Cousineau2019-04-191-2/+2
| | | | | | | | - 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"
* Auto merge of #23187 - krk:nopanic-unminifyjs, r=jdmbors-servo2019-04-161-1/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not unwrap empty unminified_js_dir in HTMLScriptElement.unminify_js. Calling unwrap caused a panic when a directory could not be created. --- <!-- 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 #23031 <!-- 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/23187) <!-- Reviewable:end -->
| * Clarify warning.Josh Matthews2019-04-161-1/+1
| |
| * Do not unwrap empty unminified_js_dir in HTMLScriptElement.unminify_js.krk2019-04-101-1/+9
| |
* | Implementing the builder pattern for RequestInitLucas Fantacuci2019-04-101-15/+14
|/
* Remove most RootedReference usesAnthony Ramine2019-03-101-5/+5
| | | | We can replace all uses of RootedReference for Option<T> by Option::deref calls.
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-5/+5
|
* 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-1/+4
|/
* refactored performance timing to align with updated specddh2018-11-201-2/+36
| | | | | | | | | | | | refactoring with ResourceFetchMetadata implemented deprecated window.timing functionality created ResourceTimingListener trait fixed w3c links in navigation timing updated include.ini to run resource timing tests on ci
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Unify the task source and task canceller APIAgustin Chiappe Berrini2018-11-141-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | I moved away from the `Window` struct all the logic to handle task sources, into a new struct called `TaskManager`. In a happy world, I'd be able to just have there two functions, of the types: ```rust fn task_source<T: TaskSource>(&self, name: TaskSourceName) -> Box<T> fn task_source_with_canceller<T: TaskSource>(&self, name: TaskSourceName) -> (Box<T>, TaskSourceCanceller) ``` And not so much duplicated code. However, because TaskSource can't be a trait object (because it has generic type parameters), that's not possible. Instead, I decided to reduce duplicated logic through macros. For reasons[1], I have to pass both the name of the function with canceller and the name of the function without, as I'm not able to concatenate them in the macro itself. I could probably use `concat_idents` to create both types already defined and reduce the amount of arguments by one, but that macro is nightly only. At the same time, not being able to declare macros inside `impl` forces me to pass `self` as an argument. All this makes this solution more verbose than it would be ideally. It does reduce duplication, but it doesn't reduce the size of the file. [1](https://github.com/rust-lang/rust/issues/29599)
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-2/+2
|
* Reorder importsPyfisch2018-11-061-4/+6
|
* Format remaining filesPyfisch2018-11-061-15/+18
|
* Sort `use` statementsSimon Sapin2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-27/+27
|
* Format script componentchansuke2018-09-191-80/+145
|
* introduce "per task source" ignoring of tasksGregory Terzian2018-07-101-1/+2
|
* Upgrade to rustc 1.23.0-nightly (02004ef78 2017-11-08)Simon Sapin2017-11-091-1/+0
|
* Replace rust-encoding with encoding-rsSimon Sapin2017-11-011-7/+6
|
* Merge request type and destinationKeith Yeung2017-10-231-2/+1
|
* 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-7/+7
| | | | | | | | 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-3/+3
| | | | | | | | | | | | | | | | | | | | 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.
* Change AttrValue::Url to AttrValue::ResolvedUrlAnthony Ramine2017-10-151-9/+1
| | | | | There is actually only one attribute that can use that, the one for <body background>.
* Fix URL attributesAnthony Ramine2017-10-111-1/+10
| | | | | URL attributes should always use AttrValue::Url, and the input should be resolved against the document's base URL at setting time always.
* 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 JS<T> to Dom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-2/+1
|
* Rename Runnable to TaskAnthony Ramine2017-09-161-1/+1
| | | | | | | | | | | | The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.
* Update step annotations in script's prepare methodNikhil Shagrithaya2017-07-241-25/+27
|
* Change RequestInit origin type to ImmutableOriginFausto Núñez Alberro2017-07-161-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
|/
* Inform about unminify errors and store unmodified version if js-beautify failsFernando Jiménez Moreno2017-04-121-22/+25
|
* Unminify JS and dump it to a file before executing itFernando Jiménez Moreno2017-04-121-1/+49
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Perform a microtask checkpoint after executing classic scripts and callbacks.Josh Matthews2017-02-011-5/+19
|
* Inline dom::eventdispatcher into dom::eventAnthony Ramine2017-01-221-2/+1
|
* Kill HTMLScriptElement::ready_to_be_parser_executedAnthony Ramine2017-01-171-12/+0
|
* Auto merge of #15020 - jdm:external_script_line, r=Ms2gerbors-servo2017-01-161-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not use the script element's line number for external scripts. This was yielding incorrect line numbers when looking at JS backtraces in gdb. - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] There are tests for these changes <!-- 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/15020) <!-- Reviewable:end -->
| * Do not use the script element's line number for external scripts.Josh Matthews2017-01-131-1/+2
| |