Bug 29166 - SVG text selection doesn't work with hyperlinked text
Summary: SVG text selection doesn't work with hyperlinked text
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P4 Trivial
Assignee: Rob Buis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-10 19:46 PDT by Robin Qiu
Modified: 2012-08-04 15:32 PDT (History)
4 users (show)

See Also:


Attachments
The expected selection of a hyperlinked text. (18.49 KB, image/png)
2009-09-10 19:48 PDT, Robin Qiu
no flags Details
Patch (6.25 KB, patch)
2012-06-09 07:59 PDT, Rob Buis
eric: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Qiu 2009-09-10 19:46:07 PDT
Test case: LayoutTests\svg\W3C-SVG-1.1\interact-order-03-b.svg
Could not select heyperlinked text. The expected selection result is demoed in attachment.
Comment 1 Robin Qiu 2009-09-10 19:48:29 PDT
Created attachment 39404 [details]
The expected selection of a hyperlinked text.
Comment 2 Rob Buis 2012-06-09 07:49:34 PDT
It is possible these days to select the text in the hyperlink these days, so this bug seems fixed now. Can anybody confirm?

Note that HTMLAnchorElement::canStartSelection has this FIXME:

// FIXME: We probably want this same behavior in SVGAElement too

The behaviour is to not allow the text in the hyperlink to start a selection, but still allow selection of the text in the hyperlink when the selection started from outside the hyperlink. Do we want this?

For now I'll make use of this bug to post a refactor patch. If we want to add above behaviour that would be easy to add.
Comment 3 Rob Buis 2012-06-09 07:59:26 PDT
Created attachment 146703 [details]
Patch
Comment 4 Eric Seidel (no email) 2012-08-01 16:00:56 PDT
Comment on attachment 146703 [details]
Patch

LGTM.
Comment 5 WebKit Review Bot 2012-08-01 16:10:34 PDT
Comment on attachment 146703 [details]
Patch

Rejecting attachment 146703 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
et -4 lines).
patching file Source/WebCore/html/HTMLAnchorElement.cpp
Hunk #1 FAILED at 569.
1 out of 1 hunk FAILED -- saving rejects to file Source/WebCore/html/HTMLAnchorElement.cpp.rej
patching file Source/WebCore/html/HTMLAnchorElement.h
Hunk #1 succeeded at 157 (offset 2 lines).
patching file Source/WebCore/svg/SVGAElement.cpp

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Eric Seidel']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue/

Full output: http://queues.webkit.org/results/13403765
Comment 6 Rob Buis 2012-08-01 17:37:52 PDT
(In reply to comment #5)
> (From update of attachment 146703 [details])
> Rejecting attachment 146703 [details] from commit-queue.
> 
> Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2
> 
> Last 500 characters of output:
> et -4 lines).
> patching file Source/WebCore/html/HTMLAnchorElement.cpp
> Hunk #1 FAILED at 569.
> 1 out of 1 hunk FAILED -- saving rejects to file Source/WebCore/html/HTMLAnchorElement.cpp.rej
> patching file Source/WebCore/html/HTMLAnchorElement.h
> Hunk #1 succeeded at 157 (offset 2 lines).
> patching file Source/WebCore/svg/SVGAElement.cpp
> 
> Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Eric Seidel']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue/
> 
> Full output: http://queues.webkit.org/results/13403765

That was to be expected :) I can land his and the other SVG patch tomorrow.
Cheers,

Rob.
Comment 7 Rob Buis 2012-08-04 15:32:27 PDT
Patch landed in r124538. Closing since the original problem is fixed too since a while.