Commit graph

12333 commits

Author SHA1 Message Date
Michael Tremel
0833c16b00 Remove unused import. 2015-07-06 21:31:03 -07:00
David Winslow
e76d232702 Add reftest for img padding/margin behavior 2015-07-06 16:11:53 -04:00
bors-servo
3a3ac2281b Auto merge of #6566 - glennw:image-deps, r=pcwalton
Add servo Image type. Remove rust-png dependency from script, gfx, layout.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6566)
<!-- Reviewable:end -->
2015-07-06 13:45:04 -06:00
Glenn Watson
83301ebb75 Add servo Image type. Remove rust-png dependency from script, gfx, layout. 2015-07-07 08:45:01 +10:00
David Winslow
261711d51a Include padding in ascent reported for <img>
fixes #6452
2015-07-06 15:28:13 -04:00
bors-servo
1e16047846 Auto merge of #6559 - kball:IS1824-implement-Node.baseURI, r=Ms2ger
Implement Node.baseURI

Addresses Issue #1824.  Implements Node.baseURI based on https://www.w3.org/Bugs/Public/show_bug.cgi?id=20976#c32

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6559)
<!-- Reviewable:end -->
2015-07-06 11:04:45 -06:00
Kevin Ball
a269f7f7b5 Update document-base-url test expected outcome to PASS 2015-07-06 11:09:53 -07:00
Kevin Ball
9ac5eb3e3c Fix code review concerns on tests 2015-07-06 08:31:39 -07:00
bors-servo
0f8095b950 Auto merge of #6380 - ecoal95:webgl-refactoring, r=jdm
Refactor WebGL implementation to move logic inside the DOM interfaces

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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6380)
<!-- Reviewable:end -->
2015-07-06 09:12:59 -06:00
ecoal95
8438db89e1 address review comments 2015-07-06 23:02:51 +02:00
ecoal95
9b306aced6 webgl: implement getError 2015-07-06 19:55:48 +02:00
ecoal95
42bd43a696 webgl: Make bind* calls more spec-compliant 2015-07-06 19:54:06 +02:00
ecoal95
b1765c6882 webgl: Refactor implementation to move logic inside the DOM interfaces
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 want to keep track of them from the context).
2015-07-06 19:54:05 +02:00
bors-servo
a3821bf240 Auto merge of #6547 - Ms2ger:workqueue-reference, r=pcwalton
Borrow the QueueData for WorkQueue::run.

This allows us to get rid of the raw pointers and unsafe dereferencing in
the parallel layout implementation.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6547)
<!-- Reviewable:end -->
2015-07-06 08:29:17 -06:00
bors-servo
6386addb01 Auto merge of #6364 - pcwalton:debloat-cascade, r=SimonSapin
layout: Outline the individual property cascading functions to reduce I-cache footprint.

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)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6364)
<!-- Reviewable:end -->
2015-07-06 07:45:38 -06:00
Patrick Walton
5d8b213201 layout: Outline the individual property cascading functions to reduce
I-cache footprint.

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%.
2015-07-06 12:42:31 -07:00
bors-servo
b876a54dce Auto merge of #6365 - pcwalton:sequential-display-list-construction, r=larsbergstrom
layout: Disable parallel display list building by default.

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

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6365)
<!-- Reviewable:end -->
2015-07-06 07:08:58 -06:00
bors-servo
c022262826 Auto merge of #6505 - ttaubert:issue/4666-crypto-getRandomValues, r=Ms2ger
Implement crypto.getRandomValues()

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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6505)
<!-- Reviewable:end -->
2015-07-05 22:16:19 -06:00
bors-servo
cc73aad447 Auto merge of #6546 - michaelwu:slim-layoutdatawrapper, r=Ms2ger
Remove LayoutChan from LayoutDataWrapper

Saves 32 bytes in Node.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6546)
<!-- Reviewable:end -->
2015-07-05 21:39:12 -06:00
Kevin Ball
dbbab3b113 Implement Node.baseURI 2015-07-05 15:29:04 -07:00
bors-servo
db9e29a5f3 Auto merge of #6557 - Ms2ger:update-js, r=jdm
Update rust-mozjs.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6557)
<!-- Reviewable:end -->
2015-07-05 09:38:20 -06:00
Ms2ger
dedc96349f Update rust-mozjs. 2015-07-05 10:30:19 +02:00
bors-servo
0fb6604cb3 Auto merge of #6556 - frewsxcv:AttrValue-from_serialized_tokenlist, r=Ms2ger
Utilize iterators for AttrValue::from_serialized_tokenlist



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6556)
<!-- Reviewable:end -->
2015-07-04 21:08:11 -06:00
Corey Farwell
a985ee4f19 Utilize iterators for AttrValue::from_serialized_tokenlist 2015-07-04 21:54:45 -07:00
bors-servo
d3d4976d8e Auto merge of #6553 - frewsxcv:split-html-test, r=Ms2ger
Unit test for util::str::split_html_space_chars

I was concerned for a little bit that passing just whitespace to the
split_html_space_chars function would result in len > 0, so I wrote this
small unit test to make sure it does the right thing. Even though it
does do the right thing, I think there's still value in committing the
unit test.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6553)
<!-- Reviewable:end -->
2015-07-04 19:59:32 -06:00
Corey Farwell
3cfd4d14e2 Unit test for util::str::split_html_space_chars
I was concerned for a little bit that passing just whitespace to the
split_html_space_chars function would result in len > 0, so I wrote this
small unit test to make sure it does the right thing. Even though it
does do the right thing, I think there's still value in committing the
unit test.
2015-07-04 18:57:42 -07:00
bors-servo
236250c3fc Auto merge of #6552 - dzbarsky:master, r=Ms2ger
Remove some redundant let bindings



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6552)
<!-- Reviewable:end -->
2015-07-04 07:34:29 -06:00
David Zbarsky
861ddedaef Remove some redundant let bindings 2015-07-04 13:12:49 -04:00
bors-servo
2e1c9785dc Auto merge of #6551 - Ms2ger:layoutelement, r=nox
Store a LayoutJS<Element> in LayoutElement.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6551)
<!-- Reviewable:end -->
2015-07-04 04:00:29 -06:00
Ms2ger
58a7c81530 Store a LayoutJS<Element> in LayoutElement. 2015-07-04 17:38:42 +02:00
Michael Wu
1a014beb08 Remove LayoutChan from LayoutDataWrapper 2015-07-04 03:54:40 -04:00
bors-servo
c7f1716ee1 Auto merge of #6550 - Ms2ger:warnings, r=larsbergstrom
Fix build warnings.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6550)
<!-- Reviewable:end -->
2015-07-04 01:01:25 -06:00
Ms2ger
d4888dbd4d Fix build warnings. 2015-07-04 14:33:18 +02:00
Ms2ger
24730f1078 Borrow the QueueData for WorkQueue::run.
This allows us to get rid of the raw pointers and unsafe dereferencing in
the parallel layout implementation.
2015-07-04 08:55:48 +02:00
bors-servo
0298c92670 Auto merge of #6549 - Ms2ger:from_actual, r=nox
Remove *Cast::from_actual.

Since JSRef was removed, from_actual duplicates from_ref.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6549)
<!-- Reviewable:end -->
2015-07-03 22:56:17 -06:00
Ms2ger
2f88b84e07 Remove *Cast::from_actual.
Since JSRef was removed, from_actual duplicates from_ref.
2015-07-04 12:55:01 +02:00
bors-servo
f5f64dab74 Auto merge of #6548 - servo:rustup_2015-07-03, r=nox
Upgrade to rustc 1.3.0-dev (f3b97a74a 2015-07-03)



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6548)
<!-- Reviewable:end -->
2015-07-03 21:47:02 -06:00
Simon Sapin
75e3e787f6 Upgrade to rustc 1.3.0-dev (f3b97a74a 2015-07-03) 2015-07-04 11:32:41 +02:00
bors-servo
02d84a1347 Auto merge of #6545 - dzbarsky:master, r=Ms2ger
Factor out common forward/back navigation code in HTMLIFrameElementMethods



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6545)
<!-- Reviewable:end -->
2015-07-03 18:49:37 -06:00
David Zbarsky
c55a06cb64 Factor out common forward/back navigation code in HTMLIFrameElementMethods 2015-07-03 23:05:58 -04:00
Tim Taubert
92874a89d2 Implement window.crypto.getRandomValues() 2015-07-03 18:34:00 +02:00
Josh Matthews
81c0d32a04 Make cached messages appear in FF's devtools. 2015-07-03 09:22:47 -04:00
bors-servo
d09881b051 Auto merge of #6513 - Ms2ger:workqueue-data, r=pcwalton
Remove the data field from WorkQueue.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6513)
<!-- Reviewable:end -->
2015-07-03 07:22:44 -06:00
Alexander Putilin
f04779f398 fix 6058: --devtools panics if there is no console actor 2015-07-03 09:21:44 -04:00
bors-servo
59d3b45b74 Auto merge of #6504 - Ms2ger:workqueue-labeled-break, r=pcwalton
Move back to using a labeled break in WorkQueue.

This was changed in 18a2050a64; it appears to
work fine now.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6504)
<!-- Reviewable:end -->
2015-07-03 06:39:53 -06:00
bors-servo
73b52c095a Auto merge of #6538 - Ms2ger:a-cleanup, r=jdm
Some cleanup in HTMLAnchorElement.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6538)
<!-- Reviewable:end -->
2015-07-02 23:32:59 -06:00
Ms2ger
9f52ab11aa Simplify the string handling in HTMLAnchorElement::activation_behavior. 2015-07-03 13:31:00 +02:00
Ms2ger
59ea4dbd21 Remove an avoidable null-check from HTMLAnchorElement::activation_behavior. 2015-07-03 13:30:31 +02:00
Ms2ger
2e89228cd5 Remove HTMLAnchorElement::handle_event.
It is equivalent to the default implementation.
2015-07-03 13:27:23 +02:00
bors-servo
eb5fbb6ea2 Auto merge of #6533 - Ms2ger:init, r=jdm
Check the result of JS_Init.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6533)
<!-- Reviewable:end -->
2015-07-02 08:20:03 -06:00