Changeset 138991 in webkit


Ignore:
Timestamp:
Jan 7, 2013 2:12:47 PM (11 years ago)
Author:
wangxianzhu@chromium.org
Message:

Add window.internals.nonFastScrollableRects for testing scrollable areas in fast/slow paths
https://bugs.webkit.org/show_bug.cgi?id=105546

Reviewed by James Robinson.

.:

Export the new symbol.

  • Source/autotools/symbols.filter:

Source/WebCore:

No new tests. Added test API for new tests of other bugs.

  • WebCore.exp.in:
  • page/Page.cpp:

(WebCore::Page::nonFastScrollableRects):
(WebCore):

  • page/Page.h:

(WebCore):
(Page):

  • page/scrolling/ScrollingCoordinator.cpp:

(WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Change to public to allow Page::nonFastScrollableRects to access.

  • page/scrolling/ScrollingCoordinator.h:

(ScrollingCoordinator):

  • testing/Internals.cpp:

(WebCore::Internals::nonFastScrollableRects):
(WebCore):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit2:

Export the new symbol.

  • win/WebKit2.def.in:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r138811 r138991  
     12013-01-07  Xianzhu Wang  <wangxianzhu@chromium.org>
     2
     3        Add window.internals.nonFastScrollableRects for testing scrollable areas in fast/slow paths
     4        https://bugs.webkit.org/show_bug.cgi?id=105546
     5
     6        Reviewed by James Robinson.
     7
     8        Export the new symbol.
     9
     10        * Source/autotools/symbols.filter:
     11
    1122013-01-04  Adam Klein  <adamk@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r138990 r138991  
     12013-01-07  Xianzhu Wang  <wangxianzhu@chromium.org>
     2
     3        Add window.internals.nonFastScrollableRects for testing scrollable areas in fast/slow paths
     4        https://bugs.webkit.org/show_bug.cgi?id=105546
     5
     6        Reviewed by James Robinson.
     7
     8        No new tests. Added test API for new tests of other bugs.
     9
     10        * WebCore.exp.in:
     11        * page/Page.cpp:
     12        (WebCore::Page::nonFastScrollableRects):
     13        (WebCore):
     14        * page/Page.h:
     15        (WebCore):
     16        (Page):
     17        * page/scrolling/ScrollingCoordinator.cpp:
     18        (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Change to public to allow Page::nonFastScrollableRects to access.
     19        * page/scrolling/ScrollingCoordinator.h:
     20        (ScrollingCoordinator):
     21        * testing/Internals.cpp:
     22        (WebCore::Internals::nonFastScrollableRects):
     23        (WebCore):
     24        * testing/Internals.h:
     25        * testing/Internals.idl:
     26
    1272013-01-07  Tom Sepez  <tsepez@chromium.org>
    228
  • trunk/Source/WebCore/WebCore.exp.in

    r138983 r138991  
    762762__ZN7WebCore4Page21markAllMatchesForTextERKN3WTF6StringEjbj
    763763__ZN7WebCore4Page22allVisitedStateChangedEPNS_9PageGroupE
     764__ZN7WebCore4Page22nonFastScrollableRectsEPKNS_5FrameE
    764765__ZN7WebCore4Page23clearUndoRedoOperationsEv
    765766__ZN7WebCore4Page24resumeScriptedAnimationsEv
  • trunk/Source/WebCore/page/Page.cpp

    r138515 r138991  
    2626#include "Chrome.h"
    2727#include "ChromeClient.h"
     28#include "ClientRectList.h"
    2829#include "ContextMenuClient.h"
    2930#include "ContextMenuController.h"
     
    270271}
    271272
     273PassRefPtr<ClientRectList> Page::nonFastScrollableRects(const Frame* frame)
     274{
     275    if (Document* document = m_mainFrame->document())
     276        document->updateLayout();
     277
     278    Vector<IntRect> rects;
     279    if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
     280        rects = scrollingCoordinator->computeNonFastScrollableRegion(frame, IntPoint()).rects();
     281
     282    Vector<FloatQuad> quads(rects.size());
     283    for (size_t i = 0; i < rects.size(); ++i)
     284        quads[i] = FloatRect(rects[i]);
     285    return ClientRectList::create(quads);
     286}
     287
    272288struct ViewModeInfo {
    273289    const char* name;
  • trunk/Source/WebCore/page/Page.h

    r137388 r138991  
    5858    class Chrome;
    5959    class ChromeClient;
     60    class ClientRectList;
    6061#if ENABLE(CONTEXT_MENUS)
    6162    class ContextMenuClient;
     
    201202        String scrollingStateTreeAsText();
    202203        String mainThreadScrollingReasonsAsText();
     204        PassRefPtr<ClientRectList> nonFastScrollableRects(const Frame*);
    203205
    204206        Settings* settings() const { return m_settings.get(); }
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp

    r138717 r138991  
    137137}
    138138
    139 Region ScrollingCoordinator::computeNonFastScrollableRegion(Frame* frame, const IntPoint& frameLocation)
     139Region ScrollingCoordinator::computeNonFastScrollableRegion(const Frame* frame, const IntPoint& frameLocation) const
    140140{
    141141    Region nonFastScrollableRegion;
  • trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h

    r138076 r138991  
    161161    String mainThreadScrollingReasonsAsText() const;
    162162
     163    Region computeNonFastScrollableRegion(const Frame*, const IntPoint& frameLocation) const;
     164
    163165protected:
    164166    explicit ScrollingCoordinator(Page*);
    165167
    166     Region computeNonFastScrollableRegion(Frame*, const IntPoint& frameLocation);
    167168    unsigned computeCurrentWheelEventHandlerCount();
    168169    GraphicsLayer* scrollLayerForFrameView(FrameView*);
  • trunk/Source/WebCore/testing/Internals.cpp

    r138836 r138991  
    15591559}
    15601560
     1561PassRefPtr<ClientRectList> Internals::nonFastScrollableRects(Document* document, ExceptionCode& ec) const
     1562{
     1563    if (!document || !document->frame()) {
     1564        ec = INVALID_ACCESS_ERR;
     1565        return 0;
     1566    }
     1567
     1568    Page* page = document->page();
     1569    if (!page)
     1570        return 0;
     1571
     1572    return page->nonFastScrollableRects(document->frame());
     1573}
     1574
    15611575void Internals::garbageCollectDocumentResources(Document* document, ExceptionCode& ec) const
    15621576{
  • trunk/Source/WebCore/testing/Internals.h

    r138836 r138991  
    216216    String repaintRectsAsText(Document*, ExceptionCode&) const;
    217217    String scrollingStateTreeAsText(Document*, ExceptionCode&) const;
    218 
    219218    String mainThreadScrollingReasons(Document*, ExceptionCode&) const;
     219    PassRefPtr<ClientRectList> nonFastScrollableRects(Document*, ExceptionCode&) const;
    220220
    221221    void garbageCollectDocumentResources(Document*, ExceptionCode&) const;
  • trunk/Source/WebCore/testing/Internals.idl

    r138836 r138991  
    175175    DOMString scrollingStateTreeAsText(in Document document) raises (DOMException);
    176176    DOMString mainThreadScrollingReasons(in Document document) raises (DOMException);
     177    ClientRectList nonFastScrollableRects(in Document document) raises (DOMException);
    177178
    178179    DOMString repaintRectsAsText(in Document document) raises (DOMException);
  • trunk/Source/WebKit/win/WebKit.vcproj/WebKit.def.in

    r138759 r138991  
    15671567        ?pauseTransitionAtTime@AnimationController@WebCore@@QAE_NPAVRenderObject@2@ABVString@WTF@@N@Z
    15681568        ?addFromLiteralData@AtomicString@WTF@@CA?AV?$PassRefPtr@VStringImpl@WTF@@@2@PBDI@Z
     1569        ?nonFastScrollableRects@Page@WebCore@@QAE?AV?$PassRefPtr@VClientRectList@WebCore@@@WTF@@PBVFrame@2@@Z
  • trunk/Source/WebKit2/ChangeLog

    r138983 r138991  
     12013-01-07  Xianzhu Wang  <wangxianzhu@chromium.org>
     2
     3        Add window.internals.nonFastScrollableRects for testing scrollable areas in fast/slow paths
     4        https://bugs.webkit.org/show_bug.cgi?id=105546
     5
     6        Reviewed by James Robinson.
     7
     8        Export the new symbol.
     9
     10        * win/WebKit2.def.in:
     11
    1122013-01-07  Mike West  <mkwst@chromium.org>
    213
  • trunk/Source/autotools/symbols.filter

    r138632 r138991  
    3131_ZN7WebCore4Page18setPageScaleFactorEfRKNS_8IntPointE;
    3232_ZN7WebCore4Page20setDeviceScaleFactorEf;
     33_ZN7WebCore4Page22nonFastScrollableRectsEPKNS_5FrameE;
    3334_ZN7WebCore4Page24scrollingStateTreeAsTextEv;
    3435_ZN7WebCore4Page32mainThreadScrollingReasonsAsTextEv;
Note: See TracChangeset for help on using the changeset viewer.