aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlimageelement.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
| |
* | Move Task to its own moduleAnthony Ramine2017-09-181-1/+2
| |
* | Rename Runnable to TaskAnthony Ramine2017-09-161-28/+31
|/ | | | | | | | | | | | 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`.
* move name implementation as default implementation to the trait and remove ↵toidiu2017-09-031-2/+0
| | | | overrides.
* order derivable traits listsClément DAVID2017-08-231-4/+4
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Change RequestInit origin type to ImmutableOriginFausto Núñez Alberro2017-07-161-1/+1
|
* Refactor HTMLImageElement::handle_event to be idiomaticOmar Akkila2017-07-071-31/+29
| | | | | | | | | | | | Clean up HTMLImageElement::handle_event Area::hit_test now uses a reference instead of taking ownership Fix trailing whitespace Unalign => in match Fix Area::hit_test tests to reflect updated function signature
* Terminate current load blocker before reassignmentEllen Marie Dash2017-06-151-0/+1
| | | | Fixes #17319.
* Bump euclid to 0.14.Nicolas Silva2017-06-141-1/+1
|
* fix double borrowing of image requestGregory Terzian2017-06-011-3/+1
|
* improve spec compliance of update the image dataGregory Terzian2017-05-251-98/+384
|
* Use the origin of the actual image response when determining if a canvas is ↵SendilKumar N2017-05-191-3/+16
| | | | origin clean.
* 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
|/
* Auto merge of #16063 - methyl:image-usemap-panics, r=noxbors-servo2017-04-121-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid panics for empty or multibyte image usemap <!-- Please describe your changes on the following line: --> Some check were added to make sure we can call `split_at` with no risk of panics (when value is empty or the first char is multibyte). --- <!-- 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 #15883 (github issue number if applicable). - [x] There are tests for these changes <!-- 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/16063) <!-- Reviewable:end -->
| * Avoid panics for empty or multibyte image usemapLucjan Suski2017-03-211-0/+5
| |
* | making image element areas good at finding areasSendilKumar N2017-04-041-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | linting errors replaced with map fixes comments moving to document added test cases linting and updating manifest changing test cases linting fixes manifest update linting fixes splitting the test cases into two
* | Move image cache implementation to the net crateFernando Jiménez Moreno2017-03-271-3/+3
| |
* | Make image cache per-document rather than globalFernando Jiménez Moreno2017-03-271-11/+12
|/
* Implement the form owner conceptMukilan Thiyagarajan2017-03-151-1/+22
|
* Auto merge of #15882 - ak1t0:clean-up-htmlimageelement, r=Ms2gerbors-servo2017-03-131-16/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up HTMLImageElement::areas <!-- 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 #15835 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because github issue says no tests needed. <!-- 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/15882) <!-- Reviewable:end -->
| * Clean up HTMLImageElement::areasak1t02017-03-131-16/+9
| |
* | Change while loop in HTMLImageElement::handle_event to for loopHugh Gallagher2017-03-101-8/+9
|/ | | | Remove trailing whitespace
* Auto merge of #15771 - jdm:img-panic, r=noxbors-servo2017-03-081-26/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve behaviour of image elements that perform multiple requests This addresses cases where image elements end up making multiple requests, as well as makes the element respond to additional relevant mutations that trigger updating the image data. --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #15709 (github issue number if applicable). - [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/15771) <!-- Reviewable:end -->
| * Avoid marking image element as complete before its image data is available.Josh Matthews2017-03-071-1/+3
| |
| * Initiate a new image request when an image element's adopting steps are run.Josh Matthews2017-03-011-22/+20
| | | | | | | | | | | | Remove the redundant tracked loads for the underlying image request; the load blockers present in the ImageRequest structure perform the same duty with better accuracy.
| * Ignore image cache updates for image requests that have been aborted.Josh Matthews2017-02-281-3/+16
| |
* | Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|/
* Split HTMLImageElement's loading code into smaller pieces with fewer runnables.Josh Matthews2017-02-221-145/+133
|
* Send response for image requests progressively to image cache.Josh Matthews2017-02-221-21/+28
|
* Avoid dropping image requests on the ground from non-script-initiated reflow.Josh Matthews2017-02-221-2/+4
|
* Make script thread initiate requests for images needed by layout.Josh Matthews2017-02-221-12/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In support of this goal, the layout thread collects information about CSS images that are missing image data and hands it off to the script thread after layout completes. The script thread stores a list of nodes that will need to be reflowed after the associated network request is complete. The script thread ensures that the nodes are not GCed while a request is ongoing, which the layout thread is incapable of guaranteeing. The image cache's API has also been redesigned in support of this work. No network requests are made by the new image cache, since it does not possess the document-specific information necessary to initiate them. Instead, there is now a single, synchronous query operation that optionally reserves a slot when a cache entry for a URL cannot be found. This reserved slot is then the responsibility of the queryer to populate with the contents of the network response for the URL once it is complete. Any subsequent queries for the same URL will be informed that the response is pending until that occurs. The changes to layout also remove the synchronous image loading code path, which means that reftests now test the same code that non-test binaries execute. The decision to take a screenshot now considers whether there are any outstanding image requests for layout in order to avoid intermittent failures in reftests that use CSS images.
* script: Properly implement the image width and height getter.Emilio Cobos Álvarez2017-01-181-4/+8
| | | | | | | | | | | Per https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-width: The IDL attributes width and height must return the rendered width and height of the image, in CSS pixels, if the image is being rendered, and is being rendered to a visual medium; or else the density-corrected intrinsic width and height of the image, in CSS pixels, if the image has intrinsic dimensions and is available but not being rendered to a visual medium; or else 0, if the image is not available or does not have intrinsic dimensions.
* script: Rename bounding_content_box to bounding_content_box_or_zero.Emilio Cobos Álvarez2017-01-181-2/+2
| | | | And make bounding_content_box preserve whether the element is rendered.
* Handle crossorigin in link and refactor crossorigin handlingmrnayak2017-01-131-2/+8
| | | | | | | | 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