Commit Graph

4347 Commits

Author SHA1 Message Date
Martin Robinson
f7a684b3a0 servo: Merge #6591 - Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10) (from servo:rustup_2015-07-10); r=larsbergstrom
Depends on https://github.com/jgraham/webdriver-rust/pull/12.

Fixes #6020.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9af229b83095f2f8cfe7b61003b85ddf781f4ea7
2015-07-14 13:40:22 -06:00
Patrick Walton
5e391f57ba servo: Merge #6618 - script: Split Pipeline::create into chrome process and content process parts (from pcwalton:content-process-code-shuffling); r=larsbergstrom
This will make it easier to adapt to IPC.

The trickiest part here was to make script tasks spawn new layout tasks
directly instead of having the pipeline do it for them. The latter
approach will not work in multiprocess mode, because layout and script
must run in the same address space and the pipeline cannot inject tasks
into another process.

r? @larsbergstrom

Source-Repo: https://github.com/servo/servo
Source-Revision: e06eaa0064f49bc215e3851f0a3686e1191b356a
2015-07-14 12:11:09 -06:00
Matt Brubeck
3a30805259 servo: Merge #6626 - Remove dead code from gfx/text (from mbrubeck:gfx-dead); r=glennw
r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 27d7f942547fa2091828d358c239dd9a2ed08885
2015-07-14 09:40:52 -06:00
Patrick Walton
31494292e3 servo: Merge #6596 - compositing: Make ScriptListener and LayoutControlChan messages go over IPC (from pcwalton:layout-control-ipc); r=jdm
r? @jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: 64751b8eef5b95de9ac3b9a382b4cb4408cb90c0
2015-07-14 08:46:07 -06:00
David Zbarsky
9ac5edf348 servo: Merge #6624 - Remove some more unnecessary let bindings (from dzbarsky:23338); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 7de4ba0f826f8239d6ac540417028265e62085c5
2015-07-14 07:21:10 -06:00
Ms2ger
a3f8c64cfa servo: Merge #6622 - Throw an InvalidStateError from WebSocket#send when it is called too early (from Ms2ger:send-invalid-state); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: a2903091e4ff06a1de8792bb6b09cf888c1edbfc
2015-07-14 03:34:47 -06:00
Ms2ger
2fa4baeb5d servo: Merge #6621 - Move away from the repeat().take().collect() pattern (from Ms2ger:repeat); r=SimonSapin
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.

Source-Repo: https://github.com/servo/servo
Source-Revision: 556c0e1509cb48b90f492bcf0f25d0ed14b015d1
2015-07-14 02:42:26 -06:00
Ms2ger
8985822b47 servo: Merge #6620 - Stop panicking while establishing a WebSocket connection (from Ms2ger:ws-crash); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: d91a6f3834aa7fbf47148480e16d06d9e3891340
2015-07-14 02:06:17 -06:00
Corey Farwell
a2a4f810b8 servo: Merge #6617 - Complete FIXMEs related to UFCS (from frewsxcv:fixme-ufcs); r=metajack
Source-Repo: https://github.com/servo/servo
Source-Revision: 6a728712f9c9cbe667c1bca2465cefef6f6f657a
2015-07-14 01:30:12 -06:00
Josh Matthews
98484aa7c5 servo: Merge #6611 - Add Origin header to WebSocket connections (from jdm:websocketorigin); r=jdm
Closes #6532.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0fb9f22ff7622940669faf4ec25e9bb9856c5def
2015-07-13 23:39:16 -06:00
Ms2ger
dd1d17a4af servo: Merge #6588 - Remove unused has_children method (from Ms2ger:has_children); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: c70d53c9feae94ae9cbc95c11d507495b1cda27a
2015-07-13 23:01:54 -06:00
David Zbarsky
23a2b99ba5 servo: Merge #6554 - Test namespace prefix for element equality (from dzbarsky:master); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 91ce002241c32d4d6f0c4814f93ae693672485be
2015-07-13 22:24:22 -06:00
Simon Sapin
0cc3d3e803 servo: Merge #6614 - Add a -Z replace-surrogates command-line option (from servo:replace-surrogates); r=Ms2ger
See #6564.

r? @Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: db90d484edd3a3c1b44030a76d8d011e2ca048fc
2015-07-13 21:49:04 -06:00
Ms2ger
63ad015327 servo: Merge #6610 - Replace WebSocketTask::Open by ConnectionEstablished (from Ms2ger:task-readystate); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 12195a5c4ac08f1e6eeaf8888c279fea8e5be48a
2015-07-13 02:47:16 -06:00
Ms2ger
e2555f39eb servo: Merge #6609 - Return the parsed URL from WebSocket#url (from Ms2ger:ws-url); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: c2dbc4587f70a15f0acefcff214c649d009c2f76
2015-07-13 00:24:35 -06:00
Glenn Watson
0a5cf5ac60 servo: Merge #6606 - Use atoms for font template structures (from glennw:font-atoms); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: c3fc943c6627b0248e1e61b106a964131209cb6d
2015-07-12 10:29:33 -06:00
Ms2ger
ed2bcfccfd servo: Merge #6605 - Pass the WorkQueue to LayoutTask::solve_constraints_parallel (from Ms2ger:solve_constraints_parallel); r=SimonSapin
This removes the possibility of a panic by checking a constraint at compile
time rather than at run time.

Source-Repo: https://github.com/servo/servo
Source-Revision: d7cf58d6f15c1b96884a5aef210a5c5d244abf54
2015-07-12 02:44:04 -06:00
Ms2ger
34ecbe332d servo: Merge #6604 - Add debug logging to register_named_element and unregister_named_element (from Ms2ger:idmap-debug); r=jdm
I found them helpful; I imagine others might as well.

Source-Repo: https://github.com/servo/servo
Source-Revision: 9e02ef93478c41a3fc6971611b358da6f73625d6
2015-07-11 14:27:49 -06:00
Will Huxtable
6bcbf87f94 servo: Merge #6603 - Remove url field from Page (from wjh:remove-url-from-page-6589); r=jdm
Resolves issue [#6589](https://github.com/servo/servo/issues/6589).

Source-Repo: https://github.com/servo/servo
Source-Revision: 3d4122e7c1e9e412d88f69b853af5265a4c9f0fe
2015-07-11 04:47:06 -06:00
Ms2ger
40b58b5744 servo: Merge #6600 - Implement Window#top (from Ms2ger:top); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: bd3380e0b611034c3159129ad5834ae9e9db6d22
2015-07-11 04:01:33 -06:00
Ms2ger
ba7000ba5a servo: Revert "Replace surrogates in JS strings with U+FFFD instead of panicking."
This reverts commit 3f07f8e8661e7ebd451af3aef247212708083bc5.

Source-Repo: https://github.com/servo/servo
Source-Revision: 243446eff33d596b192a7190d5dfe3bb1a6e07dd
2015-07-11 09:32:32 +02:00
Simon Sapin
2f6ac4e285 servo: Merge #6595 - Replace surrogates in JS strings with U+FFFD instead of panicking (from servo:replace-surrogates); r=pcwalton
Fix #6519.
See #6564.

r? @pcwalton

Source-Repo: https://github.com/servo/servo
Source-Revision: 0f36eeab61b233cbcf0274e985ebd07b45d7a44f
2015-07-10 13:14:38 -06:00
David Zbarsky
2f5b1d3dd7 servo: Merge #6561 - Implement Node#isDefaultNamespace and Node#lookupNamespaceURI (fixes #1826) (from dzbarsky:namespace); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: 52e857dd7b9b083d691efab088aeba80888c61ff
2015-07-10 06:44:25 -06:00
Corey Farwell
9ce1aeb451 servo: Merge #6585 - Remove unused files in 'script/dom/bindings/' (from frewsxcv:rm-unused-codegen-files); r=jdm
Similar to https://github.com/servo/servo/pull/6581, but I didn't get
everything in that pull request

Source-Repo: https://github.com/servo/servo
Source-Revision: 314483a97f29a7e75c46a6e7ffb580bbc5f0ad9b
2015-07-09 17:51:30 -06:00
Corey Farwell
78f93158a2 servo: Merge #6580 - Remove tidy blacklist for 'script/dom/bindings/*' (from frewsxcv:lint-codegen); r=Ms2ger
Recently, I found myself reading through the Python codegen scripts that
live in 'components/script/dom/bindings/*' and noticed that there were
many tidy violations: unnecessary semicolons, weird spacing, unused
variables, lack of license headers, etc. Considering these files are now
living in our tree and mostly maintained directly by contributors of
Servo (as opposed to being from upstream), I feel these files should not
be excluded from our normal tidy process. This commit removes the
blacklist on these files and fixes all tidy violations.

I added these subdirectories to the blacklist because they appear to be
maintained upstream somewhere else:

* "components/script/dom/bindings/codegen/parser/*",
* "components/script/dom/bindings/codegen/ply/*",

Also, I added a few '# noqa' comments which tells us to ignore the
flake8 errors for that line; they are mostly for unused/undefined
variables. I chose to ignore these (instead of fixing them) to make the
work for this commit simpler for me.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2d2a340633dcc73e458a8454b78e26ba93511d37
2015-07-09 07:55:27 -06:00
Corey Farwell
14eea70cbe servo: Merge #6581 - Remove unused files in 'script/dom/bindings/' (from frewsxcv:rm-unused-codegen-files); r=Ms2ger
As per this conversation:

https://github.com/servo/servo/pull/6580

Source-Repo: https://github.com/servo/servo
Source-Revision: fe17067d6a30b85a0346fd1ccb2b95e2081e6962
2015-07-08 10:38:38 -06:00
Ms2ger
d599f5f1e4 servo: Merge #6574 - Remove ReplacedImageFragmentInfo::for_node and unsafe code it required (from Ms2ger:for_node); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 805232a85e401f1a07635da894c8e7d05fed4ce9
2015-07-08 08:02:30 -06:00
Ms2ger
1d31cf9cf2 servo: Merge #6576 - Reduce the scope of the allowed unsafe code in context.rs (from Ms2ger:scope-unsafe-context); r=pcwalton
Since I made unsafe code opt-in in layout, the unsafe code in this module has
been reduced to a single unsafe impl, so there is no reason to allow it in
the entire module.

Source-Repo: https://github.com/servo/servo
Source-Revision: ce81745a8ece10a81b3caaf80da41d7824c5105a
2015-07-08 05:59:00 -06:00
Martin Robinson
17cdbf9af6 servo: Merge #6530 - Move LayerBuffer cache to the compositor (from mrobinson:move-cache); r=pcwalton
Now that NativeDisplay can be shared between the compositor and the
paint task, we can move the LayerBuffer cache to the compositor. This
allows surfaces to be potentially reused between different paint tasks
and will eventually allow OpenGL contexts to be preserved between
instances of GL rasterization.

Source-Repo: https://github.com/servo/servo
Source-Revision: 10b0d8c537c226400a617d28e8a060f9ca53d242

--HG--
rename : servo/components/gfx/buffer_map.rs => servo/components/compositing/buffer_map.rs
2015-07-08 03:14:21 -06:00
Ms2ger
2a3ec77664 servo: Merge #6575 - Really require documentation in the script_traits crate (from Ms2ger:script-traits-docs); r=jdm
My previous attempt (1303dd6e2e1af39b13b57986f154a67f9e7490e7) was foiled by
a typo that made the requirement only apply to the next item.

Source-Repo: https://github.com/servo/servo
Source-Revision: 5386b0122c52a2e869065676d46b242a4ddd1726
2015-07-08 01:20:28 -06:00
Ms2ger
36f4680a8d servo: Merge #6573 - Don't lose a possible error in <SpecificFragmentInfo as fmt::Debug>::fmt (from Ms2ger:warnings); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: effe569e32d33d5c6c95d0882487b6ea128fd71b
2015-07-08 00:35:38 -06:00
Ms2ger
8dd240b5f1 servo: Merge #6577 - Remove the unused unrooted_must_root permission from layout (from Ms2ger:disallow-unrooted-layout); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: 453b826fb8d24201f00e8a2280f0c5c6cfa77938
2015-07-07 23:57:44 -06:00
Ms2ger
487ed050b8 servo: Merge #6570 - Require that WorkQueue's QueueData is Sync rather than Send (from Ms2ger:workqueue-sync); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: c76720d67c0d04f6d77c138c295b4fd4ebf24ee3
2015-07-07 13:07:31 -06:00
Patrick Walton
973311f4cb servo: Merge #6492 - layout: Modify styles for replaced content as appropriate during incremental flow construction (from pcwalton:even-more-jumpiness); r=mbrubeck
Fixes jumpiness on lots of Web sites.

r? @mbrubeck

Source-Repo: https://github.com/servo/servo
Source-Revision: bbcd42773342a587a8515f34bdc3ca69a380c0a8
2015-07-07 10:28:04 -06:00
Josh Matthews
342b5cb2d3 servo: Merge #6540 - Make devtools usable once more (from jdm:devtoolsfix); r=glennw
This fixes the panic by rebasing #6189, and also makes cached messages appear once more.

Source-Repo: https://github.com/servo/servo
Source-Revision: c04b7bbf6e5efe2e5217b69c9680e4e91bbd6ecd
2015-07-07 09:43:36 -06:00
Corey Farwell
b8c8f36039 servo: Merge #6555 - Join tokens when stringifying DOMTokenList (from frewsxcv:stringify-tokenlist); r=Ms2ger
Source-Repo: https://github.com/servo/servo
Source-Revision: d64f91863af6c22b3af6d5ea5ebfd671f4e83aaa
2015-07-07 08:58:35 -06:00
David Winslow
e1fe3acd66 servo: Merge #6565 - Fix for #6542 - <img> top-padding adds margin (from dwins:issue_6452_image_padding); r=pcwalton
I wrote this patch that makes the test from #6542 render as expected but I am not confident it is actually the right fix.  Should the padding be included in the 'ascent' metric for images, or am I just introducing a bug that happens to offset the one I'm trying to fix?

Source-Repo: https://github.com/servo/servo
Source-Revision: 0688488a7fd3caee423968b33d6c19d79f94d29a
2015-07-07 06:27:13 -06:00
Patrick Walton
0141dfbe06 servo: Merge #6487 - gfx: Use a pattern instead of tiling images manually (from pcwalton:background-tiling); r=glennw
r? @SimonSapin

Source-Repo: https://github.com/servo/servo
Source-Revision: ae01e97efa31a180374dc0fd623ff03a650f7878
2015-07-07 05:42:07 -06:00
Ms2ger
8b7d8473f3 servo: Merge #6571 - Silence unused variable warnings in properties.rs (from Ms2ger:warnings); r=SimonSapin
Source-Repo: https://github.com/servo/servo
Source-Revision: 8b9f7d7764611ab0e6c81fe884f68fd274441c3d
2015-07-07 00:50:17 -06:00
Ms2ger
d22da98baa servo: Merge #6543 - Only make a elements activatable when they have an href attribute (from Ms2ger:a-href-activate); r=jdm
I've tested this manually, by clicking on the "baz" in code like

```js
var a = document.body.appendChild(document.createElement("a"));
a.textContent = "bar ";
a.setAttribute("href", "http://www.yahoo.com");
var b = a.appendChild(document.createElement("a"));
b.textContent = "baz";
```

but I've not found a way to write an automated test.

Source-Repo: https://github.com/servo/servo
Source-Revision: 1618a9e73d662159ed36f35bca6ea36fa0e58d90
2015-07-06 23:17:05 -06:00
Michael Tremel
d6909dcf87 servo: Merge #6567 - Remove unused import (from mt2d2:remove_unused_imports); r=glennw
Remove an unused import. This prevents a compiler warning in ```util```.

Source-Repo: https://github.com/servo/servo
Source-Revision: a0db2cf1bb720130aabd0d755e9432bd17063740
2015-07-06 16:37:05 -06:00
Glenn Watson
0686325db5 servo: Merge #6566 - Add servo Image type. Remove rust-png dependency from script, gfx, layout (from glennw:image-deps); r=pcwalton
Source-Repo: https://github.com/servo/servo
Source-Revision: 3a3ac2281b2d137ba620194e037ec671b746530c
2015-07-06 13:45:04 -06:00
Kevin Ball
9fe943b645 servo: Merge #6559 - Implement Node.baseURI (from kball:IS1824-implement-Node.baseURI); r=Ms2ger
Addresses Issue #1824.  Implements Node.baseURI based on https://www.w3.org/Bugs/Public/show_bug.cgi?id=20976#c32

Source-Repo: https://github.com/servo/servo
Source-Revision: 1e1604784675bf378cf0feea48bd22a668285f84
2015-07-06 11:04:45 -06:00
ecoal95
4f37e0ba01 servo: Merge #6380 - Refactor WebGL implementation to move logic inside the DOM interfaces (from emilio:webgl-refactoring); r=jdm
This improves the encapsulation and consistency in our WebGL
implementation.

Also allows to implement new methods such as `getShaderSource()`.

It will also allow us to use `delete()` in the destructors of them (note
that we will probably want to keep track of them from the context before).

Some concerns:

**Trait method repetition**:
I'm aware that the traits `WebGL{Buffer,Renderbuffer,Framebuffer,Texture}Helpers` are basically the same, but `delete()` and `id()` methods are everywhere. I've thought something like:

```rust
pub trait WebGLIdentifiable {
    type WebGLId; // id is sometimes i32 (see WebGLUniformLocation)
    fn id(&self) -> Self::WebGLId;
}

pub trait WebGLBindable {
    fn bind(&self);
}

pub trait WebGLDeletable {
    fn delete(&self);
}
```

But I'd want to know your opinion first.

**`renderer` repetition**:
Thought of moving the field: `renderer: Sender<CanvasMsg>` to `WebGLObject`, but I think it makes it way more complicated to read, and also a bit unnecessary, at least IMO (`WebGLObject` will never interact with the field directly). It would also mean that all `WebGLObject`s should have one, which is true at this moment, but maybe not with WebGL 2, for example.

Source-Repo: https://github.com/servo/servo
Source-Revision: 0f8095b950dd144497919cfea65a1f154ed3ae9a
2015-07-06 09:12:59 -06:00
Ms2ger
26f7280725 servo: Merge #6547 - Borrow the QueueData for WorkQueue::run (from Ms2ger:workqueue-reference); r=pcwalton
This allows us to get rid of the raw pointers and unsafe dereferencing in
the parallel layout implementation.

Source-Repo: https://github.com/servo/servo
Source-Revision: a3821bf24094bf5bb2a9553e66b69da3b6430aa5
2015-07-06 08:29:17 -06:00
Patrick Walton
5d559cd4ed servo: Merge #6364 - layout: Outline the individual property cascading functions to reduce I-cache footprint (from pcwalton:debloat-cascade); r=SimonSapin
Reduces the size of `properties::cascade` from over 100K of code to
under 5K. Due to the improved I-cache utilization, improves ARM scaling
on 4 cores by 15%.

r? @SimonSapin (feel free to punt to someone else if you like)

Source-Repo: https://github.com/servo/servo
Source-Revision: 6386addb01dfec4bda38f99e534516ddf5ff77aa
2015-07-06 07:45:38 -06:00
Patrick Walton
703badb6cb servo: Merge #6365 - layout: Disable parallel display list building by default (from pcwalton:sequential-display-list-construction); r=larsbergstrom
I've never see it result in a speedup. Actually, I don't think I've seen
it result in anything better than a 50% slowdown. The arithmetic
intensity is just too low, at least with the current algorithm.

Parallel DL building can still be enabled with a debug flag if the
algorithm is improved.

r? @metajack

Source-Repo: https://github.com/servo/servo
Source-Revision: b876a54dce091e161b87340130446597dd864732
2015-07-06 07:08:58 -06:00
Tim Taubert
0cceca72b1 servo: Merge #6505 - Implement crypto.getRandomValues() (from ttaubert:issue/4666-crypto-getRandomValues); r=Ms2ger
Didn't touch mozjs or rust-mozjs because implementing that in the code generator didn't seem too easy. I'm using the same workaround that the TextDecoder does.

Using the OsRng should be the right choice here? As the OS keeps state for us we wouldn't need to have a global rng instance to keep around.

Fixes #4666.

Source-Repo: https://github.com/servo/servo
Source-Revision: c0222628264423a67bf98775be83dcf2f85211ab
2015-07-05 22:16:19 -06:00
Michael Wu
fac8c79199 servo: Merge #6546 - Remove LayoutChan from LayoutDataWrapper (from michaelwu:slim-layoutdatawrapper); r=Ms2ger
Saves 32 bytes in Node.

Source-Repo: https://github.com/servo/servo
Source-Revision: cc73aad447f0455606a5a6005d31aa55334668a8
2015-07-05 21:39:12 -06:00
Ms2ger
a718817e6f servo: Merge #6557 - Update rust-mozjs (from Ms2ger:update-js); r=jdm
Source-Repo: https://github.com/servo/servo
Source-Revision: db9e29a5f3c3600dcdd5c2b4e5a3e1e0baf917d7
2015-07-05 09:38:20 -06:00