summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/gtk/ScrollbarGtk.cpp
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-24 07:50:47 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-08-24 07:50:47 -0700
commitc570a147a94b126d4172c30914f53dea17b4c8f5 (patch)
tree99c11741887d21f65d67c5bbdab58b7ba2a5d4d5 /WebCore/platform/gtk/ScrollbarGtk.cpp
parentc952714bc6809a5ad081baaf9fcc04107b92ea3f (diff)
parent6c65f16005b91786c2b7c0791b9ea1dd684d57f4 (diff)
downloadexternal_webkit-c570a147a94b126d4172c30914f53dea17b4c8f5.zip
external_webkit-c570a147a94b126d4172c30914f53dea17b4c8f5.tar.gz
external_webkit-c570a147a94b126d4172c30914f53dea17b4c8f5.tar.bz2
Merge changes I2e7e2317,Ie6ccde3a,I3e89f231,Id06ff339,I268dfe7d,Icaf70d9f,Ie234f1a0,Iff5c7aaa,I69b75bf0,Ifbf384f4
* changes: Merge WebKit at r65615 : Update WebKit revision number Merge WebKit at r65615 : Ignore http/tests/appcache/origin-quota.html Merge WebKit at r65615 : Android-specific results for Geolocation tests. Merge WebKit at r65615 : Fix GraphicsContext and ImageBuffer. Merge WebKit at r65615 : processingUserGesture() is now static. Merge WebKit at r65615 : UTF8String() becomes utf8(). Merge WebKit at r65615 : Fix include paths for string headers. Merge WebKit at r65615 : Fix Makefiles. Merge WebKit at r65615 : Fix conflicts. Merge WebKit at r65615 : Initial merge by git.
Diffstat (limited to 'WebCore/platform/gtk/ScrollbarGtk.cpp')
-rw-r--r--WebCore/platform/gtk/ScrollbarGtk.cpp30
1 files changed, 5 insertions, 25 deletions
diff --git a/WebCore/platform/gtk/ScrollbarGtk.cpp b/WebCore/platform/gtk/ScrollbarGtk.cpp
index 8081fb8..3b86ec9 100644
--- a/WebCore/platform/gtk/ScrollbarGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarGtk.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2007, 2009 Holger Hans Peter Freyther zecke@selfish.org
* Copyright (C) 2010 Gustavo Noronha Silva <gns@gnome.org>
+ * Copyright (C) 2010 Collabora Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,10 +21,10 @@
#include "config.h"
#include "ScrollbarGtk.h"
+#include "FrameView.h"
+#include "GraphicsContext.h"
#include "GtkVersioning.h"
#include "IntRect.h"
-#include "GraphicsContext.h"
-#include "FrameView.h"
#include "ScrollbarTheme.h"
#include <gtk/gtk.h>
@@ -120,15 +121,8 @@ void ScrollbarGtk::detachAdjustment()
// For the case where we only operate on the GtkAdjustment it is best to
// reset the values so that the surrounding scrollbar gets updated, or
// e.g. for a GtkScrolledWindow the scrollbar gets hidden.
-#if GTK_CHECK_VERSION(2, 14, 0)
gtk_adjustment_configure(m_adjustment, 0, 0, 0, 0, 0, 0);
-#else
- m_adjustment->lower = 0;
- m_adjustment->upper = 0;
- m_adjustment->value = 0;
- gtk_adjustment_changed(m_adjustment);
- gtk_adjustment_value_changed(m_adjustment);
-#endif
+
g_object_unref(m_adjustment);
m_adjustment = 0;
}
@@ -162,19 +156,12 @@ void ScrollbarGtk::frameRectsChanged()
void ScrollbarGtk::updateThumbPosition()
{
- if (gtk_adjustment_get_value(m_adjustment) != m_currentPos) {
-#if GTK_CHECK_VERSION(2, 14, 0)
+ if (gtk_adjustment_get_value(m_adjustment) != m_currentPos)
gtk_adjustment_set_value(m_adjustment, m_currentPos);
-#else
- m_adjustment->value = m_currentPos;
- gtk_adjustment_value_changed(m_adjustment);
-#endif
- }
}
void ScrollbarGtk::updateThumbProportion()
{
-#if GTK_CHECK_VERSION(2, 14, 0)
gtk_adjustment_configure(m_adjustment,
gtk_adjustment_get_value(m_adjustment),
gtk_adjustment_get_lower(m_adjustment),
@@ -182,13 +169,6 @@ void ScrollbarGtk::updateThumbProportion()
m_lineStep,
m_pageStep,
m_visibleSize);
-#else
- m_adjustment->step_increment = m_lineStep;
- m_adjustment->page_increment = m_pageStep;
- m_adjustment->page_size = m_visibleSize;
- m_adjustment->upper = m_totalSize;
- gtk_adjustment_changed(m_adjustment);
-#endif
}
void ScrollbarGtk::setFrameRect(const IntRect& rect)