Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
408024a2
Commit
408024a2
authored
Oct 08, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use stored nsdoc in createTextRange.
parent
7c7b7f0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
19 deletions
+23
-19
htmlbody.c
dlls/mshtml/htmlbody.c
+23
-19
No files found.
dlls/mshtml/htmlbody.c
View file @
408024a2
...
@@ -544,31 +544,35 @@ static HRESULT WINAPI HTMLBodyElement_get_onbeforeunload(IHTMLBodyElement *iface
...
@@ -544,31 +544,35 @@ static HRESULT WINAPI HTMLBodyElement_get_onbeforeunload(IHTMLBodyElement *iface
static
HRESULT
WINAPI
HTMLBodyElement_createTextRange
(
IHTMLBodyElement
*
iface
,
IHTMLTxtRange
**
range
)
static
HRESULT
WINAPI
HTMLBodyElement_createTextRange
(
IHTMLBodyElement
*
iface
,
IHTMLTxtRange
**
range
)
{
{
HTMLBodyElement
*
This
=
HTMLBODY_THIS
(
iface
);
HTMLBodyElement
*
This
=
HTMLBODY_THIS
(
iface
);
nsIDOMDocumentRange
*
nsdocrange
;
nsIDOMRange
*
nsrange
=
NULL
;
nsIDOMRange
*
nsrange
=
NULL
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
range
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
range
);
if
(
This
->
textcont
.
element
.
node
.
doc
->
nscontainer
)
{
if
(
!
This
->
textcont
.
element
.
node
.
doc
->
nsdoc
)
{
nsIDOMDocument
*
nsdoc
;
WARN
(
"No nsdoc
\n
"
)
;
nsIDOMDocumentRange
*
nsdocrange
;
return
E_UNEXPECTED
;
nsresult
nsres
;
}
nsIWebNavigation_GetDocument
(
This
->
textcont
.
element
.
node
.
doc
->
nscontainer
->
navigation
,
&
nsdoc
);
nsres
=
nsIDOMDocument_QueryInterface
(
This
->
textcont
.
element
.
node
.
doc
->
nsdoc
,
&
IID_nsIDOMDocumentRange
,
nsIDOMDocument_QueryInterface
(
nsdoc
,
&
IID_nsIDOMDocumentRange
,
(
void
**
)
&
nsdocrange
);
(
void
**
)
&
nsdocrange
);
nsIDOMDocument_Release
(
nsdoc
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMDocumentRabge iface: %08x
\n
"
,
nsres
);
nsres
=
nsIDOMDocumentRange_CreateRange
(
nsdocrange
,
&
nsrange
)
;
return
E_FAIL
;
if
(
NS_SUCCEEDED
(
nsres
))
{
}
nsres
=
nsIDOMRange_SelectNodeContents
(
nsrange
,
This
->
textcont
.
element
.
node
.
nsnode
);
if
(
NS_FAILED
(
nsres
))
nsres
=
nsIDOMDocumentRange_CreateRange
(
nsdocrange
,
&
nsrange
);
ERR
(
"SelectNodeContents failed: %08x
\n
"
,
nsres
);
if
(
NS_SUCCEEDED
(
nsres
))
{
}
else
{
nsres
=
nsIDOMRange_SelectNodeContents
(
nsrange
,
This
->
textcont
.
element
.
node
.
nsnode
);
ERR
(
"CreateRange failed: %08x
\n
"
,
nsres
);
if
(
NS_FAILED
(
nsres
))
}
ERR
(
"SelectNodeContents failed: %08x
\n
"
,
nsres
);
}
else
{
nsIDOMDocumentRange_Release
(
nsdocrange
);
ERR
(
"CreateRange failed: %08x
\n
"
,
nsres
);
}
}
nsIDOMDocumentRange_Release
(
nsdocrange
);
*
range
=
HTMLTxtRange_Create
(
This
->
textcont
.
element
.
node
.
doc
,
nsrange
);
*
range
=
HTMLTxtRange_Create
(
This
->
textcont
.
element
.
node
.
doc
,
nsrange
);
return
S_OK
;
return
S_OK
;
}
}
...
...
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