WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
30234
Win: Double clicking words in selects adjacent newlines
https://bugs.webkit.org/show_bug.cgi?id=30234
Summary
Win: Double clicking words in selects adjacent newlines
Erik Arvidsson
Reported
2009-10-08 14:21:25 PDT
From Chromium bug,
http://crbug.com/12679
Double clicking the last word on a line also selects the following adjacent new lines. This happens on Windows which has isSelectTrailingWhitespaceEnabled set to true. Mac and Linux returns false for that. This cause us to call appendTrailingWhitespace which incorrectly appends newlines.
Attachments
Fixes issue where doubleclicking a word could select following adjacent newlines.
(12.12 KB, patch)
2009-10-08 15:23 PDT
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Remove isSpace and check for newline in appendTrailingWhitespace
(11.47 KB, patch)
2009-10-08 17:32 PDT
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Fix ChangeLogs
(11.36 KB, patch)
2009-10-08 17:41 PDT
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Move layout tests to non platform dirs.
(14.11 KB, patch)
2009-10-19 14:30 PDT
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Updated the ChangeLog with more description
(18.25 KB, patch)
2009-12-16 17:11 PST
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Updated the ChangeLog with more description as well as removed some whitespace changes
(16.81 KB, patch)
2009-12-16 17:17 PST
,
Erik Arvidsson
mjs
: review-
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Erik Arvidsson
Comment 1
2009-10-08 15:23:57 PDT
Created
attachment 40915
[details]
Fixes issue where doubleclicking a word could select following adjacent newlines.
https://bugs.webkit.org/show_bug.cgi?id=30234
--- 12 files changed, 246 insertions(+), 1 deletions(-)
Darin Adler
Comment 2
2009-10-08 16:34:55 PDT
Comment on
attachment 40915
[details]
Fixes issue where doubleclicking a word could select following adjacent newlines. I'm not so happy with this function being named isSpace(). The <ctype.h> function named isspace() returns true for newlines, and having such a similarly-named function with different behavior seems wrong. So if you do want to add a function I think it needs a different name. It's also worth noting that the characters coming out of the CharacterIterator will not be '\r' characters under any circumstance. I think for this patch it would be better to just add a special case for '\n' in the VisibleSelection code rather than adding the new function. This otherwise seems fine.
Erik Arvidsson
Comment 3
2009-10-08 16:48:25 PDT
Thanks for the quick review. I'll remove isSpace and just handle '\n' in VisibleSelection as you suggested.
Erik Arvidsson
Comment 4
2009-10-08 17:32:35 PDT
Created
attachment 40920
[details]
Remove isSpace and check for newline in appendTrailingWhitespace
https://bugs.webkit.org/show_bug.cgi?id=30234
--- 11 files changed, 242 insertions(+), 1 deletions(-)
Erik Arvidsson
Comment 5
2009-10-08 17:41:16 PDT
Created
attachment 40921
[details]
Fix ChangeLogs
https://bugs.webkit.org/show_bug.cgi?id=30234
--- 11 files changed, 238 insertions(+), 1 deletions(-)
Erik Arvidsson
Comment 6
2009-10-13 10:08:07 PDT
Darin, can you take another look?
Adam Barth
Comment 7
2009-10-14 23:31:30 PDT
Comment on
attachment 40921
[details]
Fix ChangeLogs R+ given that you've addressed Darin's comment from
Comment #2
and he said the rest looked good.
WebKit Commit Bot
Comment 8
2009-10-19 00:00:06 PDT
Comment on
attachment 40921
[details]
Fix ChangeLogs Clearing flags on attachment: 40921 Committed
r49767
: <
http://trac.webkit.org/changeset/49767
>
WebKit Commit Bot
Comment 9
2009-10-19 00:00:11 PDT
All reviewed patches have been landed. Closing bug.
Brian Weinstein
Comment 10
2009-10-19 11:15:07 PDT
The test for this inside platform/win is not passing on the bots:
http://build.webkit.org/results/Windows%20Release%20(Tests)/r49789%20(5277)/platform/win/editing/selection/doubleclick-should-not-expand-across-lines-pretty-diff.html
Re-opening the bug and adding this test to the Windows Skipped List.
Erik Arvidsson
Comment 11
2009-10-19 11:45:42 PDT
Sorry about that. It seems like DRT is not platform specific and uses the Mac setting for Windows. I'll need to update DRT to do the right thing on Windows.
Erik Arvidsson
Comment 12
2009-10-19 12:43:31 PDT
I think I misunderstood how DRT was supposed to work. I'm going to move the test out of platform since DRT behaves the same on all platforms. We'll just have to rebaseline our chromium layout tests instead.
Erik Arvidsson
Comment 13
2009-10-19 14:30:04 PDT
Created
attachment 41452
[details]
Move layout tests to non platform dirs.
Eric Seidel (no email)
Comment 14
2009-10-19 14:35:45 PDT
This seems like a strange quirk to Apple's window port. I think other windows ports will probably want windows-style behavior in DRT.
Daniel Bates
Comment 15
2009-10-19 14:46:18 PDT
Just wanted to let you know I landed changes to the Windows skip file before yours. So, you will have to update that bit of your patch before you land. For your reference the changes landed were part of
bug #30266
. (In reply to
comment #13
)
> Created an attachment (id=41452) [details] > Move layout tests to non platform dirs.
Darin Adler
Comment 16
2009-10-19 17:14:10 PDT
(In reply to
comment #14
)
> This seems like a strange quirk to Apple's window port. I think other windows > ports will probably want windows-style behavior in DRT.
I don’t think this is an intentional quirk. Could you clarify what the quirk is?
Erik Arvidsson
Comment 17
2009-10-19 17:48:34 PDT
I don't think this is so much a quirk as an issue with Safari and DRT. WebViewClient::isSelectTrailingWhitespaceEnabled is supposed to return true on Windows but that is not the case with Safari Win nor DRT.
Eric Seidel (no email)
Comment 18
2009-12-14 13:06:40 PST
bweinstein added it to the skipped list in
http://trac.webkit.org/changeset/49793
Eric Seidel (no email)
Comment 19
2009-12-14 13:06:59 PST
I'm confused as to what's the status of this patch or if it's really up for review?
Erik Arvidsson
Comment 20
2009-12-14 13:10:17 PST
This fixes the test (and removes the entry in the platform/win/Skipped). This is ready to be reviewed.
Erik Arvidsson
Comment 21
2009-12-16 17:11:52 PST
Created
attachment 45026
[details]
Updated the ChangeLog with more description
Erik Arvidsson
Comment 22
2009-12-16 17:17:17 PST
Created
attachment 45027
[details]
Updated the ChangeLog with more description as well as removed some whitespace changes
Darin Adler
Comment 23
2009-12-18 10:42:45 PST
Comment on
attachment 45027
[details]
Updated the ChangeLog with more description as well as removed some whitespace changes
> + Move the layout tests to non platform dir. Since DRT on Windows uses Mac > + settings all platforms produce the same result so there is no need for > + platform specific expectations.
I don't understand this. Aren't there platforms other than Windows and Mac? Don't we want to test both modes? Can DRT be told to switch modes so we can test both modes?
Maciej Stachowiak
Comment 24
2009-12-28 20:02:00 PST
Comment on
attachment 45027
[details]
Updated the ChangeLog with more description as well as removed some whitespace changes r- to address Darin's comment on Dec 18.
Ryosuke Niwa
Comment 25
2010-10-27 23:12:43 PDT
Have you tried setEditingBehavior?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug