Index: Source/WebCore/page/Page.cpp |
=================================================================== |
--- Source/WebCore/page/Page.cpp (revision 139630) |
+++ Source/WebCore/page/Page.cpp (working copy) |
@@ -25,6 +25,7 @@ |
#include "BackForwardList.h" |
#include "Chrome.h" |
#include "ChromeClient.h" |
+#include "ClientRectList.h" |
#include "ContextMenuClient.h" |
#include "ContextMenuController.h" |
#include "DOMWindow.h" |
@@ -269,6 +270,21 @@ |
return String(); |
} |
+PassRefPtr<ClientRectList> Page::nonFastScrollableRects(const Frame* frame) |
+{ |
+ if (Document* document = m_mainFrame->document()) |
+ document->updateLayout(); |
+ |
+ Vector<IntRect> rects; |
+ if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator()) |
+ rects = scrollingCoordinator->computeNonFastScrollableRegion(frame, IntPoint()).rects(); |
+ |
+ Vector<FloatQuad> quads(rects.size()); |
+ for (size_t i = 0; i < rects.size(); ++i) |
+ quads[i] = FloatRect(rects[i]); |
+ return ClientRectList::create(quads); |
+} |
+ |
struct ViewModeInfo { |
const char* name; |
Page::ViewMode type; |