[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andersca at apple.com andersca at apple.com
Wed Dec 22 14:41:03 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b077e43854c2efde5a2f75ec0a9df0797e3f619e
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 15 21:31:13 2010 +0000

    Move find indicator window logic to WKView
    https://bugs.webkit.org/show_bug.cgi?id=47739
    
    Reviewed by Sam Weinig.
    
    * UIProcess/API/mac/PageClientImpl.h:
    * UIProcess/API/mac/PageClientImpl.mm:
    (WebKit::PageClientImpl::setFindIndicator):
    Call -[WKView _setFindIndicator:fadeOut:].
    
    * UIProcess/API/mac/WKView.mm:
    (-[WKView renewGState]):
    Hide the find indicator.
    
    (-[WKView _setFindIndicator:fadeOut:]):
    Move the find indicator logic here.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69878 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index f23762f..ff4e09d 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,25 @@
 
         Reviewed by Sam Weinig.
 
+        Move find indicator window logic to WKView
+        https://bugs.webkit.org/show_bug.cgi?id=47739
+
+        * UIProcess/API/mac/PageClientImpl.h:
+        * UIProcess/API/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::setFindIndicator):
+        Call -[WKView _setFindIndicator:fadeOut:].
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView renewGState]):
+        Hide the find indicator.
+
+        (-[WKView _setFindIndicator:fadeOut:]):
+        Move the find indicator logic here.
+
+2010-10-15  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Sam Weinig.
+
         Hide the find indicator/overlay when necessary
         https://bugs.webkit.org/show_bug.cgi?id=47737
 
diff --git a/WebKit2/UIProcess/API/mac/PageClientImpl.h b/WebKit2/UIProcess/API/mac/PageClientImpl.h
index 53262d8..6d37d25 100644
--- a/WebKit2/UIProcess/API/mac/PageClientImpl.h
+++ b/WebKit2/UIProcess/API/mac/PageClientImpl.h
@@ -73,7 +73,6 @@ private:
 
     WKView* m_wkView;
     RetainPtr<WebEditorUndoTargetObjC> m_undoTarget;
-    OwnPtr<FindIndicatorWindow> m_findIndicatorWindow;
 };
 
 } // namespace WebKit
diff --git a/WebKit2/UIProcess/API/mac/PageClientImpl.mm b/WebKit2/UIProcess/API/mac/PageClientImpl.mm
index 9c474a0..c10a4b7 100644
--- a/WebKit2/UIProcess/API/mac/PageClientImpl.mm
+++ b/WebKit2/UIProcess/API/mac/PageClientImpl.mm
@@ -26,7 +26,6 @@
 #import "PageClientImpl.h"
 
 #import "FindIndicator.h"
-#import "FindIndicatorWindow.h"
 #import "WKAPICast.h"
 #import "WKStringCF.h"
 #import "WKViewInternal.h"
@@ -229,15 +228,7 @@ void PageClientImpl::didNotHandleKeyEvent(const NativeWebKeyboardEvent&)
 
 void PageClientImpl::setFindIndicator(PassRefPtr<FindIndicator> findIndicator, bool fadeOut)
 {
-    if (!findIndicator) {
-        m_findIndicatorWindow = 0;
-        return;
-    }
-
-    if (!m_findIndicatorWindow)
-        m_findIndicatorWindow = FindIndicatorWindow::create(m_wkView);
-
-    m_findIndicatorWindow->setFindIndicator(findIndicator, fadeOut);
+    [m_wkView _setFindIndicator:findIndicator fadeOut:fadeOut];
 }
 
 #if USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm
index 55f0ab8..c8f8bc1 100644
--- a/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/WebKit2/UIProcess/API/mac/WKView.mm
@@ -30,6 +30,8 @@
 
 // Implementation
 #import "ChunkedUpdateDrawingAreaProxy.h"
+#import "FindIndicator.h"
+#import "FindIndicatorWindow.h"
 #import "LayerBackedDrawingAreaProxy.h"
 #import "NativeWebKeyboardEvent.h"
 #import "PageClientImpl.h"
@@ -83,6 +85,8 @@ struct EditCommandState {
     bool _isPerformingUpdate;
     
     HashMap<String, EditCommandState> _menuMap;
+
+    OwnPtr<FindIndicatorWindow> _findIndicatorWindow;
 }
 @end
 
@@ -174,6 +178,13 @@ struct EditCommandState {
     _data->_page->drawingArea()->setSize(IntSize(size));
 }
 
+- (void)renewGState
+{
+    // Hide the find indicator.
+    _data->_findIndicatorWindow = 0;
+
+    [super renewGState];
+}
 typedef HashMap<SEL, String> SelectorNameMap;
 
 // Map selectors into Editor command names.
@@ -660,6 +671,19 @@ static bool isViewVisible(NSView *view)
     }
 }
 
+- (void)_setFindIndicator:(PassRefPtr<FindIndicator>)findIndicator fadeOut:(BOOL)fadeOut
+{
+    if (!findIndicator) {
+        _data->_findIndicatorWindow = 0;
+        return;
+    }
+
+    if (!_data->_findIndicatorWindow)
+        _data->_findIndicatorWindow = FindIndicatorWindow::create(self);
+
+    _data->_findIndicatorWindow->setFindIndicator(findIndicator, fadeOut);
+}
+
 #if USE(ACCELERATED_COMPOSITING)
 - (void)_startAcceleratedCompositing:(CALayer *)rootLayer
 {
diff --git a/WebKit2/UIProcess/API/mac/WKViewInternal.h b/WebKit2/UIProcess/API/mac/WKViewInternal.h
index 95ceab7..083a75d 100644
--- a/WebKit2/UIProcess/API/mac/WKViewInternal.h
+++ b/WebKit2/UIProcess/API/mac/WKViewInternal.h
@@ -25,6 +25,10 @@
 
 #import "WKView.h"
 
+namespace WebKit {
+    class FindIndicator;
+}
+
 @interface WKView (Internal)
 - (void)_processDidExit;
 - (void)_processDidRevive;
@@ -36,6 +40,8 @@
 - (NSRect)_convertToDeviceSpace:(NSRect)rect;
 - (NSRect)_convertToUserSpace:(NSRect)rect;
 
+- (void)_setFindIndicator:(PassRefPtr<WebKit::FindIndicator>)findIndicator fadeOut:(BOOL)fadeOut;
+
 #if USE(ACCELERATED_COMPOSITING)
 - (void)_startAcceleratedCompositing:(CALayer *)rootLayer;
 - (void)_stopAcceleratedCompositing;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list