RenderThemeGtk depends on classes outside of platform
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Aug 2014 08:06:03 +0000 (08:06 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Aug 2014 08:06:03 +0000 (08:06 +0000)
https://bugs.webkit.org/show_bug.cgi?id=22176

Reviewed by Martin Robinson.

Move RenderThemeGtk.cpp from platform to rendering.

* PlatformGTK.cmake:
* rendering/RenderThemeGtk.cpp: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.cpp.

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

Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebCore/rendering/RenderThemeGtk.cpp [moved from Source/WebCore/platform/gtk/RenderThemeGtk.cpp with 99% similarity]

index b7ea6b7..7b90d0a 100644 (file)
@@ -1,5 +1,17 @@
 2014-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>
 
+        RenderThemeGtk depends on classes outside of platform
+        https://bugs.webkit.org/show_bug.cgi?id=22176
+
+        Reviewed by Martin Robinson.
+
+        Move RenderThemeGtk.cpp from platform to rendering.
+
+        * PlatformGTK.cmake:
+        * rendering/RenderThemeGtk.cpp: Renamed from Source/WebCore/platform/gtk/RenderThemeGtk.cpp.
+
+2014-08-29  Carlos Garcia Campos  <cgarcia@igalia.com>
+
         [GTK] ScrollbarThemeGtk should not depend on RenderThemeGtk
         https://bugs.webkit.org/show_bug.cgi?id=136338
 
index 7099cdc..8aac5f5 100644 (file)
@@ -238,7 +238,6 @@ list(APPEND WebCorePlatformGTK_SOURCES
     platform/gtk/PlatformScreenGtk.cpp
     platform/gtk/PlatformWheelEventGtk.cpp
     platform/gtk/RedirectedXCompositeWindow.cpp
-    platform/gtk/RenderThemeGtk.cpp
     platform/gtk/ScrollbarThemeGtk.cpp
     platform/gtk/SharedBufferGtk.cpp
     platform/gtk/SharedTimerGtk.cpp
@@ -248,6 +247,8 @@ list(APPEND WebCorePlatformGTK_SOURCES
     platform/gtk/WebKitAuthenticationWidget.cpp
     platform/gtk/WidgetBackingStoreGtkX11.cpp
     platform/gtk/WidgetGtk.cpp
+
+    rendering/RenderThemeGtk.cpp
 )
 
 if (WTF_USE_GEOCLUE2)
similarity index 99%
rename from Source/WebCore/platform/gtk/RenderThemeGtk.cpp
rename to Source/WebCore/rendering/RenderThemeGtk.cpp
index b4850cf..6835cb7 100644 (file)
@@ -916,8 +916,7 @@ static void paintGdkPixbuf(GraphicsContext* context, const GdkPixbuf* icon, cons
     GRefPtr<GdkPixbuf> scaledIcon;
     if (iconRect.size() != iconSize) {
         // We could use cairo_scale() here but cairo/pixman downscale quality is quite bad.
-        scaledIcon = adoptGRef(gdk_pixbuf_scale_simple(icon, iconRect.width(), iconRect.height(),
-                                                       GDK_INTERP_BILINEAR));
+        scaledIcon = adoptGRef(gdk_pixbuf_scale_simple(icon, iconRect.width(), iconRect.height(), GDK_INTERP_BILINEAR));
         icon = scaledIcon.get();
     }
 
@@ -1066,9 +1065,10 @@ bool RenderThemeGtk::paintCapsLockIndicator(const RenderObject& renderObject, co
 
     // GTK+ locates the icon right aligned in the entry. The given rectangle is already
     // centered vertically by RenderTextControlSingleLine.
-    IntRect iconRect(rect.x() + rect.width() - iconSize,
-                     rect.y() + (rect.height() - iconSize) / 2,
-                     iconSize, iconSize);
+    IntRect iconRect(
+        rect.x() + rect.width() - iconSize,
+        rect.y() + (rect.height() - iconSize) / 2,
+        iconSize, iconSize);
     paintGdkPixbuf(paintInfo.context, icon.get(), iconRect);
     return true;
 }
@@ -1492,9 +1492,10 @@ bool RenderThemeGtk::paintMediaToggleClosedCaptionsButton(const RenderObject& re
         m_mediaIconSize, m_mediaIconSize);
     GRefPtr<GdkPixbuf> icon = getStockSymbolicIconForWidgetType(GTK_TYPE_CONTAINER, "media-view-subtitles-symbolic", nullptr,
         gtkTextDirection(renderObject.style().direction()), gtkIconState(this, renderObject), iconRect.width());
-    if (!icon)
+    if (!icon) {
         icon = getStockSymbolicIconForWidgetType(GTK_TYPE_CONTAINER, "user-invisible-symbolic", GTK_STOCK_JUSTIFY_FILL,
             gtkTextDirection(renderObject.style().direction()), gtkIconState(this, renderObject), iconRect.width());
+    }
     paintGdkPixbuf(paintInfo.context, icon.get(), iconRect);
     return true;
 }