[Webkit-unassigned] [Bug 25533] Elements on the same line should be treated as such by caret navigation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 2 03:05:14 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=25533





--- Comment #17 from Mario Sanchez Prada <msanchez at igalia.com>  2011-03-02 03:05:13 PST ---
(In reply to comment #16)
> [...]
> > Obviously, my current patch wouldn't fix the behavior for those other ports since I'm defining four new commands precisely not to touch current up/down behavior, but your comment makes me think perhaps I should actually be modifying those current commands, instead of creating new ones.
> 
> Yes.  You should be changing the behavior of up/down on all platforms because the current behavior is inconsistent with TextEdit, Firefox, etc...

Gotcha. So no more MoveCaretUp/Down command, let's fix MoveUp/Down instead.

> > > To demonstrate the bug on other ports, simply enable the design mode on the
> > > attached test case.
> > 
> > What do you mean by "enable the design mode"?
> 
> document.designMode = 'on';

Very useful tip indeed. Thanks! I was using the select-1-char + extend with shift/arrow trick to workaround that in chrome and safari. Much better this way!

> > > > Source/WebCore/editing/EditorCommand.cpp:620
> > > > +static bool isVerticallyCoincident(VisiblePosition origin, VisiblePosition candidate, int originX, SelectionDirection direction)
> > > > +{
> > > 
> > > This is definitely not right.  We shouldn't be adding these selection related
> > > code in EditorCommand.cpp, which is supposed to be delegating all the work
> > > to the rest of editing code.
> > 
> > Could you provide some guidance, even roughly, about how this could be done then? I'm not fond on this so deep issues in editing stuff and probably I'm missing something :-)
> 
> Given my comment above, I'd guess that you need to modify SelectionController.cpp and visible_units.cpp but not EditorCommand.cpp.

Now I understood why I shouldn't be creating new commands, this makes a lot of sense to me as well.

Still fix for bug 55481 keeps being a dependency for this so I'll base my work on that one, hoping it will be accepted at some point :-)

Thanks twice!

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list