Bug 12441 - SVG text selection should restrict auto-select on double and triple click
Summary: SVG text selection should restrict auto-select on double and triple click
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Rob Buis
URL:
Keywords:
: 11684 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-27 07:07 PST by Rob Buis
Modified: 2010-07-02 00:04 PDT (History)
2 users (show)

See Also:


Attachments
First attempt (224.16 KB, patch)
2007-01-27 08:53 PST, Rob Buis
darin: review-
Details | Formatted Diff | Diff
without SVG_SUPPORT usage (225.63 KB, patch)
2007-01-29 02:23 PST, Rob Buis
darin: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2007-01-27 07:07:18 PST
The current way of auto-selecting when double or triple clicking svg elements makes no sense for
objects other than pure text.
Comment 1 Rob Buis 2007-01-27 08:53:16 PST
Created attachment 12711 [details]
First attempt

This patch should do the trick. I played around with -webkit-user-select in svg.css, but that doesnt seem to do what we want here.
Cheers,

Rob.
Comment 2 Rob Buis 2007-01-27 15:14:13 PST
*** Bug 11684 has been marked as a duplicate of this bug. ***
Comment 3 Darin Adler 2007-01-28 18:07:52 PST
Comment on attachment 12711 [details]
First attempt

I'd like this to be done without adding ifdef SVG_SUPPORT to these functions, even if that means adding a new virtual function to RenderObject.
Comment 4 Rob Buis 2007-01-29 02:23:24 PST
Created attachment 12735 [details]
without SVG_SUPPORT usage

This patches uses a new virtual method to check whether the render object can be part of a double or triple-click selection.
Cheers,

Rob.
Comment 5 Darin Adler 2007-01-29 09:04:06 PST
Comment on attachment 12735 [details]
without SVG_SUPPORT usage

Looks great!

Two problems:

1) the change to EventHandler.cpp seems to be missing from this patch although it's mentioned in the change log

2) the declaration of canMultiSelect in RenderSVGImage seems to be indented incorrectly
Comment 6 Darin Adler 2007-01-29 09:05:23 PST
I also suggest making the comment say just "object" instead of "render object".

Finally, this *could* be done by introducing a special value for -webkit-user-select that means "single click only". I'm not sure that would be better, but it might be worth considering.
Comment 7 Eric Seidel (no email) 2007-12-27 02:14:59 PST
Looks like this mostly-done patch has been forgotten.
Comment 8 Nikolas Zimmermann 2010-07-01 05:53:32 PDT
Rob, is this still valid?
Comment 9 Rob Buis 2010-07-01 06:40:19 PDT
Hello Niko,

(In reply to comment #8)
> Rob, is this still valid?

I forgot the original behaviour, but right now selection behaves the same for svg text as
for html text, which I suppose can be explained by your recent text patch(es). So I think this
can be closed.
Cheers,

Rob.
Comment 10 Rob Buis 2010-07-02 00:04:17 PDT
Likely fixed by WldFox recent text work.