[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
mrobinson at webkit.org
mrobinson at webkit.org
Sun Feb 20 23:05:10 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 9229f615fb2aca54445a45afac150378f11c67ed
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 17 06:24:42 2011 +0000
2011-01-16 Martin Robinson <mrobinson at igalia.com>
Reviewed by Xan Lopez.
[GTK] fast/events/scroll-after-click-on-tab-index has been failing on the bots
https://bugs.webkit.org/show_bug.cgi?id=49177
* platform/gtk/Skipped: Unskip this test, as it's now passing.
2011-01-16 Martin Robinson <mrobinson at igalia.com>
Reviewed by Xan Lopez.
[GTK] fast/events/scroll-after-click-on-tab-index has been failing on the bots
https://bugs.webkit.org/show_bug.cgi?id=49177
* platform/ScrollView.cpp: Move the platform guards around a little. GTK+
now shares the implementation of platformAddChild and platformRemoveChild,
but has its own implementation of removeChild, which knows how to inform
main frame scrollbars that they no longer control the WebCore scrollbar.
* platform/gtk/MainFrameScrollbarGtk.cpp:
(MainFrameScrollbarGtk::attachAdjustment): If we are attaching the same adjustment
that we already have, bail out early. Apply the value changed signal handler
after configuring the adjustment. We don't want our reset of the adjustment to
stomp on WebCore values.
(MainFrameScrollbarGtk::gtkValueChanged): Do not adjust the value if the WebCore
state already matches ours. This prevents some unnecessary recursion
* platform/gtk/ScrollViewGtk.cpp:
(WebCore::ScrollView::removeChild): Added, special cases main frame scrollbars
which need their adjustments detached.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 6da3e79..f1bfaae 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2011-01-16 Martin Robinson <mrobinson at igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] fast/events/scroll-after-click-on-tab-index has been failing on the bots
+ https://bugs.webkit.org/show_bug.cgi?id=49177
+
+ * platform/gtk/Skipped: Unskip this test, as it's now passing.
+
2011-01-16 Oliver Hunt <oliver at apple.com>
Reviewed by Sam Weinig.
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 1cf8462..0f764d7 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -5522,9 +5522,6 @@ fast/frames/meta-refresh-user-gesture.html
# https://bugs.webkit.org/show_bug.cgi?id=49052
fast/canvas/pointInPath.html
-# https://bugs.webkit.org/show_bug.cgi?id=49177
-fast/events/scroll-after-click-on-tab-index.html
-
# https://bugs.webkit.org/show_bug.cgi?id=49179
animations/stop-animation-on-suspend.html
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 87950c7..2940eb0 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2011-01-16 Martin Robinson <mrobinson at igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] fast/events/scroll-after-click-on-tab-index has been failing on the bots
+ https://bugs.webkit.org/show_bug.cgi?id=49177
+
+ * platform/ScrollView.cpp: Move the platform guards around a little. GTK+
+ now shares the implementation of platformAddChild and platformRemoveChild,
+ but has its own implementation of removeChild, which knows how to inform
+ main frame scrollbars that they no longer control the WebCore scrollbar.
+ * platform/gtk/MainFrameScrollbarGtk.cpp:
+ (MainFrameScrollbarGtk::attachAdjustment): If we are attaching the same adjustment
+ that we already have, bail out early. Apply the value changed signal handler
+ after configuring the adjustment. We don't want our reset of the adjustment to
+ stomp on WebCore values.
+ (MainFrameScrollbarGtk::gtkValueChanged): Do not adjust the value if the WebCore
+ state already matches ours. This prevents some unnecessary recursion
+ * platform/gtk/ScrollViewGtk.cpp:
+ (WebCore::ScrollView::removeChild): Added, special cases main frame scrollbars
+ which need their adjustments detached.
+
2011-01-13 Yuzo Fujishima <yuzo at google.com>
Reviewed by Antti Koivisto.
diff --git a/Source/WebCore/platform/ScrollView.cpp b/Source/WebCore/platform/ScrollView.cpp
index 6cf13a4..e8631e0 100644
--- a/Source/WebCore/platform/ScrollView.cpp
+++ b/Source/WebCore/platform/ScrollView.cpp
@@ -75,6 +75,7 @@ void ScrollView::addChild(PassRefPtr<Widget> prpChild)
platformAddChild(child);
}
+#if !PLATFORM(GTK)
void ScrollView::removeChild(Widget* child)
{
ASSERT(child->parent() == this);
@@ -83,6 +84,7 @@ void ScrollView::removeChild(Widget* child)
if (child->platformWidget())
platformRemoveChild(child);
}
+#endif
void ScrollView::setHasHorizontalScrollbar(bool hasBar)
{
@@ -1066,19 +1068,19 @@ void ScrollView::setScrollOrigin(const IntPoint& origin, bool updatePosition)
updateScrollbars(scrollOffset());
}
-#if !PLATFORM(WX) && !PLATFORM(GTK) && !PLATFORM(EFL)
-
void ScrollView::platformInit()
{
}
+#if !PLATFORM(WX) && !PLATFORM(GTK) && !PLATFORM(EFL)
+
void ScrollView::platformDestroy()
{
}
#endif
-#if !PLATFORM(WX) && !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(MAC)
+#if !PLATFORM(WX) && !PLATFORM(QT) && !PLATFORM(MAC)
void ScrollView::platformAddChild(Widget*)
{
diff --git a/Source/WebCore/platform/gtk/MainFrameScrollbarGtk.cpp b/Source/WebCore/platform/gtk/MainFrameScrollbarGtk.cpp
index c2e24e0..bd09bbb 100644
--- a/Source/WebCore/platform/gtk/MainFrameScrollbarGtk.cpp
+++ b/Source/WebCore/platform/gtk/MainFrameScrollbarGtk.cpp
@@ -59,6 +59,9 @@ MainFrameScrollbarGtk::~MainFrameScrollbarGtk()
void MainFrameScrollbarGtk::attachAdjustment(GtkAdjustment* adjustment)
{
+ if (m_adjustment.get() == adjustment)
+ return;
+
if (m_adjustment)
detachAdjustment();
@@ -66,9 +69,10 @@ void MainFrameScrollbarGtk::attachAdjustment(GtkAdjustment* adjustment)
if (!m_adjustment)
return;
- g_signal_connect(m_adjustment.get(), "value-changed", G_CALLBACK(MainFrameScrollbarGtk::gtkValueChanged), this);
updateThumbProportion();
updateThumbPosition();
+ g_signal_connect(m_adjustment.get(), "value-changed", G_CALLBACK(MainFrameScrollbarGtk::gtkValueChanged), this);
+
}
void MainFrameScrollbarGtk::detachAdjustment()
@@ -108,7 +112,9 @@ void MainFrameScrollbarGtk::updateThumbProportion()
void MainFrameScrollbarGtk::gtkValueChanged(GtkAdjustment*, MainFrameScrollbarGtk* that)
{
- that->setValue(static_cast<int>(gtk_adjustment_get_value(that->m_adjustment.get())), NotFromScrollAnimator);
+ int newValue = static_cast<int>(gtk_adjustment_get_value(that->m_adjustment.get()));
+ if (newValue != that->value())
+ that->setValue(newValue, NotFromScrollAnimator);
}
void MainFrameScrollbarGtk::paint(GraphicsContext* context, const IntRect& rect)
diff --git a/Source/WebCore/platform/gtk/ScrollViewGtk.cpp b/Source/WebCore/platform/gtk/ScrollViewGtk.cpp
index a8c7562..76999a1 100644
--- a/Source/WebCore/platform/gtk/ScrollViewGtk.cpp
+++ b/Source/WebCore/platform/gtk/ScrollViewGtk.cpp
@@ -51,10 +51,6 @@ using namespace std;
namespace WebCore {
-void ScrollView::platformInit()
-{
-}
-
void ScrollView::platformDestroy()
{
m_horizontalAdjustment = 0;
@@ -78,6 +74,21 @@ PassRefPtr<Scrollbar> ScrollView::createScrollbar(ScrollbarOrientation orientati
return MainFrameScrollbarGtk::create(this, orientation, m_verticalAdjustment.get());
}
+void ScrollView::removeChild(Widget* child)
+{
+ ASSERT(child->parent() == this);
+ child->setParent(0);
+ m_children.remove(child);
+
+ // We need to override the version of ScrollView::removeChild in ScrollView.cpp because
+ // we must inform main frame scrollbars that their adjustments no longer control the
+ // WebCore scrollbars. We cannot use platformRemoveChild for this task, because even
+ // main frame scrollbars do not have a platform widget (a GtkAdjustment is not a GtkWidget).
+ if (parent() || (child != horizontalScrollbar()) && (child != verticalScrollbar()))
+ return;
+ static_cast<MainFrameScrollbarGtk*>(child)->detachAdjustment();
+}
+
void ScrollView::setHorizontalAdjustment(GtkAdjustment* hadj, bool resetValues)
{
ASSERT(!parent() || !hadj);
@@ -162,14 +173,6 @@ void ScrollView::setGtkAdjustments(GtkAdjustment* hadj, GtkAdjustment* vadj, boo
setVerticalAdjustment(vadj, resetValues);
}
-void ScrollView::platformAddChild(Widget* child)
-{
-}
-
-void ScrollView::platformRemoveChild(Widget* child)
-{
-}
-
IntRect ScrollView::visibleContentRect(bool includeScrollbars) const
{
// If we are an interior frame scrollbar or are in some sort of transition
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list