Commit graph

3197 commits

Author SHA1 Message Date
Ravi Shankar
16096f1a9c Added 'about:sslfail' and a reftest for SSL failure 2016-04-20 12:38:37 -04:00
Ravi Shankar
945a2c66e1 Updated the unit tests to include NetworkError 2016-04-20 12:38:36 -04:00
Ms2ger
df3297fd93 Disable tests for mutation events.
We have no intention of implementing them, so there's not much point in
running them.
2016-04-20 18:00:17 +02:00
bors-servo
8d988f20c1 Auto merge of #9968 - izgzhen:scroll, r=asajeffrey
Implement scroll, scrollLeft, scrollTop and friends, addressing issue #9650

This is a work in progress to solve https://github.com/servo/servo/issues/9650. Thanks a lot for helping the review.

- [x] scroll
- [x] scrollTo
- [x] scrollBy
- [x] scrollTop (setter and getter)
- [x] scrollLeft (setter and getter)

The setters will be implemented in another PR after this is merged.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9968)
<!-- Reviewable:end -->
2016-04-20 18:40:26 +05:30
Ms2ger
9a90a96cc0 Note the bug for Node::rootNode. 2016-04-20 11:28:22 +02:00
Ms2ger
df8998356b Update web-platform-tests to revision 20fa4a3a71ab7a2f75b4febbe2e98aeeaf022c2b 2016-04-20 11:28:21 +02:00
Zhen Zhang
11b12f677b element scroll setters 2016-04-20 08:29:17 +08:00
Nick Fitzgerald
35a5d6da15 Add unit tests skeleton for the time profiler
This commit adds a test crate for the time profiler to `tests/unit/profile`. The
only unit test contained in this crate is a smoke test that the time profiler
thread can be created and destroyed. It serves as a place for adding new tests
in the future.
2016-04-19 16:40:44 -07:00
bors-servo
3d4416e1b0 Auto merge of #10634 - amarant:10574-image-document-base, r=metajack
Issue #10574 Use the document base url in img

add a test with base path set to the resources path and an img with a cat and the reference directly to the image

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10634)
<!-- Reviewable:end -->
2016-04-19 20:51:18 +05:30
bors-servo
a7c885706e Auto merge of #10592 - canaltinova:stylesheet_with_base, r=Ms2ger
Use the document base url when resolving stylesheets

Use the document base url when resolving stylesheets. Fixes #10575 .

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10592)
<!-- Reviewable:end -->
2016-04-19 17:20:32 +05:30
Emilio Cobos Álvarez
5eb59935e3
webgl: Add test for Texture2d's ArrayBufferView overload 2016-04-19 13:25:43 +02:00
Emilio Cobos Álvarez
87e112dea7
webgl: Implement the pending texImage2D overload, and add more validation
This is a large-ish refactor of the Texture2D code, but it should be
easier to read and of course more correct.

I tried to annotate every error condition with a spec paragraph.
2016-04-19 13:25:40 +02:00
bors-servo
407c43fade Auto merge of #10695 - frewsxcv:no-clone, r=KiChjang
Avoid unnecessary `net_traits::LoadData` clone.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10695)
<!-- Reviewable:end -->
2016-04-19 11:10:18 +05:30
Zhen Zhang
fefdaf76de Implement ScrollTop and ScrollLeft getters:
Add new compositor message to get scroll_offset;
Add new layout query for computed value of overflow-x/y;
Implement layer_id method for ThreadSafeLayoutNode;
Add new layout query for layer_id;
Implement script interface for getting scrollTop and scrollLeft, as well as relavant helper functions.
2016-04-19 12:27:35 +08:00
bors-servo
82b952c03f Auto merge of #10652 - dzbarsky:reserved, r=dzbarsky
Prevent use of reserved names in BindAttribLocation

(Depend on the WebGL tests landing)

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10652)
<!-- Reviewable:end -->
2016-04-19 09:46:24 +05:30
Corey Farwell
7500307e80 Avoid unnecessary net_traits::LoadData clone. 2016-04-18 22:53:28 -04:00
bors-servo
80662f1e4e Auto merge of #10672 - frewsxcv:net-network, r=KiChjang
Improvements to network preferences, HTTP redirection limiting.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10672)
<!-- Reviewable:end -->
2016-04-19 04:06:25 +05:30
bors-servo
19a5a9ad08 Auto merge of #10508 - g-k:insert-row, r=KiChjang
Insert row

Fixes #9269

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10508)
<!-- Reviewable:end -->
2016-04-19 01:38:38 +05:30
Greg Guthe
1d59d8784d Implement HTMLTableElement.insertRow()
refs: https://github.com/servo/servo/issues/9269

and update HTMLTableElement.webidl

insertRow returns an HTMLTableRowElement and throws an IndexSizeError
sortable and stopSorting were removed.
2016-04-18 15:18:16 -04:00
Nazım Can Altınova
ffd7960ad8 Use the document base url when resolving stylesheets 2016-04-18 19:54:37 +03:00
Yoav Alon
36eb25161d added test for https://github.com/servo/servo/issues/10548 2016-04-18 03:34:25 +03:00
Corey Farwell
da0adeb0ac Verify number of redirects when we reach limit. 2016-04-17 20:14:08 -04:00
Corey Farwell
07209c75db Rename net.mime.sniff pref to network.mime.sniff.
Gecko uses the `network` prefix for network related items. Might be good
to mirror that here.
2016-04-17 16:15:24 -04:00
David Zbarsky
a67a744057 Prevent use of reserved names in BindAttribLocation 2016-04-17 11:52:40 -07:00
bors-servo
317629d86e Auto merge of #10666 - frewsxcv:hsts-cleanup, r=SimonSapin
Refactor, cleanup HSTS related code.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10666)
<!-- Reviewable:end -->
2016-04-17 23:50:13 +05:30
Corey Farwell
08fc002f41 Rename 'HSTS*' structures to 'Hsts*'.
"In CamelCase, acronyms count as one word: use Uuid rather than UUID."

-- https://doc.rust-lang.org/style/style/naming/README.html
2016-04-17 14:12:28 -04:00
Corey Farwell
faa3d8724b Refactor Servo HSTS file loading, hard-fail if can't load.
Use constructor pattern instead of separate utility function.

Instead of allowing the Servo HSTS file loading to silently fail, we
should expect that file to always exist and be formatted correctly.
2016-04-17 14:12:07 -04:00
Corey Farwell
d3b8b6472b Move UTF8 bytes handling into generic constructor.
Separate from Servo specific logic.
2016-04-17 12:39:50 -04:00
Corey Farwell
52b3226d54 Rename constructor to match convention, add doc comment. 2016-04-17 12:38:29 -04:00
bors-servo
b00c2740e3 Auto merge of #10612 - autrilla:textdir, r=emilio
Implement HTMLTextArea.setSelectionRange (continuation of #10007)

Tests on `tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html` all pass and the other tests don't panic due to double borrows anymore.

cc: @KiChjang

Fixes #9994.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10612)
<!-- Reviewable:end -->
2016-04-17 21:58:31 +05:30
Alberto Corona
5e863f2eb8
Implement HTMLTextArea.setSelectionRange 2016-04-17 17:27:26 +02:00
bors-servo
fd994c457e Auto merge of #10655 - mbrubeck:merge-margin, r=SimonSapin
Update margins when merging inline fragments

Fixes #10633.  r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10655)
<!-- Reviewable:end -->
2016-04-17 08:18:04 +05:30
bors-servo
15e76eb6e2 Auto merge of #10643 - mbrubeck:empty-span-border, r=pcwalton
Fix handling of borders and padding for empty/stripped inline flows

This forces fragment generation for empty inline flows, if they have borders or padding.  Fixes #10533 and #2001.  Also includes fixes for other bugs that were uncovered by this change; see the individual commit messages for detailed explanations.  r? @pcwalton

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10643)
<!-- Reviewable:end -->
2016-04-17 03:31:12 +05:30
Matt Brubeck
782e713472 Update margins when merging inline fragments
Fixes #10633.
2016-04-16 14:13:16 -07:00
Matt Brubeck
1695d14a9e Don't strip out all empty fragments
Empty fragments may need to be layed out to draw borders, padding/background,
and insertion points.  (Fragments that consist of discardable whitespace and
control characters, on the other hand, can still be discarded.)

This ends up preserving some useless empty fragments.  It's possible we could
avoid this by storing some sort of flag on "important" empty fragments, so we
can discard the rest.
2016-04-16 13:13:07 -07:00
bors-servo
a373bd10cc Auto merge of #10373 - dzbarsky:enable_webgl, r=dzbarsky
Enable WebGL tests

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10373)
<!-- Reviewable:end -->
2016-04-17 00:34:23 +05:30
David Zbarsky
1ee11ec669 Enable WebGL tests 2016-04-16 11:43:57 -07:00
Rizky Luthfianto
5ad312cb8e Fix Document#elementFromPoint no viewport available test 2016-04-16 17:16:27 +07:00
bors-servo
86778a0d71 Auto merge of #10644 - pcwalton:absolute-ib-split, r=mbrubeck
layout: Make absolutely-positioned blocks not generate {ib} splits.

Improves YouTube.

Closes #10642.

r? @mbrubeck

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10644)
<!-- Reviewable:end -->
2016-04-16 06:58:47 +05:30
Patrick Walton
e840c7aaa0 layout: Make absolutely-positioned blocks not generate {ib} splits.
Improves YouTube.

Closes #10642.
2016-04-15 17:27:25 -07:00
Michael Howell
2ecadc913a Add reftest for #10625 2016-04-15 16:01:32 -07:00
Arnaud Marant
77f52d2eab Issue #10574 Use the document base url in img
add a test with base path set to the resources path and an img with a cat and the reference directly to the image
2016-04-15 21:37:25 +02:00
Rizky Luthfianto
5a3ce597d3 Fix Document#elementsFromPoint no viewport available test 2016-04-16 01:05:32 +07:00
bors-servo
eb78e21fbe Auto merge of #10555 - jdm:http_response_refactor, r=ms2ger
Remove unnecessary indirection in HTTP unit tests

Many of the HTTP unit tests use a custom request factory as well as a custom request that contained test logic. This is unnecessarily convoluted, and exists solely because the complete set of headers was unavailable until the request body was sent. These patches restructure the header manipulations so that the headers are available when the request object is created, allowing the test logic to move into the test factories, and enabling the deletion of almost all of the test request types.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10555)
<!-- Reviewable:end -->
2016-04-15 12:44:59 +05:30
Josh Matthews
43369fa897 Rename create_with_headers to create. 2016-04-15 01:46:04 -04:00
Josh Matthews
a761f2bed4 Remove unused header manipulation facilities. 2016-04-15 01:46:03 -04:00
Josh Matthews
4cb7dfbc59 Convert remaining factories that don't make use of headers. 2016-04-15 01:46:02 -04:00
Josh Matthews
d1b07673b8 Convert AssertMustNotIncludeHeadersRequestFactory. 2016-04-15 01:46:01 -04:00
Josh Matthews
f712ddb0db Convert AssertAuthHeaderRequestFactory. 2016-04-15 01:46:00 -04:00
Josh Matthews
36de07bfdf Convert AssertMustIncludeHeadersRequestFactory. 2016-04-15 01:45:58 -04:00