mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 1d636da205e39436bbd71849ceeebc5420bf98a9.
This commit is contained in:
parent
bd2608b12c
commit
eff142bc57
@ -1,114 +0,0 @@
|
||||
From bef93835ceb4a482c348b0aa6e62ce4fee5e3f35 Mon Sep 17 00:00:00 2001
|
||||
From: Zhenbo Li <litimetal@gmail.com>
|
||||
Date: Tue, 1 Jul 2014 19:45:43 +0800
|
||||
Subject: [PATCH] mshtml: Add IHTMLLocation::hash property's getter
|
||||
implementation.
|
||||
|
||||
---
|
||||
dlls/mshtml/htmllocation.c | 11 ++++++--
|
||||
dlls/mshtml/tests/htmldoc.c | 53 ++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 61 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c
|
||||
index 8f7800ff2a3..2b42939a39f 100644
|
||||
--- a/dlls/mshtml/htmllocation.c
|
||||
+++ b/dlls/mshtml/htmllocation.c
|
||||
@@ -524,8 +524,15 @@ static HRESULT WINAPI HTMLLocation_get_search(IHTMLLocation *iface, BSTR *p)
|
||||
static HRESULT WINAPI HTMLLocation_put_hash(IHTMLLocation *iface, BSTR v)
|
||||
{
|
||||
HTMLLocation *This = impl_from_IHTMLLocation(iface);
|
||||
- FIXME("(%p)->(%s)\n", This, debugstr_w(v));
|
||||
- return E_NOTIMPL;
|
||||
+
|
||||
+ TRACE("(%p)->(%s)\n", This, debugstr_w(v));
|
||||
+
|
||||
+ if(!This->window || !This->window->base.outer_window) {
|
||||
+ FIXME("No window available\n");
|
||||
+ return E_FAIL;
|
||||
+ }
|
||||
+
|
||||
+ return navigate_url(This->window->base.outer_window, v, This->window->base.outer_window->uri, 0);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLLocation_get_hash(IHTMLLocation *iface, BSTR *p)
|
||||
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
|
||||
index ff050863b6f..2c118d89d1d 100644
|
||||
--- a/dlls/mshtml/tests/htmldoc.c
|
||||
+++ b/dlls/mshtml/tests/htmldoc.c
|
||||
@@ -5963,6 +5963,56 @@ static void test_Persist(IHTMLDocument2 *doc, IMoniker *mon)
|
||||
}
|
||||
}
|
||||
|
||||
+static void test_put_hash(IHTMLDocument2 *doc, const WCHAR *new_hash)
|
||||
+{
|
||||
+ static WCHAR nav_url_buff[256];
|
||||
+ IHTMLLocation *location;
|
||||
+ BSTR str;
|
||||
+ WCHAR *psharp;
|
||||
+ HRESULT hres;
|
||||
+
|
||||
+ trace("put_hash, url = %s, new hash = %s\n", debugstr_w(nav_url), debugstr_w(new_hash));
|
||||
+
|
||||
+ location = NULL;
|
||||
+ hres = IHTMLDocument2_get_location(doc, &location);
|
||||
+ ok(hres == S_OK, "get_location failed: %08lx\n", hres);
|
||||
+ ok(location != NULL, "location == NULL\n");
|
||||
+
|
||||
+ SET_EXPECT(TranslateUrl);
|
||||
+ SET_EXPECT(Exec_ShellDocView_67);
|
||||
+ SET_EXPECT(FireBeforeNavigate2);
|
||||
+ SET_EXPECT(FireDocumentComplete);
|
||||
+ SET_EXPECT(FireNavigateComplete2);
|
||||
+
|
||||
+ /* Edit nav_url */
|
||||
+ wcscpy(nav_url_buff, nav_url);
|
||||
+ psharp = wcschr(nav_url_buff, '#');
|
||||
+ if (psharp)
|
||||
+ *psharp = '\0';
|
||||
+ wcscat(nav_url_buff, new_hash);
|
||||
+ nav_url = nav_url_buff;
|
||||
+
|
||||
+ str = SysAllocString(new_hash);
|
||||
+ hres = IHTMLLocation_put_hash(location, str);
|
||||
+ ok (hres == S_OK, "put_hash failed: %08lx\n", hres);
|
||||
+ SysFreeString(str);
|
||||
+
|
||||
+ CHECK_CALLED(TranslateUrl);
|
||||
+ CHECK_CALLED_BROKEN(Exec_ShellDocView_67); /* Broken on Win7 and 8 */
|
||||
+ CHECK_CALLED(FireBeforeNavigate2);
|
||||
+ CHECK_CALLED(FireDocumentComplete);
|
||||
+ CHECK_CALLED(FireNavigateComplete2);
|
||||
+
|
||||
+
|
||||
+ /* Check the result */
|
||||
+ hres = IHTMLLocation_get_hash(location, &str);
|
||||
+ ok(hres == S_OK, "get_hash failed: %08lx\n", hres);
|
||||
+ ok(!wcscmp(str, new_hash), "expected %s, got %s\n", debugstr_w(new_hash), debugstr_w(str));
|
||||
+ SysFreeString(str);
|
||||
+
|
||||
+ IHTMLLocation_Release(location);
|
||||
+}
|
||||
+
|
||||
static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace, const WCHAR *href, const WCHAR *new_nav_url, BOOL is_js,
|
||||
BOOL is_hash, DWORD dwl_flags)
|
||||
{
|
||||
@@ -6148,7 +6198,7 @@ static void test_load_history(IHTMLDocument2 *doc)
|
||||
ok(hres == S_OK, "Could not get IPersistHistory iface: %08lx\n", hres);
|
||||
|
||||
prev_url = nav_url;
|
||||
- nav_url = L"http://test.winehq.org/tests/winehq_snapshot/#test";
|
||||
+ nav_url = L"http://test.winehq.org/tests/winehq_snapshot/#hash_test";
|
||||
nav_serv_url = L"http://test.winehq.org/tests/winehq_snapshot/";
|
||||
|
||||
SET_EXPECT(Exec_ShellDocView_138);
|
||||
@@ -8017,6 +8067,7 @@ static void test_HTMLDocument_http(BOOL with_wbapp)
|
||||
nav_url = nav_serv_url = L"http://test.winehq.org/tests/winehq_snapshot/"; /* for valid prev nav_url */
|
||||
if(support_wbapp) {
|
||||
test_put_href(doc, FALSE, L"#test", L"http://test.winehq.org/tests/winehq_snapshot/#test", FALSE, TRUE, 0);
|
||||
+ test_put_hash(doc, L"#hash_test");
|
||||
test_travellog(doc);
|
||||
test_refresh(doc);
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [32967] Add IHTMLLocation::hash property's getter implementation
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "7be72ce2a708ec88aa2362352f37db30529251c4"
|
||||
echo "1d636da205e39436bbd71849ceeebc5420bf98a9"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -126,7 +126,6 @@ patch_enable_all ()
|
||||
enable_mmsystem_dll16_MIDIHDR_Refcount="$1"
|
||||
enable_mountmgr_DosDevices="$1"
|
||||
enable_mscoree_CorValidateImage="$1"
|
||||
enable_mshtml_HTMLLocation_put_hash="$1"
|
||||
enable_mshtml_TranslateAccelerator="$1"
|
||||
enable_msi_msi_vcl_get_cost="$1"
|
||||
enable_msxml3_FreeThreadedXMLHTTP60="$1"
|
||||
@ -395,9 +394,6 @@ patch_enable ()
|
||||
mscoree-CorValidateImage)
|
||||
enable_mscoree_CorValidateImage="$2"
|
||||
;;
|
||||
mshtml-HTMLLocation_put_hash)
|
||||
enable_mshtml_HTMLLocation_put_hash="$2"
|
||||
;;
|
||||
mshtml-TranslateAccelerator)
|
||||
enable_mshtml_TranslateAccelerator="$2"
|
||||
;;
|
||||
@ -2056,18 +2052,6 @@ if test "$enable_mscoree_CorValidateImage" -eq 1; then
|
||||
patch_apply mscoree-CorValidateImage/0001-mscoree-Implement-_CorValidateImage.patch
|
||||
fi
|
||||
|
||||
# Patchset mshtml-HTMLLocation_put_hash
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#32967] Add IHTMLLocation::hash property's getter implementation
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/mshtml/htmllocation.c, dlls/mshtml/tests/htmldoc.c
|
||||
# |
|
||||
if test "$enable_mshtml_HTMLLocation_put_hash" -eq 1; then
|
||||
patch_apply mshtml-HTMLLocation_put_hash/0001-mshtml-Add-IHTMLLocation-hash-property-s-getter-impl.patch
|
||||
fi
|
||||
|
||||
# Patchset mshtml-TranslateAccelerator
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1 +1 @@
|
||||
7be72ce2a708ec88aa2362352f37db30529251c4
|
||||
1d636da205e39436bbd71849ceeebc5420bf98a9
|
||||
|
Loading…
Reference in New Issue
Block a user