Bug 34364 - REGRESSION(canvas editor): URLs are not syntax-higlighted as links in source view
Summary: REGRESSION(canvas editor): URLs are not syntax-higlighted as links in source ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2010-01-29 18:34 PST by Mark Rowe (bdash)
Modified: 2010-02-02 06:00 PST (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed change. (55.98 KB, patch)
2010-02-01 14:04 PST, Pavel Feldman
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Rowe (bdash) 2010-01-29 18:34:57 PST
In r54084 I've noticed that URLs are no longer syntax-highlighted as links in the source view of the Resources pane.  This works correctly in a build of WebKit from earlier in the week.
Comment 1 Mark Rowe (bdash) 2010-01-29 18:44:40 PST
<rdar://problem/7594380>
Comment 2 Pavel Feldman 2010-02-01 14:04:25 PST
Created attachment 47869 [details]
[PATCH] Proposed change.
Comment 3 Timothy Hatcher 2010-02-01 14:08:22 PST
Comment on attachment 47869 [details]
[PATCH] Proposed change.

> +        if (content.length > 1 && (quote === "\"" ||   quote === "'"))
> +            content = content.substring(1, content.length - 1);

Shouldn't this be content.length >= 2 or content.length > 2?
Comment 4 Pavel Feldman 2010-02-02 06:00:40 PST
(In reply to comment #3)
> (From update of attachment 47869 [details])
> > +        if (content.length > 1 && (quote === "\"" ||   quote === "'"))
> > +            content = content.substring(1, content.length - 1);
> 
> Shouldn't this be content.length >= 2 or content.length > 2?

Yeah, you are probably right - I first thought that empty string is a valid case, but it really makes no sense to linkify it. I'll fix.

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/ElementsTreeOutline.js
	M	WebCore/inspector/front-end/NativeTextViewer.js
	M	WebCore/inspector/front-end/SourceFrame.js
	M	WebCore/inspector/front-end/SourceHTMLTokenizer.js
	M	WebCore/inspector/front-end/SourceHTMLTokenizer.re2js
	M	WebCore/inspector/front-end/SourceView.js
	M	WebCore/inspector/front-end/TextEditorHighlighter.js
	M	WebCore/inspector/front-end/inspector.css
	M	WebCore/inspector/front-end/inspector.js
	M	WebCore/inspector/front-end/inspectorSyntaxHighlight.css
Committed r54231