Changeset 39201 in webkit


Ignore:
Timestamp:
Dec 11, 2008 2:09:50 AM (15 years ago)
Author:
vestbo@webkit.org
Message:

2008-12-08 Tor Arne Vestbø <tavestbo@trolltech.com>

Reviewed by Darin Adler and Holger Freyther.

Make Widget::frameRectsChanged() and overrides non-const

This will hopefully allow us to get rid of some of the mutables in
the classes that react to the callback by changing their own state.

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r39200 r39201  
     12008-12-08  Tor Arne Vestbø  <tavestbo@trolltech.com>
     2
     3        Reviewed by Darin Adler and Holger Freyther.
     4
     5        Make Widget::frameRectsChanged() and overrides non-const
     6
     7        This will hopefully allow us to get rid of some of the mutables in
     8        the classes that react to the callback by changing their own state.
     9
     10        * platform/ScrollView.cpp:
     11        (WebCore::ScrollView::frameRectsChanged):
     12        * platform/ScrollView.h:
     13        * platform/Widget.h:
     14        (WebCore::Widget::frameRectsChanged):
     15        * platform/gtk/ScrollbarGtk.cpp: Remove non-const version since
     16        this was more complex and did the same thing, changed const of
     17        the leftover frameRectsChanged() method.
     18        (ScrollbarGtk::frameRectsChanged):
     19        * platform/gtk/ScrollbarGtk.h:
     20        * plugins/PluginView.cpp:
     21        (WebCore::PluginView::frameRectsChanged):
     22        * plugins/PluginView.h:
     23
    1242008-12-11  Holger Hans Peter Freyther  <zecke@selfish.org>
    225
  • trunk/WebCore/platform/ScrollView.cpp

    r39103 r39201  
    590590}
    591591
    592 void ScrollView::frameRectsChanged() const
     592void ScrollView::frameRectsChanged()
    593593{
    594594    if (platformWidget())
  • trunk/WebCore/platform/ScrollView.h

    r39103 r39201  
    169169
    170170    // Called when our frame rect changes (or the rect/scroll position of an ancestor changes).
    171     virtual void frameRectsChanged() const;
     171    virtual void frameRectsChanged();
    172172   
    173173    // Widget override to update our scrollbars and notify our contents of the resize.
  • trunk/WebCore/platform/Widget.h

    r37599 r39201  
    169169    IntRect convertFromContainingWindow(const IntRect&) const;
    170170
    171     virtual void frameRectsChanged() const {}
     171    virtual void frameRectsChanged() {}
    172172
    173173#if PLATFORM(MAC)   
  • trunk/WebCore/platform/gtk/ScrollbarGtk.cpp

    r37198 r39201  
    7777}
    7878
    79 void ScrollbarGtk::frameRectsChanged() const
     79void ScrollbarGtk::frameRectsChanged()
    8080{
    8181    if (!parent() || !parent()->isScrollViewScrollbar(this))
     
    115115}
    116116
    117 void ScrollbarGtk::frameRectsChanged()
    118 {
    119     if (!parent())
    120         return;
    121 
    122     ASSERT(parent()->isFrameView());
    123 
    124     FrameView* frameView = static_cast<FrameView*>(parent());
    125     IntRect windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size());
    126 
    127     IntSize sz = frameRect().size();
    128     sz.clampNegativeToZero();
    129 
    130     GtkAllocation allocation = { windowRect.x(), windowRect.y(), sz.width(), sz.height() };
    131     gtk_widget_size_allocate(platformWidget(), &allocation);
    132 }
    133 
    134117void ScrollbarGtk::gtkValueChanged(GtkAdjustment*, ScrollbarGtk* that)
    135118{
  • trunk/WebCore/platform/gtk/ScrollbarGtk.h

    r37198 r39201  
    4949    virtual void setEnabled(bool);
    5050
    51     virtual void frameRectsChanged() const;
     51    virtual void frameRectsChanged();
    5252
    5353protected:
     
    5656    virtual void updateThumbPosition();
    5757    virtual void updateThumbProportion();
    58     virtual void frameRectsChanged();
    5958   
    6059private:
  • trunk/WebCore/plugins/PluginView.cpp

    r38614 r39201  
    133133}
    134134
    135 void PluginView::frameRectsChanged() const
     135void PluginView::frameRectsChanged()
    136136{
    137137    updatePluginWidget();
  • trunk/WebCore/plugins/PluginView.h

    r38371 r39201  
    148148        // Widget functions
    149149        virtual void setFrameRect(const IntRect&);
    150         virtual void frameRectsChanged() const;
     150        virtual void frameRectsChanged();
    151151        virtual void setFocus();
    152152        virtual void show();
  • trunk/WebKit/qt/ChangeLog

    r39173 r39201  
     12008-12-08  Tor Arne Vestbø  <tavestbo@trolltech.com>
     2
     3        Reviewed by Darin Adler and Holger Freyther.
     4
     5        Make Widget::frameRectsChanged() and overrides non-const
     6
     7        This will hopefully allow us to get rid of some of the mutables in
     8        the classes that react to the callback by changing their own state.
     9
     10        * WebCoreSupport/FrameLoaderClientQt.cpp:
     11        (WebCore::):
     12
    1132008-12-10  Holger Hans Peter Freyther  <zecke@selfish.org>
    214
  • trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r38758 r39201  
    10001000            platformWidget()->update(r);
    10011001    }
    1002     virtual void frameRectsChanged() const
     1002    virtual void frameRectsChanged()
    10031003    {
    10041004        if (!platformWidget())
  • trunk/WebKit/win/ChangeLog

    r39152 r39201  
     12008-12-08  Tor Arne Vestbø  <tavestbo@trolltech.com>
     2
     3        Reviewed by Darin Adler and Holger Freyther.
     4
     5        Make Widget::frameRectsChanged() and overrides non-const
     6
     7        This will hopefully allow us to get rid of some of the mutables in
     8        the classes that react to the callback by changing their own state.
     9
     10        * WebCoreSupport/EmbeddedWidget.cpp:
     11        (EmbeddedWidget::frameRectsChanged):
     12        * WebCoreSupport/EmbeddedWidget.h:
     13
    1142008-12-09  Brett Wilson  <brettw@chromium.org>
    215
  • trunk/WebKit/win/WebCoreSupport/EmbeddedWidget.cpp

    r37223 r39201  
    8585}
    8686
    87 void EmbeddedWidget::frameRectsChanged() const
     87void EmbeddedWidget::frameRectsChanged()
    8888{
    8989    if (!parent())
  • trunk/WebKit/win/WebCoreSupport/EmbeddedWidget.h

    r37223 r39201  
    5757    virtual void invalidateRect(const WebCore::IntRect&);
    5858    virtual void setFrameRect(const WebCore::IntRect&);
    59     virtual void frameRectsChanged() const;
     59    virtual void frameRectsChanged();
    6060    virtual void setFocus();
    6161    virtual void show();
Note: See TracChangeset for help on using the changeset viewer.