aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/characterdata.rs
Commit message (Collapse)AuthorAgeFilesLines
...
* Use DOMString::new() somewhat consistently.Ms2ger2015-11-041-1/+1
|
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-2/+1
|
* rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-1/+1
|
* move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+1
|
* Clean up the cast callsAnthony Ramine2015-10-211-4/+2
|
* Introduce trait CastableAnthony Ramine2015-10-211-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Explicitly customise flags of new nodes where neededAnthony Ramine2015-10-151-4/+3
| | | | | | | Given codegen now generates the various TypeId enums, it seems pointless to still have to write their respective values in every DOM struct inheriting from Node just to set the initial IS_IN_DOC flag in Document and IN_ENABLED_STATE in form controls.
* Generate all Derived implementations in codegenAnthony Ramine2015-10-141-12/+1
|
* Generate the TypeId enums in codegenAnthony Ramine2015-10-141-13/+5
|
* Refactor Error enum usage to consistently be qualifiedAnthony Urena2015-10-061-4/+3
|
* Dirty text nodes when their content changesMatt Brubeck2015-09-291-2/+11
| | | | Fixes #7793.
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-1/+1
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-3/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* Introduce [Abstract] to mark non-leaf interfacesAnthony Ramine2015-09-131-2/+0
| | | | | | | Some interfaces like Node, CharacterData and HTMLTableCellElement are never instantiated directly, only their descendant interfaces are. Those are marked with [Abstract] to set their type_id to None instead of having dummy values in the TypeId enums.
* Move EventTargetTypeId/NodeTypeId to DOMClassMichael Wu2015-09-121-1/+3
|
* Elide most 'a lifetimesManish Goregaokar2015-09-041-2/+2
|
* Fix CharacterDataMethods to count UTF-16 code units, not code points.Simon Sapin2015-08-281-28/+65
|
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-15/+15
|
* Remove helper traitsAnthony Ramine2015-08-271-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that JSRef<T> is gone, there is no need to have helper traits. On components/script/*.rs: # Remove imports. /^ *use dom::[a-z]+::\{.*Helpers/ { s/\{(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers, /\{/ s/, (Raw[^L]|[^L][^a])[a-zA-Z]+Helpers([,}])/\2/g s/\{([a-zA-Z]+)\}/\1/ /\{\}/d s/::self;$/;/ } /^ *use dom::[a-z]+::\{?(Raw[^L]|[^L][^a])[a-zA-Z]+Helpers\}?;$/d On components/script/dom/*.rs: # Ignore layout things. /^(pub )?(impl|trait).*Layout.* \{/,/^}$/ { P; D; } # Delete helpers traits. /^(pub )?trait ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? \{$/,/^\}$/D # Patch private helpers. /^impl.*Private.*Helpers/,/^\}$/ { s/^impl<'a> Private([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for &'a ([^ ]+) \{$/impl \3 {/ /^ *(unsafe )?fn .*\(self.*[<&]'a/ { s/&'a /\&/g s/<'a, /</g } /^ *(unsafe )?fn /s/\(self([,)])/\(\&self\1/ } # Patch public helpers. /^impl.*Helpers/,/^\}$/ { s/^impl(<'a>)? ([^L][^ ]|L[^a])[^ ]+Helpers(<'a>)? for (&'a )?([^ ]+) \{$/impl \5 {/ /^ *(unsafe )?fn .*\(self.*[<&]'a/ { s/&'a /\&/g s/<'a, /</g } /^ *(unsafe )?fn .*\(&?self[,)]/s/(unsafe )?fn/pub &/ /^ *pub (unsafe )?fn /s/\(self([,)])/\(\&self\1/ } The few error cases were then fixed by hand.
* make dom_struct derive HeapSizeOf,João Oliveira2015-08-271-1/+0
| | | | closes #7357
* sort all usesJohann Tuffe2015-08-201-2/+2
|
* Start reporting memory usage for Window and all nodes in all DOM trees for ↵Josh Matthews2015-08-031-1/+2
| | | | frame treese in script tasks.
* Use local slice_charsJack Moffitt2015-07-311-4/+4
| | | | | | | StrExt::slice_chars is deprecated and will be removed in Rust. This lifts the implementation from Rust libstd and puts it in util::str. This fixes a bunch of deprecation warnings in Servo.
* Optimize `Node.normalize()`.Michael Howell2015-07-221-1/+6
| | | | | | Do not copy the discarded node's text data, borrow it. Closes #6658.
* Remove some redundant let bindingsDavid Zbarsky2015-07-041-6/+2
|
* Refactor #[jstraceable] to #[derive(JSTraceable)]David Winslow2015-07-011-2/+1
| | | | fixes #6524
* Upgrade to SM 39Michael Wu2015-06-191-10/+10
|
* Fix overflow in CharacterDataAnthony Ramine2015-05-151-16/+18
|
* Make NodeTypeId include CharacterData variantJinwoo Song2015-04-291-5/+12
| | | | | | | NodeTypeId is supposed to reflect the WebIDL inheritance hierarchy. All of Text/ProcessingInstruction/Comment inherit from CharacterData, which inherits from Node. There should be a CharacterDataTypeId value that differentiates between those, instead.
* Remove as_slice() calls from script.Ms2ger2015-04-261-1/+1
|
* Auto merge of #5721 - nox:nodeorstring, r=jdmbors-servo2015-04-161-0/+16
|\ | | | | | | | | | | <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5721) <!-- Reviewable:end -->
| * Finish implementation of ChildNode and ParentNodeAnthony Ramine2015-04-161-0/+16
| |
* | Add/update comments with links to specCorey Farwell2015-04-141-0/+1
|/ | | | | | | | | | Extracted out of #5649 * add more hyperlinks to associated specification for structs/methods * follow redirects and update links * replace broken links * removal of WHATWG multipage page name since the page name is not guaranteed to be stable
* Update WHATWG links to use HTTPSCorey Farwell2015-04-131-1/+1
| | | | | | | | | | | | | | Extracted this out of #5649 This commit was created with the following commands: ``` find . -iname "*.webidl" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g' ``` ``` find . -iname "*.rs" -type f -print0 | xargs -0 sed -i '' 's/http:\(.*\)whatwg.org/https:\1whatwg.org/g' ```
* Fix typo in the substringData implementation.Ms2ger2015-04-101-1/+1
|
* Fix CharacterData::SubstringData()Anthony Ramine2015-04-091-2/+11
| | | | It was not following the spec and it could panic.
* Cleanup access to CharacterData nodesAnthony Ramine2015-04-091-18/+24
|
* Remove CharacterData::set_data()Anthony Ramine2015-04-091-5/+0
|
* Fix CharacterData annotationsAnthony Ramine2015-04-091-6/+4
|
* Add links to CharacterData's specAnthony Ramine2015-04-091-0/+8
|
* Implement NonDocumentTypeChildNode::*ElementSibling()Anthony Ramine2015-04-091-2/+16
|
* Replace unsafe_blocks by unsafe_code.Manish Goregaokar2015-03-211-0/+1
|
* Upgrade rustc to d3c49d2140fc65e8bb7d7cf25bfe74dda6ce5ecf/rustc-1.0.0-dev.Ms2ger2015-03-181-3/+9
|
* fix function on utf8 string, pass two testsyodalee2015-02-281-5/+5
| | | | | | dom/nodes/Node-properties.html detachedForeignComment.length] detachedXmlComment.length]
* Replace uint/int by usize/isize in various places.Ms2ger2015-02-201-3/+3
|
* Fix some warnings in script.Ms2ger2015-02-121-3/+3
|
* Import the util crate as util rather than servo_util.Ms2ger2015-01-291-1/+1
| | | | | | | | This used to conflict with the util crate from the standard library, which has long since been removed. The import in layout has not been changed because of a conflict with the util mod there.
* Move to to_owned rather than into_string.Ms2ger2015-01-201-3/+4
| | | | into_string has been removed from Rust.
* auto merge of #4173 : Manishearth/servo/a-more-dom-struct, r=kmcallisterbors-servo2014-12-271-6/+0
|\ | | | | | | | | | | Now `#[dom_struct]` also generates Reflectable impls, and there's another lint to ensure that a DOM struct only contains one bare DOM field (as the first field) or a Reflector. A lot of this was generated by sed -- each autogenerated change has its own commit for easy review; these will be squashed later.
| * Remove manual impls of Reflectors (autogen)Manish Goregaokar2014-12-271-6/+0
| | | | | | | | | | | | | | | | | | Obtained via: `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"` `find . -maxdepth 1 -type f -print0 |xargs -0 grep -lZ dom_struct | xargs -0 grep -LZ "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"` followed by semi-automated removal of leftover imports