Changeset 64208 in webkit


Ignore:
Timestamp:
Jul 28, 2010 9:13:30 AM (14 years ago)
Author:
steveblock@google.com
Message:

2010-07-26 Steve Block <steveblock@google.com>

Reviewed by Jeremy Orlow.

Page clients should be passed to Page constructor via structure of pointers
https://bugs.webkit.org/show_bug.cgi?id=42834

  • src/WebViewImpl.cpp: (WebKit::WebViewImpl::WebViewImpl):

2010-07-26 Steve Block <steveblock@google.com>

Reviewed by Jeremy Orlow.

Page clients should be passed to Page constructor via structure of pointers
https://bugs.webkit.org/show_bug.cgi?id=42834

  • Api/qwebpage.cpp: (QWebPagePrivate::QWebPagePrivate):

2010-07-26 Steve Block <steveblock@google.com>

Reviewed by Jeremy Orlow.

Page clients should be passed to Page constructor via structure of pointers
https://bugs.webkit.org/show_bug.cgi?id=42834

  • webkit/webkitwebview.cpp: (webkit_web_view_init):

2010-07-26 Steve Block <steveblock@google.com>

Reviewed by Jeremy Orlow.

Page clients should be passed to Page constructor via structure of pointers
https://bugs.webkit.org/show_bug.cgi?id=42834

  • WebView.cpp: (WebView::initWithFrame):

2010-07-26 Steve Block <steveblock@google.com>

Reviewed by Jeremy Orlow.

Page clients should be passed to Page constructor via structure of pointers
https://bugs.webkit.org/show_bug.cgi?id=42834

  • WebView.cpp: (wxWebView::Create):

2010-07-26 Steve Block <steveblock@google.com>

Reviewed by Jeremy Orlow.

Page clients should be passed to Page constructor via structure of pointers
https://bugs.webkit.org/show_bug.cgi?id=42834

  • WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):

2010-07-26 Steve Block <steveblock@google.com>

Reviewed by Jeremy Orlow.

Page clients should be passed to Page constructor via structure of pointers
https://bugs.webkit.org/show_bug.cgi?id=42834

  • ewk/ewk_view.cpp: (_ewk_view_priv_new):

2010-07-26 Steve Block <steveblock@google.com>

Reviewed by Jeremy Orlow.

Page clients should be passed to Page constructor via structure of pointers
https://bugs.webkit.org/show_bug.cgi?id=42834

No new tests, refactoring only.

  • WebCore.exp.in:
  • page/Page.cpp: (WebCore::Page::Page):
  • page/Page.h: (WebCore::Page::PageClients::PageClients):
  • svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged):

2010-07-26 Steve Block <steveblock@google.com>

Reviewed by Jeremy Orlow.

Page clients should be passed to Page constructor via structure of pointers
https://bugs.webkit.org/show_bug.cgi?id=42834

  • WebKit2/WebProcess/WebPage/WebPage.cpp: (WebPage::WebPage):
Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r64207 r64208  
     12010-07-26  Steve Block  <steveblock@google.com>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        Page clients should be passed to Page constructor via structure of pointers
     6        https://bugs.webkit.org/show_bug.cgi?id=42834
     7
     8        No new tests, refactoring only.
     9
     10        * WebCore.exp.in:
     11        * page/Page.cpp:
     12        (WebCore::Page::Page):
     13        * page/Page.h:
     14        (WebCore::Page::PageClients::PageClients):
     15        * svg/graphics/SVGImage.cpp:
     16        (WebCore::SVGImage::dataChanged):
     17
    1182010-07-28  Xianzhu Wang  <phnixwxz@gmail.com>
    219
  • trunk/WebCore/WebCore.exp.in

    r64124 r64208  
    566566__ZN7WebCore4Page9goForwardEv
    567567__ZN7WebCore4Page9initGroupEv
    568 __ZN7WebCore4PageC1EPNS_12ChromeClientEPNS_17ContextMenuClientEPNS_12EditorClientEPNS_10DragClientEPNS_15InspectorClientEPNS_18PluginHalterClientEPNS_27GeolocationControllerClientEPNS_23DeviceOrientationClientEPNS_27BackForwardControllerClientE
     568__ZN7WebCore4PageC1ERKNS0_11PageClientsE
    569569__ZN7WebCore4PageD1Ev
    570570__ZN7WebCore4coreEP20NSURLProtectionSpace
  • trunk/WebCore/page/Page.cpp

    r64111 r64208  
    125125}
    126126
    127 Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, EditorClient* editorClient, DragClient* dragClient, InspectorClient* inspectorClient, PluginHalterClient* pluginHalterClient, GeolocationControllerClient* geolocationControllerClient, DeviceOrientationClient* deviceOrientationClient, BackForwardControllerClient* backForwardControllerClient)
    128     : m_chrome(new Chrome(this, chromeClient))
     127Page::Page(const PageClients& pageClients)
     128    : m_chrome(new Chrome(this, pageClients.chromeClient))
    129129    , m_dragCaretController(new SelectionController(0, true))
    130130#if ENABLE(DRAG_SUPPORT)
    131     , m_dragController(new DragController(this, dragClient))
     131    , m_dragController(new DragController(this, pageClients.dragClient))
    132132#endif
    133133    , m_focusController(new FocusController(this))
    134134#if ENABLE(CONTEXT_MENUS)
    135     , m_contextMenuController(new ContextMenuController(this, contextMenuClient))
     135    , m_contextMenuController(new ContextMenuController(this, pageClients.contextMenuClient))
    136136#endif
    137137#if ENABLE(INSPECTOR)
    138     , m_inspectorController(new InspectorController(this, inspectorClient))
     138    , m_inspectorController(new InspectorController(this, pageClients.inspectorClient))
    139139#endif
    140140#if ENABLE(CLIENT_BASED_GEOLOCATION)
    141     , m_geolocationController(new GeolocationController(this, geolocationControllerClient))
     141    , m_geolocationController(new GeolocationController(this, pageClients.geolocationControllerClient))
    142142#endif
    143143#if ENABLE(DEVICE_ORIENTATION)
    144     , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? new DeviceOrientationController(this, deviceOrientationClient) : 0)
     144    , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? new DeviceOrientationController(this, pageClients.deviceOrientationClient) : 0)
    145145#endif
    146146#if ENABLE(INPUT_SPEECH)
    147     , m_speechInputClient(0)
     147    , m_speechInputClient(pageClients.speechInputClient)
    148148#endif
    149149    , m_settings(new Settings(this))
    150150    , m_progress(new ProgressTracker)
    151     , m_backForwardController(new BackForwardController(this, backForwardControllerClient))
     151    , m_backForwardController(new BackForwardController(this, pageClients.backForwardControllerClient))
    152152    , m_theme(RenderTheme::themeForPage(this))
    153     , m_editorClient(editorClient)
     153    , m_editorClient(pageClients.editorClient)
    154154    , m_frameCount(0)
    155155    , m_openedByDOM(false)
     
    169169    , m_canStartMedia(true)
    170170{
    171 #if !ENABLE(CONTEXT_MENUS)
    172     UNUSED_PARAM(contextMenuClient);
    173 #endif
    174 #if !ENABLE(DRAG_SUPPORT)
    175     UNUSED_PARAM(dragClient);
    176 #endif
    177 #if !ENABLE(INSPECTOR)
    178     UNUSED_PARAM(inspectorClient);
    179 #endif
    180 #if !ENABLE(CLIENT_BASED_GEOLOCATION)
    181     UNUSED_PARAM(geolocationControllerClient);
    182 #endif
    183 #if !ENABLE(CLIENT_DEVICE_ORIENTATION)
    184     UNUSED_PARAM(deviceOrientationClient);
    185 #endif
    186 
    187171    if (!allPages) {
    188172        allPages = new HashSet<Page*>;
     
    194178    allPages->add(this);
    195179
    196     if (pluginHalterClient) {
    197         m_pluginHalter.set(new PluginHalter(pluginHalterClient));
     180    if (pageClients.pluginHalterClient) {
     181        m_pluginHalter.set(new PluginHalter(pageClients.pluginHalterClient));
    198182        m_pluginHalter->setPluginAllowedRunTime(m_settings->pluginAllowedRunTime());
    199183    }
  • trunk/WebCore/page/Page.h

    r64111 r64208  
    9292        static void setNeedsReapplyStyles();
    9393
    94         Page(ChromeClient*, ContextMenuClient*, EditorClient*, DragClient*, InspectorClient*, PluginHalterClient*, GeolocationControllerClient*, DeviceOrientationClient*, BackForwardControllerClient*);
     94        // It is up to the platform to ensure that non-null clients are provided where required.
     95        struct PageClients {
     96            PageClients()
     97                : chromeClient(0)
     98                , contextMenuClient(0)
     99                , editorClient(0)
     100                , dragClient(0)
     101                , inspectorClient(0)
     102                , pluginHalterClient(0)
     103                , geolocationControllerClient(0)
     104                , deviceOrientationClient(0)
     105                , backForwardControllerClient(0)
     106                , speechInputClient(0)
     107            { }
     108
     109            ChromeClient* chromeClient;
     110            ContextMenuClient* contextMenuClient;
     111            EditorClient* editorClient;
     112            DragClient* dragClient;
     113            InspectorClient* inspectorClient;
     114            PluginHalterClient* pluginHalterClient;
     115            GeolocationControllerClient* geolocationControllerClient;
     116            DeviceOrientationClient* deviceOrientationClient;
     117            BackForwardControllerClient* backForwardControllerClient;
     118            SpeechInputClient* speechInputClient;
     119        };
     120
     121        Page(const PageClients&);
    95122        ~Page();
    96123
     
    156183#endif
    157184#if ENABLE(INPUT_SPEECH)
    158         void setSpeechInputClient(SpeechInputClient* client) { m_speechInputClient = client; }
    159185        SpeechInput* speechInput();
    160186#endif
  • trunk/WebCore/svg/graphics/SVGImage.cpp

    r62676 r64208  
    238238    if (allDataReceived) {
    239239        static FrameLoaderClient* dummyFrameLoaderClient =  new EmptyFrameLoaderClient;
    240         static EditorClient* dummyEditorClient = new EmptyEditorClient;
     240
     241        Page::PageClients pageClients;
     242        m_chromeClient.set(new SVGImageChromeClient(this));
     243        pageClients.chromeClient = m_chromeClient.get();
    241244#if ENABLE(CONTEXT_MENUS)
    242245        static ContextMenuClient* dummyContextMenuClient = new EmptyContextMenuClient;
    243 #else
    244         static ContextMenuClient* dummyContextMenuClient = 0;
     246        pageClients.contextMenuClient = dummyContextMenuClient;
    245247#endif
     248        static EditorClient* dummyEditorClient = new EmptyEditorClient;
     249        pageClients.editorClient = dummyEditorClient;
    246250#if ENABLE(DRAG_SUPPORT)
    247251        static DragClient* dummyDragClient = new EmptyDragClient;
    248 #else
    249         static DragClient* dummyDragClient = 0;
     252        pageClients.dragClient = dummyDragClient;
    250253#endif
    251254        static InspectorClient* dummyInspectorClient = new EmptyInspectorClient;
    252 
    253         m_chromeClient.set(new SVGImageChromeClient(this));
     255        pageClients.inspectorClient = dummyInspectorClient;
    254256       
    255257        // FIXME: If this SVG ends up loading itself, we might leak the world.
    256258        // The comment said that the Cache code does not know about CachedImages
    257259        // holding Frames and won't know to break the cycle. But
    258         m_page.set(new Page(m_chromeClient.get(), dummyContextMenuClient, dummyEditorClient, dummyDragClient, dummyInspectorClient, 0, 0, 0, 0));
     260        m_page.set(new Page(pageClients));
    259261        m_page->settings()->setMediaEnabled(false);
    260262        m_page->settings()->setJavaScriptEnabled(false);
  • trunk/WebKit/chromium/ChangeLog

    r64204 r64208  
     12010-07-26  Steve Block  <steveblock@google.com>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        Page clients should be passed to Page constructor via structure of pointers
     6        https://bugs.webkit.org/show_bug.cgi?id=42834
     7
     8        * src/WebViewImpl.cpp:
     9        (WebKit::WebViewImpl::WebViewImpl):
     10
    1112010-07-28  Pavel Feldman  <pfeldman@chromium.org>
    212
  • trunk/WebKit/chromium/src/WebViewImpl.cpp

    r64173 r64208  
    276276        m_devToolsAgent = new WebDevToolsAgentImpl(this, devToolsClient);
    277277
    278     m_page.set(new Page(&m_chromeClientImpl, &m_contextMenuClientImpl, &m_editorClientImpl, &m_dragClientImpl, &m_inspectorClientImpl, 0, 0, 0, 0));
     278    Page::PageClients pageClients;
     279    pageClients.chromeClient = &m_chromeClientImpl;
     280    pageClients.contextMenuClient = &m_contextMenuClientImpl;
     281    pageClients.editorClient = &m_editorClientImpl;
     282    pageClients.dragClient = &m_dragClientImpl;
     283    pageClients.inspectorClient = &m_inspectorClientImpl;
     284#if ENABLE(INPUT_SPEECH)
     285    pageClients.speechInputClient = &m_speechInputClient;
     286#endif
     287    m_page.set(new Page(pageClients));
    279288
    280289    // the page will take ownership of the various clients
     
    282291    m_page->backForwardList()->setClient(&m_backForwardListClientImpl);
    283292    m_page->setGroupName(pageGroupName);
    284 #if ENABLE(INPUT_SPEECH)
    285     m_page->setSpeechInputClient(&m_speechInputClient);
    286 #endif
    287293
    288294    m_inspectorSettingsMap.set(new SettingsMap);
  • trunk/WebKit/efl/ChangeLog

    r64097 r64208  
     12010-07-26  Steve Block  <steveblock@google.com>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        Page clients should be passed to Page constructor via structure of pointers
     6        https://bugs.webkit.org/show_bug.cgi?id=42834
     7
     8        * ewk/ewk_view.cpp:
     9        (_ewk_view_priv_new):
     10
    1112010-07-26  Rafael Antognolli  <antognolli@profusion.mobi>
    212
  • trunk/WebKit/efl/ewk/ewk_view.cpp

    r63978 r64208  
    530530        return 0;
    531531    }
    532     priv->page = new WebCore::Page(
    533         static_cast<WebCore::ChromeClient*>(new WebCore::ChromeClientEfl(sd->self)),
    534         static_cast<WebCore::ContextMenuClient*>(new WebCore::ContextMenuClientEfl(sd->self)),
    535         static_cast<WebCore::EditorClient*>(new WebCore::EditorClientEfl(sd->self)),
    536         static_cast<WebCore::DragClient*>(new WebCore::DragClientEfl),
    537         static_cast<WebCore::InspectorClient*>(new WebCore::InspectorClientEfl),
    538         0,
    539         0,
    540         0,
    541         0);
     532
     533    WebCore::Page::PageClients pageClients;
     534    pageClients.chromeClient = static_cast<WebCore::ChromeClient*>(new WebCore::ChromeClientEfl(sd->self));
     535    pageClients.contextMenuClient = static_cast<WebCore::ContextMenuClient*>(new WebCore::ContextMenuClientEfl(sd->self));
     536    pageClients.editorClient = static_cast<WebCore::EditorClient*>(new WebCore::EditorClientEfl(sd->self));
     537    pageClients.dragClient = static_cast<WebCore::DragClient*>(new WebCore::DragClientEfl);
     538    pageClients.inspectorClient = static_cast<WebCore::InspectorClient*>(new WebCore::InspectorClientEfl);
     539    priv->page = new WebCore::Page(pageClients);
    542540    if (!priv->page) {
    543541        CRITICAL("Could not create WebKit Page");
  • trunk/WebKit/gtk/ChangeLog

    r63602 r64208  
     12010-07-26  Steve Block  <steveblock@google.com>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        Page clients should be passed to Page constructor via structure of pointers
     6        https://bugs.webkit.org/show_bug.cgi?id=42834
     7
     8        * webkit/webkitwebview.cpp:
     9        (webkit_web_view_init):
     10
    1112010-07-16  Zhe Su  <suzhe@chromium.org>
    212
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r63078 r64208  
    30423042    priv->imContext = gtk_im_multicontext_new();
    30433043
    3044     WebKit::InspectorClient* inspectorClient = new WebKit::InspectorClient(webView);
    3045     priv->corePage = new Page(new WebKit::ChromeClient(webView), new WebKit::ContextMenuClient(webView), new WebKit::EditorClient(webView), new WebKit::DragClient(webView), inspectorClient, 0, 0, 0, 0);
     3044    Page::PageClients pageClients;
     3045    pageClients.chromeClient = new WebKit::ChromeClient(webView);
     3046    pageClients.contextMenuClient = new WebKit::ContextMenuClient(webView);
     3047    pageClients.editorClient = new WebKit::EditorClient(webView);
     3048    pageClients.dragClient = new WebKit::DragClient(webView);
     3049    pageClients.inspectorClient = new WebKit::InspectorClient(webView);
     3050    priv->corePage = new Page(pageClients);
    30463051
    30473052    // We also add a simple wrapper class to provide the public
  • trunk/WebKit/mac/ChangeLog

    r64189 r64208  
     12010-07-26  Steve Block  <steveblock@google.com>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        Page clients should be passed to Page constructor via structure of pointers
     6        https://bugs.webkit.org/show_bug.cgi?id=42834
     7
     8        * WebView/WebView.mm:
     9        (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
     10
    1112010-07-27  Kinuko Yasuda  <kinuko@chromium.org>
    212
  • trunk/WebKit/mac/WebView/WebView.mm

    r63863 r64208  
    673673    }
    674674
     675    Page::PageClients pageClients;
     676    pageClients.chromeClient = new WebChromeClient(self);
     677    pageClients.contextMenuClient = new WebContextMenuClient(self);
     678    pageClients.editorClient = new WebEditorClient(self);
     679    pageClients.dragClient = new WebDragClient(self);
     680    pageClients.inspectorClient = new WebInspectorClient(self);
     681    pageClients.pluginHalterClient = new WebPluginHalterClient(self);
    675682#if ENABLE(CLIENT_BASED_GEOLOCATION)
    676     WebGeolocationControllerClient* geolocationControllerClient = new WebGeolocationControllerClient(self);
    677 #else
    678     WebGeolocationControllerClient* geolocationControllerClient = 0;
    679 #endif
    680     _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), geolocationControllerClient, 0, 0);
     683    pageClients.geolocationControllerClient = new WebGeolocationControllerClient(self);
     684#endif
     685    _private->page = new Page(pageClients);
    681686
    682687    _private->page->setCanStartMedia([self window]);
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r64118 r64208  
    270270#endif
    271271
    272     chromeClient = new ChromeClientQt(q);
    273     contextMenuClient = new ContextMenuClientQt();
    274     editorClient = new EditorClientQt(q);
    275     page = new Page(chromeClient, contextMenuClient, editorClient,
    276                     new DragClientQt(q), new InspectorClientQt(q), 0, 0, 0, 0);
     272    Page::PageClients pageClients;
     273    pageClients.chromeClient = new ChromeClientQt(q);
     274    pageClients.contextMenuClient = new ContextMenuClientQt();
     275    pageClients.editorClient = new EditorClientQt(q);
     276    pageClients.dragClient = new DragClientQt(q);
     277    pageClients.inspectorClient = new InspectorClientQt(q);
     278    page = new Page(pageClients);
    277279
    278280    settings = new QWebSettings(page->settings());
  • trunk/WebKit/qt/ChangeLog

    r64120 r64208  
     12010-07-26  Steve Block  <steveblock@google.com>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        Page clients should be passed to Page constructor via structure of pointers
     6        https://bugs.webkit.org/show_bug.cgi?id=42834
     7
     8        * Api/qwebpage.cpp:
     9        (QWebPagePrivate::QWebPagePrivate):
     10
    1112010-07-27  Simon Hausmann  <simon.hausmann@nokia.com>
    212
  • trunk/WebKit/win/ChangeLog

    r64126 r64208  
     12010-07-26  Steve Block  <steveblock@google.com>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        Page clients should be passed to Page constructor via structure of pointers
     6        https://bugs.webkit.org/show_bug.cgi?id=42834
     7
     8        * WebView.cpp:
     9        (WebView::initWithFrame):
     10
    1112010-07-27  Steve Block  <steveblock@google.com>
    212
  • trunk/WebKit/win/WebView.cpp

    r63863 r64208  
    25642564#endif
    25652565
    2566 #if ENABLE(CLIENT_BASED_GEOLOCATION)
    2567     WebGeolocationControllerClient* geolocationControllerClient = new WebGeolocationControllerClient(this);
    2568 #else
    2569     WebGeolocationControllerClient* geolocationControllerClient = 0;
    2570 #endif
    2571 
    25722566    BOOL useHighResolutionTimer;
    25732567    if (SUCCEEDED(m_preferences->shouldUseHighResolutionTimers(&useHighResolutionTimer)))
    25742568        Settings::setShouldUseHighResolutionTimers(useHighResolutionTimer);
    25752569
    2576     m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this), geolocationControllerClient, 0, 0);
     2570    Page::PageClients pageClients;
     2571    pageClients.chromeClient = new WebChromeClient(this);
     2572    pageClients.contextMenuClient = new WebContextMenuClient(this);
     2573    pageClients.editorClient = new WebEditorClient(this);
     2574    pageClients.dragClient = new WebDragClient(this);
     2575    pageClients.inspectorClient = new WebInspectorClient(this);
     2576    pageClients.pluginHalterClient = new WebPluginHalterClient(this);
     2577#if ENABLE(CLIENT_BASED_GEOLOCATION)
     2578    pageClients.geolocationControllerClient = new WebGeolocationControllerClient(this);
     2579#endif
     2580    m_page = new Page(pageClients);
    25772581
    25782582    BSTR localStoragePath;
  • trunk/WebKit/wx/ChangeLog

    r63602 r64208  
     12010-07-26  Steve Block  <steveblock@google.com>
     2
     3        Reviewed by Jeremy Orlow.
     4
     5        Page clients should be passed to Page constructor via structure of pointers
     6        https://bugs.webkit.org/show_bug.cgi?id=42834
     7
     8        * WebView.cpp:
     9        (wxWebView::Create):
     10
    1112010-07-16  Zhe Su  <suzhe@chromium.org>
    212
  • trunk/WebKit/wx/WebView.cpp

    r62690 r64208  
    333333
    334334    WebCore::EditorClientWx* editorClient = new WebCore::EditorClientWx();
    335     m_impl->page = new WebCore::Page(new WebCore::ChromeClientWx(this),
    336                         new WebCore::ContextMenuClientWx(),
    337                         editorClient,
    338                         new WebCore::DragClientWx(),
    339                         new WebCore::InspectorClientWx(), 0, 0, 0, 0);
     335
     336    WebCore::Page::PageClients pageClients;
     337    pageClients.chromeClient = new WebCore::ChromeClientWx(this);
     338    pageClients.contextMenuClient = new WebCore::ContextMenuClientWx();
     339    pageClients.editorClient = editorClient;
     340    pageClients.dragClient = new WebCore::DragClientWx();
     341    pageClients.inspectorClient = new WebCore::InspectorClientWx();
     342    m_impl->page = new WebCore::Page(pageClients);
    340343    editorClient->setPage(m_impl->page);
    341344   
  • trunk/WebKit2/ChangeLog

    r64193 r64208  
     12010-07-26  Steve Block  <steveblock@google.com>
     2
     3       Reviewed by Jeremy Orlow.
     4
     5       Page clients should be passed to Page constructor via structure of pointers
     6       https://bugs.webkit.org/show_bug.cgi?id=42834
     7
     8       * WebKit2/WebProcess/WebPage/WebPage.cpp:
     9       (WebPage::WebPage):
     10
    1112010-07-28  Andras Becsi  <abecsi@webkit.org>
    212
  • trunk/WebKit2/WebProcess/WebPage/WebPage.cpp

    r64091 r64208  
    8181
    8282WebPage::WebPage(uint64_t pageID, const IntSize& viewSize, const WebPreferencesStore& store, DrawingArea::Type drawingAreaType)
    83     : m_page(new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), 0, 0, 0, new WebBackForwardControllerClient(this)))
    84     , m_viewSize(viewSize)
     83    : m_viewSize(viewSize)
    8584    , m_drawingArea(DrawingArea::create(drawingAreaType, this))
    8685    , m_pageID(pageID)
    8786{
    8887    ASSERT(m_pageID);
     88
     89    Page::PageClients pageClients;
     90    pageClients.chromeClient = new WebChromeClient(this);
     91    pageClients.contextMenuClient = new WebContextMenuClient(this);
     92    pageClients.editorClient = new WebEditorClient(this);
     93    pageClients.dragClient = new WebDragClient(this);
     94    pageClients.inspectorClient = new WebInspectorClient(this);
     95    pageClients.backForwardControllerClient = new WebBackForwardControllerClient(this);
     96    m_page = new Page(pageClients);
    8997
    9098    m_page->settings()->setJavaScriptEnabled(store.javaScriptEnabled);
Note: See TracChangeset for help on using the changeset viewer.