[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 08:26:53 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit ee217199e2e4fcd0d38ad9919014353de83a242e
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 18 00:45:07 2004 +0000
Reviewed by Darin.
<rdar://problem/3537397>: REGRESSION (100-114): Return doesn't work in Japanese input method for some HomePage fields
* kwq/KWQTextArea.mm:
(-[KWQTextAreaTextView keyDown:]): Don't send events through DOM when there is marked
text.
(-[KWQTextAreaTextView keyUp:]): Ditto.
* kwq/KWQTextField.mm:
(-[KWQTextField textView:shouldHandleEvent:]): Ditto.
(-[KWQSecureTextField textView:shouldHandleEvent:]): Ditto.
* khtml/html/html_formimpl.cpp:
(HTMLInputElementImpl::defaultEventHandler): No need to check for
marked text on "return" any more, because we won't send key events
through the DOM at all when there is marked text.
* kwq/KWQLineEdit.h:
* kwq/KWQLineEdit.mm: Removed haveMarkedText method, no longer
used by anything.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 5dec03a..84f6591 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,24 @@
+2004-02-17 Maciej Stachowiak <mjs at apple.com>
+
+ Reviewed by Darin.
+
+ <rdar://problem/3537397>: REGRESSION (100-114): Return doesn't work in Japanese input method for some HomePage fields
+
+ * kwq/KWQTextArea.mm:
+ (-[KWQTextAreaTextView keyDown:]): Don't send events through DOM when there is marked
+ text.
+ (-[KWQTextAreaTextView keyUp:]): Ditto.
+ * kwq/KWQTextField.mm:
+ (-[KWQTextField textView:shouldHandleEvent:]): Ditto.
+ (-[KWQSecureTextField textView:shouldHandleEvent:]): Ditto.
+ * khtml/html/html_formimpl.cpp:
+ (HTMLInputElementImpl::defaultEventHandler): No need to check for
+ marked text on "return" any more, because we won't send key events
+ through the DOM at all when there is marked text.
+ * kwq/KWQLineEdit.h:
+ * kwq/KWQLineEdit.mm: Removed haveMarkedText method, no longer
+ used by anything.
+
2004-02-16 Chris Blumenberg <cblu at apple.com>
WebCore side of pasting image data.
diff --git a/WebCore/khtml/html/html_formimpl.cpp b/WebCore/khtml/html/html_formimpl.cpp
index b06ce61..42d4f81 100644
--- a/WebCore/khtml/html/html_formimpl.cpp
+++ b/WebCore/khtml/html/html_formimpl.cpp
@@ -1835,12 +1835,8 @@ void HTMLInputElementImpl::defaultEventHandler(EventImpl *evt)
case TEXT:
case PASSWORD: {
// For enter, find the first successful image or submit element
- // send it a simulated mouse click only if the text input manager has
- // no marked text. If it does, then return needs to work in the
- // "accept" role for the input method.
- QWidget *widget = static_cast<RenderWidget *>(m_render)->widget();
- bool hasMarkedText = widget ? static_cast<QLineEdit *>(widget)->hasMarkedText() : false;
- if (!hasMarkedText && key == "Enter") {
+ // send it a simulated mouse click.
+ if (key == "Enter") {
m_form->submitClick();
evt->setDefaultHandled();
}
diff --git a/WebCore/kwq/KWQLineEdit.h b/WebCore/kwq/KWQLineEdit.h
index 39fb4df..fcdc157 100644
--- a/WebCore/kwq/KWQLineEdit.h
+++ b/WebCore/kwq/KWQLineEdit.h
@@ -68,8 +68,6 @@ public:
void clicked();
- bool hasMarkedText();
-
virtual bool checksDescendantsForFocus() const;
private:
diff --git a/WebCore/kwq/KWQLineEdit.mm b/WebCore/kwq/KWQLineEdit.mm
index 0bf42aa..715a7ab 100644
--- a/WebCore/kwq/KWQLineEdit.mm
+++ b/WebCore/kwq/KWQLineEdit.mm
@@ -223,14 +223,6 @@ void QLineEdit::clicked()
m_clicked.call();
}
-bool QLineEdit::hasMarkedText()
-{
- KWQ_BLOCK_EXCEPTIONS;
- return [[NSInputManager currentInputManager] hasMarkedText];
- KWQ_UNBLOCK_EXCEPTIONS;
- return false;
-}
-
void QLineEdit::setAlignment(AlignmentFlags alignment)
{
KWQ_BLOCK_EXCEPTIONS;
diff --git a/WebCore/kwq/KWQTextArea.mm b/WebCore/kwq/KWQTextArea.mm
index 388207c..787c886 100644
--- a/WebCore/kwq/KWQTextArea.mm
+++ b/WebCore/kwq/KWQTextArea.mm
@@ -709,7 +709,8 @@ static NSString *WebContinuousSpellCheckingEnabled = @"WebContinuousSpellCheckin
if (disabled)
return;
WebCoreBridge *bridge = KWQKHTMLPart::bridgeForWidget(widget);
- if (![bridge interceptKeyEvent:event toView:self]) {
+ if ([[NSInputManager currentInputManager] hasMarkedText] ||
+ ![bridge interceptKeyEvent:event toView:self]) {
[super keyDown:event];
}
}
@@ -719,7 +720,9 @@ static NSString *WebContinuousSpellCheckingEnabled = @"WebContinuousSpellCheckin
if (disabled)
return;
WebCoreBridge *bridge = KWQKHTMLPart::bridgeForWidget(widget);
- [bridge interceptKeyEvent:event toView:self];
+ if (![[NSInputManager currentInputManager] hasMarkedText]) {
+ [bridge interceptKeyEvent:event toView:self];
+ }
// Don't call super because NSTextView will simply pass the
// event along the responder chain. This is arguably a bug in
// NSTextView; see Radar 3507083.
diff --git a/WebCore/kwq/KWQTextField.mm b/WebCore/kwq/KWQTextField.mm
index fb8e554..8176cb0 100644
--- a/WebCore/kwq/KWQTextField.mm
+++ b/WebCore/kwq/KWQTextField.mm
@@ -506,7 +506,8 @@
}
NSEventType type = [event type];
- if (type == NSKeyDown || type == NSKeyUp) {
+ if ((type == NSKeyDown || type == NSKeyUp) &&
+ ![[NSInputManager currentInputManager] hasMarkedText]) {
WebCoreBridge *bridge = KWQKHTMLPart::bridgeForWidget(widget);
BOOL intercepted = [bridge interceptKeyEvent:event toView:view];
// Always return NO for key up events because we don't want them
@@ -843,7 +844,8 @@
return YES;
}
- if ([event type] == NSKeyDown || [event type] == NSKeyUp) {
+ if (([event type] == NSKeyDown || [event type] == NSKeyUp) &&
+ ![[NSInputManager currentInputManager] hasMarkedText]) {
WebCoreBridge *bridge = KWQKHTMLPart::bridgeForWidget(widget);
return ![bridge interceptKeyEvent:event toView:view];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list