[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:08:22 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 09b8b60449f2df7eb9585c3fce56ca90a28ecacf
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Apr 19 22:09:42 2002 +0000
2002-04-19 Kenneth Kocienda <kocienda at apple.com>
WebFoundation:
Changes to support submission of forms using HTTP POST.
These changes focus on adding the form data to a post request.
* CacheLoader.subproj/IFHTTPURLProtocolHandler.m: (-[IFHTTPURLProtocolHandler
addRequestMessageBody:]):
* ChangeLog:
* WebFoundation.pbproj/project.pbxproj:
WebCore:
Changes to support submission of forms using HTTP POST.
These changes move us over to using the new WebKit interface for creating
WebDataSource instances, one that passes a handle rather than just a URL,
enabling the specific request method to be communicated to WebFoundation.
This fixes:
Radar 2903602 (IFWebDataSource API must passes attributes and flags to IFURLHandle)
Fixed handling of password fields:
Radar 2903605 (WebCore form processing drops out password input data)
Added some hacks to get form <input type=image ...> working correctly:
Radar 2907198 (Forms not getting submitted correctly when <input type=image>)
* khtml/rendering/render_form.cpp: (RenderImageButton::RenderImageButton),
(RenderImageButton::~RenderImageButton), (RenderImageButton::printObject):
* khtml/rendering/render_form.h:
* kwq/KWQKHTMLPart.mm: (KHTMLPart::requestFrame), (KHTMLPart::submitForm),
(KHTMLPart::khtmlMouseReleaseEvent):
* kwq/KWQNSTextField.mm: (-[KWQNSTextField setPasswordMode:]), (-[KWQNSTextField
textDidChange:]), (-[KWQNSTextField stringValue]):
* kwq/Makefile.am:
* kwq/KWQInvisibleButton.h: Added
* kwq/KWQInvisibleButton.mm: Added
WebKit:
Changes to support submission of forms using HTTP POST.
These changes move us over to using the new WebKit interface for creating
WebDataSource instances, one that passes a handle rather than just a URL,
enabling the specific request method to be communicated to WebFoundation.
This fixes:
Radar 2903602 (IFWebDataSource API must passes attributes and flags to IFURLHandle)
* WebKit.pbproj/project.pbxproj:
* WebView.subproj/IFWebDataSource.h:
* WebView.subproj/IFWebDataSource.mm: (IFWebDataSourceMake), (-[IFWebDataSource
initWithURL:]), (-[IFWebDataSource initWithHandle:]):
* WebView.subproj/IFWebDataSourcePrivate.h:
* WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _startLoading:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1053 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 7ef9eef..65c62dd 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,34 @@
+2002-04-19 Kenneth Kocienda <kocienda at apple.com>
+
+ Changes to support submission of forms using HTTP POST.
+
+ These changes move us over to using the new WebKit interface for creating
+ WebDataSource instances, one that passes a handle rather than just a URL,
+ enabling the specific request method to be communicated to WebFoundation.
+ This fixes:
+
+ Radar 2903602 (IFWebDataSource API must passes attributes and flags to IFURLHandle)
+
+ Fixed handling of password fields:
+
+ Radar 2903605 (WebCore form processing drops out password input data)
+
+ Added some hacks to get form <input type=image ...> working correctly:
+
+ Radar 2907198 (Forms not getting submitted correctly when <input type=image>)
+
+
+ * khtml/rendering/render_form.cpp: (RenderImageButton::RenderImageButton),
+ (RenderImageButton::~RenderImageButton), (RenderImageButton::printObject):
+ * khtml/rendering/render_form.h:
+ * kwq/KWQKHTMLPart.mm: (KHTMLPart::requestFrame), (KHTMLPart::submitForm),
+ (KHTMLPart::khtmlMouseReleaseEvent):
+ * kwq/KWQNSTextField.mm: (-[KWQNSTextField setPasswordMode:]), (-[KWQNSTextField
+ textDidChange:]), (-[KWQNSTextField stringValue]):
+ * kwq/Makefile.am:
+ * kwq/KWQInvisibleButton.h: Added
+ * kwq/KWQInvisibleButton.mm: Added
+
2002-04-18 Darin Adler <darin at apple.com>
Fixes for compiling with gcc3 and more warnings.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 7ef9eef..65c62dd 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,34 @@
+2002-04-19 Kenneth Kocienda <kocienda at apple.com>
+
+ Changes to support submission of forms using HTTP POST.
+
+ These changes move us over to using the new WebKit interface for creating
+ WebDataSource instances, one that passes a handle rather than just a URL,
+ enabling the specific request method to be communicated to WebFoundation.
+ This fixes:
+
+ Radar 2903602 (IFWebDataSource API must passes attributes and flags to IFURLHandle)
+
+ Fixed handling of password fields:
+
+ Radar 2903605 (WebCore form processing drops out password input data)
+
+ Added some hacks to get form <input type=image ...> working correctly:
+
+ Radar 2907198 (Forms not getting submitted correctly when <input type=image>)
+
+
+ * khtml/rendering/render_form.cpp: (RenderImageButton::RenderImageButton),
+ (RenderImageButton::~RenderImageButton), (RenderImageButton::printObject):
+ * khtml/rendering/render_form.h:
+ * kwq/KWQKHTMLPart.mm: (KHTMLPart::requestFrame), (KHTMLPart::submitForm),
+ (KHTMLPart::khtmlMouseReleaseEvent):
+ * kwq/KWQNSTextField.mm: (-[KWQNSTextField setPasswordMode:]), (-[KWQNSTextField
+ textDidChange:]), (-[KWQNSTextField stringValue]):
+ * kwq/Makefile.am:
+ * kwq/KWQInvisibleButton.h: Added
+ * kwq/KWQInvisibleButton.mm: Added
+
2002-04-18 Darin Adler <darin at apple.com>
Fixes for compiling with gcc3 and more warnings.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7ef9eef..65c62dd 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,34 @@
+2002-04-19 Kenneth Kocienda <kocienda at apple.com>
+
+ Changes to support submission of forms using HTTP POST.
+
+ These changes move us over to using the new WebKit interface for creating
+ WebDataSource instances, one that passes a handle rather than just a URL,
+ enabling the specific request method to be communicated to WebFoundation.
+ This fixes:
+
+ Radar 2903602 (IFWebDataSource API must passes attributes and flags to IFURLHandle)
+
+ Fixed handling of password fields:
+
+ Radar 2903605 (WebCore form processing drops out password input data)
+
+ Added some hacks to get form <input type=image ...> working correctly:
+
+ Radar 2907198 (Forms not getting submitted correctly when <input type=image>)
+
+
+ * khtml/rendering/render_form.cpp: (RenderImageButton::RenderImageButton),
+ (RenderImageButton::~RenderImageButton), (RenderImageButton::printObject):
+ * khtml/rendering/render_form.h:
+ * kwq/KWQKHTMLPart.mm: (KHTMLPart::requestFrame), (KHTMLPart::submitForm),
+ (KHTMLPart::khtmlMouseReleaseEvent):
+ * kwq/KWQNSTextField.mm: (-[KWQNSTextField setPasswordMode:]), (-[KWQNSTextField
+ textDidChange:]), (-[KWQNSTextField stringValue]):
+ * kwq/Makefile.am:
+ * kwq/KWQInvisibleButton.h: Added
+ * kwq/KWQInvisibleButton.mm: Added
+
2002-04-18 Darin Adler <darin at apple.com>
Fixes for compiling with gcc3 and more warnings.
diff --git a/WebCore/khtml/rendering/render_form.cpp b/WebCore/khtml/rendering/render_form.cpp
index 6ca87f3..5551571 100644
--- a/WebCore/khtml/rendering/render_form.cpp
+++ b/WebCore/khtml/rendering/render_form.cpp
@@ -47,6 +47,11 @@
#include <kdebug.h>
+#ifdef APPLE_CHANGES
+#include "render_root.h"
+#include <KWQInvisibleButton.h>
+#endif
+
using namespace khtml;
RenderFormElement::RenderFormElement(HTMLGenericFormElementImpl *element)
@@ -416,8 +421,25 @@ RenderImageButton::RenderImageButton(HTMLInputElementImpl *element)
: RenderImage(element)
{
// ### support DOMActivate event when clicked
+#ifdef APPLE_CHANGES
+ button = new KWQInvisibleButton(this);
+#endif /* APPLE_CHANGES */
}
+#ifdef APPLE_CHANGES
+RenderImageButton::~RenderImageButton()
+{
+ delete button;
+}
+
+void RenderImageButton::printObject(QPainter *p, int x, int y, int w, int h, int tx, int ty)
+{
+ RenderImage::printObject(p, x, y, w, h, tx, ty);
+ if (!pixmap().isNull()) {
+ button->setFrameInView(tx, ty, contentWidth(), contentHeight(), root()->view());
+ }
+}
+#endif /* APPLE_CHANGES */
// -------------------------------------------------------------------------------
diff --git a/WebCore/khtml/rendering/render_form.h b/WebCore/khtml/rendering/render_form.h
index 82cdb7f..3ce2b67 100644
--- a/WebCore/khtml/rendering/render_form.h
+++ b/WebCore/khtml/rendering/render_form.h
@@ -45,6 +45,10 @@ class QListboxItem;
class KHTMLPartBrowserExtension;
+#ifdef APPLE_CHANGES
+class KWQInvisibleButton;
+#endif
+
namespace DOM {
class HTMLFormElementImpl;
class HTMLInputElementImpl;
@@ -188,6 +192,14 @@ public:
RenderImageButton(DOM::HTMLInputElementImpl *element);
virtual const char *renderName() const { return "RenderImageButton"; }
+
+#ifdef APPLE_CHANGES
+ virtual ~RenderImageButton();
+ virtual void printObject(QPainter *p, int x, int y, int w, int h, int tx, int ty);
+
+private:
+ KWQInvisibleButton *button;
+#endif
};
diff --git a/WebCore/kwq/KWQInvisibleButton.h b/WebCore/kwq/KWQInvisibleButton.h
new file mode 100644
index 0000000..50dc8a3
--- /dev/null
+++ b/WebCore/kwq/KWQInvisibleButton.h
@@ -0,0 +1,57 @@
+#ifndef KWQINVISIBLEBUTTON_H_
+#define KWQINVISIBLEBUTTON_H_
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+#include <Cocoa/Cocoa.h>
+#endif
+
+#include <qptrlist.h>
+#include "rendering/render_replaced.h"
+#include "rendering/render_image.h"
+#include "rendering/render_flow.h"
+#include "rendering/render_form.h"
+#include "html/html_formimpl.h"
+
+namespace DOM {
+ class HTMLGenericFormElementImpl;
+};
+
+namespace khtml {
+ class RenderImageButton;
+}
+
+// class KWQInvisibleButton ================================================================
+
+class KWQInvisibleButton {
+public:
+
+ // structs -----------------------------------------------------------------
+ // typedefs ----------------------------------------------------------------
+
+ KWQInvisibleButton(khtml::RenderImageButton *theImageButton);
+ ~KWQInvisibleButton();
+
+ // member functions --------------------------------------------------------
+
+ void setFrameInView(int x, int y, int w, int h, KHTMLView *khtmlview);
+
+ // operators ---------------------------------------------------------------
+
+// protected -------------------------------------------------------------------
+// private ---------------------------------------------------------------------
+
+private:
+ khtml::RenderImageButton *imageButton;
+#if (defined(__APPLE__) && defined(__OBJC__) && defined(__cplusplus))
+ id buttonView;
+#else
+ void *buttonView;
+#endif
+
+}; // class KWQInvisibleButton =============================================================
+
+#endif
diff --git a/WebCore/kwq/KWQInvisibleButton.mm b/WebCore/kwq/KWQInvisibleButton.mm
new file mode 100644
index 0000000..3a8eaf2
--- /dev/null
+++ b/WebCore/kwq/KWQInvisibleButton.mm
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2001 Apple Computer, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include <KWQInvisibleButton.h>
+
+#include <kwqdebug.h>
+#include <qevent.h>
+#include <khtmlview.h>
+#include <xml/dom2_eventsimpl.h>
+
+ at interface InvisibleButtonView : NSView
+{
+ khtml::RenderImageButton *imageButton;
+}
+
+-(void)setImageButton:(khtml::RenderImageButton *)theImageButton;
+
+ at end
+
+
+ at implementation InvisibleButtonView
+
+-(void)setImageButton:(khtml::RenderImageButton *)theImageButton
+{
+ imageButton = theImageButton;
+}
+
+- (void)mouseDown:(NSEvent *)theEvent
+{
+ DOM::HTMLFormElementImpl *element;
+
+ element = static_cast<DOM::HTMLGenericFormElementImpl *>(imageButton->element())->form();
+
+ for (QPtrListIterator<DOM::HTMLGenericFormElementImpl> it(element->formElements); it.current(); ++it) {
+ DOM::HTMLGenericFormElementImpl* current = it.current();
+ if (current->renderer() &&
+ (strcmp(current->renderer()->renderName(), "RenderLineEdit") == 0 || strcmp(current->renderer()->renderName(), "RenderTextArea") == 0)) {
+ static_cast<khtml::RenderWidget *>(current->renderer())->widget()->endEditing();
+ break;
+ }
+ }
+}
+
+- (void)mouseUp:(NSEvent *)theEvent
+{
+ NSPoint mouse = [theEvent locationInWindow];
+ QMouseEvent e2(QEvent::MouseButtonRelease, QPoint((int)mouse.x, (int)mouse.y), 0, 0);
+ imageButton->element()->dispatchMouseEvent(&e2, DOM::EventImpl::KHTML_CLICK_EVENT, 1);
+}
+
+ at end
+
+
+KWQInvisibleButton::KWQInvisibleButton(khtml::RenderImageButton *theImageButton)
+{
+ imageButton = theImageButton;
+ buttonView = nil;
+}
+
+KWQInvisibleButton::~KWQInvisibleButton()
+{
+ [buttonView removeFromSuperview];
+ [buttonView release];
+}
+
+void KWQInvisibleButton::setFrameInView(int x, int y, int w, int h, KHTMLView *khtmlview)
+{
+ if (buttonView) {
+ [buttonView setFrame:NSMakeRect(x, y, w, h)];
+ }
+ else {
+ buttonView = [[InvisibleButtonView alloc] initWithFrame:NSMakeRect(x, y, w, h)];
+ [buttonView setImageButton:imageButton];
+ NSView *nsview = khtmlview->getView();
+ if ([nsview isKindOfClass: [NSScrollView class]]) {
+ NSScrollView *scrollView = (NSScrollView *)nsview;
+ nsview = [scrollView documentView];
+ }
+
+ [nsview addSubview:buttonView];
+ }
+}
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 3b591f1..8381bb7 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -870,7 +870,7 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
}
[newFrame _setRenderFramePart: frame];
- newDataSource = WCIFWebDataSourceMake(childURL);
+ newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: childURL attributes: nil flags: 0] autorelease]);
[newDataSource _setParent: oldDataSource];
[newFrame setProvisionalDataSource: newDataSource];
@@ -964,6 +964,8 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
return;
#endif
+ NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
+
#ifdef NEED_THIS
KParts::URLArgs args;
@@ -980,6 +982,7 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
if ( strcmp( action, "get" ) == 0 )
{
u.setQuery( QString( formData.data(), formData.size() ) );
+ [attributes setObject:@"GET" forKey:IFHTTPURLHandleRequestMethod];
#ifdef NEED_THIS
args.frameName = target;
@@ -999,6 +1002,9 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
else // contentType must be "multipart/form-data"
args.setContentType( "Content-Type: " + contentType + "; boundary=" + boundary );
#endif
+ NSData *postData = [NSData dataWithBytes:formData.data() length:formData.size()];
+ [attributes setObject:postData forKey:IFHTTPURLHandleRequestData];
+ [attributes setObject:@"POST" forKey:IFHTTPURLHandleRequestMethod];
}
#ifdef NEED_THIS
@@ -1026,7 +1032,7 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
oldDataSource = getDataSource();
frame = [oldDataSource frame];
- newDataSource = WCIFWebDataSourceMake(qurl);
+ newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: qurl attributes: attributes flags: 0] autorelease]);
[newDataSource _setParent: [oldDataSource parent]];
[frame setProvisionalDataSource: newDataSource];
@@ -1401,7 +1407,7 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
oldDataSource = [frame dataSource];
}
- newDataSource = WCIFWebDataSourceMake(url);
+ newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: url attributes: nil flags: 0] autorelease]);
[newDataSource _setParent: [oldDataSource parent]];
[frame setProvisionalDataSource: newDataSource];
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index 3b591f1..8381bb7 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -870,7 +870,7 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const QString &url, cons
}
[newFrame _setRenderFramePart: frame];
- newDataSource = WCIFWebDataSourceMake(childURL);
+ newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: childURL attributes: nil flags: 0] autorelease]);
[newDataSource _setParent: oldDataSource];
[newFrame setProvisionalDataSource: newDataSource];
@@ -964,6 +964,8 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
return;
#endif
+ NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
+
#ifdef NEED_THIS
KParts::URLArgs args;
@@ -980,6 +982,7 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
if ( strcmp( action, "get" ) == 0 )
{
u.setQuery( QString( formData.data(), formData.size() ) );
+ [attributes setObject:@"GET" forKey:IFHTTPURLHandleRequestMethod];
#ifdef NEED_THIS
args.frameName = target;
@@ -999,6 +1002,9 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
else // contentType must be "multipart/form-data"
args.setContentType( "Content-Type: " + contentType + "; boundary=" + boundary );
#endif
+ NSData *postData = [NSData dataWithBytes:formData.data() length:formData.size()];
+ [attributes setObject:postData forKey:IFHTTPURLHandleRequestData];
+ [attributes setObject:@"POST" forKey:IFHTTPURLHandleRequestMethod];
}
#ifdef NEED_THIS
@@ -1026,7 +1032,7 @@ void KHTMLPart::submitForm( const char *action, const QString &url, const QByteA
oldDataSource = getDataSource();
frame = [oldDataSource frame];
- newDataSource = WCIFWebDataSourceMake(qurl);
+ newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: qurl attributes: attributes flags: 0] autorelease]);
[newDataSource _setParent: [oldDataSource parent]];
[frame setProvisionalDataSource: newDataSource];
@@ -1401,7 +1407,7 @@ void KHTMLPart::khtmlMouseReleaseEvent( khtml::MouseReleaseEvent *event )
oldDataSource = [frame dataSource];
}
- newDataSource = WCIFWebDataSourceMake(url);
+ newDataSource = WCIFWebDataSourceMake([[[IFURLHandle alloc] initWithURL: url attributes: nil flags: 0] autorelease]);
[newDataSource _setParent: [oldDataSource parent]];
[frame setProvisionalDataSource: newDataSource];
diff --git a/WebCore/kwq/KWQNSTextField.mm b/WebCore/kwq/KWQNSTextField.mm
index fd6b9c8..0301012 100644
--- a/WebCore/kwq/KWQNSTextField.mm
+++ b/WebCore/kwq/KWQNSTextField.mm
@@ -84,6 +84,7 @@
[secureField setBounds: [self bounds]];
}
[secureField setStringValue: @""];
+ [secureField setDelegate:self];
[self addSubview: secureField];
}
[formatter setPasswordMode: flag];
@@ -153,6 +154,20 @@
edited = true;
}
+-(NSString *)stringValue
+{
+ NSString *result;
+
+ if ([self passwordMode]) {
+ result = [secureField stringValue];
+ }
+ else {
+ result = [super stringValue];
+ }
+
+ return result;
+}
+
@end
diff --git a/WebCore/kwq/KWQTextField.mm b/WebCore/kwq/KWQTextField.mm
index fd6b9c8..0301012 100644
--- a/WebCore/kwq/KWQTextField.mm
+++ b/WebCore/kwq/KWQTextField.mm
@@ -84,6 +84,7 @@
[secureField setBounds: [self bounds]];
}
[secureField setStringValue: @""];
+ [secureField setDelegate:self];
[self addSubview: secureField];
}
[formatter setPasswordMode: flag];
@@ -153,6 +154,20 @@
edited = true;
}
+-(NSString *)stringValue
+{
+ NSString *result;
+
+ if ([self passwordMode]) {
+ result = [secureField stringValue];
+ }
+ else {
+ result = [super stringValue];
+ }
+
+ return result;
+}
+
@end
diff --git a/WebCore/kwq/Makefile.am b/WebCore/kwq/Makefile.am
index a37c37c..4471e93 100644
--- a/WebCore/kwq/Makefile.am
+++ b/WebCore/kwq/Makefile.am
@@ -35,6 +35,7 @@ libkwq_o_SOURCES = \
KWQFrame.mm \
KWQGlobal.mm \
KWQGuardedPtr.mm \
+ KWQInvisibleButton.mm \
KWQPoint.mm \
KWQPtrDictImpl.mm \
KWQRect.mm \
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 3d7b12b..24e1595 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,21 @@
+2002-04-19 Kenneth Kocienda <kocienda at apple.com>
+
+ Changes to support submission of forms using HTTP POST.
+
+ These changes move us over to using the new WebKit interface for creating
+ WebDataSource instances, one that passes a handle rather than just a URL,
+ enabling the specific request method to be communicated to WebFoundation.
+ This fixes:
+
+ Radar 2903602 (IFWebDataSource API must passes attributes and flags to IFURLHandle)
+
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/IFWebDataSource.h:
+ * WebView.subproj/IFWebDataSource.mm: (IFWebDataSourceMake), (-[IFWebDataSource
+ initWithURL:]), (-[IFWebDataSource initWithHandle:]):
+ * WebView.subproj/IFWebDataSourcePrivate.h:
+ * WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _startLoading:]):
+
2002-04-19 Richard Williamson <rjw at apple.com>
Updated comments to reflect new API.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 3d7b12b..24e1595 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,21 @@
+2002-04-19 Kenneth Kocienda <kocienda at apple.com>
+
+ Changes to support submission of forms using HTTP POST.
+
+ These changes move us over to using the new WebKit interface for creating
+ WebDataSource instances, one that passes a handle rather than just a URL,
+ enabling the specific request method to be communicated to WebFoundation.
+ This fixes:
+
+ Radar 2903602 (IFWebDataSource API must passes attributes and flags to IFURLHandle)
+
+ * WebKit.pbproj/project.pbxproj:
+ * WebView.subproj/IFWebDataSource.h:
+ * WebView.subproj/IFWebDataSource.mm: (IFWebDataSourceMake), (-[IFWebDataSource
+ initWithURL:]), (-[IFWebDataSource initWithHandle:]):
+ * WebView.subproj/IFWebDataSourcePrivate.h:
+ * WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _startLoading:]):
+
2002-04-19 Richard Williamson <rjw at apple.com>
Updated comments to reflect new API.
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index 56a5b3e..caa76cc 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 38;
+ objectVersion = 36;
objects = {
014CEA440018CDF011CA2923 = {
buildRules = (
diff --git a/WebKit/WebView.subproj/IFWebDataSource.h b/WebKit/WebView.subproj/IFWebDataSource.h
index 4886b38..c1cf6b8 100644
--- a/WebKit/WebView.subproj/IFWebDataSource.h
+++ b/WebKit/WebView.subproj/IFWebDataSource.h
@@ -15,6 +15,7 @@
============================================================================= */
@class IFWebFrame;
+ at class IFURLHandle;
@protocol IFWebController;
#ifdef TENTATIVE_API
@@ -31,6 +32,7 @@
// Returns nil if object cannot be initialized due to a malformed URL (RFC 1808).
- initWithURL: (NSURL *)inputURL;
+- initWithHandle: (IFURLHandle *)theHandle;
#ifdef TENTATIVE_API
- initWithData: (NSData *)data;
diff --git a/WebKit/WebView.subproj/IFWebDataSource.mm b/WebKit/WebView.subproj/IFWebDataSource.mm
index b4bda31..ddc9ed1 100644
--- a/WebKit/WebView.subproj/IFWebDataSource.mm
+++ b/WebKit/WebView.subproj/IFWebDataSource.mm
@@ -9,6 +9,7 @@
#import <WebKit/WebKitDebug.h>
#import <WebKit/IFWebController.h>
#import <WebKit/IFWebFrame.h>
+#import <WebFoundation/WebFoundation.h>
#import <xml/dom_docimpl.h>
#import <khtml_part.h>
@@ -17,9 +18,9 @@
@implementation IFWebDataSource
-static id IFWebDataSourceMake(void *url)
+static id IFWebDataSourceMake(void *handle)
{
- return [[[IFWebDataSource alloc] initWithURL: (NSURL *)url] autorelease];
+ return [[[IFWebDataSource alloc] initWithHandle: (IFURLHandle *)handle] autorelease];
}
+ (void)load
@@ -33,11 +34,20 @@ static id IFWebDataSourceMake(void *url)
}
// Returns nil if object cannot be initialized due to a malformed URL (RFC 1808).
-- initWithURL: (NSURL *)inputURL
+- initWithURL: (NSURL *)inputURL
+{
+ IFURLHandle *handle;
+
+ handle = [[[IFURLHandle alloc] initWithURL: inputURL attributes: nil flags: 0] autorelease];
+ return [self initWithHandle: handle];
+}
+
+- initWithHandle: (IFURLHandle *)handle
{
[super init];
[self _commonInitialization];
- _private->inputURL = [inputURL retain];
+ _private->mainHandle = [handle retain];
+ _private->inputURL = [[handle url] retain];
return self;
}
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
index 7a559f9..2a918ec 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
@@ -34,7 +34,7 @@ class KHTMLPart;
// The main handle.
IFURLHandle *mainHandle;
-
+
// The handle client for the main document associated with the
// datasource.
IFMainURLHandleClient *mainURLHandleClient;
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index cd8fed1..23de289 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -144,8 +144,6 @@
theURL = [NSURL URLWithString:urlString];
_private->mainURLHandleClient = [[IFMainURLHandleClient alloc] initWithDataSource: self part: _private->part];
-
- _private->mainHandle = [[IFURLHandle alloc] initWithURL:theURL];
[_private->mainHandle addClient: _private->mainURLHandleClient];
// Mark the start loading time.
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index 4886b38..c1cf6b8 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -15,6 +15,7 @@
============================================================================= */
@class IFWebFrame;
+ at class IFURLHandle;
@protocol IFWebController;
#ifdef TENTATIVE_API
@@ -31,6 +32,7 @@
// Returns nil if object cannot be initialized due to a malformed URL (RFC 1808).
- initWithURL: (NSURL *)inputURL;
+- initWithHandle: (IFURLHandle *)theHandle;
#ifdef TENTATIVE_API
- initWithData: (NSData *)data;
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index b4bda31..ddc9ed1 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -9,6 +9,7 @@
#import <WebKit/WebKitDebug.h>
#import <WebKit/IFWebController.h>
#import <WebKit/IFWebFrame.h>
+#import <WebFoundation/WebFoundation.h>
#import <xml/dom_docimpl.h>
#import <khtml_part.h>
@@ -17,9 +18,9 @@
@implementation IFWebDataSource
-static id IFWebDataSourceMake(void *url)
+static id IFWebDataSourceMake(void *handle)
{
- return [[[IFWebDataSource alloc] initWithURL: (NSURL *)url] autorelease];
+ return [[[IFWebDataSource alloc] initWithHandle: (IFURLHandle *)handle] autorelease];
}
+ (void)load
@@ -33,11 +34,20 @@ static id IFWebDataSourceMake(void *url)
}
// Returns nil if object cannot be initialized due to a malformed URL (RFC 1808).
-- initWithURL: (NSURL *)inputURL
+- initWithURL: (NSURL *)inputURL
+{
+ IFURLHandle *handle;
+
+ handle = [[[IFURLHandle alloc] initWithURL: inputURL attributes: nil flags: 0] autorelease];
+ return [self initWithHandle: handle];
+}
+
+- initWithHandle: (IFURLHandle *)handle
{
[super init];
[self _commonInitialization];
- _private->inputURL = [inputURL retain];
+ _private->mainHandle = [handle retain];
+ _private->inputURL = [[handle url] retain];
return self;
}
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 7a559f9..2a918ec 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -34,7 +34,7 @@ class KHTMLPart;
// The main handle.
IFURLHandle *mainHandle;
-
+
// The handle client for the main document associated with the
// datasource.
IFMainURLHandleClient *mainURLHandleClient;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index cd8fed1..23de289 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -144,8 +144,6 @@
theURL = [NSURL URLWithString:urlString];
_private->mainURLHandleClient = [[IFMainURLHandleClient alloc] initWithDataSource: self part: _private->part];
-
- _private->mainHandle = [[IFURLHandle alloc] initWithURL:theURL];
[_private->mainHandle addClient: _private->mainURLHandleClient];
// Mark the start loading time.
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list