Commit graph

3495 commits

Author SHA1 Message Date
Connor Brewster
dc85be4be5 Implement alert dialogs
Fixed conflict

Fixed merge issue

Finished implementation

Disable tinyfiledialogs on Windows

addressed comments

Use ancestor's SubpageId
Move display alert from method to function
Add extra test for nested iframes

Addressed comments

Updated tinyfiledialogs
2016-05-03 22:09:35 -06:00
bors-servo
8255e74a61 Auto merge of #10081 - jdm:interfacepref, r=nox
Support controlling interface and member visibility via preferences

This was easier to throw together than per-attribute/method support, and it gets rid of some nonstandard properties from our globals.

Fixes #7626.

r? @Ms2ger

<!-- 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/10081)
<!-- Reviewable:end -->
2016-05-02 11:35:38 -07:00
Josh Matthews
a03fc5e2fd Hide nonstandard interface members of standard interfaces behind appropriate prefs. 2016-05-02 14:32:58 -04:00
Josh Matthews
cb5bad63dc Implement hiding of interface members via Pref annotations. 2016-05-02 14:32:56 -04:00
Josh Matthews
88059acd7e Start generating arrays of specs for easier implementation of preference checks. 2016-05-02 14:32:55 -04:00
Josh Matthews
f4c1529f56 Forbid unconditionally-exposed interfaces that inherit from conditionally-exposed ones. 2016-05-02 14:32:53 -04:00
Josh Matthews
91a78ed109 Disable nonstandard interfaces via prefs. 2016-05-02 14:32:52 -04:00
bors-servo
a54dedac1f Auto merge of #10946 - bd339:iss10940, r=nox
Disable scripting for documents created without a browsing context

Goes towards closing #10940.

<!-- 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/10946)
<!-- Reviewable:end -->
2016-05-02 08:48:02 -07:00
Ms2ger
eba74554f3 Add and update some FIXME comments about origin handling with iframes. 2016-05-02 12:34:08 +02:00
Ms2ger
68076fbd7b Return a Url from HTMLIFrameElement::get_url.
Since Url::origin() always returns an opaque origin for about: urls, I don't
believe this changes behaviour.
2016-05-02 12:32:44 +02:00
bors-servo
5358df5a16 Auto merge of #10958 - izgzhen:fixes, r=nox
Minor fixes to documentation

1. Looks like getters and setters are specified here already. 0385f60310/components/script/dom/bindings/mod.rs (L62)
2. The `MutNullableJS` and `Unrooted` looks obsolete

<!-- 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/10958)
<!-- Reviewable:end -->
2016-05-02 00:59:37 -07:00
Zhen Zhang
e0f3cdafe1 Fixes related to file input and File API 2016-05-02 12:52:28 +08:00
Zhen Zhang
0385f60310 fix docs 2016-05-02 11:17:35 +08:00
bd339
0c92e19e84 make scripting_enabled depend on a browsing context 2016-05-01 14:06:02 +02:00
Keith Yeung
3110647852 Make IFrameLoadInfo take an Option<LoadData> instead of Option<Url> 2016-04-30 21:43:01 -04:00
Keith Yeung
16361086d9 Add planned navigation to submit as entity body (fixes #9829) 2016-04-30 21:42:57 -04:00
Prabhjyot Singh Sodhi
cfde40e225 Support form submission of multipart/form-data 2016-04-30 21:42:50 -04:00
Matt Brubeck
1e23d90631 Upgrade to bitflags 0.6.0 and selectors 0.5.6
Types generated by `bitflags!` are now private by default.  This PR marks them
`pub` where necessary.
2016-04-30 10:14:03 -07:00
bors-servo
990dd72da7 Auto merge of #10837 - asajeffrey:add-mozbrowsererror-details, r=Manishearth
Add detail to mozbrowsererror events.

Part of #10334. Once #10824 lands, we can include the panic reason and backtrace in the error report.

<!-- 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/10837)
<!-- Reviewable:end -->
2016-04-29 09:18:39 -07:00
bors-servo
ac8406f4ae Auto merge of #10834 - yoava333:master, r=SimonSapin
added support for :read-only and :read-write pseudo-classes

partial fix for https://github.com/servo/servo/issues/10732

It's not a full fix because:
1. there's a bug in wpt-test https://github.com/w3c/web-platform-tests/issues/2889#issuecomment-214144420
2. we don't fully support all input types (namely image, color, hidden and range), which are defaulted to input text. this means that :read-write which is applicable to input text is mis-handled in those cases.
3. we don't support contenteditable, which is also possibly :read-write

<!-- 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/10834)
<!-- Reviewable:end -->
2016-04-29 08:12:18 -07:00
Josh Matthews
bb47f72f25 Support controlling the visibility of WebIDL interfaces via the Pref annotation. 2016-04-29 11:03:15 -04:00
Ms2ger
897be5f6ee Reduce channel cloning. 2016-04-29 14:55:52 +02:00
Ms2ger
703d018f23 Avoid some clones. 2016-04-29 14:55:49 +02:00
bors-servo
408f9abb7a Auto merge of #10830 - cjkenn:10743, r=Ms2ger
DOMImplementation::createDocument should set content type based on namespace

Set document content type based on the namespace.
Standard: https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
Fixes #10743.

<!-- 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/10830)
<!-- Reviewable:end -->
2016-04-28 21:31:30 -07:00
bors-servo
cf121ad8df Auto merge of #10895 - mbrubeck:byteindex, r=pcwalton
Use byte indices instead of char indices for text runs

Replace character indices with UTF-8 byte offsets throughout all code dealing with text runs.  This eliminates a lot of complexity when converting from one to the other, and interoperates better with the rest of the Rust ecosystem.

For most code this is just a simple replacement of char indices with byte indices.  In a few places like glyph storage and text fragment scanning, it also lets us get rid of code that existed only to map between bytes and chars.

Also includes some related fixes to text shaping, discovered while working on this conversion.  See the commit messages for details.

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/10895)
<!-- Reviewable:end -->
2016-04-28 20:22:09 -07:00
cjkenned
d9128fba07 [10743] Add content type to XmlDocument constructor based on namespace
[10743] Fix namespace in createDocument test

[10743] Remove test ini file, match returns static strings instead of DOMString.

[10743] Fix arguments to XMLDocument::new

Update failing test

[10743] Add content type to XmlDocument constructor based on namespace

[10743] Fix namespace in createDocument test

[10743] Remove test ini file, match returns static strings instead of DOMString.

[10743] Fix arguments to XMLDocument::new

Update failing test
2016-04-28 20:26:54 -06:00
Matt Brubeck
c4872d9544 Replace range::Range with std::ops::Range in script 2016-04-28 14:54:07 -07:00
Matt Brubeck
659305fe0a Use byte indices instead of char indices for text runs
Replace character indices with UTF-8 byte offsets throughout the code dealing
with text shaping and breaking.  This eliminates a lot of complexity when
converting from one to the other, and interoperates better with the rest of
the Rust ecosystem.
2016-04-28 14:32:14 -07:00
bors-servo
210803b4b2 Auto merge of #10887 - askeing:fix_10374, r=KiChjang
Dispatch error event when link elements get invalid response

fix #10374

<!-- 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/10887)
<!-- Reviewable:end -->
2016-04-28 14:30:04 -07:00
Patrick Walton
7bd257089c script: Make iframes know their pipeline IDs at all times, even after
navigation.

Since WebRender uses the pipeline ID stored in the iframe element to
determine which pipeline to display, it had better be kept up to date!

Closes #9919.
2016-04-28 10:53:13 -07:00
Keith Yeung
33acb1937c Remove extraneous script_chan parameter from Trusted::new 2016-04-28 10:52:44 +02:00
askeing
d6863e6800 modified the code, following the suggestions from reviewer 2016-04-28 15:06:01 +08:00
askeing
80fd18676f Dispatch error event when link elements get invalid response 2016-04-28 13:06:16 +08:00
bors-servo
311dd0f930 Auto merge of #10816 - SunyDays:errorevent_argument, r=frewsxcv
Implement the errorevent argument to Document::createEvent

new_uninitialized function on ErrorEvent has already been in components/script/dom/errorevent.rs

close #10738

<!-- 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/10816)
<!-- Reviewable:end -->
2016-04-27 10:52:41 -07:00
SunyDays
7d24426172 Implement the errorevent argument to Document::createEvent 2016-04-27 20:49:25 +03:00
bors-servo
daa1a2a0a8 Auto merge of #10647 - ConnorGBrewster:parse_xml, r=jdm
Finish hooking up XML parser

This is a work in progress PR for #10581. I just want to make sure I am headed in the right direction.

cc @jdm

<!-- 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/10647)
<!-- Reviewable:end -->
2016-04-27 07:50:54 -07:00
Connor Brewster
3389c497c0 Finish hooking up XML parser
added script integration with xml5ever

Updated test expectations

Removed timeout test expectation

Refactors

application/xhtml+xml is treated as HTML

Updated xml5ever

Updated Text Expectations
2016-04-27 08:44:13 -06:00
bors-servo
5fd93de7be Auto merge of #10866 - broesamle:issue10856-a, r=Ms2ger
Move abstract parser infrastructure from servohtmlparser.rs to parse

Fixes #10856

<!-- 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/10866)
<!-- Reviewable:end -->
2016-04-27 03:29:50 -07:00
Martin Broesamle
7c4489b193 Move abstract parser infrastructure from servohtmlparser.rs to parse 2016-04-27 10:32:59 +02:00
bors-servo
21c1773115 Auto merge of #10838 - bd339:iss9551, r=KiChjang
Implement step 3 according to spec

Goes towards fixing #9551

<!-- 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/10838)
<!-- Reviewable:end -->
2016-04-27 00:16:08 -07:00
bd339
ac88c5e16b Implement step 3 according to spec 2016-04-27 07:45:38 +02:00
SunyDays
e4f3a31caf Implement the focusevent argument to Document::createEvent 2016-04-27 01:51:48 +03:00
Yoav Alon
9bf909ac2f added support for :read-only and :read-write pseudo-classes
partial fix for https://github.com/servo/servo/issues/10732
2016-04-27 01:38:58 +03:00
bors-servo
ccba2d6841 Auto merge of #10608 - KiChjang:parse-double, r=nox
Add parsing of double values in style attributes

<!-- 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/10608)
<!-- Reviewable:end -->
2016-04-26 11:59:25 -07:00
Ramana Venkata
f56bd3a6f3 Allow setting withCredentials in synchronous XMLHttpRequest
closes #10839
2016-04-26 17:08:39 +05:30
Stephen (Ziyun) Li
889579c6de
Implement the "progressevent" argument to Document::createEvent 2016-04-26 00:32:50 -04:00
bors-servo
34900814fc Auto merge of #10696 - rebstar6:referrerPolicy, r=jdm
Referer header

PR1 for https://github.com/servo/servo/issues/10311

This puts the code and data structures in place to set the Referer header based on the Referrer Policy for a given document. Note that document:: get_referrer_policy() always returns the 'No Referrer' option, so for now, this should have no impact on production code, and that policy requires that the Referer header is not added.

Later PRs will determine the policy and edit that get_referrer_policy() accordingly.

<!-- 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/10696)
<!-- Reviewable:end -->
2016-04-25 13:52:01 -07:00
Rebecca
526525b835 Add referrer policy pass-through and referrer header logic
add pass-through from doc to http-loader for referrer_policy, ref_URL
add logic for setting referer header
add script pass-through for referrer
add unit tests for setting referer header
2016-04-25 16:41:06 -04:00
Alan Jeffrey
d65cf8e833 Add detail to mozbrowsererror events. 2016-04-25 12:18:28 -05:00
Bridget McErlean
d15495aade Modify Worker constructor to use the document's base URL. 2016-04-25 09:24:16 -07:00