From e166b75de0c6454933ab70ef4af5b2fcc29c1966 Mon Sep 17 00:00:00 2001 From: "timothy_horton@apple.com" Date: Thu, 3 Jul 2014 20:01:28 +0000 Subject: [PATCH] [WK2] Revise the flat find indicator secondary highlight shadows https://bugs.webkit.org/show_bug.cgi?id=134607 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 | 12 ++++++++++++ .../WebProcess/WebPage/FindController.cpp | 16 ++++++++++------ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index dcda63bb6802..a72c7e8d3202 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,15 @@ +2014-07-03 Tim Horton + + [WK2] Revise the flat find indicator secondary highlight shadows + https://bugs.webkit.org/show_bug.cgi?id=134607 + + + 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 [iOS][WK2] Sometimes the swipe snapshot stays up too long diff --git a/Source/WebKit2/WebProcess/WebPage/FindController.cpp b/Source/WebKit2/WebProcess/WebPage/FindController.cpp index d0b38ec4ca90..f2f748ec4b08 100644 --- a/Source/WebKit2/WebProcess/WebPage/FindController.cpp +++ b/Source/WebKit2/WebProcess/WebPage/FindController.cpp @@ -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. -- 2.36.0