[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:36:06 UTC 2010


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

    Draw the find overlay holes
    https://bugs.webkit.org/show_bug.cgi?id=47631
    
    Reviewed by John Sullivan.
    
    WebCore:
    
    Export symbols needed by WebKit2.
    
    * WebCore.exp.in:
    
    WebKit2:
    
    * WebProcess/WebPage/FindPageOverlay.cpp:
    (WebKit::FindPageOverlay::drawRect):
    Draw the white frames and the holes.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69711 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e44de87..2912f18 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-13  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by John Sullivan.
+
+        Draw the find overlay holes
+        https://bugs.webkit.org/show_bug.cgi?id=47631
+
+        Export symbols needed by WebKit2.
+
+        * WebCore.exp.in:
+
 2010-10-13  James Simonsen  <simonjam at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/WebCore.exp.in b/WebCore/WebCore.exp.in
index 29f224a..fcb0efd 100644
--- a/WebCore/WebCore.exp.in
+++ b/WebCore/WebCore.exp.in
@@ -352,7 +352,9 @@ __ZN7WebCore15GraphicsContext22beginTransparencyLayerEf
 __ZN7WebCore15GraphicsContext4clipERKNS_9FloatRectE
 __ZN7WebCore15GraphicsContext4saveEv
 __ZN7WebCore15GraphicsContext7restoreEv
+__ZN7WebCore15GraphicsContext8fillRectERKNS_9FloatRectE
 __ZN7WebCore15GraphicsContext8fillRectERKNS_9FloatRectERKNS_5ColorENS_10ColorSpaceE
+__ZN7WebCore15GraphicsContext9setShadowERKNS_9FloatSizeEfRKNS_5ColorENS_10ColorSpaceE
 __ZN7WebCore15GraphicsContext9translateEff
 __ZN7WebCore15GraphicsContextC1EP9CGContext
 __ZN7WebCore15GraphicsContextD1Ev
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 3269fb6..73c72ab 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,5 +1,16 @@
 2010-10-13  Anders Carlsson  <andersca at apple.com>
 
+        Reviewed by John Sullivan.
+
+        Draw the find overlay holes
+        https://bugs.webkit.org/show_bug.cgi?id=47631
+
+        * WebProcess/WebPage/FindPageOverlay.cpp:
+        (WebKit::FindPageOverlay::drawRect):
+        Draw the white frames and the holes.
+
+2010-10-13  Anders Carlsson  <andersca at apple.com>
+
         Reviewed by Darin Adler.
 
         Use WKSI to get wheel event deltas
diff --git a/WebKit2/WebProcess/WebPage/FindPageOverlay.cpp b/WebKit2/WebProcess/WebPage/FindPageOverlay.cpp
index a5c5705..e4e0b96 100644
--- a/WebKit2/WebProcess/WebPage/FindPageOverlay.cpp
+++ b/WebKit2/WebProcess/WebPage/FindPageOverlay.cpp
@@ -36,6 +36,16 @@ using namespace WebCore;
 
 namespace WebKit {
 
+static const float shadowOffsetX = 0.0;
+static const float shadowOffsetY = 1.0;
+static const float shadowBlurRadius = 2.0;
+static const float whiteFrameThickness = 1.0;
+
+static const int overlayBackgroundRed = 25;
+static const int overlayBackgroundGreen = 25;
+static const int overlayBackgroundBlue = 25;
+static const int overlayBackgroundAlpha = 63;
+
 PassOwnPtr<FindPageOverlay> FindPageOverlay::create(FindController* findController)
 {
     return adoptPtr(new FindPageOverlay(findController));
@@ -75,16 +85,11 @@ Vector<IntRect> FindPageOverlay::rectsForTextMatches()
     return rects;
 }
 
-static const int overlayBackgroundRed = 25;
-static const int overlayBackgroundGreen = 25;
-static const int overlayBackgroundBlue = 25;
-static const int overlayBackgroundAlpha = 63;
-    
 static Color overlayBackgroundColor()
 {
     return Color(overlayBackgroundRed, overlayBackgroundGreen, overlayBackgroundBlue, overlayBackgroundAlpha);
 }
-    
+
 void FindPageOverlay::drawRect(GraphicsContext& graphicsContext, const IntRect& dirtyRect)
 {
     Vector<IntRect> rects = rectsForTextMatches();
@@ -109,8 +114,29 @@ void FindPageOverlay::drawRect(GraphicsContext& graphicsContext, const IntRect&
     // Draw the background.
     graphicsContext.fillRect(paintRect, overlayBackgroundColor(), sRGBColorSpace);
 
-    // FIXME: Draw the holes.
+    graphicsContext.save();
+    graphicsContext.setShadow(FloatSize(shadowOffsetX, shadowOffsetY), shadowBlurRadius, Color::black, sRGBColorSpace);
+
+    graphicsContext.setFillColor(Color::white, sRGBColorSpace);
+
+    // Draw white frames around the holes.
+    for (size_t i = 0; i < rects.size(); ++i) {
+        IntRect whiteFrameRect = rects[i];
+        whiteFrameRect.inflate(1);
+
+        graphicsContext.fillRect(whiteFrameRect);
+    }
+
+    graphicsContext.restore();
+
+    graphicsContext.save();
+    graphicsContext.setFillColor(Color::transparent, sRGBColorSpace);
+
+    // Clear out the holes.
+    for (size_t i = 0; i < rects.size(); ++i)
+        graphicsContext.fillRect(rects[i]);
 
+    graphicsContext.restore();
     graphicsContext.endTransparencyLayer();
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list