* Every node created by Document.CreateXXX method is now guaranteed to be destroyed with the
document, whether it is part of the tree or not. Therefore, DOM methods which remove nodes
from the tree (namely, TDOMNode.RemoveChild, TDOMNode.ReplaceChild,
TDOMElement.SetAttributeNode and TDOMElement.SetAttributeNodeNS) no longer need to destroy
their return value and are now conformant to the specs.
* Nodes are allocated in arrays of instances (emulates 'placement new operator' in C++ terms).
Allocation and freeing are as fast as possible (just assigns a couple of pointers).
* Behaviour of nodes that are created by direct call to constructor is unchanged.
git-svn-id: trunk@13185 -
src/dom.pp:
* GetElementsByTagName[NS] results now get cached in a hashtable. Repeated calls to
GetElementsByTagName with same arguments return the same instance of NodeList. All NodeLists
created during document lifetime are destroyed with the document.
src/xmlutils.pp:
* THashTable.Lookup(), changed SetString to SetLength+Move because SetString truncates on #0
+ added THashTable.RemoveData() method
tests/api.xml:
- No longer need to 'garbage collect' the NodeLists.
git-svn-id: trunk@13180 -
* Do not convert tests which request implementation attribute 'signed'='true'.
Such tests aren't applicable to our unsigned DOM, they only cause compiler warnings
and noise in the test report.
+ Support for default properties (obj.item(x) -> obj[x]).
+ Support black-listing of testcases. Some of them (in HTML testsuite) are easier to
rewrite by hand than to convert.
+ Support adding certain units to 'uses' clause (e.g. HTML suite must use dom_html).
git-svn-id: trunk@13172 -
* changed type of minstacksize, maxstacksize and imagebase from aword
(= size of integer registers of the target platform) into puint
(= size of address space of target platform)
git-svn-id: trunk@13155 -
sized integer (succeed for Delphi, fail for objfpc)
* fixed compiler so it only allows typecasting a class/interface to a
differently sized integer in Delphi mode
git-svn-id: trunk@13152 -
dynamic library initialization (this automatically enables dead code
stripping/smart linking in all cases though, independent of -XX/CX;
on the other hand, there is no real reason not to use it anymore on
Mac OS X, since support was introduced in Xcode 1.5 for
Mac OS X 10.3.9 and that's also the earliest version we support
for running FPC on)
git-svn-id: trunk@13151 -
* exeinfo: Properly handle long COFF section names. Bug #13499.
* lineinfo, lnfodwrf: Properly use executable image base and current module base address.
git-svn-id: trunk@13145 -
Since the procedure still raises NO_MODIFICATION_ERR later (while inserting new node to the parent),
the testsuite wasn't able to detect this bug, causing the old node to be modified and the new node to leak :/
git-svn-id: trunk@13144 -
* Partial fix for #13605 (fixes the issue as reported, but a fix for nodelists returned by
GetElementsByTagName[NS] is also needed):
- Each node which can have children has an associated instance of TDOMNodeList;
- Other nodes are substituted by special 'null' node, having an empty child list;
- Muiltiple calls to ChildNodes return the same instance of TDOMNodeList;
- Calling Free on result of ChildNodes is optional; if not freed, it will be destroyed with
the owning node.
tests/domunit.pp:
* Changed TFPObjectList to TObjectList, which has been found to destroy its elements in opposite
order (reported as #13715). As NodeLists became owned by Document, old (FIFO) destruction order is
causing their double destruction.
git-svn-id: trunk@13143 -