[webkit-help] [solved] Re: EditorClient*::handleKeyboardEvent()
Stephan Assmus
superstippi at gmx.de
Thu Feb 11 11:42:52 PST 2010
Hi,
On 2010-02-07 at 23:24:29 [+0100], Alexey Proskuryakov <ap at webkit.org> wrote:
> 07.02.2010, в 13:09, Stephan Assmus написал(а):
> >> What is the kind of the start node here? Inputs themselves are indeed not
> >> contentEditable, nodes in shadow tree below them are. So, my first guess
> >> would the that the focus ends up being on a wrong node.
> >
> > Doesn't this suggest I am doing something wrong with handling focus and
> > selection?
>
> Yes, that's what I'd be looking for first.
>
> But before investigating any further, I'd be sure to verify this hypothesis
> by actually checking what the start node is. And then, you could see what
> code sets the selection in your port, and in other ports.
>
> > I can see this in my EditorClient hooks and
> > entering text *does* work when I just ignore isContentEditable()
>
> It's quite possible that editing code (mostly) works even when selection is
> set incorrectly.
Indeed it does. After some more fruitless attempts at debugging this, it
finally occured to me, while browsing the SelectionController code once more
to turn off some annoying debug output I inserted there, that I was never
passing the window activation and view focus events from the Haiku interface
objects on to the Page's FocusController. That finally gave me a blinking
cursor. The probelm with isContentEditable() was actually more involved, and
was a result of compiling WebCore and WebKit code with different defines.
These were inherited from the separate build system of the Haiku port, which
I didn't look at closely enough to realize this problem. The effect was that
WebKit code and WebCore code in the Haiku build had a different idea of
object sizes and member alignment, which caused all sorts of havoc. I am
surprised it even worked as well as it did. Compiling all the code with the
same defines has finally resulted in the EditorClientHaiku code working as
intended.
Special kudos to Michael Lotz, who was very persistent in trying to find the
memory corruption problems in the Haiku port which finally led to the
discovery of the messed up defines.
Thanks to all who tried to help & best regards,
-Stephan
More information about the webkit-help
mailing list