Browse Source

* TDOMText.SplitText should check that its argument isn't readonly before doing anything else.
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 -

sergei 16 years ago
parent
commit
66c0840bce
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/fcl-xml/src/dom.pp

+ 1 - 0
packages/fcl-xml/src/dom.pp

@@ -2399,6 +2399,7 @@ end;
 
 
 function TDOMText.SplitText(offset: LongWord): TDOMText;
 function TDOMText.SplitText(offset: LongWord): TDOMText;
 begin
 begin
+  Changing;
   if offset > Length then
   if offset > Length then
     raise EDOMIndexSize.Create('Text.SplitText');
     raise EDOMIndexSize.Create('Text.SplitText');