Commit graph

2127 commits

Author SHA1 Message Date
Anthony Ramine
e72b77b1e3 Properly consider radio button groups
Radio button groups with missing or empty names are always the only element
of their respective radio button group.
2015-09-25 00:29:03 +02:00
Anthony Ramine
01ea761bd0 Use an atom for HTMLInputElement's name attribute's value 2015-09-25 00:04:43 +02:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Corey Farwell
fe7647a43e Prefer element casting over mem::transmute 2015-09-22 18:38:31 -04:00
bors-servo
4dc986bca3 Auto merge of #7064 - paulrouget:reload, r=Ms2ger
Implement location.reload()

This is a naive implementation of `window.location.reload()`.
I'd appreciate any feedback.

I was wondering if it'd be better to implement `ConstellationMsg::Reload` instead of using  `load_url`.

Also, what kind of test should I write?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7064)
<!-- Reviewable:end -->
2015-09-21 09:03:42 -06:00
Corey Farwell
d8da5c20f6 Remove deprecated 'creator' WebIDL attribute
According to @Ms2ger, the 'creator' attribute was merged into 'setter'
2015-09-21 07:12:17 -04:00
Corey Farwell
6c6c6663ab Update spec link to point to exact section 2015-09-21 07:11:58 -04:00
bors-servo
ec9aa9ace0 Auto merge of #7690 - frewsxcv:codegen-cleanup, r=nox
Minor DOM codegen cleanup



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7690)
<!-- Reviewable:end -->
2015-09-21 01:53:56 -06:00
Paul Rouget
c7e5e785b2 implement window.location.reload() 2015-09-21 07:56:33 +02:00
Corey Farwell
3b99893eaa Python 'is' operator should not be used to check value
'is' checks reference. '==' checks value
2015-09-20 12:39:32 -04:00
bors-servo
566f1eb6f6 Auto merge of #7689 - frewsxcv:supported-property-names-links, r=nox
Add/update spec links for SupportedPropertyNames methods



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7689)
<!-- Reviewable:end -->
2015-09-20 10:21:22 -06:00
Corey Farwell
38bbdd80db Remove parens around Python 'assert' statement
'assert' is a statement, not a function
2015-09-20 12:10:28 -04:00
Corey Farwell
83333e972c Add/update spec links for SupportedPropertyNames methods 2015-09-20 11:48:14 -04:00
bors-servo
d1269294e6 Auto merge of #7611 - nox:cache-element-id, r=frewsxcv
Cache the `id` attribute on Element

Thanks to @asabil for the original work, I only rebased it.

Fixes #6359 and #7040.


<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7611)
<!-- Reviewable:end -->
2015-09-20 09:23:20 -06:00
bors-servo
61267cde63 Auto merge of #7601 - nox:cleanup-dom-webidls, r=Ms2ger
Improve DOM interfaces' extended attributes

Some should have been `[SameObject]` instead of `[Constant]`. The rest of the changes are additional `[Constant]` and `[Pure]` extended attributes on many operations.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7601)
<!-- Reviewable:end -->
2015-09-19 17:50:22 -06:00
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Anthony Ramine
49219baab8 Annotate many DOM attribute and methods with [Constant] and [Pure] 2015-09-19 16:03:13 +02:00
Hugo Thiessard
6565e7b02f Issue #7390 correct the order of mod declaration 2015-09-18 22:02:04 +02:00
Simon Sapin
feaf6f4c3f Initial support for custom properties in CSSStyleDeclaration 2015-09-17 14:48:56 +02:00
Patrick Walton
357419dc8d layout: Query and maintain the position of the insertion point
throughout layout for input elements.
2015-09-17 13:31:12 +02:00
Patrick Walton
34d9a6091b script: Ask layout to redraw the selection whenever the user moves the
caret in an input element.
2015-09-17 13:31:11 +02:00
bors-servo
df083ccb52 Auto merge of #7628 - Ms2ger:events-markers, r=jdm
Emit markers for all events, not just UI events.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7628)
<!-- Reviewable:end -->
2015-09-16 08:34:32 -06:00
Ms2ger
73b9925cc1 Remove a pointless clone() call. 2015-09-16 16:29:03 +02:00
Ms2ger
f4cf90f127 Remove an obsolete TODO comment. 2015-09-16 16:29:02 +02:00
Ms2ger
e85b1e4e89 Use an early return in dispatch_to_listeners. 2015-09-16 16:29:02 +02:00
Ms2ger
b7a0440f91 Emit markers for all events, not just UI events. 2015-09-16 16:29:01 +02:00
Ms2ger
6dab37c88c Implement a global_object_for_reflector method. 2015-09-16 16:29:00 +02:00
Ms2ger
69ed59d78f Remove the outdated no_move annotation from GlobalRoot. 2015-09-16 16:28:59 +02:00
Ms2ger
a85196398d Return immediately from dispatch_to_listeners if propagation is stopped. 2015-09-16 16:28:58 +02:00
Ms2ger
af6bc108f3 Use early returns in dispatch_to_listeners. 2015-09-16 16:28:57 +02:00
Ms2ger
995cb21b48 Use if-let in dispatch_to_listeners, and simplify break conditions. 2015-09-16 16:28:56 +02:00
Ms2ger
a5925020ce Avoid calling any listeners for events whose stop propagation flag is set prior to dispatching. 2015-09-16 16:28:31 +02:00
Ms2ger
b342dff07d Add more assertions to dispatch_event. 2015-09-16 14:48:36 +02:00
Ms2ger
76eea43c83 Factor out a dispatch_to_listeners function from dispatch_event. 2015-09-16 13:36:18 +02:00
Ms2ger
15717173ee Reorder the code in dispatch_event a bit. 2015-09-16 13:36:17 +02:00
Ms2ger
9ddeec09c3 Remove outdated FIXME comment. 2015-09-16 13:36:17 +02:00
bors-servo
4935323ebf Auto merge of #7623 - aidanhs:aphs-atomise-forwarded-events, r=nox
Match forwarded events as atoms, fixes #7495

Hopefully I understood the issue correctly...

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7623)
<!-- Reviewable:end -->
2015-09-15 12:11:11 -06:00
bors-servo
e3d36bfceb Auto merge of #7631 - jxs:rewrite_uses_of_map, r=jdm
rewrite uses of map as if let

in the end only found this case as re-writable, am i missing some?

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7631)
<!-- Reviewable:end -->
2015-09-14 21:31:53 -06:00
João Oliveira
832cfac747 rewrite uses of map as if let
closes #7580
2015-09-15 02:51:59 +01:00
bors-servo
25abe646f8 Auto merge of #7619 - frewsxcv:font-face, r=nox
Implement <font> 'face' attribute



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7619)
<!-- Reviewable:end -->
2015-09-14 18:32:17 -06:00
Corey Farwell
3ae76f4e76 Implement <font> 'face' attribute 2015-09-14 20:24:52 -04:00
Aidan Hobson Sayers
d1fcbca3b1 Match forwarded events as atoms, fixes #7495 2015-09-14 14:16:33 +01:00
Ms2ger
9faa2de0fc Use static atoms in some places. 2015-09-14 10:33:16 +02:00
Corey Farwell
768993f03f Fix incorrect indentation 2015-09-13 23:17:38 -04:00
Ali Sabil
2e9d8a76d1 Use cached element ID in LayoutElement::get_id 2015-09-13 23:55:40 +02:00
Ali Sabil
ea655ada10 Cache the id attribute on Element 2015-09-13 23:55:40 +02:00
Anthony Ramine
cba8856309 Fix Node::query_selector() and Node::query_selector_iter()
These should not find the root of the tree to start matching.
2015-09-13 23:40:24 +02:00
Anthony Ramine
650afc9d3e Fix cloning of Element's attributes
No virtual method was invoked when copies of attributes were appended to
newly-cloned elements.
2015-09-13 23:40:24 +02:00
bors-servo
d5ee58caf2 Auto merge of #7606 - nox:move-typeid, r=jdm
Move the type_id fields to DOMClass

Cc @michaelwu.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7606)
<!-- Reviewable:end -->
2015-09-13 11:53:42 -06:00
Anthony Ramine
c25085f68a Introduce [Abstract] to mark non-leaf interfaces
Some interfaces like Node, CharacterData and HTMLTableCellElement are never
instantiated directly, only their descendant interfaces are. Those are marked
with [Abstract] to set their type_id to None instead of having dummy values
in the TypeId enums.
2015-09-13 19:46:28 +02:00