aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings
Commit message (Collapse)AuthorAgeFilesLines
* Auto merge of #18875 - servo:stable-js, r=nox,jdmbors-servo2017-10-1610-36/+69
|\ | | | | | | | | | | | | | | Remove the need for rust-mozjs to use unstable Rust features <!-- 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/18875) <!-- Reviewable:end -->
| * Update rust-mozjsSimon Sapin2017-10-161-11/+12
| |
| * Make usage of core_intrinsics optionalSimon Sapin2017-10-161-6/+4
| |
| * Make usage of unstable feature on_unimplemented optional.Simon Sapin2017-10-161-1/+2
| |
| * Remove usage of unstable features const_ptr_null and const_ptr_null_mutSimon Sapin2017-10-162-5/+4
| |
| * Don’t rely on unstable 'const fn's in rust-mozjs, so we can remove them.Simon Sapin2017-10-161-12/+10
| |
| * Replace uses of libcore with libstd in components/scriptSimon Sapin2017-10-161-2/+2
| |
| * Move remaining uses of NonZero to our nonzero crateSimon Sapin2017-10-163-3/+2
| |
| * Replace NonZero<*mut JSObject> with a wrapper to enable local trait impls.Simon Sapin2017-10-165-6/+43
| |
* | Implement DOM to textureImanol Fernandez2017-10-161-1/+2
|/
* Remove use of unstable box syntax.Simon Sapin2017-10-164-6/+6
| | | | | | | | | | | | | | | | | | | | 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.
* Implement EventListenerOptions for EventTargetGuillaume Gomez2017-09-301-2/+1
| | | | For now, only "capture" is supported.
* Make DomRoot<T> a type alias of a more general Root<T> typeAnthony Ramine2017-09-282-60/+108
| | | | | | | This Root<T> relies on the concept of a stable trace object, which doesn't move for the whole lifetime of the T value. For safety reasons, T must be 'static. The only implementor of StableTraceObject for now is Dom<T>.
* Kill RootCollectionPtrAnthony Ramine2017-09-271-15/+4
|
* Move STACK_ROOTS to dom::bindings::rootAnthony Ramine2017-09-271-3/+4
|
* Move script_runtime::StackRootTLS to root::ThreadLocalStackRootsAnthony Ramine2017-09-271-0/+18
|
* Reorder things in dom::bindings::rootAnthony Ramine2017-09-271-205/+205
| | | | The type DomRoot<T> is now the first one defined in it.
* Store a Dom<T> in DomRoot<T>Anthony Ramine2017-09-261-5/+7
|
* Make DomRoot::new unsafeAnthony Ramine2017-09-263-6/+7
|
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-2613-91/+95
| | | | | | | 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.
* Rename DOMRefCell<T> to DomRefCell<T>Anthony Ramine2017-09-262-11/+11
| | | | | | | | I don't want to do such a gratuitous rename, but with all the other types now having "Dom" as part of their name, and especially with "DomOnceCell", I feel like the other cell type that we already have should also follow the convention. That argument loses weight though when we realise there is still DOMString and other things.
* Rename OnceCellJS<T> to DomOnceCell<T>Anthony Ramine2017-09-261-7/+7
| | | | Like DOMRefCell<T>.
* Rename LayoutJS<T> to LayoutDom<T>Anthony Ramine2017-09-262-25/+25
|
* Rename MutNullableJS<T> to MutNullableDom<T>Anthony Ramine2017-09-261-12/+12
|
* Rename MutJS<T> to MutDom<T>Anthony Ramine2017-09-261-10/+10
|
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-266-67/+67
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-2613-17/+17
|
* Use more named string interpolation.Josh Matthews2017-09-251-10/+13
|
* Remove almost all uses of Heap::new.Josh Matthews2017-09-252-4/+11
|
* Initialize rooted dictionaries to a stable value before setting fields.Josh Matthews2017-09-252-23/+58
|
* Derive the Default trait for dictionaries containing GC values.Josh Matthews2017-09-254-6/+31
|
* Store rootable dictionary members of dictionaries in RootedTraceableBox.Josh Matthews2017-09-253-24/+27
|
* Be more conservative about safety of dictionary and union values.Josh Matthews2017-09-253-11/+39
| | | | | | | | Mark dictionaries containing GC values as must_root, and wrap them in RootedTraceableBox in automatically-generated APIs. To accommodate union variants that are now flagged as unsafe, add RootedTraceableBox to union variants that need to be rooted, rather than wrapping the entire union value.
* Don't generate union conversion functions for object variants.Josh Matthews2017-09-251-2/+6
|
* Return a promise from HTMLMediaElement::PlayAnthony Ramine2017-09-231-0/+2
|
* Auto merge of #18600 - servo:promises, r=<try>bors-servo2017-09-222-10/+3
|\ | | | | | | | | | | | | | | | | | | | | Improve Promise The elephant 🐘 (not PHP's) still remains in the room: `Rc<Promise>` shouldn't require `#⁠[allow(unrooted_must_root)]`. <!-- 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/18600) <!-- Reviewable:end -->
| * Make Promise::reject_error soundAnthony Ramine2017-09-221-5/+1
| |
| * Make Promise::resolve_native actually soundAnthony Ramine2017-09-211-4/+1
| | | | | | | | | | We shouldn't have to pass a raw JSContext pointer, and to enter the promise's context's compartment by hand.
| * Rename a couple of Promise methodsAnthony Ramine2017-09-211-1/+1
| |
* | Auto merge of #18059 - sendilkumarn:mito, r=noxbors-servo2017-09-211-0/+50
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using OnceCell<T> from Mitochondria <!-- 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: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #13402 (github issue number if applicable). <!-- 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/18059) <!-- Reviewable:end -->
| * moving to oncecellsendilkumarn2017-09-091-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding oncecell for JS references removing option<JS<T>> to <JS<T>> changing return types removing get method and refactoring the function changing getElements method lint fixes moving to default simplifying return ordering Removing elements linting
* | Introduce TaskOnceAnthony Ramine2017-09-201-3/+3
| | | | | | | | | | Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing from CancellableTask<T>.
* | Rename Task to TaskBoxAnthony Ramine2017-09-201-3/+3
| |
* | Make Task require SendAnthony Ramine2017-09-201-2/+2
| |
* | Auto merge of #18533 - servo:TASKS, r=SimonSapinbors-servo2017-09-181-31/+23
|\ \ | | | | | | | | | | | | | | | | | | | | | Rename Runnable to Task and other improvements <!-- 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/18533) <!-- Reviewable:end -->
| * | Use task! to resolve promisesAnthony Ramine2017-09-181-12/+8
| | |
| * | Use task! to reject promisesAnthony Ramine2017-09-181-12/+8
| | |
| * | Move Task to its own moduleAnthony Ramine2017-09-181-1/+1
| | |
| * | Use normal tasks to reject and resolve promisesAnthony Ramine2017-09-171-5/+5
| | |
| * | Rename Runnable to TaskAnthony Ramine2017-09-161-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes are: * `*Runnable` -> `*Task`; * `RunnableMsg` -> `Task`; * `RunnableWrapper` -> `TaskCanceller`; * `MainThreadRunnable` -> `MainThreadTask`; * `wrap_runnable` -> `wrap_task`; * `get_runnable_wrapper` -> `task_canceller`; * `handler` -> `run`; * `main_thread_handler` -> `run_with_script_thread`.