Bug 8442

Summary: improvements to Cocoa bindings support in WebView - code simplification
Product: WebKit Reporter: James G. Speth <speth>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
patch removing the WebController and using better simpler KVO notifications
none
new patch with comments timothy: review+

Description James G. Speth 2006-04-17 11:16:53 PDT
here are some improvements to the Cocoa bindings support in WebView from bug #8389.  primarily, this removes the WebController class altogether.  the WebController isn't needed anymore, since i figured out how to make the NSTreeController and WebView work well together without it.  now you can just bind the contentObject binding of the tree controller directly to the mainFrameDocument key of the WebView.
Comment 1 Eric Seidel (no email) 2006-04-17 14:05:26 PDT
It looks like you forgot to attach the patch :(
Comment 2 James G. Speth 2006-04-17 14:34:12 PDT
Created attachment 7777 [details]
patch removing the WebController and using better simpler KVO notifications
Comment 3 Darin Adler 2006-04-17 14:39:54 PDT
Comment on attachment 7777 [details]
patch removing the WebController and using better simpler KVO notifications

Won't removing the WebController break compatibility?
Comment 4 Timothy Hatcher 2006-04-17 15:29:33 PDT
WebController was recently added (this weekend.) It wasn't needed for any functionality, but NSTreeController workarounds.  A user can just use NSTreeController with this patch.
Comment 5 James G. Speth 2006-04-17 18:04:48 PDT
Created attachment 7788 [details]
new patch with comments

i also moved the call to stop returning the DOMDocument from the beginning of the loading process to the point where the load is committed.  it feels better this way when using it, since it's more synchronized with the WebView's state.
Comment 6 Timothy Hatcher 2006-04-18 09:48:41 PDT
Comment on attachment 7788 [details]
new patch with comments

This looks good. r=me
Comment 7 Timothy Hatcher 2006-04-19 19:18:53 PDT
Landed in r13980.