aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/servohtmlparser.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove from Trusted::new an unnecessary argumentArthur Skobara2015-12-121-5/+5
|
* Avoid some rooting in parsing.Ms2ger2015-12-111-18/+1
|
* Create and invoke XML parser for XML documents.ronak2015-12-041-1/+5
|
* Introduce abstraction over HTML and XML parsers for parser network listener.Josh Matthews2015-12-041-19/+197
|
* Use set_plaintext_state instead of plaintext tagKeith Yeung2015-11-271-8/+2
|
* Replaced DOMString constructor by conversion functions.Alan Jeffrey2015-11-121-1/+3
| | | | | | 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-1/+2
| | | | | | | | | | 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-4/+4
|
* merge from masterrohan.prinja2015-11-031-8/+25
|\
| * Auto merge of #7956 - gkbrk:binary_mime, r=jdmbors-servo2015-10-311-7/+24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made binary files show an info message instead of garbled text. Content-types with the TopLevel "Application" such as * application/octet-stream * application/pdf now show an info message instead of trying to view binary data as html. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7956) <!-- Reviewable:end -->
| | * Made binary files show an info message instead of garbled text.Gökberk Yaltıraklı2015-10-311-7/+24
| | |
| * | Removed JS::root Fixes #8251nxnfufunezn2015-10-311-1/+1
| |/
* | rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-1/+1
| |
* | more refactoringrohan.prinja2015-10-301-1/+1
|/
* Improve spec-compliance of script loading and execution during document startupTill Schneidereit2015-10-261-15/+19
| | | | Including proper support for async and deferred scripts.
* Clean up the cast callsAnthony Ramine2015-10-211-1/+1
|
* Introduce trait CastableAnthony Ramine2015-10-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Return a reference in ServoHTMLParser::window()Anthony Ramine2015-10-191-4/+4
|
* Do not root ServoHTMLParser::documentAnthony Ramine2015-10-191-9/+5
|
* Do not root Sink::documentAnthony Ramine2015-10-191-2/+1
|
* Return a reference in Document::window()Anthony Ramine2015-10-191-4/+2
|
* Simplify AsyncResponseListener implementations.Eli Friedman2015-10-151-11/+10
|
* Make AsyncResponseListener methods take `&mut self`.Eli Friedman2015-10-151-3/+3
|
* Update script to work with lint changesManish Goregaokar2015-10-161-0/+1
|
* sorted the extern crate, mod & use declarationsRavi Shankar2015-09-241-5/+5
|
* Fix reported test-tidy errors for unmerged import blocksBrandon Fairchild2015-09-191-7/+5
| | | | This merges import blocks that were reported by tidy as unmerged.
* Remove SinkHelpersAnthony Ramine2015-08-271-1/+16
| | | | Method get_or_create() is now directly on servohtmlparser::Sink.
* Remove helper traitsAnthony Ramine2015-08-271-22/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+5
|
* Cleanup NodeIterator, Range, ServoHTMLParser, TextEncoder, URLHelper, URL, ↵Manish Goregaokar2015-08-181-1/+1
| | | | VirtualMethods
* Fix existing syntactics nits.Josh Matthews2015-08-161-2/+2
|
* Measure heap memory usage for more types. Fixes #6951Bogdan Cuza2015-08-131-1/+3
|
* Refactor #[jstraceable] to #[derive(JSTraceable)]David Winslow2015-07-011-1/+1
| | | | fixes #6524
* Auto-derive JSTraceable and Reflectable for ServoHTMLParserMichael Wu2015-06-301-25/+7
|
* Update to zero-copy* HTML parsingSimon Sapin2015-06-251-1/+1
| | | | | | 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-27/+30
|
* script: Address review commentsPatrick Walton2015-05-261-4/+2
|
* script: Reflow 200 milliseconds after the `<body>` is parsed, like GeckoPatrick Walton2015-05-261-0/+5
| | | | does.
* Make external script sources load asynchronously, yet still block further ↵Josh Matthews2015-05-201-12/+225
| | | | parsing. Hook up document loading to async networking events.
* Implement Clone for Copy types.Ms2ger2015-04-281-1/+1
|
* Uniformise root() methodsAnthony Ramine2015-04-281-1/+1
| | | | | They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable and ResultRootable.
* Replace unsafe_blocks by unsafe_code.Manish Goregaokar2015-03-211-1/+1
|
* Implement Element.innerHTML setterChris Paris2015-03-181-0/+41
|
* Upgrade to rustc ba2f13ef0 2015-02-04Simon Sapin2015-02-111-2/+3
|
* Use JS<Node> rather than TrustedNodeAddress in the HTML parser.Ms2ger2015-02-031-5/+6
|
* 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.
* Deny unsafe blocks in script.Ms2ger2015-01-091-0/+1
| | | | As a first start, this allows them indiscriminately where used.
* Replace Root::deref() calls by Root::r() calls where possible.Ms2ger2015-01-011-1/+2
| | | | This changes those calls that were already sound.
* script: Remove glob imports added in #4405Tetsuharu OHZEKI2014-12-191-2/+2
|