diff options
author | Ben Murdoch <benm@google.com> | 2011-05-16 16:25:10 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-05-23 18:54:14 +0100 |
commit | ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb (patch) | |
tree | db769fadd053248f85db67434a5b275224defef7 /Source/WebCore/platform/win/PopupMenuWin.h | |
parent | 52e2557aeb8477967e97fd24f20f8f407a10fa15 (diff) | |
download | external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.zip external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.gz external_webkit-ab9e7a118cf1ea2e3a93dce683b2ded3e7291ddb.tar.bz2 |
Merge WebKit at r76408: Initial merge by git.
Change-Id: I5b91decbd693ccbf5c1b8354b37cd68cc9a1ea53
Diffstat (limited to 'Source/WebCore/platform/win/PopupMenuWin.h')
-rw-r--r-- | Source/WebCore/platform/win/PopupMenuWin.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/Source/WebCore/platform/win/PopupMenuWin.h b/Source/WebCore/platform/win/PopupMenuWin.h index bfec7aa..0d7630c 100644 --- a/Source/WebCore/platform/win/PopupMenuWin.h +++ b/Source/WebCore/platform/win/PopupMenuWin.h @@ -1,4 +1,5 @@ /* + * Copyright (C) 2011 Apple Inc. All rights reserved. * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). * * This library is free software; you can redistribute it and/or @@ -23,8 +24,8 @@ #include "IntRect.h" #include "PopupMenu.h" #include "PopupMenuClient.h" +#include "ScrollableArea.h" #include "Scrollbar.h" -#include "ScrollbarClient.h" #include <wtf/PassRefPtr.h> #include <wtf/RefCounted.h> #include <wtf/RefPtr.h> @@ -38,7 +39,7 @@ namespace WebCore { class FrameView; class Scrollbar; -class PopupMenuWin : public PopupMenu, private ScrollbarClient { +class PopupMenuWin : public PopupMenu, private ScrollableArea { public: PopupMenuWin(PopupMenuClient*); ~PopupMenuWin(); @@ -78,7 +79,6 @@ private: void setWasClicked(bool b = true) { m_wasClicked = b; } bool wasClicked() const { return m_wasClicked; } - void setScrollOffset(int offset) { m_scrollOffset = offset; } int scrollOffset() const { return m_scrollOffset; } bool scrollToRevealSelection(); @@ -90,13 +90,17 @@ private: bool scrollbarCapturingMouse() const { return m_scrollbarCapturingMouse; } void setScrollbarCapturingMouse(bool b) { m_scrollbarCapturingMouse = b; } - // ScrollBarClient + // ScrollableArea virtual int scrollSize(ScrollbarOrientation orientation) const; - virtual void setScrollOffsetFromAnimation(const IntPoint&); - virtual void valueChanged(Scrollbar*); + virtual int scrollPosition(Scrollbar*) const; + virtual void setScrollOffset(const IntPoint&); virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&); virtual bool isActive() const { return true; } virtual bool scrollbarCornerPresent() const { return false; } + virtual Scrollbar* verticalScrollbar() const { return m_scrollbar.get(); } + + // NOTE: This should only be called by the overriden setScrollOffset from ScrollableArea. + void scrollTo(int offset); void calculatePositionAndSize(const IntRect&, FrameView*); void invalidateItem(int index); @@ -120,6 +124,6 @@ private: bool m_showPopup; }; -} +} // namespace WebCore #endif // PopupMenuWin_h |