aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/utils.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor the `call` hook on non-callback interface objects (fixes #10744)Anthony Ramine2016-04-251-12/+1
| | | | | | | | | | | It's now set through the intermediate InterfaceConstructorBehavior structure, which lets us improve the abstraction around NonCallbackInterfaceObjectClass a bit better. When the interface's constructor is supposed to always throw, the error for calling `Foo()` without new is "Illegal constructor.". when the interface actually defines an interface, the error is instead "This constructor needs to be called with `new`.".
* Lazily define interface objects on globals (fixes #6419)Anthony Ramine2016-02-251-7/+61
|
* Lazily-define standard ECMAScript classesAnthony Ramine2016-02-251-7/+5
|
* Stop returning an Option from Window::browsing_context.Ms2ger2016-02-231-1/+1
| | | | | A Window always has a WindowProxy; the only reason it's wrapped in a nullable field is the order in which those objects are created.
* Bump heapsize to 0.3Anthony Ramine2016-02-131-1/+2
|
* Say farewell to in-tree HeapSizeOfAnthony Ramine2016-02-041-1/+1
|
* Move ConstantSpec, NonNullJSNative and define_constants from utils to interfacenxnfufunezn2016-01-241-62/+5
|
* Fix prototypes of interface objects (fixes #2665)Anthony Ramine2016-01-121-5/+5
|
* Refactor prototype initialisationAnthony Ramine2016-01-121-190/+12
| | | | | | | | | | | | | The function do_create_interface_objects is removed in favour of 4 functions: create_callback_interface_object, create_interface_prototype_object, create_noncallback_interface_object and create_named_constructors. While this increases the amount of codegen'd code, this greatly improves the readability of the code involved in this part of DOM, instead of having one function doing 4 different things. We can always find a more adequate abstraction later. NativeProperties and everything related to the interface objects have been removed from the utils module.
* Remove NativePropertyHooksAnthony Ramine2016-01-121-12/+0
|
* Use features to prevent the util component from entraining the world in ↵Bobby Holley2016-01-111-1/+1
| | | | GeckoLib builds.
* Rename the browsercontext module.Ms2ger2015-12-111-2/+2
|
* Initialize the slots of global objects before a possible GC.Ms2ger2015-12-101-16/+10
|
* Implement [Unforgeable]Anthony Ramine2015-12-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | This is mostly stolen from Gecko. As there, we define the unforgeable members on an object stored in the slots of the prototype object. They are then copied onto instance objects when they are instantiated. It should be noted that proxy objects see their unforgeable memebers defined on their expando object. Unforgeable attributes aren't properly inherited in codegen (in a similar fashion as getters and setters as filed in #5875) and require to be redefined in derived interfaces. Fortunately, there are currently no such interfaces. No unforgeable members can be included into the TestBinding interfaces for good measure because they are not compatible with setters. Given the unforgeable holder object has the same prototype as actual instances of the interface, the finalize hook needs to check its slot pointer for nullity before dropping it. The new failing test isn't related to Unforgeable attributes, but to the fact that all Document instances currently have a Location, even if their window isn't in a browsing context.
* Remove unused slot in prototype object (fixes #8588)Anthony Ramine2015-11-301-19/+0
|
* Remove `#[allow(raw_pointer_derive)]` attributesBrandon Fairchild2015-11-271-3/+0
| | | | | | The attributes are unused. Fixes #8699.
* Rename a confusing argument.Ms2ger2015-11-191-2/+2
|
* Rustfmt some of script.Ms2ger2015-11-181-106/+152
|
* Use the conversion traits from js.Ms2ger2015-11-121-6/+7
|
* Use throw_type_error and throw_range_error from js.Ms2ger2015-11-121-1/+2
|
* Clean up the conversion routinesAnthony Ramine2015-11-111-7/+3
| | | | | | | | Functions returning `Root<T>` are prefixed by "root_" and the ones returning `*const T` by "native_". Functions taking `*mut JSObject` are now suffixed by "_from_object" and the ones taking `&T` by "_from_reflector".
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-1/+1
| | | | | | | | | | This should make it somewhat easier to experiment with alternative representations in the future. To reduce churn, this commit leaves the String field public, though. Also, this will allow us to use the default String type to represent the IDL USVString type, which explicitly forbids unpaired surrogates, ans as such is a better match to the Rust String type.
* more cleanuprohan.prinja2015-10-301-3/+1
|
* rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-1/+1
|
* replace InheritTypes imports with inheritance importsrohan.prinja2015-10-301-1/+1
|
* more refactoringrohan.prinja2015-10-301-239/+0
|
* Auto merge of #8242 - Ms2ger:update-js, r=metajackbors-servo2015-10-281-1/+1
|\ | | | | | | | | | | | | | | | | | | Update js. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8242) <!-- Reviewable:end -->
| * Update js.Ms2ger2015-10-281-1/+1
| |
* | move reserved slot setting for DOM globalsNathan Froyd2015-10-271-1/+3
|/ | | | | | | Moving this slot setting prior to initializing standard classes and other initialization tasks means that we can effectively use JS_GC_ZEAL. Fixes #6057.
* Use the new define_methods and define_properties functions from js.Ms2ger2015-10-251-40/+18
|
* Remove the unused default implementation of Reflectable::init_reflector.Ms2ger2015-10-231-3/+1
|
* Introduce IDLInterface::derives()Anthony Ramine2015-10-211-2/+5
| | | | | | | This method is given a DOMClass value and returns whether it derives from Self. Interfaces with no descendants directly check whether the given DOMClass is the same as their own.
* Auto merge of #7943 - pierrechevalier83:fix_issue_7941, r=Ms2gerbors-servo2015-10-191-9/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify some code in do_create_interface_objects rval.get() is believed to be always null upon entering this function. This assumption is verified by the added assertion. It makes more sense to move the block of code that was moved inside the if statement which is the only place where it can be initialized. Fixes #7941. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7943) <!-- Reviewable:end -->
| * Clarify some code in do_create_interface_objectsPierre Chevalier2015-10-101-9/+10
| | | | | | | | | | | | | | | | | | rval.get() is believed to be always null upon entering this function. This assumption is verified by the added assertion. It makes more sense to move the block of code that was moved inside the if statement which is the only place where it can be initialized. Fixes #7941.
* | Auto merge of #7972 - nox:codegen-heapsize, r=Ms2gerbors-servo2015-10-151-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce DOMClass::heap_size_of It holds a function pointer to the HeapSizeOf::heap_size_of_children() implementation corresponding to that IDL interface. This removes the need for a clumsly TypeId-based match expression in the former heap_size_of_eventtarget() function. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7972) <!-- Reviewable:end -->
| * | Introduce DOMClass::heap_size_ofAnthony Ramine2015-10-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | It holds a function pointer to the HeapSizeOf::heap_size_of_children() implementation corresponding to that IDL interface. This removes the need for a clumsly TypeId-based match expression in the former heap_size_of_eventtarget() function.
* | | Support the updated spidermonkey bindingsMichael Wu2015-10-141-47/+47
|/ /
* / Generate the TypeId enums in codegenAnthony Ramine2015-10-141-3/+3
|/
* Changed dom_class type to Option<&'static DOMClass>Andriy Kunitsin2015-10-091-4/+9
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-13/+12
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-3/+2
| | | | This merges import blocks that were reported by tidy as unmerged.
* Move EventTargetTypeId/NodeTypeId to DOMClassMichael Wu2015-09-121-0/+4
|
* Remove needless returnsManish Goregaokar2015-09-041-7/+7
|
* Elide most 'a lifetimesManish Goregaokar2015-09-041-1/+1
|
* sort all usesJohann Tuffe2015-08-201-27/+27
|
* Update js.Ms2ger2015-08-181-1/+1
|
* Replace uses of `for foo in bar.iter()`,João Oliveira2015-08-181-1/+1
| | | | | and `for foo in bar.iter_mut(), and for foo in bar.into_iter() (continuation of #7197)
* Replace uses of `for foo in bar.iter()` and `for foo in bar.iter_mut()`João Oliveira2015-08-151-2/+2
| | | | closes #7197
* Start reporting memory usage for Window and all nodes in all DOM trees for ↵Josh Matthews2015-08-031-1/+12
| | | | frame treese in script tasks.
* Auto merge of #6850 - servo:rustup_2015-07-30, r=SimonSapinbors-servo2015-07-301-2/+2
|\ | | | | | | | | | | | | | | | | | | Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30) This builds and passes unit tests. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6850) <!-- Reviewable:end -->