Commit graph

2677 commits

Author SHA1 Message Date
bors-servo
7438bc0425 Auto merge of #8909 - cnaj:msg_refactoring, r=jdm
Move ScriptMsg to script_traits crate, Fixes #8833

Review of documentation that was missing needed.

Fixes #8833.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8909)
<!-- Reviewable:end -->
2015-12-10 11:24:44 +05:30
Jitendra Jain
88e6504e0a Implement responseXML API and document response type for XHR 2015-12-09 17:48:04 -05:00
Tomas Cernaj
5507be2653 Move ScriptMsg from msg crate into script_traits 2015-12-09 20:50:11 +01:00
bors-servo
951ab565d1 Auto merge of #8867 - nfallen:6638-websocket_loader, r=jdm
Move websocket creation to resource task

This is a pull request for part of https://github.com/servo/servo/issues/6638

It includes the following changes:
-The websocket networking code (ie. making a connection, receiving data, and sending data) has been extracted out of components/script/dom/websocket.rs and into the new file components/net/websocket_loader.rs.
-websocket.rs now communicates with the resource task (components/net/resource_task.rs) to instruct it to initiate a new websocket connection
- websocket_loader.rs now provides an API sent over an IPCChannel that allows websocket.rs to receive feedback about this process and to subsequently send and receive data

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8867)
<!-- Reviewable:end -->
2015-12-08 20:40:50 +05:30
Nova Fallen
e8c8277f34 move websocket creation to resource task 2015-12-08 02:04:40 -05:00
bors-servo
59029325c0 Auto merge of #8827 - jdm:debugmozjscrash, r=Ms2ger
Avoid a null-dereference using debug mozjs builds. This matches the e…

…quivalent code upstream in Gecko.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8827)
<!-- Reviewable:end -->
2015-12-08 12:11:53 +05:30
bors-servo
9cccd34bc4 Auto merge of #8876 - ecoal95:webgl-nits, r=jdm
WebGL nits

This improves support for running our triangle test (see: https://github.com/servo/servo/pull/8831), and adds missing error in `BufferSubData`

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8876)
<!-- Reviewable:end -->
2015-12-08 03:56:52 +05:30
Josh Matthews
30d1ff6abc Avoid a null-dereference using debug mozjs builds. This matches the equivalent code upstream in Gecko. 2015-12-07 14:58:00 -05:00
bors-servo
02f4be9c9f Auto merge of #8862 - fstr:move_workerid, r=Ms2ger
Moved WorkerId type to devtools_traits

Fixes #8846.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8862)
<!-- Reviewable:end -->
2015-12-08 00:53:40 +05:30
Florian Strübe
b81f712ce1 Moved WorkerId type to devtools_traits 2015-12-07 20:11:26 +01:00
Emilio Cobos Álvarez
a14b605c8e webgl: Add correct error handling to BufferSubData
From the WebGL spec:

> If data is null then an INVALID_VALUE error is generated.
2015-12-07 18:03:36 +01:00
bors-servo
ef000a458a Auto merge of #8853 - KiChjang:generic-task-sources, r=jdm
Split fn script_chan into 5 different task channel fn

Partial #7959.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8853)
<!-- Reviewable:end -->
2015-12-07 07:46:10 +05:30
bors-servo
95e6b1d101 Auto merge of #8831 - simartin:ticket_6791, r=eefriedman
Issue #6791: Allow more array types in bufferData and bufferSubData.

Fix https://github.com/servo/servo/issues/6791

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8831)
<!-- Reviewable:end -->
2015-12-07 02:39:32 +05:30
Keith Yeung
8d90034d29 Split fn script_chan into 5 different task channel fn 2015-12-06 12:12:14 -08:00
Roman Klauke
bcc53edda4 move FocusType enum to the script crate
This commit moves the FocusType enum to the script crate and replaces
all usages with the new `usage`.

Fixes #8840
2015-12-06 15:39:45 +01:00
Simon Martin
fa555d0e2e Issue #6791: Allow more array types in bufferData and bufferSubData. 2015-12-06 15:28:59 +01:00
David Zbarsky
789a90a82f Implement IsPointInPath 2015-12-05 17:49:49 -08:00
Simon Sapin
0a8a2c299e Add link to issue for :visited 2015-12-05 21:36:13 +01:00
bors-servo
217a55a785 Auto merge of #8812 - jitendra29:support-withCredentials, r=jdm
M1504: Implement basic support for withCredentials API

The pull request includes the following task:

* Implemented basic network-level support by adding a member to LoadData that is used by http_loader.rs to conditionally exclude cookies from the HTTP request if the flag is false (default true)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8812)
<!-- Reviewable:end -->
2015-12-05 05:13:01 +05:30
ronak
d38a1a0d03 Create and invoke XML parser for XML documents. 2015-12-04 16:37:13 -05:00
Jigesh Mehta
ce3c9ff57c implement support for withCredentials 2015-12-04 16:34:30 -05:00
Josh Matthews
9d3b915cac Introduce abstraction over HTML and XML parsers for parser network listener. 2015-12-04 16:32:54 -05:00
jsharda
a840a23990 Prepare infrastructure for XML parser. 2015-12-04 16:32:53 -05:00
bors-servo
2cfcc26d9e Auto merge of #8788 - ecoal95:fix-webgl-texturing, r=jdm
webgl: Fix texturing

These two tiny changes were making WebGL textures not work.

It was not seen in our texturing test since it only used one texture,
we render to a texture by default, and that texture was bound to
`gl::TEXTURE_2D`.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8788)
<!-- Reviewable:end -->
2015-12-04 22:12:26 +05:30
bors-servo
9c26903472 Auto merge of #8805 - Ms2ger:drain_modified_elements, r=jdm
Simplify drain_modified_elements a bit.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8805)
<!-- Reviewable:end -->
2015-12-04 20:22:54 +05:30
Ms2ger
208c05f944 Fix warnings. 2015-12-04 10:31:19 +01:00
bors-servo
39a36a0098 Auto merge of #8818 - jdm:imagepanic, r=Manishearth
Make IPC image cache listener silently drop failures instead of catas…

…trophically panicking. Resolves #8817.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8818)
<!-- Reviewable:end -->
2015-12-04 12:58:43 +05:30
bors-servo
2bb34feb3e Auto merge of #8728 - dzbarsky:reset_bitmpa, r=dzbarsky
Reset canvas state when changing bitmap dimensions

Ran http://mxr.mozilla.org/servo/source/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-canvas-element/initial.reset.2dstate.html?force=1#88 to confirm that this code is being executed, but the test still fails because the font isn't implemented and the expando doesn't get reset.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8728)
<!-- Reviewable:end -->
2015-12-04 11:57:55 +05:30
Josh Matthews
5857b41a61 Make IPC image cache listener silently drop failures instead of catastrophically panicking. Resolves #8817. 2015-12-04 00:05:18 -05:00
bors-servo
261ce11297 Auto merge of #8810 - frewsxcv:webidl-spec-link, r=eefriedman
Fix broken WebIDL spec link

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8810)
<!-- Reviewable:end -->
2015-12-04 07:15:46 +05:30
Corey Farwell
47d8c879d9 Fix broken WebIDL spec link 2015-12-03 18:44:30 -05:00
bors-servo
bc62b5aadb Auto merge of #8785 - mbrubeck:fixed-hit-test, r=pcwalton
Add slow path for hit testing of iframe behind positioned content layer

Fixes browser.html blocker #8759. r? @pcwalton

This adds a slow path for cases where the compositor's layer-based hit testing is incorrect.  If the script task discovers that a mouse event should have been dispatched to an iframe, it bounces the event back to the constellation to be forwarded to the correct pipeline.

This isn't terribly slow (on the slow path, it adds one extra round-trip message between script and constellation), but if we want to optimize this better we could instead replace the compositor's layer hit testing with display list hit testing in the paint task.  This would be a more complicated change that I think we should save for a follow-up.

This only fixes mouse input for now.  A basically-identical change will be needed for touch-screen input, whether we stick with this approach or switch to the paint task.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8785)
<!-- Reviewable:end -->
2015-12-04 02:54:22 +05:30
bors-servo
5ee6fe120d Auto merge of #8712 - simartin:issue_8462, r=ecoal95
Issue #8462: Add support for BufferSubData, CompressedTexImage2D and CompressedSubTexImage2D and reenable individual webgl WPT tests

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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8712)
<!-- Reviewable:end -->
2015-12-04 01:07:14 +05:30
bors-servo
18f74a3d69 Auto merge of #8293 - simartin:issue_8113, r=jdm
Issue #8113: Support file, about and data schemes as form action.

Fix https://github.com/servo/servo/issues/8113 by supporting those schemes as form action and unit test the "about:blank" case

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8293)
<!-- Reviewable:end -->
2015-12-03 22:48:46 +05:30
Ms2ger
367787c155 Simplify drain_modified_elements a bit. 2015-12-03 17:52:08 +01:00
Matt Brubeck
9551363bfb If a mouse event is targeting an iframe, forward it to the iframe's inner window
Fixes #8759.

This adds a slow path for cases where the compositor's layer-based hit testing
is incorrect.  To optimize for this case, we could instead replace the
layer hit testing with display-list hit testing done in the paint task.
2015-12-03 08:19:41 -08:00
Matt Brubeck
8c4fed42b0 Minor refactoring of mouse event types
* Move some types into the `msg` crate so they can be shared more.
* Use MouseEventType instead of duplicating it in other enums.
2015-12-03 08:19:40 -08:00
bors-servo
8ae008761f Auto merge of #8787 - Jayflux:hotfix/8695, r=mbrubeck
now using external ref_slice instead of the std version fixed #8695

Fixes #8695.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8787)
<!-- Reviewable:end -->
2015-12-03 16:10:24 +05:30
bors-servo
63762d2b52 Auto merge of #8786 - eefriedman:localname-atom, r=jdm
Remove unnecessary conversion to/from DOMString for localName.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8786)
<!-- Reviewable:end -->
2015-12-03 15:05:22 +05:30
Jason Williams
1a8db9a07a now using external ref_slice instead of the std version 2015-12-03 07:32:07 +00:00
bors-servo
6ec454b7f5 Auto merge of #8739 - jitendra29:finalMimeAndCharsetHelper, r=eefriedman
M1504: Implement final charset support for text_response method

Following changes have been made:

* Added final_mime_type and final_charset helper methods to return the appropriate final mime/charset values
* Modified the text_response method to use the final_charset instead of directly using the response charset

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8739)
<!-- Reviewable:end -->
2015-12-03 12:27:19 +05:30
bors-servo
01b4deb9d1 Auto merge of #8693 - yanirs:websocket-close-unspecified-status, r=jdm
Implement unspecified websocket close code (fixes issue #8158)

Fixes #8158.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8693)
<!-- Reviewable:end -->
2015-12-03 11:56:18 +05:30
bors-servo
20df7fb7c8 Auto merge of #7988 - nox:unforgeable, r=jdm
Implement [Unforgeable]

This is mostly stolen from Gecko. As there, we define the unforgeable members
on an object stored in the slots of the prototype object. They are then copied
onto instance objects when they are instantiated. It should be noted that
proxy objects see their unforgeable memebers defined on their expando object.

Unforgeable attributes aren't properly inherited in codegen (in a similar
fashion as getters and setters as filed in #5875) and require to be redefined
in derived interfaces. Fortunately, there are currently no such interfaces.

No unforgeable members can be included into the TestBinding interfaces for good
measure because they are not compatible with setters.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7988)
<!-- Reviewable:end -->
2015-12-03 11:03:05 +05:30
Sam Gibson
9668500e97 Makes setting negative values to maxLength throw an IndexSize exception 2015-12-03 14:00:59 +11:00
Sam Gibson
6d1624f9d0 Add additional WPT tests for maxlength parser set 2015-12-03 14:00:57 +11:00
Sam Gibson
85b99f8ba4 Fix typo in error message 2015-12-03 14:00:56 +11:00
Sam Gibson
ecc7035de6 Correct the default max length 2015-12-03 14:00:55 +11:00
Sam Gibson
2ba1750c40 Resolves long-running merge conflicts 2015-12-03 14:00:53 +11:00
Sam Gibson
eecdfdf6c1 Makes int_getter macro, and uses -1 as default maxlength instead of maxint 2015-12-03 14:00:52 +11:00
Sam Gibson
d26c555e2a Adds support for input element's maxlength attr
servo/servo#7320
servo/servo#7004
2015-12-03 14:00:51 +11:00