Changeset 185400 in webkit


Ignore:
Timestamp:
Jun 9, 2015 8:34:24 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Implement dumpProgressFinishedCallback() for Win layoutTestController.
https://bugs.webkit.org/show_bug.cgi?id=66773

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2015-06-09
Reviewed by Darin Adler.

Source/WebKit/win:

  • WebView.cpp:

(WebView::setFrameLoadDelegatePrivate):

Tools:

  • DumpRenderTree/win/FrameLoadDelegate.cpp:
  • DumpRenderTree/win/FrameLoadDelegate.h:

LayoutTests:

  • platform/win/TestExpectations:
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r185398 r185400  
     12015-06-09  Hyungwook Lee  <hyungwook.lee@navercorp.com>
     2
     3        Implement dumpProgressFinishedCallback() for Win layoutTestController.
     4        https://bugs.webkit.org/show_bug.cgi?id=66773
     5
     6        Reviewed by Darin Adler.
     7
     8        * platform/win/TestExpectations:
     9
    1102015-06-09  Ryosuke Niwa  <rniwa@webkit.org>
    211
  • trunk/LayoutTests/platform/win/TestExpectations

    r185335 r185400  
    457457# Font feature settings is not implemented.
    458458css3/font-feature-settings-rendering.html [ Skip ]
    459 
    460 # TODO Implement dumpProgressFinishedCallback
    461 webkit.org/b/66773 http/tests/loading/progress-finished-callback.html
    462459
    463460# TODO HiDPI tests require test infrastructure enhancements (e.g. testRunner.setBackingScaleFactor)
  • trunk/Source/WebKit/win/ChangeLog

    r185342 r185400  
     12015-06-09  Hyungwook Lee  <hyungwook.lee@navercorp.com>
     2
     3        Implement dumpProgressFinishedCallback() for Win layoutTestController.
     4        https://bugs.webkit.org/show_bug.cgi?id=66773
     5
     6        Reviewed by Darin Adler.
     7
     8        * WebView.cpp:
     9        (WebView::setFrameLoadDelegatePrivate):
     10
    1112015-06-08  Chris Dumez  <cdumez@apple.com>
    212
  • trunk/Source/WebKit/win/WebView.cpp

    r185259 r185400  
    52505250    /* [in] */ IWebFrameLoadDelegatePrivate* d)
    52515251{
     5252    if (m_frameLoadDelegatePrivate == d)
     5253        return S_OK;
     5254
     5255    static BSTR webViewProgressFinishedNotificationName = SysAllocString(WebViewProgressFinishedNotification);
     5256
     5257    IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
     5258
     5259    COMPtr<IWebNotificationObserver> wasObserver(Query, m_frameLoadDelegatePrivate);
     5260    if (wasObserver)
     5261        notifyCenter->removeObserver(wasObserver.get(), webViewProgressFinishedNotificationName, nullptr);
     5262
    52525263    m_frameLoadDelegatePrivate = d;
     5264
     5265    COMPtr<IWebNotificationObserver> isObserver(Query, m_frameLoadDelegatePrivate);
     5266    if (isObserver)
     5267        notifyCenter->addObserver(isObserver.get(), webViewProgressFinishedNotificationName, nullptr);
     5268
    52535269    return S_OK;
    52545270}
  • trunk/Tools/ChangeLog

    r185371 r185400  
     12015-06-09  Hyungwook Lee  <hyungwook.lee@navercorp.com>
     2
     3        Implement dumpProgressFinishedCallback() for Win layoutTestController.
     4        https://bugs.webkit.org/show_bug.cgi?id=66773
     5
     6        Reviewed by Darin Adler.
     7
     8        * DumpRenderTree/win/FrameLoadDelegate.cpp:
     9        * DumpRenderTree/win/FrameLoadDelegate.h:
     10
    1112015-06-09  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.cpp

    r179409 r185400  
    9797    else if (IsEqualGUID(riid, IID_IWebFrameLoadDelegatePrivate2))
    9898        *ppvObject = static_cast<IWebFrameLoadDelegatePrivate2*>(this);
     99    else if (IsEqualGUID(riid, IID_IWebNotificationObserver))
     100        *ppvObject = static_cast<IWebNotificationObserver*>(this);
    99101    else
    100102        return E_NOINTERFACE;
     
    425427    return S_OK;
    426428}
     429
     430HRESULT FrameLoadDelegate::onNotify(IWebNotification* notification)
     431{
     432    _bstr_t notificationName;
     433    HRESULT hr = notification->name(&notificationName.GetBSTR());
     434    if (FAILED(hr))
     435        return hr;
     436
     437    static _bstr_t webViewProgressFinishedNotificationName(WebViewProgressFinishedNotification);
     438
     439    if (!wcscmp(notificationName, webViewProgressFinishedNotificationName))
     440        webViewProgressFinishedNotification();
     441
     442    return S_OK;
     443}
     444
     445void FrameLoadDelegate::webViewProgressFinishedNotification()
     446{
     447    if (!done && gTestRunner->dumpProgressFinishedCallback())
     448        printf("postProgressFinishedNotification\n");
     449}
  • trunk/Tools/DumpRenderTree/win/FrameLoadDelegate.h

    r174796 r185400  
    3636class GCController;
    3737
    38 class FrameLoadDelegate : public IWebFrameLoadDelegate, public IWebFrameLoadDelegatePrivate2 {
     38class FrameLoadDelegate : public IWebFrameLoadDelegate, public IWebFrameLoadDelegatePrivate2, public IWebNotificationObserver {
    3939public:
    4040    FrameLoadDelegate();
     
    151151        /* [in] */ IWebFrame *frame) { return E_NOTIMPL; }
    152152
     153    // IWebNotificationObserver
     154    virtual HRESULT STDMETHODCALLTYPE onNotify(IWebNotification*);
     155
    153156private:
    154157    void didClearWindowObjectForFrameInIsolatedWorld(IWebFrame*, IWebScriptWorld*);
     
    156159
    157160    void locationChangeDone(IWebError*, IWebFrame*);
     161    void webViewProgressFinishedNotification();
    158162
    159163    ULONG m_refCount;
Note: See TracChangeset for help on using the changeset viewer.