Changeset 37667 in webkit


Ignore:
Timestamp:
Oct 17, 2008 5:03:58 PM (16 years ago)
Author:
kevino@webkit.org
Message:

Reviewed by Kevin Ollivier

Fix wx port's scrollbar and drawing handling after recent changes.

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

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r37666 r37667  
     12008-10-17  Kevin Watters  <kevinwatters@gmail.com>
     2
     3        Reviewed by Kevin Ollivier
     4       
     5        Fix wx port's scrollbar and drawing handling after recent changes.
     6       
     7        https://bugs.webkit.org/show_bug.cgi?id=21720
     8
     9        * platform/ScrollView.h:
     10        * platform/wx/ScrollViewWx.cpp:
     11        (WebCore::ScrollView::platformVisibleContentRect):
     12        (WebCore::ScrollView::platformContentsSize):
     13        (WebCore::ScrollView::platformSetContentsSize):
     14        * platform/wx/WidgetWx.cpp:
     15        (WebCore::Widget::paint):
     16
    1172008-10-17  Kevin Ollivier  <kevino@theolliviers.com>
    218
  • trunk/WebCore/platform/ScrollView.h

    r37599 r37667  
    297297public:
    298298    virtual void setPlatformWidget(wxWindow*);
    299 
     299    void adjustScrollbars(int x = -1, int y = -1, bool refresh = true);
    300300private:
    301     void adjustScrollbars(int x = -1, int y = -1, bool refresh = true);
    302301    class ScrollViewPrivate;
    303302    ScrollViewPrivate* m_data;
  • trunk/WebCore/platform/wx/ScrollViewWx.cpp

    r37244 r37667  
    152152IntRect ScrollView::platformVisibleContentRect(bool includeScrollbars) const
    153153{
    154     // FIXME: Need to support includeScrollbars option.
    155     int width;
    156     platformWidget()->GetClientSize(NULL, &width);
    157     int height;
    158     platformWidget()->GetClientSize(NULL, &height);
    159     ASSERT(width >= 0 && height >= 0);
     154    wxWindow* win = platformWidget();
     155    if (!win)
     156        return IntRect();
     157
     158    int width, height;
     159
     160    if (includeScrollbars)
     161        win->GetSize(&width, &height);
     162    else
     163        win->GetClientSize(&width, &height);
     164       
    160165    return IntRect(m_data->viewStart.x, m_data->viewStart.y, width, height);
    161166}
     
    165170    int width = 0;
    166171    int height = 0;
    167     platformWidget()->GetVirtualSize(&width, NULL);
    168     platformWidget()->GetVirtualSize(&height, NULL);
    169     ASSERT(width >= 0 && height >= 0);
     172    if (platformWidget()) {
     173        platformWidget()->GetVirtualSize(&width, &height);
     174        ASSERT(width >= 0 && height >= 0);
     175    }
    170176    return IntSize(width, height);
    171177}
     
    220226        return;
    221227
    222     win->SetVirtualSize(contentsWidth(), contentsHeight());
     228    win->SetVirtualSize(m_contentsSize.width(), m_contentsSize.height());
    223229    adjustScrollbars();
    224230}
     
    344350}
    345351
    346 
    347 }
     352}
  • trunk/WebCore/platform/wx/WidgetWx.cpp

    r37452 r37667  
    9090void Widget::paint(GraphicsContext*,const IntRect& r)
    9191{
    92     invalidateRect(r);
    93     if (platformWidget())
    94         platformWidget()->Update();
    9592}
    9693
  • trunk/WebKit/wx/ChangeLog

    r37452 r37667  
     12008-10-17  Kevin Watters  <kevinwatters@gmail.com>
     2       
     3        Reviewed by Kevin Ollivier
     4
     5        Fix wx port's scrollbar and drawing handling after recent changes.
     6       
     7        https://bugs.webkit.org/show_bug.cgi?id=21720
     8
     9        * WebView.cpp:
     10        (wxWebView::OnPaint):
     11        (wxWebView::OnSize):
     12
    1132008-10-09  Kevin Ollivier  <kevino@theolliviers.com>
    214
  • trunk/WebKit/wx/WebView.cpp

    r37203 r37667  
    433433                    frame->view()->layout();
    434434
    435                 frame->view()->paint(gc, paintRect);
     435                frame->view()->paintContents(gc, paintRect);
    436436            }
    437437            delete gc;
     
    446446        frame->sendResizeEvent();
    447447        frame->view()->layout();
     448        frame->view()->adjustScrollbars();
    448449    }
    449450     
Note: See TracChangeset for help on using the changeset viewer.