diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-05 14:34:32 -0800 |
commit | 635860845790a19bf50bbc51ba8fb66a96dde068 (patch) | |
tree | ef6ad9ff73a5b57f65249d4232a202fa77e6a140 /WebCore/platform/gtk | |
parent | 8e35f3cfc7fba1d1c829dc557ebad6409cbe16a2 (diff) | |
download | external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.zip external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.gz external_webkit-635860845790a19bf50bbc51ba8fb66a96dde068.tar.bz2 |
auto import from //depot/cupcake/@136594
Diffstat (limited to 'WebCore/platform/gtk')
-rw-r--r-- | WebCore/platform/gtk/FileSystemGtk.cpp | 1 | ||||
-rw-r--r-- | WebCore/platform/gtk/GeolocationServiceGtk.cpp | 61 | ||||
-rw-r--r-- | WebCore/platform/gtk/GeolocationServiceGtk.h (renamed from WebCore/platform/gtk/SystemTimeGtk.cpp) | 27 | ||||
-rw-r--r-- | WebCore/platform/gtk/KeyEventGtk.cpp | 30 | ||||
-rw-r--r-- | WebCore/platform/gtk/MIMETypeRegistryGtk.cpp | 3 | ||||
-rw-r--r-- | WebCore/platform/gtk/MouseEventGtk.cpp | 5 | ||||
-rw-r--r-- | WebCore/platform/gtk/PlatformScreenGtk.cpp | 16 | ||||
-rw-r--r-- | WebCore/platform/gtk/RenderThemeGtk.cpp | 17 | ||||
-rw-r--r-- | WebCore/platform/gtk/RenderThemeGtk.h | 2 | ||||
-rw-r--r-- | WebCore/platform/gtk/ScrollbarGtk.cpp | 19 | ||||
-rw-r--r-- | WebCore/platform/gtk/ScrollbarGtk.h | 3 | ||||
-rw-r--r-- | WebCore/platform/gtk/SharedTimerGtk.cpp | 2 | ||||
-rw-r--r-- | WebCore/platform/gtk/SystemTimeLinux.cpp | 44 | ||||
-rw-r--r-- | WebCore/platform/gtk/TemporaryLinkStubs.cpp | 2 | ||||
-rw-r--r-- | WebCore/platform/gtk/WheelEventGtk.cpp | 4 | ||||
-rw-r--r-- | WebCore/platform/gtk/gtk2drawing.c | 41 | ||||
-rw-r--r-- | WebCore/platform/gtk/gtkdrawing.h | 2 |
17 files changed, 169 insertions, 110 deletions
diff --git a/WebCore/platform/gtk/FileSystemGtk.cpp b/WebCore/platform/gtk/FileSystemGtk.cpp index 965cea9..4f0ae01 100644 --- a/WebCore/platform/gtk/FileSystemGtk.cpp +++ b/WebCore/platform/gtk/FileSystemGtk.cpp @@ -29,7 +29,6 @@ #include <glib.h> #include <glib/gstdio.h> -#include <glib/gutils.h> #include <unistd.h> diff --git a/WebCore/platform/gtk/GeolocationServiceGtk.cpp b/WebCore/platform/gtk/GeolocationServiceGtk.cpp new file mode 100644 index 0000000..0c80dd6 --- /dev/null +++ b/WebCore/platform/gtk/GeolocationServiceGtk.cpp @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2008 Holger Hans Peter Freyther + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public License + * along with this library; see the file COPYING.LIB. If not, write to + * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#include "config.h" +#include "GeolocationServiceGtk.h" + +namespace WebCore { + +GeolocationService* GeolocationService::create(GeolocationServiceClient* client) +{ + return new GeolocationServiceGtk(client); +} + +GeolocationServiceGtk::GeolocationServiceGtk(GeolocationServiceClient* client) + : GeolocationService(client) +{} + +bool GeolocationServiceGtk::startUpdating(PositionOptions*) +{ + return false; +} + +void GeolocationServiceGtk::stopUpdating() +{ +} + +void GeolocationServiceGtk::suspend() +{ +} + +void GeolocationServiceGtk::resume() +{ +} + +Geoposition* GeolocationServiceGtk::lastPosition() const +{ + return 0; +} + +PositionError* GeolocationServiceGtk::lastError() const +{ + return 0; +} + +} diff --git a/WebCore/platform/gtk/SystemTimeGtk.cpp b/WebCore/platform/gtk/GeolocationServiceGtk.h index 9d26d41..02aff2d 100644 --- a/WebCore/platform/gtk/SystemTimeGtk.cpp +++ b/WebCore/platform/gtk/GeolocationServiceGtk.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Alp Toker <alp@atoker.com> + * Copyright (C) 2008 Holger Hans Peter Freyther * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -17,16 +17,25 @@ * Boston, MA 02110-1301, USA. */ -#include "config.h" -#include <glib.h> +#ifndef GeolocationServiceGtk_h +#define GeolocationServiceGtk_h + +#include "GeolocationService.h" namespace WebCore { + class GeolocationServiceGtk : public GeolocationService { + public: + GeolocationServiceGtk(GeolocationServiceClient*); -double currentTime() -{ - GTimeVal now; - g_get_current_time(&now); - return static_cast<double>(now.tv_sec) + static_cast<double>(now.tv_usec / 1000000.0); -} + virtual bool startUpdating(PositionOptions*); + virtual void stopUpdating(); + virtual void suspend(); + virtual void resume(); + + Geoposition* lastPosition() const; + PositionError* lastError() const; + }; } + +#endif diff --git a/WebCore/platform/gtk/KeyEventGtk.cpp b/WebCore/platform/gtk/KeyEventGtk.cpp index 153ef19..e0742f4 100644 --- a/WebCore/platform/gtk/KeyEventGtk.cpp +++ b/WebCore/platform/gtk/KeyEventGtk.cpp @@ -36,7 +36,9 @@ #include <gdk/gdk.h> #include <gdk/gdkkeysyms.h> -#include <gtk/gtkversion.h> + +// GTK_CHECK_VERSION is defined in gtk/gtkversion.h +#include <gtk/gtk.h> namespace WebCore { @@ -464,6 +466,32 @@ static int windowsKeyCodeForKeyEvent(unsigned int keycode) // VK_NONAME (FC) Reserved for future use // VK_PA1 (FD) PA1 key // VK_OEM_CLEAR (FE) Clear key + case GDK_F1: + case GDK_F2: + case GDK_F3: + case GDK_F4: + case GDK_F5: + case GDK_F6: + case GDK_F7: + case GDK_F8: + case GDK_F9: + case GDK_F10: + case GDK_F11: + case GDK_F12: + case GDK_F13: + case GDK_F14: + case GDK_F15: + case GDK_F16: + case GDK_F17: + case GDK_F18: + case GDK_F19: + case GDK_F20: + case GDK_F21: + case GDK_F22: + case GDK_F23: + case GDK_F24: + return VK_F1 + (keycode - GDK_F1); + default: return 0; } diff --git a/WebCore/platform/gtk/MIMETypeRegistryGtk.cpp b/WebCore/platform/gtk/MIMETypeRegistryGtk.cpp index 20fe0cb..8afb60f 100644 --- a/WebCore/platform/gtk/MIMETypeRegistryGtk.cpp +++ b/WebCore/platform/gtk/MIMETypeRegistryGtk.cpp @@ -39,6 +39,7 @@ static const ExtensionMap extensionMap [] = { { "bmp", "image/bmp" }, { "css", "text/css" }, { "gif", "image/gif" }, + { "htm", "text/html" }, { "html", "text/html" }, { "ico", "image/x-icon" }, { "jpeg", "image/jpeg" }, @@ -54,6 +55,8 @@ static const ExtensionMap extensionMap [] = { { "xml", "text/xml" }, { "xsl", "text/xsl" }, { "xhtml", "application/xhtml+xml" }, + { "wml", "text/vnd.wap.wml" }, + { "wmlc", "application/vnd.wap.wmlc" }, { 0, 0 } }; diff --git a/WebCore/platform/gtk/MouseEventGtk.cpp b/WebCore/platform/gtk/MouseEventGtk.cpp index f441f00..2400ebf 100644 --- a/WebCore/platform/gtk/MouseEventGtk.cpp +++ b/WebCore/platform/gtk/MouseEventGtk.cpp @@ -27,11 +27,12 @@ #include "config.h" #include "PlatformMouseEvent.h" -#include "SystemTime.h" #include "Assertions.h" #include <gdk/gdk.h> -#include <gtk/gtkversion.h> + +// GTK_CHECK_VERSION is defined in gtk/gtkversion.h +#include <gtk/gtk.h> namespace WebCore { diff --git a/WebCore/platform/gtk/PlatformScreenGtk.cpp b/WebCore/platform/gtk/PlatformScreenGtk.cpp index 9788253..3512be1 100644 --- a/WebCore/platform/gtk/PlatformScreenGtk.cpp +++ b/WebCore/platform/gtk/PlatformScreenGtk.cpp @@ -47,10 +47,20 @@ namespace WebCore { int screenDepth(Widget* widget) { GtkWidget* container = GTK_WIDGET(widget->root()->hostWindow()->platformWindow()); + if (!container) return 24; - GdkVisual* visual = gdk_drawable_get_visual(GDK_DRAWABLE(GTK_WIDGET(widget->root()->hostWindow()->platformWindow())->window)); + if (!GTK_WIDGET_REALIZED(container)) { + GtkWidget* toplevel = gtk_widget_get_toplevel(container); + if (GTK_WIDGET_TOPLEVEL(toplevel)) + container = toplevel; + else + return 24; + } + + + GdkVisual* visual = gdk_drawable_get_visual(GDK_DRAWABLE(container->window)); return visual->depth; } @@ -75,8 +85,8 @@ bool screenIsMonochrome(Widget* widget) FloatRect screenRect(Widget* widget) { - GtkWidget* container = GTK_WIDGET(widget->root()->hostWindow()->platformWindow()); - if (!container) + GtkWidget* container = gtk_widget_get_toplevel(GTK_WIDGET(widget->root()->hostWindow()->platformWindow())); + if (!GTK_WIDGET_TOPLEVEL(container)) return FloatRect(); GdkScreen* screen = gtk_widget_has_screen(container) ? gtk_widget_get_screen(container) : gdk_screen_get_default(); diff --git a/WebCore/platform/gtk/RenderThemeGtk.cpp b/WebCore/platform/gtk/RenderThemeGtk.cpp index bf8b8d7..ee462e0 100644 --- a/WebCore/platform/gtk/RenderThemeGtk.cpp +++ b/WebCore/platform/gtk/RenderThemeGtk.cpp @@ -23,9 +23,10 @@ #include "config.h" #include "RenderThemeGtk.h" -#include "AffineTransform.h" +#include "TransformationMatrix.h" #include "GraphicsContext.h" #include "NotImplemented.h" +#include "RenderBox.h" #include "RenderObject.h" #include "gtkdrawing.h" @@ -82,10 +83,16 @@ bool RenderThemeGtk::controlSupportsTints(const RenderObject* o) const int RenderThemeGtk::baselinePosition(const RenderObject* o) const { + if (!o->isBox()) + return 0; + // FIXME: This strategy is possibly incorrect for the GTK+ port. if (o->style()->appearance() == CheckboxPart || - o->style()->appearance() == RadioPart) - return o->marginTop() + o->height() - 2; + o->style()->appearance() == RadioPart) { + const RenderBox* box = toRenderBox(o); + return box->marginTop() + box->height() - 2; + } + return RenderTheme::baselinePosition(o); } @@ -161,7 +168,7 @@ static bool paintMozWidget(RenderTheme* theme, GtkThemeWidgetType type, RenderOb break; } - AffineTransform ctm = i.context->getCTM(); + TransformationMatrix ctm = i.context->getCTM(); IntPoint pos = ctm.mapPoint(rect.location()); GdkRectangle gdkRect = IntRect(pos.x(), pos.y(), rect.width(), rect.height()); @@ -409,7 +416,7 @@ Color RenderThemeGtk::inactiveListBoxSelectionForegroundColor() const return widget->style->text[GTK_STATE_ACTIVE]; } -double RenderThemeGtk::caretBlinkFrequency() const +double RenderThemeGtk::caretBlinkInterval() const { GtkSettings* settings = gtk_settings_get_default(); diff --git a/WebCore/platform/gtk/RenderThemeGtk.h b/WebCore/platform/gtk/RenderThemeGtk.h index dda8bc8..76f7a0a 100644 --- a/WebCore/platform/gtk/RenderThemeGtk.h +++ b/WebCore/platform/gtk/RenderThemeGtk.h @@ -66,7 +66,7 @@ public: virtual Color inactiveListBoxSelectionBackgroundColor() const; virtual Color inactiveListBoxSelectionForegroundColor() const; - virtual double caretBlinkFrequency() const; + virtual double caretBlinkInterval() const; // System fonts. virtual void systemFont(int propId, FontDescription&) const; diff --git a/WebCore/platform/gtk/ScrollbarGtk.cpp b/WebCore/platform/gtk/ScrollbarGtk.cpp index 099895d..df165e3 100644 --- a/WebCore/platform/gtk/ScrollbarGtk.cpp +++ b/WebCore/platform/gtk/ScrollbarGtk.cpp @@ -76,7 +76,7 @@ ScrollbarGtk::~ScrollbarGtk() g_object_unref(G_OBJECT(platformWidget())); } -void ScrollbarGtk::frameRectsChanged() const +void ScrollbarGtk::frameRectsChanged() { if (!parent() || !parent()->isScrollViewScrollbar(this)) return; @@ -114,23 +114,6 @@ void ScrollbarGtk::setFrameRect(const IntRect& rect) frameRectsChanged(); } -void ScrollbarGtk::frameRectsChanged() -{ - if (!parent()) - return; - - ASSERT(parent()->isFrameView()); - - FrameView* frameView = static_cast<FrameView*>(parent()); - IntRect windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size()); - - IntSize sz = frameRect().size(); - sz.clampNegativeToZero(); - - GtkAllocation allocation = { windowRect.x(), windowRect.y(), sz.width(), sz.height() }; - gtk_widget_size_allocate(platformWidget(), &allocation); -} - void ScrollbarGtk::gtkValueChanged(GtkAdjustment*, ScrollbarGtk* that) { that->setValue(static_cast<int>(gtk_adjustment_get_value(that->m_adjustment))); diff --git a/WebCore/platform/gtk/ScrollbarGtk.h b/WebCore/platform/gtk/ScrollbarGtk.h index 50e9184..11ff079 100644 --- a/WebCore/platform/gtk/ScrollbarGtk.h +++ b/WebCore/platform/gtk/ScrollbarGtk.h @@ -48,14 +48,13 @@ public: virtual void setEnabled(bool); - virtual void frameRectsChanged() const; + virtual void frameRectsChanged(); protected: ScrollbarGtk(ScrollbarClient*, ScrollbarOrientation, ScrollbarControlSize); virtual void updateThumbPosition(); virtual void updateThumbProportion(); - virtual void frameRectsChanged(); private: static void gtkValueChanged(GtkAdjustment*, ScrollbarGtk*); diff --git a/WebCore/platform/gtk/SharedTimerGtk.cpp b/WebCore/platform/gtk/SharedTimerGtk.cpp index e0a5b60..0a760ed 100644 --- a/WebCore/platform/gtk/SharedTimerGtk.cpp +++ b/WebCore/platform/gtk/SharedTimerGtk.cpp @@ -28,8 +28,8 @@ #include "config.h" #include "SharedTimer.h" -#include "SystemTime.h" #include <wtf/Assertions.h> +#include <wtf/CurrentTime.h> #include <glib.h> namespace WebCore { diff --git a/WebCore/platform/gtk/SystemTimeLinux.cpp b/WebCore/platform/gtk/SystemTimeLinux.cpp deleted file mode 100644 index 45caddd..0000000 --- a/WebCore/platform/gtk/SystemTimeLinux.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. - * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY - * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "config.h" -#include "SystemTime.h" - -#include <sys/time.h> - -namespace WebCore { - -double currentTime() -{ - struct timeval aTimeval; - struct timezone aTimezone; - - gettimeofday( &aTimeval, &aTimezone ); - return (double)aTimeval.tv_sec + (double)(aTimeval.tv_usec / 1000000.0 ); -} - -} diff --git a/WebCore/platform/gtk/TemporaryLinkStubs.cpp b/WebCore/platform/gtk/TemporaryLinkStubs.cpp index 5093794..edabd10 100644 --- a/WebCore/platform/gtk/TemporaryLinkStubs.cpp +++ b/WebCore/platform/gtk/TemporaryLinkStubs.cpp @@ -58,8 +58,6 @@ Vector<char> loadResourceIntoArray(const char* resourceName) void PluginView::invalidateRegion(NPRegion) { notImplemented(); } -Color WebCore::focusRingColor() { return Color(); } - namespace WebCore { void getSupportedKeySizes(Vector<String>&) { notImplemented(); } String signedPublicKeyAndChallengeString(unsigned keySizeIndex, const String &challengeString, const KURL &url) { return String(); } diff --git a/WebCore/platform/gtk/WheelEventGtk.cpp b/WebCore/platform/gtk/WheelEventGtk.cpp index fbe31f7..64ec65a 100644 --- a/WebCore/platform/gtk/WheelEventGtk.cpp +++ b/WebCore/platform/gtk/WheelEventGtk.cpp @@ -29,7 +29,9 @@ #include "PlatformWheelEvent.h" #include <gdk/gdk.h> -#include <gtk/gtkversion.h> + +// GTK_CHECK_VERSION is defined in gtk/gtkversion.h +#include <gtk/gtk.h> namespace WebCore { diff --git a/WebCore/platform/gtk/gtk2drawing.c b/WebCore/platform/gtk/gtk2drawing.c index 83b4cb4..dd46e74 100644 --- a/WebCore/platform/gtk/gtk2drawing.c +++ b/WebCore/platform/gtk/gtk2drawing.c @@ -89,7 +89,7 @@ static GtkWidget* gMenuItemWidget; static GtkWidget* gImageMenuItemWidget; static GtkWidget* gCheckMenuItemWidget; static GtkWidget* gTreeViewWidget; -static GtkWidget* gMiddleTreeViewColumn; +static GtkTreeViewColumn* gMiddleTreeViewColumn; static GtkWidget* gTreeHeaderCellWidget; static GtkWidget* gTreeHeaderSortArrowWidget; static GtkWidget* gExpanderWidget; @@ -143,7 +143,7 @@ setup_widget_prototype(GtkWidget* widget) gtk_container_add(GTK_CONTAINER(protoLayout), widget); gtk_widget_realize(widget); - g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE); + g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE)); return MOZ_GTK_SUCCESS; } @@ -288,7 +288,7 @@ moz_gtk_get_combo_box_inner_button(GtkWidget *widget, gpointer client_data) g_object_add_weak_pointer(G_OBJECT(widget), (gpointer) &gComboBoxButtonWidget); gtk_widget_realize(widget); - g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE); + g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } } @@ -307,7 +307,7 @@ moz_gtk_get_combo_box_button_inner_widgets(GtkWidget *widget, } else return; gtk_widget_realize(widget); - g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE); + g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } static gint @@ -348,7 +348,7 @@ ensure_combo_box_widgets() &gComboBoxArrowWidget); gtk_widget_realize(gComboBoxArrowWidget); g_object_set_data(G_OBJECT(gComboBoxArrowWidget), - "transparent-bg-hint", TRUE); + "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } } else { /* Shouldn't be reached with current internal gtk implementation; we @@ -398,7 +398,7 @@ moz_gtk_get_combo_box_entry_inner_widgets(GtkWidget *widget, } else return; gtk_widget_realize(widget); - g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE); + g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } static void @@ -409,7 +409,8 @@ moz_gtk_get_combo_box_entry_arrow(GtkWidget *widget, gpointer client_data) g_object_add_weak_pointer(G_OBJECT(widget), (gpointer) &gComboBoxEntryArrowWidget); gtk_widget_realize(widget); - g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE); + g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", + GINT_TO_POINTER(TRUE)); } } @@ -461,7 +462,7 @@ ensure_combo_box_entry_widgets() &gComboBoxEntryArrowWidget); gtk_widget_realize(gComboBoxEntryArrowWidget); g_object_set_data(G_OBJECT(gComboBoxEntryArrowWidget), - "transparent-bg-hint", TRUE); + "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } } else { /* Shouldn't be reached with current internal gtk implementation; @@ -501,7 +502,8 @@ ensure_toolbar_widget() gToolbarWidget = gtk_toolbar_new(); gtk_container_add(GTK_CONTAINER(gHandleBoxWidget), gToolbarWidget); gtk_widget_realize(gToolbarWidget); - g_object_set_data(G_OBJECT(gToolbarWidget), "transparent-bg-hint", TRUE); + g_object_set_data(G_OBJECT(gToolbarWidget), "transparent-bg-hint", + GINT_TO_POINTER(TRUE)); } return MOZ_GTK_SUCCESS; } @@ -590,7 +592,7 @@ ensure_menu_bar_item_widget() gMenuBarItemWidget); gtk_widget_realize(gMenuBarItemWidget); g_object_set_data(G_OBJECT(gMenuBarItemWidget), - "transparent-bg-hint", TRUE); + "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } return MOZ_GTK_SUCCESS; } @@ -605,7 +607,7 @@ ensure_menu_popup_widget() gMenuPopupWidget); gtk_widget_realize(gMenuPopupWidget); g_object_set_data(G_OBJECT(gMenuPopupWidget), - "transparent-bg-hint", TRUE); + "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } return MOZ_GTK_SUCCESS; } @@ -620,7 +622,7 @@ ensure_menu_item_widget() gMenuItemWidget); gtk_widget_realize(gMenuItemWidget); g_object_set_data(G_OBJECT(gMenuItemWidget), - "transparent-bg-hint", TRUE); + "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } return MOZ_GTK_SUCCESS; } @@ -635,7 +637,7 @@ ensure_image_menu_item_widget() gImageMenuItemWidget); gtk_widget_realize(gImageMenuItemWidget); g_object_set_data(G_OBJECT(gImageMenuItemWidget), - "transparent-bg-hint", TRUE); + "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } return MOZ_GTK_SUCCESS; } @@ -650,7 +652,7 @@ ensure_menu_separator_widget() gMenuSeparatorWidget); gtk_widget_realize(gMenuSeparatorWidget); g_object_set_data(G_OBJECT(gMenuSeparatorWidget), - "transparent-bg-hint", TRUE); + "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } return MOZ_GTK_SUCCESS; } @@ -665,7 +667,7 @@ ensure_check_menu_item_widget() gCheckMenuItemWidget); gtk_widget_realize(gCheckMenuItemWidget); g_object_set_data(G_OBJECT(gCheckMenuItemWidget), - "transparent-bg-hint", TRUE); + "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } return MOZ_GTK_SUCCESS; } @@ -720,9 +722,9 @@ ensure_tree_header_cell_widget() gTreeHeaderCellWidget = GTK_TREE_VIEW_COLUMN(gMiddleTreeViewColumn)->button; gTreeHeaderSortArrowWidget = GTK_TREE_VIEW_COLUMN(gMiddleTreeViewColumn)->arrow; g_object_set_data(G_OBJECT(gTreeHeaderCellWidget), - "transparent-bg-hint", TRUE); + "transparent-bg-hint", GINT_TO_POINTER(TRUE)); g_object_set_data(G_OBJECT(gTreeHeaderSortArrowWidget), - "transparent-bg-hint", TRUE); + "transparent-bg-hint", GINT_TO_POINTER(TRUE)); } return MOZ_GTK_SUCCESS; } @@ -1536,11 +1538,12 @@ moz_gtk_entry_paint(GdkDrawable* drawable, GdkRectangle* rect, * If the theme is able to cope with transparency, then we can skip pre-filling * and notify the theme it will paint directly on the canvas. */ if (theme_honors_transparency) { - g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", TRUE); + g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", + GINT_TO_POINTER(TRUE)); } else { gdk_draw_rectangle(drawable, style->base_gc[bg_state], TRUE, cliprect->x, cliprect->y, cliprect->width, cliprect->height); - g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", FALSE); + g_object_set_data(G_OBJECT(widget), "transparent-bg-hint", GINT_TO_POINTER(FALSE)); } /* Get the position of the inner window, see _gtk_entry_get_borders */ diff --git a/WebCore/platform/gtk/gtkdrawing.h b/WebCore/platform/gtk/gtkdrawing.h index 6e44d4a..eb6995a 100644 --- a/WebCore/platform/gtk/gtkdrawing.h +++ b/WebCore/platform/gtk/gtkdrawing.h @@ -49,7 +49,7 @@ #define _GTK_DRAWING_H_ #include <gdk/gdk.h> -#include <gtk/gtkstyle.h> +#include <gtk/gtk.h> #ifdef __cplusplus extern "C" { |