Commit graph

1358 commits

Author SHA1 Message Date
bors-servo
1b08211a5e Auto merge of #5806 - nox:splittext, r=Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5806)
<!-- Reviewable:end -->
2015-04-23 09:38:48 -05:00
Anthony Ramine
163d97d270 Implement Text.splitText() 2015-04-23 16:36:50 +02:00
bors-servo
68f03c9dbb Auto merge of #5805 - pcwalton:whitespace-effect-on-minimum-inline-sizes, r=glennw
Improves Amazon.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5805)
<!-- Reviewable:end -->
2015-04-22 20:23:17 -05:00
Patrick Walton
f8b9b31680 layout: Take the white-space property into account when computing
intrinsic sizes of inline flows.

Improves Amazon.
2015-04-22 17:45:16 -07:00
Glenn Watson
d8aef7208e Refactored image cache task - details below.
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.
2015-04-23 09:40:24 +10:00
bors-servo
e278e5b9a2 Auto merge of #5757 - mmatyas:canvas_globalcomposite, r=jdm
Implements https://html.spec.whatwg.org/multipage/scripting.html#dom-context-2d-globalcompositeoperation.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5757)
<!-- Reviewable:end -->
2015-04-22 14:15:28 -05:00
Mátyás Mustoha
a8343a0750 Canvas: implement global composition and blending. 2015-04-22 20:54:27 +02:00
bors-servo
9ae3cad31e Auto merge of #5781 - jdm:reparent, r=Ms2ger
Fixes html5test.com.

r? @Ms2ger

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5781)
<!-- Reviewable:end -->
2015-04-22 13:01:32 -05:00
nithin murali
c5e101b6e5 Implement child reparenting and node removal during parsing. 2015-04-22 13:47:28 -04:00
Mátyás Mustoha
6fd6eefb35 Canvas: add clipping path support. 2015-04-22 16:25:02 +02:00
bors-servo
533949150b Auto merge of #5783 - Adenilson:ffBrokenImage01, r=mbrubeck
Got it from:
https://mxr.mozilla.org/mozilla-central/source/layout/generic/broken-image.png

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5783)
<!-- Reviewable:end -->
2015-04-21 19:01:38 -05:00
Adenilson Cavalcanti
0f5b5a5cd4 Using FF broken image icon.
Got it from:
https://mxr.mozilla.org/mozilla-central/source/layout/generic/broken-image.png
2015-04-21 16:04:28 -07:00
bors-servo
9974ebb2f9 Auto merge of #5547 - aweinstock314:x11-clipboard, r=jdm
Manual re-opening of #5479 (since it seems that GitHub disables re-opening with the same number after a rebase).

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5547)
<!-- Reviewable:end -->
2015-04-21 14:41:32 -05:00
Avi Weinstock
cf6aef5d51 Make the channel argument to TextInput::new be optional, to support the signature expected by the unit tests. 2015-04-21 15:18:23 -04:00
bors-servo
f795440ee3 Auto merge of #5776 - servo:split-unit-tests, r=mbrubeck
Closes #5707. (Includes a rebase of it.)
Fixes #5688.

r? @mbrubeck

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5776)
<!-- Reviewable:end -->
2015-04-21 14:06:22 -05:00
Simon Sapin
ce1f2bab7b Fix up the splitting of the unit tests crate.
Closes #5707. (Includes a rebase of it.)
Fixes #5688.
2015-04-21 20:22:10 +02:00
Prabhjyot Singh Sodhi
7b9c9e1453 Split up the unit tests crate 2015-04-21 20:05:53 +02:00
bors-servo
c8cb62058c Auto merge of #5761 - dhananjay92:Issue#5754, r=jdm
Solves Issue #5754.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5761)
<!-- Reviewable:end -->
2015-04-21 12:25:42 -05:00
Dhananjay Nakrani
72ab06a6ec Add test for createDocument(). [Issue#5754]. 2015-04-21 10:13:55 -07:00
Mátyás Mustoha
5287cb7fba Canvas: implement rectangle drawing. 2015-04-21 15:21:30 +02:00
bors-servo
e4b620ea54 Auto merge of #5652 - dmarcos:webgl, r=jdm
@jdm @ecoal95 I'm working on making VR happen in the Browser and I want to bring to Servo the [webVR APIs](https://github.com/MozVR/webvr-spec/blob/master/webvr.idl) we already have in Gecko. Before anything happens we need a working implementation of WebGL (and also the [fullscreen API](https://fullscreen.spec.whatwg.org/)). My implementation is very basic and probably naive (I just recently started to contribute to Servo). My patch is just a starting point: 

- It only implements ```clearColor``` and ```clear``` methods of the [WebGL spec](https://www.khronos.org/registry/webgl/specs/latest/).
- It uses the readback strategy that ```canvasRenderingContext2D``` is using (The webgl task paints stuff independently on it's own buffer and the compositor task request the pixels back to the webgl task when it needs them) I'm sure there are much better ways to handle this. Latency and FPS are critical in VR so we have to figure out the fastest way to push pixels to the screen. I've read something about layerizing the canvas but I'm still not sure what that even means :)
- There's an included test you can try ```./mach run tests/ref/webgl-context/clearcolor.html``` 

@ecoal95 I know you'll be working on this for the next three months. With a foundation in place we will be able to make quick progress in parallel. This is exciting!

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5652)
<!-- Reviewable:end -->
2015-04-20 19:29:02 -05:00
Josh Matthews
a1c4f49da8 Disable intermittently-passing test pending further investigation. #5764 2015-04-20 19:54:38 -04:00
Diego Marcos
c82485874d Kicks off a WebGL implementation 2015-04-20 14:29:39 -07:00
Ms2ger
dd9351d722 Parse attributes according to the specification in AttrValue::from_u32.
This exposes another bug: "-0" failed to parse with str.parse(), and is now
successfully parsed into 0. However, input.size and textarea.{rows, cols} are
supposed to be "limited to only non-negative numbers greater than zero", so 0
is not actually supposed to be accepted.
2015-04-20 10:51:44 +02:00
Mátyás Mustoha
5b8416a2b6 Canvas: implement context state save/restore. 2015-04-19 21:12:13 +02:00
bors-servo
f164cc253e Auto merge of #5742 - marcusklaas:issue-5718, r=jdm
This closes issue https://github.com/servo/servo/issues/5718.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5742)
<!-- Reviewable:end -->
2015-04-19 10:10:57 -05:00
Marcus Klaas
c1f25bbfe4 Replace usage of ResponseSenders by LoadConsumer 2015-04-19 13:26:56 +02:00
Ms2ger
0042f78aa7 Use get_attr_for_layout in get_classes_for_layout.
This fixes a bug with elements with multiple class attributes. In this case,
the class attribute in the null namespace would only be considered if it was
the first class attribute in the list.
2015-04-18 17:51:03 +02:00
Ms2ger
21d3ddabbf Add a test for the class selector with multiple class attributes. 2015-04-18 17:50:25 +02:00
bors-servo
2b3acd1f5d Auto merge of #5734 - marcusklaas:issue-5709, r=jdm
This closes issue https://github.com/servo/servo/issues/5709.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5734)
<!-- Reviewable:end -->
2015-04-17 09:52:46 -05:00
Marcus Klaas
0d482e36e6 Fix compiler warnings in net unit tests 2015-04-17 16:44:51 +02:00
Ms2ger
25e8bc8ed8 Move the lookupPrefix content test. 2015-04-17 13:53:18 +02:00
bors-servo
4fd4370a96 Auto merge of #5721 - nox:nodeorstring, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5721)
<!-- Reviewable:end -->
2015-04-16 14:47:32 -05:00
bors-servo
e26219828b Auto merge of #5717 - Ms2ger:usp, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5717)
<!-- Reviewable:end -->
2015-04-16 14:15:16 -05:00
Anthony Ramine
45e1b9628e Finish implementation of ChildNode and ParentNode 2015-04-16 20:31:34 +02:00
bors-servo
e3756f9e3f Auto merge of #5650 - ienzam:issue/1826, r=jdm
Tracking issue #1826 - implemented one of the three methods.

This is follow up of #5402. Rebased and squashed and made the method iterative.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5650)
<!-- Reviewable:end -->
2015-04-16 13:07:20 -05:00
Ms2ger
9df501afd9 Fix URLSearchParams formatting. 2015-04-16 19:36:31 +02:00
bors-servo
0307caa4bb Auto merge of #5715 - Ms2ger:wpt_20150416, r=jdm 2015-04-16 12:03:54 -05:00
Ms2ger
2d49203b9c Update web-platform-tests to revision 000905d008db2538360020335bc2dbba16d322b5. 2015-04-16 18:58:53 +02:00
bors-servo
3151497d49 Auto merge of #5156 - jdm:asyncnet, r=pcwalton,Manishearth
This implements a framework for opting in to receiving network events asynchronously. It also converts XMLHttpRequest to use them, and paves the way for better support for synchronous XHR using on-demand, targeted event loops instead of spinning the global event loop. This gives us complete feature parity with the existing XHR implementation, using fewer threads than before in the async case.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5156)
<!-- Reviewable:end -->
2015-04-16 11:33:06 -05:00
Josh Matthews
61891843ff Disable intermittently passing test pending further investigation. #5714 2015-04-16 11:52:00 -04:00
Josh Matthews
7517aac9e9 Completely abstract sending responses over channels vs. listeners. 2015-04-16 11:46:39 -04:00
Josh Matthews
1644436557 Start switching net/ to use abstractions over channels to allow introducing non-channel communication in the future. 2015-04-16 11:46:39 -04:00
Md. Enzam Hossain
4c5bebeb10 Implement node::LookupPrefix and add test.
Tracking issue #1826.
2015-04-16 11:38:07 +01:00
Ms2ger
9be71b941f Remove the remaining traces of content tests. 2015-04-16 11:29:58 +02:00
Ms2ger
306da57b07 Move mime classifier resources near the test. 2015-04-16 11:12:32 +02:00
Ms2ger
4cc4e210b4 Move disabled content tests under wpt. 2015-04-16 11:09:55 +02:00
bors-servo
f7bfea5879 Auto merge of #5706 - pcwalton:absolute-clipping-of-own-contents, r=glennw
r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5706)
<!-- Reviewable:end -->
2015-04-15 21:04:59 -05:00
Patrick Walton
14a544b64c layout: Clip the immediate fragments of block flows that establish
stacking contexts properly.

The code that existed before correctly translated the clips of child
elements, but not those of immediate display items belonging to the flow
itself.

Makes Leaflet.js maps usable.
2015-04-15 17:19:27 -07:00
bors-servo
1fd6a48cca Auto merge of #5546 - Adenilson:blurFilter01, r=pcwalton
See discussion on #5190 and #5496.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5546)
<!-- Reviewable:end -->
2015-04-15 18:56:49 -05:00