[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
darin
darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:24:29 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c083b3a2dbef4514f8d58f9903336c02cd77f2d0
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 12 23:44:06 2003 +0000
WebCore:
Reviewed by Ken.
- fixed 3158484 -- after submission failure, submitting a second time doesn't work
* kwq/KWQKHTMLPart.h: Added didNotOpenURL method. Changed _formSubmittedFlag bool
into _submittedFormURL string.
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::KWQKHTMLPart): No need to initialize string.
(KWQKHTMLPart::didNotOpenURL): If the form we submitted failed, then forget about it.
(KWQKHTMLPart::submitForm): Only do the protection against multiple submissions if
the URL is the same.
(KWQKHTMLPart::setView): Nuke the submitted URL here where we used to nuke the flag.
* kwq/WebCoreBridge.h: Added didNotOpenURL: method to be called by WebKit.
* kwq/WebCoreBridge.mm: (-[WebCoreBridge didNotOpenURL:]): Forward the call to the part.
WebKit:
Reviewed by Ken.
- fixed 3158484 -- after submission failure, submitting a second time doesn't work
* WebView.subproj/WebDataSourcePrivate.h: Added _receivedError:complete: method.
* WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _receivedError:complete:]):
Added, parallel to _receivedData and _finishedLoading. Calls the new bridge method
didNotOpenURL: for cases where we fail before committing (which calls openURL).
Note that we can't use our own _bridge method because it asserts that we have committed
to prevent accidental misuse. Also make the call on the controller that used to be done
directly by the client.
* WebView.subproj/WebMainResourceClient.m: (-[WebMainResourceClient receivedError:complete:]):
Call the new -[WebDataSource _receivedError:complete:] rather than calling the controller directly.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a52cb17..6b2d847 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,23 @@
2003-02-12 Darin Adler <darin at apple.com>
+ Reviewed by Ken.
+
+ - fixed 3158484 -- after submission failure, submitting a second time doesn't work
+
+ * kwq/KWQKHTMLPart.h: Added didNotOpenURL method. Changed _formSubmittedFlag bool
+ into _submittedFormURL string.
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::KWQKHTMLPart): No need to initialize string.
+ (KWQKHTMLPart::didNotOpenURL): If the form we submitted failed, then forget about it.
+ (KWQKHTMLPart::submitForm): Only do the protection against multiple submissions if
+ the URL is the same.
+ (KWQKHTMLPart::setView): Nuke the submitted URL here where we used to nuke the flag.
+
+ * kwq/WebCoreBridge.h: Added didNotOpenURL: method to be called by WebKit.
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge didNotOpenURL:]): Forward the call to the part.
+
+2003-02-12 Darin Adler <darin at apple.com>
+
Reviewed by Trey.
- fixed 3162786 -- hang with large amounts of text in textarea
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a52cb17..6b2d847 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,23 @@
2003-02-12 Darin Adler <darin at apple.com>
+ Reviewed by Ken.
+
+ - fixed 3158484 -- after submission failure, submitting a second time doesn't work
+
+ * kwq/KWQKHTMLPart.h: Added didNotOpenURL method. Changed _formSubmittedFlag bool
+ into _submittedFormURL string.
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::KWQKHTMLPart): No need to initialize string.
+ (KWQKHTMLPart::didNotOpenURL): If the form we submitted failed, then forget about it.
+ (KWQKHTMLPart::submitForm): Only do the protection against multiple submissions if
+ the URL is the same.
+ (KWQKHTMLPart::setView): Nuke the submitted URL here where we used to nuke the flag.
+
+ * kwq/WebCoreBridge.h: Added didNotOpenURL: method to be called by WebKit.
+ * kwq/WebCoreBridge.mm: (-[WebCoreBridge didNotOpenURL:]): Forward the call to the part.
+
+2003-02-12 Darin Adler <darin at apple.com>
+
Reviewed by Trey.
- fixed 3162786 -- hang with large amounts of text in textarea
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index e95003a..7bcecd9 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -82,6 +82,7 @@ public:
virtual bool openURL(const KURL &);
virtual bool closeURL();
+ void didNotOpenURL(const QString &);
void openURLRequest(const KURL &, const KParts::URLArgs &);
void submitForm(const KURL &, const KParts::URLArgs &);
@@ -219,7 +220,7 @@ private:
static NSEvent *_currentEvent;
static NSResponder *_firstResponderAtMouseDownTime;
- bool _formSubmittedFlag;
+ QString _submittedFormURL;
NSMutableDictionary *_formValues;
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 4712b43..b633acd 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -126,7 +126,6 @@ KWQKHTMLPart::KWQKHTMLPart()
, _sendingEventToSubview(false)
, _mouseDownMayStartDrag(false)
, _mouseDownMayStartSelect(false)
- , _formSubmittedFlag(false)
, _formValues(nil)
{
// Must init the cache before connecting to any signals
@@ -189,6 +188,13 @@ void KWQKHTMLPart::openURLRequest(const KURL &url, const URLArgs &args)
[bridgeForFrameName(args.frameName) loadURL:url.url().getNSString() reload:args.reload triggeringEvent:nil formValues:nil];
}
+void KWQKHTMLPart::didNotOpenURL(const QString &URL)
+{
+ if (_submittedFormURL == URL) {
+ _submittedFormURL = QString::null;
+ }
+}
+
void KWQKHTMLPart::clearRecordedFormValues()
{
[_formValues release];
@@ -205,6 +211,7 @@ void KWQKHTMLPart::recordFormValue(const QString &name, const QString &value)
void KWQKHTMLPart::submitForm(const KURL &url, const URLArgs &args)
{
+ QString URLString = url.url();
WebCoreBridge *target = bridgeForFrameName(args.frameName);
KHTMLPart *targetPart = [target part];
@@ -223,25 +230,25 @@ void KWQKHTMLPart::submitForm(const KURL &url, const URLArgs &args)
// This flag prevents these from happening.
// Note that the flag is reset in setView()
// since this part may get reused if it is pulled from the b/f cache.
- if (_formSubmittedFlag) {
+ if (_submittedFormURL == URLString) {
return;
}
- _formSubmittedFlag = true;
+ _submittedFormURL = URLString;
}
if (!args.doPost()) {
- [target loadURL:url.url().getNSString()
+ [target loadURL:URLString.getNSString()
reload:args.reload
triggeringEvent:_currentEvent
formValues:_formValues];
} else {
QString contentType = args.contentType();
ASSERT(contentType.startsWith("Content-Type: "));
- [target postWithURL:url.url().getNSString()
+ [target postWithURL:URLString.getNSString()
data:[NSData dataWithBytes:args.postData.data() length:args.postData.size()]
contentType:contentType.mid(14).getNSString()
triggeringEvent:_currentEvent
- formValues:_formValues];
+ formValues:_formValues];
}
clearRecordedFormValues();
}
@@ -331,7 +338,7 @@ void KWQKHTMLPart::setView(KHTMLView *view, bool weOwnIt)
// Only one form submission is allowed per view of a part.
// Since this part may be getting reused as a result of being
// pulled from the back/forward cache, reset this flag.
- _formSubmittedFlag = false;
+ _submittedFormURL = QString::null;
}
KHTMLView *KWQKHTMLPart::view() const
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index d9ebbca..b23a88a 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -110,6 +110,9 @@ enum FrameBorderStyle {
- (void)addData:(NSData *)data withEncoding:(NSString *)encoding;
- (void)addData:(NSData *)data withOverrideEncoding:(NSString *)encoding;
- (void)closeURL;
+
+- (void)didNotOpenURL:(NSString *)URL;
+
- (void)saveDocumentState;
- (void)restoreDocumentState;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index d8487a2..084a489 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -188,6 +188,11 @@ static bool initializedObjectCacheSize = FALSE;
_part->closeURL();
}
+- (void)didNotOpenURL:(NSString *)URL
+{
+ _part->didNotOpenURL(QString::fromNSString(URL));
+}
+
- (void)saveDocumentState
{
DocumentImpl *doc = _part->xmlDocImpl();
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 20bfd94..f93858f 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2003-02-12 Darin Adler <darin at apple.com>
+
+ Reviewed by Ken.
+
+ - fixed 3158484 -- after submission failure, submitting a second time doesn't work
+
+ * WebView.subproj/WebDataSourcePrivate.h: Added _receivedError:complete: method.
+ * WebView.subproj/WebDataSourcePrivate.m: (-[WebDataSource _receivedError:complete:]):
+ Added, parallel to _receivedData and _finishedLoading. Calls the new bridge method
+ didNotOpenURL: for cases where we fail before committing (which calls openURL).
+ Note that we can't use our own _bridge method because it asserts that we have committed
+ to prevent accidental misuse. Also make the call on the controller that used to be done
+ directly by the client.
+
+ * WebView.subproj/WebMainResourceClient.m: (-[WebMainResourceClient receivedError:complete:]):
+ Call the new -[WebDataSource _receivedError:complete:] rather than calling the controller directly.
+
2003-02-11 Darin Adler <darin at apple.com>
* English.lproj/StringsNotToBeLocalized.txt: Updated for recent changes.
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 3620a9e..59dbf1b 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -152,6 +152,7 @@
- (void)_makeRepresentation;
- (void)_receivedData:(NSData *)data;
- (void)_finishedLoading;
+- (void)_receivedError:(WebError *)error complete:(BOOL)isComplete;
- (void)_defersCallbacksChanged;
- (WebResourceRequest *)_originalRequest;
- (NSDictionary *)_triggeringAction;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 78da38d..6003be4 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -530,6 +530,16 @@
[[self representation] finishedLoadingWithDataSource:self];
}
+- (void)_receivedError:(WebError *)error complete:(BOOL)isComplete
+{
+ if (!_private->committed) {
+ [[[self webFrame] _bridge] didNotOpenURL:[[_private->originalRequestCopy URL] absoluteString]];
+ }
+ [[self controller] _mainReceivedError:error
+ fromDataSource:self
+ complete:isComplete];
+}
+
- (void)_updateIconDatabaseWithURL:(NSURL *)iconURL
{
WebIconDatabase *iconDB = [WebIconDatabase sharedIconDatabase];
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 511f91a..779b72f 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -16,7 +16,6 @@
#import <WebFoundation/WebResourceResponse.h>
#import <WebFoundation/WebResourceResponsePrivate.h>
-#import <WebKit/WebBridge.h>
#import <WebKit/WebController.h>
#import <WebKit/WebControllerPrivate.h>
#import <WebKit/WebDataSource.h>
@@ -82,9 +81,7 @@
download = nil;
[dataSource _setPrimaryLoadComplete:YES];
} else {
- [[dataSource controller] _mainReceivedError:error
- fromDataSource:dataSource
- complete:isComplete];
+ [dataSource _receivedError:error complete:isComplete];
}
}
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 511f91a..779b72f 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -16,7 +16,6 @@
#import <WebFoundation/WebResourceResponse.h>
#import <WebFoundation/WebResourceResponsePrivate.h>
-#import <WebKit/WebBridge.h>
#import <WebKit/WebController.h>
#import <WebKit/WebControllerPrivate.h>
#import <WebKit/WebDataSource.h>
@@ -82,9 +81,7 @@
download = nil;
[dataSource _setPrimaryLoadComplete:YES];
} else {
- [[dataSource controller] _mainReceivedError:error
- fromDataSource:dataSource
- complete:isComplete];
+ [dataSource _receivedError:error complete:isComplete];
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list