| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* manual implementation of an assign operation
* manual implementation of an assign operation
* single-character string
* manual cjheck for common ascii range
|
|
|
|
|
|
|
|
|
| |
* clippy: Fix explicit auto-deref warnings
* clippy: Fix explicit auto-deref warnings
* refactor: Tidy up code
* refactor: Fix method not found errors
|
| |
|
|
|
|
|
| |
* Update Codegen.py to emit Foo_Binding instead of FooBinding
* s/FooBinding/Foo_Binding/g
|
|
|
|
|
| |
* strict imports formatting
* Reformat all imports
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
I don't want to do such a gratuitous rename, but with all the other types
now having "Dom" as part of their name, and especially with "DomOnceCell",
I feel like the other cell type that we already have should also follow
the convention. That argument loses weight though when we realise there
is still DOMString and other things.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Have CharacterData.SetData call children_changed on its parent when
data is set (if it is a Text node) so that HTMLStyleElement parents can
re-parse. Add variant ChildrenMutation::Text for it to use as the
mutation.
This fixes an issue where an empty <style> element's data is set but the
style is not updated. An HTMLStyleElement parent re-parses in its
children_changed implementation.
|
| |
|
| |
|
|
|
|
| |
This reverts commit ec723057b2360446790d436fe5e234d798fb4175.
|
| |
|
|
|
|
|
|
|
|
| |
It now fails since DOMString is currently based on std::string::String
on the Rust side, which is strictly well-formed UTF-8 and can not
contain unpaired surrogate code points.
Fixes #10780
|
|
|
|
| |
This entirely removes the 'non-geckolib' feature of the util crate.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The methods which are currently implemented are the ones on String that are currently being used:
string.push_str(...), string.clear() and string.extend(...). We may want to revisit this API.
|
|
|
|
|
|
| |
Replaced DOMString(...) by DOMString::from(...).
Replaced ....0 by String::from(...).
Removed any uses of .to_owner() in DOMString::from("...").
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
| |
|