DOM::Selection not protected against dom tree changes?

Leo Savernik l.savernik at aon.at
Fri Nov 26 18:15:00 CET 2004


Hello,

In WebCore 146.1, all the old selection-specific stuff has been replaced to 
make use of DOM::Selection.

The problem I see with this implementation is that DOM::Selection isn't robust 
against changes to the dom tree. As the principal selection stays active 
between events, the boundary nodes may have been deleted meanwhile -> 
dangling pointer in Selection -> crash.

Did you take any countermeasures that protect WebCore from the above scenario 
or are you planning on any such countermeasures?

Btw, now that contenteditable has been unveiled for Safari, I ask you to post 
patches against contenteditable/caret/selection stuff to this list. Thank 
you.

mfg
 Leo


More information about the Khtml-devel mailing list