Changeset 64208 in webkit
- Timestamp:
- Jul 28, 2010 9:13:30 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r64207 r64208 1 2010-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 1 18 2010-07-28 Xianzhu Wang <phnixwxz@gmail.com> 2 19 -
trunk/WebCore/WebCore.exp.in
r64124 r64208 566 566 __ZN7WebCore4Page9goForwardEv 567 567 __ZN7WebCore4Page9initGroupEv 568 __ZN7WebCore4PageC1E PNS_12ChromeClientEPNS_17ContextMenuClientEPNS_12EditorClientEPNS_10DragClientEPNS_15InspectorClientEPNS_18PluginHalterClientEPNS_27GeolocationControllerClientEPNS_23DeviceOrientationClientEPNS_27BackForwardControllerClientE568 __ZN7WebCore4PageC1ERKNS0_11PageClientsE 569 569 __ZN7WebCore4PageD1Ev 570 570 __ZN7WebCore4coreEP20NSURLProtectionSpace -
trunk/WebCore/page/Page.cpp
r64111 r64208 125 125 } 126 126 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))127 Page::Page(const PageClients& pageClients) 128 : m_chrome(new Chrome(this, pageClients.chromeClient)) 129 129 , m_dragCaretController(new SelectionController(0, true)) 130 130 #if ENABLE(DRAG_SUPPORT) 131 , m_dragController(new DragController(this, dragClient))131 , m_dragController(new DragController(this, pageClients.dragClient)) 132 132 #endif 133 133 , m_focusController(new FocusController(this)) 134 134 #if ENABLE(CONTEXT_MENUS) 135 , m_contextMenuController(new ContextMenuController(this, contextMenuClient))135 , m_contextMenuController(new ContextMenuController(this, pageClients.contextMenuClient)) 136 136 #endif 137 137 #if ENABLE(INSPECTOR) 138 , m_inspectorController(new InspectorController(this, inspectorClient))138 , m_inspectorController(new InspectorController(this, pageClients.inspectorClient)) 139 139 #endif 140 140 #if ENABLE(CLIENT_BASED_GEOLOCATION) 141 , m_geolocationController(new GeolocationController(this, geolocationControllerClient))141 , m_geolocationController(new GeolocationController(this, pageClients.geolocationControllerClient)) 142 142 #endif 143 143 #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) 145 145 #endif 146 146 #if ENABLE(INPUT_SPEECH) 147 , m_speechInputClient( 0)147 , m_speechInputClient(pageClients.speechInputClient) 148 148 #endif 149 149 , m_settings(new Settings(this)) 150 150 , m_progress(new ProgressTracker) 151 , m_backForwardController(new BackForwardController(this, backForwardControllerClient))151 , m_backForwardController(new BackForwardController(this, pageClients.backForwardControllerClient)) 152 152 , m_theme(RenderTheme::themeForPage(this)) 153 , m_editorClient( editorClient)153 , m_editorClient(pageClients.editorClient) 154 154 , m_frameCount(0) 155 155 , m_openedByDOM(false) … … 169 169 , m_canStartMedia(true) 170 170 { 171 #if !ENABLE(CONTEXT_MENUS)172 UNUSED_PARAM(contextMenuClient);173 #endif174 #if !ENABLE(DRAG_SUPPORT)175 UNUSED_PARAM(dragClient);176 #endif177 #if !ENABLE(INSPECTOR)178 UNUSED_PARAM(inspectorClient);179 #endif180 #if !ENABLE(CLIENT_BASED_GEOLOCATION)181 UNUSED_PARAM(geolocationControllerClient);182 #endif183 #if !ENABLE(CLIENT_DEVICE_ORIENTATION)184 UNUSED_PARAM(deviceOrientationClient);185 #endif186 187 171 if (!allPages) { 188 172 allPages = new HashSet<Page*>; … … 194 178 allPages->add(this); 195 179 196 if (p luginHalterClient) {197 m_pluginHalter.set(new PluginHalter(p luginHalterClient));180 if (pageClients.pluginHalterClient) { 181 m_pluginHalter.set(new PluginHalter(pageClients.pluginHalterClient)); 198 182 m_pluginHalter->setPluginAllowedRunTime(m_settings->pluginAllowedRunTime()); 199 183 } -
trunk/WebCore/page/Page.h
r64111 r64208 92 92 static void setNeedsReapplyStyles(); 93 93 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&); 95 122 ~Page(); 96 123 … … 156 183 #endif 157 184 #if ENABLE(INPUT_SPEECH) 158 void setSpeechInputClient(SpeechInputClient* client) { m_speechInputClient = client; }159 185 SpeechInput* speechInput(); 160 186 #endif -
trunk/WebCore/svg/graphics/SVGImage.cpp
r62676 r64208 238 238 if (allDataReceived) { 239 239 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(); 241 244 #if ENABLE(CONTEXT_MENUS) 242 245 static ContextMenuClient* dummyContextMenuClient = new EmptyContextMenuClient; 243 #else 244 static ContextMenuClient* dummyContextMenuClient = 0; 246 pageClients.contextMenuClient = dummyContextMenuClient; 245 247 #endif 248 static EditorClient* dummyEditorClient = new EmptyEditorClient; 249 pageClients.editorClient = dummyEditorClient; 246 250 #if ENABLE(DRAG_SUPPORT) 247 251 static DragClient* dummyDragClient = new EmptyDragClient; 248 #else 249 static DragClient* dummyDragClient = 0; 252 pageClients.dragClient = dummyDragClient; 250 253 #endif 251 254 static InspectorClient* dummyInspectorClient = new EmptyInspectorClient; 252 253 m_chromeClient.set(new SVGImageChromeClient(this)); 255 pageClients.inspectorClient = dummyInspectorClient; 254 256 255 257 // FIXME: If this SVG ends up loading itself, we might leak the world. 256 258 // The comment said that the Cache code does not know about CachedImages 257 259 // 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)); 259 261 m_page->settings()->setMediaEnabled(false); 260 262 m_page->settings()->setJavaScriptEnabled(false); -
trunk/WebKit/chromium/ChangeLog
r64204 r64208 1 2010-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 1 11 2010-07-28 Pavel Feldman <pfeldman@chromium.org> 2 12 -
trunk/WebKit/chromium/src/WebViewImpl.cpp
r64173 r64208 276 276 m_devToolsAgent = new WebDevToolsAgentImpl(this, devToolsClient); 277 277 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)); 279 288 280 289 // the page will take ownership of the various clients … … 282 291 m_page->backForwardList()->setClient(&m_backForwardListClientImpl); 283 292 m_page->setGroupName(pageGroupName); 284 #if ENABLE(INPUT_SPEECH)285 m_page->setSpeechInputClient(&m_speechInputClient);286 #endif287 293 288 294 m_inspectorSettingsMap.set(new SettingsMap); -
trunk/WebKit/efl/ChangeLog
r64097 r64208 1 2010-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 1 11 2010-07-26 Rafael Antognolli <antognolli@profusion.mobi> 2 12 -
trunk/WebKit/efl/ewk/ewk_view.cpp
r63978 r64208 530 530 return 0; 531 531 } 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); 542 540 if (!priv->page) { 543 541 CRITICAL("Could not create WebKit Page"); -
trunk/WebKit/gtk/ChangeLog
r63602 r64208 1 2010-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 1 11 2010-07-16 Zhe Su <suzhe@chromium.org> 2 12 -
trunk/WebKit/gtk/webkit/webkitwebview.cpp
r63078 r64208 3042 3042 priv->imContext = gtk_im_multicontext_new(); 3043 3043 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); 3046 3051 3047 3052 // We also add a simple wrapper class to provide the public -
trunk/WebKit/mac/ChangeLog
r64189 r64208 1 2010-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 1 11 2010-07-27 Kinuko Yasuda <kinuko@chromium.org> 2 12 -
trunk/WebKit/mac/WebView/WebView.mm
r63863 r64208 673 673 } 674 674 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); 675 682 #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); 681 686 682 687 _private->page->setCanStartMedia([self window]); -
trunk/WebKit/qt/Api/qwebpage.cpp
r64118 r64208 270 270 #endif 271 271 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); 277 279 278 280 settings = new QWebSettings(page->settings()); -
trunk/WebKit/qt/ChangeLog
r64120 r64208 1 2010-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 1 11 2010-07-27 Simon Hausmann <simon.hausmann@nokia.com> 2 12 -
trunk/WebKit/win/ChangeLog
r64126 r64208 1 2010-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 1 11 2010-07-27 Steve Block <steveblock@google.com> 2 12 -
trunk/WebKit/win/WebView.cpp
r63863 r64208 2564 2564 #endif 2565 2565 2566 #if ENABLE(CLIENT_BASED_GEOLOCATION)2567 WebGeolocationControllerClient* geolocationControllerClient = new WebGeolocationControllerClient(this);2568 #else2569 WebGeolocationControllerClient* geolocationControllerClient = 0;2570 #endif2571 2572 2566 BOOL useHighResolutionTimer; 2573 2567 if (SUCCEEDED(m_preferences->shouldUseHighResolutionTimers(&useHighResolutionTimer))) 2574 2568 Settings::setShouldUseHighResolutionTimers(useHighResolutionTimer); 2575 2569 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); 2577 2581 2578 2582 BSTR localStoragePath; -
trunk/WebKit/wx/ChangeLog
r63602 r64208 1 2010-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 1 11 2010-07-16 Zhe Su <suzhe@chromium.org> 2 12 -
trunk/WebKit/wx/WebView.cpp
r62690 r64208 333 333 334 334 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); 340 343 editorClient->setPage(m_impl->page); 341 344 -
trunk/WebKit2/ChangeLog
r64193 r64208 1 2010-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 1 11 2010-07-28 Andras Becsi <abecsi@webkit.org> 2 12 -
trunk/WebKit2/WebProcess/WebPage/WebPage.cpp
r64091 r64208 81 81 82 82 WebPage::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) 85 84 , m_drawingArea(DrawingArea::create(drawingAreaType, this)) 86 85 , m_pageID(pageID) 87 86 { 88 87 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); 89 97 90 98 m_page->settings()->setJavaScriptEnabled(store.javaScriptEnabled);
Note: See TracChangeset
for help on using the changeset viewer.