Commit graph

390 commits

Author SHA1 Message Date
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
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
Ms2ger
bbe494acde Use if let remove_inline_style_property.
It makes little sense to use map() in a case where we don't care about the
return value.
2015-04-11 21:30:56 +02:00
Matt Brubeck
4e63a5063e Don't allow disabled fields to be focused 2015-04-10 10:16:06 -07:00
Corey Farwell
82335a1904 Spec links for script::dom::element & script::dom::event 2015-04-09 10:16:10 -07:00
Anthony Ramine
3d68a46fee Implement NonDocumentTypeChildNode::*ElementSibling() 2015-04-09 15:43:05 +02:00
bors-servo
9b7bf415d7 Auto merge of #5590 - nox:document-createattributens, r=Ms2ger 2015-04-08 18:55:19 -05:00
bors-servo
0f0dd02daa Auto merge of #5575 - nox:namednodemap-remove, r=Ms2ger 2015-04-08 13:22:29 -05:00
Anthony Ramine
7b4f6126c8 Add script::dom::utils::validate_and_extract()
Accidentally fixes bugs about Document::createElementNS() where the
implementation of "validate and extract" used to check whether the local name
extracted from the qualified name was "xmlns" instead of the qualified name
itself.
2015-04-08 10:22:30 +02:00
Anthony Ramine
abc01d598a Add script::dom::utils::validate_qualified_name() 2015-04-08 10:22:28 +02:00
Anthony Ramine
eea80034e6 Implement NamedNodeMap::removeNamedItem*() 2015-04-07 22:34:56 +02:00
Anthony Ramine
33f2cd29fd Implement ParentNode attributes 2015-04-07 22:27:52 +02:00
Anthony Ramine
bf7c791e3a Hold a Temporary in AncestorIterator 2015-04-07 15:46:31 +02:00
Chris Paris
6422f38574 Remove Root<Node> type annotation in SetOuterHTML
The 'use ... Root' was removed from the file by
another commit, and this annotation wasn't necessary anyway.
2015-04-06 12:59:54 -10:00
Chris Paris
ce16075588 Replace spec quotes with spec step numbers 2015-04-06 12:59:53 -10:00
Chris Paris
d83f4d8a6e get rid of and_then in outerHTML setter 2015-04-06 12:56:56 -10:00
Chris Paris
3542360d00 get rid of and_then in innerHTML setter 2015-04-06 12:56:55 -10:00
Chris Paris
cc771fdd68 fragment parsing functions take DOMString instead of HTMLInput 2015-04-06 12:56:55 -10:00
Chris Paris
2cc5bad21e Implement Element.outerHTML setter 2015-04-06 12:56:55 -10:00
Chris Paris
63ced23fca Refactor fragment parsing 2015-04-06 12:54:58 -10:00
bors-servo
3c5c2f416b Auto merge of #5529 - ehegnes:issue-5521, r=jdm
Fixes #5521
2015-04-06 15:16:39 -05:00
Anthony Ramine
561ec7e21d Rename many name arguments to local_name 2015-04-06 14:31:28 +02:00
Anthony Ramine
254207730e Make Element::get_attribute() take its namespace by reference 2015-04-06 14:31:27 +02:00
Anthony Ramine
dd88bcddc4 Fix Element::RemoveAttribute*() 2015-04-06 14:12:56 +02:00
Anthony Ramine
1906f835b9 Fix Element::GetAttribute()
Local names should not be used to get a attribute without providing a namespace.
2015-04-06 14:12:20 +02:00
bors-servo
f22d920b4d auto merge of #5524 : servo/servo/attributes-ownerElement, r=Manishearth 2015-04-05 05:54:53 -06:00
Eric Hegnes
e398725242 Consistently name enum members in dom::bindings::error::Error
Fixes #5521
2015-04-05 00:09:40 -04:00
Matt Brubeck
791fa3757d Implement the :focus pseudo-class selector
Fixes #5460. This supports for simple focusable elements that are their own
DOM anchors, like text `input` fields.
2015-04-04 10:57:11 -07:00
Anthony Ramine
d3d12e6324 Make attributes lose their owner when removed 2015-04-04 17:39:39 +02:00
Corey Farwell
ae9b1636b1 Fix useless assert in script::dom::element
We should ensure the parameter is lowercased. Right now, the assert will
always return true.

Discussed in #5445

Introduced in ee2ccc4f87
2015-03-29 17:54:01 -04:00
Corey Farwell
d838fcce30 Remove some unnecessary uses of as_slice
For the majority of these cases, `as_slice` can be removed due to
`Deref`. In particular, `Deref` for:

* `String` -> `str`
* `Atom` -> `str`

The latter of those two requires, a bump of the locked `string-cache`
library
2015-03-29 14:42:19 -04:00
Mukilan Thiyagarajan
e8a1e9eabb Implement RootedVec<T> 2015-03-29 11:58:25 +02:00
Corey Farwell
b5d3e77716 Cleanup and modernize script::dom::element 2015-03-26 17:58:38 -04:00
Manish Goregaokar
3479d3fa7f Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
Maciej Skrzypkowski
7da356cd05 Added document.activeElement attribute. 2015-03-19 23:00:13 +01:00
bors-servo
1236280bea auto merge of #5029 : ChrisParis/servo/h5e-serialize, r=jdm
Fixes https://github.com/servo/servo/issues/3713. Depends on https://github.com/servo/html5ever/pull/100 and https://github.com/servo/html5ever/pull/101.
2015-03-18 18:06:49 -06:00
Chris Paris
a5d6c6a1fc Serialize using html5ever 2015-03-18 12:17:56 -10:00
Chris Paris
99286e4b4f Implement Element.innerHTML setter 2015-03-18 11:20:47 -10:00
Ms2ger
5f15eb5fbf Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev. 2015-03-18 13:18:31 -04:00
Patrick Walton
586c12ccc4 layout: Implement border-spacing per CSS 2.1 § 17.6.1 and the legacy
`cellspacing` attribute per HTML5 § 14.3.9.

Table layout code has been refactored to push the spacing down to
rowgroups and rows; this will aid the implementation of
`border-collapse` as well.

This commit also fixes two nasty issues in table layout:

* In fixed layout, extra space would not be divided among columns that
  had auto width but had nonzero minimum width.

* In automatic layout, extra space would be distributed to constrained
  columns as well even if unconstrained columns with percentage equal to
  zero were present.
2015-03-12 12:00:40 -07:00
Zack Slayton
08ac0766ed Use new if let syntax wherever possible. Fixes #4153. 2015-03-10 09:18:55 -04:00
Simon Sapin
2a50755c8a Move selector matching to an external library, for use outside Servo. 2015-02-23 16:29:34 +01:00
Shing Lyu
f4a2afc3a6 Bug 4236: Moved anchorelement click event to activation behaviour 2015-02-21 09:26:39 +08:00
Ms2ger
b3f93b25a5 Remove JS::unsafe_get.
The codegen users already migrated to Unrooted, and the layout users are
better off using LayoutJS.
2015-02-12 20:59:22 +01:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Josh Matthews
ae2b74c783 Make Document::url return the page's URL to avoid stale URLs after redirects. 2015-02-04 13:34:06 +00:00
Gilles Leblanc
a1804effaf Initialize trusted-ness of DOM events properly
Fixes #3740
2015-02-03 21:40:07 -05:00