[WK2] Revise the flat find indicator secondary highlight shadows
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Jul 2014 20:01:28 +0000 (20:01 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Jul 2014 20:01:28 +0000 (20:01 +0000)
https://bugs.webkit.org/show_bug.cgi?id=134607
<rdar://problem/17554828>

Reviewed by Brady Eidson.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::drawRect):
Bring back the secondary highlight shadow, with new constants.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170763 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/FindController.cpp

index dcda63bb68021bcec81a801dbdd922df02a91779..a72c7e8d32029dc5c0850fe213d49feb0f198a2c 100644 (file)
@@ -1,3 +1,15 @@
+2014-07-03  Tim Horton  <timothy_horton@apple.com>
+
+        [WK2] Revise the flat find indicator secondary highlight shadows
+        https://bugs.webkit.org/show_bug.cgi?id=134607
+        <rdar://problem/17554828>
+
+        Reviewed by Brady Eidson.
+
+        * WebProcess/WebPage/FindController.cpp:
+        (WebKit::FindController::drawRect):
+        Bring back the secondary highlight shadow, with new constants.
+
 2014-07-03  Tim Horton  <timothy_horton@apple.com>
 
         [iOS][WK2] Sometimes the swipe snapshot stays up too long
index d0b38ec4ca9033e531f656261c356267bd377bbb..f2f748ec4b08492adfa125dd01c60b05c7e8c7d2 100644 (file)
@@ -457,9 +457,15 @@ void FindController::didMoveToWebPage(PageOverlay*, WebPage*)
 }
 
 #if ENABLE(LEGACY_FIND_INDICATOR_STYLE)
-static const float shadowOffsetX = 0.0;
-static const float shadowOffsetY = 1.0;
-static const float shadowBlurRadius = 2.0;
+const float shadowOffsetX = 0;
+const float shadowOffsetY = 1;
+const float shadowBlurRadius = 2;
+const float shadowColorAlpha = 1;
+#else
+const float shadowOffsetX = 0;
+const float shadowOffsetY = 0;
+const float shadowBlurRadius = 1;
+const float shadowColorAlpha = 0.5;
 #endif
 
 void FindController::drawRect(PageOverlay*, GraphicsContext& graphicsContext, const IntRect& dirtyRect)
@@ -474,9 +480,7 @@ void FindController::drawRect(PageOverlay*, GraphicsContext& graphicsContext, co
     {
         GraphicsContextStateSaver stateSaver(graphicsContext);
 
-#if ENABLE(LEGACY_FIND_INDICATOR_STYLE)
-        graphicsContext.setShadow(FloatSize(shadowOffsetX, shadowOffsetY), shadowBlurRadius, Color::black, ColorSpaceSRGB);
-#endif
+        graphicsContext.setShadow(FloatSize(shadowOffsetX, shadowOffsetY), shadowBlurRadius, Color(0.0f, 0.0f, 0.0f, shadowColorAlpha), ColorSpaceSRGB);
         graphicsContext.setFillColor(Color::white, ColorSpaceSRGB);
 
         // Draw white frames around the holes.