Bug 26870

Summary: Enhancement: add -[WebView setMaintainsInactiveSelection:] method
Product: WebKit Reporter: Jeff Johnson <opendarwin>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED    
Severity: Enhancement    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   

Jeff Johnson
Reported 2009-06-30 16:26:43 PDT
The WebView API has a getter -(BOOL)maintainsInactiveSelection but no setter -(void)setMaintainsInactiveSelection:(BOOL)flag. The current implementation of the getter is -(BOOL)maintainsInactiveSelection { return NO; }. However, WebHTMLView calls -[WebView maintainsInactiveSelection], and if you subclass WebView and override maintainsInactiveSelection to return YES, the webview will indeed maintain the inactive selection. For a browser with a tab interface, it is quite desirable to be able to maintain the selection when switching between tabs. Indeed, Safari does exactly this, so I presume that Safari subclasses WebView and overrides -maintainsInactiveSelection. It would be nice to have a setter -[WebView setMaintainsInactiveSelection:] so you could set that behavior without having to subclass WebView. P.S. If it's decided that this enhancement is not to be implemented, then at the very least the WebKit API documentation should be clarified to say that -[WebView maintainsInactiveSelection] is meant for subclasses to override.
Attachments
Note You need to log in before you can comment on or make changes to this bug.