Commit graph

17187 commits

Author SHA1 Message Date
Keith Yeung
c75079eff3 Add API base url method to global objects 2016-04-11 07:49:31 -04:00
Ms2ger
5127d2e2a6 Update smallvec. 2016-04-11 13:38:25 +02:00
bors-servo
5adf36231e Auto merge of #10516 - Ms2ger:cleanup, r=nox
Various cleanup.

<!-- 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/10516)
<!-- Reviewable:end -->
2016-04-11 14:13:48 +05:30
Ms2ger
3f95e4c8e1 Use upcast() in XMLDocument methods. 2016-04-11 10:30:08 +02:00
Ms2ger
0633ca4144 Remove unused import from xmldocument. 2016-04-11 10:29:51 +02:00
Ms2ger
71f56d6744 Simplify PrecedingNodeIterator::next(). 2016-04-11 10:29:32 +02:00
Ms2ger
0d732ebb5f Implement Clone for Root. 2016-04-11 10:29:13 +02:00
bors-servo
5aa62b3621 Auto merge of #10514 - frewsxcv:element-cleanup, r=KiChjang
Various 'element.rs' cleanup.

<!-- 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/10514)
<!-- Reviewable:end -->
2016-04-11 09:27:11 +05:30
Corey Farwell
11a3ce1257 Remove get_* on getters as per RFC 0344.
https://github.com/rust-lang/rfcs/blob/master/text/0344-conventions-galore.md#gettersetter-apis

https://github.com/servo/servo/issues/6224
2016-04-10 22:49:35 -04:00
Corey Farwell
3b376bb319 Remove superfluous end-of-file whitespace. 2016-04-10 22:03:27 -04:00
Corey Farwell
e397b30278 Remove dead link. 2016-04-10 22:03:03 -04:00
bors-servo
e10ab5ae53 Auto merge of #10503 - canaltinova:master, r=KiChjang
Replaced SendParam with BodyInit

Replaced SendParam with BodyInit. Fixes #9433 .

<!-- 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/10503)
<!-- Reviewable:end -->
2016-04-10 03:38:08 +05:30
Nazım Can Altınova
d49a84c762 Replaced SendParam with BodyInit 2016-04-10 01:02:04 +03:00
bors-servo
5a3d6850c6 Auto merge of #10501 - canaltinova:master, r=KiChjang
Removed unused imports from methods.rs

Fixes #10500

<!-- 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/10501)
<!-- Reviewable:end -->
2016-04-10 01:21:04 +05:30
bors-servo
c33bf4987a Auto merge of #10257 - slayerjain:first_bug, r=KiChjang
Fixes #10141.

<!-- 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/10257)
<!-- Reviewable:end -->
2016-04-10 00:39:51 +05:30
Nazım Can Altınova
d22d1c4fc1 Removed unused imports from methods.rs 2016-04-09 22:09:11 +03:00
shubham_jain
6626c5cfd4 issue #10141 : Document::location set null for documents without a browsing context. r=Ms2ger 2016-04-09 22:54:07 +05:30
bors-servo
32e53b80e2 Auto merge of #10086 - KiChjang:table-rows, r=Manishearth
Implement HTMLTableElement#rows

Fixes #8084.

<!-- 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/10086)
<!-- Reviewable:end -->
2016-04-09 16:36:40 +05:30
bors-servo
4720992ffc Auto merge of #10203 - Shiroy:script-not-found-executed, r=Ms2ger
Avoid script execution when not found

Fix #8391

If the status code is an error or has not been received, we discard data and prevent the script from being executed.

<!-- 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/10203)
<!-- Reviewable:end -->
2016-04-09 15:56:57 +05:30
Ulf Nilsson
b631202e66 Fix sandboxing on OS X
The main issue was resources_dir_path. Every time it was called it would start from the executable's path and walk up the hierarchy to find a directory named "resources". The sandbox was granted permission to read from the found resources dir, but after the sandbox had been activated resources_dir_path would again start from the executable's path and try to find the resources dir. It would then fail with "Operation not permitted" when trying to canonicalize the path because it didn't have permissions to read metadata under ./target.

To fix this the resources dir path is now cached between resources_dir_path calls.
2016-04-09 11:32:50 +02:00
Matthias Krüger
2ba6d39716 readme: add build status badges 2016-04-09 10:30:27 +02:00
Shiroy
ee9bb1f3c6 Avoid script execution when not found
Fix #8391
2016-04-09 09:57:35 +02:00
Daniel Robertson
e0454e0b65 Add tests and clean up *_mode_assign_inline_sizes
Clean up block_mode_assign_inline_sizes and
inline_mode_assign_inline_sizes and add extra css tests.
2016-04-09 01:13:30 -04:00
bors-servo
90ab488d42 Auto merge of #10495 - asajeffrey:temporarily-disable-unwrap-test, r=KiChjang
Removed etc/ci/check_no_unwrap.sh from .travis.yml

Temporarily disable #10448 until all the uses of unwrap are removed from the constellation/compositor.

<!-- 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/10495)
<!-- Reviewable:end -->
2016-04-09 08:20:07 +05:30
Alan Jeffrey
ce5ee47be6 Removed etc/ci/check_no_unwrap.sh from .travis.yml 2016-04-08 21:44:40 -05:00
bors-servo
269eeeddd2 Auto merge of #10494 - pcwalton:overflow-scroll-nested-fixed-height, r=mbrubeck
layout: Make inner scroll wrappers acquire the overflow region of their contents.

Makes Twitter pages show up when scrolling, if WebRender is not in use.
WebRender does not yet support overflow:scroll.

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/10494)
<!-- Reviewable:end -->
2016-04-09 06:51:21 +05:30
Patrick Walton
6a6b688fa8 layout: Make inner scroll wrappers acquire the overflow region of their
contents.

Makes Twitter pages show up when scrolling, if WebRender is not in use.
WebRender does not yet support overflow:scroll.
2016-04-08 18:18:49 -07:00
bors-servo
0a1efe4578 Auto merge of #10320 - malayaleecoder:master, r=KiChjang
Rename imm_child_iter() and child_iter().

Fixes #10286

<!-- 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/10320)
<!-- Reviewable:end -->
2016-04-09 03:54:40 +05:30
bors-servo
93c41fba69 Auto merge of #10484 - emilio:reupdate-stylo-bindings, r=bholley
geckolib: reupdate bindings to allow easy union modifications

This commit updates the current bindings with a m-c trunk build.

This improves quite a few things:
 * It adds `Debug` support for structs, which should be easy.
 * It generates unnamed structs definitions.
 * And... It allows changing union types directly!

The way mutating a union works is as follows. Each union field has an
unsized field of type `__BindgenUnionField<T>`, where `T` is the type of
the field.

The field has two unsafe methods, `as_ref` and `as_mut`, that would work
as follows (assuming 64 bit pointers):

````rust
let u = nsStyleUnion {
    mInt: Default::default(),
    mFloat: Default::default(),
    mPointer: Default::default(),
    _bindgen_data_: 0,
};

unsafe {
    assert_eq!(*u.mInt.as_ref() == 0);
    *u.mPointer.as_mut() = !0 as *mut _;
    assert_eq!(*u.mInt.as_ref() == !0);
    *u.mInt.as_mut() = 0;
    assert_eq!(*u.mInt.as_ref() == 0);
    assert_eq!(*u.mPointer.as_ref() == (!0 << 32) as *mut _);
}
```

<!-- 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/10484)
<!-- Reviewable:end -->
2016-04-09 02:06:09 +05:30
bors-servo
4da38cdd7c Auto merge of #10324 - perlun:rename-style-structs, r=bholley
Renamed the style structs

Renamed style structs.

The idea is to rename all style structs from Foo to ServoFoo, as described out in #10185.

<!-- 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/10324)
<!-- Reviewable:end -->
2016-04-09 01:24:28 +05:30
Emilio Cobos Álvarez
c906d06d4e
geckolib: reupdate bindings to allow easy union modifications
This commit updates the current bindings with a m-c trunk build.

This improves quite a few things:
 * It adds `Debug` support for structs, which should be easy.
 * It generates unnamed structs definitions.
 * And... It allows changing union types directly!

The way mutating a union works is as follows. Each union field has an
unsized field of type `__BindgenUnionField<T>`, where `T` is the type of
the field.

The field has two unsafe methods, `as_ref` and `as_mut`, that would work
as follows (assuming 64 bit pointers):

````
let u = nsStyleUnion {
    mInt: Default::default(),
    mFloat: Default::default(),
    mPointer: Default::default(),
    _bindgen_data_: 0,
};

unsafe {
    assert_eq!(*u.mInt.as_ref() == 0);
    *u.mPointer.as_mut() = !0 as *mut _;
    assert_eq!(*u.mInt.as_ref() == !0);
    *u.mInt.as_mut() = 0;
    assert_eq!(*u.mInt.as_ref() == 0);
    assert_eq!(*u.mPointer.as_ref() == (!0 << 32) as *mut _);
}
```
2016-04-08 21:49:13 +02:00
malayaleecoder
d4dcaf3167 Rename imm_child_iter() and child_iter(). Fixes #10286 2016-04-09 01:18:00 +05:30
bors-servo
c56eb65b7c Auto merge of #10448 - matthiaskrgr:travis, r=aneeshusa
travis: add and run script which checks if listed files contain "unwrap". Should fix #10446.

Unfortunately there is a lot of python code in tidy.py that I don't understand yet, so I simply wrote a bash script to do the job and hooked it up in travis.yml.

Tests are expected to fail:

````
components/compositing/compositor.rs:758:        self.pipeline_details.get_mut(&pipeline_id).unwrap()
components/compositing/compositor.rs:2194:        RgbImage::from_raw(width as u32, height as u32, pixels).unwrap()
components/compositing/pipeline.rs:130:        let (paint_shutdown_chan, paint_shutdown_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:131:        let (layout_shutdown_chan, layout_shutdown_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:132:        let (pipeline_chan, pipeline_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:133:        let (script_to_compositor_chan, script_to_compositor_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:151:            let (script_to_devtools_chan, script_to_devtools_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:154:                let message: ScriptToDevtoolsControlMsg = message.to().unwrap();
components/compositing/pipeline.rs:155:                devtools_chan.send(DevtoolsControlMsg::FromScript(message)).unwrap()
components/compositing/pipeline.rs:161:            ipc::channel().unwrap();
components/compositing/pipeline.rs:174:                    pipeline_port: mem::replace(&mut pipeline_port, None).unwrap(),
components/compositing/pipeline.rs:180:                           .unwrap();
components/compositing/pipeline.rs:184:                let (script_chan, script_port) = ipc::channel().unwrap();
components/compositing/pipeline.rs:190:            ipc::channel().unwrap();
components/compositing/pipeline.rs:298:        let (sender, receiver) = ipc::channel().unwrap();
components/compositing/pipeline.rs:300:        receiver.recv().unwrap();
components/compositing/pipeline.rs:315:        let _ = self.script_chan.send(ConstellationControlMsg::Freeze(self.id)).unwrap();
components/compositing/pipeline.rs:319:        let _ = self.script_chan.send(ConstellationControlMsg::Thaw(self.id)).unwrap();
components/compositing/pipeline.rs:323:        let _ = self.script_chan.send(ConstellationControlMsg::ExitPipeline(self.id)).unwrap();
components/compositing/pipeline.rs:326:        let _ = layout_channel.send(LayoutControlMsg::ExitNow).unwrap();
components/compositing/pipeline.rs:343:        let index = self.children.iter().position(|id| *id == frame_id).unwrap();
components/compositing/pipeline.rs:355:        self.script_chan.send(event).unwrap();
components/compositing/pipeline.rs:402:            control_port: mem::replace(&mut self.script_port, None).unwrap(),
components/compositing/pipeline.rs:423:                                  self.pipeline_port.unwrap(),
components/compositing/pipeline.rs:437:            self.script_content_process_shutdown_port.recv().unwrap();
components/compositing/pipeline.rs:438:            self.layout_content_process_shutdown_port.recv().unwrap();
components/compositing/constellation.rs:464:            IpcOneShotServer::<IpcSender<UnprivilegedPipelineContent>>::new().unwrap();
components/compositing/constellation.rs:468:            let mut command = sandbox::Command::me().unwrap();
components/compositing/constellation.rs:474:            let path_to_self = env::current_exe().unwrap();
components/compositing/constellation.rs:478:            ChildProcess::Unsandboxed(child_process.spawn().unwrap())
components/compositing/constellation.rs:482:        let (_receiver, sender) = server.accept().unwrap();
components/compositing/constellation.rs:835:            stderr.write_all("Pipeline failed in hard-fail mode.  Crashing!\n".as_bytes()).unwrap();
components/compositing/constellation.rs:1621:            let (sender, receiver) = ipc::channel().unwrap();
components/compositing/constellation.rs:1657:                        let (sender, receiver) = ipc::channel().unwrap();
components/compositing/constellation.rs:1659:                        layout_chan.send(LayoutControlMsg::GetCurrentEpoch(sender)).unwrap();
components/compositing/constellation.rs:1660:                        let layout_thread_epoch = receiver.recv().unwrap();
components/compositing/constellation.rs:1838:                let (chan, port) = ipc::channel().unwrap();
````

<!-- 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/10448)
<!-- Reviewable:end -->
2016-04-09 00:37:05 +05:30
Per Lundberg
96835c6d6f Renamed style structs.
The idea is to rename all style structs from Foo to ServoFoo, as described out in #10185.
2016-04-08 21:47:36 +03:00
Matthias Krüger
dc4fe7e337 travis: add and run script which checks if listed files contain "unwrap". Should fix #10446. 2016-04-08 20:11:08 +02:00
bors-servo
217e45006b Auto merge of #10471 - KiChjang:mime-macro, r=emilio
Use mime! macro in fetch methods

<!-- 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/10471)
<!-- Reviewable:end -->
2016-04-08 22:00:15 +05:30
Keith Yeung
32f309c02e Use mime! macro in fetch methods 2016-04-08 11:26:48 -04:00
bors-servo
a026e86267 Auto merge of #10444 - danlrobertson:fix9824, r=asajeffrey
Correct x and y input for origin_rect

Fix error in construction of the `origin_rect` for `UnioningFragmentBorderBoxIterator`.

r? @asajeffrey

<!-- 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/10444)
<!-- Reviewable:end -->
2016-04-08 20:35:32 +05:30
Jack Moffitt
1bec193415 Use better JS engine defaults
This adds in preferences for all the SM 39 available options (as
retrieved from Gecko), and uses the same defaults as Gecko. A few
properties are not supported yet, and incremental GC is still always
disabled regardless of the preference setting.

This also adds back in the options that were accidentally deleted when
\#10342 was rebased, which moved things from script_thread.rs to
script_runtime.rs.
2016-04-08 08:46:22 -06:00
bors-servo
2491af84fc Auto merge of #10461 - bholley:per_product, r=SimonSapin
Add some machinery to allow us to disable CSS properties/values per-product

Here's an initial stab at solving the issues @SimonSapin brought up in #10408.

<!-- 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/10461)
<!-- Reviewable:end -->
2016-04-08 18:56:43 +05:30
bors-servo
6150e174c1 Auto merge of #10466 - UK992:fix, r=KiChjang
Silent some 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/10466)
<!-- Reviewable:end -->
2016-04-08 17:15:03 +05:30
UK992
7896a05543 Rename handler to hook 2016-04-08 13:10:30 +02:00
bors-servo
13e21968e6 Auto merge of #10476 - KiChjang:remove-str-to-string, r=Ms2ger
Remove str_to_string compile test

Fixes #10474.

<!-- 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/10476)
<!-- Reviewable:end -->
2016-04-08 16:35:45 +05:30
Keith Yeung
5959aa6cbe Remove str_to_string compile test 2016-04-08 07:00:49 -04:00
bors-servo
b6c4f51571 Auto merge of #10463 - amarant:10456-HTMLLegendElement-warnings, r=KiChjang
Issue #10456 Remove unused import warnings in HTMLLegendElement

Fixes #10456.

<!-- 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/10463)
<!-- Reviewable:end -->
2016-04-08 11:51:58 +05:30
bors-servo
f31aa5cb86 Auto merge of #10470 - Manishearth:kill-str-string, r=KiChjang
Remove str_to_string lint

Specialization makes all of the options equally efficient.

<!-- 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/10470)
<!-- Reviewable:end -->
2016-04-08 10:50:18 +05:30
bors-servo
bd2051d06a Auto merge of #10469 - mbrubeck:layout-misc, r=pcwalton
Some minor layout cleanups

* Prevent unnecessary copying in `strip_leading_whitespace_if_necessary`
* Remove unused argument to `adjust_clipping_region_for_children` (silences a compiler warning)

r? @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/10469)
<!-- Reviewable:end -->
2016-04-08 10:10:11 +05:30
bors-servo
bead958500 Auto merge of #10465 - stjepang:rescue-jit-prefs, r=KiChjang
Fix rebasing error

This PR mistakenly removed JIT enabling/disabling by preference:
https://github.com/servo/servo/pull/10342/files
Look for `get_pref`.

I'm putting the missing piece of code into the appropriate place in
script_runtime.rs

r? @KiChjang

<!-- 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/10465)
<!-- Reviewable:end -->
2016-04-08 09:29:07 +05:30
bors-servo
bcac1a3c95 Auto merge of #10423 - asajeffrey:constellation-pipeline-hardening, r=emilio,jdm
Removed sources of panic from piepline.rs.

Fixes #10422.

<!-- 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/10423)
<!-- Reviewable:end -->
2016-04-08 07:04:38 +05:30
Manish Goregaokar
efa84862af
Remove str_to_string lint
Specialization makes all of the options equally efficient.
2016-04-08 06:44:57 +05:30