Commit graph

17187 commits

Author SHA1 Message Date
Mohamed Albashir
b7a57ef487 Initial steps for CSSOM API 2016-03-31 18:17:30 -04:00
bors-servo
7518c4de93 Auto merge of #10082 - asajeffrey:remove-constellation-panic, r=glennw
Removed panicking when frame or pipeline lookup fails.

Removed the methods `pipeline(id)`, `pipeline_mut(id)`, `frame(id)` and `frame_mut(id)` from constellation, which panicked when the table lookup failed.

The panics were causing race conditions, e.g. visiting google.com and resizing the page would cause a panic, most likely due to an iframe being added and removed, with the `DOMLoad` event arriving after the iframe had been removed, causing a panic.

This patch fixes #10017 and #8769 (although in non-webrender builds there's now a different panic, see https://github.com/servo/servo/issues/10017#issuecomment-198160200).

There are a few `TODO` items in the initial commit, for cases where it's not completely obvious what to do in the case of failure.

<!-- 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/10082)
<!-- Reviewable:end -->
2016-04-01 03:30:57 +05:30
Alan Jeffrey
df82a5b24f Removed panicking when frame or pipeline lookup fails. 2016-03-31 16:18:36 -05:00
bors-servo
524a004e77 Auto merge of #10291 - jfhumann:10211, r=emilio
<!-- 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/10291)
<!-- Reviewable:end -->
2016-04-01 01:57:20 +05:30
bors-servo
acaac52be7 Auto merge of #10288 - jdm:dictseq, r=nox
Enable dictionaries in WebIDL sequences. Fixes #10282.

r? @nox

<!-- 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/10288)
<!-- Reviewable:end -->
2016-04-01 00:28:13 +05:30
Patrick Walton
c95dbf7776 compositing: Send only one mouse move event if WebRender is in use.
In WebRender mode, we were sending two mouse move events: one with the
proper coordinates and one with the wrong coordinates, because of
incorrect fall-through. The script task would usually (but not always,
depending on timing) ignore the first event in favor of the second
event, resulting in incorrect mouse move event coordinates in most
cases.

Closes servo/webrender#238.
Closes #10298.
2016-03-31 11:26:08 -07:00
James Graham
06da4412f6 Update to latest wptrunner 2016-03-31 18:29:28 +01:00
bors-servo
f10c01cd39 Auto merge of #10249 - canaltinova:master, r=jdm
Make input elements not inherit parent containers alignment

Fixes  #10234 .

<!-- 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/10249)
<!-- Reviewable:end -->
2016-03-31 22:50:29 +05:30
bors-servo
84a3dee67e Auto merge of #10302 - emilio:webrender-up, r=nox
Update webrender to master

I'll rebase #10224 against it.

Sorry for the blocking of #10224, I expected it to be reviewed way sooner, my fault for landing breaking changes.

r? @nox or @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/10302)
<!-- Reviewable:end -->
2016-03-31 21:51:06 +05:30
bors-servo
b38fafcf11 Auto merge of #10202 - ConnorGBrewster:stylesheet-node-mapping, r=nox
Added a mapping between nodes and stylesheets

Currently a work in progress solution for #10143.

I am not sure how to make the stylesheets() func return a `Ref<Vec<Arc<Stylesheet>>>` or if this way work just as well.

If anyone has any feedback, that would be great.

<!-- 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/10202)
<!-- Reviewable:end -->
2016-03-31 20:48:03 +05:30
Josh Matthews
2cfedc7288 Report errors from ScriptPort trait methods. 2016-03-31 17:14:23 +02:00
Connor Brewster
f727444a14 Added a mapping between nodes and stylesheets
Changed stylesheets into_iter to iter
2016-03-31 08:22:00 -06:00
Emilio Cobos Álvarez
97f4ef28d4 Update webrender to master
I'll rebase #10224 against it.
2016-03-31 15:49:22 +02:00
bors-servo
3c00aff546 Auto merge of #10285 - nox:devtools-serde, r=Ms2ger
Use serde in devtools

<!-- 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/10285)
<!-- Reviewable:end -->
2016-03-31 18:36:13 +05:30
Anthony Ramine
406273c641 Use serde in devtools 2016-03-31 11:07:18 +02:00
Ms2ger
3c6cc642ee Implement Document::cookie correctly for cookie-averse documents. 2016-03-31 10:40:10 +02:00
Paul Padier
30555812dc Skip failing test 2016-03-31 14:20:36 +09:00
Paul Padier
86dcef1455 Clean up spacing 2016-03-31 14:20:36 +09:00
Paul Padier
1e8e5d61d2 Don't use premultiply table for put_image_data 2016-03-31 14:20:36 +09:00
Murali Ramanujam
0e4b14c8b4 Add git to list of packages to be installed
I tried to get started on Servo development but realised that a clean build of Ubuntu did not come with git out of the box. I had to manually install this before moving on with the next steps (clone and build).
2016-03-31 11:52:42 +08:00
bors-servo
436f7316d9 Auto merge of #10297 - servo:the-offscreens, r=pcwalton
Update webrender with crates.io's offscreen_gl_context (fixes #10296)

Crate webrender is bumped to the first commit in https://github.com/servo/webrender/pull/248.
Crate webrender_traits is bumped to the merge of https://github.com/servo/webrender_traits/pull/21.

<!-- 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/10297)
<!-- Reviewable:end -->
2016-03-31 06:42:31 +05:30
Matt Brubeck
53250b3827 Set a default ::selection style 2016-03-30 18:05:34 -07:00
bors-servo
af06d32628 Auto merge of #10287 - Ms2ger:domain, r=jdm
Include square brackets for IPv6 addresses in Document::domain.

The specification changed out from under us.

It's unfortunately impossible to write a test for this right now.

<!-- 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/10287)
<!-- Reviewable:end -->
2016-03-31 05:44:10 +05:30
Anthony Ramine
48b5d1d6be Update webrender with crates.io's offscreen_gl_context (fixes #10296)
Crate webrender is bumped to the first commit in https://github.com/servo/webrender/pull/248.
Crate webrender_traits is bumped to the merge of https://github.com/servo/webrender_traits/pull/21.
2016-03-31 02:02:02 +02:00
Anthony Ramine
a81793c908 Reorder dependencies in components/canvas/Cargo.toml 2016-03-31 01:36:50 +02:00
bors-servo
ed9c64e827 Auto merge of #10275 - bholley:style_struct_templates, r=SimonSapin
Use more mako machinery in geckolib (and make a few small changes to style/properties.mako.rs)

<!-- 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/10275)
<!-- Reviewable:end -->
2016-03-31 04:46:11 +05:30
Alan Jeffrey
f9f15876cd Miscellaneous fixes to harden the constellation. 2016-03-30 18:01:28 -05:00
Nazım Can Altınova
c13ea8a253 Make input elements not inherit parent containers alignment
Added a reftest for input element's alignment

Added float: left beacause text-align: center centers the input's itself.

Removed 'rtl' alignment
2016-03-31 01:35:36 +03:00
bors-servo
e5e559d414 Auto merge of #10268 - Ms2ger:rc-runtime, r=Manishearth
Stop reference-counting Runtime for workers.

<!-- 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/10268)
<!-- Reviewable:end -->
2016-03-31 03:41:19 +05:30
Alan Jeffrey
6dab59f8ce Added comment explaining why the constellation still panics in the case of recv failure. 2016-03-30 16:10:09 -05:00
bors-servo
723989b9dd Auto merge of #10252 - emilio:selection, r=mbrubeck
Implement ::selection pseudo-element

It only supports `color` and `background`, for now, but it shouldn't be hard to add more properties (like text-shadow).

r? @mbrubeck

<!-- 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/10252)
<!-- Reviewable:end -->
2016-03-31 00:47:07 +05:30
Jan-Fabian Humann
d778562844 #10211: Stop re-exporting webrender_traits WebGL types from canvas_traits 2016-03-30 20:05:16 +02:00
Bobby Holley
4959b69ba7 Use templates to implement the traits in geckolib. 2016-03-30 10:52:09 -07:00
Bobby Holley
d52299b17c Move handling of additional-methods into the data structures. 2016-03-30 10:42:26 -07:00
Bobby Holley
0bdbf815f9 Take an initial pass of putting binding-generated gecko style structs inside GeckoComputedValues. 2016-03-30 10:33:57 -07:00
Bobby Holley
a7447aaf74 Don't require style structs to implement PartialEq.
It turns out this isn't necessary, and requiring it for gecko style structs
would be a pain.
2016-03-30 10:33:57 -07:00
Bobby Holley
4d2cf9e277 Remove unenforced trait bound that generates a warning.
Fixes #10239.
2016-03-30 10:33:57 -07:00
Josh Matthews
042883eac2 Enable dictionaries in WebIDL sequences. Fixes #10282. 2016-03-30 11:07:37 -04:00
Ms2ger
231208a522 Include square brackets for IPv6 addresses in Document::domain.
The specification changed out from under us.

It's unfortunately impossible to write a test for this right now.
2016-03-30 16:45:13 +02:00
bors-servo
e148571812 Auto merge of #10238 - jdm:winunit, r=larsbergstrom
Run unit tests on appveyor

<!-- 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/10238)
<!-- Reviewable:end -->
2016-03-30 19:58:30 +05:30
bors-servo
821afa071e Auto merge of #10242 - asajeffrey:remove-constellation-send-panic, r=metajack
Replace any uses of .send().unwrap() by .send().unwrap_or_else().

This is part of the effort to harden the constellation (#10124), in this case against panics caused by channel send.

<!-- 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/10242)
<!-- Reviewable:end -->
2016-03-30 19:06:38 +05:30
Emilio Cobos Álvarez
46829bd53c tests: Fix warning in unit tests 2016-03-30 14:28:13 +02:00
Emilio Cobos Álvarez
4460712a8f layout: Propagate selected_style to InlineFragmentNodeInfo 2016-03-30 14:28:13 +02:00
Emilio Cobos Álvarez
359f7b7953 layout: Fix whitespace selected style 2016-03-30 14:28:12 +02:00
Emilio Cobos Álvarez
5303048c06 layout: prevent an extra arc clone for selected_style 2016-03-30 14:28:11 +02:00
Emilio Cobos Álvarez
92f39ea5cf Implement ::selection pseudo-element 2016-03-30 14:28:11 +02:00
bors-servo
4aa1da3211 Auto merge of #10283 - servo:js, r=nox
Update js (fixes #10229).

<!-- 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/10283)
<!-- Reviewable:end -->
2016-03-30 16:43:35 +05:30
Ms2ger
8d202fd963 Update js (fixes #10229). 2016-03-30 12:38:18 +02:00
bors-servo
77444d00be Auto merge of #10279 - notriddle:issue_10258, r=mbrubeck
Fix #10258

Respect border-box when computing the relative sizes of children.

<!-- 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/10279)
<!-- Reviewable:end -->
2016-03-30 12:48:40 +05:30
bors-servo
21e4936f6a Auto merge of #10276 - emilio:stylo-fixes-and-doc, r=bholley
Update struct bindings to take alignment into account

This takes alignment into account on non-translatable types, so the only
failing tests now are:

```
bindgen_test_layout_StyleAnimation
bindgen_test_layout_nsStyleSVG
```

This includes:
36f18c9603

r? @bholley

<!-- 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/10276)
<!-- Reviewable:end -->
2016-03-30 11:55:55 +05:30