Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (250242 => 250243)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-09-23 18:00:22 UTC (rev 250242)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-09-23 18:06:18 UTC (rev 250243)
@@ -1,3 +1,14 @@
+2019-09-23 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Improve the Uncaught Exception View file a bug link
+ https://bugs.webkit.org/show_bug.cgi?id=201717
+
+ Reviewed by Devin Rousso.
+
+ * UserInterface/Debug/UncaughtExceptionReporter.js:
+ Allow the link to be clicked. Use openInNewTab on click to also
+ bring the new tab to the foreground. Also update the content.
+
2019-09-20 Devin Rousso <drou...@apple.com>
Web Inspector: HTML Formatter - better indentation/newline handling for self closing tags
Modified: trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js (250242 => 250243)
--- trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js 2019-09-23 18:00:22 UTC (rev 250242)
+++ trunk/Source/WebInspectorUI/UserInterface/Debug/UncaughtExceptionReporter.js 2019-09-23 18:06:18 UTC (rev 250243)
@@ -243,24 +243,26 @@
let formattedErrorDetails = window.__uncaughtExceptions.map((entry) => formattedEntry(entry));
let detailsForBugReport = formattedErrorDetails.map((line) => ` - ${line}`).join("\n");
- topLevelItems.push("");
- topLevelItems.push("Uncaught Exceptions:");
- topLevelItems.push(detailsForBugReport);
- let encodedBugDescription = encodeURIComponent(`-------
-${topLevelItems.join("\n")}
--------
+ let encodedBugDescription = encodeURIComponent(`Uncaught Exception in Web Inspector.
-* STEPS TO REPRODUCE
+Steps to Reproduce:
1. What were you doing? Include setup or other preparations to reproduce the exception.
2. Include explicit, accurate, and minimal steps taken. Do not include extraneous or irrelevant steps.
+3. What did you expect to have happen? What actually happened?
-* NOTES
-Document any additional information that might be useful in resolving the problem, such as screen shots or other included attachments.
+Uncaught Exceptions:
+-----------------------
+${detailsForBugReport}
+-----------------------
+
+Notes:
+${topLevelItems.join("\n")}
`);
+
let encodedBugTitle = encodeURIComponent(`Uncaught Exception: ${firstException.message}`);
let encodedInspectedURL = encodeURIComponent(inspectedPageURL || "http://");
- let prefilledBugReportLink = `https://bugs.webkit.org/enter_bug.cgi?alias=&assigned_to=webkit-unassigned%40lists.webkit.org&attach_text=&blocked=&bug_file_loc=${encodedInspectedURL}&bug_severity=Normal&bug_status=NEW&comment=${encodedBugDescription}&component=Web%20Inspector&contenttypeentry=&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&data=""
+ let prefilledBugReportLink = `https://bugs.webkit.org/enter_bug.cgi?alias=&assigned_to=webkit-unassigned%40lists.webkit.org&attach_text=&blocked=&bug_file_loc=${encodedInspectedURL}&bug_severity=Normal&bug_status=NEW&comment=${encodedBugDescription}&component=Web%20Inspector&contenttypeentry=&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&data=""
let detailsForHTML = formattedErrorDetails.map((line) => `<li>${insertWordBreakCharacters(line)}</li>`).join("\n");
let dismissOptionHTML = !loadCompleted ? "" : `<dt>A frivolous exception will not stop me!</dt>
@@ -278,11 +280,9 @@
<dd>Usually, this is caused by a syntax error while modifying the Web Inspector
UI, or running an updated frontend with out-of-date WebKit build.</dt>
<dt>I didn't do anything...?</dt>
- <dd>If you don't think you caused this error to happen,
- <a href="" target="_blank">click to file a pre-populated
- bug with this information</a>. It is possible that someone else broke it by accident.</dd>
+ <dd><a href="" id="uncaught-exception-bug-report-link" class="bypass-event-blocking">Click to file a bug</a> as this is likely a Web Inspector bug.</dd>
<dt>Oops, can I try again?</dt>
- <dd><a href="" to reload the Inspector</a>
+ <dd><a href="" class="bypass-event-blocking">Click to reload the Inspector</a>
again after making local changes.</dd>
${dismissOptionHTML}
</dl>
@@ -295,6 +295,12 @@
sheetElement.addEventListener("click", handleLinkClick, true);
document.body.appendChild(sheetElement);
+
+ document.getElementById("uncaught-exception-bug-report-link").addEventListener("click", (event) => {
+ InspectorFrontendHost.openInNewTab(prefilledBugReportLink);
+ event.stopImmediatePropagation();
+ event.preventDefault();
+ });
}
window.addEventListener("error", handleUncaughtException);
Modified: trunk/Source/WebKit/ChangeLog (250242 => 250243)
--- trunk/Source/WebKit/ChangeLog 2019-09-23 18:00:22 UTC (rev 250242)
+++ trunk/Source/WebKit/ChangeLog 2019-09-23 18:06:18 UTC (rev 250243)
@@ -1,3 +1,20 @@
+2019-09-23 Joseph Pecoraro <pecor...@apple.com>
+
+ Web Inspector: Improve the Uncaught Exception View file a bug link
+ https://bugs.webkit.org/show_bug.cgi?id=201717
+
+ Reviewed by Devin Rousso.
+
+ * UIProcess/WebInspectorProxy.cpp:
+ (WebKit::WebInspectorProxy::bringInspectedPageToFront):
+ * UIProcess/WebInspectorProxy.h:
+ * UIProcess/WebInspectorProxy.messages.in:
+ Provide a way to bring the inspected page to the foreground.
+
+ * WebProcess/WebPage/WebInspectorUI.cpp:
+ (WebKit::WebInspectorUI::openInNewTab):
+ Use it when opening a new tab beside the inspected page.
+
2019-09-23 Brent Fulgham <bfulg...@apple.com>
Unreviewed build fix after r250169 and r250236.
Modified: trunk/Source/WebKit/UIProcess/WebInspectorProxy.cpp (250242 => 250243)
--- trunk/Source/WebKit/UIProcess/WebInspectorProxy.cpp 2019-09-23 18:00:22 UTC (rev 250242)
+++ trunk/Source/WebKit/UIProcess/WebInspectorProxy.cpp 2019-09-23 18:06:18 UTC (rev 250243)
@@ -538,6 +538,11 @@
open();
}
+void WebInspectorProxy::bringInspectedPageToFront()
+{
+ platformBringInspectedPageToFront();
+}
+
void WebInspectorProxy::attachAvailabilityChanged(bool available)
{
bool previousCanAttach = m_canAttach;
Modified: trunk/Source/WebKit/UIProcess/WebInspectorProxy.h (250242 => 250243)
--- trunk/Source/WebKit/UIProcess/WebInspectorProxy.h 2019-09-23 18:00:22 UTC (rev 250242)
+++ trunk/Source/WebKit/UIProcess/WebInspectorProxy.h 2019-09-23 18:06:18 UTC (rev 250243)
@@ -222,6 +222,7 @@
void frontendLoaded();
void didClose();
void bringToFront();
+ void bringInspectedPageToFront();
void attachAvailabilityChanged(bool);
void inspectedURLChanged(const String&);
void showCertificate(const WebCore::CertificateInfo&);
Modified: trunk/Source/WebKit/UIProcess/WebInspectorProxy.messages.in (250242 => 250243)
--- trunk/Source/WebKit/UIProcess/WebInspectorProxy.messages.in 2019-09-23 18:00:22 UTC (rev 250242)
+++ trunk/Source/WebKit/UIProcess/WebInspectorProxy.messages.in 2019-09-23 18:06:18 UTC (rev 250243)
@@ -29,6 +29,7 @@
FrontendLoaded()
DidClose()
BringToFront()
+ BringInspectedPageToFront()
Reopen()
ResetState()
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp (250242 => 250243)
--- trunk/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp 2019-09-23 18:00:22 UTC (rev 250242)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebInspectorUI.cpp 2019-09-23 18:06:18 UTC (rev 250243)
@@ -263,8 +263,10 @@
void WebInspectorUI::openInNewTab(const String& url)
{
- if (m_backendConnection)
+ if (m_backendConnection) {
m_backendConnection->send(Messages::WebInspector::OpenInNewTab(url), 0);
+ WebProcess::singleton().parentProcessConnection()->send(Messages::WebInspectorProxy::BringInspectedPageToFront(), m_inspectedPageIdentifier);
+ }
}
void WebInspectorUI::save(const WTF::String& filename, const WTF::String& content, bool base64Encoded, bool forceSaveAs)