335 Commits

Author SHA1 Message Date
iska 0401118657 Merge branch 'release/0.2.0' 0.2.0 2015-06-06 20:12:42 +02:00
iska 045e4db9d1 Add node iterator, tree walker & node filter imports to the HTMLDOM header 2015-06-06 20:11:49 +02:00
iska a7caa34762 Disable HTML DOM checks in parser's performance test
The baseline was set before the DOM validations were implemented.
2015-06-06 20:10:28 +02:00
iska df53870880 Drop the "Node" suffix from HTML Node's first child & last child properties
https://dom.spec.whatwg.org/#interface-node
2015-06-06 19:04:03 +02:00
iska 7f25aacaf1 Add test cases for the Tree Walker class 2015-06-06 19:00:02 +02:00
iska 5e482788ce Add Tree Walker's initializer methods 2015-06-06 18:59:06 +02:00
iska a39890e6e9 Add documentElement property for the HTML Document
The documentElement is the <html> element
2015-06-06 18:58:45 +02:00
iska fd516c67ef Change Node Filter's show options enum to NS_OPTIONS 2015-06-05 23:01:55 +02:00
iska a390edf599 Reintroduce the HTMLNodeFilterValue for Tree Walker implementation
While the Node Iterator treats skip & reject the same way, the Tree Walker can skip over a node
and all its children if rejected.

This reverses dc3de7a470
2015-06-05 23:00:50 +02:00
iska 0c82f6891b Add implementation for the Tree Walker
https://dom.spec.whatwg.org/#interface-treewalker
2015-06-05 22:46:41 +02:00
iska 0d7c57d755 Refactor common node traversal methods into separate class
These will be used in the Tree Walker
https://dom.spec.whatwg.org/#interface-treewalker
2015-06-05 22:09:02 +02:00
iska 40400864d8 Add block-based API for Node Filter
- HTMLNodeFilterBlock is a block-based class implementation conforming to HTMLNodeFilter
- HTMLNode & NodeIterator get block-based initializers
2015-06-05 18:06:23 +02:00
iska dc3de7a470 Remove the HTMLNodeFilterValue enum since Reject and Skip are semantically equivalent 2015-06-05 17:05:22 +02:00
iska c1b18f527c Refactor Node Iterator's initializers so that the filter argument is last 2015-06-05 17:04:28 +02:00
iska d4bb3c6636 Add implementation for the removing steps of the HTML Node Iterator
https://dom.spec.whatwg.org/#interface-nodeiterator
2015-06-05 16:47:37 +02:00
iska 0baa343e95 Add Document methods to access the root, head & body elements
The implementation will be changed/adapted later when the CSS Selectors are ready.
2015-06-05 16:46:36 +02:00
iska 2f1555e93d Rename group for DOM tests 2015-06-02 01:06:13 +02:00
iska a0fd89f417 Move test class for Ordered Dictionary into own group 2015-06-02 01:05:44 +02:00
iska d002c6cedd Add HTML Node methods for comparing node positions in a tree
https://dom.spec.whatwg.org/#dom-node-comparedocumentpositionother
2015-05-31 16:53:54 +02:00
iska 71fefa2fa9 Add methods to attach Node Iterators to the owner document node of the iterator's root
This is a prerequisite to implement the iterator's removing steps.
https://dom.spec.whatwg.org/#interface-nodeiterator
2015-05-29 20:16:17 +02:00
iska 066bdeffa8 Add Node Iterator test cases for iteration and filtering logic 2015-05-29 00:39:52 +02:00
iska 3df5a219e1 Add Node Iterator initializers with filter and show-options arguments 2015-05-28 23:26:08 +02:00
iska e1c3533a1c Remove unused import in Tree Construction test class 2015-05-28 22:57:31 +02:00
iska dfeebc7f7f Remove frameworks search path entry causing an ignored warning on build 2015-05-28 22:56:49 +02:00
iska cd6e8bf4fc Remove Tree Enumerator since it was superseded by the Node Iterator implementation 2015-05-28 01:22:29 +02:00
iska 0fa394b911 Fix traversing method in Node Iterator 2015-05-28 01:21:06 +02:00
iska 13ed63017e Fix initial Node Iterator values 2015-05-28 00:55:45 +02:00
iska ac561570f3 Use correct DOM import in test classes 2015-05-28 00:43:27 +02:00
iska 165cdb5a75 Fix HTML Element initializer usage after arguments reordering 2015-05-28 00:42:59 +02:00
iska aece7138a4 Rename Tree Enumeration Tests to Node Iterator Tests 2015-05-28 00:42:20 +02:00
iska 45156d98fd Add implementation for HTML Node Iterator
This, along with Tree Walker, will replace the Tree Enumerator.
https://dom.spec.whatwg.org/#interface-nodeiterator
2015-05-28 00:34:17 +02:00
iska 7892a925c8 Fix Element initializer after reordering the arguments 2015-05-27 00:59:37 +02:00
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