Commit graph

2643 commits

Author SHA1 Message Date
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
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
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 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
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
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
Jason Schein
ccb8d070ad Make OnErrorEventHandlerNonNull return 'any' instead of 'boolean'. 2015-11-29 00:10:32 -08:00
bors-servo
2d164f2beb Auto merge of #8729 - dzbarsky:canvas_webidl, r=dzbarsky
Update Canvas webIDL to spec

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8729)
<!-- Reviewable:end -->
2015-11-29 09:32:28 +05:30
David Zbarsky
ee3f7ad451 Update Canvas webIDL to spec 2015-11-28 20:03:48 -08:00
Corey Farwell
feb16463ef Add tracking issues for body/document attributes 2015-11-28 17:53:59 -05:00
bors-servo
eadaf30af3 Auto merge of #8703 - eefriedman:dom-getter-setter-atom, r=frewsxcv
Compute attribute name atoms at compile-time.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8703)
<!-- Reviewable:end -->
2015-11-28 20:40:07 +05:30
bors-servo
c0be03f2af Auto merge of #8701 - nerith:attribute, r=jdm
Remove `#[allow(raw_pointer_derive)]` attributes

The attributes are unused.

Fixes #8699.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8701)
<!-- Reviewable:end -->
2015-11-28 06:07:46 +05:30
Eli Friedman
c02c0576c8 Compute attribute name atoms at compile-time. 2015-11-27 15:42:34 -08:00
Brandon Fairchild
341e66f66d Remove #[allow(raw_pointer_derive)] attributes
The attributes are unused.

Fixes #8699.
2015-11-27 14:32:57 -05:00
bors-servo
99223656fb Auto merge of #8675 - GuillaumeGomez:master, r=nox
Add XMLDocument object

Fixes #8000

(Still working on it)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8675)
<!-- Reviewable:end -->
2015-11-27 19:29:04 +05:30
Guillaume Gomez
adf8b359bb Add XMLDocument object 2015-11-27 14:55:41 +01:00
Keith Yeung
d426dd29d1 Use set_plaintext_state instead of plaintext tag 2015-11-27 00:45:34 -08:00
Manish Goregaokar
dc0e467945 Upgrade to rustc 1.6.0-nightly (d5fde83ae 2015-11-12)
… and libc 0.2 and many other dependencies
2015-11-27 00:15:29 -05:00
GauriGNaik
996e9e06b2 Defined new trait ParseErrorReporter and added error_reporter member to ParserContext 2015-11-25 18:28:30 -05:00
bors-servo
8efc954531 Auto merge of #8671 - paulrouget:iframe-hit-test, r=pcwalton
Fix clip rect for iframes in hit testing code

Fixes #8080 r? @mrobinson

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8671)
<!-- Reviewable:end -->
2015-11-26 00:39:36 +05:30
Alan Jeffrey
3dec6edd10 Update string_cache to 0.2.
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00
bors-servo
e7b1924948 Auto merge of #6826 - dzbarsky:deletecontents, r=jdm
Implement Range#deleteContents

Sadly calling ExtractContents and discarding the result doesn't do the right thing.
It may be worth having a CutContents method that takes an `Option<DocumentFragment>` and switch the behavior based on it, to share the code between DeleteContents and ExtractContents, like what Gecko does.  Maybe a followup.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6826)
<!-- Reviewable:end -->
2015-11-25 19:55:02 +05:30
David Zbarsky
25b7c9523c Implement Range#deleteContents 2015-11-25 00:02:25 -08:00
Matt Brubeck
7b799497d1 Convert from client to page coords in script 2015-11-25 07:16:09 +01:00
bors-servo
0905088e83 Auto merge of #8655 - jdm:domain, r=jdm
Implement document.domain getter

Rebased from #6840 + test fixes.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8655)
<!-- Reviewable:end -->
2015-11-24 06:01:13 +05:30
Tom Schuster
0e0e051f3f Implement document.domain getter 2015-11-23 15:45:02 -05:00
bors-servo
6ef6d664aa Auto merge of #8656 - servo:canvas-currentcolor, r=SimonSapin
Implement currentColor for Canvas colors

Fixes #7120.

This is #7120 by @dzbarsky, with one tidy error fixed.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8656)
<!-- Reviewable:end -->
2015-11-23 23:09:57 +05:30
Simon Sapin
18ecf54d10 Tidy. 2015-11-23 16:16:35 +01:00