Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
cfaf00fa
Commit
cfaf00fa
authored
Aug 17, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store HTMLDocument reference in HTMLTxtRange object.
parent
9ca3a224
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
5 deletions
+26
-5
htmlbody.c
dlls/mshtml/htmlbody.c
+1
-1
htmldoc.c
dlls/mshtml/htmldoc.c
+2
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-1
selection.c
dlls/mshtml/selection.c
+1
-1
txtrange.c
dlls/mshtml/txtrange.c
+19
-2
No files found.
dlls/mshtml/htmlbody.c
View file @
cfaf00fa
...
...
@@ -427,7 +427,7 @@ static HRESULT WINAPI HTMLBodyElement_createTextRange(IHTMLBodyElement *iface, I
nsIDOMDocumentRange_Release
(
nsdocrange
);
}
*
range
=
HTMLTxtRange_Create
(
nsrange
);
*
range
=
HTMLTxtRange_Create
(
This
->
element
->
node
->
doc
,
nsrange
);
return
S_OK
;
}
...
...
dlls/mshtml/htmldoc.c
View file @
cfaf00fa
...
...
@@ -173,6 +173,7 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface)
IHTMLWindow2_Release
(
HTMLWINDOW2
(
This
->
window
));
detach_selection
(
This
);
detach_ranges
(
This
);
release_nodes
(
This
);
ConnectionPointContainer_Destroy
(
&
This
->
cp_container
);
...
...
@@ -1130,6 +1131,7 @@ HRESULT HTMLDocument_Create(IUnknown *pUnkOuter, REFIID riid, void** ppvObject)
ret
->
window
=
NULL
;
list_init
(
&
ret
->
selection_list
);
list_init
(
&
ret
->
range_list
);
hres
=
IHTMLDocument_QueryInterface
(
HTMLDOC
(
ret
),
riid
,
ppvObject
);
if
(
FAILED
(
hres
))
{
...
...
dlls/mshtml/mshtml_private.h
View file @
cfaf00fa
...
...
@@ -151,6 +151,7 @@ struct HTMLDocument {
ConnectionPoint
cp_propnotif
;
struct
list
selection_list
;
struct
list
range_list
;
HTMLDOMNode
*
nodes
;
};
...
...
@@ -404,11 +405,12 @@ void set_document_bscallback(HTMLDocument*,BSCallback*);
void
set_current_mon
(
HTMLDocument
*
,
IMoniker
*
);
IHTMLSelectionObject
*
HTMLSelectionObject_Create
(
HTMLDocument
*
,
nsISelection
*
);
IHTMLTxtRange
*
HTMLTxtRange_Create
(
nsIDOMRange
*
);
IHTMLTxtRange
*
HTMLTxtRange_Create
(
HTMLDocument
*
,
nsIDOMRange
*
);
IHTMLStyle
*
HTMLStyle_Create
(
nsIDOMCSSStyleDeclaration
*
);
IHTMLStyleSheet
*
HTMLStyleSheet_Create
(
void
);
void
detach_selection
(
HTMLDocument
*
);
void
detach_ranges
(
HTMLDocument
*
);
void
HTMLElement_Create
(
HTMLDOMNode
*
);
void
HTMLBodyElement_Create
(
HTMLElement
*
);
...
...
dlls/mshtml/selection.c
View file @
cfaf00fa
...
...
@@ -161,7 +161,7 @@ static HRESULT WINAPI HTMLSelectionObject_createRange(IHTMLSelectionObject *ifac
ERR
(
"GetRangeAt failed: %08x
\n
"
,
nsres
);
}
*
range
=
(
IDispatch
*
)
HTMLTxtRange_Create
(
nsrange
);
*
range
=
(
IDispatch
*
)
HTMLTxtRange_Create
(
This
->
doc
,
nsrange
);
return
S_OK
;
}
...
...
dlls/mshtml/txtrange.c
View file @
cfaf00fa
...
...
@@ -42,6 +42,9 @@ typedef struct {
LONG
ref
;
nsIDOMRange
*
nsrange
;
HTMLDocument
*
doc
;
struct
list
entry
;
}
HTMLTxtRange
;
#define HTMLTXTRANGE(x) ((IHTMLTxtRange*) &(x)->lpHTMLTxtRangeVtbl)
...
...
@@ -94,6 +97,8 @@ static ULONG WINAPI HTMLTxtRange_Release(IHTMLTxtRange *iface)
if
(
!
ref
)
{
if
(
This
->
nsrange
)
nsISelection_Release
(
This
->
nsrange
);
if
(
This
->
doc
)
list_remove
(
&
This
->
entry
);
mshtml_free
(
This
);
}
...
...
@@ -229,7 +234,7 @@ static HRESULT WINAPI HTMLTxtRange_duplicate(IHTMLTxtRange *iface, IHTMLTxtRange
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
Duplicate
);
nsIDOMRange_CloneRange
(
This
->
nsrange
,
&
nsrange
);
*
Duplicate
=
HTMLTxtRange_Create
(
nsrange
);
*
Duplicate
=
HTMLTxtRange_Create
(
This
->
doc
,
nsrange
);
nsIDOMRange_Release
(
nsrange
);
return
S_OK
;
...
...
@@ -472,7 +477,7 @@ static const IHTMLTxtRangeVtbl HTMLTxtRangeVtbl = {
HTMLTxtRange_execCommandShowHelp
};
IHTMLTxtRange
*
HTMLTxtRange_Create
(
nsIDOMRange
*
nsrange
)
IHTMLTxtRange
*
HTMLTxtRange_Create
(
HTMLDocument
*
doc
,
nsIDOMRange
*
nsrange
)
{
HTMLTxtRange
*
ret
=
mshtml_alloc
(
sizeof
(
HTMLTxtRange
));
...
...
@@ -483,5 +488,17 @@ IHTMLTxtRange *HTMLTxtRange_Create(nsIDOMRange *nsrange)
nsIDOMRange_AddRef
(
nsrange
);
ret
->
nsrange
=
nsrange
;
ret
->
doc
=
doc
;
list_add_head
(
&
doc
->
range_list
,
&
ret
->
entry
);
return
HTMLTXTRANGE
(
ret
);
}
void
detach_ranges
(
HTMLDocument
*
This
)
{
HTMLTxtRange
*
iter
;
LIST_FOR_EACH_ENTRY
(
iter
,
&
This
->
range_list
,
HTMLTxtRange
,
entry
)
{
iter
->
doc
=
NULL
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment