Title: [200334] trunk/Source/WebInspectorUI
- Revision
- 200334
- Author
- [email protected]
- Date
- 2016-05-02 12:59:49 -0700 (Mon, 02 May 2016)
Log Message
Uncaught Exception: TypeError: null is not an object (evaluating 'sourceCodeLocation.formattedLineNumber')
https://bugs.webkit.org/show_bug.cgi?id=157239
<rdar://problem/26030791>
Patch by Joseph Pecoraro <[email protected]> on 2016-05-02
Reviewed by Timothy Hatcher.
* UserInterface/Controllers/IssueManager.js:
(WebInspector.IssueManager.issueMatchSourceCode):
Require a sourceCodeLocation for Script errors.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._addIssue):
Be safe against a missing sourceCodeLocation.
* UserInterface/Views/SourceCodeTextEditor.css:
(.source-code.text-editor > .CodeMirror .issue-widget.inline > .arrow):
(@media (-webkit-min-device-pixel-ratio: 2)):
Adjust the style, on non-Retina the inline message arrow would sometimes
be detached from the warning message.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (200333 => 200334)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-05-02 19:52:28 UTC (rev 200333)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-05-02 19:59:49 UTC (rev 200334)
@@ -1,3 +1,25 @@
+2016-05-02 Joseph Pecoraro <[email protected]>
+
+ Uncaught Exception: TypeError: null is not an object (evaluating 'sourceCodeLocation.formattedLineNumber')
+ https://bugs.webkit.org/show_bug.cgi?id=157239
+ <rdar://problem/26030791>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Controllers/IssueManager.js:
+ (WebInspector.IssueManager.issueMatchSourceCode):
+ Require a sourceCodeLocation for Script errors.
+
+ * UserInterface/Views/SourceCodeTextEditor.js:
+ (WebInspector.SourceCodeTextEditor.prototype._addIssue):
+ Be safe against a missing sourceCodeLocation.
+
+ * UserInterface/Views/SourceCodeTextEditor.css:
+ (.source-code.text-editor > .CodeMirror .issue-widget.inline > .arrow):
+ (@media (-webkit-min-device-pixel-ratio: 2)):
+ Adjust the style, on non-Retina the inline message arrow would sometimes
+ be detached from the warning message.
+
2016-05-02 Timothy Hatcher <[email protected]>
Web Inspector: Zooming of docked Web Inspector affects the webpage, but reset to 0 does not
Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/IssueManager.js (200333 => 200334)
--- trunk/Source/WebInspectorUI/UserInterface/Controllers/IssueManager.js 2016-05-02 19:52:28 UTC (rev 200333)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/IssueManager.js 2016-05-02 19:59:49 UTC (rev 200334)
@@ -42,7 +42,7 @@
if (sourceCode instanceof WebInspector.Resource)
return issue.url ="" sourceCode.url && (!issue.sourceCodeLocation || issue.sourceCodeLocation.sourceCode === sourceCode);
if (sourceCode instanceof WebInspector.Script)
- return (issue.sourceCodeLocation && issue.sourceCodeLocation.sourceCode === sourceCode) || (!issue.sourceCodeLocation && issue.url ="" sourceCode.url);
+ return issue.sourceCodeLocation && issue.sourceCodeLocation.sourceCode === sourceCode;
return false;
}
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.css (200333 => 200334)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.css 2016-05-02 19:52:28 UTC (rev 200333)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.css 2016-05-02 19:59:49 UTC (rev 200334)
@@ -57,7 +57,7 @@
.source-code.text-editor > .CodeMirror .issue-widget.inline > .arrow {
position: absolute;
- left: -5.5px;
+ left: -5px;
display: block;
top: 0px;
@@ -69,6 +69,12 @@
border-right: 5.5px solid transparent;
}
+@media (-webkit-min-device-pixel-ratio: 2) {
+ .source-code.text-editor > .CodeMirror .issue-widget.inline > .arrow {
+ left: -5.5px;
+ }
+}
+
.source-code.text-editor > .CodeMirror .issue-widget > .icon {
height: 9px;
width: 9px;
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js (200333 => 200334)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js 2016-05-02 19:52:28 UTC (rev 200333)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js 2016-05-02 19:59:49 UTC (rev 200334)
@@ -804,6 +804,10 @@
_addIssue(issue)
{
var sourceCodeLocation = issue.sourceCodeLocation;
+ console.assert(sourceCodeLocation, "Expected source code location to place issue.");
+ if (!sourceCodeLocation)
+ return;
+
var lineNumber = sourceCodeLocation.formattedLineNumber;
var lineNumberIssues = this._issuesLineNumberMap.get(lineNumber);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes