Fix Bug 19204: Inspector should highlight source lines when following links to them
<https://bugs.webkit.org/show_bug.cgi?id=19204>
Reviewed by Tim Hatcher.
Test: manual-tests/inspector/highlight-source-line.html
* manual-tests/inspector/highlight-source-line.html: Added.
* page/inspector/ResourcesPanel.js:
(WebInspector.ResourcesPanel.prototype.showResource): Call
highlightLine on the view if that function exists.
* page/inspector/SourceFrame.js:
(WebInspector.SourceFrame.prototype.highlightLine): Added. Adds the
webkit-highlighted-line class to the relevant line, then removes it
after a short delay.
(WebInspector.SourceFrame.prototype._loaded): Added styles for the
highlighted line(s).
* page/inspector/SourceView.js:
(WebInspector.SourceView.prototype.highlightLine): Added. Calls
through to the SourceFrame.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34055 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/manual-tests/inspector/highlight-source-line.html b/WebCore/manual-tests/inspector/highlight-source-line.html
new file mode 100644
index 0000000..2520485
--- /dev/null
+++ b/WebCore/manual-tests/inspector/highlight-source-line.html
@@ -0,0 +1,4 @@
+<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=19204">Bug 19204: Inspector should highlight source lines when following links to them</a>.</p>
+<p>To test, open the Inspector and reload this page. Then open the Inspector's Console and click the link for the markup error. You should see the line containing the error briefly highlighted in the source view.</p>
+
+<p>This line contains a markup error</i>.</p>