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
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
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
Anthony Ramine
45e1b9628e
Finish implementation of ChildNode and ParentNode
2015-04-16 20:31:34 +02:00
Md. Enzam Hossain
4c5bebeb10
Implement node::LookupPrefix and add test.
...
Tracking issue #1826 .
2015-04-16 11:38:07 +01: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
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