Commit graph

17092 commits

Author SHA1 Message Date
bors-servo
81f6e70a62 Auto merge of #10785 - frewsxcv:loaderrortype-nostring, r=jdm
Refactor `LoadErrorType` to not require a `String` for every type.

Some of the `LoadErrorType` like `LoadCancelled` don't need a `String`
associated with the type since the variant is self-explanatory.

There are some variants that don't need an associated `String`, but that
can be cleaned up in a later refactor. Also, `net_traits::NetworkError`
currently requires a `String`, but that can potentially also be
refactored away too.

<!-- 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/10785)
<!-- Reviewable:end -->
2016-04-25 14:37:44 -07:00
Corey Farwell
2675d9d1ff Refactor LoadErrorType to not require a String for every type.
Some of the `LoadErrorType` like `LoadCancelled` don't need a `String`
associated with the type since the variant is self-explanatory.

There are some variants that don't need an associated `String`, but that
can be cleaned up in a later refactor. Also, `net_traits::NetworkError`
currently requires a `String`, but that can potentially also be
refactored away too.
2016-04-25 17:10:33 -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
bors-servo
b853383afc Auto merge of #10835 - askeing:fix_10832, r=Wafflespeanut
Adding parameter to tidy for skipping print text when running tests

fix #10832

<!-- 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/10835)
<!-- Reviewable:end -->
2016-04-25 12:48:49 -07:00
bors-servo
ec9e1fe7e6 Auto merge of #10833 - zubron:use-document-base-url-worker-10577, r=Ms2ger
Use the document base url when resolving worker URLs

This fixes #10577.

I'm not sure if the `worker.js` file needed by this test is in the right location. I placed it within `tests/wpt/web-platform-tests/workers/constructors/Worker/sample_worker/` but thought it could also be placed in `tests/wpt/web-platform-tests/resources/`. Let me know if I should change its location. Thanks! :)

<!-- 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/10833)
<!-- Reviewable:end -->
2016-04-25 12:03:10 -07:00
askeing
33d8e21cff Adding parameter to tidy for skipping print text when running tests 2016-04-26 01:27:08 +09:00
Bridget McErlean
d15495aade Modify Worker constructor to use the document's base URL. 2016-04-25 09:24:16 -07:00
bors-servo
97a45dc30c Auto merge of #10684 - Swatinem:hide_svg, r=Ms2ger
do not render svg children, fixes #10646

r? 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/10684)
<!-- Reviewable:end -->
2016-04-25 05:55:42 -07:00
Arpad Borsos
606b11c0ec do not render svg children, fixes #10646 2016-04-25 14:28:43 +02:00
bors-servo
0efbe5ece6 Auto merge of #10825 - craftytrickster:gitignore-update, r=Ms2ger
Adding vscode and intellij settings folders to gitignore

I was going to try VSCode to see if the debugger works well or not with Rust. Since VSCode (as well as other editors) add their own project files to git, I figured they should be accounted for in the .gitignore file.

<!-- 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/10825)
<!-- Reviewable:end -->
2016-04-25 05:09:57 -07:00
bors-servo
8bf732e633 Auto merge of #10831 - mskrzypkows:storageevent, r=Ms2ger
"storageevent" argument for Document::createEvent

Fixes  #10736

<!-- 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/10831)
<!-- Reviewable:end -->
2016-04-25 03:44:24 -07:00
Maciej Skrzypkowski
6187ee631b "storageevent" argument for Document::createEvent
Fixes  #10736
2016-04-25 12:02:05 +02:00
bors-servo
a92a6360cf Auto merge of #10819 - nox:call-without-new, r=Ms2ger
Refactor the `call` hook on non-callback interface objects (fixes #10744)

<!-- 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/10819)
<!-- Reviewable:end -->
2016-04-25 02:45:29 -07:00
Anthony Ramine
4c2ca7a8c9 Refactor the call hook on non-callback interface objects (fixes #10744)
It's now set through the intermediate InterfaceConstructorBehavior structure,
which lets us improve the abstraction around NonCallbackInterfaceObjectClass
a bit better.

When the interface's constructor is supposed to always throw, the error for
calling `Foo()` without new is "Illegal constructor.". when the interface
actually defines an interface, the error is instead
"This constructor needs to be called with `new`.".
2016-04-25 11:44:59 +02:00
Anthony Ramine
a45f117838 Make NonCallbackInterfaceObjectClass::new unsafe 2016-04-25 10:51:07 +02:00
bors-servo
59205323da Auto merge of #10805 - tylersouthwick:webglcontextevent, r=Ms2ger
implement webglcontextevent

fixes #10742

<!-- 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/10805)
<!-- Reviewable:end -->
2016-04-25 01:50:52 -07:00
bors-servo
4f05ea73fe Auto merge of #10761 - amarant:Node-isSameNode, r=Ms2ger
Implements Node::isSameNode

Fixes #10746

I adapted the tests from dom/nodes/Node-isEqualNode.html
should I also add ones for xhtml too like here : dom/nodes/Node-isEqualNode-xhtml.xhtml ?

<!-- 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/10761)
<!-- Reviewable:end -->
2016-04-25 01:04:47 -07:00
bors-servo
edb58040c8 Auto merge of #10775 - mskrzypkows:tidy_tests, r=Wafflespeanut
Test for tidy.check_lock function #9152

<!-- 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/10775)
<!-- Reviewable:end -->
2016-04-25 00:19:33 -07:00
bors-servo
20dd8ba7ec Auto merge of #10817 - danlrobertson:flex-basis, r=mbrubeck
Add style property for flex-basis

Add the style property for flex-basis. The property should allow all
values acceptable for `width` or `height` with the addition of `content`.

I also disabled the tests that I expect to pass. I am confused by [flexbox_computedstyle-flex-basis-0percent:20](https://github.com/servo/servo/blob/master/tests/wpt/css-tests/css-flexbox-1_dev/html/flexbox_computedstyle_flex-basis-0percent.htm#L20). Should that be `0%` instead of `0px`?

<!-- 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/10817)
<!-- Reviewable:end -->
2016-04-24 23:34:37 -07:00
Maciej Skrzypkowski
f090425c24 Test for tidy.check_lock function #9152 2016-04-25 08:32:52 +02:00
bors-servo
4b8f1260b9 Auto merge of #10814 - SunyDays:svgevents_argument, r=Ms2ger
Implement the svgevents argument to Document::createEvent

close #10741

<!-- 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/10814)
<!-- Reviewable:end -->
2016-04-24 22:49:26 -07:00
bors-servo
78041737de Auto merge of #10670 - KiChjang:webgl-stencils, r=emilio
Implement stencil fns for WebGLRenderingContext

Depends on servo/webrender#261.

Closes #10659.

<!-- 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/10670)
<!-- Reviewable:end -->
2016-04-24 12:40:59 -07:00
Daniel Robertson
2d9d31ee04
Add style property for flex-basis
Add the style property for flex-basis. The property should allow all
values acceptable for `width`|`height` with the addition of `content`.
2016-04-24 14:04:40 -04:00
SunyDays
bb19e7d3ac Implement the svgevents argument to Document::createEvent 2016-04-24 20:51:06 +03:00
Keith Yeung
2946fbef77 Implement stencil fns for WebGLRenderingContext 2016-04-24 02:40:22 -04:00
Arnaud Marant
ed42cc72a4 Implements Node::isSameNode
Fixes #10746

Adapted the tests from dom/nodes/Node-isEqualNode.html
2016-04-23 22:03:25 +02:00
David Raifaizen
0e9560e954 Adding vscode and intellij settings folders to gitignore 2016-04-23 15:50:42 -04:00
bors-servo
84ab7e9fe8 Auto merge of #9840 - servo:url-1.0, r=asajeffrey
Update to rust-url 1.0

**Do not merge yet:** rust-url 1.0 is not published yet and may still get breaking changes. The goal of this PR for now is to demonstrate API usage.

Depends on:

* <s>https://github.com/servo/rust-url/pull/176</s>
* <s>https://github.com/alexcrichton/cookie-rs/pull/42</s>
* <s>https://github.com/hyperium/hyper/pull/740</s>
* https://github.com/cyderize/rust-websocket/pull/70
* https://github.com/jgraham/webdriver-rust/pull/28

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9840)
<!-- Reviewable:end -->
2016-04-23 11:28:31 -07:00
Simon Sapin
e662605138 More chrome URL hardenning and tests. 2016-04-23 20:28:03 +02:00
Simon Sapin
374679852c Make chrome: URLs have a "host". 2016-04-23 20:28:02 +02:00
Simon Sapin
7375e2cedd Only test expected origin when it is present
https://github.com/w3c/web-platform-tests/pull/2584
2016-04-23 20:28:01 +02:00
Simon Sapin
eee317352c Reset searchParam in URL.href setter
https://github.com/whatwg/url/issues/117
2016-04-23 20:28:00 +02:00
Simon Sapin
85de5ec743 Correctly initialize URL.searchParams 2016-04-23 20:27:59 +02:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
bors-servo
305c283602 Auto merge of #10823 - jdm:import, r=frewsxcv
Squash unused import and unused crate warnings.

<!-- 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/10823)
<!-- Reviewable:end -->
2016-04-23 07:51:44 -07:00
Josh Matthews
97637d8949 Remove unused crates on macos. 2016-04-23 10:44:55 -04:00
Josh Matthews
5e31681740 Remove unused import. 2016-04-23 10:38:05 -04:00
bors-servo
75ae1c033f Auto merge of #10788 - Ms2ger:note-bugs, r=nox
Note some bugs.

<!-- 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/10788)
<!-- Reviewable:end -->
2016-04-23 00:03:03 -07:00
bors-servo
1b13ddcd8a Auto merge of #10795 - yoava333:master, r=Ms2ger
updated Blob constructor to use optional

fixes https://github.com/servo/servo/issues/10779

<!-- 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/10795)
<!-- Reviewable:end -->
2016-04-22 23:17:55 -07:00
bors-servo
5a5e928cb9 Auto merge of #10770 - notriddle:canvas_placeholder_block, r=mbrubeck
Do not render the contents of block-level replaced elements.

Fixes #10733

<!-- 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/10770)
<!-- Reviewable:end -->
2016-04-22 22:32:37 -07:00
Michael Howell
5a90c8f2bd Do not render the contents of block-level replaced elements.
Fixes #10733
2016-04-22 22:24:09 -07:00
bors-servo
04f8ae56db Auto merge of #10786 - zwn:tidy-modelines, r=Manishearth
tidy check for vim and emacs modelines

See #10719.

It skips *.webidl files for now since I am not sure where they come from and if they should be edited in tree or not.

<!-- 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/10786)
<!-- Reviewable:end -->
2016-04-22 21:46:30 -07:00
bors-servo
abce9de233 Auto merge of #10799 - frewsxcv:no-clone, r=jdm
Complete 'inefficient' FIXME by remove unnecessary clone.

<!-- 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/10799)
<!-- Reviewable:end -->
2016-04-22 21:00:18 -07:00
Tyler Southwick
cba0267ed4 implement webglcontextevent 2016-04-22 19:54:13 -07:00
bors-servo
2b68cf4aba Auto merge of #10804 - tylersouthwick:remove-plugins-utils-unsafe_context, r=nox
Remove unused code and make utils private

fixes #10771

<!-- 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/10804)
<!-- Reviewable:end -->
2016-04-22 19:20:57 -07:00
bors-servo
1946c71a96 Auto merge of #10784 - servo:xml5ever, r=KiChjang
Update xml5ever.

<!-- 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/10784)
<!-- Reviewable:end -->
2016-04-22 17:24:23 -07:00
bors-servo
e12fc2a6f7 Auto merge of #10769 - saneyuki:keyevents, r=frewsxcv
Drop support for keyevents in Document::createEvent

Fix #10735

<!-- 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/10769)
<!-- Reviewable:end -->
2016-04-22 15:56:49 -07:00
bors-servo
8163347e34 Auto merge of #10762 - canaltinova:has_attributes, r=nox
Implement Element::hasAttributes

Fixes #10748 .
Implement Element::hasAttributes. I'm not sure if tests are enough. I'm open to suggestion :)

<!-- 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/10762)
<!-- Reviewable:end -->
2016-04-22 15:11:20 -07:00
bors-servo
47a0f58f98 Auto merge of #10654 - notriddle:no_resize_on_initial_load, r=asajeffrey
compositing/script: Do not dispatch the resize event when initially l…

…oading.

No bug report corresponds to this, but I noticed it while trying to
reduce #10593

<!-- 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/10654)
<!-- Reviewable:end -->
2016-04-22 14:25:51 -07:00