Reviewed by John Sullivan.
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jun 2009 20:25:37 +0000 (20:25 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Jun 2009 20:25:37 +0000 (20:25 +0000)
        - fix <rdar://problem/6940747> Search field’s focus ring is outset

        * rendering/RenderThemeWin.cpp:
        (WebCore::RenderThemeWin::adjustSearchFieldStyle): Set the focused
        search field outline offset to -2.

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

WebCore/ChangeLog
WebCore/rendering/RenderThemeWin.cpp

index 1adf6806c68bfd27221c2db19cb9d1be7c95012e..d4c6626f991b7d85b2128d83ea194df93a9f5404 100644 (file)
@@ -1,3 +1,13 @@
+2009-06-02  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by John Sullivan.
+
+        - fix <rdar://problem/6940747> Search field’s focus ring is outset
+
+        * rendering/RenderThemeWin.cpp:
+        (WebCore::RenderThemeWin::adjustSearchFieldStyle): Set the focused
+        search field outline offset to -2.
+
 2009-06-02  Sam Weinig  <sam@webkit.org>
 
         Reviewed by Alexey Proskuryakov.
index c8342d2decf20d5ca976a1f56a92fc7c1321ae9c..1fa51629db205026fbe41b7e0f8f9ad7e7ededa1 100644 (file)
 #include "config.h"
 #include "RenderThemeWin.h"
 
-#include "CSSStyleSheet.h"
 #include "CSSValueKeywords.h"
-#include "Document.h"
+#include "Element.h"
+#include "Frame.h"
 #include "GraphicsContext.h"
-#include "HTMLElement.h"
-#include "HTMLSelectElement.h"
-#include "Icon.h"
 #include "RenderSlider.h"
 #include "Settings.h"
 #include "SoftLinking.h"
@@ -791,6 +788,8 @@ void RenderThemeWin::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderSt
     style->setPaddingRight(Length(padding, Fixed));
     style->setPaddingTop(Length(padding, Fixed));
     style->setPaddingBottom(Length(padding, Fixed));
+    if (e && e->focused() && e->document()->frame()->selection()->isFocusedAndActive())
+        style->setOutlineOffset(-2);
 }
 
 bool RenderThemeWin::paintSearchFieldCancelButton(RenderObject* o, const RenderObject::PaintInfo& paintInfo, const IntRect& r)