WebKit Bugzilla
Attachment 373590 Details for
Bug 198029
: Web Inspector: Display "Resource has no content" for about:blank iframes instead of an error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
patch.txt (text/plain), 2.46 KB, created by
Nikita Vasilyev
on 2019-07-06 18:50:54 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Nikita Vasilyev
Created:
2019-07-06 18:50:54 PDT
Size:
2.46 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index bf69d8096db..deb65b81f93 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,19 @@ >+2019-07-06 Nikita Vasilyev <nvasilyev@apple.com> >+ >+ Web Inspector: Display "Resource has no content" for about:blank iframes instead of an error >+ https://bugs.webkit.org/show_bug.cgi?id=198029 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Display "Resource has no content" in the middle of the content view when selecting >+ "about:blank" resources. Previoulsly, we showed a misleading "An error occurred trying >+ to load the resource" error message. >+ >+ * UserInterface/Models/Resource.js: >+ (WI.Resource.prototype.requestContentFromBackend): >+ * UserInterface/Views/ResourceContentView.js: >+ (WI.ResourceContentView.prototype._contentAvailable): >+ > 2019-06-21 Matt Baker <mattbaker@apple.com> > > Web Inspector: remove unused DataGrid style .force-focus >diff --git a/Source/WebInspectorUI/UserInterface/Models/Resource.js b/Source/WebInspectorUI/UserInterface/Models/Resource.js >index e931c127481..7b079b629f3 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/Resource.js >+++ b/Source/WebInspectorUI/UserInterface/Models/Resource.js >@@ -819,6 +819,9 @@ WI.Resource = class Resource extends WI.SourceCode > > requestContentFromBackend() > { >+ if (this._url === "about:blank") >+ return Promise.resolve({content: ""}); >+ > // If we have the requestIdentifier we can get the actual response for this specific resource. > // Otherwise the content will be cached resource data, which might not exist anymore. > if (this._requestIdentifier) >diff --git a/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js b/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js >index ef4867a3f53..85dcf65b14d 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js >@@ -135,6 +135,11 @@ WI.ResourceContentView = class ResourceContentView extends WI.ContentView > return; > } > >+ if (!parameters.content) { >+ this.showGenericNoContentMessage(); >+ return; >+ } >+ > // Content is ready to show, call the public method now. > console.assert(!this._hasContent()); > console.assert(parameters.sourceCode === this._resource);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
hi
:
review-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198029
:
370230
|
370231
|
370232
|
372981
|
372982
|
372985
|
372989
|
373590
|
373900
|
374642
|
374709