[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:42:31 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 13289a8ec0644bad0f4c64675b54201e6ff122db
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri May 16 18:36:25 2003 +0000

    WebFoundation:
    
            Reviewed by John.
    
    	- fixed 3255088 - repro crash in WebCredentialStorage remembering password from onlinetrafficsafety.com
    
            * AuthenticationManager.subproj/NSURLKeychainCredentialStorage.m:
            (-[NSURLKeychainCredentialStorage _secProtocolForProtectionSpace:]): Don't assert if the protocol
    	is unknown, just return 0 and let the higher levels fail gracefully.
            (-[NSURLKeychainCredentialStorage _saveCredential:forProtectionSpace:isDefault:]): Don't save
    	if the protocol is unknown. Tolerate nil host.
            * AuthenticationManager.subproj/NSURLProtectionSpace.m:
            (-[NSURLProtectionSpace initWithHost:port:protocol:realm:authenticationMethod:]):
    
    	- unrelated cookie code cleanup
    
    	* CookieManager.subproj/NSHTTPCookieStorage.m:
            (-[NSHTTPCookieStorage _setCookies:forURL:policyBaseURL:]): Avoid
    	warning about "0 previous cookies rejected"
    
    WebKit:
    
            Reviewed by John.
    
    	- fixed 3255088 - repro crash in WebCredentialStorage remembering password from onlinetrafficsafety.com
    
            * WebView.subproj/WebFormDelegate.h:
            * WebView.subproj/WebFormDelegate.m:
            (-[WebFormDelegate frame:sourceFrame:willSubmitForm:withValues:submissionListener:]): Expect sourceFrame
    	argument.
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]): Include
    	source frame in form state.
            (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
    	Include source frame in form state. Post directly to the target
    	frame if it exists, since we want the form state to contain the
    	right source frame.
            (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): Pass source frame to form
    	delegate.
    	(-[WebFormState initWithForm:values:sourceFrame:]): New sourceFrame argument.
            (-[WebFormState dealloc]): release sourceFrame.
            (-[WebFormState sourceFrame]): New method.
    
    WebBrowser:
    
            Reviewed by John.
    
    	- fixed 3255088 - repro crash in WebCredentialStorage remembering password from onlinetrafficsafety.com
    
            * BrowserWebController.m:
            (-[FormDelegate frame:sourceFrame:willSubmitForm:withValues:submissionListener:]): Expect sourceFrame.
            * FormCompletionController.h:
            * FormCompletionController.m:
            (+[FormCompletionController _frame:sourceFrame:willSubmitLoginForm:withValues:formInfo:submissionListener:]): Pop up sheet based on source frame's window, and raise the sheet-bearing window if different than the target window.
            (+[FormCompletionController _frame:sourceFrame:willSubmitRegularForm:withValues:]): Expect and use sourceFrame.
            (+[FormCompletionController frame:sourceFrame:willSubmitForm:withValues:submissionListener:]): Expect sourceFrame.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4389 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index d3256ef..37712d7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,26 @@
+2003-05-16  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by John.
+
+	- fixed 3255088 - repro crash in WebCredentialStorage remembering password from onlinetrafficsafety.com
+
+        * WebView.subproj/WebFormDelegate.h:
+        * WebView.subproj/WebFormDelegate.m:
+        (-[WebFormDelegate frame:sourceFrame:willSubmitForm:withValues:submissionListener:]): Expect sourceFrame
+	argument.
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _loadURL:referrer:loadType:target:triggeringEvent:form:formValues:]): Include
+	source frame in form state.
+        (-[WebFrame _postWithURL:referrer:target:data:contentType:triggeringEvent:form:formValues:]):
+	Include source frame in form state. Post directly to the target
+	frame if it exists, since we want the form state to contain the
+	right source frame.
+        (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): Pass source frame to form
+	delegate.
+	(-[WebFormState initWithForm:values:sourceFrame:]): New sourceFrame argument.
+        (-[WebFormState dealloc]): release sourceFrame.
+        (-[WebFormState sourceFrame]): New method.
+
 2003-05-16  Ken Kocienda  <kocienda at apple.com>
 
         Reviewed by Gramps
diff --git a/WebKit/WebView.subproj/WebFormDelegate.h b/WebKit/WebView.subproj/WebFormDelegate.h
index ece52b1..b897dd1 100644
--- a/WebKit/WebView.subproj/WebFormDelegate.h
+++ b/WebKit/WebView.subproj/WebFormDelegate.h
@@ -43,7 +43,7 @@
 
 // Sent when a form is just about to be submitted (before the load is started)
 // listener must be sent continue when the delegate is done.
-- (void)frame:(WebFrame *)frame willSubmitForm:(id <WebDOMElement>)form withValues:(NSDictionary *)values submissionListener:(id <WebFormSubmissionListener>)listener;
+- (void)frame:(WebFrame *)frame sourceFrame:(WebFrame *)sourceFrame willSubmitForm:(id <WebDOMElement>)form withValues:(NSDictionary *)values submissionListener:(id <WebFormSubmissionListener>)listener;
 @end
 
 /*!
diff --git a/WebKit/WebView.subproj/WebFormDelegate.m b/WebKit/WebView.subproj/WebFormDelegate.m
index efc352e..bd7d689 100644
--- a/WebKit/WebView.subproj/WebFormDelegate.m
+++ b/WebKit/WebView.subproj/WebFormDelegate.m
@@ -57,7 +57,7 @@ static WebFormDelegate *sharedDelegate = nil;
     return NO;
 }
 
-- (void)frame:(WebFrame *)frame willSubmitForm:(id <WebDOMElement>)form withValues:(NSDictionary *)values submissionListener:(id <WebFormSubmissionListener>)listener
+- (void)frame:(WebFrame *)frame sourceFrame:(WebFrame *)sourceFrame willSubmitForm:(id <WebDOMElement>)form withValues:(NSDictionary *)values submissionListener:(id <WebFormSubmissionListener>)listener
 {
     [listener continue];
 }
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index efe63d3..90a26ab 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -116,10 +116,12 @@ Repeat load of the same URL (by any other means of navigation other than the rel
 {
     NSObject <WebDOMElement> *_form;
     NSDictionary *_values;
+    WebFrame *_sourceFrame;
 }
-- (id)initWithForm:(NSObject <WebDOMElement> *)form values:(NSDictionary *)values;
+- (id)initWithForm:(NSObject <WebDOMElement> *)form values:(NSDictionary *)values sourceFrame:(WebFrame *)sourceFrame;
 - (id <WebDOMElement>)form;
 - (NSDictionary *)values;
+- (WebFrame *)sourceFrame;
 @end
 
 @interface WebFrame (ForwardDecls)
@@ -1594,7 +1596,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     NSDictionary *action = [self _actionInformationForLoadType:loadType isFormSubmission:isFormSubmission event:event originalURL:URL];
     WebFormState *formState = nil;
     if (form && values) {
-        formState = [[WebFormState alloc] initWithForm:form values:values];
+        formState = [[WebFormState alloc] initWithForm:form values:values sourceFrame:self];
     }
 
     if (target != nil) {
@@ -1719,18 +1721,17 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     NSDictionary *action = [self _actionInformationForLoadType:WebFrameLoadTypeStandard isFormSubmission:YES event:event originalURL:URL];
     WebFormState *formState = nil;
     if (form && values) {
-        formState = [[WebFormState alloc] initWithForm:form values:values];
+        formState = [[WebFormState alloc] initWithForm:form values:values sourceFrame:self];
     }
 
     if (target != nil) {
 	WebFrame *targetFrame = [self findFrameNamed:target];
 
 	if (targetFrame != nil) {
-	    [targetFrame _postWithURL:URL referrer:referrer target:nil data:data contentType:contentType triggeringEvent:event form:form formValues:values];
-	    return;
+	    [targetFrame _loadRequest:request triggeringAction:action loadType:WebFrameLoadTypeStandard formState:formState];
+	} else {
+	    [self _checkNewWindowPolicyForRequest:request action:action frameName:target formState:formState andCall:self withSelector:@selector(_continueLoadRequestAfterNewWindowPolicy:frameName:formState:)];
 	}
-
-	[self _checkNewWindowPolicyForRequest:request action:action frameName:target formState:formState andCall:self withSelector:@selector(_continueLoadRequestAfterNewWindowPolicy:frameName:formState:)];
 	[request release];
 	[formState release];
 	return;
@@ -1993,7 +1994,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
             // It's a bit of a hack to reuse the WebPolicyDecisionListener for the continuation
             // mechanism across the willSubmitForm callout.
             _private->listener = [[WebPolicyDecisionListener alloc] _initWithTarget:self action:@selector(_continueAfterWillSubmitForm:)];
-            [[[self webView] _formDelegate] frame:self willSubmitForm:[formState form] withValues:[formState values] submissionListener:_private->listener];
+            [[[self webView] _formDelegate] frame:self sourceFrame:[formState sourceFrame] willSubmitForm:[formState form] withValues:[formState values] submissionListener:_private->listener];
         } else {
             [self _continueAfterWillSubmitForm:WebPolicyUse];
         }
@@ -2163,11 +2164,12 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 
 @implementation WebFormState : NSObject
 
-- (id)initWithForm:(NSObject <WebDOMElement> *)form values:(NSDictionary *)values
+- (id)initWithForm:(NSObject <WebDOMElement> *)form values:(NSDictionary *)values sourceFrame:(WebFrame *)sourceFrame
 {
     [super init];
     _form = [form retain];
     _values = [values copy];
+    _sourceFrame = [sourceFrame retain];
     return self;
 }
 
@@ -2175,6 +2177,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
 {
     [_form release];
     [_values release];
+    [_sourceFrame release];
     [super dealloc];
 }
 
@@ -2188,4 +2191,9 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     return _values;
 }
 
+- (WebFrame *)sourceFrame
+{
+    return _sourceFrame;
+}
+
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list