Commit 99654e6d authored by hyatt's avatar hyatt

Fix Win32 bustage.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent be71742c
......@@ -115,7 +115,7 @@ void ScrollView::resizeContents(int w,int h)
IntSize newSize(w,h);
if (m_data->contentsSize != newSize) {
m_data->contentsSize = newSize;
updateScrollBars();
updateScrollBars(m_data->scrollOffset);
}
}
......@@ -170,7 +170,7 @@ void ScrollView::scrollBy(int dx, int dy)
if (newScrollOffset != scrollOffset) {
m_data->scrollOffset = newScrollOffset;
updateScrollBars();
updateScrollBars(m_data->scrollOffset);
// ScrollBar updates can fail, so we check the final delta before scrolling
IntSize scrollDelta = m_data->scrollOffset - scrollOffset;
if (scrollDelta == IntSize())
......@@ -197,14 +197,14 @@ void ScrollView::suppressScrollBars(bool suppressed, bool repaintOnSuppress)
{
m_data->suppressScrollBars = suppressed;
if (repaintOnSuppress)
updateScrollBars();
updateScrollBars(m_data->scrollOffset);
}
void ScrollView::setHScrollBarMode(ScrollBarMode newMode)
{
if (m_data->hScrollBarMode != newMode) {
m_data->hScrollBarMode = newMode;
updateScrollBars();
updateScrollBars(m_data->scrollOffset);
}
}
......@@ -212,14 +212,14 @@ void ScrollView::setVScrollBarMode(ScrollBarMode newMode)
{
if (m_data->vScrollBarMode != newMode) {
m_data->vScrollBarMode = newMode;
updateScrollBars();
updateScrollBars(m_data->scrollOffset);
}
}
void ScrollView::setScrollBarsMode(ScrollBarMode newMode)
{
m_data->hScrollBarMode = m_data->vScrollBarMode = newMode;
updateScrollBars();
updateScrollBars(m_data->scrollOffset);
}
void ScrollView::setStaticBackground(bool flag)
......@@ -227,7 +227,7 @@ void ScrollView::setStaticBackground(bool flag)
m_data->hasStaticBackground = flag;
}
int ScrollView::updateScrollInfo(short type, int current, int max, int pageSize)
static int updateScrollInfo(ScrollView* view, short type, int current, int max, int pageSize)
{
SCROLLINFO si;
si.cbSize = sizeof(si);
......@@ -236,20 +236,20 @@ int ScrollView::updateScrollInfo(short type, int current, int max, int pageSize)
si.nMax = max;
si.nPage = pageSize;
si.nPos = current;
SetScrollInfo(containingWindow(), type, &si, TRUE);
GetScrollInfo(containingWindow(), type, &si);
SetScrollInfo(view->containingWindow(), type, &si, TRUE);
GetScrollInfo(view->containingWindow(), type, &si);
return si.nPos;
}
void ScrollView::updateScrollBars()
void ScrollView::updateScrollBars(const IntPoint&)
{
IntSize maxScrollPosition(contentsWidth(), contentsHeight());
IntSize scroll = scrollOffset().shrunkTo(maxScrollPosition);
scroll.clampNegativeToZero();
m_data->scrollOffset =
IntSize(updateScrollInfo(SB_HORZ, scroll.width(), contentsWidth() - 1, width()),
updateScrollInfo(SB_VERT, scroll.height(), contentsHeight() - 1, height()));
IntSize(updateScrollInfo(this, SB_HORZ, scroll.width(), contentsWidth() - 1, width()),
updateScrollInfo(this, SB_VERT, scroll.height(), contentsHeight() - 1, height()));
if (m_data->hScrollBarMode != ScrollBarAuto || m_data->suppressScrollBars)
ShowScrollBar(containingWindow(), SB_HORZ, (m_data->hScrollBarMode != ScrollBarAlwaysOff) && !m_data->suppressScrollBars);
......
......@@ -82,7 +82,7 @@ bool FrameView::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev,
bool FrameView::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) { return true; }
bool FrameView::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe) { return true; }
bool FrameView::passWheelEventToSubframe(PlatformWheelEvent& e, Frame* subframe) { return false; }
bool FrameView::passMousePressEventToScrollbar(MouseEventWithHitTestResults& mev) { return false; }
bool FrameView::passMousePressEventToScrollbar(MouseEventWithHitTestResults&, PlatformScrollBar*) { return false; }
void Widget::enableFlushDrawing() { notImplemented(); }
bool Widget::isEnabled() const { notImplemented(); return 0; }
......
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