aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmloptgroupelement.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fixed some clippy warnings by replacing 'match' with 'if' (#32007)komuhangi2024-04-071-31/+28
|
* clippy: Fix needless_borrow warnings in components/script (#31928)Azhar Ismagulova2024-03-291-1/+1
|
* Replace script_plugins with a clippy like rustc driver (named crown) (#30508)Samson2023-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove script_plugins * Use crown instead of script_plugins * crown_is_not_used * Use crown in command base * bootstrap crown * tidy happy * disable sccache * Bring crown in tree * Install crown from tree * fix windows ci * fix warning * fix mac libscript_plugins.dylib is not available anymore * Update components/script/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> * Update for nightly-2023-03-18 Mostly just based off https://github.com/servo/servo/pull/30630 * Always install crown it's slow only when there is new version * Run crown test with `mach test-unit` * Small fixups; better trace_in_no_trace tests * Better doc * crown in config.toml * Fix tidy for real * no sccache on rustc_wrapper * document rustc overrides * fixup of compiletest * Make a few minor comment adjustments * Fix a typo in python/servo/platform/base.py Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com> * Proper test types * Ignore tidy on crown/tests --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Further changes required by ServoOriol Brufau2023-10-021-2/+2
|
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-4/+5
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-1/+1
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Implement :valid :invalid pseudo classes (#26729)John Poge II2023-07-211-1/+40
| | | Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Support arbitrary protos when wrapping DOM objects with constructors.Josh Matthews2023-05-281-1/+4
|
* Add trait DomObjectWrap to provide WRAP functionYUAN LYU2020-03-201-2/+0
|
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-11/+11
|
* Format script componentchansuke2018-09-191-16/+29
|
* Bump bitflags to 1.0 in every servo crateBastien Orivel2017-10-301-2/+2
|
* Backed out changeset e64e659c077d: servo PR #18809 and revendor for reftest ↵Gecko Backout2017-10-191-2/+2
| | | | | | failures, e.g. in layout/reftests/bugs/392435-1.html. r=backout on a CLOSED TREE Backs out https://github.com/servo/servo/pull/18809
* Update bitflags to 1.0 in every servo crateBastien Orivel2017-10-191-2/+2
| | | | | It still needs dependencies update to remove all the other bitflags versions.
* Remove use of unstable box syntax.Simon Sapin2017-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-3/+3
| | | | | | | 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 dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Solving merge conficts related to the html5ever_atoms -> html5ever changeChristian Poveda2017-05-031-1/+1
|\
| * Upgrade to html5ever 0.16Simon Sapin2017-05-021-1/+1
| |
* | Changed all prefixes from DOMString to the atomic Prefix from html5everChristian Poveda2017-05-031-4/+3
|/
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Update to string-cache 0.3Simon Sapin2016-11-031-4/+4
|
* Most of the code refactoring needed to be done is done with this commit.Arthur Marble2016-09-181-4/+4
|
* Inline DOM element creation into box expressions in components/script/dom/Kuba Birecki2016-07-141-2/+3
|
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Update rust-selectorsEmilio Cobos Álvarez2016-02-031-1/+1
| | | | | This commits updates rust-selectors to use the generic parser, and as such it moves the element state into the style crate.
* Remove unnecessary conversion to/from DOMString for localName.Eli Friedman2015-12-021-2/+3
|
* Compute attribute name atoms at compile-time.Eli Friedman2015-11-271-1/+1
|
* Update string_cache to 0.2.Alan Jeffrey2015-11-251-1/+1
| | | | | | | | | | | 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.
* merge from masterrohan.prinja2015-11-031-1/+2
|\
| * Move EventState to rust-selectors.Bobby Holley2015-10-301-1/+2
| |
* | move Castable into dom::bindings::inheritancerohan.prinja2015-10-301-1/+1
|/
* Clean up the cast callsAnthony Ramine2015-10-211-2/+1
|
* Introduce trait CastableAnthony Ramine2015-10-211-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove explicit lifetimes which can be elided.Adam Szopa2015-10-211-1/+1
|
* Move Event States to |Element|.Bobby Holley2015-10-161-10/+14
| | | | | | Conceptually they belong there, rather than on |Node|. Fixes #7934.
* Explicitly customise flags of new nodes where neededAnthony Ramine2015-10-151-4/+4
| | | | | | | 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-5/+7
|
* Replace usage of old-style WHATWG spec linksCorey Farwell2015-10-101-2/+2
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-1/+0
| | | | This merges import blocks that were reported by tidy as unmerged.
* Introduce VirtualMethods::attribute_mutated()Anthony Ramine2015-09-021-33/+25
| | | | | | | | | | | | | | | | | | 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.
* Make the traits for the IDL interfaces take &selfAnthony Ramine2015-08-271-1/+1
|
* Remove AttributeHandlersAnthony Ramine2015-08-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | On components/script/*.rs: # Remove imports. /^ *use dom::element::\{.*AttributeHandlers/ { s/\{AttributeHandlers, /\{/ s/, AttributeHandlers//g s/\{([a-zA-Z]+)\}/\1/ /\{\}/d s/::self;$/;/ } /^ *use dom::element::\{?AttributeHandlers\}?;$/d # Remove AttributeHandlers. /^pub trait AttributeHandlers \{$/,/^\}$/D # Patch AttributeHandlers methods. /^impl<'a> AttributeHandlers for &'a Element \{/,/^\}$/ { s/^impl<'a> AttributeHandlers for &'a Element \{/impl Element {/ /^ *fn /s/\(self([,)])/\(\&self\1/ /^ *fn.*\(&self/s/fn/pub fn/ } The few error cases were then fixed by hand.
* Remove helper traitsAnthony Ramine2015-08-271-2/+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.
* make dom_struct derive HeapSizeOf,João Oliveira2015-08-271-2/+0
| | | | closes #7357
* Remove doublepointer in VirtualMethods, and from_borrowed_refManish Goregaokar2015-08-271-4/+4
| | | | | | | | | 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-1/+1
|