Bug 35104 - Web Inspector: REGRESSION (Safari 4.0.5-TOT): Copying from the Content tab in Resources includes line numbers
Summary: Web Inspector: REGRESSION (Safari 4.0.5-TOT): Copying from the Content tab in...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Pavel Feldman
Keywords: InRadar, Regression
Depends on:
Reported: 2010-02-18 09:26 PST by Anthony Ricaud
Modified: 2010-03-30 10:43 PDT (History)
9 users (show)

See Also:

[PATCH] Proposed change. (1.74 KB, patch)
2010-03-30 10:11 PDT, 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 Anthony Ricaud 2010-02-18 09:26:52 PST
If you copy the content of a resource in the Resources panel, you'll get the line numbers with it and that's not useful.
Comment 1 Timothy Hatcher 2010-02-18 09:37:40 PST
Not only does it include the numbers, but any non-visible 50 line chunk shows an empty 49 rows then all the content is on the 50th row.
Comment 2 Timothy Hatcher 2010-02-18 09:38:48 PST
We can use css counters to generate the content. Generated content is not copied.
Comment 3 mitz 2010-03-29 20:36:46 PDT
Comment 4 Pavel Feldman 2010-03-29 22:57:22 PDT
CSS did not work due to bucketing. I'll just introduce a separate table for line numbers and use absolute positioning for both: line and content tables. We are only using text viewer in absolute positioning since there are headers / content tabs in resources panel anyways.
Comment 5 Pavel Feldman 2010-03-30 10:11:27 PDT
Created attachment 52050 [details]
[PATCH] Proposed change.

It turned out to be more problematic than I thought:
- I can't make a separate column for line numbers since row height might be defined by the messages in the right column
- I can't make text transparent to the clipboard

So I am re-using model's ability to copy its content...
Comment 6 Pavel Feldman 2010-03-30 10:43:19 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/TextViewer.js
Committed r56799