[Webkit-unassigned] [Bug 56055] Hook up new AppKit autocorrection UI with WK2.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 21 17:57:47 PDT 2011


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





--- Comment #7 from Jia Pu <jpu at apple.com>  2011-03-21 17:57:48 PST ---
(In reply to comment #6)
> (From update of attachment 86252 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=86252&action=review

> 
> > Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm:80
> > +    [spellChecker showCorrectionBubbleOfType:bubbleType primaryString:replacementStringAsNSString alternativeStrings:alternativeStrings forStringInRect:boundingBoxOfReplacedString view:m_view.get() completionHandler:^(NSString* acceptedString) {
> 
> This completion handler block is so big that I think you should factor most of it into a function.
> 
> What prevents this block from being called after the CorrectionPanel is deleted?

The lifetime of correction panel is managed by AppKit internally. When a NSView (or WebView) is deleted, AppKit makes sure to detach the correction panel if there is one. And NSCorrectionPanel will not call back if it's not attached to a window anymore.

> > Source/WebKit2/UIProcess/WebPageProxy.cpp:2699
> > +#if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
> > +    dismissCorrectionPanel(ReasonForDismissingCorrectionPanelIgnored);
> > +#endif
> 
> This change seems wrong; we are quite early in the loading process at the point where we set a pending API request URL, and that’s not the right time to take down the correction panel. And most loads don’t have a pending API request URL, such as clicks on links.


Do you have a recommended spot to dismiss visible correction panel before loading a new page? In WK1, I don't actually need to do anything. In WK1, reloading a page will always dealloc NSView, hence dismiss the panel. However, in WK2, it doesn't seem always to be the case. Specifically when reloading another page when existing page is OpenSource/Source/WebCore/manual-tests/autocorrection/autocorrection-in-iframe.html.

-- 
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