2006-10-05 Don Gibson <dgibson77@gmail.com>
authorbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Oct 2006 02:48:36 +0000 (02:48 +0000)
committerbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Oct 2006 02:48:36 +0000 (02:48 +0000)
        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

WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore/WebCore.vcproj
WebCore/platform/Widget.h
WebCore/platform/win/PlatformScrollBar.h
WebCore/platform/win/ScrollViewWin.cpp
WebCore/platform/win/TemporaryLinkStubs.cpp
WebCore/platform/win/WidgetWin.cpp

index 9bb3e96dbd409c10fb365fda354f13b25a2ef38c..17db8884d0c970abcb704aa010f3cbeba3e15325 100644 (file)
@@ -1,3 +1,49 @@
+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.
index b01f7a7dc3fb3b585e117fc08f65ac1016f7f371..169c81652d00ff0f2f485324d9753777bc5e2bbd 100644 (file)
                                        RelativePath="..\..\platform\win\MouseEventWin.cpp"
                                        >
                                </File>
+                                <File
+                                        RelativePath="..\..\platform\win\PlatformScrollBar.h"
+                                        >
+                                </File>
                                <File
                                        RelativePath="..\..\platform\win\ResourceLoaderWin.cpp"
                                        >
index 841a2d147c72fda83124fd35a67efe561ac91274..31e4b2e07807283ed7251cb86c365a78b6b04a04 100644 (file)
@@ -136,9 +136,6 @@ namespace WebCore {
         void setContainingWindow(HWND);
         HWND containingWindow() const;
 
-        void setParent(ScrollView*);
-        ScrollView* parent() const;
-
         virtual void scrolled() const {};
 
         bool capturingMouse() const;
index f7cc2f8a1352e4376045d6652406c12f387a736c..6e38271586701c6a330029289c6fe00c316fc56f 100644 (file)
  * 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; }
 
@@ -54,5 +54,5 @@ protected:
 
 }
 
-#endif // PlatformScrollBar_h
+#endif // PlatformScrollbar_h
 
index 09a6f9313897bb76f10e465ce8a50807c2799fbd..17445d64f4624fb8855846bb5e42fc5c563130ff 100644 (file)
@@ -40,17 +40,17 @@ class ScrollView::ScrollViewPrivate {
 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()
@@ -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(m_data->scrollOffset);
+        updateScrollbars(m_data->scrollOffset);
     }    
 }
 
@@ -170,8 +170,8 @@ void ScrollView::scrollBy(int dx, int dy)
 
     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;
@@ -183,43 +183,43 @@ void ScrollView::scrollBy(int dx, int dy)
     }
 }
 
-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)
@@ -241,7 +241,7 @@ static int updateScrollInfo(ScrollView* view, short type, int current, int max,
     return si.nPos;
 }
 
-void ScrollView::updateScrollBars(const IntSize&)
+void ScrollView::updateScrollbars(const IntSize&)
 { 
     IntSize maxScrollPosition(contentsWidth(), contentsHeight());
     IntSize scroll = scrollOffset().shrunkTo(maxScrollPosition);
@@ -251,10 +251,10 @@ void ScrollView::updateScrollBars(const IntSize&)
         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);
 }
 
 }
index 8e68ac6377ec75a6eee90c3813d5cd1950bd1514..e5310db36b4700979a10d1cd065fd529b56b427f 100644 (file)
@@ -45,7 +45,7 @@
 #include "FrameView.h"
 #include "KURL.h"
 #include "PlatformScrollBar.h"
-#include "ScrollBar.h"
+#include "Scrollbar.h"
 #include "JavaAppletWidget.h"
 #include "Page.h"
 #include "Path.h"
@@ -81,12 +81,13 @@ 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&, 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; }
@@ -271,7 +272,7 @@ void ScrollView::themeChanged() { }
 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() { }
@@ -330,21 +331,21 @@ IntSize TextField::sizeForCharacterWidth(int) const { return IntSize(); }
 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() { }
index ba9972ce9000f86296651d4125ee68de25e409bc..a1335a8bdb2dd49ace1dafc24224b6a7789c94d4 100644 (file)
@@ -41,28 +41,28 @@ public:
     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)