adderss comments
This commit is contained in:
parent
99de69b95e
commit
8bd8032f2c
|
|
@ -1,7 +1,7 @@
|
||||||
From 5ca970f3de98c8c1b94a54e4f357426bfa0bd82f Mon Sep 17 00:00:00 2001
|
From 48a72a80f1e602ff1f0b86a759cf7da5405cdee9 Mon Sep 17 00:00:00 2001
|
||||||
From: Andrey Lushnikov <lushnikov@chromium.org>
|
From: Andrey Lushnikov <lushnikov@chromium.org>
|
||||||
Date: Tue, 10 Dec 2019 00:25:58 -0800
|
Date: Tue, 10 Dec 2019 10:36:03 -0800
|
||||||
Subject: [PATCH] chore: bootstrap
|
Subject: [PATCH xserver] chore: bootstrap
|
||||||
|
|
||||||
---
|
---
|
||||||
Source/JavaScriptCore/CMakeLists.txt | 4 +
|
Source/JavaScriptCore/CMakeLists.txt | 4 +
|
||||||
|
|
@ -19,14 +19,14 @@ Subject: [PATCH] chore: bootstrap
|
||||||
.../inspector/protocol/Page.json | 111 +++-
|
.../inspector/protocol/Page.json | 111 +++-
|
||||||
.../inspector/protocol/Target.json | 22 +-
|
.../inspector/protocol/Target.json | 22 +-
|
||||||
Source/WebCore/html/FileInputType.cpp | 6 +
|
Source/WebCore/html/FileInputType.cpp | 6 +
|
||||||
.../inspector/InspectorInstrumentation.cpp | 26 +-
|
.../inspector/InspectorInstrumentation.cpp | 23 +-
|
||||||
.../inspector/InspectorInstrumentation.h | 21 +
|
.../inspector/InspectorInstrumentation.h | 21 +
|
||||||
.../inspector/agents/InspectorDOMAgent.cpp | 161 ++++-
|
.../inspector/agents/InspectorDOMAgent.cpp | 161 ++++-
|
||||||
.../inspector/agents/InspectorDOMAgent.h | 9 +-
|
.../inspector/agents/InspectorDOMAgent.h | 9 +-
|
||||||
.../agents/InspectorDOMStorageAgent.h | 1 +
|
.../agents/InspectorDOMStorageAgent.h | 1 +
|
||||||
.../inspector/agents/InspectorPageAgent.cpp | 560 +++++++++++++++++-
|
.../inspector/agents/InspectorPageAgent.cpp | 554 +++++++++++++++++-
|
||||||
.../inspector/agents/InspectorPageAgent.h | 28 +-
|
.../inspector/agents/InspectorPageAgent.h | 26 +-
|
||||||
.../agents/page/PageRuntimeAgent.cpp | 61 +-
|
.../agents/page/PageRuntimeAgent.cpp | 53 +-
|
||||||
.../inspector/agents/page/PageRuntimeAgent.h | 5 +-
|
.../inspector/agents/page/PageRuntimeAgent.h | 5 +-
|
||||||
Source/WebCore/loader/FrameLoader.cpp | 1 +
|
Source/WebCore/loader/FrameLoader.cpp | 1 +
|
||||||
Source/WebCore/page/History.cpp | 1 +
|
Source/WebCore/page/History.cpp | 1 +
|
||||||
|
|
@ -124,7 +124,7 @@ Subject: [PATCH] chore: bootstrap
|
||||||
.../mac/WK2BrowserWindowController.h | 3 +
|
.../mac/WK2BrowserWindowController.h | 3 +
|
||||||
.../mac/WK2BrowserWindowController.m | 38 +-
|
.../mac/WK2BrowserWindowController.m | 38 +-
|
||||||
Tools/MiniBrowser/wpe/main.cpp | 37 ++
|
Tools/MiniBrowser/wpe/main.cpp | 37 ++
|
||||||
120 files changed, 5073 insertions(+), 138 deletions(-)
|
120 files changed, 5065 insertions(+), 127 deletions(-)
|
||||||
create mode 100644 Source/JavaScriptCore/inspector/protocol/Browser.json
|
create mode 100644 Source/JavaScriptCore/inspector/protocol/Browser.json
|
||||||
create mode 100644 Source/JavaScriptCore/inspector/protocol/Dialog.json
|
create mode 100644 Source/JavaScriptCore/inspector/protocol/Dialog.json
|
||||||
create mode 100644 Source/JavaScriptCore/inspector/protocol/Emulation.json
|
create mode 100644 Source/JavaScriptCore/inspector/protocol/Emulation.json
|
||||||
|
|
@ -1138,7 +1138,7 @@ index 4e41fd3f807..1f7be602cb2 100644
|
||||||
return;
|
return;
|
||||||
|
|
||||||
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
|
diff --git a/Source/WebCore/inspector/InspectorInstrumentation.cpp b/Source/WebCore/inspector/InspectorInstrumentation.cpp
|
||||||
index cb6ed9f6c84..cac3f7682fa 100644
|
index cb6ed9f6c84..4402d67463d 100644
|
||||||
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
|
--- a/Source/WebCore/inspector/InspectorInstrumentation.cpp
|
||||||
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
|
+++ b/Source/WebCore/inspector/InspectorInstrumentation.cpp
|
||||||
@@ -121,7 +121,7 @@ static Frame* frameForScriptExecutionContext(ScriptExecutionContext& context)
|
@@ -121,7 +121,7 @@ static Frame* frameForScriptExecutionContext(ScriptExecutionContext& context)
|
||||||
|
|
@ -1150,17 +1150,7 @@ index cb6ed9f6c84..cac3f7682fa 100644
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (auto* pageDebuggerAgent = instrumentingAgents.pageDebuggerAgent())
|
if (auto* pageDebuggerAgent = instrumentingAgents.pageDebuggerAgent())
|
||||||
@@ -129,9 +129,6 @@ void InspectorInstrumentation::didClearWindowObjectInWorldImpl(InstrumentingAgen
|
@@ -656,20 +656,17 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents&
|
||||||
|
|
||||||
if (auto* pageRuntimeAgent = instrumentingAgents.pageRuntimeAgent())
|
|
||||||
pageRuntimeAgent->didClearWindowObjectInWorld(frame);
|
|
||||||
-
|
|
||||||
- if (auto* pageAgent = instrumentingAgents.inspectorPageAgent())
|
|
||||||
- pageAgent->didClearWindowObjectInWorld(frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool InspectorInstrumentation::isDebuggerPausedImpl(InstrumentingAgents& instrumentingAgents)
|
|
||||||
@@ -656,20 +653,17 @@ void InspectorInstrumentation::didReceiveScriptResponseImpl(InstrumentingAgents&
|
|
||||||
|
|
||||||
void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
|
void InspectorInstrumentation::domContentLoadedEventFiredImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
|
||||||
{
|
{
|
||||||
|
|
@ -1184,7 +1174,7 @@ index cb6ed9f6c84..cac3f7682fa 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
void InspectorInstrumentation::frameDetachedFromParentImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
|
void InspectorInstrumentation::frameDetachedFromParentImpl(InstrumentingAgents& instrumentingAgents, Frame& frame)
|
||||||
@@ -783,6 +777,12 @@ void InspectorInstrumentation::frameClearedScheduledNavigationImpl(Instrumenting
|
@@ -783,6 +780,12 @@ void InspectorInstrumentation::frameClearedScheduledNavigationImpl(Instrumenting
|
||||||
inspectorPageAgent->frameClearedScheduledNavigation(frame);
|
inspectorPageAgent->frameClearedScheduledNavigation(frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1197,7 +1187,7 @@ index cb6ed9f6c84..cac3f7682fa 100644
|
||||||
void InspectorInstrumentation::defaultAppearanceDidChangeImpl(InstrumentingAgents& instrumentingAgents, bool useDarkAppearance)
|
void InspectorInstrumentation::defaultAppearanceDidChangeImpl(InstrumentingAgents& instrumentingAgents, bool useDarkAppearance)
|
||||||
{
|
{
|
||||||
if (InspectorPageAgent* inspectorPageAgent = instrumentingAgents.inspectorPageAgent())
|
if (InspectorPageAgent* inspectorPageAgent = instrumentingAgents.inspectorPageAgent())
|
||||||
@@ -1251,6 +1251,12 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins
|
@@ -1251,6 +1254,12 @@ void InspectorInstrumentation::renderLayerDestroyedImpl(InstrumentingAgents& ins
|
||||||
layerTreeAgent->renderLayerDestroyed(renderLayer);
|
layerTreeAgent->renderLayerDestroyed(renderLayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1605,7 +1595,7 @@ index b578660fbb3..a7c968bc9f8 100644
|
||||||
class Page;
|
class Page;
|
||||||
class SecurityOrigin;
|
class SecurityOrigin;
|
||||||
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
|
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
|
||||||
index f2e228b7f74..40834d85fd7 100644
|
index f2e228b7f74..52995f8fb0b 100644
|
||||||
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
|
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
|
||||||
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
|
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.cpp
|
||||||
@@ -32,6 +32,8 @@
|
@@ -32,6 +32,8 @@
|
||||||
|
|
@ -1731,30 +1721,20 @@ index f2e228b7f74..40834d85fd7 100644
|
||||||
m_frontendDispatcher->frameNavigated(buildObjectForFrame(&frame));
|
m_frontendDispatcher->frameNavigated(buildObjectForFrame(&frame));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -761,17 +787,15 @@ void InspectorPageAgent::frameClearedScheduledNavigation(Frame& frame)
|
@@ -761,6 +787,12 @@ void InspectorPageAgent::frameClearedScheduledNavigation(Frame& frame)
|
||||||
m_frontendDispatcher->frameClearedScheduledNavigation(frameId(&frame));
|
m_frontendDispatcher->frameClearedScheduledNavigation(frameId(&frame));
|
||||||
}
|
}
|
||||||
|
|
||||||
-void InspectorPageAgent::defaultAppearanceDidChange(bool useDarkAppearance)
|
|
||||||
+void InspectorPageAgent::didNavigateWithinPage(Frame& frame)
|
+void InspectorPageAgent::didNavigateWithinPage(Frame& frame)
|
||||||
{
|
+{
|
||||||
- m_frontendDispatcher->defaultAppearanceDidChange(useDarkAppearance ? Inspector::Protocol::Page::Appearance::Dark : Inspector::Protocol::Page::Appearance::Light);
|
|
||||||
+ String url = frame.document()->url().string();
|
+ String url = frame.document()->url().string();
|
||||||
+ m_frontendDispatcher->navigatedWithinDocument(frameId(&frame), url);
|
+ m_frontendDispatcher->navigatedWithinDocument(frameId(&frame), url);
|
||||||
}
|
+}
|
||||||
|
+
|
||||||
-void InspectorPageAgent::didClearWindowObjectInWorld(Frame& frame)
|
void InspectorPageAgent::defaultAppearanceDidChange(bool useDarkAppearance)
|
||||||
+void InspectorPageAgent::defaultAppearanceDidChange(bool useDarkAppearance)
|
|
||||||
{
|
{
|
||||||
- if (m_bootstrapScript.isEmpty())
|
m_frontendDispatcher->defaultAppearanceDidChange(useDarkAppearance ? Inspector::Protocol::Page::Appearance::Dark : Inspector::Protocol::Page::Appearance::Light);
|
||||||
- return;
|
@@ -815,6 +847,25 @@ void InspectorPageAgent::didRecalculateStyle()
|
||||||
-
|
|
||||||
- frame.script().evaluate(ScriptSourceCode(m_bootstrapScript, URL { URL(), "web-inspector://bootstrap.js"_s }));
|
|
||||||
+ m_frontendDispatcher->defaultAppearanceDidChange(useDarkAppearance ? Inspector::Protocol::Page::Appearance::Dark : Inspector::Protocol::Page::Appearance::Light);
|
|
||||||
}
|
|
||||||
|
|
||||||
void InspectorPageAgent::didPaint(RenderObject& renderer, const LayoutRect& rect)
|
|
||||||
@@ -815,6 +839,25 @@ void InspectorPageAgent::didRecalculateStyle()
|
|
||||||
m_overlay->update();
|
m_overlay->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1780,7 +1760,7 @@ index f2e228b7f74..40834d85fd7 100644
|
||||||
Ref<Inspector::Protocol::Page::Frame> InspectorPageAgent::buildObjectForFrame(Frame* frame)
|
Ref<Inspector::Protocol::Page::Frame> InspectorPageAgent::buildObjectForFrame(Frame* frame)
|
||||||
{
|
{
|
||||||
ASSERT_ARG(frame, frame);
|
ASSERT_ARG(frame, frame);
|
||||||
@@ -986,4 +1029,487 @@ void InspectorPageAgent::archive(ErrorString& errorString, String* data)
|
@@ -986,4 +1037,487 @@ void InspectorPageAgent::archive(ErrorString& errorString, String* data)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2269,7 +2249,7 @@ index f2e228b7f74..40834d85fd7 100644
|
||||||
+
|
+
|
||||||
} // namespace WebCore
|
} // namespace WebCore
|
||||||
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.h b/Source/WebCore/inspector/agents/InspectorPageAgent.h
|
diff --git a/Source/WebCore/inspector/agents/InspectorPageAgent.h b/Source/WebCore/inspector/agents/InspectorPageAgent.h
|
||||||
index 4fd8c0b1016..c4b6a7c3e66 100644
|
index 4fd8c0b1016..b2d547cee84 100644
|
||||||
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.h
|
--- a/Source/WebCore/inspector/agents/InspectorPageAgent.h
|
||||||
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.h
|
+++ b/Source/WebCore/inspector/agents/InspectorPageAgent.h
|
||||||
@@ -40,10 +40,15 @@
|
@@ -40,10 +40,15 @@
|
||||||
|
|
@ -2320,7 +2300,7 @@ index 4fd8c0b1016..c4b6a7c3e66 100644
|
||||||
void frameNavigated(Frame&);
|
void frameNavigated(Frame&);
|
||||||
void frameDetached(Frame&);
|
void frameDetached(Frame&);
|
||||||
void loaderDetachedFromFrame(DocumentLoader&);
|
void loaderDetachedFromFrame(DocumentLoader&);
|
||||||
@@ -126,19 +138,22 @@ public:
|
@@ -126,6 +138,7 @@ public:
|
||||||
void frameStoppedLoading(Frame&);
|
void frameStoppedLoading(Frame&);
|
||||||
void frameScheduledNavigation(Frame&, Seconds delay);
|
void frameScheduledNavigation(Frame&, Seconds delay);
|
||||||
void frameClearedScheduledNavigation(Frame&);
|
void frameClearedScheduledNavigation(Frame&);
|
||||||
|
|
@ -2328,8 +2308,7 @@ index 4fd8c0b1016..c4b6a7c3e66 100644
|
||||||
void defaultAppearanceDidChange(bool useDarkAppearance);
|
void defaultAppearanceDidChange(bool useDarkAppearance);
|
||||||
void applyUserAgentOverride(String&);
|
void applyUserAgentOverride(String&);
|
||||||
void applyEmulatedMedia(String&);
|
void applyEmulatedMedia(String&);
|
||||||
- void didClearWindowObjectInWorld(Frame&);
|
@@ -134,11 +147,13 @@ public:
|
||||||
void didPaint(RenderObject&, const LayoutRect&);
|
|
||||||
void didLayout();
|
void didLayout();
|
||||||
void didScroll();
|
void didScroll();
|
||||||
void didRecalculateStyle();
|
void didRecalculateStyle();
|
||||||
|
|
@ -2340,7 +2319,6 @@ index 4fd8c0b1016..c4b6a7c3e66 100644
|
||||||
String loaderId(DocumentLoader*);
|
String loaderId(DocumentLoader*);
|
||||||
Frame* assertFrame(ErrorString&, const String& frameId);
|
Frame* assertFrame(ErrorString&, const String& frameId);
|
||||||
+ HashMap<String, String> isolatedWorldScripts() { return m_isolatedWorldScripts; };
|
+ HashMap<String, String> isolatedWorldScripts() { return m_isolatedWorldScripts; };
|
||||||
+ String bootstrapScript() { return m_bootstrapScript; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
double timestamp();
|
double timestamp();
|
||||||
|
|
@ -2364,7 +2342,7 @@ index 4fd8c0b1016..c4b6a7c3e66 100644
|
||||||
|
|
||||||
} // namespace WebCore
|
} // namespace WebCore
|
||||||
diff --git a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
|
diff --git a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
|
||||||
index 8c4a104da04..a0cac51247f 100644
|
index 8c4a104da04..be7c4c35b70 100644
|
||||||
--- a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
|
--- a/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
|
||||||
+++ b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
|
+++ b/Source/WebCore/inspector/agents/page/PageRuntimeAgent.cpp
|
||||||
@@ -40,6 +40,7 @@
|
@@ -40,6 +40,7 @@
|
||||||
|
|
@ -2393,7 +2371,7 @@ index 8c4a104da04..a0cac51247f 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
void PageRuntimeAgent::disable(ErrorString& errorString)
|
void PageRuntimeAgent::disable(ErrorString& errorString)
|
||||||
@@ -93,9 +92,18 @@ void PageRuntimeAgent::didClearWindowObjectInWorld(Frame& frame)
|
@@ -93,9 +92,15 @@ void PageRuntimeAgent::didClearWindowObjectInWorld(Frame& frame)
|
||||||
if (!pageAgent)
|
if (!pageAgent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2404,9 +2382,6 @@ index 8c4a104da04..a0cac51247f 100644
|
||||||
+ Document* document = frame.document();
|
+ Document* document = frame.document();
|
||||||
+ String worldName = document ? document->securityOrigin().toRawString() : String();
|
+ String worldName = document ? document->securityOrigin().toRawString() : String();
|
||||||
+ notifyContextCreated(frame, scriptState, worldName, true);
|
+ notifyContextCreated(frame, scriptState, worldName, true);
|
||||||
+ String bootstrapScript = pageAgent->bootstrapScript();
|
|
||||||
+ if (!bootstrapScript.isEmpty())
|
|
||||||
+ frame.script().evaluateInWorld(ScriptSourceCode(bootstrapScript, URL { URL(), "web-inspector://bootstrap.js"_s }), mainThreadNormalWorld());
|
|
||||||
+
|
+
|
||||||
+ // Create user worlds.
|
+ // Create user worlds.
|
||||||
+ for (auto pair : pageAgent->isolatedWorldScripts())
|
+ for (auto pair : pageAgent->isolatedWorldScripts())
|
||||||
|
|
@ -2414,7 +2389,7 @@ index 8c4a104da04..a0cac51247f 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
InjectedScript PageRuntimeAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId)
|
InjectedScript PageRuntimeAgent::injectedScriptForEval(ErrorString& errorString, const int* executionContextId)
|
||||||
@@ -135,33 +143,38 @@ void PageRuntimeAgent::reportExecutionContextCreation()
|
@@ -135,33 +140,38 @@ void PageRuntimeAgent::reportExecutionContextCreation()
|
||||||
if (!frame->script().canExecuteScripts(NotAboutToExecuteScript))
|
if (!frame->script().canExecuteScripts(NotAboutToExecuteScript))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
@ -2463,7 +2438,7 @@ index 8c4a104da04..a0cac51247f 100644
|
||||||
.setFrameId(frameId)
|
.setFrameId(frameId)
|
||||||
.release());
|
.release());
|
||||||
}
|
}
|
||||||
@@ -178,4 +191,18 @@ void PageRuntimeAgent::callFunctionOn(ErrorString& errorString, const String& ob
|
@@ -178,4 +188,13 @@ void PageRuntimeAgent::callFunctionOn(ErrorString& errorString, const String& ob
|
||||||
InspectorRuntimeAgent::callFunctionOn(errorString, objectId, expression, optionalArguments, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, emulateUserGesture, result, wasThrown);
|
InspectorRuntimeAgent::callFunctionOn(errorString, objectId, expression, optionalArguments, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, emulateUserGesture, result, wasThrown);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2474,11 +2449,6 @@ index 8c4a104da04..a0cac51247f 100644
|
||||||
+ frame.script().evaluateInWorld(ScriptSourceCode(source, URL { URL(), "web-inspector://isolate_world.js"_s }), world);
|
+ frame.script().evaluateInWorld(ScriptSourceCode(source, URL { URL(), "web-inspector://isolate_world.js"_s }), world);
|
||||||
+ auto* scriptState = frame.windowProxy().jsWindowProxy(world)->window();
|
+ auto* scriptState = frame.windowProxy().jsWindowProxy(world)->window();
|
||||||
+ notifyContextCreated(frame, scriptState, name, false);
|
+ notifyContextCreated(frame, scriptState, name, false);
|
||||||
+
|
|
||||||
+ auto* pageAgent = m_instrumentingAgents.inspectorPageAgent();
|
|
||||||
+ String bootstrapScript = pageAgent->bootstrapScript();
|
|
||||||
+ if (!bootstrapScript.isEmpty())
|
|
||||||
+ frame.script().evaluateInWorld(ScriptSourceCode(bootstrapScript, URL { URL(), "web-inspector://bootstrap.js"_s }), world);
|
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
} // namespace WebCore
|
} // namespace WebCore
|
||||||
|
|
@ -6457,7 +6427,7 @@ index 00000000000..e8a29bebe24
|
||||||
+} // namespace WebKit
|
+} // namespace WebKit
|
||||||
diff --git a/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp
|
diff --git a/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000000..4cf8860cf76
|
index 00000000000..e9af79dad57
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp
|
+++ b/Source/WebKit/UIProcess/gtk/WebPageInspectorInputAgentGtk.cpp
|
||||||
@@ -0,0 +1,85 @@
|
@@ -0,0 +1,85 @@
|
||||||
|
|
@ -6504,7 +6474,7 @@ index 00000000000..4cf8860cf76
|
||||||
+ return state;
|
+ return state;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEvent::Modifier> modifiers, Vector<String>& mac_commands, WallTime timestamp)
|
+void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEvent::Modifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
|
||||||
+{
|
+{
|
||||||
+ Vector<String> commands;
|
+ Vector<String> commands;
|
||||||
+ const guint keyVal = WebCore::PlatformKeyboardEvent::gdkKeyCodeForWindowsKeyCode(windowsVirtualKeyCode);
|
+ const guint keyVal = WebCore::PlatformKeyboardEvent::gdkKeyCodeForWindowsKeyCode(windowsVirtualKeyCode);
|
||||||
|
|
@ -6791,7 +6761,7 @@ index 00000000000..d364ca6d955
|
||||||
+} // namespace WebKit
|
+} // namespace WebKit
|
||||||
diff --git a/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm b/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm
|
diff --git a/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm b/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000000..9064d41f4d5
|
index 00000000000..08394ef65f3
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm
|
+++ b/Source/WebKit/UIProcess/mac/WebPageInspectorInputAgentMac.mm
|
||||||
@@ -0,0 +1,91 @@
|
@@ -0,0 +1,91 @@
|
||||||
|
|
@ -6862,11 +6832,11 @@ index 00000000000..9064d41f4d5
|
||||||
+void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEvent::Modifier> modifiers, Vector<String>& commands, WallTime timestamp)
|
+void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEvent::Modifier> modifiers, Vector<String>& commands, WallTime timestamp)
|
||||||
+{
|
+{
|
||||||
+ String keyIdentifier = key.length() == 1 ? makeString("U+", hex(toASCIIUpper(key.characterAt(0)), 4)) : key;
|
+ String keyIdentifier = key.length() == 1 ? makeString("U+", hex(toASCIIUpper(key.characterAt(0)), 4)) : key;
|
||||||
+ Vector<WebCore::KeypressCommand> mac_commands;
|
+ Vector<WebCore::KeypressCommand> macCommands;
|
||||||
+ for (const String& command : commands)
|
+ for (const String& command : commands)
|
||||||
+ mac_commands.append(WebCore::KeypressCommand(command.utf8().data()));
|
+ macCommands.append(WebCore::KeypressCommand(command.utf8().data()));
|
||||||
+ if (text.length() > 0 && mac_commands.size() == 0)
|
+ if (text.length() > 0 && macCommands.size() == 0)
|
||||||
+ mac_commands.append(WebCore::KeypressCommand("insertText:", text));
|
+ macCommands.append(WebCore::KeypressCommand("insertText:", text));
|
||||||
+ NativeWebKeyboardEvent event(
|
+ NativeWebKeyboardEvent event(
|
||||||
+ type,
|
+ type,
|
||||||
+ text,
|
+ text,
|
||||||
|
|
@ -6881,7 +6851,7 @@ index 00000000000..9064d41f4d5
|
||||||
+ isSystemKey,
|
+ isSystemKey,
|
||||||
+ modifiers,
|
+ modifiers,
|
||||||
+ timestamp,
|
+ timestamp,
|
||||||
+ WTFMove(mac_commands));
|
+ WTFMove(macCommands));
|
||||||
+ m_page.handleKeyboardEvent(event);
|
+ m_page.handleKeyboardEvent(event);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
|
|
@ -6938,7 +6908,7 @@ index 00000000000..2fef19fd5ee
|
||||||
+} // namespace WebKit
|
+} // namespace WebKit
|
||||||
diff --git a/Source/WebKit/UIProcess/wpe/WebPageInspectorInputAgentWPE.cpp b/Source/WebKit/UIProcess/wpe/WebPageInspectorInputAgentWPE.cpp
|
diff --git a/Source/WebKit/UIProcess/wpe/WebPageInspectorInputAgentWPE.cpp b/Source/WebKit/UIProcess/wpe/WebPageInspectorInputAgentWPE.cpp
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000000..4ae3eb95dff
|
index 00000000000..bbcba6f0a65
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/Source/WebKit/UIProcess/wpe/WebPageInspectorInputAgentWPE.cpp
|
+++ b/Source/WebKit/UIProcess/wpe/WebPageInspectorInputAgentWPE.cpp
|
||||||
@@ -0,0 +1,76 @@
|
@@ -0,0 +1,76 @@
|
||||||
|
|
@ -6987,7 +6957,7 @@ index 00000000000..4ae3eb95dff
|
||||||
+ return result;
|
+ return result;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEvent::Modifier> modifiers, WallTime timestamp)
|
+void WebPageInspectorInputAgent::platformDispatchKeyEvent(WebKeyboardEvent::Type type, const String& text, const String& unmodifiedText, const String& key, const String& code, int windowsVirtualKeyCode, int nativeVirtualKeyCode, bool isAutoRepeat, bool isKeypad, bool isSystemKey, OptionSet<WebEvent::Modifier> modifiers, Vector<String>& macCommands, WallTime timestamp)
|
||||||
+{
|
+{
|
||||||
+ unsigned keyCode = WebCore::PlatformKeyboardEvent::WPEKeyCodeForWindowsKeyCode(windowsVirtualKeyCode);
|
+ unsigned keyCode = WebCore::PlatformKeyboardEvent::WPEKeyCodeForWindowsKeyCode(windowsVirtualKeyCode);
|
||||||
+ struct wpe_input_xkb_keymap_entry* entries;
|
+ struct wpe_input_xkb_keymap_entry* entries;
|
||||||
|
|
@ -7891,5 +7861,5 @@ index 2d183d39412..d94d4f06fc5 100644
|
||||||
webkit_web_context_set_tls_errors_policy(webContext, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
|
webkit_web_context_set_tls_errors_policy(webContext, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
|
||||||
|
|
||||||
--
|
--
|
||||||
2.22.1
|
2.17.1
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue