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
e68cc482
Commit
e68cc482
authored
Nov 20, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Store Gecko inner window in HTMLInnerWindow and use it in HTMLTxtRange_select.
parent
feda1225
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
htmlwindow.c
dlls/mshtml/htmlwindow.c
+11
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
range.c
dlls/mshtml/range.c
+6
-1
No files found.
dlls/mshtml/htmlwindow.c
View file @
e68cc482
...
...
@@ -3955,6 +3955,8 @@ static void HTMLWindow_traverse(DispatchEx *dispex, nsCycleCollectionTraversalCa
note_cc_edge
((
nsISupports
*
)
This
->
session_storage
,
"session_storage"
,
cb
);
if
(
This
->
local_storage
)
note_cc_edge
((
nsISupports
*
)
This
->
local_storage
,
"local_storage"
,
cb
);
if
(
This
->
dom_window
)
note_cc_edge
((
nsISupports
*
)
This
->
dom_window
,
"dom_window"
,
cb
);
traverse_variant
(
&
This
->
performance
,
"performance"
,
cb
);
}
...
...
@@ -4009,6 +4011,7 @@ static void HTMLWindow_unlink(DispatchEx *dispex)
IHTMLStorage_Release
(
local_storage
);
}
unlink_variant
(
&
This
->
performance
);
unlink_ref
(
&
This
->
dom_window
);
}
static
void
HTMLWindow_destructor
(
DispatchEx
*
dispex
)
...
...
@@ -4523,11 +4526,12 @@ HRESULT update_window_doc(HTMLInnerWindow *window)
{
HTMLOuterWindow
*
outer_window
=
window
->
base
.
outer_window
;
compat_mode_t
parent_mode
=
COMPAT_MODE_QUIRKS
;
mozIDOMWindow
*
gecko_inner_window
;
nsIDOMDocument
*
nsdoc
;
nsresult
nsres
;
HRESULT
hres
;
assert
(
!
window
->
doc
);
assert
(
!
window
->
doc
&&
!
window
->
dom_window
);
if
(
!
outer_window
)
return
E_UNEXPECTED
;
...
...
@@ -4538,6 +4542,12 @@ HRESULT update_window_doc(HTMLInnerWindow *window)
return
E_FAIL
;
}
nsres
=
nsIDOMWindow_GetInnerWindow
(
outer_window
->
nswindow
,
&
gecko_inner_window
);
assert
(
nsres
==
NS_OK
);
nsres
=
mozIDOMWindow_QueryInterface
(
gecko_inner_window
,
&
IID_nsIDOMWindow
,
(
void
**
)
&
window
->
dom_window
);
assert
(
nsres
==
NS_OK
);
mozIDOMWindow_Release
(
gecko_inner_window
);
if
(
outer_window
->
parent
)
parent_mode
=
outer_window
->
parent
->
base
.
inner_window
->
doc
->
document_mode
;
...
...
dlls/mshtml/mshtml_private.h
View file @
e68cc482
...
...
@@ -580,6 +580,7 @@ struct HTMLInnerWindow {
EventTarget
event_target
;
HTMLDocumentNode
*
doc
;
nsIDOMWindow
*
dom_window
;
struct
list
children
;
struct
list
script_hosts
;
...
...
dlls/mshtml/range.c
View file @
e68cc482
...
...
@@ -1287,7 +1287,12 @@ static HRESULT WINAPI HTMLTxtRange_select(IHTMLTxtRange *iface)
TRACE
(
"(%p)
\n
"
,
This
);
nsres
=
nsIDOMWindow_GetSelection
(
This
->
doc
->
outer_window
->
nswindow
,
&
nsselection
);
if
(
!
This
->
doc
->
window
)
{
FIXME
(
"no window
\n
"
);
return
E_FAIL
;
}
nsres
=
nsIDOMWindow_GetSelection
(
This
->
doc
->
window
->
dom_window
,
&
nsselection
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetSelection failed: %08lx
\n
"
,
nsres
);
return
E_FAIL
;
...
...
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