Commit graph

3046 commits

Author SHA1 Message Date
ronak
d38a1a0d03 Create and invoke XML parser for XML documents. 2015-12-04 16:37:13 -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
b32128e299 Auto merge of #8768 - vegayours:8616_intermittent_option_unwrap_in_timers, r=jdm
fix intermittent Option::unwrap in timers

fixes intermittent #8616

This intermittent indicates real problem in code.
Lets consider such code:
```javascript
// timer 1
setTimeout(function() {
     //timer 2
     setTimeout(function() {}, 0);
}, 0);
```
When we receive event to fire timer 1 it will be selected and extracted from active timers list in fire_timer function. During timer 1 handler execution we will schedule timer 2 and request timer event for it. But it will be executed during same fire_timer call because of 0 timeout. And as a result we will have empty timers list and expecting event for timer 2 that will crash in assert.

I'm not sure that all I've written is clear, but we have something like this:
```
install timer 1 -> [1] in timers list
push and expect timer event 1 -> expected_event=1
received timer event 1
    fire_timer()
         select timer 1 to execute -> [] in timers list
         execute timer 1 handler
             install timer 2 -> [2] in timers list
             push and expect timer event 2 -> expected_event=2
         select timer 2 to execute (because of 0 timeout) -> [] in tiemrs list
         execute timer 2 handler
expected_event=2 is dangling
received timer event 2
    fire_timer() -> BOOM
```

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8768)
<!-- Reviewable:end -->
2015-12-04 21:19:58 +05:30
Aleksandr Likhanov
d891e75d9d fix intermittent Option::unwrap in timers
not allow to fire timers installed during another timer call
2015-12-04 20:16:43 +05:00
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
8b95d7b8d8 Auto merge of #8757 - servo:skia, r=mbrubeck
Use skia and deps from crates.io.

This makes the initial download for skia go from a 300 MB git repository to a 5 MB tarball. This should help with issues like #6132 and #7687.

Fix https://github.com/servo/skia/issues/70

This builds, but the at the moment causes a number of tidy errors for duplicated crates.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8757)
<!-- Reviewable:end -->
2015-12-03 12:58:29 +05:30
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
Emilio Cobos Álvarez
3af24ed119 webgl: Fix texturing
These two tiny changes were making WebGL textures not work.

It was not seen in our texturing test since we render to a texture by
default, and that texture was bound to `gl::TEXTURE_2D`.
2015-12-03 02:53:37 +01:00
Jitendra Jain
af7c0837f4 Implement final_mime_type and final_charset helpers and use in text_response 2015-12-02 20:06:59 -05:00
Eli Friedman
e42dcb3712 Remove unnecessary conversion to/from DOMString for localName. 2015-12-02 13:42:45 -08:00
Simon Martin
2b332a2138 Issue #8113: Support file, about and data schemes as form action. 2015-12-02 22:41:24 +01:00
Anthony Ramine
60976406cc 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.

Given the unforgeable holder object has the same prototype as actual instances
of the interface, the finalize hook needs to check its slot pointer for nullity
before dropping it.

The new failing test isn't related to Unforgeable attributes, but to the fact
that all Document instances currently have a Location, even if their window
isn't in a browsing context.
2015-12-02 22:15:11 +01:00
Simon Sapin
aa1eba4f5a Use skia and deps from crates.io.
Fix https://github.com/servo/skia/issues/70
2015-12-02 19:07:59 +01:00
Simon Martin
f79e1521b2 Issue #8462: Add support for BufferSubData, CompressedTexImage2D and
CompressedSubTexImage2D and re-enable individual webgl WPT tests.
2015-12-01 20:40:42 +01:00
bors-servo
65108348aa Auto merge of #8714 - frewsxcv:body-fgcolor, r=Ms2ger
Implement attribute 'fgColor' on 'document'

The 'text' attribute was implemented on `<body>` in #7841

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8714)
<!-- Reviewable:end -->
2015-12-01 21:40:58 +05:30
David Zbarsky
302f41d34b Reset canvas state when changing bitmap dimensions 2015-11-30 21:23:51 -08:00
Corey Farwell
320263199f Implement attribute 'fgColor' on 'document'
The 'text' attribute was implemented on '<body>' in #7841
2015-11-30 18:19:07 -05:00
Josh Matthews
c23cbd4163 Dispatch load events for cross origin iframes. Resolves #6672. 2015-11-30 17:37:16 -05:00
bors-servo
29c42a9f78 Auto merge of #8751 - nox:rm-prototype-slot, r=Ms2ger
Remove unused slot in prototype object (fixes #8588)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8751)
<!-- Reviewable:end -->
2015-11-30 19:27:57 +05:30
Anthony Ramine
7547bcac24 Remove unused slot in prototype object (fixes #8588) 2015-11-30 14:48:24 +01:00
Yanir Seroussi
ad9accf8e7 Implement unspecified websocket close code (fixes issue #8158) 2015-11-30 11:20:41 +11:00
bors-servo
a877a56e0e Auto merge of #8661 - craftytrickster:8623/some-webdriver-commands, r=jgraham
Webdriver - GetWindowSize/IsEnabled/IsSelected

Added handlers for https://github.com/servo/servo/issues/8623:
GetWindowSize
IsEnabled(WebElement)
IsSelected(WebElement)

I am not sure how to actually verify my webdriver code works, if someone can give advice I would make the necessary changes.

Thanks!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8661)
<!-- Reviewable:end -->
2015-11-30 03:42:54 +05:30
David Raifaizen
8d451076e1 Removed duplicate webdriver_traits file and added webdriver handler for GetWindowSize, IsSelected and IsEnabled 2015-11-29 15:48:23 -05:00
Jason Schein
ccb8d070ad Make OnErrorEventHandlerNonNull return 'any' instead of 'boolean'. 2015-11-29 00:10:32 -08:00