This source file includes following definitions.
- invalidateScrollbarRect
- isActive
- scrollbarsCanBeActive
- scrollableAreaBoundingBox
- invalidateRect
- hostWindow
- windowClipRect
- paintContents
- contentsResized
- scrollbarExistenceDidChange
#include "config.h"
#include "platform/scroll/FramelessScrollView.h"
#include "platform/scroll/FramelessScrollViewClient.h"
namespace WebCore {
FramelessScrollView::~FramelessScrollView()
{
setHasHorizontalScrollbar(false);
setHasVerticalScrollbar(false);
}
void FramelessScrollView::invalidateScrollbarRect(Scrollbar* scrollbar, const IntRect& rect)
{
IntRect dirtyRect = rect;
dirtyRect.move(scrollbar->x(), scrollbar->y());
invalidateRect(dirtyRect);
}
bool FramelessScrollView::isActive() const
{
return true;
}
bool FramelessScrollView::scrollbarsCanBeActive() const
{
return isActive();
}
IntRect FramelessScrollView::scrollableAreaBoundingBox() const
{
return windowClipRect(IncludeScrollbars);
}
void FramelessScrollView::invalidateRect(const IntRect& rect)
{
if (HostWindow* h = hostWindow())
h->invalidateContentsAndRootView(rect);
}
HostWindow* FramelessScrollView::hostWindow() const
{
return const_cast<FramelessScrollViewClient*>(m_client);
}
IntRect FramelessScrollView::windowClipRect(IncludeScrollbarsInRect scrollbarInclusion) const
{
IntRect clipRect = visibleContentRect(scrollbarInclusion);
if (shouldPlaceVerticalScrollbarOnLeft() && verticalScrollbar())
clipRect.move(verticalScrollbar()->width(), 0);
return contentsToWindow(clipRect);
}
void FramelessScrollView::paintContents(GraphicsContext*, const IntRect&)
{
}
void FramelessScrollView::contentsResized()
{
}
void FramelessScrollView::scrollbarExistenceDidChange()
{
}
}