Anthony Ramine
8bcf36b9a5
Change #[privatize] into #[derive(DenyPublicFields)]
2017-02-15 10:24:01 +01:00
Anthony Ramine
ac254046e4
Implement document.open and document.close ( fixes #14591 )
2017-02-03 16:50:12 +01:00
Anthony Ramine
7dd5945237
Inline dom::eventdispatcher into dom::event
2017-01-22 15:31:47 +01:00
Josh Matthews
3f35c3eee2
Add a permanent root to WebIDL callbacks, ensuring they are always safe to store.
2017-01-13 09:59:57 -05:00
Ms2ger
63f0d3ecf5
Privatize some items in EventTarget.
2017-01-09 14:17:42 +01:00
Ms2ger
b8554abaa4
Expose CallbackObject more.
...
This will make it easier to use new fields added to it.
2017-01-09 14:17:41 +01:00
Corey Farwell
449f6337d4
Rename Reflectable
to DomObject
.
...
Fixes https://github.com/servo/servo/issues/8473 .
2016-12-08 08:50:35 -10:00
bors-servo
22aebdf5d4
Auto merge of #14246 - emilio:servo-url, r=SimonSapin
...
Urlmageddon
<!-- Please describe your changes on the following line: -->
Still needs a bunch of code in net to be converted in order to get more
advantage of this for images and stuff, but meanwhile this should help quite a
bit with #13778 .
Still wanted to get this in.
r? @SimonSapin
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14246 )
<!-- Reviewable:end -->
2016-11-17 15:34:47 -06:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often.
2016-11-17 18:34:23 +01:00
Abelardo E. Mendoza
b372e7c98f
script creates methods taking '*mut JSContext' unsafe
...
rebase + marked the necessary new code as unsafe
2016-11-14 11:06:17 +01:00
Corey Farwell
f447040ea9
Migrate EventTarget
event firing functions to use Atom
s.
...
This allows us to utilize more `atom` macros.
2016-11-03 17:04:30 -04:00
Corey Farwell
c3b279a4c3
Remove "fire a simple event" concept, refactor event firing API.
...
"fire a simple event" concept was removed in
https://github.com/whatwg/html/pull/1933 .
2016-11-03 15:01:07 -04:00
Simon Sapin
53b638c0e2
Update to string-cache 0.3
2016-11-03 16:23:05 +01:00
Jesse Kipp
4f0ffbd1f6
Issue 13363 - Step 1.2 of compiling event handler
...
When compiling event handlers, check whether scripting is enabled
and early return None/null if not.
https://html.spec.whatwg.org/multipage/
webappapis.html#getting-the-current-value-of-the-event-handler
Issue 13363 - Fix spec for disabled scripting
The original spec for this PR was bad because it depended on the
DOM without scripting enabled to use Javascript to signal the test's
failure, so it could never fail.
Use an onerror handler on `window` where scripting is enabled, and
use an invalid string of JavaScript for the handler, to detect
whether or not the event handler is *really* being compiled or not.
Condense tests into a single HTML file
Yup, didn't even realize I could do that at the time.
Remove an unnecessary test
2016-10-20 11:08:44 -04:00
Anthony Ramine
d8e92bb271
Rename Reflectable::global_scope to global
2016-10-06 21:36:41 +02:00
Anthony Ramine
907781eb75
Remove Reflectable::global
2016-10-06 21:35:58 +02:00
Anthony Ramine
ae6af5172b
Introduce Reflectable::global_scope
2016-10-06 21:35:38 +02:00
Anthony Ramine
fcb59d3057
Make reflect_dom_object take a &GlobalScope
2016-10-06 20:59:09 +02:00
Stephen Lester
76e04e2acd
Invert conditional and return early for AddEventListener/RemoveEventListener
2016-10-05 07:55:33 -07:00
Adolfo Ochagavía
6c8bfdb774
Return an enum instead of a boolean from dispatch_event
...
Fixes #13196
2016-09-26 17:52:38 +02:00
Ms2ger
ae38c53de7
Dispatch error events at the window object.
2016-09-02 11:44:44 +02:00
Ms2ger
5662f0d346
Remove the JSAutoCompartment from report_pending_exception.
...
It doesn't really belong there.
2016-08-26 17:59:31 +02:00
Eduard Burtescu
0db1faf876
Switch to using the new rooted!/RootedGuard API for rooting.
2016-07-04 20:59:01 +03:00
Anthony Ramine
27620320f3
Make report_pending_exception unsafe
2016-06-07 00:26:49 +02:00
Anthony Ramine
cdc7bca944
Move DOMString back to script
...
This entirely removes the 'non-geckolib' feature of the util crate.
2016-05-24 10:54:57 +02:00
Piotr Stankiewicz
d1af39c114
dom: Add missing event handlers
...
Adding:
* global event handlers,
* window event handlers,
* document and element handlers,
* and support for BeforeUnloadEvent.
Signed-off-by: Piotr Stankiewicz <bionicrift@gmail.com>
2016-05-20 18:25:13 +01:00
Anthony Ramine
60aaac5175
Remove the custom PartialEq implementations on TypeId enums
...
https://github.com/rust-lang/rust/pull/33593 made them useless.
2016-05-17 15:30:14 +02:00
Ms2ger
735480c184
Stop using JSAutoRequest.
2016-05-13 15:34:38 +02:00
Simon Sapin
7932ab6ac2
Upgrade to rust-url 1.0 and hyper 0.9
2016-04-23 20:27:58 +02:00
Arpad Borsos
c880c97b1b
rename deprecated utf16_units to encode_utf16
2016-03-07 16:14:04 +01:00
Anthony Ramine
4d2587d6c3
Rename various bindings in event dispatching
2016-02-29 10:42:06 +01:00
Anthony Ramine
fc2cf31d5a
Return a Vec from EventTarget::get_listeners_for
2016-02-29 10:42:02 +01:00
Anthony Ramine
590316a468
Merge EventTarget::{get_listeners, get_listeners_for}
2016-02-29 10:41:57 +01:00
João Oliveira
b60d668908
use return value of invoking event handlers to cancel the event
2016-02-26 10:17:57 -05:00
Anthony Ramine
0adfb08089
Implement From<DOMString> for Atom
2016-02-24 17:52:17 +01:00
Anthony Ramine
25ae4ed093
Use atom!("error") in EventTarget::get_compiled_event_handler
2016-02-24 17:52:14 +01:00
bors-servo
0209d42b7b
Auto merge of #9701 - Ms2ger:listener-is-some, r=KiChjang
...
Use if-let in set_inline_event_listener.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9701 )
<!-- Reviewable:end -->
2016-02-19 21:34:22 +05:30
Josh Matthews
2796a4dfa8
Compile raw inline event handlers lazily. Resolves #8489 .
2016-02-11 15:44:52 +01:00
Ms2ger
1b50023a08
Use if-let in set_inline_event_listener.
2016-02-11 15:14:19 +01:00
Ms2ger
5317af1e19
Remove the global argument to EventTarget::{fire_event, fire_simple_event}.
2016-02-08 19:21:56 +01:00
Alexander Lopatin
2be49404be
Fix #9508 : Beautify our union enums constructors
2016-02-07 02:55:21 +03:00
bors-servo
87aaa5ffe0
Auto merge of #9523 - ruud-v-a:hasher, r=Wafflespeanut
...
Upgrade to new Hasher API
This fixes #9494 .
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg " height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9523 )
<!-- Reviewable:end -->
2016-02-05 07:32:13 +05:30
Anthony Ramine
cb5cd8d881
Say farewell to in-tree HeapSizeOf
2016-02-04 22:03:32 +01:00
Ruud van Asseldonk
95be0b9a25
Upgrade to new Hasher API
2016-02-03 20:06:39 +01:00
Chad Kimes
ce6075825d
Add global default method for Reflectable trait
2016-01-11 20:23:47 -05:00
Keith Yeung
c3f73b36e1
Fix documentation links for EventTarget
2016-01-09 06:33:36 -05:00
Brandon Fairchild
fb0304cfdb
Rename fire_simple_event_params to fire_event
...
Fixes #9180 .
2016-01-07 13:49:49 -05:00
Johannes Linke
6b215f38ee
Fix a bunch of clippy lints
2016-01-02 23:27:15 +01:00
Arthur Skobara
d38771e270
Implement EventTarget::fire_simple_event and EventTarget::fire_simple_event_params
2015-12-22 13:47:57 +06:00
Alan Jeffrey
3dec6edd10
Update string_cache to 0.2.
...
Updated string_cache, html5ever, xml5ever and selectors in Cargo.toml files and Cargo.lock.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced atom!(foo) by atom!("foo").
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
2015-11-25 10:13:21 -06:00