Diff
Modified: trunk/LayoutTests/ChangeLog (209464 => 209465)
--- trunk/LayoutTests/ChangeLog 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/LayoutTests/ChangeLog 2016-12-07 19:31:08 UTC (rev 209465)
@@ -1,3 +1,16 @@
+2016-12-07 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Remove unused and mostly untested Page domain commands and events
+ https://bugs.webkit.org/show_bug.cgi?id=165507
+
+ Reviewed by Brian Burg.
+
+ * inspector/page/_javascript_DialogEvents-expected.txt: Removed.
+ * inspector/page/_javascript_DialogEvents.html: Removed.
+ * platform/gtk/TestExpectations:
+ * platform/mac/TestExpectations:
+ Remove test skipped by all platforms.
+
2016-12-07 Dave Hyatt <hy...@apple.com>
Fix a bad result that I landed by accident.
Deleted: trunk/LayoutTests/inspector/page/_javascript_DialogEvents-expected.txt (209464 => 209465)
--- trunk/LayoutTests/inspector/page/_javascript_DialogEvents-expected.txt 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/LayoutTests/inspector/page/_javascript_DialogEvents-expected.txt 2016-12-07 19:31:08 UTC (rev 209465)
@@ -1,13 +0,0 @@
-CONFIRM NAVIGATION: beforeunload in _javascript_DialogEvents
-ALERT: alert
-CONFIRM: confirm
-PROMPT: prompt, default text:
-Opening with message: beforeunload in _javascript_DialogEvents
-Closed
-Opening with message: alert
-Closed
-Opening with message: confirm
-Closed
-Opening with message: prompt
-Closed
-
Deleted: trunk/LayoutTests/inspector/page/_javascript_DialogEvents.html (209464 => 209465)
--- trunk/LayoutTests/inspector/page/_javascript_DialogEvents.html 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/LayoutTests/inspector/page/_javascript_DialogEvents.html 2016-12-07 19:31:08 UTC (rev 209465)
@@ -1,44 +0,0 @@
-<html>
-<head>
-<script type="text/_javascript_" src=""
-<script>
-
-window.addEventListener("beforeunload", onBeforeUnload);
-
-function onBeforeUnload()
-{
- window.removeEventListener("beforeunload", onBeforeUnload);
- return "beforeunload in _javascript_DialogEvents";
-}
-
-function test()
-{
- InspectorProtocol.eventHandler["Page._javascript_DialogOpening"] = onOpening;
- InspectorProtocol.eventHandler["Page._javascript_DialogClosed"] = onClosed;
- InspectorProtocol.sendCommand("Page.enable", {});
-
- function onOpening(event)
- {
- ProtocolTest.log("Opening with message: " + event.params.message);
- }
- function onClosed()
- {
- ProtocolTest.log("Closed");
- }
-
- InspectorProtocol.sendCommand("Page.navigate", { "url": "nosuchurl" });
- InspectorProtocol.sendCommand("Runtime.evaluate", { "_expression_": "alert('alert')" });
- InspectorProtocol.sendCommand("Runtime.evaluate", { "_expression_": "confirm('confirm')" });
- InspectorProtocol.sendCommand("Runtime.evaluate", { "_expression_": "prompt('prompt')" }, onDone);
-
- function onDone()
- {
- ProtocolTest.completeTest();
- }
-}
-
-</script>
-</head>
-<body _onload_="runTest()">
-</body>
-</html>
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (209464 => 209465)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2016-12-07 19:31:08 UTC (rev 209465)
@@ -1470,7 +1470,6 @@
webkit.org/b/122571 inspector/dom/focus.html [ Failure Timeout Pass ]
webkit.org/b/122571 inspector/runtime/getProperties.html [ Timeout Pass Crash ]
webkit.org/b/122571 inspector/runtime/saveResult.html [ Timeout Pass Crash ]
-webkit.org/b/122571 inspector/page/_javascript_DialogEvents.html [ Timeout Pass ]
webkit.org/b/122571 inspector/page/frameStartedLoading.html [ Timeout Pass ]
webkit.org/b/122571 inspector/page/frameScheduledNavigation.html [ Timeout Pass Crash ]
webkit.org/b/122571 inspector/page/setEmulatedMedia.html [ Timeout Pass ]
Modified: trunk/LayoutTests/platform/mac/TestExpectations (209464 => 209465)
--- trunk/LayoutTests/platform/mac/TestExpectations 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/LayoutTests/platform/mac/TestExpectations 2016-12-07 19:31:08 UTC (rev 209465)
@@ -620,8 +620,6 @@
# Enable when support drag-and-drop autoscrolling
webkit.org/b/39725 fast/events/drag-and-drop-autoscroll.html [ Skip ]
-webkit.org/b/110186 inspector/page/_javascript_DialogEvents.html [ Skip ]
-
# Need support for ResourceHandle::didChangePriority and DRT support
webkit.org/b/111016 http/tests/loading/promote-img-preload-priority.html [ Failure ]
Modified: trunk/Source/_javascript_Core/ChangeLog (209464 => 209465)
--- trunk/Source/_javascript_Core/ChangeLog 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-12-07 19:31:08 UTC (rev 209465)
@@ -1,3 +1,22 @@
+2016-12-07 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Remove unused and mostly untested Page domain commands and events
+ https://bugs.webkit.org/show_bug.cgi?id=165507
+
+ Reviewed by Brian Burg.
+
+ Remove unused and unsupported commands and events.
+
+ - Page.setDocumentContent
+ - Page.getScriptExecutionStatus
+ - Page.setScriptExecutionDisabled
+ - Page.handleJavaScriptDialog
+ - Page._javascript_DialogOpening
+ - Page._javascript_DialogClosed
+ - Page.scriptsEnabled
+
+ * inspector/protocol/Page.json:
+
2016-12-07 Yusuke Suzuki <utatane....@gmail.com>
[JSC] Merge PromiseReactions
Modified: trunk/Source/_javascript_Core/inspector/protocol/Page.json (209464 => 209465)
--- trunk/Source/_javascript_Core/inspector/protocol/Page.json 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/_javascript_Core/inspector/protocol/Page.json 2016-12-07 19:31:08 UTC (rev 209465)
@@ -186,14 +186,6 @@
]
},
{
- "name": "setDocumentContent",
- "description": "Sets given markup as the document's HTML.",
- "parameters": [
- { "name": "frameId", "$ref": "Network.FrameId", "description": "Frame id to set HTML for." },
- { "name": "html", "type": "string", "description": "HTML content to set." }
- ]
- },
- {
"name": "setShowPaintRects",
"description": "Requests that backend shows paint rectangles",
"parameters": [
@@ -201,20 +193,6 @@
]
},
{
- "name": "getScriptExecutionStatus",
- "description": "Determines if scripts can be executed in the page.",
- "returns": [
- { "name": "result", "type": "string", "enum": ["allowed", "disabled", "forbidden"], "description": "Script execution status: \"allowed\" if scripts can be executed, \"disabled\" if script execution has been disabled through page settings, \"forbidden\" if script execution for the given page is not possible for other reasons." }
- ]
- },
- {
- "name": "setScriptExecutionDisabled",
- "description": "Switches script execution in the page.",
- "parameters": [
- { "name": "value", "type": "boolean", "description": "Whether script execution should be disabled in the page." }
- ]
- },
- {
"name": "setEmulatedMedia",
"description": "Emulates the given media for CSS media queries.",
"parameters": [
@@ -260,14 +238,6 @@
]
},
{
- "name": "handleJavaScriptDialog",
- "description": "Accepts or dismisses a _javascript_ initiated dialog (alert, confirm, prompt, or onbeforeunload).",
- "parameters": [
- { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." },
- { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." }
- ]
- },
- {
"name": "archive",
"description": "Grab an archive of the page.",
"returns": [
@@ -330,24 +300,6 @@
"parameters": [
{ "name": "frameId", "$ref": "Network.FrameId", "description": "Id of the frame that has cleared its scheduled navigation." }
]
- },
- {
- "name": "_javascript_DialogOpening",
- "description": "Fired when a _javascript_ initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.",
- "parameters": [
- { "name": "message", "type": "string", "description": "Message that will be displayed by the dialog." }
- ]
- },
- {
- "name": "_javascript_DialogClosed",
- "description": "Fired when a _javascript_ initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed."
- },
- {
- "name": "scriptsEnabled",
- "description": "Fired when the _javascript_ is enabled/disabled on the page",
- "parameters": [
- { "name": "isEnabled", "type": "boolean", "description": "Whether script execution is enabled or disabled on the page." }
- ]
}
]
}
Modified: trunk/Source/WebCore/ChangeLog (209464 => 209465)
--- trunk/Source/WebCore/ChangeLog 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebCore/ChangeLog 2016-12-07 19:31:08 UTC (rev 209465)
@@ -1,3 +1,46 @@
+2016-12-07 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Remove unused and mostly untested Page domain commands and events
+ https://bugs.webkit.org/show_bug.cgi?id=165507
+
+ Reviewed by Brian Burg.
+
+ Remove any code associated with the commands/events being removed.
+
+ * inspector/DOMPatchSupport.cpp:
+ * inspector/DOMPatchSupport.h:
+ * inspector/InspectorClient.h:
+ (WebCore::InspectorClient::handleJavaScriptDialog): Deleted.
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::scriptsEnabledImpl): Deleted.
+ (WebCore::InspectorInstrumentation::willRunJavaScriptDialogImpl): Deleted.
+ (WebCore::InspectorInstrumentation::didRunJavaScriptDialogImpl): Deleted.
+ * inspector/InspectorInstrumentation.h:
+ (WebCore::InspectorInstrumentation::scriptsEnabled): Deleted.
+ (WebCore::InspectorInstrumentation::willRunJavaScriptDialog): Deleted.
+ (WebCore::InspectorInstrumentation::didRunJavaScriptDialog): Deleted.
+ * inspector/InspectorPageAgent.cpp:
+ (WebCore::InspectorPageAgent::disable):
+ (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
+ (WebCore::InspectorPageAgent::didPaint):
+ (WebCore::InspectorPageAgent::buildObjectForFrame):
+ (WebCore::InspectorPageAgent::archive):
+ (WebCore::createXHRTextDecoder): Deleted.
+ (WebCore::InspectorPageAgent::getScriptExecutionStatus): Deleted.
+ (WebCore::InspectorPageAgent::setScriptExecutionDisabled): Deleted.
+ (WebCore::InspectorPageAgent::willRunJavaScriptDialog): Deleted.
+ (WebCore::InspectorPageAgent::didRunJavaScriptDialog): Deleted.
+ (WebCore::InspectorPageAgent::scriptsEnabled): Deleted.
+ (WebCore::InspectorPageAgent::handleJavaScriptDialog): Deleted.
+ * inspector/InspectorPageAgent.h:
+ * page/Chrome.cpp:
+ (WebCore::Chrome::runBeforeUnloadConfirmPanel):
+ (WebCore::Chrome::runJavaScriptAlert):
+ (WebCore::Chrome::runJavaScriptConfirm):
+ (WebCore::Chrome::runJavaScriptPrompt):
+ * page/Settings.cpp:
+ (WebCore::Settings::setScriptEnabled):
+
2016-12-07 Jer Noble <jer.no...@apple.com>
[pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key.
Modified: trunk/Source/WebCore/inspector/DOMPatchSupport.cpp (209464 => 209465)
--- trunk/Source/WebCore/inspector/DOMPatchSupport.cpp 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebCore/inspector/DOMPatchSupport.cpp 2016-12-07 19:31:08 UTC (rev 209465)
@@ -64,14 +64,6 @@
Vector<std::unique_ptr<Digest>> children;
};
-void DOMPatchSupport::patchDocument(Document& document, const String& markup)
-{
- InspectorHistory history;
- DOMEditor domEditor { history };
- DOMPatchSupport patchSupport(domEditor, document);
- patchSupport.patchDocument(markup);
-}
-
DOMPatchSupport::DOMPatchSupport(DOMEditor& domEditor, Document& document)
: m_domEditor(domEditor)
, m_document(document)
Modified: trunk/Source/WebCore/inspector/DOMPatchSupport.h (209464 => 209465)
--- trunk/Source/WebCore/inspector/DOMPatchSupport.h 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebCore/inspector/DOMPatchSupport.h 2016-12-07 19:31:08 UTC (rev 209465)
@@ -43,8 +43,6 @@
class DOMPatchSupport final {
public:
- static void patchDocument(Document&, const String& markup);
-
DOMPatchSupport(DOMEditor&, Document&);
void patchDocument(const String& markup);
Modified: trunk/Source/WebCore/inspector/InspectorClient.h (209464 => 209465)
--- trunk/Source/WebCore/inspector/InspectorClient.h 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebCore/inspector/InspectorClient.h 2016-12-07 19:31:08 UTC (rev 209465)
@@ -61,8 +61,6 @@
virtual void didSetSearchingForNode(bool) { }
virtual void elementSelectionChanged(bool) { }
- virtual bool handleJavaScriptDialog(bool, const String*) { return false; }
-
WEBCORE_EXPORT static void doDispatchMessageOnFrontendPage(Page* frontendPage, const String& message);
};
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (209464 => 209465)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp 2016-12-07 19:31:08 UTC (rev 209465)
@@ -434,12 +434,6 @@
timelineAgent->didEvaluateScript(frame);
}
-void InspectorInstrumentation::scriptsEnabledImpl(InstrumentingAgents& instrumentingAgents, bool isEnabled)
-{
- if (InspectorPageAgent* pageAgent = instrumentingAgents.inspectorPageAgent())
- pageAgent->scriptsEnabled(isEnabled);
-}
-
InspectorInstrumentationCookie InspectorInstrumentation::willFireTimerImpl(InstrumentingAgents& instrumentingAgents, int timerId, ScriptExecutionContext& context)
{
pauseOnNativeEventIfNeeded(instrumentingAgents, false, timerFiredEventName, false);
@@ -846,19 +840,6 @@
inspectorPageAgent->frameClearedScheduledNavigation(frame);
}
-InspectorInstrumentationCookie InspectorInstrumentation::willRunJavaScriptDialogImpl(InstrumentingAgents& instrumentingAgents, const String& message)
-{
- if (InspectorPageAgent* inspectorPageAgent = instrumentingAgents.inspectorPageAgent())
- inspectorPageAgent->willRunJavaScriptDialog(message);
- return InspectorInstrumentationCookie(instrumentingAgents, 0);
-}
-
-void InspectorInstrumentation::didRunJavaScriptDialogImpl(const InspectorInstrumentationCookie& cookie)
-{
- if (InspectorPageAgent* inspectorPageAgent = cookie.instrumentingAgents()->inspectorPageAgent())
- inspectorPageAgent->didRunJavaScriptDialog();
-}
-
void InspectorInstrumentation::willDestroyCachedResourceImpl(CachedResource& cachedResource)
{
if (!s_instrumentingAgentsSet)
Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (209464 => 209465)
--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h 2016-12-07 19:31:08 UTC (rev 209465)
@@ -134,7 +134,6 @@
static void didDispatchEventOnWindow(const InspectorInstrumentationCookie&);
static InspectorInstrumentationCookie willEvaluateScript(Frame&, const String& url, int lineNumber);
static void didEvaluateScript(const InspectorInstrumentationCookie&, Frame&);
- static void scriptsEnabled(Page&, bool isEnabled);
static InspectorInstrumentationCookie willFireTimer(ScriptExecutionContext&, int timerId);
static void didFireTimer(const InspectorInstrumentationCookie&);
static void didInvalidateLayout(Frame&);
@@ -179,8 +178,6 @@
static void frameStoppedLoading(Frame&);
static void frameScheduledNavigation(Frame&, double delay);
static void frameClearedScheduledNavigation(Frame&);
- static InspectorInstrumentationCookie willRunJavaScriptDialog(Page&, const String& message);
- static void didRunJavaScriptDialog(const InspectorInstrumentationCookie&);
static void willDestroyCachedResource(CachedResource&);
static void addMessageToConsole(Page&, std::unique_ptr<Inspector::ConsoleMessage>);
@@ -307,7 +304,6 @@
static void didDispatchEventOnWindowImpl(const InspectorInstrumentationCookie&);
static InspectorInstrumentationCookie willEvaluateScriptImpl(InstrumentingAgents&, Frame&, const String& url, int lineNumber);
static void didEvaluateScriptImpl(const InspectorInstrumentationCookie&, Frame&);
- static void scriptsEnabledImpl(InstrumentingAgents&, bool isEnabled);
static InspectorInstrumentationCookie willFireTimerImpl(InstrumentingAgents&, int timerId, ScriptExecutionContext&);
static void didFireTimerImpl(const InspectorInstrumentationCookie&);
static void didInvalidateLayoutImpl(InstrumentingAgents&, Frame&);
@@ -353,8 +349,6 @@
static void frameStoppedLoadingImpl(InstrumentingAgents&, Frame&);
static void frameScheduledNavigationImpl(InstrumentingAgents&, Frame&, double delay);
static void frameClearedScheduledNavigationImpl(InstrumentingAgents&, Frame&);
- static InspectorInstrumentationCookie willRunJavaScriptDialogImpl(InstrumentingAgents&, const String& message);
- static void didRunJavaScriptDialogImpl(const InspectorInstrumentationCookie&);
static void willDestroyCachedResourceImpl(CachedResource&);
static void addMessageToConsoleImpl(InstrumentingAgents&, std::unique_ptr<Inspector::ConsoleMessage>);
@@ -733,12 +727,6 @@
didEvaluateScriptImpl(cookie, frame);
}
-inline void InspectorInstrumentation::scriptsEnabled(Page& page, bool isEnabled)
-{
- FAST_RETURN_IF_NO_FRONTENDS(void());
- return scriptsEnabledImpl(instrumentingAgentsForPage(page), isEnabled);
-}
-
inline InspectorInstrumentationCookie InspectorInstrumentation::willFireTimer(ScriptExecutionContext& context, int timerId)
{
FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
@@ -1014,19 +1002,6 @@
frameClearedScheduledNavigationImpl(*instrumentingAgents, frame);
}
-inline InspectorInstrumentationCookie InspectorInstrumentation::willRunJavaScriptDialog(Page& page, const String& message)
-{
- FAST_RETURN_IF_NO_FRONTENDS(InspectorInstrumentationCookie());
- return willRunJavaScriptDialogImpl(instrumentingAgentsForPage(page), message);
-}
-
-inline void InspectorInstrumentation::didRunJavaScriptDialog(const InspectorInstrumentationCookie& cookie)
-{
- FAST_RETURN_IF_NO_FRONTENDS(void());
- if (cookie.isValid())
- didRunJavaScriptDialogImpl(cookie);
-}
-
inline void InspectorInstrumentation::willDestroyCachedResource(CachedResource& cachedResource)
{
FAST_RETURN_IF_NO_FRONTENDS(void());
Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (209464 => 209465)
--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp 2016-12-07 19:31:08 UTC (rev 209465)
@@ -40,7 +40,6 @@
#include "CachedScript.h"
#include "Cookie.h"
#include "CookieJar.h"
-#include "DOMPatchSupport.h"
#include "DOMWrapperWorld.h"
#include "Document.h"
#include "DocumentLoader.h"
@@ -373,8 +372,6 @@
auto stopwatch = m_environment.executionStopwatch();
stopwatch->reset();
stopwatch->start();
-
- m_originalScriptExecutionDisabled = !mainFrame().settings().isScriptEnabled();
}
void InspectorPageAgent::disable(ErrorString&)
@@ -384,7 +381,6 @@
m_instrumentingAgents.setInspectorPageAgent(nullptr);
ErrorString unused;
- setScriptExecutionDisabled(unused, m_originalScriptExecutionDisabled);
setShowPaintRects(unused, false);
setEmulatedMedia(unused, emptyString());
}
@@ -656,20 +652,6 @@
networkAgent->searchOtherRequests(regex, result);
}
-void InspectorPageAgent::setDocumentContent(ErrorString& errorString, const String& frameId, const String& html)
-{
- Frame* frame = assertFrame(errorString, frameId);
- if (!frame)
- return;
-
- Document* document = frame->document();
- if (!document) {
- errorString = ASCIILiteral("No Document instance to set HTML for");
- return;
- }
- DOMPatchSupport::patchDocument(*document, html);
-}
-
void InspectorPageAgent::setShowPaintRects(ErrorString&, bool show)
{
m_showPaintRects = show;
@@ -681,31 +663,6 @@
m_overlay->setShowingPaintRects(show);
}
-void InspectorPageAgent::getScriptExecutionStatus(ErrorString&, Inspector::PageBackendDispatcherHandler::Result* status)
-{
- bool disabledByScriptController = false;
- bool disabledInSettings = false;
- disabledByScriptController = mainFrame().script().canExecuteScripts(NotAboutToExecuteScript);
- disabledInSettings = !mainFrame().settings().isScriptEnabled();
-
- if (!disabledByScriptController) {
- *status = Inspector::PageBackendDispatcherHandler::Result::Allowed;
- return;
- }
-
- if (disabledInSettings)
- *status = Inspector::PageBackendDispatcherHandler::Result::Disabled;
- else
- *status = Inspector::PageBackendDispatcherHandler::Result::Forbidden;
-}
-
-void InspectorPageAgent::setScriptExecutionDisabled(ErrorString&, bool value)
-{
- m_ignoreScriptsEnabledNotification = true;
- mainFrame().settings().setScriptEnabled(!value);
- m_ignoreScriptsEnabledNotification = false;
-}
-
void InspectorPageAgent::didClearWindowObjectInWorld(Frame* frame, DOMWrapperWorld& world)
{
if (&world != &mainThreadNormalWorld())
@@ -846,16 +803,6 @@
m_frontendDispatcher->frameClearedScheduledNavigation(frameId(&frame));
}
-void InspectorPageAgent::willRunJavaScriptDialog(const String& message)
-{
- m_frontendDispatcher->_javascript_DialogOpening(message);
-}
-
-void InspectorPageAgent::didRunJavaScriptDialog()
-{
- m_frontendDispatcher->_javascript_DialogClosed();
-}
-
void InspectorPageAgent::didPaint(RenderObject& renderer, const LayoutRect& rect)
{
if (!m_enabled || !m_showPaintRects)
@@ -902,14 +849,6 @@
m_overlay->update();
}
-void InspectorPageAgent::scriptsEnabled(bool isEnabled)
-{
- if (m_ignoreScriptsEnabledNotification)
- return;
-
- m_frontendDispatcher->scriptsEnabled(isEnabled);
-}
-
Ref<Inspector::Protocol::Page::Frame> InspectorPageAgent::buildObjectForFrame(Frame* frame)
{
ASSERT_ARG(frame, frame);
@@ -1042,12 +981,6 @@
*outDataURL = snapshot->toDataURL(ASCIILiteral("image/png"));
}
-void InspectorPageAgent::handleJavaScriptDialog(ErrorString& errorString, bool accept, const String* promptText)
-{
- if (!m_client->handleJavaScriptDialog(accept, promptText))
- errorString = ASCIILiteral("Could not handle _javascript_ dialog");
-}
-
void InspectorPageAgent::archive(ErrorString& errorString, String* data)
{
#if ENABLE(WEB_ARCHIVE) && USE(CF)
Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.h (209464 => 209465)
--- trunk/Source/WebCore/inspector/InspectorPageAgent.h 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.h 2016-12-07 19:31:08 UTC (rev 209465)
@@ -98,16 +98,12 @@
void getResourceContent(ErrorString&, const String& frameId, const String& url, String* content, bool* base64Encoded) override;
void searchInResource(ErrorString&, const String& frameId, const String& url, const String& query, const bool* optionalCaseSensitive, const bool* optionalIsRegex, const String* optionalRequestId, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::GenericTypes::SearchMatch>>&) override;
void searchInResources(ErrorString&, const String&, const bool* caseSensitive, const bool* isRegex, RefPtr<Inspector::Protocol::Array<Inspector::Protocol::Page::SearchResult>>&) override;
- void setDocumentContent(ErrorString&, const String& frameId, const String& html) override;
void setShowPaintRects(ErrorString&, bool show) override;
- void getScriptExecutionStatus(ErrorString&, Inspector::PageBackendDispatcherHandler::Result*) override;
- void setScriptExecutionDisabled(ErrorString&, bool) override;
void setEmulatedMedia(ErrorString&, const String&) override;
void getCompositingBordersVisible(ErrorString&, bool* out_param) override;
void setCompositingBordersVisible(ErrorString&, bool) override;
void snapshotNode(ErrorString&, int nodeId, String* outDataURL) override;
void snapshotRect(ErrorString&, int x, int y, int width, int height, const String& coordinateSystem, String* outDataURL) override;
- void handleJavaScriptDialog(ErrorString&, bool accept, const String* promptText) override;
void archive(ErrorString&, String* data) override;
// InspectorInstrumentation
@@ -121,14 +117,11 @@
void frameStoppedLoading(Frame&);
void frameScheduledNavigation(Frame&, double delay);
void frameClearedScheduledNavigation(Frame&);
- void willRunJavaScriptDialog(const String& message);
- void didRunJavaScriptDialog();
void applyEmulatedMedia(String&);
void didPaint(RenderObject&, const LayoutRect&);
void didLayout();
void didScroll();
void didRecalculateStyle();
- void scriptsEnabled(bool isEnabled);
// Inspector Controller API
void didCreateFrontendAndBackend(Inspector::FrontendRouter*, Inspector::BackendDispatcher*) override;
@@ -137,7 +130,6 @@
// Cross-agents API
Page& page() { return m_page; }
MainFrame& mainFrame();
- String createIdentifier();
Frame* frameForId(const String& frameId);
WEBCORE_EXPORT String frameId(Frame*);
bool hasIdForFrame(Frame*) const;
@@ -170,8 +162,6 @@
HashMap<DocumentLoader*, String> m_loaderToIdentifier;
bool m_enabled { false };
bool m_isFirstLayoutAfterOnLoad { false };
- bool m_originalScriptExecutionDisabled { false };
- bool m_ignoreScriptsEnabledNotification { false };
bool m_showPaintRects { false };
String m_emulatedMedia;
RefPtr<Inspector::InspectorObject> m_scriptsToEvaluateOnLoad;
Modified: trunk/Source/WebCore/page/Chrome.cpp (209464 => 209465)
--- trunk/Source/WebCore/page/Chrome.cpp 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebCore/page/Chrome.cpp 2016-12-07 19:31:08 UTC (rev 209465)
@@ -50,7 +50,6 @@
#include "WindowFeatures.h"
#include <runtime/VM.h>
#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
#include <wtf/SetForScope.h>
#include <wtf/Vector.h>
@@ -284,10 +283,7 @@
// otherwise cause the load to continue while we're in the middle of executing _javascript_.
PageGroupLoadDeferrer deferrer(m_page, true);
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, message);
- bool ok = m_client.runBeforeUnloadConfirmPanel(message, frame);
- InspectorInstrumentation::didRunJavaScriptDialog(cookie);
- return ok;
+ return m_client.runBeforeUnloadConfirmPanel(message, frame);
}
void Chrome::closeWindowSoon()
@@ -305,9 +301,7 @@
notifyPopupOpeningObservers();
String displayMessage = frame->displayStringModifiedByEncoding(message);
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayMessage);
m_client.runJavaScriptAlert(frame, displayMessage);
- InspectorInstrumentation::didRunJavaScriptDialog(cookie);
}
bool Chrome::runJavaScriptConfirm(Frame* frame, const String& message)
@@ -320,10 +314,7 @@
notifyPopupOpeningObservers();
String displayMessage = frame->displayStringModifiedByEncoding(message);
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayMessage);
- bool ok = m_client.runJavaScriptConfirm(frame, displayMessage);
- InspectorInstrumentation::didRunJavaScriptDialog(cookie);
- return ok;
+ return m_client.runJavaScriptConfirm(frame, displayMessage);
}
bool Chrome::runJavaScriptPrompt(Frame* frame, const String& prompt, const String& defaultValue, String& result)
@@ -336,10 +327,7 @@
notifyPopupOpeningObservers();
String displayPrompt = frame->displayStringModifiedByEncoding(prompt);
- InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJavaScriptDialog(m_page, displayPrompt);
bool ok = m_client.runJavaScriptPrompt(frame, displayPrompt, frame->displayStringModifiedByEncoding(defaultValue), result);
- InspectorInstrumentation::didRunJavaScriptDialog(cookie);
-
if (ok)
result = frame->displayStringModifiedByEncoding(result);
Modified: trunk/Source/WebCore/page/Settings.cpp (209464 => 209465)
--- trunk/Source/WebCore/page/Settings.cpp 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebCore/page/Settings.cpp 2016-12-07 19:31:08 UTC (rev 209465)
@@ -39,7 +39,6 @@
#include "FrameView.h"
#include "HTMLMediaElement.h"
#include "HistoryItem.h"
-#include "InspectorInstrumentation.h"
#include "MainFrame.h"
#include "Page.h"
#include "PageCache.h"
@@ -389,7 +388,6 @@
#if PLATFORM(IOS)
m_page->setNeedsRecalcStyleInAllFrames();
#endif
- InspectorInstrumentation::scriptsEnabled(*m_page, m_isScriptEnabled);
}
void Settings::setJavaEnabled(bool isJavaEnabled)
Modified: trunk/Source/WebInspectorUI/ChangeLog (209464 => 209465)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-12-07 19:31:08 UTC (rev 209465)
@@ -1,3 +1,29 @@
+2016-12-07 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Remove unused and mostly untested Page domain commands and events
+ https://bugs.webkit.org/show_bug.cgi?id=165507
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Protocol/PageObserver.js:
+ (WebInspector.PageObserver.prototype._javascript_DialogOpening):
+ (WebInspector.PageObserver.prototype._javascript_DialogClosed):
+ (WebInspector.PageObserver.prototype.scriptsEnabled):
+ Keep stub in case legacy backends dispatch the event to the frontend.
+
+ * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
+ * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
+ * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
+ * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
+ * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
+ * Versions/Inspector-iOS-10.0.json:
+ * Versions/Inspector-iOS-7.0.json:
+ * Versions/Inspector-iOS-8.0.json:
+ * Versions/Inspector-iOS-9.0.json:
+ * Versions/Inspector-iOS-9.3.json:
+ Remove handleJavaScriptDialog command from legacy backends because it
+ doesn't appear as if the iOS backend handled it at all.
+
2016-12-06 Alexey Proskuryakov <a...@apple.com>
Correct SDKROOT values in xcconfig files
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js (209464 => 209465)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js 2016-12-07 19:31:08 UTC (rev 209465)
@@ -338,7 +338,6 @@
InspectorBackend.registerCommand("Page.setCompositingBordersVisible", [{"name": "visible", "type": "boolean", "optional": false}], []);
InspectorBackend.registerCommand("Page.snapshotNode", [{"name": "nodeId", "type": "number", "optional": false}], ["dataURL"]);
InspectorBackend.registerCommand("Page.snapshotRect", [{"name": "x", "type": "number", "optional": false}, {"name": "y", "type": "number", "optional": false}, {"name": "width", "type": "number", "optional": false}, {"name": "height", "type": "number", "optional": false}, {"name": "coordinateSystem", "type": "string", "optional": false}], ["dataURL"]);
-InspectorBackend.registerCommand("Page.handleJavaScriptDialog", [{"name": "accept", "type": "boolean", "optional": false}, {"name": "promptText", "type": "string", "optional": true}], []);
InspectorBackend.registerCommand("Page.archive", [], ["data"]);
InspectorBackend.activateDomain("Page", "web");
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js (209464 => 209465)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js 2016-12-07 19:31:08 UTC (rev 209465)
@@ -70,7 +70,6 @@
InspectorBackend.registerCommand("Page.setEmulatedMedia", [{"name": "media", "type": "string", "optional": false}], []);
InspectorBackend.registerCommand("Page.getCompositingBordersVisible", [], ["result"]);
InspectorBackend.registerCommand("Page.setCompositingBordersVisible", [{"name": "visible", "type": "boolean", "optional": false}], []);
-InspectorBackend.registerCommand("Page.handleJavaScriptDialog", [{"name": "accept", "type": "boolean", "optional": false}, {"name": "promptText", "type": "string", "optional": true}], []);
InspectorBackend.activateDomain("Page");
// Runtime.
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js (209464 => 209465)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js 2016-12-07 19:31:08 UTC (rev 209465)
@@ -328,7 +328,6 @@
InspectorBackend.registerCommand("Page.setCompositingBordersVisible", [{"name": "visible", "type": "boolean", "optional": false}], []);
InspectorBackend.registerCommand("Page.snapshotNode", [{"name": "nodeId", "type": "number", "optional": false}], ["dataURL"]);
InspectorBackend.registerCommand("Page.snapshotRect", [{"name": "x", "type": "number", "optional": false}, {"name": "y", "type": "number", "optional": false}, {"name": "width", "type": "number", "optional": false}, {"name": "height", "type": "number", "optional": false}, {"name": "coordinateSystem", "type": "string", "optional": false}], ["dataURL"]);
-InspectorBackend.registerCommand("Page.handleJavaScriptDialog", [{"name": "accept", "type": "boolean", "optional": false}, {"name": "promptText", "type": "string", "optional": true}], []);
InspectorBackend.registerCommand("Page.archive", [], ["data"]);
InspectorBackend.activateDomain("Page", "web");
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js (209464 => 209465)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js 2016-12-07 19:31:08 UTC (rev 209465)
@@ -298,7 +298,6 @@
InspectorBackend.registerCommand("Page.setCompositingBordersVisible", [{"name": "visible", "type": "boolean", "optional": false}], []);
InspectorBackend.registerCommand("Page.snapshotNode", [{"name": "nodeId", "type": "number", "optional": false}], ["dataURL"]);
InspectorBackend.registerCommand("Page.snapshotRect", [{"name": "x", "type": "number", "optional": false}, {"name": "y", "type": "number", "optional": false}, {"name": "width", "type": "number", "optional": false}, {"name": "height", "type": "number", "optional": false}, {"name": "coordinateSystem", "type": "string", "optional": false}], ["dataURL"]);
-InspectorBackend.registerCommand("Page.handleJavaScriptDialog", [{"name": "accept", "type": "boolean", "optional": false}, {"name": "promptText", "type": "string", "optional": true}], []);
InspectorBackend.registerCommand("Page.archive", [], ["data"]);
InspectorBackend.activateDomain("Page", "web");
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js (209464 => 209465)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js 2016-12-07 19:31:08 UTC (rev 209465)
@@ -309,7 +309,6 @@
InspectorBackend.registerCommand("Page.setCompositingBordersVisible", [{"name": "visible", "type": "boolean", "optional": false}], []);
InspectorBackend.registerCommand("Page.snapshotNode", [{"name": "nodeId", "type": "number", "optional": false}], ["dataURL"]);
InspectorBackend.registerCommand("Page.snapshotRect", [{"name": "x", "type": "number", "optional": false}, {"name": "y", "type": "number", "optional": false}, {"name": "width", "type": "number", "optional": false}, {"name": "height", "type": "number", "optional": false}, {"name": "coordinateSystem", "type": "string", "optional": false}], ["dataURL"]);
-InspectorBackend.registerCommand("Page.handleJavaScriptDialog", [{"name": "accept", "type": "boolean", "optional": false}, {"name": "promptText", "type": "string", "optional": true}], []);
InspectorBackend.registerCommand("Page.archive", [], ["data"]);
InspectorBackend.activateDomain("Page", "web");
Modified: trunk/Source/WebInspectorUI/UserInterface/Protocol/PageObserver.js (209464 => 209465)
--- trunk/Source/WebInspectorUI/UserInterface/Protocol/PageObserver.js 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/UserInterface/Protocol/PageObserver.js 2016-12-07 19:31:08 UTC (rev 209465)
@@ -69,16 +69,16 @@
_javascript_DialogOpening(message)
{
- // Not handled yet.
+ // COMPATIBILITY (iOS 10): Page._javascript_DialogOpening was removed after iOS 10.
}
_javascript_DialogClosed()
{
- // Not handled yet.
+ // COMPATIBILITY (iOS 10): Page._javascript_DialogClosed was removed after iOS 10.
}
scriptsEnabled(enabled)
{
- // Not handled yet.
+ // COMPATIBILITY (iOS 10): Page.scriptsEnabled was removed after iOS 10.
}
};
Modified: trunk/Source/WebInspectorUI/Versions/Inspector-iOS-10.0.json (209464 => 209465)
--- trunk/Source/WebInspectorUI/Versions/Inspector-iOS-10.0.json 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/Versions/Inspector-iOS-10.0.json 2016-12-07 19:31:08 UTC (rev 209465)
@@ -2991,14 +2991,6 @@
]
},
{
- "name": "handleJavaScriptDialog",
- "description": "Accepts or dismisses a _javascript_ initiated dialog (alert, confirm, prompt, or onbeforeunload).",
- "parameters": [
- { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." },
- { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." }
- ]
- },
- {
"name": "archive",
"description": "Grab an archive of the page.",
"returns": [
Modified: trunk/Source/WebInspectorUI/Versions/Inspector-iOS-7.0.json (209464 => 209465)
--- trunk/Source/WebInspectorUI/Versions/Inspector-iOS-7.0.json 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/Versions/Inspector-iOS-7.0.json 2016-12-07 19:31:08 UTC (rev 209465)
@@ -270,14 +270,6 @@
"parameters": [
{ "name": "visible", "type": "boolean", "description": "True for showing compositing borders." }
]
- },
- {
- "name": "handleJavaScriptDialog",
- "description": "Accepts or dismisses a _javascript_ initiated dialog (alert, confirm, prompt, or onbeforeunload).",
- "parameters": [
- { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." },
- { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." }
- ]
}
],
"events": [
Modified: trunk/Source/WebInspectorUI/Versions/Inspector-iOS-8.0.json (209464 => 209465)
--- trunk/Source/WebInspectorUI/Versions/Inspector-iOS-8.0.json 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/Versions/Inspector-iOS-8.0.json 2016-12-07 19:31:08 UTC (rev 209465)
@@ -2859,14 +2859,6 @@
]
},
{
- "name": "handleJavaScriptDialog",
- "description": "Accepts or dismisses a _javascript_ initiated dialog (alert, confirm, prompt, or onbeforeunload).",
- "parameters": [
- { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." },
- { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." }
- ]
- },
- {
"name": "archive",
"description": "Grab an archive of the page.",
"returns": [
Modified: trunk/Source/WebInspectorUI/Versions/Inspector-iOS-9.0.json (209464 => 209465)
--- trunk/Source/WebInspectorUI/Versions/Inspector-iOS-9.0.json 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/Versions/Inspector-iOS-9.0.json 2016-12-07 19:31:08 UTC (rev 209465)
@@ -2737,14 +2737,6 @@
]
},
{
- "name": "handleJavaScriptDialog",
- "description": "Accepts or dismisses a _javascript_ initiated dialog (alert, confirm, prompt, or onbeforeunload).",
- "parameters": [
- { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." },
- { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." }
- ]
- },
- {
"name": "archive",
"description": "Grab an archive of the page.",
"returns": [
Modified: trunk/Source/WebInspectorUI/Versions/Inspector-iOS-9.3.json (209464 => 209465)
--- trunk/Source/WebInspectorUI/Versions/Inspector-iOS-9.3.json 2016-12-07 19:30:45 UTC (rev 209464)
+++ trunk/Source/WebInspectorUI/Versions/Inspector-iOS-9.3.json 2016-12-07 19:31:08 UTC (rev 209465)
@@ -2819,14 +2819,6 @@
]
},
{
- "name": "handleJavaScriptDialog",
- "description": "Accepts or dismisses a _javascript_ initiated dialog (alert, confirm, prompt, or onbeforeunload).",
- "parameters": [
- { "name": "accept", "type": "boolean", "description": "Whether to accept or dismiss the dialog." },
- { "name": "promptText", "type": "string", "optional": true, "description": "The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog." }
- ]
- },
- {
"name": "archive",
"description": "Grab an archive of the page.",
"returns": [