Reviewed by Eric.
Fix win32 build bustage after ggaren's Scrollbar renaming changes.
Properly include PlatformScrollBar.h in WbCore.vcproj.
Clean up WidgetWin.cpp a bit.
* WebCore.vcproj/WebCore/WebCore.vcproj:
* platform/Widget.h:
* platform/win/PlatformScrollBar.h:
* platform/win/ScrollViewWin.cpp:
(WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
(WebCore::ScrollView::resizeContents):
(WebCore::ScrollView::scrollBy):
(WebCore::ScrollView::hScrollbarMode):
(WebCore::ScrollView::vScrollbarMode):
(WebCore::ScrollView::suppressScrollbars):
(WebCore::ScrollView::setHScrollbarMode):
(WebCore::ScrollView::setVScrollbarMode):
(WebCore::ScrollView::setScrollbarsMode):
(WebCore::ScrollView::updateScrollbars):
* platform/win/TemporaryLinkStubs.cpp:
(FrameView::passMousePressEventToScrollbar):
(Widget::removeFromParent):
(ScrollView::scrollbarUnderMouse):
(PlatformScrollbar::PlatformScrollbar):
(PlatformScrollbar::~PlatformScrollbar):
(PlatformScrollbar::width):
(PlatformScrollbar::height):
(PlatformScrollbar::setEnabled):
(PlatformScrollbar::paint):
(PlatformScrollbar::updateThumbPosition):
(PlatformScrollbar::updateThumbProportion):
(PlatformScrollbar::setRect):
(Scrollbar::Scrollbar):
(Scrollbar::setSteps):
(Scrollbar::scroll):
(Scrollbar::setValue):
(Scrollbar::setProportion):
* platform/win/WidgetWin.cpp:
(WebCore::WidgetPrivate::WidgetPrivate):
(WebCore::Widget::Widget):
(WebCore::Widget::setContainingWindow):
(WebCore::Widget::containingWindow):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16832
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-10-05 Don Gibson <dgibson77@gmail.com>
+
+ Reviewed by Eric.
+
+ Fix win32 build bustage after ggaren's Scrollbar renaming changes.
+ Properly include PlatformScrollBar.h in WbCore.vcproj.
+ Clean up WidgetWin.cpp a bit.
+
+ * WebCore.vcproj/WebCore/WebCore.vcproj:
+ * platform/Widget.h:
+ * platform/win/PlatformScrollBar.h:
+ * platform/win/ScrollViewWin.cpp:
+ (WebCore::ScrollView::ScrollViewPrivate::ScrollViewPrivate):
+ (WebCore::ScrollView::resizeContents):
+ (WebCore::ScrollView::scrollBy):
+ (WebCore::ScrollView::hScrollbarMode):
+ (WebCore::ScrollView::vScrollbarMode):
+ (WebCore::ScrollView::suppressScrollbars):
+ (WebCore::ScrollView::setHScrollbarMode):
+ (WebCore::ScrollView::setVScrollbarMode):
+ (WebCore::ScrollView::setScrollbarsMode):
+ (WebCore::ScrollView::updateScrollbars):
+ * platform/win/TemporaryLinkStubs.cpp:
+ (FrameView::passMousePressEventToScrollbar):
+ (Widget::removeFromParent):
+ (ScrollView::scrollbarUnderMouse):
+ (PlatformScrollbar::PlatformScrollbar):
+ (PlatformScrollbar::~PlatformScrollbar):
+ (PlatformScrollbar::width):
+ (PlatformScrollbar::height):
+ (PlatformScrollbar::setEnabled):
+ (PlatformScrollbar::paint):
+ (PlatformScrollbar::updateThumbPosition):
+ (PlatformScrollbar::updateThumbProportion):
+ (PlatformScrollbar::setRect):
+ (Scrollbar::Scrollbar):
+ (Scrollbar::setSteps):
+ (Scrollbar::scroll):
+ (Scrollbar::setValue):
+ (Scrollbar::setProportion):
+ * platform/win/WidgetWin.cpp:
+ (WebCore::WidgetPrivate::WidgetPrivate):
+ (WebCore::Widget::Widget):
+ (WebCore::Widget::setContainingWindow):
+ (WebCore::Widget::containingWindow):
+
2006-10-05 Geoffrey Garen <ggaren@apple.com>
build fix.
RelativePath="..\..\platform\win\MouseEventWin.cpp"
>
</File>
+ <File
+ RelativePath="..\..\platform\win\PlatformScrollBar.h"
+ >
+ </File>
<File
RelativePath="..\..\platform\win\ResourceLoaderWin.cpp"
>
void setContainingWindow(HWND);
HWND containingWindow() const;
- void setParent(ScrollView*);
- ScrollView* parent() const;
-
virtual void scrolled() const {};
bool capturingMouse() const;
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef PlatformScrollBar_h
-#define PlatformScrollBar_h
+#ifndef PlatformScrollbar_h
+#define PlatformScrollbar_h
#include "Widget.h"
#include "ScrollBar.h"
namespace WebCore {
-class PlatformScrollBar : public Widget, public ScrollBar {
+class PlatformScrollbar : public Widget, public Scrollbar {
public:
- PlatformScrollBar(ScrollBarClient*, ScrollBarOrientation, ScrollBarControlSize);
- virtual ~PlatformScrollBar();
+ PlatformScrollbar(ScrollbarClient*, ScrollbarOrientation, ScrollbarControlSize);
+ virtual ~PlatformScrollbar();
virtual bool isWidget() const { return true; }
}
-#endif // PlatformScrollBar_h
+#endif // PlatformScrollbar_h
public:
ScrollViewPrivate()
: hasStaticBackground(false)
- , suppressScrollBars(false)
- , vScrollBarMode(ScrollBarAuto)
- , hScrollBarMode(ScrollBarAuto)
+ , suppressScrollbars(false)
+ , vScrollbarMode(ScrollbarAuto)
+ , hScrollbarMode(ScrollbarAuto)
{
}
IntSize scrollOffset;
IntSize contentsSize;
bool hasStaticBackground;
- bool suppressScrollBars;
- ScrollBarMode vScrollBarMode;
- ScrollBarMode hScrollBarMode;
+ bool suppressScrollbars;
+ ScrollbarMode vScrollbarMode;
+ ScrollbarMode hScrollbarMode;
};
ScrollView::ScrollView()
IntSize newSize(w,h);
if (m_data->contentsSize != newSize) {
m_data->contentsSize = newSize;
- updateScrollBars(m_data->scrollOffset);
+ updateScrollbars(m_data->scrollOffset);
}
}
if (newScrollOffset != scrollOffset) {
m_data->scrollOffset = newScrollOffset;
- updateScrollBars(m_data->scrollOffset);
- // ScrollBar updates can fail, so we check the final delta before scrolling
+ 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())
return;
}
}
-WebCore::ScrollBarMode ScrollView::hScrollBarMode() const
+WebCore::ScrollbarMode ScrollView::hScrollbarMode() const
{
- return m_data->hScrollBarMode;
+ return m_data->hScrollbarMode;
}
-WebCore::ScrollBarMode ScrollView::vScrollBarMode() const
+WebCore::ScrollbarMode ScrollView::vScrollbarMode() const
{
- return m_data->vScrollBarMode;
+ return m_data->vScrollbarMode;
}
-void ScrollView::suppressScrollBars(bool suppressed, bool repaintOnSuppress)
+void ScrollView::suppressScrollbars(bool suppressed, bool repaintOnSuppress)
{
- m_data->suppressScrollBars = suppressed;
+ m_data->suppressScrollbars = suppressed;
if (repaintOnSuppress)
- updateScrollBars(m_data->scrollOffset);
+ updateScrollbars(m_data->scrollOffset);
}
-void ScrollView::setHScrollBarMode(ScrollBarMode newMode)
+void ScrollView::setHScrollbarMode(ScrollbarMode newMode)
{
- if (m_data->hScrollBarMode != newMode) {
- m_data->hScrollBarMode = newMode;
- updateScrollBars(m_data->scrollOffset);
+ if (m_data->hScrollbarMode != newMode) {
+ m_data->hScrollbarMode = newMode;
+ updateScrollbars(m_data->scrollOffset);
}
}
-void ScrollView::setVScrollBarMode(ScrollBarMode newMode)
+void ScrollView::setVScrollbarMode(ScrollbarMode newMode)
{
- if (m_data->vScrollBarMode != newMode) {
- m_data->vScrollBarMode = newMode;
- updateScrollBars(m_data->scrollOffset);
+ if (m_data->vScrollbarMode != newMode) {
+ m_data->vScrollbarMode = newMode;
+ updateScrollbars(m_data->scrollOffset);
}
}
-void ScrollView::setScrollBarsMode(ScrollBarMode newMode)
+void ScrollView::setScrollbarsMode(ScrollbarMode newMode)
{
- m_data->hScrollBarMode = m_data->vScrollBarMode = newMode;
- updateScrollBars(m_data->scrollOffset);
+ m_data->hScrollbarMode = m_data->vScrollbarMode = newMode;
+ updateScrollbars(m_data->scrollOffset);
}
void ScrollView::setStaticBackground(bool flag)
return si.nPos;
}
-void ScrollView::updateScrollBars(const IntSize&)
+void ScrollView::updateScrollbars(const IntSize&)
{
IntSize maxScrollPosition(contentsWidth(), contentsHeight());
IntSize scroll = scrollOffset().shrunkTo(maxScrollPosition);
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);
- if (m_data->vScrollBarMode != ScrollBarAuto || m_data->suppressScrollBars)
- ShowScrollBar(containingWindow(), SB_VERT, (m_data->vScrollBarMode != ScrollBarAlwaysOff) && !m_data->suppressScrollBars);
+ if (m_data->hScrollbarMode != ScrollbarAuto || m_data->suppressScrollbars)
+ ShowScrollBar(containingWindow(), SB_HORZ, (m_data->hScrollbarMode != ScrollbarAlwaysOff) && !m_data->suppressScrollbars);
+ if (m_data->vScrollbarMode != ScrollbarAuto || m_data->suppressScrollbars)
+ ShowScrollBar(containingWindow(), SB_VERT, (m_data->vScrollbarMode != ScrollbarAlwaysOff) && !m_data->suppressScrollbars);
}
}
#include "FrameView.h"
#include "KURL.h"
#include "PlatformScrollBar.h"
-#include "ScrollBar.h"
+#include "Scrollbar.h"
#include "JavaAppletWidget.h"
#include "Page.h"
#include "Path.h"
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&, PlatformScrollBar*) { return false; }
+bool FrameView::passMousePressEventToScrollbar(MouseEventWithHitTestResults&, PlatformScrollbar*) { return false; }
void Widget::enableFlushDrawing() { notImplemented(); }
bool Widget::isEnabled() const { notImplemented(); return 0; }
Widget::FocusPolicy Widget::focusPolicy() const { notImplemented(); return NoFocus; }
void Widget::disableFlushDrawing() { notImplemented(); }
+void Widget::removeFromParent() { notImplemented(); }
GraphicsContext* Widget::lockDrawingFocus() { notImplemented(); return 0; }
void Widget::unlockDrawingFocus(GraphicsContext*) { notImplemented(); }
bool Widget::capturingMouse() const { return false; }
IntPoint ScrollView::convertChildToSelf(const Widget*, const IntPoint& p) const { return p; }
IntPoint ScrollView::convertSelfToChild(const Widget*, const IntPoint& p) const { return p; }
void ScrollView::scrolled() const {};
-PlatformScrollBar* ScrollView::scrollbarUnderMouse(const PlatformMouseEvent& mouseEvent) { return 0; }
+PlatformScrollbar* ScrollView::scrollbarUnderMouse(const PlatformMouseEvent& mouseEvent) { return 0; }
void GraphicsContext::setShadow(IntSize const&,int,Color const&) { }
void GraphicsContext::clearShadow() { }
int TextField::baselinePosition(int) const { return 0; }
void TextField::setLiveSearch(bool) { }
-PlatformScrollBar::PlatformScrollBar(ScrollBarClient* client, ScrollBarOrientation orientation, ScrollBarControlSize controlSize) : ScrollBar(client, orientation, controlSize) { }
-PlatformScrollBar::~PlatformScrollBar() { }
-int PlatformScrollBar::width() const { return 0; }
-int PlatformScrollBar::height() const { return 0; }
-void PlatformScrollBar::setEnabled(bool) { }
-void PlatformScrollBar::paint(GraphicsContext*, const IntRect& damageRect) { }
-void PlatformScrollBar::updateThumbPosition() { }
-void PlatformScrollBar::updateThumbProportion() { }
-void PlatformScrollBar::setRect(const IntRect&) { }
-
-ScrollBar::ScrollBar(ScrollBarClient*, ScrollBarOrientation, ScrollBarControlSize) { }
-void ScrollBar::setSteps(int, int) { }
-bool ScrollBar::scroll(ScrollDirection, ScrollGranularity, float) { return false; }
-bool ScrollBar::setValue(int) { return false; }
-void ScrollBar::setProportion(int, int) { }
+PlatformScrollbar::PlatformScrollbar(ScrollbarClient* client, ScrollbarOrientation orientation, ScrollbarControlSize controlSize) : Scrollbar(client, orientation, controlSize) { }
+PlatformScrollbar::~PlatformScrollbar() { }
+int PlatformScrollbar::width() const { return 0; }
+int PlatformScrollbar::height() const { return 0; }
+void PlatformScrollbar::setEnabled(bool) { }
+void PlatformScrollbar::paint(GraphicsContext*, const IntRect& damageRect) { }
+void PlatformScrollbar::updateThumbPosition() { }
+void PlatformScrollbar::updateThumbProportion() { }
+void PlatformScrollbar::setRect(const IntRect&) { }
+
+Scrollbar::Scrollbar(ScrollbarClient*, ScrollbarOrientation, ScrollbarControlSize) { }
+void Scrollbar::setSteps(int, int) { }
+bool Scrollbar::scroll(ScrollDirection, ScrollGranularity, float) { return false; }
+bool Scrollbar::setValue(int) { return false; }
+void Scrollbar::setProportion(int, int) { }
ListBox::ListBox() { }
ListBox::~ListBox() { }
HWND containingWindow;
Font font;
WidgetClient* client;
+
+ WidgetPrivate()
+ : containingWindow(0),
+ client(0) {}
};
Widget::Widget()
- : data(new WidgetPrivate)
-{
- data->containingWindow = 0;
- data->client = 0;
-}
+ : data(new WidgetPrivate) {}
Widget::~Widget()
{
delete data;
}
-HWND Widget::containingWindow() const
+void Widget::setContainingWindow(HWND hWnd)
{
- return data->containingWindow;
+ data->containingWindow = hWnd;
}
-void Widget::setContainingWindow(HWND hWnd)
+HWND Widget::containingWindow() const
{
- data->containingWindow = hWnd;
+ return data->containingWindow;
}
void Widget::setClient(WidgetClient* c)