aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Generate PartialEq automaticallyGuillaume Gomez2016-01-031-6/+0
|
* Fix a bunch of clippy lintsJohannes Linke2016-01-021-8/+7
|
* Separate style+layout and layout-specific wrapper functionality.Bobby Holley2015-12-291-83/+28
| | | | | | | | | | | This patch does a number of things, unfortunately all at once: * Hoists a large subset of the layout wrapper functionality into the style system. * Merges TElementAttributes into the newly-created TElement. * Reorganizes LayoutData by style vs layout, and removes LayoutDataShared. * Simplifies the API for borrowing style/layout data. There's still more to do to make the style system usable standalone, but this is a good start.
* Auto merge of #8506 - nox:finish-ranges, r=dzbarskybors-servo2015-12-261-81/+142
|\ | | | | | | | | | | | | | | | | | | | | | | Properly propagate changes when range or trees are mutated Does the same thing as #6817, but storing Range instances directly in their start and end containers. Cc @dzbarsky <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8506) <!-- Reviewable:end -->
| * Properly propagate changes when range or trees are mutatedAnthony Ramine2015-12-251-30/+103
| |
| * Introduce CharacterData::clone_with_data()Anthony Ramine2015-12-131-15/+2
| |
| * Introduce UnbindContextAnthony Ramine2015-12-131-2/+12
| | | | | | | | | | This holds the context that describes the original node that was removed from a tree when unbinding from a tree.
| * Fix Node::ReplaceChildAnthony Ramine2015-12-131-38/+29
| |
* | Auto merge of #9026 - Manishearth:attack-of-the-clones, r=Ms2gerbors-servo2015-12-201-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | Remove clone in collect_text_contents <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9026) <!-- Reviewable:end -->
| * | Remove clone in collect_text_contentsManish Goregaokar2015-12-191-1/+1
| |/
* / Fix Node::replace_withAnthony Ramine2015-12-141-12/+18
|/
* now using external ref_slice instead of the std versionJason Williams2015-12-031-1/+1
|
* Auto merge of #8701 - nerith:attribute, r=jdmbors-servo2015-11-281-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | Remove `#[allow(raw_pointer_derive)]` attributes The attributes are unused. Fixes #8699. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8701) <!-- Reviewable:end -->
| * Remove `#[allow(raw_pointer_derive)]` attributesBrandon Fairchild2015-11-271-2/+0
| | | | | | | | | | | | The attributes are unused. Fixes #8699.
* | Add XMLDocument objectGuillaume Gomez2015-11-271-16/+16
|/
* Update string_cache to 0.2.Alan Jeffrey2015-11-251-12/+12
| | | | | | | | | | | 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.
* Remove two unused imports from components/script/dom/node.rsNick Fitzgerald2015-11-211-2/+2
| | | | | | | | | | | | | | Fixes these two compiler warnings: ``` Compiling servo v0.0.1 (file:///Users/fitzgen/src/servo/components/servo) /Users/fitzgen/src/servo/components/script/dom/node.rs:26:65: 26:78 warning: unused import, #[warn(unused_imports)] on by default /Users/fitzgen/src/servo/components/script/dom/node.rs:26 use dom::bindings::inheritance::{Castable, CharacterDataTypeId, ElementTypeId}; ^~~~~~~~~~~~~ /Users/fitzgen/src/servo/components/script/dom/node.rs:27:53: 27:70 warning: unused import, #[warn(unused_imports)] on by default /Users/fitzgen/src/servo/components/script/dom/node.rs:27 use dom::bindings::inheritance::{EventTargetTypeId, HTMLElementTypeId, NodeTypeId}; ^~~~~~~~~~~~~~~~~ ```
* Remove 'Node::is_anchor_element'Rizky Luthfianto2015-11-211-5/+0
|
* reduce node.unique_id sizeAleksandr Likhanov2015-11-191-6/+6
| | | | | fix sizeof unittest update Cargo.lock
* Make Node::is_parent_of more idiomaticBrandon Fairchild2015-11-171-4/+1
|
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-6/+7
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Replaced DOMString by String in devtools.Alan Jeffrey2015-11-121-7/+7
|
* Auto merge of #8479 - frewsxcv:domstring-default, r=Ms2gerbors-servo2015-11-131-3/+3
|\ | | | | | | | | | | | | | | Implement Default trait for DOMString <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8479) <!-- Reviewable:end -->
| * Implement Default trait for DOMStringCorey Farwell2015-11-111-3/+3
| |
* | Remove unnecessary 'node changed' notificationCorey Farwell2015-11-111-4/+0
|/ | | | This same notification already happens in `CharacterData::SetData`
* Auto merge of #8466 - frewsxcv:node-value, r=noxbors-servo2015-11-111-14/+3
|\ | | | | | | | | | | | | | | Simplify script::dom::node NodeValue implementations <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8466) <!-- Reviewable:end -->
| * Simplify script::dom::node NodeValue implementationsCorey Farwell2015-11-111-14/+3
| |
* | Clean up the conversion routinesAnthony Ramine2015-11-111-1/+1
|/ | | | | | | | 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".
* Implement attribute restyle hints.Bobby Holley2015-11-101-7/+10
| | | | Fixes #6942.
* Added versioning to DOM nodes.Alan Jeffrey2015-11-061-0/+23
| | | | | | | There is now an inclusive_descendants_version field of each node, which increases each time the node, or any of its descendants, is dirtied. This can be used for cache invalidation, by caching a version number and comparting the current version number against the cached version number.
* Auto merge of #8315 - asajeffrey:remove_child_dirty_parent, r=pcwaltonbors-servo2015-11-071-2/+2
|\ | | | | | | | | | | | | | | Dirty parent when removng a child node. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8315) <!-- Reviewable:end -->
| * Dirty parent when removng a child node.Alan Jeffrey2015-11-041-2/+2
| |
* | Cleanup some unneeded let bindingsDavid Zbarsky2015-11-061-3/+1
|/
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-7/+7
| | | | | | | | | | 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.
* Use DOMString::new() somewhat consistently.Ms2ger2015-11-041-6/+6
|
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-49/+49
|
* merge from masterrohan.prinja2015-11-031-14/+10
|\
| * Removed JS::root Fixes #8251nxnfufunezn2015-10-311-12/+8
| |
| * Fix some rust-clippy violationsCorey Farwell2015-10-301-2/+2
| |
* | rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-4/+3
| |
* | replace InheritTypes imports with inheritance importsrohan.prinja2015-10-301-2/+2
| |
* | more refactoringrohan.prinja2015-10-301-1/+2
| |
* | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+2
|/
* remove get_rooted() and replace all references to it with references to get()rohan.prinja2015-10-291-10/+10
|
* Remove HAS_DIRTY_SIBLINGS.Bobby Holley2015-10-211-32/+5
| | | | | | This isn't doing anything right now, and we're not even setting it properly in dirty_impl the |dirty_subtree(self)| was causing us to hit the skip case for step 3.
* Clean up the cast callsAnthony Ramine2015-10-211-60/+37
|
* Introduce trait CastableAnthony Ramine2015-10-211-93/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This trait is used to hold onto the downcast and upcast functions of all castable IDL interfaces. A castable IDL interface is one which either derives from or is derived by other interfaces. The deriving relation is represented by implementations of marker trait DerivedFrom<T: Castable> generated in InheritTypes. /^[ ]*use dom::bindings::codegen::InheritTypes::.*(Base|Cast|Derived)/ { /::[a-zA-Z]+(Base|Cast|Derived);/d s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/([{ ])[a-zA-Z]+(Base|Cast|Derived), /\1/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g s/, [a-zA-Z]+(Base|Cast|Derived)([},])/\2/g /\{([a-zA-Z]+(Base|Cast|Derived))?\};$/d s/\{([a-zA-Z_]+)\};$/\1;/ } s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::from_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.upcast::<\1>()/g s/\(([a-zA-Z]+)Cast::from_ref\)/\(Castable::upcast::<\1>\)/g s/([a-zA-Z]+)Cast::from_root/Root::upcast::<\1>/g s/([a-zA-Z]+)Cast::from_layout_js\(\&([a-zA-Z_.]+)\)/\2.upcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.r\(\))?\)/\2.downcast::<\1>()/g s/([a-zA-Z]+)Cast::to_ref\(\&?\**([a-zA-Z_]+)(\.[a-zA-Z_]+\(\))?\)/\2\3.downcast::<\1>()/g s/\(([a-zA-Z]+)Cast::to_ref\)/\(Castable::downcast::<\1>\)/g s/([a-zA-Z]+)Cast::to_root/Root::downcast::<\1>/g s/([a-zA-Z]+)Cast::to_layout_js\(&?([a-zA-Z_.]+(\(\))?)\)/\2.downcast::<\1>()/g s/\.is_document\(\)/.is::<Document>()/g s/\.is_htmlanchorelement\(\)/.is::<HTMLAnchorElement>()/g s/\.is_htmlappletelement\(\)/.is::<HTMLAppletElement>()/g s/\.is_htmlareaelement\(\)/.is::<HTMLAreaElement>()/g s/\.is_htmlbodyelement\(\)/.is::<HTMLBodyElement>()/g s/\.is_htmlembedelement\(\)/.is::<HTMLEmbedElement>()/g s/\.is_htmlfieldsetelement\(\)/.is::<HTMLFieldSetElement>()/g s/\.is_htmlformelement\(\)/.is::<HTMLFormElement>()/g s/\.is_htmlframesetelement\(\)/.is::<HTMLFrameSetElement>()/g s/\.is_htmlhtmlelement\(\)/.is::<HTMLHtmlElement>()/g s/\.is_htmlimageelement\(\)/.is::<HTMLImageElement>()/g s/\.is_htmllegendelement\(\)/.is::<HTMLLegendElement>()/g s/\.is_htmloptgroupelement\(\)/.is::<HTMLOptGroupElement>()/g s/\.is_htmloptionelement\(\)/.is::<HTMLOptionElement>()/g s/\.is_htmlscriptelement\(\)/.is::<HTMLScriptElement>()/g s/\.is_htmltabledatacellelement\(\)/.is::<HTMLTableDataCellElement>()/g s/\.is_htmltableheadercellelement\(\)/.is::<HTMLTableHeaderCellElement>()/g s/\.is_htmltablerowelement\(\)/.is::<HTMLTableRowElement>()/g s/\.is_htmltablesectionelement\(\)/.is::<HTMLTableSectionElement>()/g s/\.is_htmltitleelement\(\)/.is::<HTMLTitleElement>()/g
* Removed unsafe from 'query_selector_iter'Leo Lahti2015-10-201-5/+3
|
* Auto merge of #8060 - nox:deref-js, r=Ms2gerbors-servo2015-10-191-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | Implement Deref<Target=T> for JS<T> where T: Reflectable We can only borrow `JS<T>` from rooted things, so it's safe to deref it. The only types that provide mutable `JS<T>` things are `MutHeap<JS<T>>` and `MutNullableHeap<JS<T>>`, which don't actually expose that they contain `JS<T>` values. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8060) <!-- Reviewable:end -->
| * Return a reference in Document::window()Anthony Ramine2015-10-191-4/+4
| |