Bug 23445 - Copying certain hidden text causes a crash
Summary: Copying certain hidden text causes a crash
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Darin Adler
URL: http://www.reddit.com/r/apple/comment...
Keywords: InRadar, NeedsReduction
: 24414 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-20 20:33 PST by Tom Robinson
Modified: 2009-03-29 19:21 PDT (History)
2 users (show)

See Also:


Attachments
patch (4.86 KB, patch)
2009-03-29 18:24 PDT, Darin Adler
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Robinson 2009-01-20 20:33:45 PST
1) Login to reddit.com and visit a comments page
2) Select the text of a comment
3) Click the "[-]" widget for the selected comment to hide it
4) Try to copy the hidden text via keyboard shortcut or menu

Note this only works if you're logged into reddit.com
Comment 1 Mark Rowe (bdash) 2009-01-20 20:34:40 PST
<rdar://problem/6512520>
Comment 2 Mark Rowe (bdash) 2009-03-05 19:15:13 PST
*** Bug 24414 has been marked as a duplicate of this bug. ***
Comment 3 Darin Adler 2009-03-29 17:21:11 PDT
Darn, I wanted to work on this bug, but I don't have a reddit.com account. I guess I'll have to make one.
Comment 4 Darin Adler 2009-03-29 17:39:02 PDT
There are two aspects to this bug:

    1) When the end points of the range are no longer rendered due to display: none, it would be good to update the selection so it doesn't include the invisible stuff.

    2) When we actually run the createMarkup algorithm it would be best not to crash.

I have a fix for (2) done. Next I'll make a regression test. Then I'll fix (1) as well.
Comment 5 Darin Adler 2009-03-29 18:24:49 PDT
Created attachment 29052 [details]
patch
Comment 6 Darin Adler 2009-03-29 19:21:20 PDT
(In reply to comment #4)
>     1) When the end points of the range are no longer rendered due to display:
> none, it would be good to update the selection so it doesn't include the
> invisible stuff.

I decided not to fix this at this time. I'm not sure what behavior we want for this.
Comment 7 Darin Adler 2009-03-29 19:21:45 PDT
http://trac.webkit.org/changeset/42096