[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
mrobinson at webkit.org
mrobinson at webkit.org
Wed Dec 22 12:18:40 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 1057afbfad9b728e5e87aa6338fef36d58356a6b
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Aug 18 22:45:19 2010 +0000
2010-08-18 Martin Robinson <mrobinson at igalia.com>
Reviewed by Gustavo Noronha Silva.
[GTK] Bots are showing lots of GTK_IS_CONTAINER critical warnings
https://bugs.webkit.org/show_bug.cgi?id=40990
Instead of relying on the ScrollView's adjustment members to determine if a
Scrollbar should be native or just a shell of the parent's scrollbar (main frame
scrollbar), just check if this ScrollView has a parent. This will ensure the
correct behavior when main frame scrollbar's are created after the ScrollView's
containing adjustments go away.
Lack of warnings during tests are the test for this fix.
* platform/gtk/ScrollViewGtk.cpp:
(WebCore::ScrollView::createScrollbar): Decide what type of scrollbar to make based
on the result of the parent() method.
* platform/gtk/ScrollbarGtk.cpp:
(ScrollbarGtk::ScrollbarGtk): Allow for an m_adjustment which is null.
(ScrollbarGtk::attachAdjustment): Ditto.
(ScrollbarGtk::updateThumbPosition): Ditto.
(ScrollbarGtk::updateThumbProportion): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7f0e3f8..3983756 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2010-08-18 Martin Robinson <mrobinson at igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] Bots are showing lots of GTK_IS_CONTAINER critical warnings
+ https://bugs.webkit.org/show_bug.cgi?id=40990
+
+ Instead of relying on the ScrollView's adjustment members to determine if a
+ Scrollbar should be native or just a shell of the parent's scrollbar (main frame
+ scrollbar), just check if this ScrollView has a parent. This will ensure the
+ correct behavior when main frame scrollbar's are created after the ScrollView's
+ containing adjustments go away.
+
+ Lack of warnings during tests are the test for this fix.
+
+ * platform/gtk/ScrollViewGtk.cpp:
+ (WebCore::ScrollView::createScrollbar): Decide what type of scrollbar to make based
+ on the result of the parent() method.
+ * platform/gtk/ScrollbarGtk.cpp:
+ (ScrollbarGtk::ScrollbarGtk): Allow for an m_adjustment which is null.
+ (ScrollbarGtk::attachAdjustment): Ditto.
+ (ScrollbarGtk::updateThumbPosition): Ditto.
+ (ScrollbarGtk::updateThumbProportion): Ditto.
+
2010-08-18 Adam Barth <abarth at webkit.org>
Reviewed by David Levin.
diff --git a/WebCore/platform/gtk/ScrollViewGtk.cpp b/WebCore/platform/gtk/ScrollViewGtk.cpp
index 871a0bf..565123c 100644
--- a/WebCore/platform/gtk/ScrollViewGtk.cpp
+++ b/WebCore/platform/gtk/ScrollViewGtk.cpp
@@ -65,12 +65,20 @@ void ScrollView::platformDestroy()
PassRefPtr<Scrollbar> ScrollView::createScrollbar(ScrollbarOrientation orientation)
{
- if (orientation == HorizontalScrollbar && m_horizontalAdjustment)
- return ScrollbarGtk::createScrollbar(this, orientation, m_horizontalAdjustment);
- else if (orientation == VerticalScrollbar && m_verticalAdjustment)
- return ScrollbarGtk::createScrollbar(this, orientation, m_verticalAdjustment);
- else
+ // If this is an interior frame scrollbar, we want to create a scrollbar without
+ // passing a GtkAdjustment. This will cause the Scrollbar to create a native GTK+
+ // scrollbar.
+ if (parent())
return Scrollbar::createNativeScrollbar(this, orientation, RegularScrollbar);
+
+ // If this is the main frame, we want to create a Scrollbar that does no painting
+ // and defers to our GtkAdjustment for all of its state. Note that the GtkAdjustment
+ // may be null here.
+ if (orientation == HorizontalScrollbar)
+ return ScrollbarGtk::createScrollbar(this, orientation, m_horizontalAdjustment);
+
+ // VerticalScrollbar
+ return ScrollbarGtk::createScrollbar(this, orientation, m_verticalAdjustment);
}
/*
diff --git a/WebCore/platform/gtk/ScrollbarGtk.cpp b/WebCore/platform/gtk/ScrollbarGtk.cpp
index 3b86ec9..8a1c4fa 100644
--- a/WebCore/platform/gtk/ScrollbarGtk.cpp
+++ b/WebCore/platform/gtk/ScrollbarGtk.cpp
@@ -81,8 +81,10 @@ ScrollbarGtk::ScrollbarGtk(ScrollbarClient* client, ScrollbarOrientation orienta
: Scrollbar(client, orientation, RegularScrollbar)
, m_adjustment(adjustment)
{
- g_object_ref(m_adjustment);
- g_signal_connect(m_adjustment, "value-changed", G_CALLBACK(ScrollbarGtk::gtkValueChanged), this);
+ if (m_adjustment) {
+ g_object_ref(m_adjustment);
+ g_signal_connect(m_adjustment, "value-changed", G_CALLBACK(ScrollbarGtk::gtkValueChanged), this);
+ }
// We have nothing to show as we are solely operating on the GtkAdjustment
resize(0, 0);
@@ -104,8 +106,10 @@ void ScrollbarGtk::attachAdjustment(GtkAdjustment* adjustment)
m_adjustment = adjustment;
- g_object_ref(m_adjustment);
- g_signal_connect(m_adjustment, "value-changed", G_CALLBACK(ScrollbarGtk::gtkValueChanged), this);
+ if (m_adjustment) {
+ g_object_ref(m_adjustment);
+ g_signal_connect(m_adjustment, "value-changed", G_CALLBACK(ScrollbarGtk::gtkValueChanged), this);
+ }
updateThumbProportion();
updateThumbPosition();
@@ -156,12 +160,18 @@ void ScrollbarGtk::frameRectsChanged()
void ScrollbarGtk::updateThumbPosition()
{
+ if (!m_adjustment)
+ return;
+
if (gtk_adjustment_get_value(m_adjustment) != m_currentPos)
gtk_adjustment_set_value(m_adjustment, m_currentPos);
}
void ScrollbarGtk::updateThumbProportion()
{
+ if (!m_adjustment)
+ return;
+
gtk_adjustment_configure(m_adjustment,
gtk_adjustment_get_value(m_adjustment),
gtk_adjustment_get_lower(m_adjustment),
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list