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
0dedfab9
Commit
0dedfab9
authored
Jan 27, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added VT_I2 handling to IHTMLSelectElement:add implementation.
parent
3029bdf3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
132 additions
and
14 deletions
+132
-14
htmlelem.c
dlls/mshtml/htmlelem.c
+5
-0
htmlselect.c
dlls/mshtml/htmlselect.c
+31
-13
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-0
nsembed.c
dlls/mshtml/nsembed.c
+17
-0
nsiface.idl
dlls/mshtml/nsiface.idl
+76
-1
No files found.
dlls/mshtml/htmlelem.c
View file @
0dedfab9
...
...
@@ -1649,6 +1649,11 @@ static const IHTMLElementVtbl HTMLElementVtbl = {
HTMLElement_get_all
};
HTMLElement
*
unsafe_impl_from_IHTMLElement
(
IHTMLElement
*
iface
)
{
return
iface
->
lpVtbl
==
&
HTMLElementVtbl
?
impl_from_IHTMLElement
(
iface
)
:
NULL
;
}
static
inline
HTMLElement
*
impl_from_HTMLDOMNode
(
HTMLDOMNode
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLElement
,
node
);
...
...
dlls/mshtml/htmlselect.c
View file @
0dedfab9
...
...
@@ -375,26 +375,44 @@ static HRESULT WINAPI HTMLSelectElement_add(IHTMLSelectElement *iface, IHTMLElem
VARIANT
before
)
{
HTMLSelectElement
*
This
=
impl_from_IHTMLSelectElement
(
iface
);
IHTMLDOMNode
*
node
,
*
tmp
;
HRESULT
hres
;
nsIWritableVariant
*
nsvariant
;
HTMLElement
*
element_obj
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p %s)
\n
"
,
This
,
element
,
debugstr_variant
(
&
before
));
FIXME
(
"(%p)->(%p %s): semi-stub
\n
"
,
This
,
element
,
debugstr_variant
(
&
before
));
element_obj
=
unsafe_impl_from_IHTMLElement
(
element
);
if
(
!
element_obj
)
{
FIXME
(
"External IHTMLElement implementation?
\n
"
);
return
E_INVALIDARG
;
}
if
(
V_VT
(
&
before
)
!=
VT_EMPTY
)
{
nsvariant
=
create_nsvariant
();
if
(
!
nsvariant
)
return
E_FAIL
;
switch
(
V_VT
(
&
before
))
{
case
VT_EMPTY
:
nsres
=
nsIWritableVariant_SetAsEmpty
(
nsvariant
);
break
;
case
VT_I2
:
nsres
=
nsIWritableVariant_SetAsInt16
(
nsvariant
,
V_I2
(
&
before
));
break
;
default:
FIXME
(
"unhandled before %s
\n
"
,
debugstr_variant
(
&
before
));
nsIWritableVariant_Release
(
nsvariant
);
return
E_NOTIMPL
;
}
hres
=
IHTMLElement_QueryInterface
(
element
,
&
IID_IHTMLDOMNode
,
(
void
**
)
&
node
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
IHTMLDOMNode_appendChild
(
&
This
->
element
.
node
.
IHTMLDOMNode_iface
,
node
,
&
tmp
);
IHTMLDOMNode_Release
(
node
);
if
(
SUCCEEDED
(
hres
)
&&
tmp
)
IHTMLDOMNode_Release
(
tmp
);
if
(
NS_SUCCEEDED
(
nsres
))
nsres
=
nsIDOMHTMLSelectElement_Add
(
This
->
nsselect
,
element_obj
->
nselem
,
(
nsIVariant
*
)
nsvariant
);
nsIWritableVariant_Release
(
nsvariant
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Add failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
return
hres
;
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLSelectElement_remove
(
IHTMLSelectElement
*
iface
,
LONG
index
)
...
...
dlls/mshtml/mshtml_private.h
View file @
0dedfab9
...
...
@@ -706,6 +706,7 @@ nsICommandParams *create_nscommand_params(void) DECLSPEC_HIDDEN;
HRESULT
nsnode_to_nsstring
(
nsIDOMNode
*
,
nsAString
*
)
DECLSPEC_HIDDEN
;
void
get_editor_controller
(
NSContainer
*
)
DECLSPEC_HIDDEN
;
nsresult
get_nsinterface
(
nsISupports
*
,
REFIID
,
void
**
)
DECLSPEC_HIDDEN
;
nsIWritableVariant
*
create_nsvariant
(
void
)
DECLSPEC_HIDDEN
;
void
set_window_bscallback
(
HTMLWindow
*
,
nsChannelBSC
*
)
DECLSPEC_HIDDEN
;
void
set_current_mon
(
HTMLWindow
*
,
IMoniker
*
)
DECLSPEC_HIDDEN
;
...
...
@@ -802,6 +803,8 @@ void HTMLFrameBase_destructor(HTMLFrameBase*) DECLSPEC_HIDDEN;
HRESULT
get_node
(
HTMLDocumentNode
*
,
nsIDOMNode
*
,
BOOL
,
HTMLDOMNode
**
)
DECLSPEC_HIDDEN
;
void
release_nodes
(
HTMLDocumentNode
*
)
DECLSPEC_HIDDEN
;
HTMLElement
*
unsafe_impl_from_IHTMLElement
(
IHTMLElement
*
)
DECLSPEC_HIDDEN
;
void
release_script_hosts
(
HTMLWindow
*
)
DECLSPEC_HIDDEN
;
void
connect_scripts
(
HTMLWindow
*
)
DECLSPEC_HIDDEN
;
void
doc_insert_script
(
HTMLWindow
*
,
nsIDOMHTMLScriptElement
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/nsembed.c
View file @
0dedfab9
...
...
@@ -46,6 +46,7 @@ WINE_DECLARE_DEBUG_CHANNEL(gecko);
#define NS_HTMLSERIALIZER_CONTRACTID "@mozilla.org/layout/contentserializer;1?mimetype=text/html"
#define NS_EDITORCONTROLLER_CONTRACTID "@mozilla.org/editor/editorcontroller;1"
#define NS_PREFERENCES_CONTRACTID "@mozilla.org/preferences;1"
#define NS_VARIANT_CONTRACTID "@mozilla.org/variant;1"
#define PR_UINT32_MAX 0xffffffff
...
...
@@ -713,6 +714,22 @@ nsICommandParams *create_nscommand_params(void)
return
ret
;
}
nsIWritableVariant
*
create_nsvariant
(
void
)
{
nsIWritableVariant
*
ret
=
NULL
;
nsresult
nsres
;
if
(
!
pCompMgr
)
return
NULL
;
nsres
=
nsIComponentManager_CreateInstanceByContractID
(
pCompMgr
,
NS_VARIANT_CONTRACTID
,
NULL
,
&
IID_nsIWritableVariant
,
(
void
**
)
&
ret
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsIVariant
\n
"
);
return
ret
;
}
nsresult
get_nsinterface
(
nsISupports
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
nsIInterfaceRequestor
*
iface_req
;
...
...
dlls/mshtml/nsiface.idl
View file @
0dedfab9
...
...
@@ -133,7 +133,6 @@ typedef nsISupports nsIDOMClientRectList;
typedef nsISupports nsINode;
typedef nsISupports nsIStyleSheet;
typedef nsISupports nsIStyleRule;
typedef nsISupports nsIVariant;
typedef nsISupports nsIDOMUserDataHandler;
typedef nsISupports nsIDocShellLoadInfo;
typedef nsISupports nsISHEntry;
...
...
@@ -286,6 +285,82 @@ interface nsISimpleEnumerator : nsISupports
[
object,
uuid(81e4c2de-acac-4ad6-901a-b5fb1b851a0d),
local
]
interface nsIVariant : nsISupports
{
nsresult GetDataType(PRUint16 *aDataType);
nsresult GetAsInt8(PRUint8 *_retval);
nsresult GetAsInt16(PRInt16 *_retval);
nsresult GetAsInt32(PRInt32 *_retval);
nsresult GetAsInt64(PRInt64 *_retval);
nsresult GetAsUint8(PRUint8 *_retval);
nsresult GetAsUint16(PRUint16 *_retval);
nsresult GetAsUint32(PRUint32 *_retval);
nsresult GetAsUint64(PRUint64 *_retval);
nsresult GetAsFloat(float *_retval);
nsresult GetAsDouble(double *_retval);
nsresult GetAsBool(PRBool *_retval);
nsresult GetAsChar(char *_retval);
nsresult GetAsWChar(PRUnichar *_retval);
nsresult GetAsID(nsID *retval);
nsresult GetAsAString(nsAString *_retval);
nsresult GetAsDOMString(nsAString *_retval);
nsresult GetAsACString(nsACString *_retval);
nsresult GetAsAUTF8String(nsACString *_retval);
nsresult GetAsString(char * *_retval);
nsresult GetAsWString(PRUnichar * *_retval);
nsresult GetAsISupports(nsISupports * *_retval);
nsresult GetAsJSVal(long /*jsval*/ *_retval);
nsresult GetAsInterface(nsIID **iid, void **iface);
nsresult GetAsArray(PRUint16 *type, nsIID *iid, PRUint32 *count, void **ptr);
nsresult GetAsStringWithSize(PRUint32 *size, char **str);
nsresult GetAsWStringWithSize(PRUint32 *size, PRUnichar **str);
}
[
object,
uuid(5586a590-8c82-11d5-90f3-0010a4e73d9a),
local
]
interface nsIWritableVariant : nsIVariant
{
nsresult GetWritable(PRBool *aWritable);
nsresult SetWritable(PRBool aWritable);
nsresult SetAsInt8(PRUint8 aValue);
nsresult SetAsInt16(PRInt16 aValue);
nsresult SetAsInt32(PRInt32 aValue);
nsresult SetAsInt64(PRInt64 aValue);
nsresult SetAsUint8(PRUint8 aValue);
nsresult SetAsUint16(PRUint16 aValue);
nsresult SetAsUint32(PRUint32 aValue);
nsresult SetAsUint64(PRUint64 aValue);
nsresult SetAsFloat(float aValue);
nsresult SetAsDouble(double aValue);
nsresult SetAsBool(PRBool aValue);
nsresult SetAsChar(char aValue);
nsresult SetAsWChar(PRUnichar aValue);
nsresult SetAsID(const nsID *aValue);
nsresult SetAsAString(const nsAString *aValue);
nsresult SetAsDOMString(const nsAString *aValue);
nsresult SetAsACString(const nsACString *aValue);
nsresult SetAsAUTF8String(const nsACString *aValue);
nsresult SetAsString(const char * aValue);
nsresult SetAsWString(const PRUnichar * aValue);
nsresult SetAsISupports(nsISupports *aValue);
nsresult SetAsInterface(const nsIID *iid, void *iface);
nsresult SetAsArray(PRUint16 type, const nsIID *iid, PRUint32 count, void *ptr);
nsresult SetAsStringWithSize(PRUint32 size, const char *str);
nsresult SetAsWStringWithSize(PRUint32 size, const PRUnichar *str);
nsresult SetAsVoid();
nsresult SetAsEmpty();
nsresult SetAsEmptyArray();
nsresult SetFromVariant(nsIVariant *aValue);
}
[
object,
uuid(fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a),
local
]
...
...
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