-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path74e75e47a3b82dbf85f9ccd1fcc54bac85bf5b8c.diff
119 lines (105 loc) · 4.65 KB
/
74e75e47a3b82dbf85f9ccd1fcc54bac85bf5b8c.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_vk_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_aura_vk_browsertest.cc
index 99bb467e36a95..707a8063627c3 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_vk_browsertest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_vk_browsertest.cc
@@ -4,6 +4,7 @@
#include "base/memory/raw_ptr.h"
#include "base/observer_list.h"
+#include "base/win/windows_version.h"
#include "build/build_config.h"
#include "content/browser/accessibility/browser_accessibility.h"
#include "content/browser/accessibility/browser_accessibility_manager.h"
@@ -200,6 +201,11 @@ class RenderWidgetHostViewAuraBrowserMockIMETest : public ContentBrowserTest {
#if BUILDFLAG(IS_WIN)
IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
VirtualKeyboardAccessibilityFocusTest) {
+ // The keyboard input pane events are not supported on Win7.
+ if (base::win::GetVersion() <= base::win::Version::WIN7) {
+ return;
+ }
+
LoadInitialAccessibilityTreeFromHtml(R"HTML(
<div><button>Before</button></div>
<div contenteditable>Editable text</div>
@@ -227,6 +233,11 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
VirtualKeyboardShowVKTest) {
+ // The keyboard input pane events are not supported on Win7.
+ if (base::win::GetVersion() <= base::win::Version::WIN7) {
+ return;
+ }
+
GURL start_url = server_.GetURL("a.test", "/virtual-keyboard.html");
ASSERT_TRUE(NavigateToURL(shell(), start_url));
@@ -255,6 +266,11 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
DontShowVKOnJSFocus) {
+ // The keyboard input pane events are not supported on Win7.
+ if (base::win::GetVersion() <= base::win::Version::WIN7) {
+ return;
+ }
+
WebContentsImpl* web_contents =
static_cast<WebContentsImpl*>(shell()->web_contents());
TextInputManagerShowImeIfNeededObserver show_ime_observer_false(web_contents,
@@ -283,6 +299,11 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
ShowAndThenHideVK) {
+ // The keyboard input pane events are not supported on Win7.
+ if (base::win::GetVersion() <= base::win::Version::WIN7) {
+ return;
+ }
+
GURL start_url = server_.GetURL("a.test", "/virtual-keyboard.html");
ASSERT_TRUE(NavigateToURL(shell(), start_url));
@@ -316,6 +337,11 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
ShowAndThenHideVKInEditContext) {
+ // The keyboard input pane events are not supported on Win7.
+ if (base::win::GetVersion() <= base::win::Version::WIN7) {
+ return;
+ }
+
GURL start_url = server_.GetURL("a.test", "/virtual-keyboard.html");
ASSERT_TRUE(NavigateToURL(shell(), start_url));
@@ -349,6 +375,11 @@ IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
IN_PROC_BROWSER_TEST_F(RenderWidgetHostViewAuraBrowserMockIMETest,
VKVisibilityRequestInDeletedDocument) {
+ // The keyboard input pane events are not supported on Win7.
+ if (base::win::GetVersion() <= base::win::Version::WIN7) {
+ return;
+ }
+
const char kVirtualKeyboardDataURL[] =
"data:text/html,<!DOCTYPE html>"
"<body>"
diff --git a/content/child/font_warmup_win.cc b/content/child/font_warmup_win.cc
index d71bd63281f51..f8a50e5081e8a 100644
--- a/content/child/font_warmup_win.cc
+++ b/content/child/font_warmup_win.cc
@@ -7,8 +7,6 @@
#include <dwrite.h>
#include <stdint.h>
#include <map>
-#include <string>
-#include <utility>
#include "base/debug/alias.h"
#include "base/files/file_path.h"
@@ -24,6 +22,7 @@
#include "base/synchronization/lock.h"
#include "base/trace_event/trace_event.h"
#include "base/win/iat_patch_function.h"
+#include "base/win/windows_version.h"
#include "build/build_config.h"
#include "ppapi/buildflags/buildflags.h"
#include "third_party/skia/include/core/SkFontMgr.h"
@@ -392,7 +391,10 @@ void PatchServiceManagerCalls() {
static bool is_patched = false;
if (is_patched)
return;
- const char* service_provider_dll = "api-ms-win-service-management-l1-1-0.dll";
+ const char* service_provider_dll =
+ (base::win::GetVersion() >= base::win::Version::WIN8
+ ? "api-ms-win-service-management-l1-1-0.dll"
+ : "advapi32.dll");
is_patched = true;