Commit graph

2662 commits

Author SHA1 Message Date
Ms2ger
04b532e1fb Store a Runtime object in ScriptTask. 2015-04-22 11:17:09 +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
Anthony Ramine
b636481ca3 Implement CSSStyleDeclaration.float (fixes #5101)
It just needs to be prefixed by an underscore.
2015-04-21 19:34:52 +02:00
Avi Weinstock
2d110e73b5 Update Cargo.lock files w.r.t. rust-xlib. 2015-04-21 11:47:42 -04:00
bors-servo
a3dafe4999 Auto merge of #5594 - mskrzypkows:get_attribute_by_name, r=Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5594)
<!-- Reviewable:end -->
2015-04-21 10:23:03 -05:00
Maciej Skrzypkowski
6a31a75bc6 Refactoring, added conversion to lowercase for get_attribute_by_name method. (fixes #5561) 2015-04-21 16:08:15 +02:00
bors-servo
1d66b090a2 Auto merge of #5770 - mmatyas:canvas_rect, r=jdm
A simple little patch.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5770)
<!-- Reviewable:end -->
2015-04-21 08:43:47 -05:00
Avi Weinstock
503cc9e6d6 Moved clipboard integration from textinput to constellation, to facilitate sandboxing. 2015-04-21 09:31:20 -04:00
Mátyás Mustoha
5287cb7fba Canvas: implement rectangle drawing. 2015-04-21 15:21:30 +02:00
bors-servo
fe61cdc95d Auto merge of #5758 - dhananjay92:Issue#5735, r=jdm
Solves #5735.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5758)
<!-- Reviewable:end -->
2015-04-21 08:05:48 -05:00
Avi Weinstock
ba4c455438 Implement X11 clipboard integration (Issue #5376). 2015-04-21 08:36:15 -04: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
Diego Marcos
c82485874d Kicks off a WebGL implementation 2015-04-20 14:29:39 -07:00
bors-servo
23945f2ea8 Auto merge of #5759 - Adenilson:visibleReturn01, r=pcwalton
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5759)
<!-- Reviewable:end -->
2015-04-20 15:01:44 -05:00
Adenilson Cavalcanti
8aa9427af0 Skip computing fragment position and return early if visibility property
is not set.
2015-04-20 12:17:38 -07:00
Dhananjay Nakrani
d0138443d5 Move actor_workers HashMap outside handle_new_global(). [Issue#5735] 2015-04-20 11:33:09 -07:00
Ms2ger
cd7ec9912e Make ScriptTask::js_context immutable.
Since we drop the ScriptTask almost immediately after clearing the field,
there's little reason to do it manually.
2015-04-20 20:16:55 +02: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
bors-servo
8b8daa24b8 Auto merge of #5559 - glennw:iframe-focus, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5559)
<!-- Reviewable:end -->
2015-04-19 18:13:59 -05:00
bors-servo
9c7c289aca Auto merge of #5731 - mmatyas:canvas_saverestore, r=jdm
This patch enables the use of `save()` and `restore()` for the canvas context, which is used by *a lot* of sites and scripts.

Depends on servo/rust-azure#153.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5731)
<!-- Reviewable:end -->
2015-04-19 17:40:33 -05:00
Glenn Watson
18d465bcd2 Support focus management and keyboard events for iframes. 2015-04-20 07:52:22 +10:00
Mátyás Mustoha
5b8416a2b6 Canvas: implement context state save/restore. 2015-04-19 21:12:13 +02:00
Dhananjay Nakrani
7cdfc76ea9 Change parse_progress() take JSRef by value. [Issue#5738] 2015-04-19 11:24:45 -07: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
bors-servo
e5ec55f0d8 Auto merge of #5741 - Ms2ger:attr-for-layout, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5741)
<!-- Reviewable:end -->
2015-04-19 09:37:29 -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
bdb8657cf6 Use get_attr_for_layout in ghas_class_for_layout.
This fixes a panic if this code was ever called on an element with a class
attribute in a non-null namespace. In this case, the attribute would not have
been parsed into a list of tokens, so value_tokens_forever() would have
returned None.

However, this function is, as far as I can tell, never called, because of the
way selectors are evaluated in layout. ('Return the selectors that match this
node' rather than 'return the nodes that match this selector'; the latter
uses only each_class.)
2015-04-18 16:56:54 +02:00
Ms2ger
39e3ace817 Use get_attr_for_layout in get_attr_atom_for_layout.
The code is equivalent.
2015-04-18 16:53:05 +02:00
Ms2ger
d67d6bfa3a Give get_attr_for_layout a more useful signature. 2015-04-18 16:51:57 +02:00
Bogdan Cuza
e0724ec9a9 Make mouse_over_targets a RootedVec 2015-04-18 15:54:25 +03:00
bors-servo
40ee41ca92 Auto merge of #5739 - frewsxcv:style-docs, r=SimonSapin
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5739)
<!-- Reviewable:end -->
2015-04-18 05:44:50 -05:00
Corey Farwell
9f6d94e107 Add links to the spec for components/style 2015-04-17 21:29:08 -04:00
bors-servo
ca8c0f353c Auto merge of #5728 - Adenilson:optimDL01, r=metajack
This DL is created at paint time, per tile. To dump, pass -Z dump-display-list-optimized at startup.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5728)
<!-- Reviewable:end -->
2015-04-17 15:33:06 -05:00
bors-servo
d90fe2b088 Auto merge of #5729 - frewsxcv:whatwg-multipage-redirects, r=Manishearth
"Links to the multipage version of the specification are unfortunately
likely to break over time."
-- https://html.spec.whatwg.org/multipage/asefij.html

This commit removes all references to the specific pages when viewing
WHATWG using multipage mode. I went through all these links and they
redirect fine.

Regex used to generate this commit:

`s_whatwg.org/multipage/.*#_whatwg.org/multipage/#_g`

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5729)
<!-- Reviewable:end -->
2015-04-17 08:57:33 -05:00
Marcus Klaas
5bcf2e0a6c Remove unnecessary clone in Document constructor 2015-04-17 14:43:45 +02:00
Corey Farwell
8b08c6f43f Don't link to specific WHATWG multipage page
"Links to the multipage version of the specification are unfortunately
likely to break over time."
-- https://html.spec.whatwg.org/multipage/asefij.html

This commit removes all references to the specific pages when viewing
WHATWG using multipage mode. I went through all these links and they
redirect fine.

Regex used to generate this commit:

`s_whatwg.org/multipage/.*#_whatwg.org/multipage/#_g`
2015-04-16 22:39:25 -04:00
Adenilson Cavalcanti
ad62ff599a Allow dumping the optimized display list (DL).
This DL is created at paint time, per tile. To dump,
pass -Z dump-display-list-optimized at startup.
2015-04-16 17:10:39 -07: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
bors-servo
653b40d3e5 Auto merge of #5704 - jseaton:jseaton/animation-props, r=pcwalton
Contributes towards servo/servo#5494 - includes all properties listed at http://dev.w3.org/csswg/css-transitions/#animatable-css .

Unforunately the most obvious way to support text-shadow meant making a few structures NoCopy.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5704)
<!-- Reviewable:end -->
2015-04-16 13:42: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