Commit graph

23863 commits

Author SHA1 Message Date
Josh Matthews
db79dfb3aa Verify that aborted image requests do not cause extraneous load events. 2017-03-07 14:02:45 +05:30
Josh Matthews
330e222fe8 Test adopting images into documents with different base URLs. 2017-03-07 14:02:43 +05:30
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
Josh Matthews
2bd02fe423 Initiate a new image request when an image element's adopting steps are run.
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.
2017-03-01 06:00:42 -05:00
Josh Matthews
208f97420a Ignore image cache updates for image requests that have been aborted. 2017-02-28 10:25:09 -05:00
Josh Matthews
f0f43ad9b0 Remove mutability requirement from fetch_async_background. 2017-02-28 10:23:23 -05:00
bors-servo
a780f6f28c Auto merge of #15696 - jdm:no-http-pool, r=emilio
Do not pool HTTP connections.

HTTP connection pooling triggers consistent failures in #14620. Let's disable it until there's more time to solve the underlying problem in #15694.

---
- [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/15696)
<!-- Reviewable:end -->
2017-02-23 03:55:45 -08:00
bors-servo
65624dbfc2 Auto merge of #15692 - servo:moz-table-border-nonzero, r=upsuper
Stylo: add :-moz-table-border-nonzero pseudo-class.

<!-- Please describe your changes on the following line: -->

https://bugzilla.mozilla.org/show_bug.cgi?id=1340696

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/15692)
<!-- Reviewable:end -->
2017-02-22 23:41:26 -08:00
Simon Sapin
1a30c98f5f Stylo: add :-moz-table-border-nonzero pseudo-class. 2017-02-23 08:40:51 +01:00
bors-servo
b34fdf6234 Auto merge of #15690 - vwvww:issue_14898, r=Wafflespeanut
Add 'use statements with extraneous spaces' tidy check

Add 'use statements with extraneous spaces' tidy check

I added simple check routine for 'use statements with extraneous
spaces' and codes that breaks the check routine in rust_tidy.rs.

* Added a code that using 'use statements with extraneous spaces' code
  in rust_tidy.rs
* Added assertion code in test_tidy.py.
* check_rust function in tidy.py now recognizes the simple case in
  the 'use statements with extraneous spaces'.
* Ran tidy check on rust code and modified a
  code(tests/unit/style/parsing/inherited_text.rs) that is not passing
  on this new tidy check.

TODO: this code has to be refactored to support more general cases, such as tab or newline.

- [X] `./mach build -d` does not report any errors
- [X] ./mach test-tidy does not report any errors
- [X] These changes fix #14898 (github issue number if applicable).
- [X] These changes do not require tests because ./mach test-tidy itself is the test for the code.

<!-- 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/15690)
<!-- Reviewable:end -->
2017-02-22 21:19:08 -08:00
bors-servo
854d720b21 Auto merge of #14962 - jdm:image_script_load, r=Ms2ger,glennw,emilio
Remove network requests from image cache thread

The design of initiating network requests from the image cache thread was simple, but it makes it difficult to implement image loading that conforms to the HTML specification. These changes make the implementation of HTMLImageElement responsible for network requests for `<img>` elements, and CSS-based images (background-image, bullets, etc.) are requested by the script thread to ensure that the layout thread does not attempt to retain unsafe pointers to DOM nodes during asynchronous operations.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #7708
- [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/14962)
<!-- Reviewable:end -->
2017-02-22 17:50:48 -08:00
Josh Matthews
5af2603ec4 Allow async webgl conformance tests to complete. 2017-02-22 19:17:38 -05:00
bors-servo
af292c4a71 Auto merge of #15682 - upsuper:arc-types, r=Manishearth
Simplify defining arc ffi types

r? @Manishearth

I don't have a good sense for creating syntax... so if you have any suggestion for the syntax of `impl_arc_ffi` macro, it would be appreciated.

<!-- 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/15682)
<!-- Reviewable:end -->
2017-02-22 15:58:35 -08:00
Xidorn Quan
0cac276891 Simplify defining arc ffi types 2017-02-23 10:22:39 +11:00
Josh Matthews
3258cffcda Do not pool HTTP connections. 2017-02-22 17:16:28 -05:00
Josh Matthews
b174a684d1 Add useful debug information to image cache. 2017-02-22 14:19:35 -05:00
Josh Matthews
646d48a2a1 Split HTMLImageElement's loading code into smaller pieces with fewer runnables. 2017-02-22 14:19:35 -05:00
Josh Matthews
b363371339 Extract layout image request into separate file. Do not block the document load event. 2017-02-22 14:19:35 -05:00
Josh Matthews
0d2ec852ac Send response for image requests progressively to image cache. 2017-02-22 14:19:35 -05:00
Josh Matthews
21118f0a8a Synchronously decode images if decoded bytes are requested after the full response is received. 2017-02-22 14:19:35 -05:00
Josh Matthews
e0837134ff Remove synchronous forks of drawImage tests, and enable proper asynchronous drawImage tests. 2017-02-22 14:19:35 -05:00
Josh Matthews
980eb5ac33 Avoid dropping image requests on the ground from non-script-initiated reflow. 2017-02-22 14:19:35 -05:00
Josh Matthews
541ecbfe21 Fetch complete images from the cache for canvas operations. 2017-02-22 14:19:35 -05: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
bors-servo
800a1fde3f Auto merge of #15681 - glennw:update-wr-box-shadows, r=Wafflespeanut
Update WR (inset box shadow fix, border-image support).

I have a follow up PR for Servo that uses the new border-image
APIs, but I'll land that separately, so that we don't delay
landing the WR update itself.

<!-- 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/15681)
<!-- Reviewable:end -->
2017-02-22 10:32:52 -08:00
bors-servo
78e8c31a4d Auto merge of #15438 - asajeffrey:url-serializable-origin, r=jdm
Add ImmutableOrigin to allow for serializing origins

<!-- Please describe your changes on the following line: -->

This PR adds a serializable type `ImmutableOrigin` and a non-serializable type `MutableOrigin`. The immutable type represents an origin with `null` domain, and the mutable type represents an origin with a mutable domain. This separation is needed for implementing setting `document.domain`.

---
<!-- 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 #14892.
- [X] These changes do not require tests because it's a refactoring which will enable other features.

<!-- 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/15438)
<!-- Reviewable:end -->
2017-02-22 09:46:27 -08:00
Connor Brewster
bfd7b950ad Add ImmutableOrigin to allow for serializing origins 2017-02-22 11:11:59 -06:00
bors-servo
2bfea912dc Auto merge of #15458 - connorimes:hbs-0.4, r=emilio
Update heartbeats-simple dependencies for bug fixes

<!-- Please describe your changes on the following line: -->

Updates heartbeats-simple dependencies for some bug fixes in native code (primarily for Windows).
Now we create heartbeats as needed so we don't have to maintain a hardcoded list which keeps getting out of sync.

---
<!-- 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 #15471 (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because it updates a dependency and performs some code maintenance.

<!-- 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/15458)
<!-- Reviewable:end -->
2017-02-22 09:05:37 -08:00
vwvww
ccb14abd12 Add 'use statements with extraneous spaces' tidy check
Add 'use statements with extraneous spaces' tidy check

I added simple check routine for 'use statements with extraneous
spaces' and codes that breaks the check routine in rust_tidy.rs.

* Added a code that using 'use statements with extraneous spaces' code
  in rust_tidy.rs
* Added assertion code in test_tidy.py.
* check_rust function in tidy.py now recognizes the simple case in
  the 'use statements with extraneous spaces'.
* Ran tidy check on rust code and modified a
  code(tests/unit/style/parsing/inherited_text.rs) that is not passing
  on this new tidy check.

TODO: this code has to be refactored to support more general cases.

- [X] ./mach test-tidy does not report any errors
- [X] These changes fix #14898 (github issue number if applicable).
2017-02-23 01:29:46 +09:00
bors-servo
4f7e422054 Auto merge of #15683 - hiikezoe:fill-missing-property-in-keyframe, r=emilio
Fill missing property in keyframe

<!-- Please describe your changes on the following line: -->
This is a PR of https://bugzilla.mozilla.org/show_bug.cgi?id=1340961
All patches has been reviewed by @emilio.

Thanks!

---
<!-- 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
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [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/15683)
<!-- Reviewable:end -->
2017-02-22 08:17:18 -08:00
bors-servo
469ed934e7 Auto merge of #15608 - prampey:wpt-link, r=SimonSapin
Added test documentation link to wpt's README.md

<!-- Please describe your changes on the following line: -->
For the sake of convenience, the documentation for writing web platform tests can be provided in the wpt README file.

---
<!-- 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 #15603  (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because of documentation change.

<!-- 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/15608)
<!-- Reviewable:end -->
2017-02-22 07:07:28 -08:00
bors-servo
7adc79047d Auto merge of #15665 - UnICorN21:ds_store, r=SimonSapin
fixed an issue related with .DS_Store

<!-- 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 #15581.

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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/15665)
<!-- Reviewable:end -->
2017-02-22 06:12:52 -08:00
bors-servo
deabf96184 Auto merge of #15686 - nox:serde-cookies, r=Ms2ger
Use serde_json to persist cookies in the net crate

<!-- 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/15686)
<!-- Reviewable:end -->
2017-02-22 05:03:39 -08:00
Huxley
5e929de224 fixed an issue related with .DS_Store 2017-02-22 20:57:58 +08:00
Anthony Ramine
fd9cd33892 Use serde_json to persist cookies in the net crate 2017-02-22 12:33:10 +01:00
Hiroyuki Ikezoe
396db281e3 Fill computed property values where the propery is missing in initial and final keyframes.
@keyframes anim {
  from { opacity: 0; transform: none; }
  to { transform: none; }
}

In above case, we have to add opacity property and value in the 'to' keyframe.
2017-02-22 19:04:50 +09:00
Hiroyuki Ikezoe
501edfdbdb Get all animated properties in *all* keyframes.
@keyframes anim {
  from { transform: none; }
  to { opacity: 0; transform: none; }
}

In above case, we have to add opacity property and value in the 'from' keyframe.
2017-02-22 19:04:49 +09:00
Hiroyuki Ikezoe
279a50fb74 Make PropertyFiledBit usable for TransitionProperty. 2017-02-22 19:04:43 +09:00
Glenn Watson
c4a972aa7b Update WR (inset box shadow fix, border-image support).
I have a follow up PR for Servo that uses the new border-image
APIs, but I'll land that separately, so that we don't delay
landing the WR update itself.
2017-02-22 16:12:21 +10:00
bors-servo
03893e25cc Auto merge of #15680 - glennw:zoom-wip, r=mbrubeck
Rename ScreenPx to DeviceIndependentPixel.

<!-- 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/15680)
<!-- Reviewable:end -->
2017-02-21 20:45:20 -08:00
Glenn Watson
0af27a3434 Rename ScreenPx to DeviceIndependentPixel. 2017-02-22 14:37:24 +10:00
bors-servo
07debf5dc0 Auto merge of #15669 - upsuper:bindgen-arc-type, r=heycam
Read ServoArcTypeList.h for list of arc types

r? @heycam

<!-- 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/15669)
<!-- Reviewable:end -->
2017-02-21 18:56:41 -08:00
Xidorn Quan
c2de28de1a Read ServoArcTypeList.h for list of arc types 2017-02-22 11:51:44 +11:00
bors-servo
ec5ed8edfd Auto merge of #15676 - mbrubeck:always-be-updating, r=SimonSapin
Update thread_local, serde_json, syn, offscreen_gl_context, quote

This adds one new crate the the dependency graph, `synom`, which is part of the `syn` repo and is dual-licensed MIT/Apache-2.0.

<!-- 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/15676)
<!-- Reviewable:end -->
2017-02-21 10:53:38 -08:00
Matt Brubeck
c3306e0448 Update thread_local, serde_json, syn, offscreen_gl_context, quote 2017-02-21 10:14:09 -08:00
bors-servo
ed731c80d7 Auto merge of #15675 - Manishearth:resync, r=mbrubeck
Resync bindings, use StyleShapeSource for clip-path

The bindings are getting harder to rebase over since the checked-in bindings differ from the generated ones.

Also includes https://bugzilla.mozilla.org/show_bug.cgi?id=1339314

<!-- 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/15675)
<!-- Reviewable:end -->
2017-02-21 10:05:01 -08:00
Manish Goregaokar
c49c5ec224 Update clip-path glue to use StyleShapeSource 2017-02-21 09:44:47 -08:00
Manish Goregaokar
a68f656e62 Resync bindings 2017-02-21 09:44:17 -08:00
bors-servo
a2e51ce1a1 Auto merge of #15674 - asajeffrey:test-wpt-html-editing-dir-ini, r=jgraham
Support running ./mach test-wpt /html.

<!-- Please describe your changes on the following line: -->

At the moment, running `./mach test-wpt /html` fails, because it runs the tests blocked by `include.ini`. This PR replaces the `include.ini` entry by `__dir__.ini` files in each subdirectory of `html/editing` apart from `html/editing/activation`.

---
<!-- 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 do not require tests because we don't watch the watchmen

<!-- 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/15674)
<!-- Reviewable:end -->
2017-02-21 09:06:16 -08:00
Alan Jeffrey
8496b021e9 Support running ./mach test-wpt /html. 2017-02-21 10:52:21 -06:00