Changeset 109121 in webkit


Ignore:
Timestamp:
Feb 28, 2012 10:29:12 AM (12 years ago)
Author:
jocelyn.turcotte@nokia.com
Message:

[Qt] Initialize QtWebContext as much as we can in its constructor.
https://bugs.webkit.org/show_bug.cgi?id=79809

Reviewed by Tor Arne Vestbø.

The icon database wouldn't be initialized on the QtWebContext while in WebKitTestRunner
since it doesn't call the initialize method on it after creating it.
Remove the initialize method, move the download manager and icon database initialization
in the constructor and call initializeContextInjectedBundleClient directly in
defaultContext to prevent overriding WKTR's injected bundle client.

  • UIProcess/qt/QtWebContext.cpp:

(WebKit::QtWebContext::QtWebContext):
(WebKit::QtWebContext::defaultContext):

  • UIProcess/qt/QtWebContext.h:

(QtWebContext):

Location:
trunk/Source/WebKit2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r109120 r109121  
     12012-02-28  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
     2
     3        [Qt] Initialize QtWebContext as much as we can in its constructor.
     4        https://bugs.webkit.org/show_bug.cgi?id=79809
     5
     6        Reviewed by Tor Arne Vestbø.
     7
     8        The icon database wouldn't be initialized on the QtWebContext while in WebKitTestRunner
     9        since it doesn't call the initialize method on it after creating it.
     10        Remove the initialize method, move the download manager and icon database initialization
     11        in the constructor and call initializeContextInjectedBundleClient directly in
     12        defaultContext to prevent overriding WKTR's injected bundle client.
     13
     14        * UIProcess/qt/QtWebContext.cpp:
     15        (WebKit::QtWebContext::QtWebContext):
     16        (WebKit::QtWebContext::defaultContext):
     17        * UIProcess/qt/QtWebContext.h:
     18        (QtWebContext):
     19
    1202012-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>
    221
  • trunk/Source/WebKit2/UIProcess/qt/QtWebContext.cpp

    r106104 r109121  
    4646
    4747QtWebContext::QtWebContext(WebContext* context)
    48     : m_context(context)
     48    : m_contextID(generateContextID())
     49    , m_context(context)
     50    , m_downloadManager(adoptPtr(new QtDownloadManager(context)))
     51    , m_iconDatabase(adoptPtr(new QtWebIconDatabaseClient(this)))
    4952{
    50     m_contextID = generateContextID();
    5153    contextMap.set(m_contextID, this);
    5254}
     
    7375    RefPtr<QtWebContext> defaultContext = QtWebContext::create(context.get());
    7476    s_defaultContext = defaultContext.get();
    75     defaultContext->initialize();
     77    // Make sure that this doesn't get called in WebKitTestRunner (defaultContext isn't used there).
     78    defaultContext->initializeContextInjectedBundleClient();
    7679
    7780    return defaultContext.release();
     
    106109{
    107110    return contextMap.get(id);
    108 }
    109 
    110 void QtWebContext::initialize()
    111 {
    112     m_downloadManager = adoptPtr(new QtDownloadManager(m_context.get()));
    113     m_iconDatabase = adoptPtr(new QtWebIconDatabaseClient(this));
    114     initializeContextInjectedBundleClient();
    115111}
    116112
  • trunk/Source/WebKit2/UIProcess/qt/QtWebContext.h

    r103323 r109121  
    6464    explicit QtWebContext(WebContext*);
    6565
    66     void initialize();
    6766    void initializeContextInjectedBundleClient();
    6867
Note: See TracChangeset for help on using the changeset viewer.