WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
12462
Need -[WebView setAllowsUndo:] API
https://bugs.webkit.org/show_bug.cgi?id=12462
Summary
Need -[WebView setAllowsUndo:] API
Jim Correia
Reported
2007-01-29 11:32:40 PST
I have a webview in which editing actions should *not* be undoable. Returning nil from the delegate method: - (NSUndoManager *)undoManagerForWebView:(WebView *)webView; is not sufficient to prevent undo registration, since the web view will still "find" the window's undo manager (which is used by other views in the window.) NSTextView solves this problem with -allowsUndo -setAllowsUndo Path attached which implements this.
Attachments
Patch which implements the requested feature.
(4.41 KB, patch)
2007-01-29 11:33 PST
,
Jim Correia
mjs
: review-
Details
Formatted Diff
Diff
ChangeLog entry for previous patch.
(450 bytes, text/plain)
2007-01-29 12:19 PST
,
Jim Correia
mjs
: review-
Details
patch
(4.55 KB, patch)
2007-01-29 17:33 PST
,
Jim Correia
mrowe
: review-
Details
Formatted Diff
Diff
revised changelog
(558 bytes, text/plain)
2007-01-29 17:34 PST
,
Jim Correia
mrowe
: review-
Details
revised patch
(5.40 KB, patch)
2007-01-29 20:13 PST
,
Jim Correia
mrowe
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Jim Correia
Comment 1
2007-01-29 11:33:52 PST
Created
attachment 12747
[details]
Patch which implements the requested feature.
David Kilzer (:ddkilzer)
Comment 2
2007-01-29 12:08:43 PST
Comment on
attachment 12747
[details]
Patch which implements the requested feature. Jim, if you'd like this patch included in WebKit, you'll need to set the review? flag so that it will be looked at by a reviewer. (I just did this to kick start the process.) Also, you will need a ChangeLog entry with the patch. (Use the WebKitTools/Scripts/prepare-ChangeLog script to do that; the instructions on the web need a bit more information.)
http://webkit.org/coding/contributing.html
David Kilzer (:ddkilzer)
Comment 3
2007-01-29 12:10:11 PST
How is this bug related to
Bug 12461
?
Jim Correia
Comment 4
2007-01-29 12:19:19 PST
Created
attachment 12752
[details]
ChangeLog entry for previous patch.
Jim Correia
Comment 5
2007-01-29 12:23:19 PST
(In reply to
comment #3
)
> How is this bug related to
Bug 12461
?
It really isn't. This solves a different problem. The problem solved by this patch is when you have an editable webview in a window, but need to prevent any editing action in that webview from registering undo actions with the undo manager which is used by other views in that window (whose editing actions you do want registered.) -allowsUndo/-setAllowsUndo: as implemented in the patch is the same mechanism NSTextView uses to solve the same problem.
David Kilzer (:ddkilzer)
Comment 6
2007-01-29 12:29:45 PST
Comment on
attachment 12752
[details]
ChangeLog entry for previous patch. Only approved code reviewers should set the review+ flag. Please set the "review?" flag to request that the patch be reviewed.
David Kilzer (:ddkilzer)
Comment 7
2007-01-29 12:30:55 PST
Comment on
attachment 12747
[details]
Patch which implements the requested feature. Sorry, I thought the changelog attachment contained the whole patch again. Resetting flags.
Maciej Stachowiak
Comment 8
2007-01-29 17:04:24 PST
Comment on
attachment 12747
[details]
Patch which implements the requested feature. This seems like a fine idea for an API addition. However, we cannot just add new API methods to the public header. To become public API, they need to go through API review. Please add them as SPI for now to the WebViewPrivate header in the PendingPublic category.
Maciej Stachowiak
Comment 9
2007-01-29 17:05:28 PST
Comment on
attachment 12752
[details]
ChangeLog entry for previous patch. ChangeLog looks fine, but r-'ing it along with the patch - please include in next patch.
Jim Correia
Comment 10
2007-01-29 17:33:23 PST
Created
attachment 12766
[details]
patch
Jim Correia
Comment 11
2007-01-29 17:34:26 PST
Created
attachment 12767
[details]
revised changelog
Mark Rowe (bdash)
Comment 12
2007-01-29 18:18:34 PST
Comment on
attachment 12766
[details]
patch A few comments: 1) you should include the ChangeLog entry as part of the patch rather than as a separate file. 2) + if ([decoder containsValueForKey: @"AllowsUndo"]) has extra whitespace after the colon. 3) + if (! _private->allowsUndo) { + return nil; + } has unneeded braces. If you could address those two minor issues, resubmit your patch and mark it r? I will take another look and land it.
Jim Correia
Comment 13
2007-01-29 20:13:36 PST
Created
attachment 12770
[details]
revised patch
Mark Rowe (bdash)
Comment 14
2007-01-29 20:22:28 PST
Comment on
attachment 12770
[details]
revised patch r=me
Mark Rowe (bdash)
Comment 15
2007-01-29 20:25:42 PST
Landed in
r19243
as SPI.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug