[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 08:51:35 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a8ce456bc1def6a90bdefff513fa9316b2d14e9d
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 20 15:38:14 2004 +0000
WebCore:
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body
* khtml/khtml_part.cpp:
(KHTMLPart::setCaretVisible): This method renamed from setSelectionVisible. Since it really only operates
on the caret, this seems like a better name.
* khtml/khtml_part.h:
* khtml/khtmlview.cpp:
(KHTMLView::focusInEvent): Call setCaretVisible(true)
(KHTMLView::focusOutEvent): Call setCaretVisible(false)
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::setShowsFirstResponder): Name change: setSelectionVisible becomes setCaretVisible.
* kwq/WebCoreBridge.h: Expose setCaretVisible as a bridge method.
* kwq/WebCoreBridge.mm:
(-[WebCoreBridge setCaretVisible:]): Ditto.
WebKit:
Reviewed by Hyatt
Fix for this bug:
<rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView setCaretVisible:]): New helper. Calls over bridge to do the work.
(-[WebHTMLView windowDidBecomeKey:]): This function cannot just assume that self is first responder
(and do things like adjusting text background color and restoring focus rings).
First-responder-ness needs to be checked first. Now it is.
(-[WebHTMLView windowDidResignKey:]): Ditto.
(-[WebHTMLView becomeFirstResponder]): Call new helper to make caret visible.
(-[WebHTMLView resignFirstResponder]): Call new helper to make caret invisible.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7061 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 344e602..00b1e5a 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,24 @@
+2004-07-20 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Hyatt
+
+ Fix for this bug:
+
+ <rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body
+
+ * khtml/khtml_part.cpp:
+ (KHTMLPart::setCaretVisible): This method renamed from setSelectionVisible. Since it really only operates
+ on the caret, this seems like a better name.
+ * khtml/khtml_part.h:
+ * khtml/khtmlview.cpp:
+ (KHTMLView::focusInEvent): Call setCaretVisible(true)
+ (KHTMLView::focusOutEvent): Call setCaretVisible(false)
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::setShowsFirstResponder): Name change: setSelectionVisible becomes setCaretVisible.
+ * kwq/WebCoreBridge.h: Expose setCaretVisible as a bridge method.
+ * kwq/WebCoreBridge.mm:
+ (-[WebCoreBridge setCaretVisible:]): Ditto.
+
2004-07-19 Maciej Stachowiak <mjs at apple.com>
Reviewed by Trey.
diff --git a/WebCore/khtml/khtml_part.cpp b/WebCore/khtml/khtml_part.cpp
index be41a84..5a41a76 100644
--- a/WebCore/khtml/khtml_part.cpp
+++ b/WebCore/khtml/khtml_part.cpp
@@ -2315,7 +2315,7 @@ void KHTMLPart::invalidateSelection()
selectionLayoutChanged();
}
-void KHTMLPart::setSelectionVisible(bool flag)
+void KHTMLPart::setCaretVisible(bool flag)
{
if (d->m_caretVisible == flag)
return;
diff --git a/WebCore/khtml/khtml_part.h b/WebCore/khtml/khtml_part.h
index 87bae96..ad0f66a 100644
--- a/WebCore/khtml/khtml_part.h
+++ b/WebCore/khtml/khtml_part.h
@@ -603,7 +603,7 @@ public:
/**
* Controls the visibility of the selection.
*/
- void setSelectionVisible(bool flag=true);
+ void setCaretVisible(bool flag=true);
/**
* Paints the caret.
diff --git a/WebCore/khtml/khtmlview.cpp b/WebCore/khtml/khtmlview.cpp
index 8120d40..d49fc86 100644
--- a/WebCore/khtml/khtmlview.cpp
+++ b/WebCore/khtml/khtmlview.cpp
@@ -1937,14 +1937,14 @@ void KHTMLView::dropEvent( QDropEvent *ev )
void KHTMLView::focusInEvent( QFocusEvent *e )
{
- m_part->setSelectionVisible();
+ m_part->setCaretVisible();
QScrollView::focusInEvent( e );
}
void KHTMLView::focusOutEvent( QFocusEvent *e )
{
m_part->stopAutoScroll();
- m_part->setSelectionVisible(false);
+ m_part->setCaretVisible(false);
QScrollView::focusOutEvent( e );
}
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index 0d8a1d3..040fbe5 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -3277,7 +3277,7 @@ void KWQKHTMLPart::setShowsFirstResponder(bool flag)
if (node && node->renderer())
node->renderer()->repaint();
}
- setSelectionVisible(flag);
+ setCaretVisible(flag);
}
}
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 67b447b..847767b 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -305,6 +305,8 @@ typedef enum {
- (void)insertText:(NSString *)text;
- (void)insertNewline;
+- (void)setCaretVisible:(BOOL)flag;
+
- (void)setSelectionToDragCaret;
- (void)moveSelectionToDragCaret:(DOMDocumentFragment *)selectionFragment;
- (void)moveDragCaretToPoint:(NSPoint)point;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index abce3c4..2c9ddd0 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -1487,6 +1487,14 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
[self ensureCaretVisible];
}
+- (void)setCaretVisible:(BOOL)flag
+{
+ if (!_part)
+ return;
+
+ _part->setCaretVisible(flag);
+}
+
- (void)setSelectionToDragCaret
{
_part->setSelection(_part->dragCaret());
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index e0c36b5..f26514b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,20 @@
+2004-07-20 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Hyatt
+
+ Fix for this bug:
+
+ <rdar://problem/3707505> HTMLCompose: blinking cursor in both an address text field and the message body
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView setCaretVisible:]): New helper. Calls over bridge to do the work.
+ (-[WebHTMLView windowDidBecomeKey:]): This function cannot just assume that self is first responder
+ (and do things like adjusting text background color and restoring focus rings).
+ First-responder-ness needs to be checked first. Now it is.
+ (-[WebHTMLView windowDidResignKey:]): Ditto.
+ (-[WebHTMLView becomeFirstResponder]): Call new helper to make caret visible.
+ (-[WebHTMLView resignFirstResponder]): Call new helper to make caret invisible.
+
2004-07-12 Richard Williamson <rjw at apple.com>
Fixed 3721917. The RealPlayer plugin doesn't support the new
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 2eb393f..423b0f4 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -1258,6 +1258,11 @@ static WebHTMLView *lastHitView = nil;
}
}
+- (void)setCaretVisible:(BOOL)flag
+{
+ [[self _bridge] setCaretVisible:flag];
+}
+
- (BOOL)maintainsInactiveSelection
{
// This method helps to determing whether the view should maintain
@@ -1705,16 +1710,20 @@ static WebHTMLView *lastHitView = nil;
{
ASSERT([notification object] == [self window]);
[self addMouseMovedObserver];
- [self updateTextBackgroundColor];
- [self updateShowsFirstResponder];
+ if ([self firstResponderIsSelfOrDescendantView]) {
+ [self updateTextBackgroundColor];
+ [self updateShowsFirstResponder];
+ }
}
- (void)windowDidResignKey: (NSNotification *)notification
{
ASSERT([notification object] == [self window]);
[self removeMouseMovedObserver];
- [self updateTextBackgroundColor];
- [self updateShowsFirstResponder];
+ if ([self firstResponderIsSelfOrDescendantView]) {
+ [self updateTextBackgroundColor];
+ [self updateShowsFirstResponder];
+ }
}
- (void)windowWillClose:(NSNotification *)notification
@@ -2054,6 +2063,7 @@ static WebHTMLView *lastHitView = nil;
if (view) {
[[self window] makeFirstResponder:view];
}
+ [self setCaretVisible:YES];
[self updateTextBackgroundColor];
return YES;
}
@@ -2073,6 +2083,7 @@ static WebHTMLView *lastHitView = nil;
[self deselectAll];
}
}
+ [self setCaretVisible:NO];
[self updateTextBackgroundColor];
_private->resigningFirstResponder = NO;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list