aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/virtualmethods.rs
Commit message (Collapse)AuthorAgeFilesLines
* Introduce BindContext with in_doc and connected flagsFernando Jiménez Moreno2019-04-261-3/+3
| | | | Fix some is_in_doc -> is_connected mistakes
* Add is_connected flag to node and use it to replace most uses of is_in_docFernando Jiménez Moreno2019-04-261-4/+4
|
* Implement HTMLMediaElement poster attributeFernando Jiménez Moreno2019-01-111-2/+9
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-41/+41
|
* `cargo fix --edition`Simon Sapin2018-11-061-49/+49
|
* Remove the HTMLTable{Header,Data}CellElement interfacesSimon Pieters2018-10-021-1/+1
| | | | Fixes #17222.
* Format script componentchansuke2018-09-191-53/+51
|
* script: Remove HTMLAppletElement.Emilio Cobos Álvarez2017-11-061-4/+0
| | | | It was removed from the spec, there's no reason to keep it in tree.
* Fix commonmark Markdown warnings in docs, part 1Matt Brubeck2017-10-171-5/+5
| | | | | | | | Fixes warnings from rust-lang/rust#44229 when `--enable-commonmark` is passed to rustdoc. This is mostly a global find-and-replace for bare URIs on lines by themselves in doc comments.
* Implement the error path for source children of media elementsAnthony Ramine2017-09-251-0/+4
| | | | This removes some test timeout.
* Rename VirtualMethods::attribute_is_mappedAnthony Ramine2017-09-071-2/+2
| | | | | This name doesn't convey what the method is about, it's now attribute_affects_presentational_hints.
* Handle dynamic font color changeP. Albrecht2017-09-071-0/+9
|
* Upgrade to html5ever 0.16Simon Sapin2017-05-021-1/+1
|
* Implement the form owner conceptMukilan Thiyagarajan2017-03-151-0/+4
|
* Properly insert text in document when parsingAnthony Ramine2017-01-071-0/+8
| | | | | | | If the last child of a node is a Text child and we are inserting text in that node, we need to append it to that Text child. Doing that means that HTMLStyleElement::children_changed gets called less frequently, but that's not a problem during parsing thanks to the pop hook.
* Update to string-cache 0.3Simon Sapin2016-11-031-2/+2
|
* add SVGElement, SVGGraphicsElement interfaces and SVGSVGElement elementAlexandrov Sergey2016-10-061-0/+8
|
* Implement HTMLLIElement#valuevrod2016-07-281-0/+4
|
* Stop re-exporting AttrValue.Ms2ger2016-06-071-2/+2
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-2/+2
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Add stubs for src and currentSrc for HTMLMediaElement.Josh Matthews2016-05-031-0/+4
|
* Move comment about removing stepsJonathan Schuster2016-02-131-0/+2
|
* Implement HTMLDetailsElement. Fixes #9216Lanza2016-01-201-0/+4
|
* Introduce UnbindContextAnthony Ramine2015-12-131-3/+3
| | | | | This holds the context that describes the original node that was removed from a tree when unbinding from a tree.
* Implement <hr> 'color' attributeCorey Farwell2015-11-081-0/+4
|
* rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-1/+1
|
* replace InheritTypes imports with inheritance importsrohan.prinja2015-10-301-3/+3
|
* move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+1
|
* Implement 'control' attribute for <label> elementsCorey Farwell2015-10-251-0/+4
|
* Clean up the cast callsAnthony Ramine2015-10-211-63/+29
|
* Introduce trait CastableAnthony Ramine2015-10-211-63/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Generate the TypeId enums in codegenAnthony Ramine2015-10-141-3/+4
|
* Cleanup code that was warned by rust-clippyCorey Farwell2015-10-111-33/+33
|
* Handle <meta name=viewport> elements when added to documentJames Gilbertson2015-09-301-0/+5
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-2/+1
| | | | This merges import blocks that were reported by tidy as unmerged.
* Implement adopting and cloning steps for HTMLTemplateElementAnthony Ramine2015-09-081-0/+4
|
* Implement adopting stepsAnthony Ramine2015-09-081-1/+8
| | | | | https://dom.spec.whatwg.org/#concept-node-adopt https://github.com/whatwg/dom/pull/66
* Introduce VirtualMethods::attribute_mutated()Anthony Ramine2015-09-021-22/+7
| | | | | | | | | | | | | | | | | | This replaces before_remove_attr(), after_remove_attr() and after_set_attr(). The virtual method takes the mutated attribute and an AttributeMutation value to disambiguate between "attribute is changed", "attribute is added" and "attribute is removed". In the case of "attribute is changed", the mutation value contains a reference to the old value of the mutated attribute, which is used to unregister outdated named elements when the "id" attribute is changed on an element. This greatly simplifies the handling of attributes, which in many cases don't have any specific behaviour whether they are removed or changed or added. It also fixes a few bugs where things were put in before_remove_attr() instead of after_remove_attr() (e.g. when removing an href attribute from a base element). A few helper functions in Element were also renamed and made private.
* Remove helper traitsAnthony Ramine2015-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove doublepointer in VirtualMethods, and from_borrowed_refManish Goregaokar2015-08-271-30/+30
| | | | | | | | | Most of the heavy lifting done by: ``` $ ls *rs | xargs gawk -i inplace '/let .*: &&.*from_borrowed_ref/{sub("&&", "\\&");sub("_borrowed_","_");} {print $0}' $ ls *rs | xargs gawk -i inplace "/impl.*VirtualMethods/{in_vm=1; sub(/<'a>/,\"\");sub(/&'a /,\"\")} /^}\$/{in_vm=0;} in_vm{\$0=gensub(/\\*self([^.])/,\"self\\\1\",\"g\"); sub(/from_borrowed_ref/,\"from_ref\")} {print}" ```
* sort all usesJohann Tuffe2015-08-201-3/+3
|
* Cleanup NodeIterator, Range, ServoHTMLParser, TextEncoder, URLHelper, URL, ↵Manish Goregaokar2015-08-181-1/+1
| | | | VirtualMethods
* Implement VirtualMethods for HTMLBaseElement.Ms2ger2015-08-081-0/+5
|
* Introduce VirtualMethods::children_changed()Anthony Ramine2015-07-251-4/+5
| | | | | | | | | This virtual method mimics the behaviour of mutation observers and make it more viable than the older child_inserted(), which didn't cover removed nodes and was called as many times as there were inserted nodes. A few other shortcomings where remove_child() was called directly instead of Node::remove() were also fixed while at it.
* Upgrade to SM 39Michael Wu2015-06-191-61/+34
|
* Auto merge of #5858 - pgonda:tabindex-focus-flag, r=jdmbors-servo2015-05-201-0/+8
|\ | | | | | | | | | | | | | | Added support for the tabindex field, also added its correct defaults (-2 TODOs for things not supported in Servo yet). Also added tabindex logic into Element::is_focusable_area. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5858) <!-- Reviewable:end -->
| * fixes #5603, adds support for tabindexPeter2015-05-201-0/+8
| |
* | script: Implement the `color` attribute of the `<font>` element.Patrick Walton2015-05-191-1/+9
|/ | | | Improves Hacker News.
* Make HTMLFormElement name attribute use an atomAnthony Ramine2015-05-141-0/+4
|