Bug 34935 - Web Inspector: REGRESSION: long URLs can cause a horizontal scrollbar in source view
Summary: Web Inspector: REGRESSION: long URLs can cause a horizontal scrollbar in sour...
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: http://daringfireball.net
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-15 01:43 PST by Timothy Hatcher
Modified: 2010-02-16 05:19 PST (History)
7 users (show)

See Also:


Attachments
Bug (177.47 KB, image/png)
2010-02-15 01:43 PST, Timothy Hatcher
no flags Details
[PATCH] Proposed change. (4.26 KB, patch)
2010-02-15 12:16 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 Timothy Hatcher 2010-02-15 01:43:52 PST
Created attachment 48743 [details]
Bug

A long URL can cause a horizontal scrollbar. We need to break URLs and long words more aggressively (by character).

You can see this on Daring Fireball's main resource with a small Inspector window. See screenshot.
Comment 1 Patrick Mueller 2010-02-15 04:00:13 PST
I thought we were going to move towards not wrapping lines to begin with.  In which case horizontal scrollbars are not a bad thing.  In fact, from the screen shot, it looks like "not wrapping" is now on, somehow.  Yay!
Comment 2 Timothy Hatcher 2010-02-15 04:47:15 PST
Right now it is a mix, wrapping to the longest line.

We need to pick fulll wrap or no wrap.
Comment 3 Pavel Feldman 2010-02-15 09:49:05 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	LayoutTests/ChangeLog
	A	LayoutTests/inspector/syntax-highlight-html-expected.txt
	A	LayoutTests/inspector/syntax-highlight-html.html
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/SourceHTMLTokenizer.js
	M	WebCore/inspector/front-end/SourceHTMLTokenizer.re2js
Committed r54780
Comment 4 Pavel Feldman 2010-02-15 12:11:30 PST
Closed wrong bug...
Comment 5 Pavel Feldman 2010-02-15 12:13:55 PST
I'd like to disable line wrapping instead of fixing this one. It just looks easier than making links wrapping work. Yes, it'll make line numbers potentially off the screen, but we can fix it later.
Comment 6 Pavel Feldman 2010-02-15 12:16:46 PST
Created attachment 48767 [details]
[PATCH] Proposed change.
Comment 7 Timothy Hatcher 2010-02-15 12:46:12 PST
Comment on attachment 48767 [details]
[PATCH] Proposed change.

Should it be white-space: no-wrap;?
Comment 8 Pavel Feldman 2010-02-15 22:36:30 PST
(In reply to comment #7)
> (From update of attachment 48767 [details])
> Should it be white-space: no-wrap;?

Sorry, this is out of context. Do you mean main editor element's style? I thought it should be pre. Or do you mean line's one? It does not need to be at all I guess. (Why not r+)?
Comment 9 Timothy Hatcher 2010-02-16 00:35:03 PST
Comment on attachment 48767 [details]
[PATCH] Proposed change.

white-space: pre will cause \n to make a newline. white-space: no-wrap will no allow any new lines.

So I think you want no-wrap in both places you use pre. Try it out.
Comment 10 Pavel Feldman 2010-02-16 02:20:38 PST
(In reply to comment #9)
> (From update of attachment 48767 [details])
> white-space: pre will cause \n to make a newline. white-space: no-wrap will no
> allow any new lines.
> 
> So I think you want no-wrap in both places you use pre. Try it out.

It collapses whitespace...
Comment 11 Pavel Feldman 2010-02-16 02:26:12 PST
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/TextViewer.js
	M	WebCore/inspector/front-end/textViewer.css
	M	WebCore/inspector/front-end/utilities.js
Committed r54813
Comment 12 Timothy Hatcher 2010-02-16 05:19:55 PST
Good point… forgot about that.