aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/parse/html.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge script::parse and script::dom::servoparserAnthony Ramine2016-10-111-338/+0
|
* Unify ServoHTMLParser and ServoXMLParser in ServoParserAnthony Ramine2016-10-111-9/+45
|
* Reorder `use` statementsUK9922016-09-091-3/+3
|
* script: Obtain referrer policy from headerAravind Gollakota2016-07-151-1/+1
|
* Implement Document.referrerNazım Can Altınova2016-07-141-1/+2
|
* Replace HTMLScriptElement::mark_script_already_started by ↵Guillaume Gomez2016-06-031-1/+1
| | | | set_script_already_started
* Move DOMString back to scriptAnthony Ramine2016-05-241-1/+1
| | | | This entirely removes the 'non-geckolib' feature of the util crate.
* Store a pointer to the browsing context in the Document.Ms2ger2016-02-111-1/+1
|
* Update html5ever and xml5ever for API changes.Simon Sapin2016-01-271-1/+4
|
* Remove unused import in scriptMatt Brubeck2016-01-071-1/+0
|
* Avoid some rooting in parsing.Ms2ger2015-12-111-5/+17
|
* Add XMLDocument objectGuillaume Gomez2015-11-271-2/+2
|
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-6/+6
| | | | | | Replaced DOMString(...) by DOMString::from(...). Replaced ....0 by String::from(...). Removed any uses of .to_owner() in DOMString::from("...").
* Make DOMString a newtype around String, rather than a typedef.Ms2ger2015-11-041-6/+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.
* Get rid of a bunch of explicit derefsDavid Zbarsky2015-11-031-7/+7
|
* make test-tidy happy + fix some merge errorsrohan.prinja2015-11-031-1/+0
|
* merge from masterrohan.prinja2015-11-031-36/+20
|\
| * Removed JS::root Fixes #8251nxnfufunezn2015-10-311-36/+19
| |
* | rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-2/+1
| |
* | replace InheritTypes imports with inheritance importsrohan.prinja2015-10-301-1/+1
| |
* | more refactoringrohan.prinja2015-10-301-1/+1
|/
* Clean up the cast callsAnthony Ramine2015-10-211-16/+8
|
* Introduce trait CastableAnthony Ramine2015-10-211-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Issue 8028: `parse_html` should take `Url` rather than `&Url`Stephen Li2015-10-151-4/+4
|
* Generate the TypeId enums in codegenAnthony Ramine2015-10-141-6/+6
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-3/+3
|
* 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.
* Auto merge of #7523 - eefriedman:unnecessary-unsafe, r=SimonSapinbors-servo2015-09-091-1/+1
|\ | | | | | | | | | | | | | | | | | | Fix up some unnecessary uses of `unsafe`. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7523) <!-- Reviewable:end -->
| * Fix up some unnecessary uses of `unsafe`.Eli Friedman2015-09-021-1/+1
| |
* | Fix HTMLTemplateElement.innerHTMLAnthony Ramine2015-09-081-1/+8
| | | | | | | | https://github.com/w3c/DOM-Parsing/issues/1
* | Bump html5ever to 0.2.4, <template> support!Anthony Ramine2015-09-081-3/+12
|/ | | | | The failing <img> test comes from the now-correct parsing of <font face> elements in SVG.
* Remove AttributeHandlersAnthony Ramine2015-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 SinkHelpersAnthony Ramine2015-08-271-19/+1
| | | | Method get_or_create() is now directly on servohtmlparser::Sink.
* Remove helper traitsAnthony Ramine2015-08-271-7/+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.
* sort all usesJohann Tuffe2015-08-201-7/+7
|
* Replace uses of `for foo in bar.iter()`,João Oliveira2015-08-181-2/+2
| | | | | and `for foo in bar.iter_mut(), and for foo in bar.into_iter() (continuation of #7197)
* Directly append children to output node in parse_html_fragmentMichael Wu2015-07-151-3/+2
|
* Update to zero-copy* HTML parsingSimon Sapin2015-06-251-8/+11
| | | | | | html5ever now uses the Tendril string type to minimize copying internally, but Servo still converts from/to `String` at the boundary (which involves copying).
* Upgrade to SM 39Michael Wu2015-06-191-41/+37
|
* Make external script sources load asynchronously, yet still block further ↵Josh Matthews2015-05-201-88/+21
| | | | parsing. Hook up document loading to async networking events.
* Implement a DocumentLoader type that tracks pending loads and notifies the ↵Josh Matthews2015-05-111-7/+15
| | | | script task when the queue is empty. Dispatch the document load event based on the DocumentLoader's notification.
* Auto merge of #5931 - nox:rm-helpers, r=jdmbors-servo2015-05-061-1/+1
|\ | | | | | | | | | | <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5931) <!-- Reviewable:end -->
| * Remove helpers that correspond to DOM methodsAnthony Ramine2015-05-041-1/+1
| |
* | Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8.Simon Sapin2015-05-051-5/+6
|/
* Make NodeTypeId include CharacterData variantJinwoo Song2015-04-291-4/+4
| | | | | | | 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 Temporary::new()Anthony Ramine2015-04-281-1/+1
| | | | Temporary::from_rooted() now takes an Assignable value.
* Uniformise root() methodsAnthony Ramine2015-04-281-2/+2
| | | | | They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable and ResultRootable.
* Remove as_slice() calls from script.Ms2ger2015-04-261-2/+2
|
* Replace the Str implementation for AttrValue by a Deref implementation.Ms2ger2015-04-251-1/+1
|
* Implement child reparenting and node removal during parsing.nithin murali2015-04-221-4/+14
|