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
364e1c87
Commit
364e1c87
authored
Feb 12, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use nsIDOMElement for Gecko elements in npplugin.c.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
300c6460
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
npplugin.c
dlls/mshtml/npplugin.c
+7
-15
No files found.
dlls/mshtml/npplugin.c
View file @
364e1c87
...
...
@@ -211,11 +211,10 @@ typedef struct _NPPluginFuncs {
NPP_LostFocusPtr
lostfocus
;
}
NPPluginFuncs
;
static
nsIDOM
HTML
Element
*
get_dom_element
(
NPP
instance
)
static
nsIDOMElement
*
get_dom_element
(
NPP
instance
)
{
nsISupports
*
instance_unk
=
(
nsISupports
*
)
instance
->
ndata
;
nsIPluginInstance
*
plugin_instance
;
nsIDOMHTMLElement
*
html_elem
;
nsIDOMElement
*
elem
;
nsresult
nsres
;
...
...
@@ -232,24 +231,17 @@ static nsIDOMHTMLElement *get_dom_element(NPP instance)
return
NULL
;
}
nsres
=
nsIDOMElement_QueryInterface
(
elem
,
&
IID_nsIDOMHTMLElement
,
(
void
**
)
&
html_elem
);
nsIDOMElement_Release
(
elem
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMHTMLElement iface: %08x
\n
"
,
nsres
);
return
NULL
;
}
return
html_elem
;
return
elem
;
}
static
HTMLInnerWindow
*
get_elem_window
(
nsIDOM
HTML
Element
*
elem
)
static
HTMLInnerWindow
*
get_elem_window
(
nsIDOMElement
*
elem
)
{
mozIDOMWindowProxy
*
mozwindow
;
nsIDOMDocument
*
nsdoc
;
HTMLOuterWindow
*
window
;
nsresult
nsres
;
nsres
=
nsIDOM
HTML
Element_GetOwnerDocument
(
elem
,
&
nsdoc
);
nsres
=
nsIDOMElement_GetOwnerDocument
(
elem
,
&
nsdoc
);
if
(
NS_FAILED
(
nsres
))
return
NULL
;
...
...
@@ -268,7 +260,7 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I
char
**
argv
,
NPSavedData
*
saved
)
{
HTMLPluginContainer
*
container
;
nsIDOM
HTML
Element
*
nselem
;
nsIDOMElement
*
nselem
;
HTMLInnerWindow
*
window
;
HTMLDOMNode
*
node
;
NPError
err
=
NPERR_NO_ERROR
;
...
...
@@ -285,12 +277,12 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I
window
=
get_elem_window
(
nselem
);
if
(
!
window
)
{
ERR
(
"Could not get element's window object
\n
"
);
nsIDOM
HTML
Element_Release
(
nselem
);
nsIDOMElement_Release
(
nselem
);
return
NPERR_GENERIC_ERROR
;
}
hres
=
get_node
(
window
->
doc
,
(
nsIDOMNode
*
)
nselem
,
TRUE
,
&
node
);
nsIDOM
HTML
Element_Release
(
nselem
);
nsIDOMElement_Release
(
nselem
);
if
(
FAILED
(
hres
))
return
NPERR_GENERIC_ERROR
;
...
...
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