Bug 25451

Summary: Selection base/extent aren't honored on the first horizontal extension
Product: WebKit Reporter: Justin Garcia <justin.garcia>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
patch w/o layout tests or changelog none

Justin Garcia
Reported 2009-04-28 11:26:58 PDT
In editable content, create a selection from left to right, then extend the selection with shift-left. The left side of the selection (instead of the extent) is modified. See http://www.betalogue.com/2009/04/22/selections/ for a report of this. We apparently match AppKit here but changing this seems sensible.
Attachments
patch w/o layout tests or changelog (3.62 KB, patch)
2009-04-28 12:45 PDT, Justin Garcia
no flags
Justin Garcia
Comment 1 2009-04-28 11:27:52 PDT
if (!m_lastChangeWasHorizontalExtension) { m_lastChangeWasHorizontalExtension = true; Position start = m_sel.start(); Position end = m_sel.end(); switch (direction) { // FIXME: right for bidi? case RIGHT: case FORWARD: m_sel.setBase(start); m_sel.setExtent(end); break; case LEFT: case BACKWARD: m_sel.setBase(end); m_sel.setExtent(start); break; } }
Justin Garcia
Comment 2 2009-04-28 11:31:01 PDT
Justin Garcia
Comment 3 2009-04-28 11:33:11 PDT
I think we continue to reset the base/extent if you double or triple click and then start extending.
Justin Garcia
Comment 4 2009-04-28 11:34:00 PDT
I meant "I think we should continue to reset the base/extent if you double or triple click and then start extending".
Justin Garcia
Comment 5 2009-04-28 12:45:26 PDT
Created attachment 29860 [details] patch w/o layout tests or changelog fixes the bug. no layout test yet though. I'm going to come back to this.
Note You need to log in before you can comment on or make changes to this bug.