Summary: | WebEditorClient::didBeginEditing is never called in WebKit2 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexey Proskuryakov <ap> | ||||||||
Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | jhoneycutt, mjs, sam | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Mac (Intel) | ||||||||||
OS: | OS X 10.6 | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 43379 | ||||||||||
Attachments: |
|
Description
Alexey Proskuryakov
2010-07-24 18:00:41 PDT
This is caused by an incomplete implementation of becomeFirstResponder. WebKit1 version does much more work - specifically, this problem is caused by a missing FocusController::setFocusedFrame() call. I'm not yet sure what the design here is. It seems strange for WebCore focus handling logic to be partially in WebKit. Created attachment 63373 [details]
proposed patch
This fixes about 500 tests.
(In reply to comment #1) > This is caused by an incomplete implementation of becomeFirstResponder. WebKit1 version does much more work - specifically, this problem is caused by a missing FocusController::setFocusedFrame() call. From the looking at the windows code, it looks like something like void WebPage::setFocused(bool isFocused) { FocusController* focusController = m_page->focusController(); focusController->setFocused(isFocused); if (isFocused) { if (!focusController->focusedFrame()) focusController->setFocusedFrame(m_page->mainFrame()); } } should do most of the necessary work. Comment on attachment 63373 [details]
proposed patch
Heh, or that. r=me
Committed <http://trac.webkit.org/changeset/64631>. This issue still exists for WebKit2 on Windows; reopening. This may be because WebKitTestRunner is not focusing the view window. Created attachment 64399 [details]
Patch
Comment on attachment 64399 [details]
Patch
I think it would make more sense to put the focus function on the PlatformWebView abstraction. But otherwise this is fine. r- for that change.
Created attachment 64460 [details]
Patch v2
Landed in r65390. Thanks, Sam! |