iska
1164609bcf
Add implementation for inserting character tokens (strings) into the DOM
...
https://html.spec.whatwg.org/multipage/syntax.html#insert-a-character
2015-03-19 01:30:47 +01:00
iska
9858efa611
Fix "appropriate place for inserting a node"
...
The previous version did not take into consideration the "last table" case, wherein the node
is to be inserted before said "last table" element. Hence the out parameter which points to
the child node, before which the insertion should happen.
"let adjusted insertion location be inside last table's parent node, immediately before last table"
https://html.spec.whatwg.org/multipage/syntax.html#appropriate-place-for-inserting-a-node
2015-03-19 01:30:04 +01:00
iska
fcbffc76dc
Add implementation for HTML Document node adoption
...
https://dom.spec.whatwg.org/#concept-node-adopt
2015-03-19 00:43:16 +01:00
iska
d8d191cb5a
Add implementation for the HTML Node and its Mutation Algorithms
...
https://dom.spec.whatwg.org/#mutation-algorithms
2015-03-19 00:42:43 +01:00
iska
352b34b76c
Update html5lib-tests submodule to the latest commit as of 2015.03.16
...
Commit SHA-1: e633ddfeb0180f71238763576b1f5fdd26a7038f
2015-03-16 01:16:45 +01:00
iska
a7b526dc14
Restore the EOF Token and emit it in the tokenizer
2015-03-16 00:17:11 +01:00
iska
c90e13481c
Hide the "adjusted current node" property from the parser interface
2015-03-15 22:41:37 +01:00
iska
7f52c80ff7
Add handling for Tokenizer Parse Error Tokens in the Parser
2015-03-15 21:05:35 +01:00
iska
c15dd439bc
Move methods related to "insertion modes" further to the bottom in class
2015-03-15 21:05:17 +01:00
iska
9f4de95e62
Add HTML Tokenizer property to set the associated parser object
2015-03-15 21:04:25 +01:00
iska
48de37dc3d
Add HTML Document "ready state"
...
Initially it is set to "loading" and changed to "complete" when the parser finishes
2015-03-15 21:03:54 +01:00
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