Commit graph

1691 commits

Author SHA1 Message Date
faineance
f3988ea1b8 servo: Merge #10222 - Use self.0 instead of destructuring single item tuple structs (from faineance:master); r=KiChjang
Closes #9698.

Source-Repo: https://github.com/servo/servo
Source-Revision: b97ffffb48080a0b4769f8609a27a68145042945
2016-03-28 03:43:31 +05:01
Guillaume Gomez
32c92c74a1 servo: Merge #10219 - Add insert_adjacent methods into Element (from GuillaumeGomez:adjacent); r=nox
Fixes #10205

Source-Repo: https://github.com/servo/servo
Source-Revision: 0826a5b45455cdbecf484136b1bab39bcc0b15ff
2016-03-27 23:14:04 +05:01
Awal Garg
08dd4d94cd servo: Merge #10204 - Allow setting preferences to false in WPT tests (from awalgarg:fix10161); r=Manishearth
First patch to servo - apologies if I did something stupid :)

This is a fix for #10161. I have squashed the commits into one.

Source-Repo: https://github.com/servo/servo
Source-Revision: 4cb626ae297b2132bcc2f4d4756772c1f8c09fc3
2016-03-27 00:17:55 +05:01
Matt Brubeck
7f2f49fe54 servo: Merge #10176 - Highlight selected text in input fields (from mbrubeck:selection-range); r=pcwalton
Fixes #9993.  This does not yet allow stylesheets to set the selection colors; instead it uses a hard-coded orange background and white foreground.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: bed91b3334786970c91a47c3bc95889d8675b4d5
2016-03-26 07:47:20 +05:01
Sankha Narayan Guria
f3b989808b servo: Merge #9353 - Implement and test DOMTokenList.replace (fixes #8511) (from nox:domtokenlist-replace); r=asajeffrey
Thanks to @sankha93 for the original work in #8525.

Source-Repo: https://github.com/servo/servo
Source-Revision: 59ba00ed84ca446bd121408245460d7a96ba6d71
2016-03-25 17:57:27 +05:01
Jaydeep
da57dda89c servo: Merge #9887 - Implement HTMLHyperlinkElementUtils for HTMLAnchorElement (from schuster:HTMLHyperlinkElementUtils); r=jdm
Fixes #7857

Origin is omitted since it's still not available in rust-url, but since the previous PR also left it out, I'm assuming that's okay.

Please let me know if there are any style issues. There might be more concise ways to do the pattern matching that I don't know about, I guessed at the indentation style in one or two places.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9a8d62286c6556fca7471f2db37f896174bc4d9e
2016-03-25 11:07:35 +05:01
Sagar Muchhal
135f6ff4b2 servo: Merge #10169 - Implement initial pieces of form validation (from jdm:formvalidation); r=jdm
Rebase of #10108.

Source-Repo: https://github.com/servo/servo
Source-Revision: f56062b0698addf17d8077f11e3c12a7e3a3cb8b

--HG--
rename : servo/resources/shaders/clear.fs.glsl => servo/components/script/dom/validation.rs
2016-03-24 18:44:02 +05:01
Ben
0218098aa7 servo: Merge #10152 - Fix #9511. Export webidl enums using "pub use" (from jdm:9511-rebase); r=nox
Change typedef codegen to export the underlying enum itself, rather
than an alias. Works around https://github.com/rust-lang/rust/issues/31355

Rebase of #9691.

Source-Repo: https://github.com/servo/servo
Source-Revision: edcf24fd4d39e86548717ecdfe36e2f1df30daac
2016-03-24 10:11:44 +05:01
Emilio Cobos Álvarez
98d36374a9 servo: Merge #10150 - Canvas cleanup (from emilio:canvas-cleanup); r=jdm
This PR cleans up the layerization infrastructure for canvas, which was unused, and removes unused dependencies.

It also takes in account my recent username change to update angle's dependency (offscreen_gl_context requires extra work due to webrender depending on it).

r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 2887623c4ae1960dfef52b14cd4afc3b279f9feb
2016-03-24 08:15:40 +05:01
Manish Goregaokar
49dd259bff servo: Merge #10122 - Support navigation keys (from Manishearth:nav-keys); r=asajeffrey
Rather useful.

If most people have these keys on their keyboard, I'd prefer to remove the backspace navigation handler. I've never used it on purpose, but it gets hit often by accident when an input widget isn't focused (either due to a misclick or debug build lag).

Source-Repo: https://github.com/servo/servo
Source-Revision: 771623054f467008ce6cb9bd2396517ca8e0a126
2016-03-24 02:06:49 +05:01
St.Spyder
9ca7983c7b servo: Merge #9979 - Implementation of Blob Constructor with test changes (from stspyder:master); r=jdm
Apologize for the late PR. I see that #9977 already overlaps with some of the work. If that is accepted, then I'll change my PR to reflect just the WPT changes.

Source-Repo: https://github.com/servo/servo
Source-Revision: f3abfeeadd5c5b00b17e48c186e957ba10b6e33b
2016-03-23 08:38:38 +05:01
Shing Lyu
4c4f671610 servo: Merge #9518 - Implemented XMLHttpRequest.responseURL (from shinglyu:responseurl); r=jdm
Resolves #8830

Source-Repo: https://github.com/servo/servo
Source-Revision: 50193e9119c567c2c511a53749ff188b9c7ec49e
2016-03-22 23:43:57 +05:01
Ms2ger
6bc75cd680 servo: Merge #10106 - Remove renderer ids (from Ms2ger:renderer-id); r=ecoal95
Source-Repo: https://github.com/servo/servo
Source-Revision: 767b11cd676327cfb71f21d2cbcee8c16a74e2b3
2016-03-22 08:21:28 +05:01
Paul Rouget
b19e374949 servo: Merge #10100 - Add history information to mozbrowserlocationchange event (from paulrouget:historyOnLocationChange); r=paulrouget
This is a change in the Browser API itself.

Before, on `mozbrowserlocationchange`, we would call `getCanGoBack()` and `getCanGoForward()`. Two asynchronous methods called on an event, which doesn't make much sense, especially because we already know on `mozbrowserlocationchange` if we can go back/forward. So here I'm adding 2 new properties to the event to tell if the iframe can go back/forward.

The way `event.detail` is defined also changed. Before, `event.detail` was a string (the new uri), now it's an object (`{uri:String,canGoBack:bool,canGoForward:bool}`).

This is one of the design flaw of the early Browser API: not using objects for the detail property, making it hard to extend the event payload.

So that makes this event not backward compatible. We can:
1. just don't care. It's up to the client to test if event.detail is a string or not if it needs to be compatible with Gecko
2. fix it in Gecko. The client will still have to test `event.detail` to make it compatible with older version of gecko
3. rename `mozbrowserlocationchange` to something else (`mozbrowserlocationchange2` ?)

Please advise.

Source-Repo: https://github.com/servo/servo
Source-Revision: db63aa423fcfc87e47d9250680737ef11d2c3d26
2016-03-22 07:22:19 +05:01
Patrick Walton
69f0412dd7 servo: Merge #10021 - layout: Skip layout traversals that obviously won't do anything (from pcwalton:skip-layout-traversals); r=mbrubeck
This reduces CPU usage when mousing over simple pages (example.com). More complex pages (Wikipedia) still reflow a lot due to other bugs.

Additionally, this change causes Servo to stop painting the results of hit test queries. This is also a win for CPU usage.

This significantly improves #9999, though there's more that can be done. I'll leave it open in case @paulrouget thinks this PR isn't enough.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: 9813d11f862a61a7cffb4cf2d7de0fa7d269c62a
2016-03-22 03:08:49 +05:01
Keith Yeung
d1ef5c5d5d servo: Merge #10094 - Remove HTMLCollectionElementsRevIter (from KiChjang:remove-extra-iter); r=asajeffrey
It's almost a duplicate of HTMLCollectionElementsIter, aside from that its node_iter is a PrecedingNodeIter. We can simply use dynamic dispatch for node_iter instead of making it a concrete type.

Source-Repo: https://github.com/servo/servo
Source-Revision: 95de8b2b03c521011f3e3b9c4b7db89f108a16db
2016-03-21 21:40:47 +05:01
Guillaume Gomez
d5f008cc87 servo: Merge #10096 - Make all interface objects share the same funToString (from GuillaumeGomez:fun_to_string); r=nox
Fixes #9280

Source-Repo: https://github.com/servo/servo
Source-Revision: e95368df6297e664122da8ae15f25724be557353
2016-03-21 16:21:44 +05:01
Ms2ger
41fe5c1c3e servo: Merge #10076 - Update to Rust 2016-03-18 (from servo:rustup); r=larsbergstrom,manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: aa35d7721b0e1e7893e48af1eb91bf8ad2495d46
2016-03-20 14:07:17 +05:01
Corey Farwell
6431cc60b3 servo: Merge #10090 - Add link to tracking issue for NavigatorLanguage::Languages (from servo:tracking-nav-langs); r=ecoal95
Source-Repo: https://github.com/servo/servo
Source-Revision: 98a1b17ceca5214d0fad02e906e86e0724aa8af4
2016-03-20 09:01:10 +05:01
Ms2ger
fb70f27034 servo: Merge #10079 - Implement encoding determination for external scripts (from servo:script-encoding); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 8e95f54501efd74007bb19009b6d2b7522872d57
2016-03-20 05:59:25 +05:01
Matt Brubeck
96cfbd09cb servo: Merge #9876 - Recompute styles on viewport size change if they contain viewport percentages (from mbrubeck:seen-viewport-percentages); r=SimonSapin
Fixes #8754.  Depends on servo/rust-cssparser#99.  r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: a4251c832d605a02d6c82fc188d1746367599e59
2016-03-20 01:51:54 +05:01
Alexander Popiak
9d55144633 servo: Merge #10066 - implement and use From<bool> for enum and back (from apopiak:fromBool); r=asajeffrey
as discussed in the #servo channel on IRC:

implement and use  `From<bool>` for `EventBubbles` (and back direction)
implement and use `From<bool>` for `EventCancelable` (and back direction)

Source-Repo: https://github.com/servo/servo
Source-Revision: 4df7975ed3e74f1d6c491b0435bb3e751b5386a8
2016-03-19 22:29:21 +05:01
Rahul Sharma
7322ebf28d servo: Merge #10009 - implements NavigatorLanguage (from creativcoder:impl-navigator-language); r=Ms2ger
Fixes #9992

Source-Repo: https://github.com/servo/servo
Source-Revision: 20eb81c00ab62b582372c1dbdffc2b21e01d5d2d
2016-03-18 15:00:46 +05:01
Saurav Sachidanand
46cc39bc0c servo: Merge #10014 - Update WebSocket blocked ports to match the Fetch spec (from saurvs:pr1); r=KiChjang
Adresses #9949.

This adds a function that tests whether a request should be blocked or not based on it's url's scheme and port. It also adds testing for port restriction to the `main_fetch` method. More info in eb07418c83.

@Ms2ger In https://github.com/whatwg/html/issues/841, @annevk proposes to remove port restrictions from websockets. Should we go ahead do that, given that the spec hasn't been changed yet?

Source-Repo: https://github.com/servo/servo
Source-Revision: 0008c07dc343d911be042516b32c994fc18e3900
2016-03-18 00:02:24 +05:01
Anthony Ramine
ace9b5c608 servo: Merge #10055 - Bump serde to 0.7 (from servo:serde); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 7a9dc577617b442ff0fe07eaa683207234c519ee
2016-03-17 17:58:36 +05:01
Saurav Sachidanand
940f52525c servo: Merge #10035 - Resets selection in textinput when its content is changed (from saurvs:master); r=jdm
Fixes https://github.com/servo/servo/issues/10005.

Source-Repo: https://github.com/servo/servo
Source-Revision: 909ff4446a8197490af7f2af213dfa2ac35ae0a6
2016-03-17 01:03:58 +05:01
Attila Dusnoki
a8c186678e servo: Merge #9838 - WebBluetooth API classes (from szeged:webbluetooth); r=jdm
Basic implementation of WebBluetooth API
API spec.: https://webbluetoothcg.github.io/web-bluetooth/

Source-Repo: https://github.com/servo/servo
Source-Revision: 37574065e0a1a22493bdbf1ce8dd0480aa88c758
2016-03-16 20:32:18 +05:01
Saurav Sachidanand
b7a87cadba servo: Merge #9967 - Convert directly from DOMString to Vec<u8> (from saurvs:master); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 00ab2e9f9e5457375c38bbc349ae26db92fae578
2016-03-12 00:50:04 +05:01
Daniel Robertson
f0ceb122c9 servo: Merge #9824 - Add the scrollWidth and scrollHeight extensions to the element interface (from danlrobertson:element1); r=asajeffrey
Add the `scrollWidth` and `scrollHeight` extensions to the element interface. My goal was to create a method that encompassed getting `scrollWidth`, `scrollHeight`, `scrollTop`, and `scrollLeft`.

I also noted that `clientHeight` and `clientWidth` to not handle the root element and the body element correctly.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7ff7932a8cb15c42a436958e953cc904ba7a0bd8
2016-03-11 23:50:24 +05:01
Rebecca
1d9a694577 servo: Merge #9930 - Remove activatable element filter within HTMLElement#click() (from rebstar6:htmlclick); r=jdm
Address https://github.com/servo/servo/issues/6542

Ensure that click() calls are not limited to activatable elements. Also makes the isTrusted attribute false when synthetic click activation are called from a click() method (as per spec).

Source-Repo: https://github.com/servo/servo
Source-Revision: f2f6787189d8ea021cbd4ea3425d39ef8b1b8f93
2016-03-11 09:37:24 +05:01
Saurav Sachidanand
bfd217d805 servo: Merge #9905 - Implement input.setSelectionRange (from saurvs:master); r=ecoal95
Fixes https://github.com/servo/servo/issues/9862.

Passes all tests for `input` in `tests/wpt/web-platform-tests/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html`.

Source-Repo: https://github.com/servo/servo
Source-Revision: eac68c523bd0456671b1301a4a72184e46e5df86
2016-03-11 05:44:51 +05:01
Keith Yeung
f7c5861d34 servo: Merge #9217 - Redesign ScriptMsg to be more specific to DOMManipulationTaskSource (from KiChjang:dom-manipulation-msg); r=jdm
This is a large-ish PR that contains the following:
* A new directory is created under `components/script/` called `task_source`, which houses all the stuff for different task sources. Note that the ones that I have now aren't exhaustive - there are more task sources than just the generic ones.
* A `DOMManipulationTaskMsg` which eliminates some usage of `Runnable`s to fire events. Instead, they send event information to the `DOMManipulationTaskSource` and lets the `ScriptTask` handle all the event firing.
* Re-added `fn script_chan`, since I can't think of any other way to give `Trusted` values an appropriate sender.
* Rewrote step 7 of [the end](https://html.spec.whatwg.org/multipage/syntax.html#the-end) to make use of the `DOMManipulationTaskSource`

Partial #7959

Source-Repo: https://github.com/servo/servo
Source-Revision: 740965e39f4d62e5807d21734ed9a7a881eca392
2016-03-11 01:09:27 +05:01
Keith Yeung
1ea43593ad servo: Merge #9796 - Implement Stringifier for Range (from KiChjang:range-stringifier); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: fa93d3f4674c0e326a644826f5c394136a858f2b
2016-03-10 07:06:06 +05:01
Anthony Ramine
3ba3376dfd servo: Merge #9943 - Preliminary bumps for bumping Serde (from servo:serde-preliminaries); r=jdm
We need to bump webrender before being able to bump Serde, but we also needs these bumps, so let's include them ASAP first because bumping a lot of things is always a pain.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0f526054ebfa164ca2545d881b8392a744af7870
2016-03-10 00:21:36 +05:01
Suvish Varghese Thoovamalayil
932eddd474 servo: Merge #9920 - Remove unused cell_extras feature gates. Fixes #9912 (from vishy1618:issue_9912); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: a96b2360a9e6cfed26c101704fd4c804ed1fcfd3
2016-03-08 16:56:16 +05:01
Simon Sapin
1436e99264 servo: Merge #9903 - Replace usage of deprecated std::cell::Ref::filter_map (from servo:ref-filter-map); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: b6e469cbde0e58bab1b99e8c5ba356be2fc61843
2016-03-08 08:23:45 +05:01
Arpad Borsos
f6a11faa18 servo: Merge #9896 - rename deprecated utf16_units to encode_utf16 (from Swatinem:rename_utf16); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: e8aeebbac5584e19e7ee23f187cdd6cf0da5ecb9
2016-03-08 06:03:43 +05:01
Anthony Ramine
1b34a11fda servo: Merge #9888 - Update to Rust 2016-03-05 (from servo:rustup); r=Manishearth
Blocked by https://github.com/Manishearth/rust-tenacious/pull/14.

Source-Repo: https://github.com/servo/servo
Source-Revision: 743e0c9c878a78da873fed4edaa9c8284b2fd12d
2016-03-06 16:04:42 +05:01
Ravi Shankar
c5fb9645f5 servo: Merge #9800 - fixed the last failing test in dom/nodes/attributes.html (from Wafflespeanut:node_attrs); r=nox
r? @nox

Source-Repo: https://github.com/servo/servo
Source-Revision: 64fb09ca2d5d077b4d3e0815ee3e094f67b7cf4e
2016-03-05 21:03:46 +05:01
Peter
0b443ce56f servo: Merge #9786 - Fixed compile error in generated code, when webidl constructors have same number of args (from peterjoel:fix_codegen_is_array_like); r=jdm
One of the ways that generated code differentiates constructors is by comparing if the args are array-like. The generated code was calling a function `IsArrayLike` that no longer exists. I re-implemented it with a more rust-like naming scheme.

Source-Repo: https://github.com/servo/servo
Source-Revision: c37a0866608421d9e3afd67f0777e27091104f0f
2016-03-04 14:45:20 +05:01
Jack Moffitt
7d68aad107 servo: Merge #9832 - Suppress reflows before RefreshTick or FirstLoad (from metajack:suppress-reflows); r=mbrubeck
This fixes a bug where partially loaded content is displayed to the user
before it should be, usually before stylesheets have loaded. This commit
supresses reflows until either FirstLoad or RefreshTick, whichever comes
first.

Source-Repo: https://github.com/servo/servo
Source-Revision: 37bcc161fe45bf8c1cb1172b8e0d12c7d03371b6
2016-03-04 03:31:30 +05:01
Corey Farwell
ccfd41c9c3 servo: Merge #9857 - Indicate components should not be published to crates.io (from servo:publish-false); r=ecoal95
http://doc.crates.io/manifest.html#the-publish--field-optional

Source-Repo: https://github.com/servo/servo
Source-Revision: 633f0414aaa177e439528f0fa848a41bc0fc094a
2016-03-04 01:08:14 +05:01
Emilio Cobos Álvarez
fef86e7406 servo: Merge #9715 - script: Fix MouseOver handling (from emilio:mousemove); r=mbrubeck
Now we only query for the topmost node, and apply the hover state to all
of the parent elements.

This fixes things like #9705, where the hover state was applied only to
the children.

This also makes us more conformant with other browsers in the case of
taking in account margins and paddings.

For example, prior to this PR, when your mouse was over the inner
element, in the bottom part, `hover` styles didn't apply to the parent.

```html
<style>
div {
  padding: 10px;
  margin: 10px;
  height: 15px;
  background: blue;
}

div:hover {
  background: red;
}
</style>

<div>
  <div></div>
</div>
```

Fixes #9705

Source-Repo: https://github.com/servo/servo
Source-Revision: 056a7cf1a2284063e5d32c6627b86f6931957a74
2016-03-03 22:26:35 +05:01
Rahul Sharma
afd7d280d8 servo: Merge #9825 - removed XMLDocument constructor according to spec (from creativcoder:remove-contructor-xmldoc); r=KiChjang
Source-Repo: https://github.com/servo/servo
Source-Revision: 46256b33efeb84b35cc90ae2dee03890ba7f38c7
2016-03-03 17:12:03 +05:01
Anthony Ramine
0afd393fe0 servo: Merge #9837 - Use a BTreeMap for Document::animation_frame_list (fixes #9834) (from nox:deterministic-raf); r=mbrubeck
The callbacks must stay ordered.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9ceda7de509d3dff01a766077011207f94ffadfd
2016-03-02 20:55:38 +05:01
Ulf Nilsson
18490a8945 servo: Merge #9790 - Use piston_image instead of stb_image for decoding JPEGs (from kaksmet:piston-jpeg); r=metajack
The main reason stb_image was used for decoding JPEGs was the lack of progressive support in piston_image.
With version 0.7, piston_image gained support for decoding progressive JPEGs through use of the [jpeg-decoder](https://crates.io/crates/jpeg-decoder) crate.

This PR removes the dependency on stb_image and instead uses piston_image 0.7 for decoding JPEGs.

Source-Repo: https://github.com/servo/servo
Source-Revision: a8c321a7e0402bcfc8d8da10cc94a5b287d29ffc
2016-03-02 13:48:50 +05:01
Gregory Malecha
15ee192c95 servo: Merge #9823 - updating the CanvasRenderingContext2D to match the spec (from gmalecha:canvas-rendering-context-2d-update-idl); r=jdm
- fixes #9443

Source-Repo: https://github.com/servo/servo
Source-Revision: f895f871971bcdcdb4631a0566660340399b7bed
2016-03-02 04:03:26 +05:01
Ms2ger
8f0aadfb0d servo: Merge #9817 - Stop generating a parser.out file in the source (from Ms2ger:yacc-log); r=nox
Source-Repo: https://github.com/servo/servo
Source-Revision: b355c0dbcbbbb5155170b4db971e012659081843
2016-03-02 00:26:02 +05:01
Dominik Menzi
8b0d499bf2 servo: Merge #9763 - Implement value for DOMTokenList (from Tangresh:i9725); r=nox
Fixes #9725

Source-Repo: https://github.com/servo/servo
Source-Revision: 00628704ca5f3318a4b97b7586cd17b31eabf5f6
2016-03-01 08:05:21 +05:01
Rizky Luthfianto
2e6459eeb6 servo: Merge #8932 - Implement Document#elementFromPoint (from rilut:add-elementfrompoint); r=nox
Related to #8666. I haven't implemented elementsFromPoint, because from my past discussion with jdm, [it's not good yet](dbfa25214b (commitcomment-14668959)) to implement elementsFromPoint because it may cause GC hazards.

By the way, I also have to include the test for this, right? I've found this [1]. So, is all I have to do is just to put this into `tests/wpt/web-platform-tests/cssom-view/elementFromPoint.html`?

[1] http://test.csswg.org/suites/cssom-view-1_dev/nightly-unstable/html/elementFromPosition.htm

Source-Repo: https://github.com/servo/servo
Source-Revision: 4bcdbe6d56d4d4e2a679ad7e0e27f2caf71f4d22
2016-03-01 02:32:50 +05:01