When expanding a selection with word granularity, it's possible to select only part of a word that contains punctuation if the cursor is positioned over the punctuation.
To reproduce, open the URL, double-click the first word and continue dragging across the text. Notice how "don't", "99.9" and "127.0.0.1" are fully selected as the cursor enters them, but the selection contracts back to only part of the word as the pointer moves over the punctuation.
For form controls, this is a regression from Safari 2.0.
Strange that this should be broken, since it looks like WebKit uses AppKit to do its word boundary detection:
void findWordBoundary(const UChar* chars, int len, int position, int* start, int* end)
NSRange range = [attr doubleClickAtIndex:(position >= len) ? len - 1 : position];
to find the word range. Someone would have to look at the NSTextField source, maybe it uses a different selection function (or maybe I've missed some other bug in looking at our selection code).
(In reply to comment #3)
> void findWordBoundary(const UChar* chars, int len, int position, int* start,
> int* end)
> NSRange range = [attr doubleClickAtIndex:(position >= len) ? len - 1 :
It's not passing in enough context.