iska
f8ee4a38b4
Add HTML Node Filter protocol
2015-05-27 00:59:10 +02:00
iska
de597a51a4
Reorganize HTML DOM classes
2015-05-27 00:53:58 +02:00
iska
470b9b8d37
Change arguments order in HTML Element initializer for convenience
...
Dictionary argument moved to last position.
2015-05-27 00:39:39 +02:00
iska
915f4cc064
Remove baseURI property from HTMLNode
...
Proper support will be implemented when needed.
2015-05-27 00:38:07 +02:00
iska
11af0509a3
Rename type property to nodeType in HTMLNode for better clarity
2015-05-27 00:37:23 +02:00
iska
2ee3b2d2b3
Rename HTMLNode header to HTMLDOM
2015-05-22 20:06:24 +02:00
iska
1e9118078f
Rename Nodes group to DOM
2015-05-21 23:24:13 +02:00
iska
74aec57785
Add method to set inner HTML of an Element
2015-05-21 00:20:20 +02:00
iska
111acb4f8f
Add a convenience HTML Document initializer
...
Creates a document directly given a HTML string, instead of manually creating a parser.
2015-05-20 22:39:52 +02:00
iska
2c9f68e2ea
Add Node methods to prepend nodes
2015-05-02 21:08:21 +02:00
iska
3d3e4d52b4
Add a NO_DOM_CHECKS macro to disable validations for DOM manipulations
...
DOM validation checks are expensive. This macro would allow for removing these checks from the compiled
product, which would increase performance by about 20-30%. However, the user is responsible for the validity
of the manipulations and the resulting DOM.
2015-05-02 20:52:03 +02:00
iska
bf061d6367
Add support for inserting a Document Fragment
...
Previous implementation would just insert the fragment as a child node, whereas it should insert its
child nodes.
2015-05-02 20:47:40 +02:00
iska
40baea8ece
Move tests for Mutation Algorithms into separate class
2015-04-27 19:43:43 +02:00
iska
a2c6f22495
Add comments for insertion and replacement tests
2015-04-25 22:31:47 +02:00
iska
b2f1864c80
Add tests for validating the replacing child node within a Document
2015-04-25 22:31:12 +02:00
iska
cffe1cc703
Fix validation for replacing a child node and refactor common logic into a block
2015-04-25 22:25:31 +02:00
iska
bc6bbf1d63
Add tests for validation for inserting an Element & Document Type into a Document
2015-04-25 15:27:25 +02:00
iska
71aed89574
Fix validation for inserting a Document Fragment into a Document
2015-04-25 15:13:43 +02:00
iska
36960dceb3
Rename node parameter in the validation method of HTML Node for clarity
2015-04-25 13:21:08 +02:00
iska
3ddfa15b15
Add tests to validate the insertions of nodes into a given parent
...
These tests check the implementation of the Mutation Algorithms of the DOM Standard
https://dom.spec.whatwg.org/#mutation-algorithms
2015-04-25 13:20:15 +02:00
iska
071742fb27
Add default initializers for HTML Comment, Document Type & Document Fragment
2015-04-25 13:17:02 +02:00
iska
1bc896efc9
Add tests for HTML Node methods
...
Todo: Tests for negative cases, e.g. invalid manipulations that lead to hierarchy or not found errors.
2015-04-23 00:43:06 +02:00
iska
429f00adb6
Fix project settings after update to Xcode 6.3.1
2015-04-23 00:40:35 +02:00
iska
d08ac2100e
Fix the isEqualTo call in Parser
...
Use isEqual instead
2015-04-21 23:07:57 +02:00
iska
62a6336dce
Merge branch 'release/0.1.0' into develop
2015-04-20 21:51:38 +02:00
iska
95aa60a6e0
Add README file with initial description
...
Although the parsing algorithm is complete the version 0.1.0 is far from ready to be called a "kit".
2015-04-20 21:51:30 +02:00
iska
150d49b010
Add MIT License
2015-04-19 20:33:53 +02:00
iska
5aaa223437
Improve error message for the Tokenizer tests
2015-04-17 00:53:12 +02:00
iska
1af7e9ea89
Reorder test classes and their groups
2015-04-17 00:45:15 +02:00
iska
1829af229a
Add Ordered Dictionary tests
...
- Remove index checks, an exception will be thrown by the underlying array
- Fix indexed subscript method name
- Change behaviour of "setObject:forKey:atIndex:" so that an existing key is moved
2015-04-17 00:43:47 +02:00
iska
27c020371d
Rename NSString category method for clarity and add category tests
2015-04-16 20:37:49 +02:00
iska
575dbc50d4
Add HTML Parser implementation for the <template> tag
...
Also activate the <template> tests
2015-04-16 20:03:18 +02:00
iska
654dffcc92
Add initial implementation for HTML Template & Document Fragment
...
https://html.spec.whatwg.org/multipage/scripting.html#the-template-element
2015-04-16 00:13:15 +02:00
iska
01adbf4437
Fix method name typo in stack of open elements
2015-04-13 00:28:23 +02:00
iska
dbae9dd55f
Organize source code into groups
2015-04-12 19:48:48 +02:00
iska
4ddf8e60fd
Remove the dynamic selector-state-machine from the parser class
...
Instead, use a plain-old switch-case.
Performance boost (along with the character token changes) about 6% (reference to baseline)
2015-04-12 19:45:50 +02:00
iska
c524b25051
Add HTML5 Lib's test detail message to all assertions in the Tree Construction tests
2015-04-12 19:35:53 +02:00
iska
d8a55db4dc
Change the implementation of the character token and string methods to reduce initialization overhead
...
All methods operate on the same NSString instance instead of creating a new character token, e.g. when
trimming or splitting the leading whitespace.
2015-04-12 18:33:10 +02:00
iska
0911e46dba
Add HTMLKit Parser Performance test
...
This tests measures the parsing time of the HTML Living Standard page, about 8.1MB in
size (as of 23 October 2014)
2015-04-12 18:33:01 +02:00
iska
af55cf01cb
Reinitialize the tokenizer when parsing the same input as a fragment case multiple times
...
The tokenizer is a NSEnumerator, thus cannot be reseted, hence the change.
2015-04-11 22:34:07 +02:00
iska
40f4ce4cb1
Remove the dynamic selector-state-machine from the tokenizer class
...
Instead, use a plain-old switch-case. Another 18% performance boost.
This change results in a total performance boost of about 65% (reference to baseline)
2015-04-11 22:31:34 +02:00
iska
4158ef0237
Use a accumulator-character-token in the tokenizer to reduce the initialization overhead
...
Initializing character tokens, and the NSString objects they use, results in a relatively high overhead. The tokenizer
now accumulated all successive characters in on accumulator token until a non-character token is emitted.
This change reduces the execution time of the performance test on the local machine by 48% (reference to baseline)
2015-04-11 22:12:51 +02:00
iska
936c76d142
Remove the superfluous allObjects method from the tokenizer class
...
Being a NSEnumerator, the tokenizer cannot be reset, hence the change in the tests to create a new
instance for each iteration.
2015-04-11 21:47:55 +02:00
iska
8bfccb124f
Use the debug description for Tree Construction tests which dumps a tree structure
2015-04-11 21:44:40 +02:00
iska
0ac909fb66
Add HTML5 Lib Tree Construction tests
...
https://github.com/html5lib/html5lib-tests
2015-04-11 00:51:37 +02:00
iska
067e8c7cc7
Fix insertion mode switch in the "after frameset" phase
2015-04-11 00:45:30 +02:00
iska
68d4eb03ce
Fix tag-name check for "td" & "th" end-tag handling in "in cell" phase
2015-04-11 00:44:20 +02:00
iska
23f8ec35fb
Fix element-in-scope check for end-tag handling in "in body" phase
2015-04-11 00:43:18 +02:00
iska
bf30dd85b9
Fix token-cast when adjusting the foreign attributes for token
2015-04-11 00:42:07 +02:00
iska
2a2a21d1fa
Fix assignment for the character token in the "in table" phase
2015-04-11 00:40:12 +02:00