Commit 75d2aeee authored by kevino@webkit.org's avatar kevino@webkit.org

Reviewed by Kevin Ollivier

Fix wx port's scrollbar and drawing handling after recent changes.
        
https://bugs.webkit.org/show_bug.cgi?id=21720


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c81374f7
2008-10-17 Kevin Watters <kevinwatters@gmail.com>
Reviewed by Kevin Ollivier
Fix wx port's scrollbar and drawing handling after recent changes.
https://bugs.webkit.org/show_bug.cgi?id=21720
* platform/ScrollView.h:
* platform/wx/ScrollViewWx.cpp:
(WebCore::ScrollView::platformVisibleContentRect):
(WebCore::ScrollView::platformContentsSize):
(WebCore::ScrollView::platformSetContentsSize):
* platform/wx/WidgetWx.cpp:
(WebCore::Widget::paint):
2008-10-17 Kevin Ollivier <kevino@theolliviers.com>
wx build fix. EAppearance -> ControlPart.
......
......@@ -296,9 +296,8 @@ public:
#if PLATFORM(WX)
public:
virtual void setPlatformWidget(wxWindow*);
private:
void adjustScrollbars(int x = -1, int y = -1, bool refresh = true);
private:
class ScrollViewPrivate;
ScrollViewPrivate* m_data;
#endif
......
......@@ -151,12 +151,17 @@ void ScrollView::platformRepaintContentRectangle(const IntRect& updateRect, bool
IntRect ScrollView::platformVisibleContentRect(bool includeScrollbars) const
{
// FIXME: Need to support includeScrollbars option.
int width;
platformWidget()->GetClientSize(NULL, &width);
int height;
platformWidget()->GetClientSize(NULL, &height);
ASSERT(width >= 0 && height >= 0);
wxWindow* win = platformWidget();
if (!win)
return IntRect();
int width, height;
if (includeScrollbars)
win->GetSize(&width, &height);
else
win->GetClientSize(&width, &height);
return IntRect(m_data->viewStart.x, m_data->viewStart.y, width, height);
}
......@@ -164,9 +169,10 @@ IntSize ScrollView::platformContentsSize() const
{
int width = 0;
int height = 0;
platformWidget()->GetVirtualSize(&width, NULL);
platformWidget()->GetVirtualSize(&height, NULL);
ASSERT(width >= 0 && height >= 0);
if (platformWidget()) {
platformWidget()->GetVirtualSize(&width, &height);
ASSERT(width >= 0 && height >= 0);
}
return IntSize(width, height);
}
......@@ -219,7 +225,7 @@ void ScrollView::platformSetContentsSize()
if (!win)
return;
win->SetVirtualSize(contentsWidth(), contentsHeight());
win->SetVirtualSize(m_contentsSize.width(), m_contentsSize.height());
adjustScrollbars();
}
......@@ -343,5 +349,4 @@ bool ScrollView::platformIsOffscreen() const
return !platformWidget() || !platformWidget()->IsShownOnScreen();
}
}
......@@ -89,9 +89,6 @@ void Widget::invalidateRect(const IntRect& r)
void Widget::paint(GraphicsContext*,const IntRect& r)
{
invalidateRect(r);
if (platformWidget())
platformWidget()->Update();
}
}
2008-10-17 Kevin Watters <kevinwatters@gmail.com>
Reviewed by Kevin Ollivier
Fix wx port's scrollbar and drawing handling after recent changes.
https://bugs.webkit.org/show_bug.cgi?id=21720
* WebView.cpp:
(wxWebView::OnPaint):
(wxWebView::OnSize):
2008-10-09 Kevin Ollivier <kevino@theolliviers.com>
wx build fixes.
......
......@@ -432,7 +432,7 @@ void wxWebView::OnPaint(wxPaintEvent& event)
if (frame->view()->needsLayout())
frame->view()->layout();
frame->view()->paint(gc, paintRect);
frame->view()->paintContents(gc, paintRect);
}
delete gc;
}
......@@ -445,6 +445,7 @@ void wxWebView::OnSize(wxSizeEvent& event)
WebCore::Frame* frame = m_mainFrame->GetFrame();
frame->sendResizeEvent();
frame->view()->layout();
frame->view()->adjustScrollbars();
}
event.Skip();
......
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