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

kov at webkit.org kov at webkit.org
Wed Dec 22 11:53:00 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 622705f5ff4d02ba9d24793a3d97f5cbd7ce2e14
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 10 16:43:37 2010 +0000

    2010-08-10  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
    
            Reviewed by Xan Lopez.
    
            [GTK] Inputs of type 'search' have weird looking checkboxes instead of search/clear icons
            https://bugs.webkit.org/show_bug.cgi?id=43760
    
            Draw appropriate GTK+ stock images for search/clear icons in search entries.
    
            * platform/gtk/RenderThemeGtk.cpp:
            (WebCore::RenderThemeGtk::paintSearchFieldResultsButton):
            (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
            (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65074 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a63477d..9c20cdf 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-10  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] Inputs of type 'search' have weird looking checkboxes instead of search/clear icons
+        https://bugs.webkit.org/show_bug.cgi?id=43760
+
+        Draw appropriate GTK+ stock images for search/clear icons in search entries.
+
+        * platform/gtk/RenderThemeGtk.cpp:
+        (WebCore::RenderThemeGtk::paintSearchFieldResultsButton):
+        (WebCore::RenderThemeGtk::paintSearchFieldResultsDecoration):
+        (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
+
 2010-08-10  Pavel Feldman  <pfeldman at chromium.org>
 
         Not reviewed. Qt build fix, follow up for r65072.
diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp
index bc0d147..36fccf0 100644
--- a/WebCore/platform/gtk/RenderThemeGtk.cpp
+++ b/WebCore/platform/gtk/RenderThemeGtk.cpp
@@ -485,7 +485,7 @@ void RenderThemeGtk::adjustSearchFieldResultsButtonStyle(CSSStyleSelector* selec
 
 bool RenderThemeGtk::paintSearchFieldResultsButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
 {
-    return paintMozillaGtkWidget(this, MOZ_GTK_DROPDOWN_ARROW, o, i, rect);
+    return paintSearchFieldResultsDecoration(o, i, rect);
 }
 
 void RenderThemeGtk::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
@@ -501,7 +501,12 @@ void RenderThemeGtk::adjustSearchFieldResultsDecorationStyle(CSSStyleSelector* s
 
 bool RenderThemeGtk::paintSearchFieldResultsDecoration(RenderObject* o, const PaintInfo& i, const IntRect& rect)
 {
-    return paintMozillaGtkWidget(this, MOZ_GTK_CHECKMENUITEM, o, i, rect);
+    GraphicsContext* context = i.context;
+
+    static Image* searchImage = Image::loadPlatformThemeIcon(GTK_STOCK_FIND, rect.width()).releaseRef();
+    context->drawImage(searchImage, DeviceColorSpace, rect);
+
+    return false;
 }
 
 void RenderThemeGtk::adjustSearchFieldCancelButtonStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const
@@ -517,7 +522,13 @@ void RenderThemeGtk::adjustSearchFieldCancelButtonStyle(CSSStyleSelector* select
 
 bool RenderThemeGtk::paintSearchFieldCancelButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
 {
-    return paintMozillaGtkWidget(this, MOZ_GTK_CHECKMENUITEM, o, i, rect);
+    GraphicsContext* context = i.context;
+
+    // TODO: Brightening up the image on hover is desirable here, I believe.
+    static Image* cancelImage = Image::loadPlatformThemeIcon(GTK_STOCK_CLEAR, rect.width()).releaseRef();
+    context->drawImage(cancelImage, DeviceColorSpace, rect);
+
+    return false;
 }
 
 void RenderThemeGtk::adjustSearchFieldStyle(CSSStyleSelector* selector, RenderStyle* style, Element* e) const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list