Commit Graph
155 Commits
Author SHA1 Message Date
iska ba0cf5d7f6 Add "template"-related token processing in HTML Parser
"in template" phase is still not implemented
2015-03-15 20:32:52 +01:00
iska eb52f26014 Use correct cast for the token object in the "any other end tag in body" phase 2015-03-15 17:58:08 +01:00
iska a26bcfb0f2 Add missing import for element attribute adjustment methods in parser 2015-03-15 17:54:47 +01:00
iska a1560ddf37 Format special element types (add \n to break huge line) 2015-03-15 17:54:20 +01:00
iska 424241de47 Add implementations for MathML & SVG atribute adjustments
Adjusting foreign attributes for a token is ignored, since namespaces for attributes are not
handled in any way
2015-03-15 17:53:17 +01:00
iska 5897ff2c58 Use ordered dictionary for the HTML Element's attributes 2015-03-15 17:49:05 +01:00
iska e56c8dff90 Finalize "HTML integration point" check 2015-03-15 17:48:29 +01:00
iska 77651cfe4e Restore implementation for the select-scope in the stack of open elements
Wrongly removed removed in 56e6cd5
2015-03-15 15:36:07 +01:00
iska 769098b6dc Finalize the "markup declaration open state" in the HTML Tokenizer 2015-03-15 15:31:18 +01:00
iska 6c7e3465e9 Add implementation for a ordered dictionary for HTML attributes 2015-03-15 15:14:14 +01:00
iska 0d2d6dedeb Add implementation for the rest of the insertion modes
"in table text", "in caption", "in column group", "in table body", "in row", "in cell", "in select",
"in select in table", "in template", "after body", "in frameset", "after frameset",
"after after body", "after after frameset"
2015-03-14 01:56:37 +01:00
iska 800f697237 Add implementation for "text" and "in table" insertion modes
https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incdata
https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
2015-03-12 00:36:05 +01:00
iska 721290b814 Add handling for EOF token in "in body" insertion mode
https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
2015-03-11 22:51:21 +01:00
iska 56e6cd5650 Add implementation for handling end tag tokens in "in body" insertion mode
https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
2015-03-11 22:47:42 +01:00
iska 80f04cb7df rename adoption-agency-algorithm and toggle the return value
as of now, returns true if further processing is required, i.e. reprocessing the token
with the "any other end tag" case
2015-03-11 22:31:15 +01:00
iska 10506550dd Add a shorthand element-in-scope method to match the spec
"has-element-in-scope" is a shorthand for "has-element-in-specific-scope"
2015-03-10 00:31:08 +01:00
iska cf259240ab Add implementation for handling a start tag token in "in body" insertion mode
https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
2015-03-10 00:13:14 +01:00
iska 9fbf247518 Add NSString category methods for comparison ignoring case
and use these in the Doctype node and the quirks mode
2015-03-10 00:11:57 +01:00
iska 91e2e3c5a3 Add return value for the adoption agency algorithm to indicate that further processing is needed 2015-03-09 21:25:53 +01:00
iska a256f1e701 Add implementation for the Adoption Agency Algorithm
https://html.spec.whatwg.org/multipage/syntax.html#adoption-agency-algorithm
2015-03-09 21:16:53 +01:00
iska 0495404f01 Add a wrapper class for the Stack of Open Elements
- Better understandability
- Prevent polluting the parser
2015-03-09 00:34:06 +01:00
iska b8c18a7536 Add method to generate implied end tags and close a "p" tag
https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
https://html.spec.whatwg.org/multipage/syntax.html#close-a-p-element
2015-03-07 00:45:25 +01:00
iska 443ac898fa Add method for specific scope checks
https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
2015-03-07 00:44:06 +01:00
iska dab3f412b8 Add method to check whether an element is special 2015-03-07 00:43:18 +01:00
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