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
f8bb1d7e
Commit
f8bb1d7e
authored
Sep 01, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Sep 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement deleting props for Storage.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
e28cc104
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
7 deletions
+52
-7
dispex.c
dlls/mshtml/dispex.c
+6
-6
htmldoc.c
dlls/mshtml/htmldoc.c
+1
-0
htmlelem.c
dlls/mshtml/htmlelem.c
+1
-0
htmlstorage.c
dlls/mshtml/htmlstorage.c
+15
-0
htmlwindow.c
dlls/mshtml/htmlwindow.c
+1
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+3
-1
documentmode.js
dlls/mshtml/tests/documentmode.js
+25
-0
No files found.
dlls/mshtml/dispex.c
View file @
f8bb1d7e
...
@@ -1763,15 +1763,12 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR nam
...
@@ -1763,15 +1763,12 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByName(IDispatchEx *iface, BSTR nam
TRACE
(
"(%p)->(%s %lx)
\n
"
,
This
,
debugstr_w
(
name
),
grfdex
);
TRACE
(
"(%p)->(%s %lx)
\n
"
,
This
,
debugstr_w
(
name
),
grfdex
);
if
(
dispex_compat_mode
(
This
)
<
COMPAT_MODE_IE8
)
{
/* Not implemented by IE */
return
E_NOTIMPL
;
}
hres
=
IDispatchEx_GetDispID
(
&
This
->
IDispatchEx_iface
,
name
,
grfdex
&
~
fdexNameEnsure
,
&
id
);
hres
=
IDispatchEx_GetDispID
(
&
This
->
IDispatchEx_iface
,
name
,
grfdex
&
~
fdexNameEnsure
,
&
id
);
if
(
FAILED
(
hres
))
{
if
(
FAILED
(
hres
))
{
compat_mode_t
compat_mode
=
dispex_compat_mode
(
This
);
TRACE
(
"property %s not found
\n
"
,
debugstr_w
(
name
));
TRACE
(
"property %s not found
\n
"
,
debugstr_w
(
name
));
return
dispex_compat_mode
(
This
)
<
COMPAT_MODE_IE9
?
hres
:
S_OK
;
return
compat_mode
<
COMPAT_MODE_IE8
?
E_NOTIMPL
:
compat_mode
<
COMPAT_MODE_IE9
?
hres
:
S_OK
;
}
}
return
IDispatchEx_DeleteMemberByDispID
(
&
This
->
IDispatchEx_iface
,
id
);
return
IDispatchEx_DeleteMemberByDispID
(
&
This
->
IDispatchEx_iface
,
id
);
...
@@ -1783,6 +1780,9 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID
...
@@ -1783,6 +1780,9 @@ static HRESULT WINAPI DispatchEx_DeleteMemberByDispID(IDispatchEx *iface, DISPID
TRACE
(
"(%p)->(%lx)
\n
"
,
This
,
id
);
TRACE
(
"(%p)->(%lx)
\n
"
,
This
,
id
);
if
(
is_custom_dispid
(
id
)
&&
This
->
info
->
desc
->
vtbl
&&
This
->
info
->
desc
->
vtbl
->
delete
)
return
This
->
info
->
desc
->
vtbl
->
delete
(
This
,
id
);
if
(
dispex_compat_mode
(
This
)
<
COMPAT_MODE_IE8
)
{
if
(
dispex_compat_mode
(
This
)
<
COMPAT_MODE_IE8
)
{
/* Not implemented by IE */
/* Not implemented by IE */
return
E_NOTIMPL
;
return
E_NOTIMPL
;
...
...
dlls/mshtml/htmldoc.c
View file @
f8bb1d7e
...
@@ -5921,6 +5921,7 @@ static const event_target_vtbl_t HTMLDocumentNode_event_target_vtbl = {
...
@@ -5921,6 +5921,7 @@ static const event_target_vtbl_t HTMLDocumentNode_event_target_vtbl = {
NULL
,
NULL
,
NULL
,
NULL
,
HTMLDocumentNode_invoke
,
HTMLDocumentNode_invoke
,
NULL
,
HTMLDocumentNode_get_compat_mode
,
HTMLDocumentNode_get_compat_mode
,
NULL
NULL
},
},
...
...
dlls/mshtml/htmlelem.c
View file @
f8bb1d7e
...
@@ -7183,6 +7183,7 @@ static event_target_vtbl_t HTMLElement_event_target_vtbl = {
...
@@ -7183,6 +7183,7 @@ static event_target_vtbl_t HTMLElement_event_target_vtbl = {
HTMLElement_get_dispid
,
HTMLElement_get_dispid
,
HTMLElement_invoke
,
HTMLElement_invoke
,
NULL
,
NULL
,
NULL
,
HTMLElement_populate_props
HTMLElement_populate_props
},
},
HTMLElement_get_gecko_target
,
HTMLElement_get_gecko_target
,
...
...
dlls/mshtml/htmlstorage.c
View file @
f8bb1d7e
...
@@ -985,10 +985,25 @@ static HRESULT HTMLStorage_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD
...
@@ -985,10 +985,25 @@ static HRESULT HTMLStorage_invoke(DispatchEx *dispex, DISPID id, LCID lcid, WORD
return
S_OK
;
return
S_OK
;
}
}
static
HRESULT
HTMLStorage_delete
(
DispatchEx
*
dispex
,
DISPID
id
)
{
HTMLStorage
*
This
=
impl_from_DispatchEx
(
dispex
);
DWORD
idx
=
id
-
MSHTML_DISPID_CUSTOM_MIN
;
if
(
idx
>=
This
->
num_props
)
return
DISP_E_MEMBERNOTFOUND
;
if
(
dispex_compat_mode
(
dispex
)
<
COMPAT_MODE_IE8
)
return
MSHTML_E_INVALID_ACTION
;
return
HTMLStorage_removeItem
(
&
This
->
IHTMLStorage_iface
,
This
->
props
[
idx
]);
}
static
const
dispex_static_data_vtbl_t
HTMLStorage_dispex_vtbl
=
{
static
const
dispex_static_data_vtbl_t
HTMLStorage_dispex_vtbl
=
{
NULL
,
NULL
,
HTMLStorage_get_dispid
,
HTMLStorage_get_dispid
,
HTMLStorage_invoke
,
HTMLStorage_invoke
,
HTMLStorage_delete
,
NULL
NULL
};
};
...
...
dlls/mshtml/htmlwindow.c
View file @
f8bb1d7e
...
@@ -3954,6 +3954,7 @@ static const event_target_vtbl_t HTMLWindow_event_target_vtbl = {
...
@@ -3954,6 +3954,7 @@ static const event_target_vtbl_t HTMLWindow_event_target_vtbl = {
NULL
,
NULL
,
NULL
,
NULL
,
HTMLWindow_invoke
,
HTMLWindow_invoke
,
NULL
,
HTMLWindow_get_compat_mode
,
HTMLWindow_get_compat_mode
,
NULL
NULL
},
},
...
...
dlls/mshtml/mshtml_private.h
View file @
f8bb1d7e
...
@@ -72,7 +72,8 @@
...
@@ -72,7 +72,8 @@
#define NSAPI WINAPI
#define NSAPI WINAPI
#define MSHTML_E_NODOC 0x800a025c
#define MSHTML_E_INVALID_ACTION 0x800a01bd
#define MSHTML_E_NODOC 0x800a025c
typedef
struct
HTMLDOMNode
HTMLDOMNode
;
typedef
struct
HTMLDOMNode
HTMLDOMNode
;
typedef
struct
ConnectionPoint
ConnectionPoint
;
typedef
struct
ConnectionPoint
ConnectionPoint
;
...
@@ -333,6 +334,7 @@ typedef struct {
...
@@ -333,6 +334,7 @@ typedef struct {
HRESULT
(
*
value
)(
DispatchEx
*
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
IServiceProvider
*
);
HRESULT
(
*
value
)(
DispatchEx
*
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
IServiceProvider
*
);
HRESULT
(
*
get_dispid
)(
DispatchEx
*
,
BSTR
,
DWORD
,
DISPID
*
);
HRESULT
(
*
get_dispid
)(
DispatchEx
*
,
BSTR
,
DWORD
,
DISPID
*
);
HRESULT
(
*
invoke
)(
DispatchEx
*
,
DISPID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
IServiceProvider
*
);
HRESULT
(
*
invoke
)(
DispatchEx
*
,
DISPID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
EXCEPINFO
*
,
IServiceProvider
*
);
HRESULT
(
*
delete
)(
DispatchEx
*
,
DISPID
);
compat_mode_t
(
*
get_compat_mode
)(
DispatchEx
*
);
compat_mode_t
(
*
get_compat_mode
)(
DispatchEx
*
);
HRESULT
(
*
populate_props
)(
DispatchEx
*
);
HRESULT
(
*
populate_props
)(
DispatchEx
*
);
}
dispex_static_data_vtbl_t
;
}
dispex_static_data_vtbl_t
;
...
...
dlls/mshtml/tests/documentmode.js
View file @
f8bb1d7e
...
@@ -1201,6 +1201,31 @@ sync_test("map_obj", function() {
...
@@ -1201,6 +1201,31 @@ sync_test("map_obj", function() {
ok
(
r
===
1
,
"r = "
+
r
);
ok
(
r
===
1
,
"r = "
+
r
);
});
});
sync_test
(
"storage"
,
function
()
{
var
v
=
document
.
documentMode
,
r
;
sessionStorage
.
setItem
(
"foobar"
,
"1234"
);
ok
(
"foobar"
in
sessionStorage
,
"foobar not in sessionStorage"
);
r
=
sessionStorage
.
foobar
;
ok
(
r
===
"1234"
,
"sessionStorage.foobar = "
+
r
);
sessionStorage
.
barfoo
=
4321
;
r
=
sessionStorage
.
getItem
(
"barfoo"
);
ok
(
r
===
"4321"
,
"sessionStorage.barfoo = "
+
r
);
try
{
delete
sessionStorage
.
foobar
;
ok
(
v
>=
8
,
"expected exception deleting sessionStorage.foobar"
);
ok
(
!
(
"foobar"
in
sessionStorage
),
"foobar in sessionStorage after deletion"
);
r
=
sessionStorage
.
getItem
(
"foobar"
);
ok
(
r
===
null
,
"sessionStorage.foobar after deletion = "
+
r
);
}
catch
(
e
)
{
ok
(
v
<
8
,
"did not expect exception deleting sessionStorage.foobar"
);
ok
(
e
.
number
===
0xa01bd
-
0x80000000
,
"deleting sessionStorage.foobar threw = "
+
e
.
number
);
}
sessionStorage
.
clear
();
});
sync_test
(
"elem_attr"
,
function
()
{
sync_test
(
"elem_attr"
,
function
()
{
var
v
=
document
.
documentMode
;
var
v
=
document
.
documentMode
;
var
elem
=
document
.
createElement
(
"div"
),
r
;
var
elem
=
document
.
createElement
(
"div"
),
r
;
...
...
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