aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlimageelement.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+5
|
* Reorder importsPyfisch2018-11-061-8/+10
|
* Format remaining filesPyfisch2018-11-061-17/+23
|
* Sort `use` statementsSimon Sapin2018-11-061-5/+5
|
* `cargo fix --edition`Simon Sapin2018-11-061-38/+38
|
* Update hyper to 0.12Bastien Orivel2018-11-011-13/+10
|
* Make layout use available image data before querying the image cache.Josh Matthews2018-10-121-0/+11
|
* Adding relevant mutations and new test resultspaavininanda2018-09-201-8/+13
|
* implement missing steps for complete apinupurbaghel2018-09-201-5/+10
|
* Format script componentchansuke2018-09-191-268/+384
|
* Implement proper origin checks for WebGL textures (fixes #21522)Anthony Ramine2018-09-181-6/+5
|
* Current-pixel-density tests passingpaavininanda2018-09-131-14/+24
|
* Reacting to environment changespaavininanda2018-09-121-18/+279
|
* Fix other parts of the Servo build.Emilio Cobos Álvarez2018-09-031-5/+14
|
* correct failing testsnupurbaghel2018-09-011-1/+7
|
* correct currentSrc functionnupurbaghel2018-09-011-2/+2
|
* fire error when placeholder image is loadedGregory Terzian2018-08-261-23/+28
|
* Auto merge of #21111 - gterzian:implement_document_load_cancellation, r=jdmbors-servo2018-07-291-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement document load cancellation <!-- 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 #19309 fix #21114 fix #21113 (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/21111) <!-- Reviewable:end -->
| * implement window.stop, improve aborting document loadGregory Terzian2018-07-291-1/+1
| |
* | Auto merge of #21219 - paavininanda:Update_the_image_data, r=jdmbors-servo2018-07-231-8/+26
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Complete remaining algo update_the_image_data <!-- 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: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #11416. <!-- Either: --> - [x] These changes do not require tests <!-- 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/21219) <!-- Reviewable:end -->
| * | Step3,4,5paavininanda2018-07-211-8/+26
| | |
* | | implement step 5 of select_image_sourcenupurbaghel2018-07-211-7/+25
|/ /
* / implement update_source_set, select_image_sourcenupurbaghel2018-07-191-13/+273
|/
* introduce "per task source" ignoring of tasksGregory Terzian2018-07-101-3/+3
|
* Remove unused code for parsing a `sizes` attribute.Emilio Cobos Álvarez2018-07-011-70/+0
| | | | | | We have `SourceSizeList` in components/style/values/specified/source_size_list.rs which does the job and is tested via WPT in Gecko.
* layout: script: Fix build.Emilio Cobos Álvarez2018-06-231-4/+7
|
* Auto merge of #18981 - KiChjang:fold-type-destination, r=avadacatavrabors-servo2017-10-241-2/+1
|\ | | | | | | | | | | | | | | | | | | | | Merge request type and destination Fixes #18278. <!-- 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/18981) <!-- Reviewable:end -->
| * Merge request type and destinationKeith Yeung2017-10-231-2/+1
| |
* | Use try syntax for Option where appropriateMatt Brubeck2017-10-201-4/+1
|/
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-4/+4
| | | | | | | | 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-5/+5
| | | | | | | | | | | | | | | | | | | | 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-2/+1
| | | | | There is actually only one attribute that can use that, the one for <body background>.
* Fix URL attributesAnthony Ramine2017-10-111-1/+3
| | | | | URL attributes should always use AttrValue::Url, and the input should be resolved against the document's base URL at setting time always.
* Parse srcset attributeNeha2017-10-031-1/+194
|
* Auto merge of #18714 - jdm:sizes, r=jdmbors-servo2017-10-031-0/+69
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parse sizes attribute values Squashed version of #17808. --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix (partially) #11416 - [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/18714) <!-- Reviewable:end -->
| * Parse sizes attribute values.Rakhi Sharma2017-10-021-0/+69
| |
* | Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-8/+8
| | | | | | | | | | | | | | 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 DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-261-5/+5
| | | | | | | | | | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* | Rename LayoutJS<T> to LayoutDom<T>Anthony Ramine2017-09-261-2/+2
| |
* | 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
| |
* | Introduce TaskOnceAnthony Ramine2017-09-201-5/+5
| | | | | | | | | | Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing from CancellableTask<T>.
* | Use task! for step 11.4 of updating the image dataAnthony Ramine2017-09-181-36/+26
| |
* | Use task! to process image responsesAnthony Ramine2017-09-181-33/+13
| |
* | Use task! for step 5.3.7 of updating the image dataAnthony Ramine2017-09-181-32/+17
| |
* | Use task! for step 9 of updating the image dataAnthony Ramine2017-09-181-66/+58
| |
* | Use task! to fire a progress event when updating the image dataAnthony Ramine2017-09-181-24/+21
| |