[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:40:51 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 094d1b35565f7bf2420770e6628633eb31b5e3ff
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu May 8 01:01:50 2003 +0000

    WebCore:
    
            Reviewed by John.
    
    	- fixed 3127927 -- web view should not use primary selection color when it's not first responder
    
            * kwq/WebCoreBridge.h: Added usesInactiveTextBackgroundColor getter and setter.
            * kwq/WebCoreBridge.mm:
            (-[WebCoreBridge drawRect:]): Set the QPainter's usesInactiveTextBackgroundColor to match the
            value from the part.
            (-[WebCoreBridge selectionRect]): Fix nil-deref that happened in the no-KHTMLView case.
            (-[WebCoreBridge setUsesInactiveTextBackgroundColor:]): Added.
            (-[WebCoreBridge usesInactiveTextBackgroundColor]): Added.
    
            * kwq/KWQKHTMLPart.h: Added usesInactiveTextBackgroundColor, including getter and setter.
            * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): Initialize usesInactiveTextBackgroundColor.
    
            * kwq/KWQPainter.h: Added setUsesInactiveTextBackgroundColor and made selectedTextBackgroundColor
            a const member function, not a static one.
            * kwq/KWQPainter.mm:
            (QPainter::QPainter): Initialize _usesInactiveTextBackgroundColor to false.
            (QPainter::selectedTextBackgroundColor): Return secondarySelectedControlColor instead of
            selectedTextBackgroundColor if _usesInactiveTextBackgroundColor is true.
    
            * khtml/rendering/render_text.cpp: (TextRun::paintSelection): Call selectedTextBackgroundColor
            on the painter object; it's no longer a static member function.
    
            * khtml/rendering/render_root.cpp: (RenderRoot::selectionRect): Fix nil-deref that happened
            in the no-selection case.
    
    WebKit:
    
            Reviewed by John.
    
    	- fixed 3127927 -- web view should not use primary selection color when it's not first responder
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView updateTextBackgroundColor]): Added. Sets the usesInactiveTextBackgroundColor flag
            on the bridge, and does setNeedsDisplayInRect: of the selectionRect if the state changes.
            (-[WebHTMLView viewDidMoveToWindow]): Call updateTextBackgroundColor.
            (-[WebHTMLView windowDidBecomeKey:]): Call updateTextBackgroundColor.
            (-[WebHTMLView windowDidResignKey:]): Call updateTextBackgroundColor.
            (-[WebHTMLView becomeFirstResponder]): Call updateTextBackgroundColor.
            (-[WebHTMLView resignFirstResponder]): Call updateTextBackgroundColor.
    
            - fixed up WebHistoryItem initializers so there is a designated initializer
    
            * History.subproj/WebHistoryItem.m:
            (-[WebHistoryItem init]): Call initWithURLString:title:lastVisitedTimeInterval:,
            which is the designated initializer.
            (-[WebHistoryItem initWithURL:title:]): Ditto.
            (-[WebHistoryItem initWithURL:target:parent:title:]): Ditto.
    
            - other changes
    
            * History.subproj/WebHistoryPrivate.m: (-[WebHistoryPrivate addItem:]): Fixed assertion
            to not use _lastVisitedDate; we're trying to get rid of calls to that method.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4304 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 41241e3..4ef7821 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,33 @@
+2003-05-07  Darin Adler  <darin at apple.com>
+
+        Reviewed by John.
+
+	- fixed 3127927 -- web view should not use primary selection color when it's not first responder
+
+        * kwq/WebCoreBridge.h: Added usesInactiveTextBackgroundColor getter and setter.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge drawRect:]): Set the QPainter's usesInactiveTextBackgroundColor to match the
+        value from the part.
+        (-[WebCoreBridge selectionRect]): Fix nil-deref that happened in the no-KHTMLView case.
+        (-[WebCoreBridge setUsesInactiveTextBackgroundColor:]): Added.
+        (-[WebCoreBridge usesInactiveTextBackgroundColor]): Added.
+
+        * kwq/KWQKHTMLPart.h: Added usesInactiveTextBackgroundColor, including getter and setter.
+        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): Initialize usesInactiveTextBackgroundColor.
+
+        * kwq/KWQPainter.h: Added setUsesInactiveTextBackgroundColor and made selectedTextBackgroundColor
+        a const member function, not a static one.
+        * kwq/KWQPainter.mm:
+        (QPainter::QPainter): Initialize _usesInactiveTextBackgroundColor to false.
+        (QPainter::selectedTextBackgroundColor): Return secondarySelectedControlColor instead of
+        selectedTextBackgroundColor if _usesInactiveTextBackgroundColor is true.
+
+        * khtml/rendering/render_text.cpp: (TextRun::paintSelection): Call selectedTextBackgroundColor
+        on the painter object; it's no longer a static member function.
+
+        * khtml/rendering/render_root.cpp: (RenderRoot::selectionRect): Fix nil-deref that happened
+        in the no-selection case.
+
 2003-05-07  Vicki Murley  <vicki at apple.com>
 
         Reviewed by darin.
@@ -1407,7 +1437,6 @@
 	Return a nil for a null element instead of croaking.
         (-[WebCoreDOMNode initWithImpl:DOM::]):  Ditto.
 
->>>>>>> 1.1620
 2003-04-14  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Trey.
@@ -9024,9 +9053,7 @@ lowed. :)
 	Fixed: 3131267 - REGRESSION: Java 1.4.1 Applets Restarted When Window is Resized
 	Fixed: 3131244 - REGRESSION: Java 1.4.1 Multiple Copies of Applet Started When Window is Resized
 
-	Dave recently patched khtml with a fix for media content inside of table cells. The patch causes the java widget to get the layout call more than once. Calling layout more than once is perfectly allowed, but the java widget wasn't prepared for that and w
-
-ould create a new java view for each layout. We now only create a java view when the java view hasn't already been created.
+	Dave recently patched khtml with a fix for media content inside of table cells. The patch causes the java widget to get the layout call more than once. Calling layout more than once is perfectly allowed, but the java widget wasn't prepared for that and would create a new java view for each layout. We now only create a java view when the java view hasn't already been created.
 
         Reviewed by darin.
 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 41241e3..4ef7821 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,33 @@
+2003-05-07  Darin Adler  <darin at apple.com>
+
+        Reviewed by John.
+
+	- fixed 3127927 -- web view should not use primary selection color when it's not first responder
+
+        * kwq/WebCoreBridge.h: Added usesInactiveTextBackgroundColor getter and setter.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge drawRect:]): Set the QPainter's usesInactiveTextBackgroundColor to match the
+        value from the part.
+        (-[WebCoreBridge selectionRect]): Fix nil-deref that happened in the no-KHTMLView case.
+        (-[WebCoreBridge setUsesInactiveTextBackgroundColor:]): Added.
+        (-[WebCoreBridge usesInactiveTextBackgroundColor]): Added.
+
+        * kwq/KWQKHTMLPart.h: Added usesInactiveTextBackgroundColor, including getter and setter.
+        * kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::KWQKHTMLPart): Initialize usesInactiveTextBackgroundColor.
+
+        * kwq/KWQPainter.h: Added setUsesInactiveTextBackgroundColor and made selectedTextBackgroundColor
+        a const member function, not a static one.
+        * kwq/KWQPainter.mm:
+        (QPainter::QPainter): Initialize _usesInactiveTextBackgroundColor to false.
+        (QPainter::selectedTextBackgroundColor): Return secondarySelectedControlColor instead of
+        selectedTextBackgroundColor if _usesInactiveTextBackgroundColor is true.
+
+        * khtml/rendering/render_text.cpp: (TextRun::paintSelection): Call selectedTextBackgroundColor
+        on the painter object; it's no longer a static member function.
+
+        * khtml/rendering/render_root.cpp: (RenderRoot::selectionRect): Fix nil-deref that happened
+        in the no-selection case.
+
 2003-05-07  Vicki Murley  <vicki at apple.com>
 
         Reviewed by darin.
@@ -1407,7 +1437,6 @@
 	Return a nil for a null element instead of croaking.
         (-[WebCoreDOMNode initWithImpl:DOM::]):  Ditto.
 
->>>>>>> 1.1620
 2003-04-14  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Trey.
@@ -9024,9 +9053,7 @@ lowed. :)
 	Fixed: 3131267 - REGRESSION: Java 1.4.1 Applets Restarted When Window is Resized
 	Fixed: 3131244 - REGRESSION: Java 1.4.1 Multiple Copies of Applet Started When Window is Resized
 
-	Dave recently patched khtml with a fix for media content inside of table cells. The patch causes the java widget to get the layout call more than once. Calling layout more than once is perfectly allowed, but the java widget wasn't prepared for that and w
-
-ould create a new java view for each layout. We now only create a java view when the java view hasn't already been created.
+	Dave recently patched khtml with a fix for media content inside of table cells. The patch causes the java widget to get the layout call more than once. Calling layout more than once is perfectly allowed, but the java widget wasn't prepared for that and would create a new java view for each layout. We now only create a java view when the java view hasn't already been created.
 
         Reviewed by darin.
 
diff --git a/WebCore/khtml/rendering/render_root.cpp b/WebCore/khtml/rendering/render_root.cpp
index c58835f..afae5ec 100644
--- a/WebCore/khtml/rendering/render_root.cpp
+++ b/WebCore/khtml/rendering/render_root.cpp
@@ -315,8 +315,10 @@ static QRect enclosingPositionedRect (RenderObject *n)
 QRect RenderRoot::selectionRect() const
 {
     RenderObject *r = m_selectionStart;
+    if (!r)
+        return QRect();
+    
     QRect selectionRect = enclosingPositionedRect(r);
-
     while (r && r != m_selectionEnd)
     {
         RenderObject* n;
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 4100497..cb70f64 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -81,7 +81,7 @@ void TextRun::paintSelection(const Font *f, RenderText *text, QPainter *p, Rende
 #if APPLE_CHANGES
     // Macintosh-style text highlighting is to draw with a particular background color, not invert.
     QColor textColor = style->color();
-    QColor c = QPainter::selectedTextBackgroundColor();
+    QColor c = p->selectedTextBackgroundColor();
     if (textColor == c)
         c = QColor(0xff - c.red(), 0xff - c.green(), 0xff - c.blue());
 
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index b64a638..09e9fa2 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -203,6 +203,9 @@ public:
     
     void setMediaType(const QString &);
 
+    void setUsesInactiveTextBackgroundColor(bool u) { _usesInactiveTextBackgroundColor = u; }
+    bool usesInactiveTextBackgroundColor() const { return _usesInactiveTextBackgroundColor; }
+
 private:
     virtual void khtmlMousePressEvent(khtml::MousePressEvent *);
     virtual void khtmlMouseDoubleClickEvent(khtml::MouseDoubleClickEvent *);
@@ -252,6 +255,8 @@ private:
     static QPtrList<KWQKHTMLPart> &mutableInstances();
 
     KWQWindowWidget *_windowWidget;
+    
+    bool _usesInactiveTextBackgroundColor;
 
     friend class KHTMLPart;
 };
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index ccf4634..e3f59a6 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -141,6 +141,7 @@ KWQKHTMLPart::KWQKHTMLPart()
     , _formValuesAboutToBeSubmitted(nil)
     , _formAboutToBeSubmitted(nil)
     , _windowWidget(NULL)
+    , _usesInactiveTextBackgroundColor(false)
 {
     // Must init the cache before connecting to any signals
     Cache::init();
diff --git a/WebCore/kwq/KWQPainter.h b/WebCore/kwq/KWQPainter.h
index a82f4cb..2735b08 100644
--- a/WebCore/kwq/KWQPainter.h
+++ b/WebCore/kwq/KWQPainter.h
@@ -98,8 +98,10 @@ public:
                   const QColor& backgroundColor, QPainter::TextDirection d,
                   int letterSpacing, int wordSpacing, bool smallCaps);
     void drawLineForText(int x, int y, int yOffset, int width);
-    static QColor selectedTextBackgroundColor();
-    
+
+    QColor selectedTextBackgroundColor() const;
+    void setUsesInactiveTextBackgroundColor(bool u) { _usesInactiveTextBackgroundColor = u; }
+
     bool paintingDisabled() const;
     void setPaintingDisabled(bool);
         
@@ -117,6 +119,7 @@ private:
 
     QPainterPrivate *data;
     bool _isForPrinting;
+    bool _usesInactiveTextBackgroundColor;
 };
 
 #endif
diff --git a/WebCore/kwq/KWQPainter.mm b/WebCore/kwq/KWQPainter.mm
index 88adf1d..e9a0783 100644
--- a/WebCore/kwq/KWQPainter.mm
+++ b/WebCore/kwq/KWQPainter.mm
@@ -56,13 +56,12 @@ struct QPainterPrivate {
     QFont textRendererFont;
 };
 
-QPainter::QPainter() : data(new QPainterPrivate), _isForPrinting(false)
+QPainter::QPainter() : data(new QPainterPrivate), _isForPrinting(false), _usesInactiveTextBackgroundColor(false)
 {
 }
 
-QPainter::QPainter(bool forPrinting) : data(new QPainterPrivate)
+QPainter::QPainter(bool forPrinting) : data(new QPainterPrivate), _isForPrinting(forPrinting), _usesInactiveTextBackgroundColor(false)
 {
-    _isForPrinting = forPrinting;
 }
 
 QPainter::~QPainter()
@@ -527,9 +526,10 @@ void QPainter::drawLineForText(int x, int y, int yOffset, int width)
              withColor:data->state.pen.color().getNSColor()];
 }
 
-QColor QPainter::selectedTextBackgroundColor()
+QColor QPainter::selectedTextBackgroundColor() const
 {
-    NSColor *color = [[NSColor selectedTextBackgroundColor] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
+    NSColor *color = _usesInactiveTextBackgroundColor ? [NSColor secondarySelectedControlColor] : [NSColor selectedTextBackgroundColor];
+    color = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
     return QColor((int)(255 * [color redComponent]), (int)(255 * [color greenComponent]), (int)(255 * [color blueComponent]));
 }
 
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index 176624c..350da62 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -150,6 +150,9 @@ enum FrameBorderStyle {
 - (void)drawRect:(NSRect)rect;
 - (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
 
+- (void)setUsesInactiveTextBackgroundColor:(BOOL)uses;
+- (BOOL)usesInactiveTextBackgroundColor;
+
 - (void)mouseDown:(NSEvent *)event;
 - (void)mouseUp:(NSEvent *)event;
 - (void)mouseMoved:(NSEvent *)event;
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 6becf03..530de20 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -378,6 +378,7 @@ static BOOL nowPrinting(WebCoreBridge *self)
 - (void)drawRect:(NSRect)rect
 {
     QPainter painter(nowPrinting(self));
+    painter.setUsesInactiveTextBackgroundColor(_part->usesInactiveTextBackgroundColor());
     [self drawRect:rect withPainter:&painter];
 }
 
@@ -809,12 +810,15 @@ static HTMLFormElementImpl *formElementFromDOMElement(id <WebDOMElement>element)
 
 - (NSRect)selectionRect
 {
-    NSView *view = _part->view()->getDocumentView();
+    KHTMLView *view = _part->view();
     if (!view) {
         return NSZeroRect;
     }
-
-    return NSIntersectionRect(NSRect(_part->selectionRect()), [view visibleRect]); 
+    NSView *documentView = view->getDocumentView();
+    if (!documentView) {
+        return NSZeroRect;
+    }
+    return NSIntersectionRect(_part->selectionRect(), [documentView visibleRect]); 
 }
 
 - (NSImage *)selectionImage
@@ -911,4 +915,14 @@ static HTMLFormElementImpl *formElementFromDOMElement(id <WebDOMElement>element)
     return externalRepresentation(_part->renderer()).getNSString();
 }
 
+- (void)setUsesInactiveTextBackgroundColor:(BOOL)uses
+{
+    _part->setUsesInactiveTextBackgroundColor(uses);
+}
+
+- (BOOL)usesInactiveTextBackgroundColor
+{
+    return _part->usesInactiveTextBackgroundColor();
+}
+
 @end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 11fdcd2..7ebc8dd 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,31 @@
+2003-05-07  Darin Adler  <darin at apple.com>
+
+        Reviewed by John.
+
+	- fixed 3127927 -- web view should not use primary selection color when it's not first responder
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView updateTextBackgroundColor]): Added. Sets the usesInactiveTextBackgroundColor flag
+        on the bridge, and does setNeedsDisplayInRect: of the selectionRect if the state changes.
+        (-[WebHTMLView viewDidMoveToWindow]): Call updateTextBackgroundColor.
+        (-[WebHTMLView windowDidBecomeKey:]): Call updateTextBackgroundColor.
+        (-[WebHTMLView windowDidResignKey:]): Call updateTextBackgroundColor.
+        (-[WebHTMLView becomeFirstResponder]): Call updateTextBackgroundColor.
+        (-[WebHTMLView resignFirstResponder]): Call updateTextBackgroundColor.
+
+        - fixed up WebHistoryItem initializers so there is a designated initializer
+
+        * History.subproj/WebHistoryItem.m:
+        (-[WebHistoryItem init]): Call initWithURLString:title:lastVisitedTimeInterval:,
+        which is the designated initializer.
+        (-[WebHistoryItem initWithURL:title:]): Ditto.
+        (-[WebHistoryItem initWithURL:target:parent:title:]): Ditto.
+
+        - other changes
+
+        * History.subproj/WebHistoryPrivate.m: (-[WebHistoryPrivate addItem:]): Fixed assertion
+        to not use _lastVisitedDate; we're trying to get rid of calls to that method.
+
 2003-05-07  Vicki Murley  <vicki at apple.com>
 
         Reviewed by darin.
diff --git a/WebKit/History.subproj/WebHistoryItem.m b/WebKit/History.subproj/WebHistoryItem.m
index c53fbcd..95d9daa 100644
--- a/WebKit/History.subproj/WebHistoryItem.m
+++ b/WebKit/History.subproj/WebHistoryItem.m
@@ -74,9 +74,7 @@ static NSString *WebDisplayTitleKey = @"displayTitle";
 
 - (id)init
 {
-    self = [super init];
-    _private = [[WebHistoryItemPrivate alloc] init];
-    return self;
+    return [self initWithURLString:nil title:nil lastVisitedTimeInterval:0];
 }
 
 - (id)initWithURLString:(NSString *)URLString title:(NSString *)title lastVisitedTimeInterval:(NSTimeInterval)time
@@ -243,17 +241,16 @@ static NSString *WebDisplayTitleKey = @"displayTitle";
 
 - (id)initWithURL:(NSURL *)URL title:(NSString *)title
 {
-    self = [self init];
-    [self setURL:URL];
-    _private->title = [title copy];
-    return self;
+    return [self initWithURLString:[URL absoluteString] title:title lastVisitedTimeInterval:0];
 }
 
 - (id)initWithURL:(NSURL *)URL target:(NSString *)target parent:(NSString *)parent title:(NSString *)title
 {
-    self = [self initWithURL:URL title:title];
-    _private->target = [target copy];
-    _private->parent = [parent copy];
+    self = [self initWithURLString:[URL absoluteString] title:title lastVisitedTimeInterval:0];
+    if (self) {
+        _private->target = [target copy];
+        _private->parent = [parent copy];
+    }
     return self;
 }
 
diff --git a/WebKit/History.subproj/WebHistoryPrivate.m b/WebKit/History.subproj/WebHistoryPrivate.m
index c24e044..cb2e4f3 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.m
+++ b/WebKit/History.subproj/WebHistoryPrivate.m
@@ -145,7 +145,8 @@ NSString *DatesArrayKey = @"WebHistoryDates";
     int dateIndex;
     NSString *URLString;
 
-    ASSERT_ARG(entry, [entry _lastVisitedDate] != nil);
+    ASSERT_ARG(entry, entry);
+    ASSERT_ARG(entry, [entry lastVisitedTimeInterval] != 0);
 
 #ifdef FIX_VISITED
     URLString = [[[entry URL] _web_canonicalize] absoluteString];
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index e233bf5..26065b1 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -135,6 +135,17 @@
     return YES;
 }
 
+- (void)updateTextBackgroundColor
+{
+    NSWindow *window = [self window];
+    BOOL shouldUseInactiveTextBackgroundColor = !([window isKeyWindow] && [window firstResponder] == self);
+    WebBridge *bridge = [self _bridge];
+    if ([bridge usesInactiveTextBackgroundColor] != shouldUseInactiveTextBackgroundColor) {
+        [bridge setUsesInactiveTextBackgroundColor:shouldUseInactiveTextBackgroundColor];
+        [self setNeedsDisplayInRect:[bridge selectionRect]];
+    }
+}
+
 - (void)addMouseMovedObserver
 {
     if ([[self window] isKeyWindow] && ![self _insideAnotherHTMLView]) {
@@ -234,6 +245,7 @@
         [self addWindowObservers];
         [self addSuperviewObservers];
         [self addMouseMovedObserver];
+        [self updateTextBackgroundColor];
 
         [[self _pluginController] startAllPlugins];
 
@@ -604,12 +616,14 @@
 {
     ASSERT([notification object] == [self window]);
     [self addMouseMovedObserver];
+    [self updateTextBackgroundColor];
 }
 
 - (void)windowDidResignKey: (NSNotification *)notification
 {
     ASSERT([notification object] == [self window]);
     [self removeMouseMovedObserver];
+    [self updateTextBackgroundColor];
 }
 
 - (void)windowWillClose:(NSNotification *)notification
@@ -778,7 +792,8 @@
     }
     if (view) {
         [[self window] makeFirstResponder:view];
-    } 
+    }
+    [self updateTextBackgroundColor];
     return YES;
 }
 
@@ -788,6 +803,7 @@
     BOOL resign = [super resignFirstResponder];
     if (resign) {
         [self deselectAll];
+        [self updateTextBackgroundColor];
     }
     return resign;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list