aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlscriptelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | Kill beforescriptexecute and afterscriptexecute (fixes #12446)Anthony Ramine2017-01-141-20/+0
| |
* | Auto merge of #15011 - nox:load-fixes, r=jdmbors-servo2017-01-141-0/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | Various script loading fixes <!-- 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/15011) <!-- Reviewable:end -->
| * | Implement HTMLScriptElement async attributeAnthony Ramine2017-01-141-0/+11
| | |
* | | Handle crossorigin in link and refactor crossorigin handlingmrnayak2017-01-131-25/+4
|/ / | | | | | | | | | | | | | | Implemented Step three and handled step four of obtain the resource part of 4.2.4 The link element. Link to spec : https://html.spec.whatwg.org/multipage/semantics.html#concept-link-obtain Refactored crossOrigin handling in HTMLScriptElement, HTMLImageElement
* / Don't fire a load event on inline scriptsAnthony Ramine2017-01-131-2/+0
|/ | | | https://github.com/whatwg/html/issues/1757
* Store parser's current line when script elements are created.karenher2017-01-111-3/+7
| | | | | | Use the newly stored line as the starting line number when evaluating JS. This ensures that inline scripts will report errors with meaningful line numbers.
* Introduce PendingScriptAnthony Ramine2017-01-111-15/+21
| | | | | This moves scripts' loading results in Document, instead of maintaining them behind a DOMRefCell in each HTMLScriptElement.
* Rename ScriptOrigin to ClassicScriptAnthony Ramine2017-01-111-10/+10
|
* Do not pass an Option to Document::set_pending_parsing_blocking_scriptAnthony Ramine2017-01-101-2/+2
|
* Introduce ExternalScriptKind to simplify HTMLScriptElement::prepareAnthony Ramine2017-01-101-43/+44
|
* Fix steps numbering of HTMLScriptExecute::prepareAnthony Ramine2017-01-101-35/+42
|
* Implement Subresource Integritymrnayak2017-01-081-3/+15
| | | | | | | | | | | Implemented response validation part of https://w3c.github.io/webappsec-subresource-integrity/. Implemented step eighteen of the main fetch. If a request has integrity metadata, then following steps are performed *Wait for response body *If the response does not have a termination reason and response does not match request’s integrity metadata, set response to a network error.# Please enter the commit message for your changes. Lines starting
* Implement "child text content" concept; use it where appropriate.Corey Farwell2016-12-151-1/+1
|
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-1/+1
| | | | Fixes https://github.com/servo/servo/issues/8473.
* Implement document.write (fixes #3704)Anthony Ramine2016-11-281-9/+11
| | | | This is a bit crude because of some missing utility methods on BufferQueue.
* Rewrite how parser handles script schedulingAnthony Ramine2016-11-261-24/+12
|
* Auto merge of #14210 - GuillaumeGomez:fragment_node, r=noxbors-servo2016-11-211-0/+4
|\ | | | | | | | | | | | | | | | | | | | | Add missing action in CreateContextualFragment method r? @nox <!-- 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/14210) <!-- Reviewable:end -->
| * Add missing actions in CreateContextualFragment methodGuillaume Gomez2016-11-181-0/+4
| |
* | Remove redundant url clonesPu Xingyu2016-11-181-2/+2
| | | | | | | | | | They are now redundant since now document.url() returns a struct rather than a reference.
* | Urlmageddon: Use refcounted urls more often.Emilio Cobos Álvarez2016-11-171-6/+6
|/
* Properly implement TaskSource for NetworkingTaskSourceKeith Yeung2016-11-111-2/+2
|
* Auto merge of #14156 - frewsxcv:cors-capitalization, r=KiChjangbors-servo2016-11-101-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update CORS naming from 'CORS' to 'Cors'. As per: https://aturon.github.io/style/naming/README.html#general-conventions-[rfc-#430] Acronyms should be considered one word and not all caps. <!-- 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/14156) <!-- Reviewable:end -->
| * Update CORS naming from 'CORS' to 'Cors'.Corey Farwell2016-11-091-7/+7
| | | | | | | | | | | | | | | | As per: https://aturon.github.io/style/naming/README.html#general-conventions-[rfc-#430] Acronyms should be considered one word and not all caps.
* | Update html5ever to 0.10.1Anthony Ramine2016-11-101-15/+16
|/
* Update to string-cache 0.3Simon Sapin2016-11-031-16/+17
|
* Remove intrinsic Root::r()Anthony Ramine2016-10-111-6/+4
|
* Rename Reflectable::global_scope to globalAnthony Ramine2016-10-061-1/+1
|