1 2010-11-18 Anders Carlsson <andersca@apple.com>
3 Reviewed by Sam Weinig.
5 Keep the web process alive if there are active downloads
6 https://bugs.webkit.org/show_bug.cgi?id=49755
8 Make sure that Download objects are destroyed when the download finishes or fails.
9 Don't close the web process if there are live Download objects.
11 * UIProcess/Downloads/DownloadProxy.cpp:
12 (WebKit::DownloadProxy::didFail):
15 * UIProcess/Downloads/DownloadProxy.h:
16 * UIProcess/Downloads/DownloadProxy.messages.in:
19 * WebProcess/Downloads/Download.cpp:
20 (WebKit::Download::didFinish):
21 Call DownloadManager::downloadFinished.
23 (WebKit::Download::didFail):
24 Send DidFail message and call DownloadManager::downloadFinished.
26 * WebProcess/Downloads/Download.h:
27 (WebKit::Download::destinationID):
30 (WebKit::Download::downloadID):
31 Return the download ID.
33 * WebProcess/Downloads/DownloadManager.cpp:
34 (WebKit::DownloadManager::downloadFinished):
35 Delete the Download object and call WebProcess::shutdownIfPossible.
37 * WebProcess/Downloads/DownloadManager.h:
38 (WebKit::DownloadManager::isDownloading):
39 Return whether the download manager has any active downloads.
41 * WebProcess/Downloads/mac/DownloadMac.mm:
42 (-[WKDownloadAsDelegate download:didFailWithError:]):
43 Call Download::didFail.
45 * WebProcess/WebProcess.cpp:
46 (WebKit::WebProcess::removeWebPage):
47 Call shutdownIfPossible.
49 (WebKit::WebProcess::shutdownIfPossible):
50 New function. Don't shutdown if there are live pages or active downloads.
52 * WebProcess/WebProcess.h:
54 2010-11-18 Steve Falkenburg <sfalken@apple.com>
56 Reviewed by Adam Roben.
58 Debug_Internal Windows configuration is unnecessary, should be removed
59 https://bugs.webkit.org/show_bug.cgi?id=49753
61 * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
64 2010-11-18 Steve Falkenburg <sfalken@apple.com>
66 Reviewed by Adam Roben.
68 Clean up vcproj errors
69 https://bugs.webkit.org/show_bug.cgi?id=49741
71 * win/WebKit2WebProcess.vcproj:
73 2010-11-18 Benjamin Poulain <benjamin.poulain@nokia.com>
75 Reviewed by Laszlo Gombos.
77 [Qt] [WK2] WebKit 2 would not compile for Qt without ENABLE_TOUCH_EVENT
78 https://bugs.webkit.org/show_bug.cgi?id=49664
80 Move the ENABLE(TOUCH_EVENTS) to the code where internal WebKit touch
83 * UIProcess/API/qt/qgraphicswkview.cpp:
84 (QGraphicsWKView::touchEvent):
85 * UIProcess/API/qt/qwkpage.cpp:
86 (QWKPagePrivate::touchEvent):
88 2010-11-17 Andreas Kling <kling@webkit.org>
90 Reviewed by Kenneth Rohde Christiansen.
92 Reuse the size of the actualVisibleContentRect when loading a new page
93 or navigating session history.
95 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
96 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
98 2010-11-17 Dimitri Glazkov <dglazkov@chromium.org>
100 Reviewed by Darin Adler.
102 Converge means of querying a parent node into one way, which is Node::parentNode.
103 https://bugs.webkit.org/show_bug.cgi?id=49686
105 * WebProcess/WebPage/WebPage.cpp: Changed to use parentNode.
106 (WebKit::WebPage::findZoomableAreaForPoint): Ditto.
108 2010-11-17 Timothy Hatcher <timothy@apple.com>
110 Remove duplicate Web Inspector message handeling in WebPage::didReceiveMessage.
112 https://webkit.org/b/49689
114 Reviewed by Andreas Kling.
116 * WebProcess/WebPage/WebPage.cpp:
117 (WebKit::WebPage::didReceiveMessage): Remove duplicate code.
119 2010-11-17 Timothy Hatcher <timothy@apple.com>
121 Fix a crash when closing the inspected page when the Web Inspector
122 page was never created.
124 https://bugs.webkit.org/show_bug.cgi?id=49687
126 Reviewed by John Sullivan.
128 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
129 (WebKit::WebInspectorClient::sendMessageToFrontend): Null check the Inspector WebPage.
131 2010-11-17 Anders Carlsson <andersca@apple.com>
133 Reviewed by John Sullivan.
135 Don't crash when invalidating a page overlay that hasn't been installed yet
136 https://bugs.webkit.org/show_bug.cgi?id=49685
138 Null check the web page.
140 * WebProcess/WebPage/PageOverlay.cpp:
141 (WebKit::PageOverlay::setNeedsDisplay):
143 2010-11-17 Brady Eidson <beidson@apple.com>
145 Reviewed by Darin Adler.
147 https://bugs.webkit.org/show_bug.cgi?id=49682 - Expose "removeItemAtIndex" in WKMutableArray
149 * Shared/API/c/WKMutableArray.cpp:
150 (WKArrayRemoveItemAtIndex):
151 * Shared/API/c/WKMutableArray.h:
153 * Shared/MutableArray.cpp:
154 (WebKit::MutableArray::removeItemAtIndex):
155 * Shared/MutableArray.h:
157 2010-11-17 Brady Eidson <beidson@apple.com>
159 Reviewed by Anders Carlsson.
161 https://bugs.webkit.org/show_bug.cgi?id=49683 - Export WKContextMenuItem and WKContextMenuItemTypes as public headers
163 * WebKit2.xcodeproj/project.pbxproj:
165 2010-11-17 Anders Carlsson <andersca@apple.com>
167 Reviewed by Darin Adler.
169 Need way to invalidate part of a WKOverlayRef so it will be redrawn
170 https://bugs.webkit.org/show_bug.cgi?id=49679
171 <rdar://problem/8679152>
173 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
174 (WKBundlePageOverlaySetNeedsDisplay):
175 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
176 * WebProcess/WebPage/PageOverlay.cpp:
177 (WebKit::PageOverlay::setNeedsDisplay):
178 * WebProcess/WebPage/PageOverlay.h:
180 2010-11-17 Timothy Hatcher <timothy@apple.com>
182 Provide a way to create a WKView (WebPage) that is hidden from
183 the InjectedBundle. This is needed for the Web Inspector.
185 https://webkit.org/b/49670
187 Reviewed by Sam Weinig.
189 * Shared/WebPageCreationParameters.cpp:
190 (WebKit::WebPageCreationParameters::encode): Added visibleToInjectedBundle.
191 (WebKit::WebPageCreationParameters::decode): Ditto.
192 * Shared/WebPageCreationParameters.h: Ditto.
193 * UIProcess/API/C/win/WKView.cpp:
194 (WKViewCreate): Pass VisibleToInjectedBundle to the WebView create function.
195 * UIProcess/API/C/win/WKViewPrivate.cpp:
196 (WKViewCreateForWebInspector): Added. Not used yet. Passes HiddenFromInjectedBundle
197 to the WebView create function.
198 * UIProcess/API/C/win/WKViewPrivate.h: Added WKViewCreateForWebInspector.
199 * UIProcess/API/mac/WKView.mm:
200 (-[WKView initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:]): Added hiddenFromInjectedBundle
201 parameter and calls WebPageProxy::setVisibleToInjectedBundle.
202 (-[WKView initWithFrame:pageNamespaceRef:]): Calls initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:
203 and passes NO for hiddenFromInjectedBundle.
204 (-[WKView initWithFrame:]): Cleaned up by removing the local assignment to self and just returns the result.
205 * UIProcess/API/mac/WKViewInternal.h: Added initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:.
206 * UIProcess/WebPageProxy.cpp:
207 (WebKit::WebPageProxy::WebPageProxy): Initialize m_visibleToInjectedBundle from the creation parameters.
208 (WebKit::WebPageProxy::creationParameters): Set visibleToInjectedBundle using m_visibleToInjectedBundle.
209 * UIProcess/WebPageProxy.h: Added m_visibleToInjectedBundle.
210 (WebKit::WebPageProxy::visibleToInjectedBundle): Added. Return m_visibleToInjectedBundle.
211 (WebKit::WebPageProxy::setVisibleToInjectedBundle): Added. Set m_visibleToInjectedBundle.
212 * UIProcess/win/WebView.cpp:
213 (WebKit::WebView::WebView): Added InjectedBundleVisibility parameter and calls
214 WebPageProxy::setVisibleToInjectedBundle.
215 * UIProcess/win/WebView.h: Added InjectedBundleVisibility enum.
216 (WebKit::WebView::create): Added InjectedBundleVisibility parameter.
217 * WebProcess/WebPage/WebPage.cpp:
218 (WebKit::WebPage::create): Checks visibleToInjectedBundle before talking to the injected bundle.
219 (WebKit::WebPage::WebPage): Initialize m_isVisibleToInjectedBundle from the creation parameters.
220 (WebKit::WebPage::close): Checks m_isVisibleToInjectedBundle before talking to the injected bundle.
221 * WebProcess/WebPage/WebPage.h: Added m_isVisibleToInjectedBundle.
223 2010-11-17 Andras Becsi <abecsi@webkit.org>
227 [Qt] D'oh! I screwed up the dependencies.
229 * DerivedSources.pro:
231 2010-11-17 Kenneth Rohde Christiansen <kenneth@webkit.org>
233 Reviewed by Andreas Kling.
235 [WK2] Set paintsEntireContents for "resizes to contents" mode
237 Only relevant for the tiled backing store.
239 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
240 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
241 * WebProcess/WebPage/WebPage.cpp:
242 (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
244 2010-11-17 Andras Becsi <abecsi@webkit.org>
246 Reviewed by Andreas Kling.
248 [Qt][WK2] Make it possible to set custom user agent strings in MiniBrowser
249 https://bugs.webkit.org/show_bug.cgi?id=49627
251 Copy the MiniBrowser.qrc and QtTestBrowser's useragentlist.txt file
252 to the build directory of MiniBrowser because it has to be in a
253 subdirectory of the resource file.
254 Add a method to QWKPage to retrieve the custom user agent string.
256 * DerivedSources.pro:
257 * UIProcess/API/qt/qwkpage.cpp:
258 (QWKPage::customUserAgent):
259 * UIProcess/API/qt/qwkpage.h:
261 2010-11-17 Simon Fraser <simon.fraser@apple.com>
263 Reviewed by Adam Roben.
265 https://bugs.webkit.org/show_bug.cgi?id=45567
266 Add stubbed-out layer-backed drawing area for Windows.
268 Add implementations of LayerBackedDrawingArea and
269 LayerBackedDrawingAreaProxy for Windows, and add them
272 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
273 * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Added.
274 (WebKit::LayerBackedDrawingAreaProxy::page):
275 (WebKit::LayerBackedDrawingAreaProxy::platformSetSize):
276 (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
277 (WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
278 (WebKit::LayerBackedDrawingAreaProxy::paint):
279 * UIProcess/win/WebView.cpp:
280 (WebKit::WebView::pageDidEnterAcceleratedCompositing):
281 (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
282 (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
283 * UIProcess/win/WebView.h:
284 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
285 * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Added.
286 (WebKit::LayerBackedDrawingArea::platformInit):
287 (WebKit::LayerBackedDrawingArea::platformClear):
288 (WebKit::LayerBackedDrawingArea::attachCompositingContext):
289 (WebKit::LayerBackedDrawingArea::detachCompositingContext):
290 (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
291 (WebKit::LayerBackedDrawingArea::scheduleCompositingLayerSync):
292 (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
293 * win/WebKit2.vcproj:
295 2010-11-17 Benjamin Poulain <benjamin.poulain@nokia.com>
297 Reviewed by Kenneth Rohde Christiansen.
299 [Qt] [WK2] The focus switching does not seems to work with QGraphicsWKView
300 https://bugs.webkit.org/show_bug.cgi?id=49545
302 Implement focus switching with Tab. This is now done asynchronously,
303 waiting for webkit to call takeFocus() and switching the widget.
305 Since the focus can change between the Tab press and the callback,
306 QGraphicsWKView::focusNextPrevChildCallback() make sure the view still has
307 focus before passing it to the next widget.
309 * UIProcess/API/qt/qgraphicswkview.cpp:
310 (QGraphicsWKView::QGraphicsWKView):
311 (QGraphicsWKView::focusNextPrevChildCallback):
312 (QGraphicsWKView::focusNextPrevChild):
313 * UIProcess/API/qt/qgraphicswkview.h:
314 * UIProcess/API/qt/qwkpage.cpp:
315 (QWKPagePrivate::takeFocus):
316 * UIProcess/API/qt/qwkpage.h:
317 * UIProcess/API/qt/qwkpage_p.h:
319 2010-11-17 Andreas Kling <kling@webkit.org>
321 Reviewed by Kenneth Rohde Christiansen.
323 Don't prohibit scrolling in tiled backing store mode.
325 We delegate scrolling instead.
327 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
328 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
330 2010-11-17 Simon Hausmann <simon.hausmann@nokia.com>
332 Reviewed by Kenneth Christiansen.
334 [Qt] Improve painting performance on 16-bit displays
336 When the default pixmap depth is 16-bit, then use RGB16 instead of
337 RGB32 for the chunks, to avoid unnecessary conversions and reduce
338 chunk size. The conversions happen as images as QPixmaps have 16-bit
339 depth and the tiles on the ui process are also backed by QPixmaps.
341 * Shared/qt/UpdateChunk.cpp:
342 (WebKit::UpdateChunk::size):
343 (WebKit::UpdateChunk::createImage):
344 * Shared/qt/UpdateChunk.h:
346 2010-11-16 Sam Weinig <sam@webkit.org>
348 Reviewed by Adam Roben.
350 WebKit2: Support enabling site-specific quirks
351 <rdar://problem/8451371>
352 https://bugs.webkit.org/show_bug.cgi?id=46076
354 * Shared/WebPreferencesStore.cpp:
355 (WebKit::WebPreferencesStore::WebPreferencesStore):
356 (WebKit::WebPreferencesStore::encode):
357 (WebKit::WebPreferencesStore::decode):
358 * Shared/WebPreferencesStore.h:
359 Add needsSiteSpecificQuirks;
361 * UIProcess/API/C/WKAPICast.h:
362 (WebKit::toFontSmoothingLevel):
364 Move FontSmoothing conversion functions here.
366 * UIProcess/API/C/WKPreferences.cpp:
367 (WKPreferencesSetFontSmoothingLevel):
368 (WKPreferencesGetFontSmoothingLevel):
369 (WKPreferencesSetAcceleratedCompositingEnabled):
370 (WKPreferencesGetAcceleratedCompositingEnabled):
371 (WKPreferencesSetCompositingBordersVisible):
372 (WKPreferencesGetCompositingBordersVisible):
373 (WKPreferencesSetCompositingRepaintCountersVisible):
374 (WKPreferencesGetCompositingRepaintCountersVisible):
375 (WKPreferencesSetNeedsSiteSpecificQuirks):
376 (WKPreferencesGetNeedsSiteSpecificQuirks):
377 Add WKPreferencesSetNeedsSiteSpecificQuirks/WKPreferencesGetNeedsSiteSpecificQuirks
378 and move implementations from WKPreferencesPrivate.cpp here.
380 * UIProcess/API/C/WKPreferencesPrivate.cpp: Removed.
382 * UIProcess/API/C/WKPreferencesPrivate.h:
383 Add Add WKPreferencesSetNeedsSiteSpecificQuirks/WKPreferencesGetNeedsSiteSpecificQuirks.
385 * UIProcess/WebPreferences.cpp:
386 (WebKit::WebPreferences::setNeedsSiteSpecificQuirks):
387 (WebKit::WebPreferences::needsSiteSpecificQuirks):
388 * UIProcess/WebPreferences.h:
389 * WebProcess/WebPage/WebPage.cpp:
390 (WebKit::WebPage::updatePreferences):
391 Pipe through needsSiteSpecificQuirks.
393 * WebKit2.xcodeproj/project.pbxproj:
395 * win/WebKit2.vcproj:
396 Update for removed files.
398 2010-11-16 Adam Roben <aroben@apple.com>
400 Fix horizontal scrolling via the mousewheel/trackpad on Windows
402 Reviewed by Mark Rowe.
404 * Shared/win/WebEventFactory.cpp: Fixed typo in the
405 WM_VISTA_MOUSEHWHEEL constant.
407 2010-11-16 Steve Falkenburg <sfalken@apple.com>
409 Reviewed by Adam Roben.
411 Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
412 https://bugs.webkit.org/show_bug.cgi?id=49632
415 * win/WebKit2.submit.sln:
416 * win/WebKit2.vcproj:
417 * win/WebKit2WebProcess.vcproj:
419 2010-11-16 Anders Carlsson <andersca@apple.com>
421 Reviewed by Sam Weinig.
423 Handle converting a ResourceHandle to a download
424 https://bugs.webkit.org/show_bug.cgi?id=49631
426 * WebProcess/Downloads/Download.h:
429 * WebProcess/Downloads/DownloadManager.h:
430 * WebProcess/Downloads/DownloadManager.cpp:
431 (WebKit::DownloadManager::convertHandleToDownload):
432 Create a new Download object and call startWithHandle on it.
434 * WebProcess/Downloads/cf/DownloadCFNet.cpp:
435 (WebKit::Download::startWithHandle):
438 * WebProcess/Downloads/mac/DownloadMac.mm:
439 (WebKit::Download::startWithHandle):
440 Create an NSURLDownload object from passed in ResourceHandle.
442 * WebProcess/Downloads/qt/DownloadQt.cpp:
443 (WebKit::Download::startWithHandle):
446 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
447 (WebKit::WebFrameLoaderClient::download):
448 Call WebFrame::convertHandleToDownload.
450 * WebProcess/WebPage/WebFrame.cpp:
451 (WebKit::WebFrame::convertHandleToDownload):
452 Call DownloadManager::convertHandleToDownload.
454 2010-11-16 Anders Carlsson <andersca@apple.com>
456 Reviewed by John Sullivan.
458 Set the original URL for downloads
459 https://bugs.webkit.org/show_bug.cgi?id=49628
461 * WebProcess/Downloads/DownloadManager.cpp:
462 (WebKit::DownloadManager::startDownload):
463 * WebProcess/Downloads/DownloadManager.h:
464 startDownload now takes the originating web page.
466 * WebProcess/Downloads/cf/DownloadCFNet.cpp:
467 (WebKit::Download::start):
468 start now takes the originating web page.
470 * WebProcess/Downloads/mac/DownloadMac.mm:
471 (WebKit::originatingURL):
472 (WebKit::setOriginalURLForDownload):
473 Port code over from WebKit1 that sets the download URL.
475 (WebKit::Download::start):
476 Call setOriginalURLForDownload.
478 * WebProcess/Downloads/qt/DownloadQt.cpp:
479 (WebKit::Download::start):
480 start now takes the originating web page.
482 * WebProcess/WebPage/WebFrame.cpp:
483 (WebKit::WebFrame::startDownload):
484 Pass the web page to DownloadManager::startDownload.
486 2010-11-16 Dave Hyatt <hyatt@apple.com>
488 Reviewed by Dan Bernstein.
490 https://bugs.webkit.org/show_bug.cgi?id=11004
492 font-size:0 is ignored. Remove the minimum font size of 1 in CSSStyleSelector.
493 Change the pref value for minimum font size from 1 to 0. Make sure to never use the NSFont's size,
494 since it doesn't honor a size of 0. Instead pass the size in to the FontPlatformData(NSFont*) version
495 of the constructor rather than using [NSFont pointSize].
497 https://bugs.webkit.org/show_bug.cgi?id=49582
499 Negative leading is not handled correctly. There are two bugs here. The first is that
500 maxAscent and maxDescent can be negative, so we need a notion of whether or not we have
501 set them before so that we can allow them to be < 0.
503 The second issue is that we should understand where fonts will end up relative to
504 our baseline (excluding line height), and only allow those boxes to impact ascent and
505 descent if the actual font box (without factoring in line height) is above or below the
506 root line box baseline.
508 Added fast/css/negative-leading.html
510 These two bug fixes have to land together to keep the Acid 3 test rendering correctly.
512 * Shared/WebPreferencesStore.cpp:
513 (WebKit::WebPreferencesStore::WebPreferencesStore):
515 2010-11-16 Anders Carlsson <andersca@apple.com>
519 * Scripts/webkit2/messages.py:
520 * WebProcess/WebPage/WebInspector.h:
522 2010-11-16 Anders Carlsson <andersca@apple.com>
524 Reviewed by Sam Weinig.
526 Add WKPageCanShowMIMEType
527 https://bugs.webkit.org/show_bug.cgi?id=49612
529 * UIProcess/API/C/WKPage.cpp:
530 (WKPageCanShowMIMEType):
531 * UIProcess/API/C/WKPage.h:
532 * UIProcess/WebPageProxy.cpp:
533 (WebKit::WebPageProxy::canShowMIMEType):
534 * UIProcess/WebPageProxy.h:
536 2010-11-16 Anders Carlsson <andersca@apple.com>
538 Reviewed by Sam Weinig.
540 Make WebPageProxy::decidePolicyForMIMEType a tad synchronous
541 https://bugs.webkit.org/show_bug.cgi?id=49605
543 Change the DecidePolicyForMIMEType message to be synchronous, and if the policy listener is
544 invoked from within the decidePolicyForMIMEType callback return the policy information as out
545 parameters. This is needed in order to convert a loading connection to a download.
547 * Platform/CoreIPC/HandleMessage.h:
548 (CoreIPC::callMemberFunction):
549 * UIProcess/WebPageProxy.cpp:
550 (WebKit::WebPageProxy::WebPageProxy):
551 (WebKit::WebPageProxy::receivedPolicyDecision):
552 (WebKit::WebPageProxy::decidePolicyForMIMEType):
553 * UIProcess/WebPageProxy.h:
554 * UIProcess/WebPageProxy.messages.in:
555 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
556 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
558 2010-11-16 Kenneth Rohde Christiansen <kenneth@webkit.org>, Zalan Bujtas <zbujtas@gmail.com>
560 Reviewed by Andreas Kling.
562 [WK2][Qt] Add API for finding a zoomable area for a given point
564 This is useful for implementing e.g "double tap zoom"
568 * UIProcess/API/qt/qwkpage.cpp:
569 (QWKPage::findZoomableAreaForPoint):
570 (QWKPagePrivate::didFindZoomableArea):
571 * UIProcess/API/qt/qwkpage.h:
572 * UIProcess/API/qt/qwkpage_p.h:
573 * UIProcess/PageClient.h:
574 * UIProcess/WebPageProxy.cpp:
575 (WebKit::WebPageProxy::didFindZoomableArea):
576 (WebKit::WebPageProxy::findZoomableAreaForPoint):
577 * UIProcess/WebPageProxy.h:
578 * UIProcess/WebPageProxy.messages.in:
579 * WebProcess/WebPage/WebPage.cpp:
580 (WebKit::WebPage::findZoomableAreaForPoint):
581 * WebProcess/WebPage/WebPage.h:
582 * WebProcess/WebPage/WebPage.messages.in:
584 2010-11-16 Andreas Kling <kling@webkit.org>
586 Rubber-stamped by Simon Hausmann.
588 Revert !ENABLE(INSPECTOR) fix- we don't need it right now,
589 and it was less maintainable than I had though.
591 * Shared/API/c/WKSharedAPICast.h:
594 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
595 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
596 * WebProcess/WebPage/WebInspector.cpp:
598 2010-11-16 Andreas Kling <kling@webkit.org>
600 Reviewed by Simon Hausmann.
602 Fix compilation with !ENABLE(INSPECTOR)
604 * Shared/API/c/WKSharedAPICast.h:
607 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
608 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
609 * WebProcess/WebPage/WebInspector.cpp:
611 2010-11-16 Andras Becsi <abecsi@webkit.org>
613 Reviewed by Andreas Kling.
615 [Qt] Use SIGINT instead of SIGKILL to let the web process clean up after itself.
617 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
618 (WebKit::QtWebProcess::setupChildProcess):
620 2010-11-16 Kenneth Rohde Christiansen <kenneth@webkit.org>
622 Reviewed by Andreas Kling.
624 [WK2][Qt] Expose resizes-to-contents mode in WebKit2
626 Only available with ENABLE(TILED_BACKING_STORE)
628 Based on a patch by Antti Koivisto.
630 * UIProcess/API/qt/qwkpage.cpp:
631 (QWKPage::setResizesToContentsUsingLayoutSize):
632 * UIProcess/API/qt/qwkpage.h:
633 * UIProcess/WebPageProxy.cpp:
634 (WebKit::WebPageProxy::setResizesToContentsUsingLayoutSize):
635 * UIProcess/WebPageProxy.h:
636 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
637 (WebKit::WebChromeClient::contentsSizeChanged):
638 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
639 (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
640 * WebProcess/WebPage/WebPage.cpp:
641 (WebKit::WebPage::setSize):
642 (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
643 (WebKit::WebPage::resizeToContentsIfNeeded):
644 * WebProcess/WebPage/WebPage.h:
645 (WebKit::WebPage::resizesToContentsEnabled):
646 (WebKit::WebPage::resizesToContentsLayoutSize):
647 * WebProcess/WebPage/WebPage.messages.in:
649 2010-11-16 Andreas Kling <kling@webkit.org>
651 Reviewed by Kenneth Rohde Christiansen.
653 [Qt][WK2] Get proxy settings from environment (http[s]_proxy)
655 If http_proxy and/or https_proxy are set in the environment,
656 pass those in to QNetworkAccessManager.
658 * WebProcess/qt/WebProcessMainQt.cpp:
659 (WebKit::EnvHttpProxyFactory::EnvHttpProxyFactory):
660 (WebKit::EnvHttpProxyFactory::initializeFromEnvironment):
661 (WebKit::EnvHttpProxyFactory::queryProxy):
662 (WebKit::initializeProxy):
663 (WebKit::WebProcessMainQt):
665 2010-11-16 Andreas Kling <kling@webkit.org>
667 Reviewed by Kenneth Rohde Christiansen.
669 [Qt][WK2] Emit windowCloseRequested signal on window.close()
671 Original patch by Zalan Bujtas.
673 * UIProcess/API/qt/ClientImpl.cpp:
675 * UIProcess/API/qt/qwkpage.h:
677 2010-11-15 Andreas Kling <kling@webkit.org>
679 Reviewed by Kenneth Rohde Christiansen.
681 [Qt] Kill the web process if the UI process dies
683 Connect UI (parent) process death signal to SIGKILL of the web
684 process (child). This ensures that there's no stale web processes
685 after the UI process has crashed.
687 Original patch by Kimmo Kinnunen.
689 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
690 (WebKit::QtWebProcess::QtWebProcess):
691 (WebKit::QtWebProcess::setupChildProcess):
692 (WebKit::ProcessLauncherHelper::launch):
694 2010-11-16 Simon Hausmann <simon.hausmann@nokia.com>
696 Rubber-stamped by Andreas Kling.
698 [Qt] Trivial build fix for building WebKit2 inside Qt Creator
700 Similar to WebCore.pro, define a fallback for OUTPUT_DIR.
704 2010-11-15 Andreas Kling <kling@webkit.org>
706 Reviewed by Tor Arne Vestbø.
708 [Qt] Make sure qwkpage.h and qwkpreferences.h are copied into includes/WebKit2
710 * UIProcess/API/qt/WKView.h:
712 2010-11-15 Andreas Kling <kling@webkit.org>
714 Reviewed by Tor Arne Vestbø.
716 [Qt] Use $${PYTHON} rather than "python" to execute Python scripts
718 Fixes building with the old Python that currently ships with Scratchbox.
720 * DerivedSources.pro:
722 2010-11-15 Brady Eidson <beidson@apple.com>
724 Reviewed by a better attempt at a Windows build fix.
726 * win/WebKit2Generated.make:
728 2010-11-15 Brady Eidson <beidson@apple.com>
730 Reviewed by my attempt to fix the Windows build
732 * win/WebKit2Generated.make: Add new API headers here.
734 2010-11-15 Brady Eidson <beidson@apple.com>
736 Reviewed by Sam Weinig.
738 Finish off <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=48720
739 Customizable context menu support in WebKit2.
741 - Adds an API-level WKContextMenuItem.
742 - Round trips through both the InjectedBundle client and the new PageContextMenuClient before
743 actually displaying the menu.
746 * WebKit2.xcodeproj/project.pbxproj:
747 * win/WebKit2.vcproj:
749 * Shared/API/c/WKBase.h:
750 * Shared/API/c/WKContextMenuItem.cpp: Added.
751 (WKContextMenuItemGetTypeID):
752 (WKContextMenuItemCreateAsAction):
753 (WKContextMenuItemCreateAsCheckableAction):
754 (WKContextMenuItemCreateAsSubmenu):
755 (WKContextMenuItemSeparatorItem):
756 (WKContextMenuItemGetTag):
757 (WKContextMenuItemGetType):
758 (WKContextMenuItemCopyTitle):
759 (WKContextMenuItemGetEnabled):
760 (WKContextMenuItemGetChecked):
761 (WKContextMenuCopySubmenuItems):
762 * Shared/API/c/WKContextMenuItem.h: Added.
763 * Shared/API/c/WKContextMenuItemTypes.h: Added.
765 * Shared/API/c/WKSharedAPICast.h:
769 * Shared/WebContextMenuItem.cpp:
770 (WebKit::WebContextMenuItem::create):
771 (WebKit::WebContextMenuItem::separatorItem):
772 (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
773 * Shared/WebContextMenuItem.h:
775 * UIProcess/API/C/WKPage.cpp:
776 (WKPageSetPageContextMenuClient):
777 (WKPageSetPageFindClient):
778 (WKPageSetPageLoaderClient):
779 (WKPageSetPagePolicyClient):
780 (WKPageSetPageUIClient):
781 * UIProcess/API/C/WKPage.h:
783 * UIProcess/WebPageContextMenuClient.cpp: Added.
784 (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
785 * UIProcess/WebPageContextMenuClient.h: Added.
787 * UIProcess/WebPageProxy.cpp:
788 (WebKit::WebPageProxy::initializeContextMenuClient):
789 (WebKit::WebPageProxy::showContextMenu):
790 * UIProcess/WebPageProxy.h:
791 * UIProcess/WebPageProxy.messages.in:
793 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
794 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
795 (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
796 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
798 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
799 (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems):
800 * WebProcess/WebPage/WebContextMenu.cpp:
801 (WebKit::WebContextMenu::show):
803 2010-11-15 Anders Carlsson <andersca@apple.com>
805 Reviewed by Sam Weinig.
807 Add shouldDecodeSourceDataOfMIMEType WKContextDownloadClient callback
808 https://bugs.webkit.org/show_bug.cgi?id=49558
810 * UIProcess/API/C/WKContext.h:
811 Add shouldDecodeSourceDataOfMIMEType callback.
813 * UIProcess/Downloads/DownloadProxy.cpp:
814 (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
815 Call WebDownloadClient::shouldDecodeSourceDataOfMIMEType.
817 (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
818 Add allowOverwrite out parameter.
820 * UIProcess/Downloads/DownloadProxy.h:
821 * UIProcess/Downloads/DownloadProxy.messages.in:
822 Add ShouldDecodeSourceDataOfMIMEType message.
824 * UIProcess/WebDownloadClient.cpp:
825 (WebKit::WebDownloadClient::shouldDecodeSourceDataOfMIMEType):
826 Call the WKContextDownloadClient.
828 (WebKit::WebDownloadClient::decideDestinationWithSuggestedFilename):
829 Add allowOverwrite out parameter.
831 * UIProcess/WebDownloadClient.h:
832 * WebProcess/Downloads/Download.cpp:
833 (WebKit::Download::shouldDecodeSourceDataOfMIMEType):
834 Send the ShouldDecodeSourceDataOfMIMEType message.
836 (WebKit::Download::decideDestinationWithSuggestedFilename):
837 Add allowOverwrite reply parameter.
839 * WebProcess/Downloads/mac/DownloadMac.mm:
840 (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
841 Call Download::shouldDecodeSourceDataOfMIMEType.
843 (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
844 Add allowOverwrite parameter.
846 2010-11-15 Anders Carlsson <andersca@apple.com>
848 Reviewed by Sam Weinig.
850 Add decideDestinationWithSuggestedFilename WKContextDownloadClient callback
851 https://bugs.webkit.org/show_bug.cgi?id=49554
853 * Platform/CoreIPC/MessageSender.h:
854 (CoreIPC::MessageSender::sendSync):
855 Add sendSync capabilities to Messagesender.
857 * UIProcess/API/C/WKContext.h:
858 Add decideDestinationWithSuggestedFilename callback.
860 * UIProcess/Downloads/DownloadProxy.cpp:
861 (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
862 Call WebDownloadClient::decideDestinationWithSuggestedFilename.
864 * UIProcess/Downloads/DownloadProxy.messages.in:
865 Add DecideDestinationWithSuggestedFilename.
867 * UIProcess/WebContext.cpp:
868 (WebKit::WebContext::didReceiveSyncMessage):
869 Process MessageClassDownloadProxy messages.
871 * UIProcess/WebDownloadClient.cpp:
872 (WebKit::WebDownloadClient::decideDestinationWithSuggestedFilename):
873 Ask the WKContextDownloadClient for the destination.
875 * UIProcess/WebProcessProxy.cpp:
876 (WebKit::WebProcessProxy::didReceiveSyncMessage):
877 MessageClassDownloadProxy messages should go to the WebContext.
879 * WebProcess/Downloads/Download.cpp:
880 (WebKit::Download::decideDestinationWithSuggestedFilename):
881 Send the DecideDestinationWithSuggestedFilename message.
883 * WebProcess/Downloads/Download.h:
884 * WebProcess/Downloads/mac/DownloadMac.mm:
885 (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
886 call Download::decideDestinationWithSuggestedFilename and set the destination.
888 2010-11-15 Andreas Kling <kling@webkit.org>
890 Reviewed by Kenneth Rohde Christiansen.
892 [WK2][Qt] Add "page snapshot" functionality to tiled backing store
894 Original patch by Antti Koivisto.
896 Add a way to take a snapshot of a specific part of the page, at a specific scale.
897 Only implemented for the tiled drawing area.
899 * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
900 New message: TakeSnapshot.
902 * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
903 New message: SnapshotTaken.
905 * UIProcess/API/qt/qgraphicswkview.h:
906 * UIProcess/API/qt/qgraphicswkview.cpp:
907 (QGraphicsWKView::takeSnapshot):
908 Expose the snapshot functionality.
910 * UIProcess/TiledDrawingAreaProxy.cpp:
911 (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
912 (WebKit::TiledDrawingAreaProxy::takeSnapshot):
913 * UIProcess/TiledDrawingAreaProxy.h:
914 * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
915 (WebKit::TiledDrawingAreaProxy::snapshotTaken):
916 * WebProcess/WebPage/TiledDrawingArea.cpp:
917 (WebKit::TiledDrawingArea::didReceiveMessage):
919 2010-11-15 Andreas Kling <andreas.kling@nokia.com>
921 Reviewed by Kenneth Rohde Christiansen.
923 [WK2][Qt] WebKit2 implementation of tiled backing store
924 https://bugs.webkit.org/show_bug.cgi?id=49526
926 Basic opt-in tiling implementation for WebKit2/Qt.
928 Original patch by Antti Koivisto.
930 * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
931 New messages: RequestTileUpdate and CancelTileUpdate.
933 * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
934 New messages: Invalidate, TileUpdated, AllTileUpdatesProcessed.
936 * Shared/DrawingAreaBase.h:
937 New area type: TiledDrawingAreaType.
939 * UIProcess/API/qt/qgraphicswkview.h:
940 * UIProcess/API/qt/qgraphicswkview.cpp:
941 (QGraphicsWKView::QGraphicsWKView):
942 (QGraphicsWKView::setGeometry):
943 (QGraphicsWKViewPrivate::QGraphicsWKViewPrivate):
944 (QGraphicsWKView::prepareScaleChange):
945 (QGraphicsWKView::commitScaleChange):
946 (QGraphicsWKViewPrivate::onScaleChanged):
947 (QGraphicsWKViewPrivate::commitScale):
948 Support for tiled backing store.
950 * UIProcess/TiledDrawingAreaProxy.cpp: Added.
951 (WebKit::TiledDrawingAreaProxy::create):
952 (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
953 (WebKit::TiledDrawingAreaProxy::~TiledDrawingAreaProxy):
954 (WebKit::TiledDrawingAreaProxy::setSize):
955 (WebKit::TiledDrawingAreaProxy::setPageIsVisible):
956 (WebKit::TiledDrawingAreaProxy::didSetSize):
957 (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
958 (WebKit::TiledDrawingAreaProxy::didReceiveSyncMessage):
959 (WebKit::TiledDrawingAreaProxy::requestTileUpdate):
960 (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
961 (WebKit::TiledDrawingAreaProxy::createTile):
962 (WebKit::TiledDrawingAreaProxy::setTileSize):
963 (WebKit::TiledDrawingAreaProxy::setTileCreationDelay):
964 (WebKit::TiledDrawingAreaProxy::setKeepAndCoverAreaMultipliers):
965 (WebKit::TiledDrawingAreaProxy::invalidate):
966 (WebKit::TiledDrawingAreaProxy::updateTileBuffers):
967 (WebKit::TiledDrawingAreaProxy::tileBufferUpdateComplete):
968 (WebKit::TiledDrawingAreaProxy::paint):
969 (WebKit::TiledDrawingAreaProxy::adjustVisibleRect):
970 (WebKit::TiledDrawingAreaProxy::setContentsScale):
971 (WebKit::TiledDrawingAreaProxy::removeAllTiles):
972 (WebKit::TiledDrawingAreaProxy::tileDistance):
973 (WebKit::TiledDrawingAreaProxy::calculateKeepRect):
974 (WebKit::TiledDrawingAreaProxy::calculateCoverRect):
975 (WebKit::TiledDrawingAreaProxy::createTiles):
976 (WebKit::TiledDrawingAreaProxy::resizeEdgeTiles):
977 (WebKit::TiledDrawingAreaProxy::dropTilesOutsideRect):
978 (WebKit::TiledDrawingAreaProxy::tileAt):
979 (WebKit::TiledDrawingAreaProxy::setTile):
980 (WebKit::TiledDrawingAreaProxy::removeTile):
981 (WebKit::TiledDrawingAreaProxy::mapToContents):
982 (WebKit::TiledDrawingAreaProxy::mapFromContents):
983 (WebKit::TiledDrawingAreaProxy::contentsRect):
984 (WebKit::TiledDrawingAreaProxy::tileRectForCoordinate):
985 (WebKit::TiledDrawingAreaProxy::tileCoordinateForPoint):
986 (WebKit::TiledDrawingAreaProxy::startTileBufferUpdateTimer):
987 (WebKit::TiledDrawingAreaProxy::tileBufferUpdateTimerFired):
988 (WebKit::TiledDrawingAreaProxy::startTileCreationTimer):
989 (WebKit::TiledDrawingAreaProxy::tileCreationTimerFired):
990 (WebKit::TiledDrawingAreaProxy::hasPendingUpdates):
991 * UIProcess/TiledDrawingAreaProxy.h: Added.
992 (WebKit::TiledDrawingAreaProxy::contentsScale):
993 (WebKit::TiledDrawingAreaProxy::attachCompositingContext):
994 (WebKit::TiledDrawingAreaProxy::detachCompositingContext):
995 (WebKit::TiledDrawingAreaProxy::tileSize):
996 (WebKit::TiledDrawingAreaProxy::tileCreationDelay):
997 (WebKit::TiledDrawingAreaProxy::getKeepAndCoverAreaMultipliers):
998 * UIProcess/TiledDrawingAreaTile.h: Added.
999 (WebKit::TiledDrawingAreaTile::create):
1000 (WebKit::TiledDrawingAreaTile::hasBackBufferUpdatePending):
1001 (WebKit::TiledDrawingAreaTile::coordinate):
1002 (WebKit::TiledDrawingAreaTile::rect):
1003 (WebKit::TiledDrawingAreaTile::ID):
1004 * WebProcess/WebPage/DrawingArea.cpp:
1005 (WebKit::DrawingArea::create):
1006 * WebProcess/WebPage/TiledDrawingArea.cpp: Added.
1007 (WebKit::TiledDrawingArea::TiledDrawingArea):
1008 (WebKit::TiledDrawingArea::~TiledDrawingArea):
1009 (WebKit::TiledDrawingArea::invalidateWindow):
1010 (WebKit::TiledDrawingArea::invalidateContentsAndWindow):
1011 (WebKit::TiledDrawingArea::invalidateContentsForSlowScroll):
1012 (WebKit::TiledDrawingArea::scroll):
1013 (WebKit::TiledDrawingArea::setNeedsDisplay):
1014 (WebKit::TiledDrawingArea::display):
1015 (WebKit::TiledDrawingArea::scheduleDisplay):
1016 (WebKit::TiledDrawingArea::setSize):
1017 (WebKit::TiledDrawingArea::suspendPainting):
1018 (WebKit::TiledDrawingArea::resumePainting):
1019 (WebKit::TiledDrawingArea::didUpdate):
1020 (WebKit::TiledDrawingArea::updateTile):
1021 (WebKit::TiledDrawingArea::tileUpdateTimerFired):
1022 (WebKit::TiledDrawingArea::didReceiveMessage):
1023 * WebProcess/WebPage/TiledDrawingArea.h: Added.
1024 (WebKit::TiledDrawingArea::attachCompositingContext):
1025 (WebKit::TiledDrawingArea::detachCompositingContext):
1026 (WebKit::TiledDrawingArea::setRootCompositingLayer):
1027 (WebKit::TiledDrawingArea::scheduleCompositingLayerSync):
1028 (WebKit::TiledDrawingArea::syncCompositingLayers):
1029 * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: Added.
1030 (WebKit::TiledDrawingArea::paintIntoUpdateChunk):
1032 * UIProcess/qt/TiledDrawingAreaTileQt.cpp: Added.
1033 (WebKit::checkeredPixmap):
1034 (WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile):
1035 (WebKit::TiledDrawingAreaTile::~TiledDrawingAreaTile):
1036 (WebKit::TiledDrawingAreaTile::isDirty):
1037 (WebKit::TiledDrawingAreaTile::isReadyToPaint):
1038 (WebKit::TiledDrawingAreaTile::hasReadyBackBuffer):
1039 (WebKit::TiledDrawingAreaTile::invalidate):
1040 (WebKit::TiledDrawingAreaTile::resize):
1041 (WebKit::TiledDrawingAreaTile::swapBackBufferToFront):
1042 (WebKit::TiledDrawingAreaTile::paint):
1043 (WebKit::TiledDrawingAreaTile::paintCheckerPattern):
1044 (WebKit::TiledDrawingAreaTile::updateFromChunk):
1045 (WebKit::TiledDrawingAreaTile::updateBackBuffer):
1046 * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Added.
1047 (WebKit::TiledDrawingAreaProxy::updateWebView):
1048 (WebKit::TiledDrawingAreaProxy::webViewVisibleRect):
1049 (WebKit::TiledDrawingAreaProxy::page):
1051 2010-11-12 Benjamin Poulain <benjamin.poulain@nokia.com>
1053 Reviewed by Andreas Kling.
1055 [Qt] Need to implement WebKit::pluginWillHandleLoadError for WebKit2
1056 https://bugs.webkit.org/show_bug.cgi?id=48764
1058 Add the missing error to Qt support.
1060 * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
1061 (WebKit::pluginWillHandleLoadError):
1063 2010-11-12 John Sullivan <sullivan@apple.com>
1065 Reviewed by Anders Carlsson.
1067 Fixed Target for WKBundlePageOverlay.cpp.
1069 * WebKit2.xcodeproj/project.pbxproj:
1070 Changed Target for WKBundlePageOverlay.cpp from WebProcess to WebKit2.
1072 2010-11-12 Anders Carlsson <andersca@apple.com>
1074 Reviewed by John Sullivan.
1076 Need a way that WKBundlePageOverlayRef clients can make sure they only uninstall the overlay they installed
1077 https://bugs.webkit.org/show_bug.cgi?id=49461
1078 <rdar://problem/8662760>
1080 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1081 (WKBundlePageUninstallPageOverlay):
1082 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1083 * WebProcess/WebPage/FindController.cpp:
1084 (WebKit::FindController::findString):
1085 (WebKit::FindController::hideFindUI):
1086 * WebProcess/WebPage/WebPage.cpp:
1087 (WebKit::WebPage::uninstallPageOverlay):
1088 * WebProcess/WebPage/WebPage.h:
1090 2010-11-12 Anders Carlsson <andersca@apple.com>
1092 Reviewed by Sam Weinig.
1094 Allow MessageSender to override sendMessage
1095 https://bugs.webkit.org/show_bug.cgi?id=49457
1097 Change MessageSender::send to encode the message and then call sendMessage.
1098 This allows for clients to override sendMessage, something which WebProcessProxy
1099 will be able to take advantage of.
1101 * Platform/CoreIPC/MessageSender.h:
1102 (CoreIPC::MessageSender::send):
1103 (CoreIPC::MessageSender::sendMessage):
1105 2010-11-12 Anders Carlsson <andersca@apple.com>
1107 Reviewed by Sam Weinig.
1110 https://bugs.webkit.org/show_bug.cgi?id=49455
1112 Add a static create function to ArgumentEncoder.
1113 Factor sync message argument encoder creation out into a new function,
1114 createSyncMessageArgumentEncoder.
1116 * Platform/CoreIPC/ArgumentEncoder.cpp:
1117 (CoreIPC::ArgumentEncoder::create):
1118 * Platform/CoreIPC/ArgumentEncoder.h:
1119 * Platform/CoreIPC/Connection.cpp:
1120 (CoreIPC::Connection::createSyncMessageArgumentEncoder):
1121 (CoreIPC::Connection::dispatchSyncMessage):
1122 * Platform/CoreIPC/Connection.h:
1123 (CoreIPC::Connection::send):
1124 (CoreIPC::Connection::sendSync):
1125 * UIProcess/WebProcessProxy.h:
1126 (WebKit::WebProcessProxy::send):
1128 2010-11-12 Sam Weinig <sam@webkit.org>
1130 Reviewed by Anders Carlsson.
1132 ASSERTION when converting some WKStringRefs returned from willSubmitForm to CFStringRef
1133 <rdar://problem/8662180>
1134 https://bugs.webkit.org/show_bug.cgi?id=49454
1136 Enforce the invariant that a WebString never contains a null WTF::String at a
1137 lower level, in the WebString constructor, instead of relying on the callers of
1138 WebString::create to do it.
1140 * Shared/API/c/WKSharedAPICast.h:
1142 (WebKit::toCopiedAPI): Remove null string check...
1144 * Shared/WebString.h:
1145 (WebKit::WebString::WebString): ... and move it to the constructor.
1147 * Shared/API/c/WKURL.cpp:
1148 (WKURLCopyString): Use toCopiedAPI() instead of calling WebString directly
1149 to match other similar uses.
1151 2010-11-12 Andreas Kling <kling@webkit.org>
1153 Reviewed by Antonio Gomes.
1155 [Qt][WK2] Fix leaking of mapped files
1157 MappedMemory::fileName was never set on the receiving side, which led
1158 the MappedMemoryPool to call QFile::map() again when reusing an existing file.
1160 * Platform/qt/MappedMemoryPool.cpp:
1161 (WebKit::MappedMemoryPool::mapFile):
1163 2010-11-12 Adam Roben <aroben@apple.com>
1167 * win/WebKit2Generated.make: Copy WKBundlePageOverlay.h.
1169 2010-11-12 Benjamin Poulain <benjamin.poulain@nokia.com>
1171 Unreviewed fix after r71857.
1173 * UIProcess/qt/WebInspectorProxyQt.cpp:
1174 * WebProcess/WebPage/qt/WebInspectorQt.cpp:
1176 2010-11-11 Anders Carlsson <andersca@apple.com>
1178 Reviewed by Darin Adler.
1180 Add didReceiveResponse and didReceiveData to the download client
1181 https://bugs.webkit.org/show_bug.cgi?id=49418
1183 * UIProcess/API/C/WKContext.h:
1184 Add didReceiveResponse and didReceiveData to WKContextDownloadClient.
1186 * UIProcess/Downloads/DownloadProxy.cpp:
1187 (WebKit::DownloadProxy::didReceiveResponse):
1188 (WebKit::DownloadProxy::didReceiveData):
1189 Call WebDownloadClient member functions.
1191 * UIProcess/Downloads/DownloadProxy.messages.in:
1192 Add DidReceiveResponse and DidReceiveData messages.
1194 * UIProcess/WebDownloadClient.cpp:
1195 (WebKit::WebDownloadClient::didReceiveResponse):
1196 (WebKit::WebDownloadClient::didReceiveData):
1197 Call client functions.
1199 * WebKit2.xcodeproj/project.pbxproj:
1200 Let Xcode update the file.
1202 * WebProcess/Downloads/Download.cpp:
1203 (WebKit::Download::didReceiveResponse):
1204 (WebKit::Download::didReceiveData):
1207 * WebProcess/Downloads/mac/DownloadMac.mm:
1208 (WebKit::Download::start):
1209 Set deletesFileUponFailure to NO.
1211 (-[WKDownloadAsDelegate download:didReceiveResponse:]):
1212 Call didReceiveResponse.
1214 2010-11-11 Anders Carlsson <andersca@apple.com>
1216 Reviewed by Sam Weinig.
1218 Add an argument coder for ResourceResponse.
1219 https://bugs.webkit.org/show_bug.cgi?id=49415
1221 * Shared/WebCoreArgumentCoders.h:
1222 * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
1223 (CoreIPC::encodeResourceResponse):
1224 (CoreIPC::decodeResourceResponse):
1225 * Shared/mac/WebCoreArgumentCodersMac.mm:
1226 (CoreIPC::encodeResourceResponse):
1227 (CoreIPC::decodeResourceResponse):
1228 * Shared/qt/WebCoreArgumentCodersQt.cpp:
1229 (CoreIPC::encodeResourceResponse):
1230 (CoreIPC::decodeResourceResponse):
1231 * Shared/win/WebCoreArgumentCodersWin.cpp:
1232 (CoreIPC::encodeResourceResponse):
1233 (CoreIPC::decodeResourceResponse):
1235 2010-11-11 Ryosuke Niwa <rniwa@webkit.org>
1237 Unreviewed build fix for r71587.
1239 * WebKit2.xcodeproj/project.pbxproj: No longer uses absolute path.
1241 2010-11-11 Csaba Osztrogonác <ossy@webkit.org>
1243 [Qt] Unreviewed WebKit2 buildfix after r71587.
1245 * UIProcess/qt/WebInspectorProxyQt.cpp:
1248 2010-11-11 Brian Weinstein <bweinstein@apple.com>
1250 More Windows build fixing. Change another #import to a #include, and remove an unneeded
1253 * UIProcess/win/WebInspectorProxyWin.cpp:
1254 * WebProcess/WebPage/win/WebInspectorWin.cpp:
1256 2010-11-11 Brent Fulgham <bfulgham@webkit.org>
1258 Windows [Cairo] build fix. Unreviewed.
1260 Provide stubs for two BackingStore methods.
1262 * Shared/cairo/BackingStoreCairo.cpp:
1263 (WebKit::BackingStore::createFlippedGraphicsContext):
1264 (WebKit::BackingStore::paint):
1266 2010-11-11 Brian Weinstein <bweinstein@apple.com>
1268 Windows Build Fix. Change #imports to #includes.
1270 * UIProcess/win/WebInspectorProxyWin.cpp:
1272 2010-11-08 Timothy Hatcher <timothy@apple.com>
1274 Create and load the Web Inspector page.
1276 https://webkit.org/b/49207
1278 Reviewed by Anders Carlsson.
1280 * UIProcess/WebInspectorProxy.cpp:
1281 (WebKit::WebInspectorProxy::createInspectorPage): Added. Call platformCreateInspectorPage and then
1282 call WebPageProxy::loadURL with inspectorPageURL.
1283 (WebKit::WebInspectorProxy::didLoadInspectorPage): Added stub.
1284 * UIProcess/WebInspectorProxy.h:
1285 * UIProcess/WebInspectorProxy.messages.in: Added.
1286 * UIProcess/WebPageProxy.cpp:
1287 (WebKit::WebPageProxy::didReceiveMessage): Call WebInspectorProxy::didReceiveWebInspectorProxyMessage.
1288 (WebKit::WebPageProxy::didReceiveSyncMessage): Call WebInspectorProxy::didReceiveSyncWebInspectorProxyMessage.
1289 * UIProcess/WebPageProxy.h: Made creationParameters public so WebInspectorProxy can use it.
1291 * UIProcess/mac/WebInspectorProxyMac.mm:
1292 (WebKit::WebInspectorProxy::platformCreateInspectorPage): Make a WkView and return the WebPageProxy.
1293 (WebKit::WebInspectorProxy::inspectorPageURL): Return the file URL for the inspector.html file.
1294 * UIProcess/qt/WebInspectorProxyQt.cpp:
1295 (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
1296 (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
1297 * UIProcess/win/WebInspectorProxyWin.cpp:
1298 (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
1299 (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
1301 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1302 (WebKit::WebInspectorClient::openInspectorFrontend): Call WebInspector::createInspectorPage and set up the WebInspectorFrontendClient.
1303 (WebKit::WebInspectorClient::sendMessageToFrontend): Call doDispatchMessageOnFrontendPage in the base class.
1304 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
1305 (WebKit::WebInspectorFrontendClient::frontendLoaded): Call WebInspector::didLoadInspectorPage.
1306 (WebKit::WebInspectorFrontendClient::localizedStringsURL): Call WebInspector::localizedStringsURL.
1307 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
1309 * WebProcess/WebPage/WebInspector.cpp:
1310 (WebKit::WebInspector::WebInspector):
1311 (WebKit::WebInspector::createInspectorPage): Send a sync WebInspectorProxy::CreateInspectorPage message and set up
1312 the WebPage using the result page ID.
1313 (WebKit::WebInspector::didLoadInspectorPage): Send a WebInspectorProxy::DidLoadInspectorPage message.
1314 * WebProcess/WebPage/WebInspector.h:
1315 (WebKit::WebInspector::inspectorPage): Added.
1316 * WebProcess/WebPage/WebPage.cpp:
1317 (WebKit::WebPage::didReceiveMessage): Call WebInspector::didReceiveWebInspectorMessage.
1319 * WebProcess/WebPage/mac/WebInspectorMac.mm:
1320 (WebKit::WebInspector::localizedStringsURL): Return the file URL for the localizedStrings.js file.
1321 * WebProcess/WebPage/qt/WebInspectorQt.cpp:
1322 (WebKit::WebInspector::localizedStringsURL): Added stub.
1323 * WebProcess/WebPage/win/WebInspectorWin.cpp:
1324 (WebKit::WebInspector::localizedStringsURL): Added stub.
1326 * DerivedSources.make: Added WebInspectorProxy.messages.in.
1327 * DerivedSources.pro: Ditto.
1329 * WebKit2.pro: Added new files.
1330 * WebKit2.xcodeproj/project.pbxproj: Ditto.
1331 * win/WebKit2.vcproj: Ditto.
1333 2010-11-11 Sam Weinig <sam@webkit.org>
1335 Reviewed by Anders Carlsson.
1337 Move the remaining API client classes to use the APIClient base class.
1338 https://bugs.webkit.org/show_bug.cgi?id=49404
1340 Also moves InjectedBundleClient into its own class to match other API clients.
1342 * UIProcess/WebContextInjectedBundleClient.cpp:
1343 * UIProcess/WebContextInjectedBundleClient.h:
1344 * UIProcess/WebHistoryClient.cpp:
1345 (WebKit::WebHistoryClient::didNavigateWithNavigationData):
1346 (WebKit::WebHistoryClient::didPerformClientRedirect):
1347 (WebKit::WebHistoryClient::didPerformServerRedirect):
1348 (WebKit::WebHistoryClient::didUpdateHistoryTitle):
1349 (WebKit::WebHistoryClient::populateVisitedLinks):
1350 * UIProcess/WebHistoryClient.h:
1351 (WebKit::WebHistoryClient::shouldTrackVisitedLinks):
1353 * WebKit2.xcodeproj/project.pbxproj:
1354 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1355 (WebKit::InjectedBundle::initializeClient):
1356 (WebKit::InjectedBundle::reportException):
1357 (WebKit::InjectedBundle::didCreatePage):
1358 (WebKit::InjectedBundle::willDestroyPage):
1359 (WebKit::InjectedBundle::didReceiveMessage):
1360 * WebProcess/InjectedBundle/InjectedBundle.h:
1361 * WebProcess/InjectedBundle/InjectedBundleClient.cpp: Added.
1362 (WebKit::InjectedBundleClient::didCreatePage):
1363 (WebKit::InjectedBundleClient::willDestroyPage):
1364 (WebKit::InjectedBundleClient::didReceiveMessage):
1365 * WebProcess/InjectedBundle/InjectedBundleClient.h: Added.
1366 * win/WebKit2.vcproj:
1368 2010-11-11 Anders Carlsson <andersca@apple.com>
1370 Reviewed by Adam Roben.
1372 Remove an unneeded CFAllocatorRef parameter.
1374 * Shared/API/c/mac/WKURLResponseNS.h:
1375 * Shared/API/c/mac/WKURLResponseNS.mm:
1376 (WKURLResponseCopyNSURLResponse):
1378 2010-11-11 Anders Carlsson <andersca@apple.com>
1380 Reviewed by Adam Roben.
1382 Add and implement WKDownloadCopyRequest
1383 https://bugs.webkit.org/show_bug.cgi?id=49393
1385 * Shared/API/c/mac/WKURLRequestNS.h:
1386 * Shared/API/c/mac/WKURLRequestNS.mm:
1387 (WKURLRequestCopyNSURLRequest):
1388 Remove unneeded CFAllocator parameter.
1390 * Shared/WebURLRequest.cpp:
1391 (WebKit::WebURLRequest::WebURLRequest):
1392 * Shared/WebURLRequest.h:
1393 (WebKit::WebURLRequest::create):
1394 Change create to take a ResourceRequest instead.
1396 * UIProcess/API/C/WKDownload.cpp:
1397 (WKDownloadCopyRequest):
1398 Return a copied WKURLRequest.
1400 * UIProcess/API/C/WKDownload.h:
1401 * UIProcess/Downloads/DownloadProxy.cpp:
1402 (WebKit::DownloadProxy::didStart):
1405 * UIProcess/Downloads/DownloadProxy.h:
1406 (WebKit::DownloadProxy::request):
1409 * UIProcess/Downloads/DownloadProxy.messages.in:
1410 * WebProcess/Downloads/Download.cpp:
1411 (WebKit::Download::didStart):
1412 Pass the request along when sending the DidStart message.
1414 2010-11-11 John Sullivan <sullivan@apple.com>
1416 Rubber-stamped by Anders Carlsson.
1418 * WebKit2.xcodeproj/project.pbxproj:
1419 Added WKBundlePageOverlay.h to the WebKit2 Target and made it public.
1421 2010-11-11 Anders Carlsson <andersca@apple.com>
1423 Reviewed by John Sullivan.
1425 Move GraphicsContext setup code to PageOverlay::drawRect
1426 https://bugs.webkit.org/show_bug.cgi?id=49389
1428 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
1429 * WebProcess/WebPage/FindController.cpp:
1430 (WebKit::FindController::drawRect):
1431 * WebProcess/WebPage/PageOverlay.cpp:
1432 (WebKit::PageOverlay::drawRect):
1434 2010-11-11 Adam Roben <aroben@apple.com>
1436 Build fix after r71816
1438 * WebProcess/WebPage/WebPage.messages.in: Compile out
1439 SetActualVisibleContentRect when ENABLE(TILED_BACKING_STORE) is
1442 2010-11-11 Balazs Kelemen <kbalazs@webkit.org>
1444 Reviewed by Andreas Kling.
1446 [Qt][WK2] Implement BackingStore
1447 https://bugs.webkit.org/show_bug.cgi?id=49377
1449 * Shared/qt/BackingStoreQt.cpp:
1450 (WebKit::createQImage): Added static helper. Creates a QImage
1451 from the shared memory buffer.
1452 (WebKit::BackingStore::createGraphicsContext):
1453 (WebKit::BackingStore::createFlippedGraphicsContext): Leave
1454 unimplemented with an ASSERT_NOT_REACHED since this is only
1455 needed for the CoreGraphics backend.
1456 (WebKit::BackingStore::paint):
1458 2010-11-11 Kenneth Rohde Christiansen <kenneth@webkit.org>
1460 Reviewed by Andreas Kling.
1462 [Qt] Add a Qt WebKit2 API for overriding the actual visible content rect
1463 https://bugs.webkit.org/show_bug.cgi?id=49381
1465 Add an Qt WebKit2 API for overriding the actual visible content rect in
1466 WebCore. This is supposed to be used in combination with tiling.
1468 * UIProcess/API/qt/qwkpage.cpp:
1469 (QWKPage::setActualVisibleContentsRect):
1470 * UIProcess/API/qt/qwkpage.h:
1471 * UIProcess/WebPageProxy.cpp:
1472 (WebKit::WebPageProxy::setActualVisibleContentRect):
1473 * UIProcess/WebPageProxy.h:
1474 * WebProcess/WebPage/WebPage.cpp:
1475 (WebKit::WebPage::setActualVisibleContentRect):
1476 * WebProcess/WebPage/WebPage.h:
1477 * WebProcess/WebPage/WebPage.messages.in:
1479 2010-11-10 Beth Dakin <bdakin@apple.com>
1481 Reviewed by Simon Fraser.
1483 Fix for https://bugs.webkit.org/show_bug.cgi?id=49356
1484 -[WebView _scaleWebView:] should take and origin and scroll the
1487 <rdar://problem/8643921>
1489 * Shared/API/c/WKSharedAPICast.h:
1491 * UIProcess/API/C/WKPage.cpp:
1492 (WKPageScaleWebView):
1493 * UIProcess/API/C/WKPage.h:
1494 * UIProcess/WebPageProxy.cpp:
1495 (WebKit::WebPageProxy::scaleWebView):
1496 * UIProcess/WebPageProxy.h:
1497 * WebProcess/WebPage/WebPage.cpp:
1498 (WebKit::WebPage::scaleWebView):
1499 * WebProcess/WebPage/WebPage.h:
1500 * WebProcess/WebPage/WebPage.messages.in:
1502 2010-11-10 Ada Chan <adachan@apple.com>
1506 * win/WebKit2Generated.make:
1508 2010-11-10 Simon Fraser <simon.fraser@apple.com>
1510 Reviewed by Anders Carlsson.
1512 Misc drawing area cleanup
1513 https://bugs.webkit.org/show_bug.cgi?id=49349
1515 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1516 (WebKit::LayerBackedDrawingAreaProxy::setSize):
1517 (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
1518 (WebKit::LayerBackedDrawingAreaProxy::update):
1519 Call process()->send() instead of process()->connection()->send() in case
1520 the web process has not been launched yet.
1522 * WebProcess/WebPage/WebPage.cpp:
1523 (WebKit::WebPage::WebPage): Delay creation of the drawing area
1524 until after other WebPage state has been initialized, in case
1525 the DrawingArea creation needs to call back to the WebPage.
1527 2010-11-10 Simon Fraser <simon.fraser@apple.com>
1529 Reviewed by Adam Roben.
1531 Push m_viewSize down to DrawingAreaProxy base class
1532 https://bugs.webkit.org/show_bug.cgi?id=49347
1534 Some refactoring so that the various drawing area classes
1537 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1538 (WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
1539 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1540 * UIProcess/DrawingAreaProxy.h:
1541 (WebKit::DrawingAreaProxy::setSize):
1542 (WebKit::DrawingAreaProxy::size):
1543 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1544 (WebKit::LayerBackedDrawingAreaProxy::setSize):
1545 * UIProcess/LayerBackedDrawingAreaProxy.h:
1546 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
1547 (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
1548 (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
1549 * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
1550 (WebKit::LayerBackedDrawingAreaProxy::platformSetSize):
1551 (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
1552 * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
1553 (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
1554 * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
1555 (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
1557 2010-11-10 Anders Carlsson <andersca@apple.com>
1559 Reviewed by Dan Bernstein.
1561 Closing tabs sometimes crashes the WebProcess in invalidateContentsAndWindow
1562 https://bugs.webkit.org/show_bug.cgi?id=49335
1563 <rdar://problem/8646621>
1565 * WebProcess/WebPage/WebPage.cpp:
1566 (WebKit::WebPage::changeAcceleratedCompositingMode):
1567 If we fail to send the DidChangeAcceleratedCompositing message, don't null out the
1568 drawing area. This will happen during page teardown.
1570 2010-11-10 Csaba Osztrogonác <ossy@webkit.org>
1572 Reviewed by David Hyatt.
1574 HTML5 Ruby support should be mandatory feature
1575 https://bugs.webkit.org/show_bug.cgi?id=49272
1577 Remove Ruby as optional feature.
1579 * Configurations/FeatureDefines.xcconfig:
1580 * WebKit2Prefix.h: Touch it to avoid incremental build failure on Windows.
1582 2010-11-10 Sam Weinig <sam@webkit.org>
1584 Reviewed by Anders Carlsson.
1586 Add license to DerivedSources.make.
1588 * DerivedSources.make:
1590 2010-11-09 Sam Weinig <sam@webkit.org>
1592 Reviewed by Adam Roben.
1594 Convert client classes to use APIClient base class.
1595 https://bugs.webkit.org/show_bug.cgi?id=49322
1597 * UIProcess/WebFormClient.cpp:
1598 (WebKit::WebFormClient::willSubmitForm):
1599 * UIProcess/WebFormClient.h:
1600 * UIProcess/WebLoaderClient.cpp:
1601 * UIProcess/WebLoaderClient.h:
1602 * UIProcess/WebPolicyClient.cpp:
1603 * UIProcess/WebPolicyClient.h:
1604 * UIProcess/WebUIClient.cpp:
1605 * UIProcess/WebUIClient.h:
1606 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1607 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
1608 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
1609 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
1610 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1611 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
1612 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1613 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1614 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1615 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1617 2010-11-10 Andreas Kling <kling@webkit.org>
1619 Reviewed by Kenneth Rohde Christiansen.
1621 [Qt][WK2] Fix re-use of memory-mapped files
1622 https://bugs.webkit.org/show_bug.cgi?id=49310
1624 QTemporaryFile::fileName() returns an empty string after close()
1625 so we have to keep separate track of the filename.
1627 Also, we can't reopen the file if it's been QFile::remove()d,
1628 so we defer unlinking until the MappedMemoryPool is destroyed or
1629 the CrashHandler kicks in.
1631 This makes re-use of memory-mapped files work (after we kill an
1632 assertion that the file size == the new mmap size - it's fine if
1633 the file is larger, too.)
1635 * Platform/qt/MappedMemoryPool.cpp:
1636 (WebKit::MappedMemoryPool::~MappedMemoryPool):
1637 (WebKit::MappedMemoryPool::clear):
1638 (WebKit::MappedMemoryPool::mapMemory):
1639 (WebKit::MappedMemoryPool::mapFile):
1640 * Platform/qt/MappedMemoryPool.h:
1641 (WebKit::MappedMemory::mappedFileName):
1642 * Shared/qt/CrashHandler.cpp:
1643 (WebKit::CrashHandler::deleteObjects):
1644 * Shared/qt/UpdateChunk.cpp:
1645 (WebKit::UpdateChunk::encode):
1647 2010-11-09 Brady Eidson <beidson@apple.com>
1649 Reviewed by the ever-picky Windows build-bot.
1651 Windows build bot was complaining about this.
1653 * Shared/WebContextMenuItemData.cpp:
1654 (WebKit::WebContextMenuItemData::core):
1656 2010-11-09 Anders Carlsson <andersca@apple.com>
1658 Reviewed by John Sullivan.
1660 WKDownload.h should be a public header.
1662 * WebKit2.xcodeproj/project.pbxproj:
1664 2010-11-09 Brady Eidson <beidson@apple.com>
1666 Reviewed by Darin Adler.
1668 Part of <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=48720
1669 Customizable context menu support in WebKit2.
1671 This adds a BundlePageContextMenu client and lets WebKit2 consult it with the proposed
1672 list of WebContextMenuItems.
1673 There is no realistic API for the embedding app to actually inspect or create new
1674 WebContextMenuItems (will be "WKContextMenuItem") and that ability will come later.
1677 * WebKit2.xcodeproj/project.pbxproj:
1678 * win/WebKit2.vcproj:
1680 * Platform/Logging.cpp:
1681 (initializeLogChannelsIfNecessary):
1682 * Platform/Logging.h:
1684 * Shared/APIObject.h:
1686 * Shared/MutableArray.cpp:
1687 (WebKit::MutableArray::reserveCapacity):
1688 * Shared/MutableArray.h:
1690 * Shared/WebContextMenuItem.cpp: Added.
1691 (WebKit::WebContextMenuItem::WebContextMenuItem):
1692 (WebKit::WebContextMenuItem::data):
1693 * Shared/WebContextMenuItem.h: Added.
1694 (WebKit::WebContextMenuItem::create):
1695 (WebKit::WebContextMenuItem::type):
1697 * Shared/WebContextMenuItemData.cpp:
1698 (WebKit::WebContextMenuItemData::core):
1700 (WebKit::coreItems):
1701 * Shared/WebContextMenuItemData.h:
1703 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1704 (WKBundlePageSetContextMenuClient):
1705 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1707 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp: Added.
1708 (WebKit::InjectedBundlePageContextMenuClient::InjectedBundlePageContextMenuClient):
1709 (WebKit::InjectedBundlePageContextMenuClient::initialize):
1710 (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1711 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h: Added.
1713 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1714 (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Call through to the injected bundle client
1715 with the default items and convert the returned items back for WebCore to use.
1717 * WebProcess/WebPage/WebPage.cpp:
1718 (WebKit::WebPage::initializeInjectedBundleContextMenuClient):
1719 * WebProcess/WebPage/WebPage.h:
1720 (WebKit::WebPage::injectedBundleContextMenuClient):
1722 2010-11-09 Sam Weinig <sam@webkit.org>
1724 Add some stylistic flourish to the last patch as suggested by Lord Darin Adler.
1726 * UIProcess/API/C/WKPage.cpp:
1727 (WKPageGetSourceForFrame):
1728 (WKPageGetContentsAsString):
1729 * UIProcess/WebPageProxy.cpp:
1730 (WebKit::invalidateCallbackMap):
1731 * WebProcess/WebPage/WebFrame.cpp:
1732 (WebKit::WebFrame::contentsAsString):
1734 2010-11-09 Sam Weinig <sam@webkit.org>
1736 Reviewed by Anders Carlsson.
1738 Need WebKit2 mechanism for getting the visible page text
1739 <rdar://problem/8646928>
1740 https://bugs.webkit.org/show_bug.cgi?id=49275
1742 * UIProcess/API/C/WKPage.cpp:
1743 (WKPageGetContentsAsString):
1744 (callContentsAsStringBlockBlockAndDispose):
1745 (WKPageGetContentsAsString_b):
1746 * UIProcess/API/C/WKPage.h:
1747 Add GetContentsAsString callback function declaration and forwarding.
1749 * UIProcess/WebPageProxy.cpp:
1750 (WebKit::invalidateCallbackMap):
1751 (WebKit::WebPageProxy::close):
1752 (WebKit::WebPageProxy::getContentsAsString):
1753 (WebKit::WebPageProxy::didGetContentsAsString):
1754 (WebKit::WebPageProxy::processDidCrash):
1755 * UIProcess/WebPageProxy.h:
1756 Add GetContentsAsString callback and generalize invalidating the callback
1757 maps into a standalone function.
1759 * UIProcess/WebPageProxy.messages.in:
1760 Add DidGetContentsAsString return message.
1762 * WebProcess/WebPage/WebFrame.h:
1763 * WebProcess/WebPage/WebFrame.cpp:
1764 (WebKit::WebFrame::contentsAsString):
1765 Gets the string content of all the subframes.
1767 (WebKit::WebFrame::isFrameSet):
1768 Call through to the document.
1770 * WebProcess/WebPage/WebPage.h:
1771 * WebProcess/WebPage/WebPage.cpp:
1772 (WebKit::WebPage::getContentsAsString):
1773 Forward to the the main frames contentsAsString function.
1775 * WebProcess/WebPage/WebPage.messages.in:
1776 Add GetContentsAsString and collect all callback messages together.
1778 2010-11-09 Sam Weinig <sam@webkit.org>
1782 * WebProcess/mac/WebProcessMac.mm:
1783 (WebKit::WebProcess::platformSetCacheModel):
1785 2010-11-09 Simon Fraser <simon.fraser@apple.com>
1787 Reviewed by Darin Adler, Dan Bernstein.
1789 <rdar://problem/8360145> Pages using accelerated compositing missing content on Windows
1791 Disable accelerated compositing on Windows until we have cross-process
1792 rendering implemented.
1794 * WebProcess/WebPage/WebPage.cpp:
1795 (WebKit::WebPage::updatePreferences):
1797 2010-11-09 Anders Carlsson <andersca@apple.com>
1799 Reviewed by Sam Weinig.
1801 Add injected bundle API for creating page overlays
1802 https://bugs.webkit.org/show_bug.cgi?id=49282
1804 * Shared/API/c/WKBase.h:
1805 Add WKBundlePageOverlayRef.
1807 * Shared/APIObject.h:
1808 Add TypeBundlePageOverlay.
1811 * WebKit2.xcodeproj/project.pbxproj:
1814 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1815 Add WKBundlePageOverlayRef mapping.
1817 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1818 (WKBundlePageInstallPageOverlay):
1819 Install the passed in page overlay.
1821 (WKBundlePageUninstallPageOverlay):
1822 Uninstall the passed in page overlay.
1824 * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: Added.
1825 (PageOverlayClientImpl::create):
1826 (PageOverlayClientImpl::PageOverlayClientImpl):
1827 (PageOverlayClientImpl::pageOverlayDestroyed):
1828 (PageOverlayClientImpl::willMoveToWebPage):
1829 (PageOverlayClientImpl::didMoveToWebPage):
1830 (PageOverlayClientImpl::drawRect):
1831 (PageOverlayClientImpl::mouseEvent):
1832 Add a PageOverlay::Client subclass that forwards everything to its client.
1834 (WKBundlePageOverlayGetTypeID):
1835 (WKBundlePageOverlayCreate):
1836 Create a page overlay.
1838 * WebProcess/WebPage/FindController.cpp:
1839 (WebKit::FindController::pageOverlayDestroyed):
1840 * WebProcess/WebPage/FindController.h:
1843 * WebProcess/WebPage/PageOverlay.h:
1844 Inherit from APIObject.
1846 (WebKit::PageOverlay::type):
1847 return TypeBundlePageOverlay.
1849 * win/WebKit2.vcproj:
1852 2010-11-09 Anders Carlsson <andersca@apple.com>
1854 Reviewed by Sam Weinig.
1856 Get rid of FindPageOverlay
1857 https://bugs.webkit.org/show_bug.cgi?id=49268
1860 * WebKit2.xcodeproj/project.pbxproj:
1863 * WebProcess/WebPage/FindController.cpp:
1864 (WebKit::FindController::findString):
1865 Create a PageOverlay with the FindController as its client.
1867 (WebKit::FindController::willMoveToWebPage):
1868 Null out the find page overlay if the web page is null.
1870 (WebKit::FindController::didMoveToWebPage):
1873 * WebProcess/WebPage/FindController.h:
1874 FindController is now a PageOverlay::Client.
1876 * WebProcess/WebPage/FindPageOverlay.cpp: Removed.
1877 * WebProcess/WebPage/FindPageOverlay.h: Removed.
1878 * WebProcess/WebPage/PageOverlay.cpp:
1879 (WebKit::PageOverlay::setPage):
1880 Call the willMoveToWebPage and didMoveToWebPage client functions.
1882 (WebKit::PageOverlay::setNeedsDisplay):
1883 Pass the page overlay bounds instead of the web page size.
1885 * WebProcess/WebPage/WebPage.cpp:
1886 (WebKit::WebPage::installPageOverlay):
1887 Clear the page of the previous page overlay.
1889 (WebKit::WebPage::uninstallPageOverlay):
1890 Clear the page of the previous page overlay.
1892 * WebProcess/WebPage/WebPage.h:
1893 The page overlay is now refcounted.
1895 * win/WebKit2.vcproj:
1898 2010-11-09 Sam Weinig <sam@webkit.org>
1902 * WebProcess/win/WebProcessWin.cpp:
1903 (WebKit::WebProcess::platformSetCacheModel):
1905 2010-11-09 Sam Weinig <sam@webkit.org>
1907 Reviewed by Adam Roben.
1909 Factor calculation of cache sizes based on cache model into shared function
1910 https://bugs.webkit.org/show_bug.cgi?id=48706
1912 * WebProcess/WebProcess.cpp:
1913 (WebKit::WebProcess::calculateCacheSizes):
1914 * WebProcess/WebProcess.h:
1915 * WebProcess/mac/WebProcessMac.mm:
1916 (WebKit::volumeFreeSize):
1917 (WebKit::WebProcess::platformSetCacheModel):
1918 * WebProcess/win/WebProcessWin.cpp:
1919 (WebKit::memorySize):
1920 (WebKit::volumeFreeSize):
1921 (WebKit::WebProcess::platformSetCacheModel):
1923 2010-11-09 Sam Weinig <sam@webkit.org>
1925 Reviewed by Anders Carlsson.
1927 Context menus show up in the wrong place when the page is scrolled
1928 https://bugs.webkit.org/show_bug.cgi?id=49264
1930 Convert the hitTestResult point into 'window' coordinates before sending over
1931 to the UIProcess to show the menu.
1933 * WebProcess/WebPage/WebContextMenu.cpp:
1934 (WebKit::WebContextMenu::show):
1935 Convert to use message sender interface.
1937 (WebKit::WebContextMenu::itemSelected):
1938 Remove unnecessary WebCore::'s.
1940 2010-11-09 Sam Weinig <sam@webkit.org>
1942 Reviewed by Anders Carlsson.
1944 Send messages directly to the WebContext
1945 https://bugs.webkit.org/show_bug.cgi?id=49262
1947 * Platform/CoreIPC/MessageID.h:
1948 Temporarily add MessageClassWebContextLegacy.
1950 * Shared/CoreIPCSupport/WebContextMessageKinds.h:
1951 Rename adding Legacy prefix.
1953 * UIProcess/WebContext.cpp:
1954 (WebKit::WebContext::didNavigateWithNavigationData):
1955 (WebKit::WebContext::didPerformClientRedirect):
1956 (WebKit::WebContext::didPerformServerRedirect):
1957 (WebKit::WebContext::didUpdateHistoryTitle):
1958 (WebKit::WebContext::setCacheModel):
1959 (WebKit::WebContext::addVisitedLink):
1960 (WebKit::WebContext::addVisitedLinkHash):
1961 (WebKit::WebContext::getPlugins):
1962 (WebKit::WebContext::getPluginPath):
1963 (WebKit::WebContext::didReceiveMessage):
1964 (WebKit::WebContext::didReceiveSyncMessage):
1965 * UIProcess/WebContext.h:
1966 * UIProcess/WebContext.messages.in: Added.
1967 * UIProcess/WebProcessProxy.cpp:
1968 (WebKit::WebProcessProxy::getPluginProcessConnection):
1969 (WebKit::WebProcessProxy::didReceiveMessage):
1970 (WebKit::WebProcessProxy::didReceiveSyncMessage):
1971 * UIProcess/WebProcessProxy.h:
1972 * UIProcess/WebProcessProxy.messages.in:
1973 * WebProcess/InjectedBundle/InjectedBundle.cpp:
1974 (WebKit::InjectedBundle::postMessage):
1975 (WebKit::InjectedBundle::postSynchronousMessage):
1976 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1977 (WebKit::WebFrameLoaderClient::updateGlobalHistory):
1978 (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
1979 (WebKit::WebFrameLoaderClient::setTitle):
1980 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1981 (WebKit::WebPlatformStrategies::populatePluginCache):
1982 * WebProcess/WebPage/WebPage.cpp:
1983 (WebKit::WebPage::createPlugin):
1984 * WebProcess/WebProcess.cpp:
1985 (WebKit::WebProcess::addVisitedLink):
1986 Move context related messages to be sent directly to the context.
1988 * DerivedSources.make:
1989 * DerivedSources.pro:
1991 * WebKit2.xcodeproj/project.pbxproj:
1992 * win/WebKit2.vcproj:
1995 2010-11-09 Anders Carlsson <andersca@apple.com>
1997 Reviewed by John Sullivan.
1999 Move the find page overlay code to FindController
2000 https://bugs.webkit.org/show_bug.cgi?id=49266
2002 * WebProcess/WebPage/FindController.cpp:
2003 (WebKit::FindController::~FindController):
2004 (WebKit::FindController::rectsForTextMatches):
2005 (WebKit::overlayBackgroundColor):
2006 (WebKit::FindController::drawRect):
2007 (WebKit::FindController::mouseEvent):
2008 * WebProcess/WebPage/FindController.h:
2009 * WebProcess/WebPage/FindPageOverlay.cpp:
2010 (WebKit::FindPageOverlay::drawRect):
2011 (WebKit::FindPageOverlay::mouseEvent):
2012 * WebProcess/WebPage/FindPageOverlay.h:
2013 * WebProcess/WebPage/PageOverlay.cpp:
2014 (WebKit::PageOverlay::bounds):
2015 (WebKit::PageOverlay::drawRect):
2016 (WebKit::PageOverlay::mouseEvent):
2017 * WebProcess/WebPage/PageOverlay.h:
2019 2010-11-09 Anders Carlsson <andersca@apple.com>
2021 Reviewed by John Sullivan.
2023 Add a PageOverlay::Client object in preparation of not allowing subclassing of PageOverlay
2024 https://bugs.webkit.org/show_bug.cgi?id=49263
2026 * WebProcess/WebPage/FindPageOverlay.cpp:
2027 (WebKit::FindPageOverlay::FindPageOverlay):
2028 Call the PageOverlay constructor.
2030 (WebKit::FindPageOverlay::drawRect):
2031 (WebKit::FindPageOverlay::mouseEvent):
2032 These now take a PageOverlay callback.
2034 * WebProcess/WebPage/FindPageOverlay.h:
2035 FindPageOverlay now inherits from PageOverlay::Client.
2037 * WebProcess/WebPage/PageOverlay.cpp:
2038 (WebKit::PageOverlay::create):
2039 Add create function.
2041 (WebKit::PageOverlay::PageOverlay):
2042 The constructor now takes a client.
2044 (WebKit::PageOverlay::drawRect):
2045 (WebKit::PageOverlay::mouseEvent):
2046 Call the client methods.
2048 * WebProcess/WebPage/PageOverlay.h:
2051 2010-11-09 Dan Bernstein <mitz@apple.com>
2053 Rubber-stamped by Darin Adler.
2055 <rdar://problem/8646456> WebProcess crashes reproducibly on complex text
2057 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2058 (InitWebCoreSystemInterface): Initialize wkCreateCTTypesetterWithUniCharProviderAndOptions
2059 and wkCreateCTLineWithUniCharProvider.
2061 2010-11-09 Sam Weinig <sam@webkit.org>
2065 * win/WebKit2.vcproj:
2067 2010-11-09 Sam Weinig <sam@webkit.org>
2073 2010-11-09 Sam Weinig <sam@webkit.org>
2075 Reviewed by Anders Carlsson.
2077 Windows Popup widget support (<select>)
2078 <rdar://problem/8559439>
2079 https://bugs.webkit.org/show_bug.cgi?id=48701
2081 Port WebCore's PopupMenuWin's implementation to work within the confines of WebKit2.
2082 Since we currently can't draw text using WebCore in the UIProcess, this approach uses
2083 the WebProcess to create two bitmaps representing the full popup menu (both unselected and
2084 selected) and sends them to the UIProcess to be drawn in an HWND.
2086 * Shared/BackingStore.h:
2087 * Shared/cg/BackingStoreCG.cpp:
2088 * Shared/qt/BackingStoreQt.cpp:
2090 Add new function to create a flipped graphics context from the backing store,
2091 and add additional parameters to paint, to allow more control of how the backing
2092 store is painted into the destination context.
2094 * Shared/PlatformPopupMenuData.cpp: Added.
2095 (WebKit::PlatformPopupMenuData::PlatformPopupMenuData):
2096 (WebKit::PlatformPopupMenuData::encode):
2097 (WebKit::PlatformPopupMenuData::decode):
2098 * Shared/PlatformPopupMenuData.h: Added.
2099 Add struct so platforms can send platform specific data to their popup menu implementations.
2101 * Shared/WebPopupItem.cpp:
2102 (WebKit::WebPopupItem::WebPopupItem):
2103 (WebKit::WebPopupItem::encode):
2104 (WebKit::WebPopupItem::decode):
2105 * Shared/WebPopupItem.h:
2106 Add isLabel for each menu item.
2108 * UIProcess/FindIndicator.cpp:
2109 (WebKit::FindIndicator::draw):
2110 Update for new BackingStore::paint signature.
2112 * UIProcess/WebPageProxy.cpp:
2113 (WebKit::WebPageProxy::showPopupMenu):
2114 * UIProcess/WebPageProxy.h:
2115 * UIProcess/WebPageProxy.messages.in:
2116 * UIProcess/WebPopupMenuProxy.h:
2117 * UIProcess/mac/WebPopupMenuProxyMac.h:
2118 * UIProcess/mac/WebPopupMenuProxyMac.mm:
2119 (WebKit::WebPopupMenuProxyMac::showPopupMenu):
2120 * UIProcess/qt/WebPopupMenuProxyQt.cpp:
2121 (WebKit::WebPopupMenuProxyQt::showPopupMenu):
2122 * UIProcess/qt/WebPopupMenuProxyQt.h:
2123 Pass through the new PlatformPopupMenuData.
2125 * UIProcess/win/WebPopupMenuProxyWin.cpp:
2126 * UIProcess/win/WebPopupMenuProxyWin.h:
2127 Port implementation from WebCore.
2129 * UIProcess/win/WebView.cpp:
2130 (WebKit::WebView::createPopupMenuProxy):
2131 Pass the WebView to the WebPopupMenuProxyWin.
2133 * WebProcess/Plugins/PluginProxy.cpp:
2134 (WebKit::PluginProxy::paint):
2135 (WebKit::PluginProxy::update):
2136 Update for new BackingStore::paint signature.
2138 * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
2139 (WebKit::WebPopupMenu::populateItems): Add isLabel for each item.
2140 (WebKit::WebPopupMenu::show): Give each platform a chance to add platform specific data.
2141 * WebProcess/WebCoreSupport/WebPopupMenu.h:
2143 * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm: Added.
2144 (WebKit::WebPopupMenu::setUpPlatformData):
2145 * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp: Added.
2146 (WebKit::WebPopupMenu::setUpPlatformData):
2147 Add stubbed out setUpPlatformData.
2149 * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Added.
2150 (WebKit::WebPopupMenu::setUpPlatformData):
2151 Compute data needed in the UIProcess including generating the bitmaps.
2154 * WebKit2.xcodeproj/project.pbxproj:
2155 * win/WebKit2.vcproj:
2158 2010-11-09 Balazs Kelemen <kbalazs@webkit.org>
2160 Reviewed by Csaba Osztrogonác.
2162 [Qt][WK2] ASSERT fail in fast/frames/lots-of-objects.html
2163 https://bugs.webkit.org/show_bug.cgi?id=49253
2165 * Platform/qt/SharedMemoryQt.cpp:
2166 (WebKit::SharedMemory::create): Do not assert
2167 when the attach was unsuccessful but return with 0.
2169 2010-11-09 Balazs Kelemen <kbalazs@webkit.org>
2171 Reviewed by Andreas Kling.
2173 [Qt][WK2] WebKitTestRunner is dead
2174 https://bugs.webkit.org/show_bug.cgi?id=49129
2176 * Platform/qt/SharedMemoryQt.cpp:
2177 (WebKit::SharedMemory::~SharedMemory):
2178 Follow up fix: do not access the QSharedMemory object
2179 in an assert if it has been deleted.
2181 2010-11-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
2183 Reviewed by Andreas Kling.
2185 Send page scroll requests to the PageClient when scroll delegation is turned on
2186 https://bugs.webkit.org/show_bug.cgi?id=49171
2188 Implement the IPC and API required for making scroll delegation work
2189 with WebKit2. This is only used when you have tiling enabled.
2191 * UIProcess/API/qt/qwkpage.cpp:
2192 (QWKPagePrivate::pageDidRequestScroll):
2193 * UIProcess/API/qt/qwkpage.h:
2194 * UIProcess/API/qt/qwkpage_p.h:
2195 * UIProcess/PageClient.h:
2196 * UIProcess/WebPageProxy.cpp:
2197 (WebKit::WebPageProxy::pageDidRequestScroll):
2198 * UIProcess/WebPageProxy.h:
2199 * UIProcess/WebPageProxy.messages.in:
2200 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2201 (WebKit::WebChromeClient::delegatedScrollRequested):
2202 * WebProcess/WebPage/WebPage.cpp:
2203 (WebKit::WebPage::pageDidRequestScroll):
2204 * WebProcess/WebPage/WebPage.h:
2206 2010-11-08 Ivan Krstić <ike@apple.com>
2208 Reviewed by Mark Rowe.
2210 <rdar://problem/8531943> Enable partial symbolication for sandbox violations in WebProcess.
2212 * WebProcess/com.apple.WebProcess.sb:
2214 2010-11-08 Juha Savolainen <juha.savolainen@weego.fi>
2216 Reviewed by Andreas Kling.
2218 [Qt] Added new methods to QWKHistory and made QWKHistoryItemPrivate to shared object.
2219 https://bugs.webkit.org/show_bug.cgi?id=49063
2221 Added more functionality to the QWKHistory and changed QWKHistoryItemPrivate to shared object.
2222 This is needed because we cannot delete the QWKHistoryItemPrivate pointer in destructor of QWKHistoryItem,
2223 there may have other history instances which share same private implementation.
2225 * UIProcess/API/qt/qwkhistory.cpp:
2226 (QWKHistoryItemPrivate::~QWKHistoryItemPrivate):
2227 (QWKHistoryItem::QWKHistoryItem):
2228 (QWKHistoryItem::QWKHistoryItem::operator=):
2229 (QWKHistory::currentItem): Added
2230 (QWKHistory::backItem): Added
2231 (QWKHistory::forwardItem): Added
2232 (QWKHistory::itemAt): Added
2233 (QWKHistory::backItems): Added
2234 (QWKHistory::forwardItems): Added
2235 * UIProcess/API/qt/qwkhistory.h:
2236 * UIProcess/API/qt/qwkhistory_p.h:
2238 2010-11-08 Anders Carlsson <andersca@apple.com>
2240 Reviewed by Dan Bernstein.
2242 Add WKDownloadClient API
2243 https://bugs.webkit.org/show_bug.cgi?id=49227
2245 * Shared/API/c/WKBase.h:
2248 * UIProcess/API/C/WKAPICast.h:
2249 Add WKDownloadRef <-> DownloadProxy mapping.
2251 * UIProcess/API/C/WKContext.cpp:
2252 (WKContextSetDownloadClient):
2253 Initialize the download client.
2255 * UIProcess/API/C/WKContext.h:
2256 Add new WKContextDownloadClient API.
2258 * UIProcess/API/C/WKDownload.cpp: Added.
2259 * UIProcess/API/C/WKDownload.h:
2260 Add WKDownload files.
2262 * UIProcess/Downloads/DownloadProxy.cpp:
2263 (WebKit::DownloadProxy::didStart):
2264 (WebKit::DownloadProxy::didCreateDestination):
2265 (WebKit::DownloadProxy::didFinish):
2266 Call down to the the WebDownloadClient.
2268 * UIProcess/Downloads/DownloadProxy.messages.in:
2269 Rename DidBegin to DidStart.
2271 * UIProcess/WebContext.cpp:
2272 (WebKit::WebContext::initializeDownloadClient):
2273 Initialize the download client.
2275 * UIProcess/WebContext.h:
2276 (WebKit::WebContext::downloadClient):
2279 * UIProcess/WebDownloadClient.cpp:
2280 (WebKit::WebDownloadClient::didStart):
2281 (WebKit::WebDownloadClient::didCreateDestination):
2282 (WebKit::WebDownloadClient::didFinish):
2283 Call the relevant WKContextDownloadClient functions.
2286 * WebKit2.xcodeproj/project.pbxproj:
2289 * WebProcess/Downloads/Download.cpp:
2290 (WebKit::Download::didStart):
2291 * WebProcess/Downloads/Download.h:
2292 * WebProcess/Downloads/mac/DownloadMac.mm:
2293 (-[WKDownloadAsDelegate downloadDidBegin:]):
2294 Rename Download::didBegin to Download::didStart.
2296 * win/WebKit2.vcproj:
2299 2010-11-08 Brady Eidson <beidson@apple.com>
2301 Reviewed by Anders Carlsson.
2303 Part of https://bugs.webkit.org/show_bug.cgi?id=49222
2304 Rename "WebContextMenuItem" to "WebContextMenuItemData"
2307 * WebKit2.xcodeproj/project.pbxproj:
2308 * win/WebKit2.vcproj:
2310 * Shared/WebContextMenuItem.cpp: Removed.
2311 * Shared/WebContextMenuItem.h: Removed.
2312 * Shared/WebContextMenuItemData.cpp: Copied from Shared/WebContextMenuItem.cpp.
2313 (WebKit::WebContextMenuItemData::WebContextMenuItemData):
2314 (WebKit::WebContextMenuItemData::encode):
2315 (WebKit::WebContextMenuItemData::decode):
2317 * Shared/WebContextMenuItemData.h: Copied from Shared/WebContextMenuItem.h.
2318 (WebKit::WebContextMenuItemData::submenu):
2320 * UIProcess/WebContextMenuProxy.h:
2322 * UIProcess/WebPageProxy.cpp:
2323 (WebKit::WebPageProxy::showContextMenu):
2324 (WebKit::WebPageProxy::contextMenuItemSelected):
2325 * UIProcess/WebPageProxy.h:
2326 * UIProcess/WebPageProxy.messages.in:
2328 * UIProcess/mac/WebContextMenuProxyMac.h:
2329 * UIProcess/mac/WebContextMenuProxyMac.mm:
2330 (-[WebMenuTarget forwardContextMenuAction:]):
2331 (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
2332 (WebKit::nsMenuItemVector):
2333 (WebKit::WebContextMenuProxyMac::populate):
2334 (WebKit::WebContextMenuProxyMac::showContextMenu):
2336 * UIProcess/qt/WebContextMenuProxyQt.cpp:
2337 (WebKit::WebContextMenuProxyQt::showContextMenu):
2338 * UIProcess/qt/WebContextMenuProxyQt.h:
2340 * UIProcess/win/WebContextMenuProxyWin.cpp:
2341 (WebKit::WebContextMenuProxyWin::showContextMenu):
2342 * UIProcess/win/WebContextMenuProxyWin.h:
2344 * WebProcess/WebPage/WebContextMenu.cpp:
2345 (WebKit::WebContextMenu::itemSelected):
2346 * WebProcess/WebPage/WebContextMenu.h:
2348 * WebProcess/WebPage/WebPage.cpp:
2349 (WebKit::WebPage::didSelectItemFromActiveContextMenu):
2350 * WebProcess/WebPage/WebPage.h:
2351 * WebProcess/WebPage/WebPage.messages.in:
2353 2010-11-08 Anders Carlsson <andersca@apple.com>
2355 Reviewed by John Sullivan and Dan Bernstein.
2357 Find in Page: scrolling the page with the scrollbar while overlay is up dismisses the overlay
2358 https://bugs.webkit.org/show_bug.cgi?id=49219
2359 <rdar://problem/8569550>
2361 * WebProcess/WebPage/FindPageOverlay.cpp:
2362 (WebKit::FindPageOverlay::bounds):
2363 Return the bounds of the find page overlay, excluding any scrollbars.
2365 (WebKit::FindPageOverlay::drawRect):
2368 (WebKit::FindPageOverlay::mouseEvent):
2369 Only dismiss the find UI if the mouse down event happens inside the overlay bounds.
2371 2010-11-08 Anders Carlsson <andersca@apple.com>
2373 Reviewed by Adam Roben.
2375 Add the ability to send messages to DownloadProxy objects
2376 https://bugs.webkit.org/show_bug.cgi?id=49213
2378 * DerivedSources.make:
2379 * DerivedSources.pro:
2380 Add Download.messages.in.
2382 * Platform/CoreIPC/MessageID.h:
2383 Add MessageClassDownloadProxy message class.
2385 * Platform/CoreIPC/MessageSender.h:
2386 Include Connection.h directly since it's required.
2388 * UIProcess/Downloads/DownloadProxy.cpp:
2389 (WebKit::DownloadProxy::didBegin):
2390 (WebKit::DownloadProxy::didCreateDestination):
2391 (WebKit::DownloadProxy::didFinish):
2394 * UIProcess/Downloads/DownloadProxy.messages.in: Added.
2396 * UIProcess/WebContext.cpp:
2397 (WebKit::WebContext::didReceiveMessage):
2398 Handle DownloadProxy messages.
2400 * UIProcess/WebProcessProxy.cpp:
2401 (WebKit::WebProcessProxy::didReceiveMessage):
2402 Hand DownloadProxy messages off to the context.
2405 * WebKit2.xcodeproj/project.pbxproj:
2408 * WebProcess/Downloads/Download.cpp:
2409 (WebKit::Download::didBegin):
2410 (WebKit::Download::didReceiveData):
2411 (WebKit::Download::didCreateDestination):
2412 (WebKit::Download::didFinish):
2415 * WebProcess/Downloads/mac/DownloadMac.mm:
2416 (-[WKDownloadAsDelegate download:didCreateDestination:]):
2417 Call Download::didCreateDestination.
2419 * win/WebKit2.vcproj:
2422 2010-11-08 Anders Carlsson <andersca@apple.com>
2424 Reviewed by Adam Roben.
2426 Add DownloadProxy object
2427 https://bugs.webkit.org/show_bug.cgi?id=49211
2429 DownloadProxy will be the implementation of the forthcoming WKDownloadRef object.
2431 * Shared/APIObject.h:
2434 * UIProcess/Downloads/DownloadProxy.cpp:
2435 (WebKit::generateDownloadID):
2436 Generate a unique download ID.
2438 (WebKit::DownloadProxy::invalidate):
2439 Null out the web context.
2441 * UIProcess/Downloads/DownloadProxy.h:
2442 (WebKit::WebContext::processDidClose):
2443 Invalidate all downloads.
2445 (WebKit::WebContext::createDownloadProxy):
2446 Create a WebDownload object.
2448 * UIProcess/WebPageProxy.cpp:
2449 (WebKit::WebPageProxy::receivedPolicyDecision):
2450 Call createDownloadProxy instead.
2453 * WebKit2.xcodeproj/project.pbxproj:
2454 * win/WebKit2.vcproj:
2457 * win/WebKit2Common.vsprops:
2458 Add new include path.
2460 2010-11-08 Alexey Proskuryakov <ap@apple.com>
2462 Reviewed by Darin Adler.
2464 https://bugs.webkit.org/show_bug.cgi?id=49201
2465 Crash when closing a page
2467 Handle null frame by passing a 0 frame id (normal ones start from 1).
2469 * UIProcess/WebPageProxy.cpp:
2470 (WebKit::WebPageProxy::focusedFrameChanged):
2471 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2472 (WebKit::WebChromeClient::focusedFrameChanged):
2474 2010-11-08 Nate Chapin <japhet@chromium.org>
2476 Reviewed by Alexey Proskuryakov.
2478 Function call update for
2479 https://bugs.webkit.org/show_bug.cgi?id=27165.
2481 * WebProcess/Plugins/PluginView.cpp:
2482 (WebKit::PluginView::Stream::start):
2484 2010-11-08 Anders Carlsson <andersca@apple.com>
2486 Reviewed by Adam Roben.
2488 NPClass::construct and NPClass::invokeDefault never called with out-of-process plug-ins in WebKit2
2489 https://bugs.webkit.org/show_bug.cgi?id=49198
2491 * Shared/Plugins/NPObjectMessageReceiver.cpp:
2492 (WebKit::NPObjectMessageReceiver::invokeDefault):
2493 Call NPClass::invokeDefault.
2495 (WebKit::NPObjectMessageReceiver::construct):
2496 Call NPClass::construct
2498 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
2499 Add InvokeDefault and Construct messages.
2501 * Shared/Plugins/NPObjectProxy.cpp:
2502 (WebKit::NPObjectProxy::invokeDefault):
2503 Send the InvokeDefault message.
2505 (WebKit::NPObjectProxy::construct):
2506 Send the Construct message.
2508 (WebKit::NPObjectProxy::NP_InvokeDefault):
2509 Call NPObjectProxy::invokeDefault.
2511 (WebKit::NPObjectProxy::NP_Construct):
2512 Call NPObjectProxy::construct.
2514 2010-11-08 Anders Carlsson <andersca@apple.com>
2516 Reviewed by Dan Bernstein.
2518 Plug-in views should not assume that plugins are RenderEmbeddedObjects
2519 https://bugs.webkit.org/show_bug.cgi?id=49196
2520 <rdar://problem/8638467>
2522 * WebProcess/Plugins/PluginView.cpp:
2523 (WebKit::PluginView::pluginProcessCrashed):
2525 2010-11-08 Anders Carlsson <andersca@apple.com>
2527 Reviewed by Adam Roben.
2529 NPN_Evaluate doesn't work with out-of-process plugins in WebKit2
2530 https://bugs.webkit.org/show_bug.cgi?id=49193
2532 * PluginProcess/PluginControllerProxy.cpp:
2533 (WebKit::PluginControllerProxy::evaluate):
2534 Send an Evaluate message.
2536 * WebProcess/Plugins/PluginProxy.cpp:
2537 (WebKit::PluginProxy::evaluate):
2538 Call Evaluate on the plug-in proxy.
2540 * WebProcess/Plugins/PluginProxy.h:
2541 * WebProcess/Plugins/PluginProxy.messages.in:
2542 Add Evaluate message.
2544 2010-11-08 Anders Carlsson <andersca@apple.com>
2546 Reviewed by John Sullivan.
2548 Correctly convert NPObjectProxy to NPVariantData
2549 https://bugs.webkit.org/show_bug.cgi?id=49190
2551 * Shared/Plugins/NPObjectMessageReceiver.h:
2552 (WebKit::NPObjectMessageReceiver::npObject):
2553 Add NPObject getter.
2555 * Shared/Plugins/NPObjectProxy.h:
2556 (WebKit::NPObjectProxy::npObjectID):
2557 Add NPObjectID getter.
2559 * Shared/Plugins/NPRemoteObjectMap.cpp:
2560 (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
2561 Handle the case where the NPObject is an NPObjectProxy.
2563 (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
2564 Handle NPVariantData::LocalNPObjectID.
2566 * Shared/Plugins/NPVariantData.cpp:
2567 (WebKit::NPVariantData::makeRemoteNPObjectID):
2568 * Shared/Plugins/NPVariantData.h:
2569 New function for creating an NPVariantData that contains a remote NPObject ID.
2571 2010-11-08 Alexey Proskuryakov <ap@apple.com>
2573 Reviewed by Darin Adler.
2575 https://bugs.webkit.org/show_bug.cgi?id=48685
2576 Notify UI process about focused frame
2578 Handle notifications, store the current one in WebPageProxy in UI process.
2580 * UIProcess/API/C/WKPage.cpp:
2581 (WKPageGetFocusedFrame):
2582 * UIProcess/API/C/WKPage.h:
2583 * UIProcess/WebPageProxy.cpp:
2584 (WebKit::WebPageProxy::focusedFrameChanged):
2585 * UIProcess/WebPageProxy.h:
2586 (WebKit::WebPageProxy::focusedFrame):
2587 * UIProcess/WebPageProxy.messages.in:
2588 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2589 (WebKit::WebChromeClient::focusedFrameChanged):
2590 * WebProcess/WebCoreSupport/WebChromeClient.h:
2592 2010-11-07 Adam Barth <abarth@webkit.org>
2594 Reviewed by Eric Seidel.
2596 Rename Cache to MemoryCache
2597 https://bugs.webkit.org/show_bug.cgi?id=49159
2599 * WebProcess/WebProcess.cpp:
2600 * WebProcess/mac/WebProcessMac.mm:
2601 * WebProcess/win/WebProcessWin.cpp:
2603 2010-11-06 Balazs Kelemen <kbalazs@webkit.org>
2605 Reviewed by Andreas Kling.
2607 [Qt][WK2] WebKitTestRunner is dead
2608 https://bugs.webkit.org/show_bug.cgi?id=49129
2610 * Platform/qt/SharedMemoryQt.cpp:
2611 (WebKit::SharedMemory::~SharedMemory):
2612 Avoid double deletion when deleteLater has
2613 already been called.
2615 2010-11-05 Chris Marrin <cmarrin@apple.com>
2617 Reviewed by Simon Fraser.
2619 suspendAnimations/resumeAnimations not present in WebKit2
2620 https://bugs.webkit.org/show_bug.cgi?id=49109
2622 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2623 (WKBundleFrameSuspendAnimations):
2624 (WKBundleFrameResumeAnimations):
2625 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2626 * WebProcess/WebPage/WebFrame.cpp:
2627 (WebKit::WebFrame::suspendAnimations):
2628 (WebKit::WebFrame::resumeAnimations):
2629 * WebProcess/WebPage/WebFrame.h:
2631 2010-11-05 Anders Carlsson <andersca@apple.com>
2633 Reviewed by Darin Adler.
2635 WebProcess won't kill itself if UIProcess goes away while WebProcess is spinning
2636 https://bugs.webkit.org/show_bug.cgi?id=49090
2637 <rdar://problem/7834575>
2639 * Platform/CoreIPC/Connection.cpp:
2640 (CoreIPC::Connection::connectionDidClose):
2641 Call Client::didCloseOnConnectionWorkQueue.
2643 * Platform/CoreIPC/Connection.h:
2644 (CoreIPC::Connection::Client::didCloseOnConnectionWorkQueue):
2645 Add new client function. Will be called on the connection work queue when the connection is closed.
2647 * Platform/WorkItem.h:
2648 (FunctionWorkItem0::FunctionWorkItem0):
2649 (FunctionWorkItem0::execute):
2651 Add a new WorkItem subclass that will invoke a C function.
2653 * Platform/WorkQueue.h:
2654 * Platform/mac/WorkQueueMac.cpp:
2655 (WorkQueue::scheduleWorkAfterDelay):
2656 New function which will schedule the given work item to be executed in at least 'delay' seconds.
2658 * Platform/qt/WorkQueueQt.cpp:
2659 (WorkQueue::scheduleWorkAfterDelay):
2662 * Platform/win/WorkQueueWin.cpp:
2663 (WorkQueue::scheduleWorkAfterDelay):
2666 * PluginProcess/PluginProcess.h:
2667 Derive from ChildProcess.
2669 * Shared/ChildProcess.cpp: Added.
2670 (WebKit::ChildProcess::ChildProcess):
2671 (WebKit::ChildProcess::~ChildProcess):
2672 (WebKit::watchdogCallback):
2675 (WebKit::ChildProcess::didCloseOnConnectionWorkQueue):
2676 When the connection is closed, schedule a work item to be run in 10 seconds. If the process hasn't
2677 exited normally by then, we'll exit.
2679 * Shared/ChildProcess.h:
2680 Add new ChildProcess class which is a common base class of WebProcess and PluginProcess and which contains
2681 the watchdog timer logic.
2684 * WebKit2.xcodeproj/project.pbxproj:
2687 * WebProcess/WebProcess.h:
2688 Derive from ChildProcess.
2690 * win/WebKit2.vcproj:
2693 2010-11-05 Adam Roben <aroben@apple.com>
2695 Implement PluginInfoStore::shouldUsePlugin on Windows
2697 Fixes <http://webkit.org/b/43509> <rdar://problem/8273822> WebKit2
2698 should refuse to load the same plugins that old-WebKit refuses to load
2700 Reviewed by Anders Carlsson.
2702 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2703 (WebKit::fileVersion): Helper function to construct a 64-bit file
2704 version from two 32-bit numbers.
2705 (WebKit::PluginInfoStore::getPluginInfo): Ported code from
2706 WebCore::PluginPackage::fetchInfo to get the plugin's version. We now
2707 store it in Plugin::fileVersion.
2709 (WebKit::isOldWindowsMediaPlayerPlugin):
2710 (WebKit::isNewWindowsMediaPlayerPlugin):
2711 Added these helpers. The code came from
2712 WebCore::PluginDatabase::getPluginPathsInDirectories.
2714 (WebKit::PluginInfoStore::shouldUsePlugin): Implemented. The code was
2715 ported from WebCore::PluginDatabase::getPluginPathsInDirectories and
2716 WebCore::PluginPackage::isPluginBlacklisted.
2718 2010-11-05 Adam Roben <aroben@apple.com>
2720 Operate on m_plugins directly in PluginInfoStore::shouldUsePlugin
2722 We'll need to operate on m_plugins if we ever want to unload an
2723 already-loaded plugin before loading the new one.
2725 Fixes <http://webkit.org/b/49076> loadedPlugins parameter to
2726 PluginInfoStore::shouldUsePlugin is redundant
2728 Reviewed by Anders Carlsson.
2730 * UIProcess/Plugins/PluginInfoStore.cpp:
2731 (WebKit::PluginInfoStore::loadPlugin):
2732 * UIProcess/Plugins/PluginInfoStore.h:
2733 * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
2734 (WebKit::PluginInfoStore::shouldUsePlugin):
2735 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2736 (WebKit::PluginInfoStore::shouldUsePlugin):
2737 * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
2738 (WebKit::PluginInfoStore::shouldUsePlugin):
2739 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2740 (WebKit::PluginInfoStore::shouldUsePlugin):
2741 Removed the loadedPlugins parameter from shouldUsePlugin. The single
2742 implementation (Mac) now uses m_plugins directly.
2744 2010-11-05 Anders Carlsson <andersca@apple.com>
2746 Reviewed by Adam Roben.
2748 Implement pluginElementNPObject
2749 https://bugs.webkit.org/show_bug.cgi?id=49077
2751 * PluginProcess/PluginControllerProxy.cpp:
2752 (WebKit::PluginControllerProxy::pluginElementNPObject):
2753 Send the GetPluginElementNPObject message.
2755 * WebProcess/Plugins/PluginProxy.cpp:
2756 (WebKit::PluginProxy::getPluginElementNPObject):
2757 Get the plug-in element NPObject and expose it to the other side of the connection.
2759 * WebProcess/Plugins/PluginProxy.messages.in:
2760 Add GetPluginElementNPObject.
2762 2010-11-04 Anders Carlsson <andersca@apple.com>
2764 Reviewed by Oliver Hunt.
2766 Implement NP_RemoveProperty and NP_Enumerate
2767 https://bugs.webkit.org/show_bug.cgi?id=49046
2769 * Shared/Plugins/NPObjectMessageReceiver.cpp:
2770 (WebKit::NPObjectMessageReceiver::removeProperty):
2771 Call the removeProperty NPClass function.
2773 (WebKit::NPObjectMessageReceiver::enumerate):
2774 Call the enumerate NPClass function.
2776 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
2777 Add RemoveProperty and Enumerate messages.
2779 * Shared/Plugins/NPObjectProxy.cpp:
2780 (WebKit::NPObjectProxy::removeProperty):
2781 Send the RemoveProperty message.
2783 (WebKit::NPObjectProxy::enumerate):
2784 Send the Enumerate message.
2786 (WebKit::NPObjectProxy::NP_RemoveProperty):
2787 Call removeProperty.
2789 (WebKit::NPObjectProxy::NP_Enumerate):
2792 2010-11-05 Sam Weinig <sam@webkit.org>
2794 Fix failing python tests.
2796 * Scripts/webkit2/messages.py:
2797 * Scripts/webkit2/messages_unittest.py:
2799 2010-11-05 Sam Weinig <sam@webkit.org>
2801 Reviewed by Adam Roben..
2803 Generate the messages sent to the WebProcessProxy
2804 https://bugs.webkit.org/show_bug.cgi?id=49062
2806 * Platform/CoreIPC/MessageID.h:
2807 Temporarily add MessageClassWebProcessProxyLegacy while we still can't
2808 support GetPluginProcessConnection (and deferred sync replies) in the
2811 * Scripts/webkit2/messages.py:
2812 Add support for WebCore::PluginData and WebKit::WebNavigationDataStore.
2814 * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
2815 Remove now unused kinds. Rename to MessageClassWebProcessProxyLegacy.
2817 * UIProcess/WebProcessProxy.cpp:
2818 (WebKit::WebProcessProxy::getPluginPath):
2819 (WebKit::WebProcessProxy::addBackForwardItem):
2820 (WebKit::WebProcessProxy::didNavigateWithNavigationData):
2821 (WebKit::WebProcessProxy::didPerformClientRedirect):
2822 (WebKit::WebProcessProxy::didPerformServerRedirect):
2823 (WebKit::WebProcessProxy::didUpdateHistoryTitle):
2824 (WebKit::WebProcessProxy::didReceiveMessage):
2825 (WebKit::WebProcessProxy::didReceiveSyncMessage):
2826 (WebKit::WebProcessProxy::didDestroyFrame):
2827 * UIProcess/WebProcessProxy.h:
2828 * UIProcess/WebProcessProxy.messages.in: Added.
2829 Move implementations to their own functions.
2831 * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2832 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2833 Change to use WebProcessProxyLegacyMessage.
2835 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2836 (WebKit::WebFrameLoaderClient::updateGlobalHistory):
2837 (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
2838 (WebKit::WebFrameLoaderClient::setTitle):
2839 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2840 (WebKit::WebPlatformStrategies::populatePluginCache):
2841 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2842 (WebKit::updateBackForwardItem):
2843 * WebProcess/WebPage/WebPage.cpp:
2844 (WebKit::WebPage::createPlugin):
2845 * WebProcess/WebProcess.cpp:
2846 (WebKit::WebProcess::addVisitedLink):
2847 (WebKit::WebProcess::removeWebFrame):
2848 Use generated messages.
2850 * DerivedSources.make:
2851 * DerivedSources.pro:
2853 * WebKit2.xcodeproj/project.pbxproj:
2854 * win/WebKit2.vcproj:
2857 2010-11-04 Adam Roben <aroben@apple.com>
2859 Use a window region to clip windowed plugins
2861 Fixes <http://webkit.org/b/49024> <rdar://problem/8487847> Windowed
2862 plugins aren't clipped in WebKit2 on Windows
2864 Reviewed by Jon Honeycutt.
2866 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2867 (WebKit::registerPluginView): Removed the CS_PARENTDC style. This style
2868 makes Windows ignore the window region and always clip to the parent
2869 window. Also pass WebKit.dll's HINSTANCE as part of the WNDCLASSW
2870 struct so that the window class will be specific to WebKit.dll rather
2871 than to WebKit2WebProcess.exe. This is useful for testing, but also
2872 more pedantically correct.
2873 (WebKit::setWindowRegion): Helper function to set a window region and
2874 deal with ownership of the HRGN correctly.
2875 (WebKit::NetscapePlugin::platformGeometryDidChange): Make an HRGN that
2876 corresponds to m_clipRect and set it on the plugin's window.
2878 2010-11-05 Balazs Kelemen <kbalazs@webkit.org>
2880 Reviewed by Andreas Kling.
2882 [Qt][WK2] Left over files and shared memory segments
2883 https://bugs.webkit.org/show_bug.cgi?id=48985
2885 * Platform/qt/SharedMemoryQt.cpp:
2886 (WebKit::SharedMemory::create): Force deletion of the QSharedMemory
2887 object on terminate by connecting QCoreApplication::aboutToQuit with
2888 deleteLater. Add the object to the CrashHandler as well to release the
2889 shared memory segment even on crash.
2890 (WebKit::SharedMemory::~SharedMemory):
2891 * Shared/qt/CrashHandler.cpp: Added.
2892 CrashHandler has a container for QObjects that we want to
2893 destroy on crash. When we got a signal that we interpret as
2894 a crash then it destroys those objects.
2895 (WebKit::CrashHandler::CrashHandler):
2896 (WebKit::CrashHandler::signalHandler):
2897 (WebKit::CrashHandler::deleteObjects):
2898 * Shared/qt/CrashHandler.h: Added.
2899 (WebKit::CrashHandler::instance):
2900 (WebKit::CrashHandler::didDelete):
2901 (WebKit::CrashHandler::markForDeletionOnCrash):
2902 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2903 (WebKit::ProcessLauncherHelper::ProcessLauncherHelper):
2904 Add the object itself to the CrashHandler to close the QLocalServer
2905 even on crash. Without that the QLocalServer leaves over socket files on the disk.
2906 (WebKit::ProcessLauncherHelper::~ProcessLauncherHelper):
2909 2010-11-04 Jia Pu <jpu@apple.com>
2911 Reviewed by Dan Bernstein.
2913 reversion bubble in WebViews
2914 https://bugs.webkit.org/show_bug.cgi?id=47630
2915 <rdar://problem/8530960>
2917 This patch is to add reversion to correction panel. Please see WebCore/ChangeLog for detail.
2919 * WebProcess/WebCoreSupport/WebEditorClient.h: Adopted new signature of base class method.
2920 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Ditto.
2921 (WebKit::WebEditorClient::showCorrectionPanel):
2922 (WebKit::WebEditorClient::dismissCorrectionPanel):
2924 2010-11-04 Kenneth Rohde Christiansen <kenneth@webkit.org>
2926 Reviewed by David Hyatt.
2928 Delegate scrolling via a separate method
2929 https://bugs.webkit.org/show_bug.cgi?id=48988
2931 Add delegatedScrollRequested method to WebChromeClient,
2932 which is only used in conjunging with tiling, and thus ifdef'ed.
2934 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2935 (WebKit::WebChromeClient::delegatedScrollRequested):
2936 * WebProcess/WebCoreSupport/WebChromeClient.h:
2938 2010-11-03 Enrica Casucci <enrica@apple.com>
2940 Reviewed by Alexey Proskuryakov.
2942 Need a way to test in WebKit2 whether a form field contains marked text
2943 <rdar://problem/8555293>
2944 https://bugs.webkit.org/show_bug.cgi?id=48969
2946 Added a selection changed notification from the Web process to the UI process.
2947 The message being sent contains information about the current selection.
2948 Event though for this specific bug the only information required is the marked text,
2949 I've added other selection information that will be needed to support IME.
2950 All the stubbed methods are required methods by the NSTextInput protocol.
2952 * UIProcess/API/mac/PageClientImpl.h:
2953 * UIProcess/API/mac/PageClientImpl.mm:
2954 (WebKit::PageClientImpl::selectionChanged): Added.
2955 * UIProcess/API/mac/WKView.h:
2956 * UIProcess/API/mac/WKView.mm:
2957 (-[WKView initWithFrame:pageNamespaceRef:]): Added initialization of new members.
2958 (-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:]): Stores the values from
2959 the selection changed message.
2960 (-[WKView selectedRange]): Added stub.
2961 (-[WKView hasMarkedText]): Implemented.
2962 (-[WKView unmarkText]): Added stub.
2963 (-[WKView validAttributesForMarkedText]): Added stub.
2964 (-[WKView setMarkedText:selectedRange:]): Added stub.
2965 (-[WKView markedRange]): Added stub.
2966 (-[WKView attributedSubstringFromRange:]): Added stub.
2967 (-[WKView conversationIdentifier]): Added stub.
2968 (-[WKView characterIndexForPoint:]): Added stub.
2969 (-[WKView firstRectForCharacterRange:]): Added stub.
2970 * UIProcess/API/mac/WKViewInternal.h:
2971 * UIProcess/API/qt/qwkpage.cpp:
2972 (QWKPagePrivate::selectionChanged): Added.
2973 * UIProcess/API/qt/qwkpage_p.h:
2974 * UIProcess/PageClient.h:
2975 * UIProcess/WebPageProxy.cpp:
2976 (WebKit::WebPageProxy::didSelectionChange): New message handler.
2977 * UIProcess/WebPageProxy.h:
2978 * UIProcess/WebPageProxy.messages.in:
2979 * UIProcess/win/WebView.cpp:
2980 (WebKit::WebView::selectionChanged): Added.
2981 * UIProcess/win/WebView.h:
2982 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2983 (WebKit::WebEditorClient::respondToChangedSelection): Added implementation.
2985 2010-11-04 Balazs Kelemen <kbalazs@webkit.org>
2987 Reviewed by Andreas Kling.
2989 [Qt][WK2] Cleanup UpdateChunk and MappedMemoryPool
2990 https://bugs.webkit.org/show_bug.cgi?id=48994
2992 * Platform/qt/MappedMemoryPool.cpp:
2993 (WebKit::MappedMemoryPool::mapMemory):
2994 Removed argument with default value that was always
2995 used with the default value.
2996 (WebKit::MappedMemoryPool::mapFile): Ditto and
2998 * Platform/qt/MappedMemoryPool.h:
2999 Encapsulating MappedMemory and remove the unused
3000 MappedMemoryPool::searchForMappedMemory method.
3001 (WebKit::MappedMemory::mappedFile):
3002 (WebKit::MappedMemory::markFree):
3003 (WebKit::MappedMemory::data):
3004 (WebKit::MappedMemory::MappedMemory):
3005 (WebKit::MappedMemory::markUsed):
3006 (WebKit::MappedMemory::mapSize):
3007 (WebKit::MappedMemory::isFree):
3008 (WebKit::MappedMemoryPool::instance):
3009 * Shared/qt/UpdateChunk.cpp:
3010 Removed the unused data method besides other cleanups.
3011 (WebKit::UpdateChunk::UpdateChunk):
3012 (WebKit::UpdateChunk::encode):
3013 (WebKit::UpdateChunk::decode):
3014 (WebKit::UpdateChunk::createImage):
3015 * Shared/qt/UpdateChunk.h:
3017 2010-11-04 Andreas Kling <kling@webkit.org>
3019 Reviewed by Tor Arne Vestbø.
3021 [Qt] Add a stub WebContextMenuProxy
3023 This is the Qt equivalent of r71333.
3025 * UIProcess/API/qt/qwkpage.cpp:
3026 (QWKPagePrivate::createContextMenuProxy):
3027 * UIProcess/qt/WebContextMenuProxyQt.cpp: Added.
3028 (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
3029 (WebKit::WebContextMenuProxyQt::create):
3030 (WebKit::WebContextMenuProxyQt::showContextMenu):
3031 (WebKit::WebContextMenuProxyQt::hideContextMenu):
3032 * UIProcess/qt/WebContextMenuProxyQt.h: Added.
3035 2010-11-04 Adam Roben <aroben@apple.com>
3037 Add a do-nothing WebContextMenuProxy implementation on Windows
3039 Fixes <http://webkit.org/b/48992> REGRESSION (r71041): Crash in
3040 WebPageProxy::showContextMenu when right-clicking in WebKit2 on
3043 Reviewed by Dan Bernstein.
3045 * UIProcess/win/WebContextMenuProxyWin.cpp: Added.
3046 (WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin):
3047 (WebKit::WebContextMenuProxyWin::create):
3048 (WebKit::WebContextMenuProxyWin::showContextMenu):
3049 (WebKit::WebContextMenuProxyWin::hideContextMenu):
3050 * UIProcess/win/WebContextMenuProxyWin.h: Added.
3051 Just stubbed-out this class.
3053 * UIProcess/win/WebView.cpp:
3054 (WebKit::WebView::createContextMenuProxy): Create a new
3055 WebContextMenuProxyWin and return it. Returning 0 results in a crash.
3057 * win/WebKit2.vcproj: Added WebContextMenuProxyWin.
3059 2010-11-04 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
3061 Reviewed by Andreas Kling..
3063 [Qt] Build Webkit2 both in debug and release on Mac
3065 On Mac OS X we build QtWebKit in both debug and release, so
3066 we need to also build the webkit2 library in both configs.
3070 2010-11-04 Adam Roben <aroben@apple.com>
3072 Remove lame puts()s from WebPageProxy
3074 Rubber-stamped by Anders Carlsson.
3076 * UIProcess/WebPageProxy.cpp:
3077 (WebKit::WebPageProxy::loadURL):
3078 (WebKit::WebPageProxy::loadURLRequest):
3080 2010-11-03 Alice Liu <alice.liu@apple.com>
3084 * PluginProcess/PluginProcess.h:
3085 * UIProcess/Plugins/PluginProcessProxy.h:
3086 * UIProcess/WebContextMenuProxy.h:
3087 Change class to struct and vise versa where needed.
3089 2010-11-03 Anders Carlsson <andersca@apple.com>
3091 Reviewed by Adam Roben.
3093 Implement NP_SetProperty
3094 https://bugs.webkit.org/show_bug.cgi?id=48956
3096 * Shared/Plugins/NPObjectMessageReceiver.cpp:
3097 (WebKit::NPObjectMessageReceiver::setProperty):
3098 Call the NPClass setProperty function.
3100 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
3101 Add SetProperty message.
3103 * Shared/Plugins/NPObjectProxy.cpp:
3104 (WebKit::NPObjectProxy::setProperty):
3105 Send a SetProperty message.
3107 (WebKit::NPObjectProxy::NP_SetProperty):
3108 Call NPObjectProxy::setProperty.
3110 2010-11-03 Anders Carlsson <andersca@apple.com>
3112 Reviewed by Simon Fraser.
3114 Out of process plug-ins don't support the CA drawing model
3115 https://bugs.webkit.org/show_bug.cgi?id=48950
3116 <rdar://problem/8626019>
3118 * Platform/CoreIPC/HandleMessage.h:
3119 (CoreIPC::callMemberFunction):
3122 * PluginProcess/PluginControllerProxy.cpp:
3123 (WebKit::PluginControllerProxy::initialize):
3124 Call platformInitialize().
3126 (WebKit::PluginControllerProxy::destroy):
3127 Call platformDestroy().
3129 (WebKit::PluginControllerProxy::isAcceleratedCompositingEnabled):
3130 Assume that accelerated compositing is available if we have a render server port.
3132 (WebKit::PluginControllerProxy::geometryDidChange):
3133 Call platformGeometryDidChange().
3135 * PluginProcess/PluginProcess.h:
3136 * PluginProcess/WebProcessConnection.cpp:
3137 (WebKit::WebProcessConnection::createPlugin):
3138 Pass back the remote layer client ID.
3140 * PluginProcess/WebProcessConnection.messages.in:
3141 Add a remoteLayerClientID out parameter to CreatePlugin.
3143 * PluginProcess/mac/PluginControllerProxyMac.mm: Added.
3144 (WebKit::PluginControllerProxy::platformInitialize):
3145 If the plug-in has a layer, create a remote layer client and associate it with the layer.
3147 (WebKit::PluginControllerProxy::platformDestroy):
3148 Invalidate the remote layer client.
3150 (WebKit::PluginControllerProxy::remoteLayerClientID):
3151 Return the remote layer client ID if one exists.
3153 (WebKit::PluginControllerProxy::platformGeometryDidChange):
3154 Update the layer bounds.
3156 * WebKit2.xcodeproj/project.pbxproj:
3159 * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: Added.
3160 (WebKit::PluginProxy::pluginLayer):
3161 Create a render layer if needed.
3163 (WebKit::PluginProxy::needsBackingStore):
3164 Return whether the plug-in needs a backing store. (It doesn't need a backing store if it's a CA plug-in).
3166 * WebProcess/Plugins/PluginProxy.cpp:
3167 (WebKit::PluginProxy::PluginProxy):
3168 Initialize m_remoteLayerClientID.
3170 (WebKit::PluginProxy::initialize):
3171 Set m_remoteLayerClientID.
3173 (WebKit::PluginProxy::paint):
3174 Bail if the plug-in doesn't need a backing store.
3176 (WebKit::PluginProxy::geometryDidChange):
3177 Don't create a backing store if the plug-in doesn't need one.
3179 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3180 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
3181 Remove RetainPtr initialization.
3183 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
3184 (WebKit::LayerBackedDrawingArea::platformClear):
3185 Use nullptr instead of 0.
3187 2010-11-03 Anders Carlsson <andersca@apple.com>
3189 Reviewed by Simon Fraser.
3191 Crash when layout in response to setSize changes the drawing area
3192 https://bugs.webkit.org/show_bug.cgi?id=48947
3194 This is tested by compositing/plugins/small-to-large-composited-plugin.html.
3196 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
3197 (WebKit::ChunkedUpdateDrawingArea::setSize):
3198 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3199 (WebKit::LayerBackedDrawingArea::setSize):
3201 2010-11-03 Anders Carlsson <andersca@apple.com>
3203 Reviewed by Adam Roben.
3205 Pass the accelerated compositing render server port to the plug-in process at startup
3206 https://bugs.webkit.org/show_bug.cgi?id=48925
3208 * PluginProcess/PluginProcess.cpp:
3209 (WebKit::PluginProcess::PluginProcess):
3210 Initialize m_compositingRenderServerPort to MACH_PORT_NULL.
3212 (WebKit::PluginProcess::initialize):
3213 Get the plug-in path and render server port from the creation parameters.
3215 * PluginProcess/PluginProcess.messages.in:
3216 Change the Initialize message to take a PluginProcessCreationParameters struct.
3218 * Shared/Plugins/PluginProcessCreationParameters.cpp: Added.
3219 * Shared/Plugins/PluginProcessCreationParameters.h: Added.
3220 Add new PluginProcessCreationParameters struct.
3222 * UIProcess/Plugins/PluginProcessProxy.cpp:
3223 (WebKit::PluginProcessProxy::didFinishLaunching):
3224 Initialize now takes a PluginProcessCreationParameters struct.
3226 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: Added.
3227 (WebKit::PluginProcessProxy::platformInitializePluginProcess):
3228 Initialize the render server port.
3230 * WebKit2.xcodeproj/project.pbxproj:
3233 2010-11-03 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
3235 Reviewed by Kenneth Rohde Christiansen.
3237 [Qt] Add the webkit2 library to LIBS instead of QMAKE_LFLAGS
3239 Otherwise the library order will get messed up and cause
3240 missing symbols on Mac OS X.
3245 2010-11-02 Daniel Bates <dbates@rim.com>
3247 Reviewed by Adam Barth.
3249 For unnamed frames, window.name returns a generated name
3250 https://bugs.webkit.org/show_bug.cgi?id=6751
3254 Substitute FrameTree::uniqueName() for FrameTree::name() in WebKit2.
3256 * WebProcess/WebPage/WebFrame.cpp:
3257 (WebKit::WebFrame::name):
3259 2010-11-02 Amruth Raj <amruthraj@motorola.com> and Ravi Kasibhatla <ravi.kasibhatla@motorola.com>
3261 Reviewed by Martin Robinson.
3263 Changes to enable building WebKit2 for Gtk port.
3264 (https://bugs.webkit.org/show_bug.cgi?id=37369)
3266 * Platform/gtk: Added.
3267 * Platform/gtk/SharedMemoryGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3268 (WebKit::SharedMemory::Handle::Handle):
3269 (WebKit::SharedMemory::Handle::~Handle):
3270 (WebKit::SharedMemory::Handle::encode):
3271 (WebKit::SharedMemory::Handle::decode):
3272 (WebKit::SharedMemory::create):
3273 (WebKit::SharedMemory::~SharedMemory):
3274 (WebKit::SharedMemory::createHandle):
3275 (WebKit::SharedMemory::systemPageSize):
3276 * Shared/gtk: Added.
3277 * Shared/gtk/BackingStoreGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3278 (WebKit::BackingStore::createGraphicsContext):
3279 (WebKit::BackingStore::paint):
3280 * Shared/gtk/PlatformCertificateInfo.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
3281 (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
3282 (WebKit::PlatformCertificateInfo::encode):
3283 (WebKit::PlatformCertificateInfo::decode):
3284 * Shared/gtk/WebCoreArgumentCodersGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3285 (CoreIPC::encodeResourceRequest):
3286 (CoreIPC::decodeResourceRequest):
3287 * UIProcess/Plugins/gtk: Added.
3288 * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3289 (WebKit::PluginInfoStore::pluginsDirectories):
3290 (WebKit::PluginInfoStore::pluginPathsInDirectory):
3291 (WebKit::PluginInfoStore::individualPluginPaths):
3292 (WebKit::PluginInfoStore::getPluginInfo):
3293 (WebKit::PluginInfoStore::shouldUsePlugin):
3294 * WebProcess/InjectedBundle/InjectedBundle.h:
3295 * WebProcess/InjectedBundle/gtk: Added.
3296 * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3297 (WebKit::InjectedBundle::load):
3298 (WebKit::InjectedBundle::activateMacFontAscentHack):
3299 * WebProcess/Plugins/Netscape/gtk: Added.
3300 * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3301 (WebKit::NetscapePlugin::platformPostInitialize):
3302 (WebKit::NetscapePlugin::platformDestroy):
3303 (WebKit::NetscapePlugin::platformGeometryDidChange):
3304 (WebKit::NetscapePlugin::platformPaint):
3306 (WebKit::NetscapePlugin::platformHandleMouseEvent):
3307 (WebKit::NetscapePlugin::platformHandleWheelEvent):
3308 (WebKit::NetscapePlugin::platformSetFocus):
3309 (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
3310 (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
3311 (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
3312 * WebProcess/WebCoreSupport/gtk: Added.
3313 * WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
3314 (WebFrameNetworkingContext::create):
3315 (WebFrameNetworkingContext::WebFrameNetworkingContext):
3317 2010-11-02 Jing Jin <jjin@apple.com>
3319 Reviewed by Alexey Proskuryakov.
3321 Key down calls are not being sent to the application.
3322 https://bugs.webkit.org/show_bug.cgi?id=48867
3324 * UIProcess/API/mac/WKView.mm:
3325 (-[WKView keyDown:]): Call super when ignoring a key down.
3327 2010-11-02 Anders Carlsson <andersca@apple.com>
3329 Reviewed by John Sullivan.
3331 Add Null and Int32 to NPVariantData
3332 https://bugs.webkit.org/show_bug.cgi?id=48887
3334 * Shared/Plugins/NPRemoteObjectMap.cpp:
3335 (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
3336 (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
3337 * Shared/Plugins/NPVariantData.cpp:
3338 (WebKit::NPVariantData::NPVariantData):
3339 (WebKit::NPVariantData::makeNull):
3340 (WebKit::NPVariantData::makeInt32):
3341 (WebKit::NPVariantData::encode):
3342 (WebKit::NPVariantData::decode):
3343 * Shared/Plugins/NPVariantData.h:
3344 (WebKit::NPVariantData::int32Value):
3346 2010-11-02 Anders Carlsson <andersca@apple.com>
3348 Reviewed by Adam Roben.
3350 Add support for NP_HasMethod and NP_Invoke
3351 https://bugs.webkit.org/show_bug.cgi?id=48882
3353 * Platform/CoreIPC/HandleMessage.h:
3354 (CoreIPC::callMemberFunction):
3357 * Shared/Plugins/NPObjectMessageReceiver.cpp:
3358 (WebKit::NPObjectMessageReceiver::hasMethod):
3359 Call hasMethod and return the result.
3361 (WebKit::NPObjectMessageReceiver::invoke):
3362 Convert the arguments, call invoke and return the result.
3364 (WebKit::NPObjectMessageReceiver::getProperty):
3365 Release the converted variant.
3367 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
3368 Add HasMethod and Invoke messages.
3370 * Shared/Plugins/NPObjectProxy.cpp:
3371 (WebKit::NPObjectProxy::hasMethod):
3372 Send the HasMethod message.
3374 (WebKit::NPObjectProxy::invoke):
3375 Send the Invoke message.
3377 (WebKit::NPObjectProxy::NP_HasMethod):
3380 (WebKit::NPObjectProxy::NP_Invoke):
3383 2010-11-02 Anders Carlsson <andersca@apple.com>
3385 Reviewed by Sam Weinig.
3387 Implement NP_HasProperty for NPObjectProxy
3388 https://bugs.webkit.org/show_bug.cgi?id=48876
3390 * Shared/Plugins/NPObjectMessageReceiver.cpp:
3391 (WebKit::NPObjectMessageReceiver::hasProperty):
3392 Call The hasProperty callback function.
3394 * Shared/Plugins/NPObjectMessageReceiver.messages.in:
3395 Add HasProperty message.
3397 * Shared/Plugins/NPObjectProxy.cpp:
3398 (WebKit::NPObjectProxy::hasProperty):
3399 Send the HasProperty message.
3401 (WebKit::NPObjectProxy::NP_HasProperty):
3405 2010-11-02 Sam Weinig <sam@webkit.org>
3407 Reviewed by Anders Carlsson.
3409 Add a way to send startup messages on the context which can be posted when a process launches
3410 <rdar://problem/8617928>
3411 https://bugs.webkit.org/show_bug.cgi?id=48838
3413 Adds WKContextSetInitializationUserDataForInjectedBundle which sets an
3414 APIObject on WebContext to be sent to the InjectedBundle's WKBundleInitialize
3415 function each time a process starts up. This can help in cases where
3416 the WebProcess dies, and will be helpful in the world where there are
3417 multiple WebProcess's per context.
3419 * Scripts/webkit2/messages.py:
3420 * UIProcess/API/C/WKContext.cpp:
3421 (WKContextSetInitializationUserDataForInjectedBundle):
3422 * UIProcess/API/C/WKContext.h:
3423 * UIProcess/WebContext.cpp:
3424 (WebKit::WebContext::ensureWebProcess):
3425 * UIProcess/WebContext.h:
3426 (WebKit::WebContext::setInjectedBundleInitializationUserData):
3427 (WebKit::WebContext::injectedBundleInitializationUserData):
3428 * WebProcess/InjectedBundle/API/c/WKBundleInitialize.h:
3429 * WebProcess/InjectedBundle/InjectedBundle.h:
3430 * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
3431 (WebKit::InjectedBundle::load):
3432 * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
3433 (WebKit::InjectedBundle::load):
3434 * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
3435 (WebKit::InjectedBundle::load):
3436 * WebProcess/WebProcess.cpp:
3437 (WebKit::WebProcess::initializeWebProcess):
3438 * WebProcess/WebProcess.h:
3439 * WebProcess/WebProcess.messages.in:
3441 2010-11-02 Anders Carlsson <andersca@apple.com>
3443 Reviewed by Sam Weinig.
3445 Implement PluginProxy::pluginScriptableNPObject
3446 https://bugs.webkit.org/show_bug.cgi?id=48874
3448 * PluginProcess/PluginControllerProxy.cpp:
3449 (WebKit::PluginControllerProxy::getPluginScriptableNPObject):
3450 Ask the plug-in for its scriptable NPObject, register it with the map and return its object ID.
3452 * PluginProcess/PluginControllerProxy.messages.in:
3453 Add GetPluginScriptableNPObject message.
3455 * WebProcess/Plugins/PluginProxy.cpp:
3456 (WebKit::PluginProxy::pluginScriptableNPObject):
3457 Send the GetPluginScriptableNPObject message.
3459 2010-11-02 Anders Carlsson <andersca@apple.com>
3461 Reviewed by Dan Bernstein.
3463 Add strings to NPVariantData
3464 https://bugs.webkit.org/show_bug.cgi?id=48871
3466 * Shared/Plugins/NPRemoteObjectMap.cpp:
3467 (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
3468 (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
3469 * Shared/Plugins/NPVariantData.cpp:
3470 (WebKit::NPVariantData::makeString):
3471 (WebKit::NPVariantData::encode):
3472 (WebKit::NPVariantData::decode):
3473 * Shared/Plugins/NPVariantData.h:
3474 (WebKit::NPVariantData::stringValue):
3476 2010-11-02 Anders Carlsson <andersca@apple.com>
3478 Reviewed by Dan Bernstein.
3480 Add convenience functions for allocating NPAPI memory
3481 https://bugs.webkit.org/show_bug.cgi?id=48870
3483 Add npnMemAlloc, npnMemFree and createNPString functions and
3484 npnMemNew, npnMemNewArray function templates.
3486 * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3487 (WebKit::JSNPObject::getOwnPropertyNames):
3490 * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3491 (WebKit::NPJSObject::enumerate):
3494 * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3495 (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
3498 * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
3499 (WebKit::npnMemAlloc):
3502 (WebKit::npnMemFree):
3505 (WebKit::createNPString):
3506 Allocate the characters for a new NPString.
3508 (WebKit::createNPObject):
3511 (WebKit::deallocateNPObject):
3514 (WebKit::releaseNPVariantValue):
3517 * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
3518 (WebKit::npnMemNew):
3519 (WebKit::npnMemNewArray):
3522 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3523 (WebKit::NPN_MemAlloc):
3526 (WebKit::NPN_MemFree):
3529 (WebKit::NPN_UTF8FromIdentifier):
3530 Call npnMemNewArray.
3532 (WebKit::copyCString):
3533 Call npnMemNewArray. Correctly initialize the "len" out parameter.
3535 2010-11-02 Jessie Berlin <jberlin@apple.com>
3537 Windows build fix. Unreviewed.
3539 * win/WebKit2Generated.make:
3540 Add WKInspector.h so that it is copied over to the WebKitBuild directory.
3542 2010-11-02 Anders Carlsson <andersca@apple.com>
3544 Reviewed by Adam Roben.
3546 Add some support for remote and local NPObjects to NPRemoteObjectMap
3547 https://bugs.webkit.org/show_bug.cgi?id=48864
3549 * Shared/Plugins/NPRemoteObjectMap.cpp:
3550 (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
3551 If the NPVariant contains an NPObject that isn't an NPObjectProxy, register it
3554 (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
3555 If the NPVariantData contains a remote object, create an NPObjectProxy and return it.
3557 * Shared/Plugins/NPVariantData.cpp:
3558 (WebKit::NPVariantData::NPVariantData):
3559 Initialize m_localNPObjectIDValue and m_remoteNPObjectIDValue.
3561 (WebKit::NPVariantData::makeLocalNPObjectID):
3562 Create an NPVariantData that contains a local NPObject ID.
3564 (WebKit::NPVariantData::encode):
3565 Handle local and remote NPObject IDs.
3567 (WebKit::NPVariantData::decode):
3568 Decode local and remote NPObject IDs and "swap them" so an encoded remote NPObject ID is
3569 decoded as a local NPObjectID (and vice versa).
3571 * Shared/Plugins/NPVariantData.h:
3572 (WebKit::NPVariantData::localNPObjectIDValue):
3573 (WebKit::NPVariantData::remoteNPObjectIDValue):
3575 2010-11-02 Anders Carlsson <andersca@apple.com>
3577 Attempt to fix a GCC release only warning.
3579 * Shared/Plugins/NPVariantData.cpp:
3580 (WebKit::NPVariantData::NPVariantData):
3582 2010-11-02 Anders Carlsson <andersca@apple.com>
3584 Reviewed by John Sullivan.
3586 Invalidate the NPRemoteObjectMap
3587 https://bugs.webkit.org/show_bug.cgi?id=48856
3589 * Shared/Plugins/NPObjectMessageReceiver.cpp:
3590 (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
3591 Remove FIXME. The NPRemoteObjectMap always outlives the NPObjectMessageReceiver.
3593 * Shared/Plugins/NPObjectProxy.cpp:
3594 (WebKit::NPObjectProxy::~NPObjectProxy):
3595 Call npObjectProxyDestroyed here.
3597 (WebKit::NPObjectProxy::invalidate):
3598 Null out m_npRemoteObjectMap.
3600 * Shared/Plugins/NPRemoteObjectMap.cpp:
3601 (WebKit::NPRemoteObjectMap::~NPRemoteObjectMap):
3604 (WebKit::NPRemoteObjectMap::createNPObjectProxy):
3605 Keep track of the NPObjectProxy by adding it to the m_npObjectProxies set.
3607 (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed):
3608 Remove the NPObjectProxy from the m_npObjectProxies set.
3610 (WebKit::NPRemoteObjectMap::invalidate):
3611 Delete all NPObjectMessageReceivers. Iterate over all NPObjectProxy objects and invalidate them.
3613 2010-11-02 Mike Thole <mthole@apple.com>
3615 Reviewed by Anders Carlsson.
3617 WebProcessManager informed about crashes too late (pages may have already tried to load a new URL)
3618 https://bugs.webkit.org/show_bug.cgi?id=48853
3620 This also fixes: <rdar://problem/8610451> Webkit2: Crash in WebKit!WebKit::WebProcessProxy::sendMessage opening google.com page
3622 * UIProcess/WebProcessProxy.cpp:
3623 (WebKit::WebProcessProxy::~WebProcessProxy):
3624 Removed invalid assertion that is hit when the WebProcess dies unexpectedly.
3625 (WebKit::WebProcessProxy::didClose):
3626 Reordered so that the individual pages are informed that the processDidCrash() after the shared
3627 WebProcessManager has been. This allows the pages to properly trigger a new process to be launched.
3629 2010-11-02 Enrica Casucci <enrica@apple.com>
3631 Reviewed by Alexey Proskuryakov.
3633 WebKit2: Repeated cmd-key presses lead to unusable UI state
3634 https://bugs.webkit.org/show_bug.cgi?id=48811
3635 <rdar://problem/8611924>
3637 Given the asynchronous nature of every interaction with the WebProcess,
3638 we could re-send a keyDown event to AppKit that maps to an
3639 action that is currently disabled and therefore will not trigger an action
3640 but a call to the keyDown method of the NSView. We need to detect this
3641 situation to avoid an infinite loop.
3643 * UIProcess/API/mac/WKView.mm:
3644 (-[WKView performKeyEquivalent:]): Delay the release of the last processed event
3645 to the moment we receive another event.
3646 (-[WKView keyDown:]): Added early return in case the event is one we have re-sent.
3648 2010-11-02 Anders Carlsson <andersca@apple.com>
3650 Reviewed by John Sullivan.
3652 Handle boolean values in NPVariant and NPVariantData
3653 https://bugs.webkit.org/show_bug.cgi?id=48852
3655 * Shared/Plugins/NPRemoteObjectMap.cpp:
3656 (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
3657 (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
3658 * Shared/Plugins/NPVariantData.cpp:
3659 (WebKit::NPVariantData::makeBool):
3660 (WebKit::NPVariantData::encode):
3661 (WebKit::NPVariantData::decode):
3662 * Shared/Plugins/NPVariantData.h:
3663 (WebKit::NPVariantData::boolValue):
3665 2010-11-02 Anders Carlsson <andersca@apple.com>
3667 Reviewed by John Sullivan.
3669 Assertion hit in WebProcessProxy::~WebProcessProxy()
3670 https://bugs.webkit.org/show_bug.cgi?id=48849
3671 <rdar://problem/8617676>
3673 It is perfectly valid for the page map to contain pages if the web process proxy
3674 goes away, this can happen if the process crashes for example.
3676 * UIProcess/WebProcessProxy.cpp:
3677 (WebKit::WebProcessProxy::~WebProcessProxy):
3678 Remove the assertion.
3680 2010-11-02 Christian Sejersen <christian.webkit@gmail.com>
3682 Reviewed by Andreas Kling.
3684 The previous patch only took into account arm targets. This one
3685 now checks whether the build is done inside Scratchbox.
3686 https://bugs.webkit.org/show_bug.cgi?id=47895