Closed Bug 1066756 Opened 9 years ago Closed 9 years ago

double click word selection expansion stopping at u+A789 (ModifierSymbol : "Sk")


(Core :: DOM: Selection, defect, P4)






(Reporter: firefox, Assigned: jfkthame)


(Keywords: reproducible, testcase, Whiteboard: [parity-IE])


(2 files)

Attached file UA789.html
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:25.0) Gecko/20100101 Firefox/25.0
Build ID: 20131028113246

Steps to reproduce:

1. Load Attached sample document
which contains:
where ꞉ is u+A789
2. double click on hello or world.

Actual results:

only hello or world is selected.

Expected results:

the whole word "hello꞉world" should be selected.

IE selects the entire string.
Chrome behaves like firefox. (which I beleive to be the incorrect behaviour)
Component: Untriaged → Selection
OS: Linux → All
Product: Firefox → Core
Hardware: x86 → All
Whiteboard: [parity-IE]
Version: 25 Branch → Trunk
It looks like this is intentional - we stop at kPunctuation or kSymbol:

u+A789 belongs to the Unicode "Symbol, Modifier [Sk]" category:

and we map that to kSymbol here:
Severity: normal → minor
Priority: -- → P4
The list of characters in the 'Symbol, Modifier' category:
Looking at the collection of 'Sk' characters, I think it'd make sense in general to include them as part of the 'word' for double-click selection purposes. Excluding them from the chars recognized by ClusterIterator::IsPunctuation() should fix this.
Attachment #8489097 - Flags: review?(mats)
If we agree this change makes sense, we should also add suitable testcases to layout/generic/test/test_movement_by_words.html.
Ever confirmed: true
Comment on attachment 8489097 [details] [diff] [review]
include characters with Unicode category Sk (modifier symbol) in double-click word selection.

Seems reasonable, r=mats

Perhaps you'd want to capitalize the commit message:
bug 1066756 - include ...
^             ^
to follow common practice.

Also, there's a minor error in the code comment here:
The hb_unicode_general_category_t enum now lives in

And don't forget to add the tests you suggested, thanks!
Attachment #8489097 - Flags: review?(mats) → review+
Tidied up nits; added a test using the MODIFIER LETTER COLON, as in the original testcase here.
Assignee: nobody → jfkthame
Target Milestone: --- → mozilla35
QA Whiteboard: [good first verify]
You need to log in before you can comment on or make changes to this bug.