Diff
Modified: branches/chromium/1364/Source/WebCore/WebCore.exp.in (139630 => 139631)
--- branches/chromium/1364/Source/WebCore/WebCore.exp.in 2013-01-14 19:11:48 UTC (rev 139630)
+++ branches/chromium/1364/Source/WebCore/WebCore.exp.in 2013-01-14 19:21:46 UTC (rev 139631)
@@ -759,6 +759,7 @@
__ZN7WebCore4Page20unmarkAllTextMatchesEv
__ZN7WebCore4Page21markAllMatchesForTextERKN3WTF6StringEjbj
__ZN7WebCore4Page22allVisitedStateChangedEPNS_9PageGroupE
+__ZN7WebCore4Page22nonFastScrollableRectsEPKNS_5FrameE
__ZN7WebCore4Page23clearUndoRedoOperationsEv
__ZN7WebCore4Page24resumeScriptedAnimationsEv
__ZN7WebCore4Page24scrollingStateTreeAsTextEv
Modified: branches/chromium/1364/Source/WebCore/page/Page.cpp (139630 => 139631)
--- branches/chromium/1364/Source/WebCore/page/Page.cpp 2013-01-14 19:11:48 UTC (rev 139630)
+++ branches/chromium/1364/Source/WebCore/page/Page.cpp 2013-01-14 19:21:46 UTC (rev 139631)
@@ -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;
Modified: branches/chromium/1364/Source/WebCore/page/Page.h (139630 => 139631)
--- branches/chromium/1364/Source/WebCore/page/Page.h 2013-01-14 19:11:48 UTC (rev 139630)
+++ branches/chromium/1364/Source/WebCore/page/Page.h 2013-01-14 19:21:46 UTC (rev 139631)
@@ -57,6 +57,7 @@
class BackForwardList;
class Chrome;
class ChromeClient;
+ class ClientRectList;
#if ENABLE(CONTEXT_MENUS)
class ContextMenuClient;
class ContextMenuController;
@@ -200,6 +201,7 @@
String scrollingStateTreeAsText();
String mainThreadScrollingReasonsAsText();
+ PassRefPtr<ClientRectList> nonFastScrollableRects(const Frame*);
Settings* settings() const { return m_settings.get(); }
ProgressTracker* progress() const { return m_progress.get(); }
Modified: branches/chromium/1364/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (139630 => 139631)
--- branches/chromium/1364/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2013-01-14 19:11:48 UTC (rev 139630)
+++ branches/chromium/1364/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp 2013-01-14 19:21:46 UTC (rev 139631)
@@ -136,7 +136,7 @@
#endif
}
-Region ScrollingCoordinator::computeNonFastScrollableRegion(Frame* frame, const IntPoint& frameLocation)
+Region ScrollingCoordinator::computeNonFastScrollableRegion(const Frame* frame, const IntPoint& frameLocation) const
{
Region nonFastScrollableRegion;
FrameView* frameView = frame->view();
Modified: branches/chromium/1364/Source/WebCore/page/scrolling/ScrollingCoordinator.h (139630 => 139631)
--- branches/chromium/1364/Source/WebCore/page/scrolling/ScrollingCoordinator.h 2013-01-14 19:11:48 UTC (rev 139630)
+++ branches/chromium/1364/Source/WebCore/page/scrolling/ScrollingCoordinator.h 2013-01-14 19:21:46 UTC (rev 139631)
@@ -160,10 +160,11 @@
static String mainThreadScrollingReasonsAsText(MainThreadScrollingReasons);
String mainThreadScrollingReasonsAsText() const;
+ Region computeNonFastScrollableRegion(const Frame*, const IntPoint& frameLocation) const;
+
protected:
explicit ScrollingCoordinator(Page*);
- Region computeNonFastScrollableRegion(Frame*, const IntPoint& frameLocation);
unsigned computeCurrentWheelEventHandlerCount();
GraphicsLayer* scrollLayerForFrameView(FrameView*);
Modified: branches/chromium/1364/Source/WebCore/testing/Internals.cpp (139630 => 139631)
--- branches/chromium/1364/Source/WebCore/testing/Internals.cpp 2013-01-14 19:11:48 UTC (rev 139630)
+++ branches/chromium/1364/Source/WebCore/testing/Internals.cpp 2013-01-14 19:21:46 UTC (rev 139631)
@@ -1514,6 +1514,20 @@
return page->mainThreadScrollingReasonsAsText();
}
+PassRefPtr<ClientRectList> Internals::nonFastScrollableRects(Document* document, ExceptionCode& ec) const
+{
+ if (!document || !document->frame()) {
+ ec = INVALID_ACCESS_ERR;
+ return 0;
+ }
+
+ Page* page = document->page();
+ if (!page)
+ return 0;
+
+ return page->nonFastScrollableRects(document->frame());
+}
+
void Internals::garbageCollectDocumentResources(Document* document, ExceptionCode& ec) const
{
if (!document) {
Modified: branches/chromium/1364/Source/WebCore/testing/Internals.h (139630 => 139631)
--- branches/chromium/1364/Source/WebCore/testing/Internals.h 2013-01-14 19:11:48 UTC (rev 139630)
+++ branches/chromium/1364/Source/WebCore/testing/Internals.h 2013-01-14 19:21:46 UTC (rev 139631)
@@ -211,8 +211,8 @@
String layerTreeAsText(Document*, ExceptionCode&) const;
String repaintRectsAsText(Document*, ExceptionCode&) const;
String scrollingStateTreeAsText(Document*, ExceptionCode&) const;
-
String mainThreadScrollingReasons(Document*, ExceptionCode&) const;
+ PassRefPtr<ClientRectList> nonFastScrollableRects(Document*, ExceptionCode&) const;
void garbageCollectDocumentResources(Document*, ExceptionCode&) const;
Modified: branches/chromium/1364/Source/WebCore/testing/Internals.idl (139630 => 139631)
--- branches/chromium/1364/Source/WebCore/testing/Internals.idl 2013-01-14 19:11:48 UTC (rev 139630)
+++ branches/chromium/1364/Source/WebCore/testing/Internals.idl 2013-01-14 19:21:46 UTC (rev 139631)
@@ -171,6 +171,7 @@
DOMString scrollingStateTreeAsText(in Document document) raises (DOMException);
DOMString mainThreadScrollingReasons(in Document document) raises (DOMException);
+ ClientRectList nonFastScrollableRects(in Document document) raises (DOMException);
DOMString repaintRectsAsText(in Document document) raises (DOMException);
Modified: branches/chromium/1364/Source/autotools/symbols.filter (139630 => 139631)
--- branches/chromium/1364/Source/autotools/symbols.filter 2013-01-14 19:11:48 UTC (rev 139630)
+++ branches/chromium/1364/Source/autotools/symbols.filter 2013-01-14 19:21:46 UTC (rev 139631)
@@ -30,6 +30,7 @@
_ZN7WebCore4Page13setPaginationERKNS_10PaginationE;
_ZN7WebCore4Page18setPageScaleFactorEfRKNS_8IntPointE;
_ZN7WebCore4Page20setDeviceScaleFactorEf;
+_ZN7WebCore4Page22nonFastScrollableRectsEPKNS_5FrameE;
_ZN7WebCore4Page24scrollingStateTreeAsTextEv;
_ZN7WebCore4Page32mainThreadScrollingReasonsAsTextEv;
_ZN7WebCore4Page16setCanStartMediaEb;