Background information: The HTML5 specification defines a surprisingly complex model for loading images in a web page. Servo's current implementation is straightforward, but non-compliant in a number of important ways. The goal of this project is to implement image loading behaviour that is both more correct and easy to verify against the text of the specification.
Initial steps:
tests/html/about-mozilla.html
HTMLImageElement
type in htmlimageelement.rs
. These should subsume the existing fields in HTMLImageElement
that are used for storing the image's properties, and the fields of the current request should be used instead.make_enumerated_getter
/make_setter
macros and uncommenting the attribute in HTMLImageElement.webidl
HTMLImageElement.webidl
./mach test-wpt tests/wpt/web-platform-tests/html/dom/interfaces.html
and adjust the test result expectations according to the documentation.Subsequent steps:
htmlimageelement.rs
that instructs the image cache to fetch a URL with code that directly performs a network request (see HTMLScriptElement::prepare
for an example that uses the NetworkListener
helper and Document::load_async
). The result should be sent to the image cache using the newly-added command.parse_a_srcset_attribute
function in htmlimageelement.rs
. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs
(./mach test-unit -p script/dom/htmlimageelement
).parse_a_sizes_attribute
function in htmlimageelement.rs
. Write unit tests demonstrating correctness in tests/unit/script/htmlimageelement.rs
.source set
and image source
update_the_source_set
function in htmlimageelement.rs
select_an_image_source
function in htmlimageelement.rs
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3