Commit 29c909d5 authored by philn@webkit.org's avatar philn@webkit.org
Browse files

2011-01-17 Philippe Normand <pnormand@igalia.com>

        Unreviewed, rolling out r75914.
        http://trac.webkit.org/changeset/75914
        https://bugs.webkit.org/show_bug.cgi?id=49177

        multiple crashes on GTK

        * platform/gtk/Skipped:
2011-01-17  Philippe Normand  <pnormand@igalia.com>

        Unreviewed, rolling out r75914.
        http://trac.webkit.org/changeset/75914
        https://bugs.webkit.org/show_bug.cgi?id=49177

        multiple crashes on GTK

        * platform/ScrollView.cpp:
        (WebCore::ScrollView::removeChild):
        (WebCore::ScrollView::wheelEvent):
        * platform/gtk/MainFrameScrollbarGtk.cpp:
        (MainFrameScrollbarGtk::attachAdjustment):
        (MainFrameScrollbarGtk::gtkValueChanged):
        * platform/gtk/ScrollViewGtk.cpp:
        (WebCore::ScrollView::platformInit):
        (WebCore::ScrollView::platformAddChild):
        (WebCore::ScrollView::platformRemoveChild):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c75ec77e
2011-01-17 Philippe Normand <pnormand@igalia.com>
Unreviewed, rolling out r75914.
http://trac.webkit.org/changeset/75914
https://bugs.webkit.org/show_bug.cgi?id=49177
multiple crashes on GTK
* platform/gtk/Skipped:
2011-01-16 Martin Robinson <mrobinson@igalia.com>
 
Reviewed by Xan Lopez.
......
......@@ -5522,6 +5522,9 @@ 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
......
2011-01-17 Philippe Normand <pnormand@igalia.com>
Unreviewed, rolling out r75914.
http://trac.webkit.org/changeset/75914
https://bugs.webkit.org/show_bug.cgi?id=49177
multiple crashes on GTK
* platform/ScrollView.cpp:
(WebCore::ScrollView::removeChild):
(WebCore::ScrollView::wheelEvent):
* platform/gtk/MainFrameScrollbarGtk.cpp:
(MainFrameScrollbarGtk::attachAdjustment):
(MainFrameScrollbarGtk::gtkValueChanged):
* platform/gtk/ScrollViewGtk.cpp:
(WebCore::ScrollView::platformInit):
(WebCore::ScrollView::platformAddChild):
(WebCore::ScrollView::platformRemoveChild):
2011-01-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
 
Unreviewed build fix.
......
......@@ -75,7 +75,6 @@ void ScrollView::addChild(PassRefPtr<Widget> prpChild)
platformAddChild(child);
}
#if !PLATFORM(GTK)
void ScrollView::removeChild(Widget* child)
{
ASSERT(child->parent() == this);
......@@ -84,7 +83,6 @@ void ScrollView::removeChild(Widget* child)
if (child->platformWidget())
platformRemoveChild(child);
}
#endif
void ScrollView::setHasHorizontalScrollbar(bool hasBar)
{
......@@ -1068,19 +1066,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(QT) && !PLATFORM(MAC)
#if !PLATFORM(WX) && !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(MAC)
void ScrollView::platformAddChild(Widget*)
{
......
......@@ -59,9 +59,6 @@ MainFrameScrollbarGtk::~MainFrameScrollbarGtk()
void MainFrameScrollbarGtk::attachAdjustment(GtkAdjustment* adjustment)
{
if (m_adjustment.get() == adjustment)
return;
if (m_adjustment)
detachAdjustment();
......@@ -69,10 +66,9 @@ 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()
......@@ -112,9 +108,7 @@ void MainFrameScrollbarGtk::updateThumbProportion()
void MainFrameScrollbarGtk::gtkValueChanged(GtkAdjustment*, MainFrameScrollbarGtk* that)
{
int newValue = static_cast<int>(gtk_adjustment_get_value(that->m_adjustment.get()));
if (newValue != that->value())
that->setValue(newValue, NotFromScrollAnimator);
that->setValue(static_cast<int>(gtk_adjustment_get_value(that->m_adjustment.get())), NotFromScrollAnimator);
}
void MainFrameScrollbarGtk::paint(GraphicsContext* context, const IntRect& rect)
......
......@@ -51,6 +51,10 @@ using namespace std;
namespace WebCore {
void ScrollView::platformInit()
{
}
void ScrollView::platformDestroy()
{
m_horizontalAdjustment = 0;
......@@ -74,21 +78,6 @@ 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);
......@@ -173,6 +162,14 @@ 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment