Commit graph

1247 commits

Author SHA1 Message Date
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
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
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
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
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
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
Josh Matthews
d0704d1797 Documentation. 2015-04-16 11:46:42 -04:00
Josh Matthews
1ca9ff56c8 Create easy common interface for off-thread network listeners, and remove the CORS-specific reimplementation of async networking. 2015-04-16 11:46:41 -04:00
Josh Matthews
f7ac1f1876 Remove old implementation of XHR's fetch. 2015-04-16 11:46:41 -04:00
Josh Matthews
01e66035ff Implement sync XHR by creating and spinning on-demand event loops. 2015-04-16 11:46:40 -04:00
Josh Matthews
2ee21ddbe7 Make the fetch method only handle sync XHRs. 2015-04-16 11:46:40 -04:00
Josh Matthews
17a88f1f81 Make timeouts for async XHR post a runnable. 2015-04-16 11:46:40 -04:00
Josh Matthews
5c7be5c9c3 Make async XMLHttpRequest requests use async network events. 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
Mátyás Mustoha
350b060189 Add specification links to canvas line cap and line join 2015-04-15 17:40:23 +02:00
Corey Farwell
cc4a64e1fe Add/update comments with links to spec
Extracted out of #5649

* add more hyperlinks to associated specification for structs/methods
* follow redirects and update links
* replace broken links
* removal of WHATWG multipage page name since the page name is not
  guaranteed to be stable
2015-04-14 18:03:13 -04:00
Mátyás Mustoha
ccfff159e7 Canvas: added lineCap and lineJoin support. 2015-04-14 18:26:41 +02:00
bors-servo
f7c3544d75 Auto merge of #5659 - aneeshusa:add-range-errors-use-for-textencoder-textdecoder, r=jdm
Fixes #5620, and adds a few extra test cases.

Currently waiting on a few upstream PRs in rust-encoding to land.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5659)
<!-- Reviewable:end -->
2015-04-14 09:44:21 -05:00
Aneesh Agrawal
97301400a5 Throw RangeErrors in TextEncoder/TextDecoder constructors.
Fixes #5620.
Fix the TODOs and FIXMEs to comply with the spec.
Add test case for passing invalid invalid labels.
Update test metadata; three test cases have been resolved upstream and
will be fixed whenever the rust-encoding dependency is sufficiently upgraded.
2015-04-14 09:41:57 -04:00
bors-servo
2dfa28f186 Auto merge of #5674 - nox:get_unsound_ref_forever-misc, r=Ms2ger 2015-04-14 04:56:08 -05:00
Anthony Ramine
3ce368fa28 Remove unnecessary uses of get_unsound_ref_forever() 2015-04-14 11:55:35 +02:00
Ms2ger
49393a8762 Update some URLs.
The HTML spec's division into pages is not stable, so it is safer to use the
URL without a specific page (which will redirect).
2015-04-14 10:44:51 +02:00
bors-servo
4997d3a112 Auto merge of #5677 - frewsxcv:https, r=Ms2ger
Extracted this out of #5649

This commit was created with the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-14 02:57:41 -05:00
bors-servo
b7f59a3646 Auto merge of #5642 - aneeshusa:arc-box-image-to-arc-image, r=Ms2ger
Image used to be a trait, but no longer is, so boxing it is no longer
necessary. Fixes #5639.
2015-04-14 01:57:07 -05:00
bors-servo
4fac8b6810 Auto merge of #5593 - shinglyu:ismap, r=jdm
This implements issue 4873
2015-04-14 00:10:08 -05:00
Corey Farwell
5eaa922045 Update WHATWG links to use HTTPS
Extracted this out of #5649

This commit was created with the following commands:

```
find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```

```
find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g'
```
2015-04-13 21:34:27 -07:00
Shing Lyu
7a65b95ae5 4873 - Support the image map processing for <img ismap/> inside an <a/> 2015-04-14 10:09:23 +08:00
Chris Paris
61f4fce655 Use NodeFilterConstants from NodeFilterBinding 2015-04-13 13:05:11 -10:00
bors-servo
b9b4389628 Auto merge of #5672 - ChrisParis:nodefilter, r=jdm 2015-04-13 17:18:40 -05:00
Adenilson Cavalcanti
a233cb5ef9 Using unwrap() as suggested in review. 2015-04-13 14:45:14 -07:00
Adenilson Cavalcanti
d2b7cbd4ef Squashing a few compiler warnings. 2015-04-13 14:25:42 -07:00
Chris Paris
98e2dc5df7 Uncomment NodeFilter constants 2015-04-13 10:13:06 -10:00
bors-servo
1f9c2f9b34 Auto merge of #3726 - ChrisParis:callback-constants, r=jdm
This addresses https://github.com/servo/servo/issues/3149. The immediate purpose is to support the constants in NodeFilter. The changes mostly follow the current Gecko Codegen.py. The main gist is that the generation of certain code artifacts is now gated by hasInterfaceObject() or hasInterfacePrototypeObject(), rather than by isCallback().
2015-04-13 14:34:39 -05:00
Guro Bokum
97714ec5ed Firefox timeline integration #4957 2015-04-13 21:08:07 +07:00
Anthony Ramine
e20d997b37 Use a simple Temporary value in TreeIterator 2015-04-13 11:01:02 +02:00
Anthony Ramine
c026825e69 Pass a RootedVec to NodeList::new_simple_list() 2015-04-13 11:00:04 +02:00
bors-servo
d2522ea8bf Auto merge of #5647 - Ms2ger:remove_inline_style_property, r=Manishearth
It makes little sense to use map() in a case where we don't care about the
return value.
2015-04-12 13:45:28 -05:00