mshtml: Remove selection and range objects from document list when detaching.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
18e0225afb
commit
a124117f40
|
@ -364,9 +364,10 @@ HRESULT HTMLSelectionObject_Create(HTMLDocumentNode *doc, nsISelection *nsselect
|
||||||
|
|
||||||
void detach_selection(HTMLDocumentNode *This)
|
void detach_selection(HTMLDocumentNode *This)
|
||||||
{
|
{
|
||||||
HTMLSelectionObject *iter;
|
HTMLSelectionObject *iter, *next;
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY(iter, &This->selection_list, HTMLSelectionObject, entry) {
|
LIST_FOR_EACH_ENTRY_SAFE(iter, next, &This->selection_list, HTMLSelectionObject, entry) {
|
||||||
iter->doc = NULL;
|
iter->doc = NULL;
|
||||||
|
list_remove(&iter->entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1760,9 +1760,10 @@ HRESULT HTMLTxtRange_Create(HTMLDocumentNode *doc, nsIDOMRange *nsrange, IHTMLTx
|
||||||
|
|
||||||
void detach_ranges(HTMLDocumentNode *This)
|
void detach_ranges(HTMLDocumentNode *This)
|
||||||
{
|
{
|
||||||
HTMLTxtRange *iter;
|
HTMLTxtRange *iter, *next;
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY(iter, &This->range_list, HTMLTxtRange, entry) {
|
LIST_FOR_EACH_ENTRY_SAFE(iter, next, &This->range_list, HTMLTxtRange, entry) {
|
||||||
iter->doc = NULL;
|
iter->doc = NULL;
|
||||||
|
list_remove(&iter->entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue