Changeset 40742 in webkit


Ignore:
Timestamp:
Feb 6, 2009 5:05:42 PM (15 years ago)
Author:
zecke@webkit.org
Message:

2009-02-06 Xan Lopez <xan@gnome.org>

Reviewed by Holger Freyther.

https://bugs.webkit.org/show_bug.cgi?id=23621

Do not use m_scrollOffset to check if we are setting the same
value than we already have.

m_scrollOffset starts at 0 for ScrollView, so when opening a new
page and scrolling to 0 (the usual case) the check will fail and
we won't update the adjustment value, resulting in a possibly
mispositioned scrollbar. Use the adjustment value directly
instead, which is what we are updating anyway.

  • platform/gtk/ScrollViewGtk.cpp: (WebCore::ScrollView::platformHandleHorizontalAdjustment): (WebCore::ScrollView::platformHandleVerticalAdjustment):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r40741 r40742  
     12009-02-06  Xan Lopez  <xan@gnome.org>
     2
     3        Reviewed by Holger Freyther.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=23621
     6
     7        Do not use m_scrollOffset to check if we are setting the same
     8        value than we already have.
     9
     10        m_scrollOffset starts at 0 for ScrollView, so when opening a new
     11        page and scrolling to 0 (the usual case) the check will fail and
     12        we won't update the adjustment value, resulting in a possibly
     13        mispositioned scrollbar. Use the adjustment value directly
     14        instead, which is what we are updating anyway.
     15
     16        * platform/gtk/ScrollViewGtk.cpp:
     17        (WebCore::ScrollView::platformHandleHorizontalAdjustment):
     18        (WebCore::ScrollView::platformHandleVerticalAdjustment):
     19
    1202009-02-06  Justin Garcia  <justin.garcia@apple.com>
    221
  • trunk/WebCore/platform/gtk/ScrollViewGtk.cpp

    r37447 r40742  
    155155        gtk_adjustment_changed(m_horizontalAdjustment);
    156156
    157         if (m_scrollOffset.width() != scroll.width()) {
     157        if (m_horizontalAdjustment->value != scroll.width()) {
    158158            m_horizontalAdjustment->value = scroll.width();
    159159            gtk_adjustment_value_changed(m_horizontalAdjustment);
     
    174174        gtk_adjustment_changed(m_verticalAdjustment);
    175175
    176         if (m_scrollOffset.height() != scroll.height()) {
     176        if (m_verticalAdjustment->value != scroll.height()) {
    177177            m_verticalAdjustment->value = scroll.height();
    178178            gtk_adjustment_value_changed(m_verticalAdjustment);
Note: See TracChangeset for help on using the changeset viewer.