Commit graph

117 commits

Author SHA1 Message Date
Mátyás Mustoha
26df1962c3 Add WebGLSampler support
Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.13
2019-10-08 16:21:43 +02:00
Fernando Jiménez Moreno
68bee1c771 Final nits; fix custom elements rare data usage; s/owner_s_r/containing_s_r
Clarify special case for containing_shadow_root and add it to layout
accessor
2019-04-29 12:02:04 +02:00
Fernando Jiménez Moreno
9b2eb77530 Do not lazy initialize RareData on its getters 2019-04-26 12:00:26 +02:00
Fernando Jiménez Moreno
6bf1ca20a2 Make Node and Element rare_data an Option 2019-04-26 12:00:25 +02:00
Fernando Jiménez Moreno
48975840dd Unify DocumentOrShadowRoot implementation 2019-04-26 10:17:45 +02:00
Fernando Jiménez Moreno
4304ee28dc Partial ShadowRoot implementation of DocumentOrShadowRoot 2019-04-26 10:17:44 +02:00
Fernando Jiménez Moreno
cbcf21c248 DocumentOrShadowRoot mixin 2019-04-26 10:17:44 +02:00
Shanavas M
37aa21d8db Set url attribute 2019-01-14 14:59:39 +05:30
Dan Robertson
c46508e497
Update src/href attributes to be a USVString
The following IDLs have the src/href attributes typed as a DOMString
while in the spec the attribute has been updated to be a USVString:

 - HTMLIFrameElement
 - HTMLImageElement
 - HTMLInputElement
 - HTMLLinkElement
 - HTMLMediaElement
 - HTMLScriptElement
2018-12-17 15:28:42 +00:00
bors-servo
1046ae58a1
Auto merge of #22081 - KiChjang:onmessageerror, r=jdm
Add onmessageerror to WindowEventHandler

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- 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/22081)
<!-- Reviewable:end -->
2018-12-12 02:49:04 -05:00
Keith Yeung
3ee5a63199 Add onmessageerror to WindowEventHandler 2018-12-11 23:48:46 -08:00
Jan Andre Ikenmeyer
a1a14459c1
Update MPL license to https (part 3) 2018-11-19 14:47:12 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Fernando Jiménez Moreno
d94cbc83fc Fix loadedmetadata event handler 2018-10-26 10:21:27 +02:00
chansuke
c37a345dc9 Format script component 2018-09-19 17:40:47 -04:00
Fernando Jiménez Moreno
ebcbe2ff7d Mark DecodeResolver as must_root 2018-07-30 14:21:47 +02:00
Manish Goregaokar
f0d04249f9 Use new params impl (#4)
* AudioNodeType -> AudioNodeInit

* Use new param type system, clean up
2018-07-30 14:21:44 +02:00
Fernando Jiménez Moreno
986c2f7842 Expose more AudioParam methods 2018-07-30 14:21:41 +02:00
Fernando Jiménez Moreno
7380f69f77 Initial AudioParam bindings 2018-07-30 14:21:41 +02:00
Anthony Ramine
3c56d2f5a7 Move handle_potential_webgl_error to the dom macros module 2018-04-04 13:12:41 +02:00
Simon Sapin
793bebfc0e Upgrade to rustc 1.23.0-nightly (02004ef78 2017-11-08) 2017-11-09 16:56:39 +01:00
Simon Sapin
aa15dc269f Remove use of unstable box syntax.
http://www.robohornet.org gives a score of 101.36 on master,
and 102.68 with this PR. The latter is slightly better,
but probably within noise level.
So it looks like this PR does not affect DOM performance.

This is expected since `Box::new` is defined as:

```rust
impl<T> Box<T> {
    #[inline(always)]
    pub fn new(x: T) -> Box<T> {
        box x
    }
}
```

With inlining, it should compile to the same as box syntax.
2017-10-16 17:16:20 +02:00
Anthony Ramine
71b015173f Fix the form action IDL attributes
The returned string, if the attribute is present and non-empty,
should be a URL resolved against the element's document's base URL.
2017-10-11 13:56:10 +02:00
Anthony Ramine
605c679fee Fix URL attributes
URL attributes should always use AttrValue::Url, and the input should be
resolved against the document's base URL at setting time always.
2017-10-11 13:56:07 +02:00
Anthony Ramine
f87c2a8d76 Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> will be able to handle all the things that need to be
rooted that have a stable traceable address that doesn't move for the
whole lifetime of the root. Stay tuned.
2017-09-26 09:49:10 +02:00
Anthony Ramine
0e3c54c191 Rename dom::bindings::js to dom::bindings::root 2017-09-26 02:19:05 +02:00
Fernando Jiménez Moreno
8412f5403a User Timing API 2017-09-06 13:33:30 +02:00
Anthony Ramine
7875fea6cf Use absolute paths in the event handlers macros 2017-09-01 11:54:09 +02:00
Imanol Fernandez
fe4ee6de2e WebVR 1.1 spec compatibility 2017-07-05 22:38:29 +02:00
Jonathan Chan
a4cbbeef14 Have unsafe_no_jsmanaged_fields! macro take a type as argument rather than an ident.
We only write unsafe_no_jsmanaged_fields!(SomeType), and the
documentation says it is to be used for types.
2017-06-27 15:59:00 -07:00
Arseniy Ivanov
72ec00e0b5 Refactor some window_from_node calls based on feedback 2017-02-03 14:57:08 -05:00
Arseniy Ivanov
d23b34e243 Check for the presence of a window when working with event handlers forwarded to the window 2017-02-03 13:23:34 -05:00
Anthony Ramine
26ab0f82a8 Properly root the running animation list in a RootedVec 2016-12-12 10:47:55 -10:00
Anthony Ramine
535765907d Introduce jsmanaged_array 2016-12-06 13:15:18 -10:00
Anthony Ramine
f20361179d Remove generics from unsafe_no_jsmanaged_fields 2016-12-06 13:15:16 -10:00
Anthony Ramine
620a67ff14 Mark JSTraceable and its method as unsafe 2016-12-06 13:15:06 -10:00
Pu Xingyu
91f3d4f474 Remove redundant url clones
They are now redundant since now document.url() returns a struct rather
than a reference.
2016-11-18 12:39:22 +08:00
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Corey Farwell
2944c8d964 Make make_enumerated_getter prettier again.
Fixes https://github.com/servo/servo/issues/4723.
2016-10-12 23:00:07 -04:00
Keith Yeung
668163ec5c Emit TransitionEnd events in the layout thread and process it in the script thread 2016-10-11 19:36:06 -07:00
Jake Goldsborough
ce249d9384 adding macro to return string or url,
using that macro with the form action,
making the form submit process use base url,
adding tests.
2016-09-27 09:33:11 -07:00
vrod
defaa5bee7 Implement HTMLLIElement#value 2016-07-28 21:07:21 -03:00
Eduard Burtescu
b79a7d468e Use a stack guard and a macro for RootedVec instead of return_address. 2016-07-04 20:59:06 +03:00
Ms2ger
684510bc94 Stop re-exporting AttrValue. 2016-06-07 13:15:23 +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
Josh Matthews
a80320e24e Add event handlers for media-related events. 2016-05-03 18:05:22 -04:00
Simon Sapin
7932ab6ac2 Upgrade to rust-url 1.0 and hyper 0.9 2016-04-23 20:27:58 +02:00
Connor Brewster
3fd7634f54 webgl: finish, flush, detachShader, generateMipmap, Uniform1i 2016-04-02 12:31:47 -06:00
João Oliveira
b60d668908 use return value of invoking event handlers to cancel the event 2016-02-26 10:17:57 -05:00