Bug 26870 - Enhancement: add -[WebView setMaintainsInactiveSelection:] method
Summary: Enhancement: add -[WebView setMaintainsInactiveSelection:] method
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-30 16:26 PDT by Jeff Johnson
Modified: 2009-06-30 16:27 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Johnson 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.