Commit graph

13483 commits

Author SHA1 Message Date
Alex Crichton
e8eebc1111 Fix spurious rebuilds of the script crate
The script crate currently has a build script, and Cargo will consider all files
in the script crate as inputs to the build script as it otherwise doesn't know
[what the input files are][cargo-1162]. This means that if any file in the
source tree of the script crate changes (or is created) then Cargo will think it
needs to re-run the build script and rebuild the crate.

[cargo-1162]: https://github.com/rust-lang/cargo/issues/1162

The build script of the script crate is invoking python, and consequently Python
is generating some bytecode files in the source tree. On the second build of
Servo, Cargo will see these new files, think that something has changed, and
will re-run the build script of the script crate.

This change passes the `-B` flag to python to avoid generating these bytecode
files, which should avoid tampering with the source tree and appease Cargo by
ensuring that it doesn't get rebuilt.

---

As a helpful tip to if this comes up again, this was discovered by using the
changes in rust-lang/cargo@c447e9d plus the change in rust-lang/cargo#2044. Once
`RUST_LOG` was set to `cargo::ops::cargo_rustc::fingerprint=info`, the second
run of `./mach build` printed out:

```
precalculated components have changed:
  1444364448.000000000s (/build/servo/components/script/dom/bindings/codegen/parser/WebIDL.pyc) !=
  1444364235.000000000s (/build/servo/components/script/document_loader.rs)
```

Which should help easily diagnose these kinds of problems in the future!
2015-10-08 21:37:56 -07:00
Pierre Chevalier
8b5fe88bd3 Refactor away duplication of get_rooted functionality
Refactor .get().map(Root::from_rooted)
and .get().map(|foo| foo.root())
to .get_rooted() on MutNullableHeap objects.

First part done mechanically with the following comand:
sed -i s/"get().map(Root::from_rooted)"/"get_rooted()"/g *.rs

Second part done manually after finding them with
git grep ".get().map("

Fixes 7929.
2015-10-08 23:12:20 +01:00
Louis Chan
fb45b0e691 Implement a quota of 5MB per origin for localstorage and sessionstorage 2015-10-09 03:55:27 +08:00
bors-servo
ab42ca4296 Auto merge of #7825 - eefriedman:div-align, r=mbrubeck
Fully implement the "align descendants" rule for div.

This adds -servo-left and -servo-right to complement -servo-center.

~~This intentionally doesn't try to address issue #7301.~~  Commit added to address #7301.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7825)
<!-- Reviewable:end -->
2015-10-08 12:20:55 -06:00
bors-servo
a8ad990c6d Auto merge of #7928 - mrobinson:layer-tree-fix, r=pcwalton
Add the dump-layer-tree option to the -Z help text

I accidentally omitted this when I added the dump-layer-tree option
initially.

Fixes #7926.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7928)
<!-- Reviewable:end -->
2015-10-08 11:23:18 -06:00
Martin Robinson
1f2e1be2a3 Add the dump-layer-tree option to the -Z help text
I accidentally omitted this when I added the dump-layer-tree option
initially.

Fixes #7926.
2015-10-08 10:16:18 -07:00
Jim Berlage
0ffd2f636f Require the argument to WebSocket#send() (fixes #7858). 2015-10-08 12:08:26 -05:00
bors-servo
d15ea83938 Auto merge of #7917 - mrobinson:test-stderr, r=larsbergstrom
Record reference test stdout and stderr

When reference tests crash it is difficult to debug the issue, because
the stacktrace and any other output is discarded by the test harness.
Instead of discarding it, write the output to text files in the test
results directory which will make it easier to debug crashing tests.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7917)
<!-- Reviewable:end -->
2015-10-08 10:36:09 -06:00
bors-servo
f3c9ce322c Auto merge of #7927 - Ms2ger:test-ref, r=jdm
Use wptrunner for some old-style reftests.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7927)
<!-- Reviewable:end -->
2015-10-08 09:45:42 -06:00
Ms2ger
1f37ac0d71 Move attr_exists_selector.html to wpt reftests. 2015-10-08 17:20:18 +02:00
Ms2ger
2ca5f85d4e Move anon_block_inherit_a.html to wpt reftests. 2015-10-08 17:14:35 +02:00
Ms2ger
a938fe635f Move alpha_png_a.html to wpt reftests. 2015-10-08 17:10:29 +02:00
Ms2ger
652be7cdfe Move alpha_gif_a.html to wpt reftests. 2015-10-08 17:10:28 +02:00
Ms2ger
92e3266b1f Move after_block_iteration.html to wpt reftests. 2015-10-08 17:10:27 +02:00
Ms2ger
c9d4dc4e88 Move absolute_z_index_auto_paint_order_a.html to wpt reftests. 2015-10-08 17:10:25 +02:00
bors-servo
e5b46eb919 Auto merge of #7915 - frewsxcv:travis, r=larsbergstrom
Build Servo on Travis

Closes #6962

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7915)
<!-- Reviewable:end -->
2015-10-08 09:00:28 -06:00
Corey Farwell
ad399bd76f Build Servo on Travis 2015-10-08 10:59:06 -04:00
Corey Farwell
64f4835a4f Implement <body>'s "text" attribute 2015-10-08 10:55:12 -04:00
Ms2ger
374e3b3e26 Move absolute_table.html to wpt reftests. 2015-10-08 16:50:03 +02:00
Ms2ger
455cd8aaff Move absolute_inline_containing_block_a.html to wpt reftests. 2015-10-08 16:43:51 +02:00
Ms2ger
7e474bbf90 Move absolute_hypothetical_with_intervening_inline_block_a.html to wpt reftests. 2015-10-08 16:35:49 +02:00
Ms2ger
4b9ffeca03 Move abs_rel_explicit_height.html to wpt reftests. 2015-10-08 16:35:48 +02:00
Ms2ger
bd27740ebf Add missing changes to MANIFEST.json. 2015-10-08 16:35:45 +02:00
Ms2ger
25c19f77af Implement HTMLIFrameElement::pipeline_id on LayoutJS<HTMLIFrameElement>. 2015-10-08 11:00:56 +02:00
Paul Rouget
99cccb2193 Snap to screen pixels instead of px 2015-10-08 06:44:05 +02:00
bors-servo
26dd123310 Auto merge of #7913 - mrobinson:compositor-shutdown, r=pcwalton
Simplify and unify compositor shutdown code paths

Unify all compositor shutdown code paths into two methods, one which
starts the shutdown and the other that finishes it. This simplifies the
way the compositor shuts down and prevents "leaking" pixmaps when
exiting in uncommon ways.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7913)
<!-- Reviewable:end -->
2015-10-07 21:28:39 -06:00
bors-servo
81806385ea Auto merge of #7920 - glennw:flaky-snap, r=mbrubeck
Workaround for #7730.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7920)
<!-- Reviewable:end -->
2015-10-07 20:43:49 -06:00
bors-servo
b34e8b86b8 Auto merge of #7916 - glennw:flaky-mac, r=jdm
Don't check for equal image size and all white pixels for flaky tests.

Workaround for #7730.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7916)
<!-- Reviewable:end -->
2015-10-07 19:59:04 -06:00
Martin Robinson
dae22b6e80 Simplify and unify compositor shutdown code paths
Unify all compositor shutdown code paths into two methods, one which
starts the shutdown and the other that finishes it. This simplifies the
way the compositor shuts down and prevents "leaking" pixmaps when
exiting in uncommon ways.
2015-10-07 18:42:11 -07:00
Glenn Watson
a909f98db0 Workaround for #7730. 2015-10-08 10:47:13 +10:00
bors-servo
1d617f332e Auto merge of #7899 - glennw:subpage-fixes-1, r=pcwalton
Remove constellation round trip for subpage mapping in compositor.

This makes use of the new functionality that allows iframes to generate their own pipeline IDs in order to remove any knowledge of subpage ids from the compositor.

(This is the first of several commits removing subpage from parts of servo).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7899)
<!-- Reviewable:end -->
2015-10-07 18:36:35 -06:00
bors-servo
e7f73fdfd8 Auto merge of #7875 - jgraham:composite_no_exit, r=glennw
Move code to exit servo after writing a screenshot out of composite_specific_target.

The structure of this function was confusing, so move some parts out into the
caller where they seem like a more natural fit and add documentation of the
functions

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7875)
<!-- Reviewable:end -->
2015-10-07 17:50:23 -06:00
bors-servo
0b6cb92d78 Auto merge of #7843 - ecoal95:webgl-context-event, r=jdm
webgl: Implement WebGLContextEvent and use it on context creation error

spec: https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7843)
<!-- Reviewable:end -->
2015-10-07 17:04:10 -06:00
Anthony Ramine
6d6dbf0129 Derive PartialEq on the style Font structure
We check the hash first.
2015-10-08 00:32:58 +02:00
Emilio Cobos Álvarez
7030f09823 webgl: Implement WebGLContextEvent and use it on context creation error
spec: https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15
2015-10-08 00:29:31 +02:00
Martin Robinson
3cf4acd44b Record reference test stdout and stderr
When reference tests crash it is difficult to debug the issue, because
the stacktrace and any other output is discarded by the test harness.
Instead of discarding it, write the output to text files in the test
results directory which will make it easier to debug crashing tests.
2015-10-07 15:26:58 -07:00
Martin Robinson
fb80e51bd1 Properly size synthesized layers
Layers that are composed of several stacking contexts that need to be
rendered on top of other layered content need synthesized layers.
Previously, these layers were placed into a stacking context that was
the same size as their parent. This patch creates a new type of
PaintLayer which simply holds a display list. The layer is sized to the
bounds of the DisplayList and its children are positioned relative to
the parent stacking context.

This will also be useful in the future, when items outside of
StackingContexts are given their own layer for render order purposes.
2015-10-07 15:12:36 -07:00
Glenn Watson
987f00efbd Don't check for equal image size and all white pixels for flaky tests.
Workaround for #7730.
2015-10-08 08:02:28 +10:00
bors-servo
3e5b491a50 Auto merge of #7911 - Qeole:7907, r=jdm
Fixes #7907: rendering for unescaped string "<iframe>" in doc



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7911)
<!-- Reviewable:end -->
2015-10-07 13:59:24 -06:00
Qeole
8cc9611919 Fixes #7907: rendering for unescaped string "<iframe>" in doc 2015-10-07 21:51:42 +02:00
bors-servo
217c7da413 Auto merge of #7912 - eefriedman:compositor-layer, r=mrobinson
Make sure to correctly destroy old layers in collect_old_layers_for_pipeline.

The previous code would skip calling clear_all_tiles(), which led to a
panic in rust-layers. ("You should have disposed of the pixmap properly
with destroy()! This pixmap will leak!")

Ran into this messing around with pdf.js; no minimized testcase.
Maybe related to #7895.

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7912)
<!-- Reviewable:end -->
2015-10-07 12:56:13 -06:00
Eli Friedman
0df71c7d19 Make sure to correctly destroy old layers in collect_old_layers_for_pipeline.
The previous code would skip calling clear_all_tiles(), which led to a
panic in rust-layers. ("You should have disposed of the pixmap properly
with destroy()! This pixmap will leak!")

Ran into this messing around with pdf.js; no minimized testcase.
Maybe related to #7895.
2015-10-07 11:46:53 -07:00
bors-servo
04f42271f8 Auto merge of #7773 - psdh:assertReq7647, r=jdm
renaming AssertRequstMustHaveHeaders to AssertRequestMustIncludeHeaders

Fixes #7647

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7773)
<!-- Reviewable:end -->
2015-10-07 11:35:51 -06:00
Prabhjyot Singh Sodhi
d27c126013 renaming AssertRequstMustHaveHeaders to AssertRequestMustIncludeHeaders 2015-10-07 22:59:47 +05:30
bors-servo
94dc98717b Auto merge of #7892 - anthgur:form-data-refactor, r=jdm
Refactor html form dataset collection

Factor out FormDatum collection for `<input>`
Improve early return logic for getting the FormDatum from an `<input>`
Condense element type patterns

Proposed to close #7851

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7892)
<!-- Reviewable:end -->
2015-10-07 08:32:44 -06:00
Anthony Urena
31980a7a34 Refactor html form dataset collection
Factor out FormDatum collection for <input>
Improve early return logic for getting the FormDatum from an <input>
Condense element type patterns
2015-10-07 10:22:02 -04:00
bors-servo
60a77defe5 Auto merge of #7898 - frewsxcv:htmlfontelement-size-attribute-setter, r=nox
Use the correct IDL setter for <font>.size

Previously, the IDL attribute would incorrectly set the `size` attribute
for `<font>` elements as `AttrValue::String`. Now it correctly sets it
as `AttrValue::Length`. Also included is a regression test.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7898)
<!-- Reviewable:end -->
2015-10-07 07:04:28 -06:00
Corey Farwell
eabaf2c6a5 Use the correct IDL setter for <font>.size
Previously, the IDL attribute would incorrectly set the `size` attribute
for `<font>` elements as `AttrValue::String`. Now it correctly sets it
as `AttrValue::Length`. Also included is a regression test.
2015-10-07 08:28:43 -04:00
bors-servo
745635a706 Auto merge of #7903 - Ms2ger:codegen-docs, r=Manishearth
Add support for documenting CGAbstractMethods.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7903)
<!-- Reviewable:end -->
2015-10-07 06:20:20 -06:00
bors-servo
9a12c2c061 Auto merge of #7902 - mskrzypkows:HTMLInputElement_pub_refactor, r=nox
Removed unneeded pub annotations in HTMLInputElement  #7897

get_size method appeared to be never used so I removed it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7902)
<!-- Reviewable:end -->
2015-10-07 05:35:14 -06:00