Commit graph

3197 commits

Author SHA1 Message Date
Nick Fitzgerald
d28c9a1588 Implement removeAttributeNode
This commit implement removeAttributeNode, as described here:
https://dom.spec.whatwg.org/#dom-element-removeattributenode

See also #8724 and #8068.
2016-02-26 21:18:24 +01:00
Anthony Ramine
b8ae5897f1 Implement Element.getAttributeNames 2016-02-26 19:15:11 +01:00
Josh Matthews
f9d197888e Enable flexbox for flexbox tests. 2016-02-26 11:45:08 -05:00
Anthony Ramine
329a5b0c95 Remove a fat arrow from /dom/nodes/attributes.html 2016-02-26 17:18:16 +01:00
Chandler Abraham
c375ad5e95 disallow restricted XMLHttpRequest header prefixes 2016-02-26 11:04:33 -05:00
João Oliveira
b60d668908 use return value of invoking event handlers to cancel the event 2016-02-26 10:17:57 -05:00
Ms2ger
de119adcc2 Update web-platform-tests to revision efa05bfb3b338ef988f3ebf4523198512a248a99 2016-02-26 11:10:34 +01:00
Ms2ger
070d3ffa54 Include UpdateCheckout in SyncToUpstreamRunner.
This is necessary to support syncing from a clean tree.
2016-02-26 11:07:47 +01:00
bors-servo
26b40afe23 Auto merge of #9757 - jdm:websocket-errors-rebase, r=jdm
Trigger WebSocket error event

Trigger a WebSocket error after receiving an invalid message from the server. Rebased from #8868. Fixes #7861.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9757)
<!-- Reviewable:end -->
2016-02-26 14:14:06 +05:30
Sam Gibson
4f736e6f7c Trigger WebSocket error event
Trigger a WebSocket error after receiving an invalid message from the server
2016-02-26 09:43:12 +01:00
Greg Guthe
e6c31e305d Get input value IDL attribute matching spec
Refs: https://github.com/servo/servo/issues/9455
2016-02-25 18:59:34 -05:00
bors-servo
32c97b6c8d Auto merge of #9631 - jongiddy:remove-extra-mask-byte, r=jdm
Validate MIME pattern checking

The MIME detector for a HTML file contains an additional byte in the mask.  While it doesn't hurt, it is not used in the byte matching code (since it is zipped with the `pattern` iterator).

I'm not clear how to test this within the `servo` code. The fix doesn't change any externally visible behavior. A test to validate the `ByteMatcher` structures would require the private ByteMatcher structures to be visible to the test. I could use a sub-module, as described at https://doc.rust-lang.org/book/testing.html#the-tests-module but this pattern doesn't appear anywhere else in the `servo` code.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9631)
<!-- Reviewable:end -->
2016-02-26 02:57:44 +05:30
bors-servo
6d8c018f6b Auto merge of #9039 - askalski:tests_to_http_loader, r=jdm
added tests to http_loader, veryfing if redirects use correct cookies

this is second PR, following https://github.com/servo/servo/pull/7617 .

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9039)
<!-- Reviewable:end -->
2016-02-26 02:04:01 +05:30
Eli Friedman
7b671d13a0 Use presentation hints correctly for the dimensions of <img>.
Mostly straightforward; includes some extra fixes to make `<canvas>`
work the same way as `<img>` for reflow.
2016-02-25 14:04:06 -05:00
Anthony Ramine
1559f5a39f Lazily define interface objects on globals (fixes #6419) 2016-02-25 15:56:47 +01:00
bors-servo
42f1712846 Auto merge of #9740 - paulrouget:mozbrowserconnected, r=jdm
Support Browser API event mozbrowserconnected

Fixes https://github.com/servo/servo/issues/9382

This new event is not yet documented. If this lands, I will add documentation to MDN.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9740)
<!-- Reviewable:end -->
2016-02-25 15:56:24 +05:30
Paul Rouget
3ecc907767 Support Browser API event mozbrowserconnected 2016-02-24 18:45:07 +01:00
Anthony Ramine
50af73d1a2 Bump string_cache to 0.2.10 2016-02-24 16:47:10 +01:00
bors-servo
438b3a444b Auto merge of #9722 - mbrubeck:slow-selector, r=nox
Dirty elements whose selectors are affected by sibling changes

This fixes incremental layout of nodes that match pseudo-class selectors such as :first-child, :nth-child, :last-child, :first-of-type, etc.  Fixes #8191 and other intermittent layout bugs.

This code is based on the following flags from Gecko:
https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134

Depends on servo/rust-selectors#71. r? @SimonSapin

There are a couple of TODO items in this commit, but I'd appreciate feedback on the general approach before I finish it up.  (Also, if someone who knows more than I do could give some advice about atomic orderings...)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9722)
<!-- Reviewable:end -->
2016-02-24 18:55:39 +05:30
Anthony Ramine
0455b0b301 Test event dispatching in documents without a browsing context 2016-02-24 12:50:58 +01:00
Ms2ger
62a9bebeef Update web-platform-tests to revision 7ed49cff4d031720f829c01df837ed7a09ad5c60 2016-02-24 11:04:43 +01:00
Matt Brubeck
973918967f Dirty elements whose selectors are affected by sibling changes
This fixes incremental layout of nodes that match pseudo-class selectors such
as :first-child, :nth-child, :last-child, :first-of-type, etc.

* Fixes #8191
* Fixes #9063
* Fixes #9303
* Fixes #9448

This code is based on the following flags from Gecko:
https://hg.mozilla.org/mozilla-central/file/e1cf617a1f28/dom/base/nsINode.h#l134
2016-02-23 17:31:38 -08:00
bors-servo
7192495e1a Auto merge of #9067 - nox:unenumerable-named-properties, r=jdm
Make NamedNodeMap's named properties unenumerable

https://dom.spec.whatwg.org/#dom-htmlcollection-item

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9067)
<!-- Reviewable:end -->
2016-02-23 22:58:30 +05:30
Anthony Ramine
7696a6bd20 Fix HTMLCollection::NamedItem 2016-02-23 17:23:54 +01:00
Anthony Ramine
7f36247d03 Support [LegacyUnenumerableNamedProperties] 2016-02-23 17:23:51 +01:00
Tim Neumann
43c46090cf add XHR::SetRequestHeader Step 3 unit test 2016-02-23 15:22:37 +01:00
Jonathan Giddy
480cb385fc Fix off-by-one error in MIME pattern matching
This adds a size to the test webp file, since the error fixed occurs
when the test object is the same length as the matched pattern, and
is not equal to the pattern.
2016-02-23 11:53:32 +00:00
Keith Yeung
1b41f4544e Disable some intermittents 2016-02-22 06:07:13 -05:00
Jonathan Giddy
208bae7f2e Add validation code for MIME checkers 2016-02-19 13:11:13 +00:00
bors-servo
aae6525f7d Auto merge of #9684 - danlrobertson:i9655, r=KiChjang
Add methods to move ByteStrings underlying bytes

Add methods to move the underlying `Vec<u8>` for `ByteString`.

I saw this as at least two methods. One to "move and replace with and empty Vec<u8> (`bytes`), and one to take ownership of the whole object (`own_bytes`). I typically also don't like adding methods with out unit tests. If you think they're unnecessary, just let me know.

As always, please let me know if you have any comments, critiques, or nits!

Fixes #9655

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9684)
<!-- Reviewable:end -->
2016-02-19 17:21:14 +05:30
liviuba
347f3c15b2 Add caching to document_response 2016-02-19 11:30:09 +02:00
bors-servo
96d185359d Auto merge of #9383 - KiChjang:xhr-cleanup, r=Ms2ger
Clean up XHR API

I've also added annotations about the steps that we're performing within each method.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9383)
<!-- Reviewable:end -->
2016-02-19 02:25:18 +05:30
Daniel Robertson
d23774d3d7 Add methods to move ByteStrings underlying bytes
Add methods to move the underlying Vec<u8> for ByteString.
2016-02-18 19:40:24 +00:00
bors-servo
ab07b06823 Auto merge of #9589 - glennw:webrender, r=pcwalton
Add WebRender integration to Servo.

WebRender is an experimental GPU accelerated rendering backend for Servo.

The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).

WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9589)
<!-- Reviewable:end -->
2016-02-19 00:54:06 +05:30
bors-servo
83be388f59 Auto merge of #9668 - glennw:inline-accuracy, r=pcwalton
Ensure when calculating font metrics that the total line height matches requested line height.

This fixes rounding accuracy issues that could result in layout producing results off by a small number of Au.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9668)
<!-- Reviewable:end -->
2016-02-18 17:48:15 +05:30
bors-servo
eee0d4efeb Auto merge of #9686 - nox:mv-logical_geometry, r=Ms2ger
Move util::logical_geometry to style

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9686)
<!-- Reviewable:end -->
2016-02-18 14:51:29 +05:30
Anthony Ramine
db8d502f41 Move util::logical_geometry to style 2016-02-18 10:17:13 +01:00
Glenn Watson
286130b051 Ensure when calculating font metrics that the total line height matches requested line height.
This fixes rounding accuracy issues that could result in layout producing results off by a small number of Au.
2016-02-18 14:16:13 +10:00
bors-servo
d8ffa3d0b8 Auto merge of #9529 - paulrouget:focusEvents, r=asajeffrey
Implement focus, blur, focusin and focusout events

Based on https://github.com/servo/servo/pull/7985

Fixes https://github.com/servo/servo/issues/7981

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9529)
<!-- Reviewable:end -->
2016-02-18 09:03:42 +05:30
Paul Rouget
c7195cb456 Implement focus and blur events 2016-02-18 03:49:31 +01:00
Glenn Watson
c0531c312f Add WebRender integration to Servo.
WebRender is an experimental GPU accelerated rendering backend for Servo.

The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).

WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
2016-02-18 10:35:29 +10:00
bors-servo
88afe38092 Auto merge of #9608 - nikkisquared:implement_http_redirect_fetch, r=jdm
Implementation of HTTP Redirect Fetch step

I've made a first draft of a complete implementation of HTTP Redirect Fetch, most of which is just refactored out of HTTP Fetch. I've also made some minor changes in a few other steps, all collected in the second commit, based on recent changes to the Fetch Standard. Since HTTP Redirect Fetch is so new, I figured now would be a fine time to make those other changes.

The biggest thing on my mind right now is how the spec says[1] "This algorithm will be used by HTML's "navigate" algorithm in addition to HTTP fetch above." This makes me think that this function, as well as HTTP Fetch, need to public, or at least have a public-facing function- since each Fetch function takes an Rc<Request>, which might be weird to require callers to supply.

[1] https://fetch.spec.whatwg.org/#http-redirect-fetch

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9608)
<!-- Reviewable:end -->
2016-02-18 05:54:51 +05:30
bors-servo
bc034845b7 Auto merge of #9662 - rebstar6:websocket_cookies, r=jdm
Add support for websocket cookies

Addresses both cookies in request and response. Resolves #9540.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9662)
<!-- Reviewable:end -->
2016-02-18 02:44:01 +05:30
Nikki
cf607606e0 implement http redirect fetch, and various Fetch Standard updates 2016-02-17 12:52:24 -07:00
Rebecca
cf6fd6dafe Add support for websocket request and response cookies
Also change expected behavior to pass for all in tests/wpt/web-platform-tests/websockets/cookies
2016-02-17 14:50:52 -05:00
Keith Yeung
066c5ea73a Clean up XHR API 2016-02-17 12:44:54 -05:00
bors-servo
61f09cce4e Auto merge of #9676 - nox:domexception, r=KiChjang
Support [ExceptionClass]

Use it on DOMException.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9676)
<!-- Reviewable:end -->
2016-02-17 18:51:47 +05:30
Anthony Ramine
c21a164396 Support [ExceptionClass]
Use it on DOMException.
2016-02-17 13:58:58 +01:00
bors-servo
8d63eff463 Auto merge of #9632 - peterjoel:issue_1716, r=KiChjang
Addresses Issue #1716. Indicated part of the document.

Fixes #1716.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9632)
<!-- Reviewable:end -->
2016-02-17 15:23:21 +05:30
bors-servo
949a2d3d11 Auto merge of #9667 - Tycheon:9472, r=KiChjang
CORS Preflight Logic Fix

Fix check to set flag if any header is not a simple header, rather than only if all
headers are simple headers.
Fix failing tests to allow merge in advance of @nikkibee's changes
as per @jdm's direction via IRC.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9667)
<!-- Reviewable:end -->
2016-02-17 12:56:05 +05:30