Commit Graph
131 Commits
Author SHA1 Message Date
iska a2fcdf834b Add character token method to split it from a given index 2015-03-07 00:43:00 +01:00
iska 3ff1044c6d Add implementation for Character Token case in in-body insertion mode
https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
2015-03-02 23:57:15 +01:00
iska d65463b4d6 Add implementation for Active Formatting Element Reconstruction
https://html.spec.whatwg.org/multipage/syntax.html#reconstruct-the-active-formatting-elements
2015-03-02 23:56:31 +01:00
iska cb9570c9e1 Add NSString category for HTML related methods
Also remove macros scattered throughout the code and use category consistently
2015-03-02 22:36:03 +01:00
iska c37ad24751 Add method generic-parsing-algorithm-for-token when encountering certain "text"-elements
https://html.spec.whatwg.org/multipage/syntax.html#generic-rcdata-element-parsing-algorithm
2015-03-01 23:56:20 +01:00
iska fe36585846 Add implementation stub for inserting characters (text) 2015-03-01 23:54:23 +01:00
iska e3c04c807e Add implementation for in-head, in-head-noscript & after-head insertion modes
https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inheadnoscript
https://html.spec.whatwg.org/multipage/syntax.html#the-after-head-insertion-mode
2015-03-01 23:53:46 +01:00
iska 9f8a08a644 Fix head-element insertion in before-head mode 2015-03-01 23:52:05 +01:00
iska 7131fff264 Fix override target in insert-element-for-node method
there is no override target per default.
2015-03-01 23:50:42 +01:00
iska 41e2795d27 Add Parser flags initialization and fix flag-name typo 2015-03-01 23:50:04 +01:00
iska f0e5a7cb26 Add "Before HTML" & "Before Head" insertion modes implementation in HTML Parser
https://html.spec.whatwg.org/multipage/syntax.html#the-before-html-insertion-mode
https://html.spec.whatwg.org/multipage/syntax.html#the-before-head-insertion-mode
2015-03-01 03:31:03 +01:00
iska f05ddd5a51 Add Parser methods for creating and inserting elements for given tokens
https://html.spec.whatwg.org/multipage/syntax.html#create-an-element-for-the-token
https://html.spec.whatwg.org/multipage/syntax.html#insert-an-html-element
2015-03-01 03:29:37 +01:00
iska 3ad454cb47 Add initializers for HTML Element class 2015-03-01 03:28:09 +01:00
iska f79530c7f6 Add convenience method to cast a Token to a Tag Token 2015-03-01 03:27:50 +01:00
iska 6217bc4299 Add Character Token methods for splitting leading whitespace
Since all successive characters are accumulated into the character token in the
tokenization stage, leading whitespace must be explicitly ignored during the tree
construction, hence these methods.
2015-03-01 03:27:24 +01:00
iska 6ec1892f73 Move HTML Nodes into separate group 2015-02-28 01:45:52 +01:00
iska 8d7d9d148e Use managed ivars for public and system identifiers in Document Type node
- If either is nil an empty string is return on getter-call
- nil value indicates a missing identifier, an empty string is not considered missing
in some parsing cases
2015-02-28 01:07:39 +01:00
iska fc5ec2c2e4 Add warning pragma in Character token for caching character set 2015-02-28 01:04:21 +01:00
iska 098c0fe467 Add initial implementation for parsing a fragment
https://html.spec.whatwg.org/multipage/syntax.html#html-fragment-parsing-algorithm
2015-02-28 01:03:54 +01:00
iska 7717cb7472 Add implementation for the parser's Initial Insertion Mode
https://html.spec.whatwg.org/multipage/syntax.html#the-initial-insertion-mode
2015-02-28 01:03:02 +01:00
iska c2086e482e Add parser method for inserting Comment nodes into the document
https://html.spec.whatwg.org/multipage/syntax.html#insert-a-comment
2015-02-28 01:01:58 +01:00
iska 6eccc61684 Rename utility method in Token classes for better semantics 2015-02-28 00:58:55 +01:00
iska 11631c7c76 Add methods to check Doctype validity and its quirks mode 2015-02-28 00:57:50 +01:00
iska 79856255da Add header that imports all HTML Nodes for convenience 2015-02-28 00:56:35 +01:00
iska 83bca329ff Add initial stubs for HTML Document and Element nodes
https://dom.spec.whatwg.org/#interface-document
https://dom.spec.whatwg.org/#interface-element
2015-02-27 00:03:35 +01:00
iska 034a28deea Add HTML Text node
https://dom.spec.whatwg.org/#interface-text
2015-02-26 23:41:42 +01:00
iska fade192485 Rename HTML Node Type enum values
Use HTMLNode<type> instead of HTML<type>Node
2015-02-26 20:09:27 +01:00
iska c45adc581b Add HTML Comment node
https://dom.spec.whatwg.org/#interface-comment
2015-02-26 20:08:06 +01:00
iska 5e9846b8ea Add HTML Document Type node
https://dom.spec.whatwg.org/#interface-documenttype
2015-02-25 23:48:24 +01:00
iska da00182ff2 Add HTML Node interface
https://dom.spec.whatwg.org/#interface-node
2015-02-25 22:38:02 +01:00
iska aae4401167 Add convenience methods to cast HTML token to the appropriate type 2015-02-22 01:46:42 +01:00
iska 4e3c758f8c Add initial implementation for "appropriate place for inserting a node"
https://html.spec.whatwg.org/multipage/syntax.html#creating-and-inserting-nodes
2015-02-22 01:46:13 +01:00
iska 3915487ca7 Add "insertion mode" state machine stub
https://html.spec.whatwg.org/multipage/syntax.html#the-insertion-mode
2015-02-21 14:50:52 +01:00
iska f9c8743106 Add "tree construction dispatcher" and token handling stub
https://html.spec.whatwg.org/multipage/syntax.html#tree-construction
2015-02-21 14:30:44 +01:00
iska 4afa6d11e1 Change HTML test's description property to "title" 2015-02-19 22:26:10 +01:00
iska 25c233eaaa Add tagname attribute for HTML Element 2014-11-08 02:09:03 +01:00
iska a59fec42e7 Add enum for HTML Namespaces 2014-11-08 02:08:42 +01:00
iska 2d6889878b Add implementation for FastEnumeration protocol for forin-iteration 2014-11-02 13:54:21 +01:00
iska b0f27e3f2f Add missing new-lines in Token classes 2014-11-02 13:53:54 +01:00
iska fc91ae1296 Remove unnecessary method to get HTML Tokenization state as String 2014-11-01 22:45:46 +01:00
iska 8787e1b0b9 Add all HTML5 Lib's tokenizer tests 2014-11-01 22:25:20 +01:00
iska ccc355d80e Replace unconsuming with a location mark in the current character in After DOCTYPE Name state to avoid consuming the character twice
Otherwise the parse error would be emitted multiple times if it is an invalid or unexpected character
2014-11-01 22:24:32 +01:00
iska 0ea6eb2b4e Fix Attribute Name state for NULL character
The attribute should not be finalised here, since its value wasn't reached yet
2014-11-01 22:22:38 +01:00
iska 477af1f4ab Change parse error message to 0x format instead of U+ 2014-11-01 22:06:01 +01:00
iska 97df7c5dd8 Fix Attribute Name state to prevent finalising a pending attribute name before it's finished 2014-11-01 22:05:22 +01:00
iska e8c74da8e2 Fix Bogus Comment state for nil-characters 2014-11-01 22:04:23 +01:00
iska 244021072c Remove erroneous parse-error emit in Comment End state 2014-11-01 22:03:34 +01:00
iska 0835e3d120 Add a "reconsume" method for current character to avoid scanning the Stream repeatedly
Reconsume differs from the Unconsume method, since it doesn't rewind the scan location to the previous characters, but instead sets a flag to return the last consumed character on the next acess
2014-11-01 22:02:36 +01:00
iska 622e22737b Fix emitted Token in Before Attribute Name state 2014-11-01 15:49:42 +01:00
iska 8fd6e89854 Fix scan location after reading Named Entity 2014-11-01 15:19:46 +01:00