Commit graph

10 commits

Author SHA1 Message Date
Matt Brubeck
10478b4fa3 Stop using unstable slice_patterns feature 2017-05-01 14:19:00 -07:00
Anthony Ramine
c234bf92d0 Update rustc to 1.18.0-nightly (b0a4074c5 2017-04-26) 2017-04-26 17:34:34 +02:00
Simon Sapin
de01c59891 Upgrade to rustc 1.18.0-nightly (474f7a91e 2017-03-31) 2017-03-31 15:09:04 +02:00
bors-servo
f90fc2fa88 Auto merge of #15771 - jdm:img-panic, r=nox
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 -->
2017-03-08 04:28:58 -08:00
Josh Matthews
dc5335a21e Move checks for document completion to the end of the event loop.
This better reflects the text of the specification - rather than
queuing a task to dispatch the load evnet as soon as the document
loader is unblocked, we want to "spin the event loop until there
is nothing that delays the load event in the Document." Spinning
the event loop is a concept that requires running tasks
completely, hence we check the condition before returning to the
start of the event loop.
2017-03-07 14:02:42 +05:30
Anthony Ramine
7b334d84be Remove unused function match_ty_unwrap 2017-02-27 14:46:48 +01:00
Jefry Lagrange
ebcb15d6f2 Rewrite the ban-type lint in Python
Delete old rust ban lint and move tests to python tidy

Fix ban lint regex and fix test
2017-02-25 15:56:06 +01:00
Anthony Ramine
31e9d81c0f Make #[dom_struct] a proc_macro attribute 2017-02-24 01:50:51 +01:00
Josh Matthews
c890c9143c Make script thread initiate requests for images needed by layout.
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.
2017-02-22 14:19:35 -05:00
Anthony Ramine
3eed8a91a1 Move script lints to script_plugins
The plugins crate now just allows to hook into clippy from a single crate.
2017-02-16 18:37:14 +01:00