1 2010-10-07 Brady Eidson <beidson@apple.com>
3 Reviewed by Sam Weinig.
5 Part of https://bugs.webkit.org/show_bug.cgi?id=47354 - Add WebCore/WebKit1 style logging channel mechanism0 to WebKit2,
6 including the first channel to be used for SessionState work.
8 * Platform/Logging.cpp: Added.
9 (initializeLogChannelsIfNecessary):
10 * Platform/Logging.h: Added.
13 * WebKit2.xcodeproj/project.pbxproj:
16 2010-10-07 Sheriff Bot <webkit.review.bot@gmail.com>
18 Unreviewed, rolling out r69315.
19 http://trac.webkit.org/changeset/69315
20 https://bugs.webkit.org/show_bug.cgi?id=47363
22 Forgot to add the new files (Requested by kbalazs on #webkit).
26 2010-10-07 Luiz Agostini <luiz.agostini@openbossa.org>
28 Reviewed by Kenneth Rohde Christiansen.
30 Fixing viewport meta tag user-scalable handling
31 https://bugs.webkit.org/show_bug.cgi?id=47330
33 user-scalable attribute was not considered in viewport meta tag handling.
35 * UIProcess/API/qt/qwkpage.cpp:
36 (QWKPage::viewportConfigurationForSize):
38 2010-10-07 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>, Andras Becsi <abecsi@webkit.org>, Balazs Kelemen <kbalazs@webkit.org>
40 Reviewed by Kenneth Rohde Christiansen.
42 [Qt] Add WTR's InjectedBundle build files.
43 https://bugs.webkit.org/show_bug.cgi?id=47333
47 2010-10-07 Luiz Agostini <luiz.agostini@openbossa.org>
49 Reviewed by Kenneth Rohde Christiansen.
51 Some viewport meta tag api refactoring
52 https://bugs.webkit.org/show_bug.cgi?id=47334
54 WebCore::findConfigurationForViewportData renamed to computeViewportAttributes.
55 WebCore::ViewportAttributes::layoutViewport renamed to layoutSize.
57 * UIProcess/API/qt/qwkpage.cpp:
58 (QWKPage::viewportConfigurationForSize):
60 2010-10-06 Jessie Berlin <jberlin@apple.com>
62 Reviewed by John Sullivan.
64 Bundle should expose a reportException method.
65 https://bugs.webkit.org/show_bug.cgi?id=46769
67 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
68 (WKBundleReportException):
69 * WebProcess/InjectedBundle/API/c/WKBundle.h:
71 * WebProcess/InjectedBundle/InjectedBundle.cpp:
72 (WebKit::InjectedBundle::reportException):
73 Mimic the behavior of WebView::reportException.
74 * WebProcess/InjectedBundle/InjectedBundle.h:
76 2010-10-07 Luiz Agostini <luiz.agostini@openbossa.org>
78 Reviewed by Adam Roben.
80 [Qt] Webkit2 MacOS build fix
81 https://bugs.webkit.org/show_bug.cgi?id=47167
83 There were two problems when building Qt WebKit2 in Mac. The first was that
84 ld does not support flag -whole-archive and it needed to be replaced by flag -all_load.
85 The second problem was that __APPLE__ is been used to identify safari builds and, when
86 building Qt in MacOS, Qt was ending up using the wrong typedef. The solution was to use
87 a Qt specific WKNativeEvent.h that only has the proper Qt typedef instead of the original one.
89 * UIProcess/API/C/qt/WKNativeEvent.h: Added.
93 2010-10-07 Balazs Kelemen <kbalazs@webkit.org>
95 Reviewed by Kenneth Rohde Christiansen.
97 WebKitTestRunner should be portable
98 https://bugs.webkit.org/show_bug.cgi?id=45393
100 Introducing additional URL API.
101 * Shared/API/c/WKURL.cpp:
102 (WKURLCreateWithUTF8CString):
104 * Shared/API/c/WKURL.h:
106 2010-10-06 Balazs Kelemen <kbalazs@webkit.org>
108 Reviewed by Kenneth Rohde Christiansen.
110 [Qt] Add WebKitTestRunner's build files
111 https://bugs.webkit.org/show_bug.cgi?id=44155
113 * DerivedSources.pro: Changes according the new location
114 of generate-forwarding-headers.pl.
115 * UIProcess/API/C/WebKit2.h: Do not check the value of the
116 __APPLE__ define if it is not defined.
117 * WebKit2.pro: Changes according the new location
118 of generate-forwarding-headers.pl. Added missing files
119 to the build that provides API that is used by WTR.
120 * generate-forwarding-headers.pl: Moved to WebKitTools/Scripts
121 since from now this is not only used by WebKit2.
123 2010-10-06 Anders Carlsson <andersca@apple.com>
125 Reviewed by Sam Weinig.
127 Separate actually calling the member function from decoding/encoding arguments
128 and remove any ambiguities when calling the function.
130 * Platform/CoreIPC/Arguments.h:
131 * Platform/CoreIPC/HandleMessage.h:
132 (CoreIPC::callMemberFunction):
133 (CoreIPC::handleMessage):
135 2010-10-06 Anders Carlsson <andersca@apple.com>
137 Reviewed by Sam Weinig.
139 More Arguments.h cleanup.
141 * Platform/CoreIPC/Arguments.h:
142 * Platform/CoreIPC/HandleMessage.h:
143 Remove unnecessary typedefs, simplify.
145 * Scripts/webkit2/messages.py:
146 * UIProcess/WebContext.h:
149 2010-10-06 Anders Carlsson <andersca@apple.com>
151 Reviewed by Sam Weinig.
153 Start cleaning up Arguments.h
154 https://bugs.webkit.org/show_bug.cgi?id=47304
156 This is a first step towards simplifying all the handleMessage overloads we have.
158 * Platform/CoreIPC/Arguments.h:
159 (CoreIPC::Arguments1):
160 Make Arguments1 a struct and get rid of the FirstArgumentType typedef. Instead, add a
161 ValueType typedef which is defined to an Arguments1 type whose type parameter is not
164 * Platform/CoreIPC/HandleMessage.h:
165 (CoreIPC::handleMessage):
166 Update for the Arguments1 change. Rename "arguments" to "argumentDecoder" and "reply" to
169 2010-10-06 Andras Becsi <abecsi@webkit.org>
171 Reviewed by Kenneth Rohde Christiansen.
173 [Qt] Fix the build after API changes introduced in r69214.
175 * UIProcess/API/cpp/qt/WKStringQt.cpp:
176 (WKStringCreateWithQString):
177 * UIProcess/API/cpp/qt/WKURLQt.cpp:
178 (WKURLCreateWithQUrl):
180 2010-10-06 Sheriff Bot <webkit.review.bot@gmail.com>
182 Unreviewed, rolling out r69210.
183 http://trac.webkit.org/changeset/69210
184 https://bugs.webkit.org/show_bug.cgi?id=47297
186 This patch broke Windows (Requested by andersca on #webkit).
188 * DerivedSources.make:
189 * DerivedSources.pro:
190 * Platform/CoreIPC/Arguments.h:
191 * Platform/CoreIPC/HandleMessage.h:
192 (CoreIPC::handleMessage):
193 * Scripts/webkit2/messages.py:
194 * Scripts/webkit2/messages_unittest.py:
195 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Added.
196 * Shared/StringPairVector.h: Removed.
197 * UIProcess/API/mac/PageClientImpl.h:
198 * UIProcess/API/mac/PageClientImpl.mm:
199 (WebKit::PageClientImpl::registerEditCommand):
200 * UIProcess/API/qt/qwkpage.cpp:
201 (QWKPagePrivate::registerEditCommand):
202 * UIProcess/API/qt/qwkpage_p.h:
203 * UIProcess/PageClient.h:
204 * UIProcess/WebEditCommandProxy.cpp:
205 (WebKit::WebEditCommandProxy::unapply):
206 (WebKit::WebEditCommandProxy::reapply):
207 * UIProcess/WebFormClient.cpp:
208 (WebKit::WebFormClient::willSubmitForm):
209 * UIProcess/WebFormClient.h:
210 * UIProcess/WebPageProxy.cpp:
211 (WebKit::WebPageProxy::didReceiveMessage):
212 (WebKit::WebPageProxy::didReceiveSyncMessage):
213 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
214 (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
215 (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
216 (WebKit::WebPageProxy::didCommitLoadForFrame):
217 (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
218 (WebKit::WebPageProxy::didFinishLoadForFrame):
219 (WebKit::WebPageProxy::didFailLoadForFrame):
220 (WebKit::WebPageProxy::didReceiveTitleForFrame):
221 (WebKit::WebPageProxy::didFirstLayoutForFrame):
222 (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
223 (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
224 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
225 (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
226 (WebKit::WebPageProxy::decidePolicyForMIMEType):
227 (WebKit::WebPageProxy::willSubmitForm):
228 (WebKit::WebPageProxy::createNewPage):
229 (WebKit::WebPageProxy::runJavaScriptAlert):
230 (WebKit::WebPageProxy::runJavaScriptConfirm):
231 (WebKit::WebPageProxy::runJavaScriptPrompt):
232 (WebKit::WebPageProxy::mouseDidMoveOverElement):
233 (WebKit::WebPageProxy::contentsSizeChanged):
234 (WebKit::WebPageProxy::addItemToBackForwardList):
235 (WebKit::WebPageProxy::goToItemInBackForwardList):
236 (WebKit::WebPageProxy::registerEditCommandForUndo):
237 (WebKit::WebPageProxy::registerEditCommandForRedo):
238 (WebKit::WebPageProxy::didReceiveEvent):
239 (WebKit::WebPageProxy::didChangeAcceleratedCompositing):
240 * UIProcess/WebPageProxy.h:
241 * UIProcess/WebPageProxy.messages.in: Removed.
242 * UIProcess/win/WebView.cpp:
243 (WebKit::WebView::registerEditCommand):
244 * UIProcess/win/WebView.h:
246 * WebKit2.xcodeproj/project.pbxproj:
247 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
248 (WebKit::WebChromeClient::setWindowRect):
249 (WebKit::WebChromeClient::takeFocus):
250 (WebKit::WebChromeClient::createWindow):
251 (WebKit::WebChromeClient::runJavaScriptAlert):
252 (WebKit::WebChromeClient::runJavaScriptConfirm):
253 (WebKit::WebChromeClient::runJavaScriptPrompt):
254 (WebKit::WebChromeClient::setStatusbarText):
255 (WebKit::WebChromeClient::contentsSizeChanged):
256 (WebKit::WebChromeClient::mouseDidMoveOverElement):
257 (WebKit::WebChromeClient::setToolTip):
258 (WebKit::WebChromeClient::setCursor):
259 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
260 (WebKit::WebEditorClient::registerCommandForUndo):
261 (WebKit::WebEditorClient::clearUndoRedoOperations):
262 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
263 (WebKit::WebFrameLoaderClient::detachedFromParent2):
264 (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
265 (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
266 (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
267 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
268 (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
269 (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
270 (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
271 (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
272 (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
273 (WebKit::WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
274 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
275 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
276 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
277 (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
278 (WebKit::WebFrameLoaderClient::postProgressStartedNotification):
279 (WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
280 (WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
281 (WebKit::WebFrameLoaderClient::createFrame):
282 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
283 (WebKit::WebBackForwardListProxy::addItem):
284 (WebKit::WebBackForwardListProxy::goToItem):
285 (WebKit::WebBackForwardListProxy::backItem):
286 (WebKit::WebBackForwardListProxy::currentItem):
287 (WebKit::WebBackForwardListProxy::forwardItem):
288 (WebKit::WebBackForwardListProxy::itemAtIndex):
289 (WebKit::WebBackForwardListProxy::backListCount):
290 (WebKit::WebBackForwardListProxy::forwardListCount):
291 * WebProcess/WebPage/WebPage.cpp:
292 (WebKit::WebPage::WebPage):
293 (WebKit::WebPage::changeAcceleratedCompositingMode):
294 (WebKit::WebPage::enterAcceleratedCompositingMode):
295 (WebKit::WebPage::sendClose):
296 (WebKit::WebPage::mouseEvent):
297 (WebKit::WebPage::wheelEvent):
298 (WebKit::WebPage::keyEvent):
299 (WebKit::WebPage::validateMenuItem):
300 (WebKit::WebPage::touchEvent):
301 (WebKit::WebPage::show):
302 (WebKit::WebPage::runJavaScriptInMainFrame):
303 (WebKit::WebPage::getRenderTreeExternalRepresentation):
304 (WebKit::WebPage::getSourceForFrame):
305 * win/WebKit2.vcproj:
307 2010-10-06 Jessie Berlin <jberlin@apple.com>
309 Rubber-stamped by Dan Bernstein.
311 WKSerializedScriptValue.h needs to be copied over into the WEBKITOUTPUTDIR on Windows.
312 https://bugs.webkit.org/show_bug.cgi?id=47287
314 * win/WebKit2Generated.make:
315 Copy WKSerializedScriptValue.h into $(WEBKITOUTPUTDIR)\include\WebKit2.
317 2010-10-06 Anders Carlsson <andersca@apple.com>
319 Reviewed by Sam Weinig.
321 Rename toRef/toWK to toAPI/toImpl
322 https://bugs.webkit.org/show_bug.cgi?id=47281
324 * Shared/API/c/WKArray.cpp:
325 * Shared/API/c/WKCertificateInfo.cpp:
326 * Shared/API/c/WKData.cpp:
327 * Shared/API/c/WKDictionary.cpp:
328 * Shared/API/c/WKError.cpp:
329 * Shared/API/c/WKMutableArray.cpp:
330 * Shared/API/c/WKMutableDictionary.cpp:
331 * Shared/API/c/WKNumber.cpp:
332 * Shared/API/c/WKSerializedScriptValue.cpp:
333 * Shared/API/c/WKSharedAPICast.h:
334 * Shared/API/c/WKString.cpp:
335 * Shared/API/c/WKType.cpp:
336 * Shared/API/c/WKURL.cpp:
337 * Shared/API/c/WKURLRequest.cpp:
338 * Shared/API/c/WKURLResponse.cpp:
339 * Shared/API/c/cf/WKStringCF.cpp:
340 * Shared/API/c/cf/WKURLCF.cpp:
341 * Shared/API/c/cf/WKURLRequestCF.cpp:
342 * Shared/API/c/cf/WKURLResponseCF.cpp:
343 * Shared/API/c/mac/WKCertificateInfoMac.mm:
344 * Shared/API/c/mac/WKURLRequestNS.mm:
345 * Shared/API/c/mac/WKURLResponseNS.mm:
346 * Shared/API/c/win/WKCertificateInfoWin.cpp:
347 * UIProcess/API/C/WKAPICast.h:
348 * UIProcess/API/C/WKBackForwardList.cpp:
349 * UIProcess/API/C/WKBackForwardListItem.cpp:
350 * UIProcess/API/C/WKContext.cpp:
351 * UIProcess/API/C/WKFormSubmissionListener.cpp:
352 * UIProcess/API/C/WKFrame.cpp:
353 * UIProcess/API/C/WKFramePolicyListener.cpp:
354 * UIProcess/API/C/WKNavigationData.cpp:
355 * UIProcess/API/C/WKPage.cpp:
356 * UIProcess/API/C/WKPageNamespace.cpp:
357 * UIProcess/API/C/WKPreferences.cpp:
358 * UIProcess/API/C/WKPreferencesPrivate.cpp:
359 * UIProcess/API/C/win/WKContextWin.cpp:
360 * UIProcess/API/C/win/WKView.cpp:
361 * UIProcess/API/cpp/qt/WKStringQt.cpp:
362 * UIProcess/API/cpp/qt/WKURLQt.cpp:
363 * UIProcess/API/mac/PageClientImpl.mm:
364 * UIProcess/API/mac/WKView.mm:
365 * UIProcess/API/qt/ClientImpl.cpp:
366 * UIProcess/API/qt/qwkpage.cpp:
367 * UIProcess/GenericCallback.h:
368 * UIProcess/WebContextInjectedBundleClient.cpp:
369 * UIProcess/WebFormClient.cpp:
370 * UIProcess/WebHistoryClient.cpp:
371 * UIProcess/WebLoaderClient.cpp:
372 * UIProcess/WebPolicyClient.cpp:
373 * UIProcess/WebUIClient.cpp:
374 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
375 * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
376 * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
377 * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
378 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
379 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
380 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
381 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
382 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
383 * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
384 * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
385 * WebProcess/InjectedBundle/InjectedBundle.cpp:
386 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
387 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
388 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
389 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
390 * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
391 * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
392 * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
394 2010-10-06 Luiz Agostini <luiz.agostini@openbossa.org>
396 Reviewed by Kenneth Rohde Christiansen.
398 Renaming WebCore::ViewportConfiguration to WebCore::ViewportAttributes
399 https://bugs.webkit.org/show_bug.cgi?id=47268
401 Renaming WebCore::ViewportConfiguration to WebCore::ViewportAttributes
403 * UIProcess/API/qt/qwkpage.cpp:
404 (QWKPage::viewportConfigurationForSize):
406 2010-10-06 Sam Weinig <sam@webkit.org>
408 Reviewed by Adam Roben.
410 Generate the messages sent to the WebPageProxy
411 https://bugs.webkit.org/show_bug.cgi?id=47239
413 * Platform/CoreIPC/Arguments.h:
414 Add additional typedefs.
416 * Platform/CoreIPC/HandleMessage.h:
417 (CoreIPC::handleMessage):
418 Add more handleMessage implementations.
420 * Scripts/webkit2/messages.py:
421 * Scripts/webkit2/messages_unittest.py:
422 Add headers for reply argument types.
424 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Removed.
426 * Shared/StringPairVector.h: Added.
427 This file is a hack to work around a deficiency in the generator
428 which can't deal with class templates with more than one argument.
430 * UIProcess/API/mac/PageClientImpl.h:
431 * UIProcess/API/mac/PageClientImpl.mm:
432 * UIProcess/API/qt/qwkpage.cpp:
433 * UIProcess/API/qt/qwkpage_p.h:
434 * UIProcess/PageClient.h:
435 * UIProcess/WebEditCommandProxy.cpp:
436 * UIProcess/WebFormClient.cpp:
437 * UIProcess/WebFormClient.h:
438 * UIProcess/WebPageProxy.cpp:
439 * UIProcess/WebPageProxy.h:
440 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
441 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
442 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
443 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
444 * WebProcess/WebPage/WebPage.cpp:
445 Migrate to generated calls.
447 * UIProcess/WebPageProxy.messages.in: Added.
448 New messages definitions file.
450 * DerivedSources.make:
451 * DerivedSources.pro:
452 * win/WebKit2.vcproj:
454 * WebKit2.xcodeproj/project.pbxproj:
457 2010-10-05 Anders Carlsson <andersca@apple.com>
459 Reviewed by Sam Weinig.
461 Send null events and mouse events
462 https://bugs.webkit.org/show_bug.cgi?id=47223
464 * WebKit2.xcodeproj/project.pbxproj:
465 Add "-Wno-deprecated-declarations" to the COMPILER_FLAGS for NetscapePluginMac.mm since
466 we call Button() which is deprecated.
468 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
469 (WebKit::NetscapePlugin::NetscapePlugin):
470 Initialize the null event timer.
472 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
473 (WebKit::NetscapePlugin::platformPostInitialize):
474 Start the null event timer.
476 (WebKit::NetscapePlugin::platformDestroy):
477 Stop the null event timer.
479 (WebKit::NetscapePlugin::platformHandleMouseEvent):
480 Initialize the event record and call NPP_HandleEvent.
482 (WebKit::NetscapePlugin::nullEventTimerFired):
483 Send a null event with the current mouse position.
485 2010-10-05 Anders Carlsson <andersca@apple.com>
487 Reviewed by Sam Weinig.
489 Start sending Carbon plug-in events in th Carbon event model
490 https://bugs.webkit.org/show_bug.cgi?id=47209
491 <rdar://problem/8515677>
493 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
494 (WebKit::NetscapePlugin::NetscapePlugin):
495 Initialize the NP_CGContext struct.
497 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
498 (WebKit::NetscapePlugin::platformPostInitialize):
499 Create a fake Carbon window.
501 (WebKit::NetscapePlugin::platformDestroy):
502 Destroy the Carbon window.
504 (WebKit::modifiersForEvent):
505 Given a WebEvent, return the EventRecord modifiers.
507 (WebKit::NetscapePlugin::platformPaint):
508 (WebKit::NetscapePlugin::platformHandleMouseEvent):
509 (WebKit::NetscapePlugin::platformHandleWheelEvent):
510 (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
511 (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
512 (WebKit::NetscapePlugin::platformSetFocus):
513 (WebKit::NetscapePlugin::windowFocusChanged):
514 Create Carbon EventRecords and call NPP_HandleEvent.
516 2010-10-05 Sam Weinig <sam@webkit.org>
518 Reviewed by Mark Rowe.
520 Add MIMEType accessor to WKFrame
521 <rdar://problem/8347683>
522 https://bugs.webkit.org/show_bug.cgi?id=47138
524 Tests: WebKit2/FrameMIMETypePNG
525 WebKit2/FrameMIMETypeHTML
527 * UIProcess/API/C/WKFrame.cpp:
528 (WKFrameCopyMIMEType):
529 * UIProcess/API/C/WKFrame.h:
530 * UIProcess/WebFrameProxy.h:
531 (WebKit::WebFrameProxy::setMIMEType):
532 (WebKit::WebFrameProxy::mimeType):
533 * UIProcess/WebPageProxy.cpp:
534 (WebKit::WebPageProxy::didReceiveMessage):
535 (WebKit::WebPageProxy::didCommitLoadForFrame):
536 * UIProcess/WebPageProxy.h:
537 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
538 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
540 2010-10-05 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
542 Reviewed by Kenneth Rohde Christiansen.
544 Implement API call for setting custom user agent
545 (QWKPage::setCustomUserAgent)
547 [Qt] Ability to set custom userAgent for WebKit2/WebKit
548 https://bugs.webkit.org/show_bug.cgi?id=44265
550 * UIProcess/API/qt/qwkpage.cpp:
551 (QWKPage::setCustomUserAgent): Added.
552 * UIProcess/API/qt/qwkpage.h: Add setCustomUserAgent.
554 2010-10-05 Sheriff Bot <webkit.review.bot@gmail.com>
556 Unreviewed, rolling out r69103.
557 http://trac.webkit.org/changeset/69103
558 https://bugs.webkit.org/show_bug.cgi?id=47177
560 Breaking Windows and Mac build. (Requested by lca on #webkit).
562 * UIProcess/API/C/WKNativeEvent.h:
563 * UIProcess/API/qt/qwkpage.cpp:
564 * UIProcess/API/qt/qwkpage.h:
567 2010-10-05 Luiz Agostini <luiz.agostini@openbossa.org>
569 Reviewed by Antti Koivisto.
571 [Qt] Webkit2 MacOS build fix
572 https://bugs.webkit.org/show_bug.cgi?id=47167
574 Qt WebKit2 MacOS build fix.
576 * UIProcess/API/C/WKNativeEvent.h:
577 * UIProcess/API/qt/qwkpage.cpp:
578 * UIProcess/API/qt/qwkpage.h:
581 2010-10-04 Mark Rowe <mrowe@apple.com>
583 Reviewed by Sam Weinig.
585 Fix the build when sandboxing is enabled.
587 * UIProcess/WebContext.cpp:
588 (WebKit::WebContext::ensureWebProcess):
589 * UIProcess/WebProcessProxy.cpp:
591 2010-10-04 Andras Becsi <abecsi@webkit.org>
593 Reviewed Csaba Osztrogonác.
595 [Qt] Build fix after r69037.
596 Also remove dummy setUpAcceleratedCompositing() from the source file,
597 since it has been removed from the header.
599 * UIProcess/WebProcessProxy.cpp:
601 2010-10-04 Andras Becsi <abecsi@webkit.org>
603 Rubber-stamped by Csaba Osztrogonác.
605 [Qt] Fix the WebKit2 build after r69029.
607 * DerivedSources.pro:
609 2010-10-04 Sam Weinig <sam@webkit.org>
611 Reviewed by Anders Carlsson.
613 Change WebProcess initialization to be done with an
616 * Platform/CoreIPC/mac/MachPort.h:
617 * Shared/WebProcessCreationParameters.cpp: Added.
618 (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
619 (WebKit::WebProcessCreationParameters::encode):
620 (WebKit::WebProcessCreationParameters::decode):
621 * Shared/WebProcessCreationParameters.h: Added.
622 * UIProcess/WebContext.cpp:
623 (WebKit::WebContext::ensureWebProcess):
624 * UIProcess/WebContext.h:
625 * UIProcess/WebProcessProxy.cpp:
626 (WebKit::WebProcessProxy::WebProcessProxy):
627 * UIProcess/WebProcessProxy.h:
628 * UIProcess/mac/WebContextMac.mm:
629 (WebKit::WebContext::platformInitializeWebProcess):
630 * UIProcess/mac/WebProcessProxyMac.mm: Removed.
631 * UIProcess/qt/WebContextQt.cpp:
632 (WebKit::WebContext::applicationCacheDirectory):
633 (WebKit::WebContext::platformInitializeWebProcess):
634 * UIProcess/win/WebContextWin.cpp:
635 (WebKit::WebContext::platformInitializeWebProcess):
637 * WebKit2.xcodeproj/project.pbxproj:
638 * WebProcess/WebProcess.cpp:
639 (WebKit::WebProcess::initializeWebProcess):
640 * WebProcess/WebProcess.h:
641 * WebProcess/WebProcess.messages.in:
642 * win/WebKit2.vcproj:
644 2010-10-04 Brent Fulgham <bfulgham@webkit.org>
646 Unreviewed build fixes after r68260 and r68686.
648 * Platform/CoreIPC/DataReference.h: Add include directive for
649 <inttypes.h>, needed for WinCairo build.
650 * Shared/win/PlatformCertificateInfo.cpp:
651 (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
652 Conditionalize logic specific to WebKitSystemInterface and
653 add a stub implementation for WinCairo.
655 2010-10-04 Sam Weinig <sam@webkit.org>
657 Reviewed by Adam Roben.
659 Generate messages sent to the WebProcess class.
660 https://bugs.webkit.org/show_bug.cgi?id=47097
662 * DerivedSources.make:
663 Add new file to generate and new directory to search.
665 * Scripts/webkit2/messages.py:
666 (forward_declarations_and_headers): Special case class templates.
667 (headers_for_type): Special case Vector.
668 * Scripts/webkit2/messages_unittest.py:
669 Make this script work for passing a templated type.
671 * Shared/CoreIPCSupport/WebProcessMessageKinds.h: Removed.
673 * UIProcess/VisitedLinkProvider.cpp:
674 (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
675 * UIProcess/WebContext.cpp:
676 (WebKit::WebContext::initializeHistoryClient):
677 (WebKit::WebContext::ensureWebProcess):
678 (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
679 (WebKit::WebContext::setCacheModel):
680 * UIProcess/WebPageProxy.cpp:
681 (WebKit::WebPageProxy::initializeWebPage):
682 (WebKit::WebPageProxy::reinitializeWebPage):
683 * UIProcess/WebProcessProxy.cpp:
684 (WebKit::WebProcessProxy::WebProcessProxy): Always pass both
685 the bundle path and a key, even if the key is null, which it will be for
686 all non-mac builds for now.
687 * UIProcess/mac/WebProcessProxyMac.mm:
688 (WebKit::WebProcessProxy::setUpAcceleratedCompositing):
689 * UIProcess/win/WebContextWin.cpp:
690 (WebKit::WebContext::setShouldPaintNativeControls):
691 (WebKit::WebContext::platformSetUpWebProcess):
692 Use the new syntax for sending the messages.
694 * WebProcess/WebProcess.cpp:
695 (WebKit::WebProcess::setShouldTrackVisitedLinks):
696 (WebKit::WebProcess::setCacheModel):
697 (WebKit::WebProcess::setupAcceleratedCompositingPort):
698 (WebKit::WebProcess::setShouldPaintNativeControls):
699 (WebKit::WebProcess::didReceiveMessage):
700 * WebProcess/WebProcess.h:
701 Convert to using generated didReceiveWebProcessMessage.
703 * WebProcess/WebProcess.messages.in: Added.
706 * WebKit2.xcodeproj/project.pbxproj:
707 * win/WebKit2.vcproj:
710 2010-10-04 Sam Weinig <sam@webkit.org>
714 * WebProcess/mac/WebProcessMac.mm:
716 2010-10-04 Sam Weinig <sam@webkit.org>
718 Reviewed by Anders Carlsson.
720 Add ability to set the CacheModel in Webkit2
721 https://bugs.webkit.org/show_bug.cgi?id=47066
723 Add WKContext function to set the cache model for the context.
725 * Shared/CacheModel.h: Added.
726 * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
727 * UIProcess/API/C/WKAPICast.h:
728 (WebKit::toCacheModel):
730 * UIProcess/API/C/WKContext.cpp:
731 (WKContextSetCacheModel):
732 (WKContextGetCacheModel):
733 * UIProcess/API/C/WKContext.h:
734 * UIProcess/WebContext.cpp:
735 (WebKit::WebContext::WebContext):
736 (WebKit::WebContext::ensureWebProcess):
737 (WebKit::WebContext::setCacheModel):
738 * UIProcess/WebContext.h:
739 (WebKit::WebContext::cacheModel):
741 * WebKit2.xcodeproj/project.pbxproj:
742 * WebProcess/WebProcess.cpp:
743 (WebKit::WebProcess::WebProcess):
744 (WebKit::WebProcess::setCacheModel):
745 (WebKit::WebProcess::didReceiveMessage):
746 * WebProcess/WebProcess.h:
747 * WebProcess/mac/WebProcessMac.mm: Added.
748 (WebKit::memorySize):
749 (WebKit::volumeFreeSize):
750 (WebKit::WebProcess::platformSetCacheModel):
751 * WebProcess/qt/WebProcessQt.cpp: Added.
752 (WebKit::WebProcess::platformSetCacheModel):
753 * WebProcess/win/WebProcessWin.cpp: Added.
754 (WebKit::WebProcess::platformSetCacheModel):
755 * win/WebKit2.vcproj:
757 2010-10-03 Anders Carlsson <andersca@apple.com>
759 Reviewed by Sam Weinig.
761 Implement newly added Plugin/PluginController member functions for out of process plug-ins
762 https://bugs.webkit.org/show_bug.cgi?id=47065
763 <rdar://problem/8507194>
765 * Platform/CoreIPC/Arguments.h:
768 * Platform/CoreIPC/HandleMessage.h:
769 (CoreIPC::handleMessage):
770 Add new handleMessage overload.
772 * PluginProcess/PluginControllerProxy.cpp:
773 (WebKit::PluginControllerProxy::create):
774 Add an isPrivateBrowsingEnabled boolean.
776 (WebKit::PluginControllerProxy::PluginControllerProxy):
777 Add an isPrivateBrowsingEnabled boolean.
779 (WebKit::PluginControllerProxy::proxiesForURL):
780 (WebKit::PluginControllerProxy::cookiesForURL):
781 (WebKit::PluginControllerProxy::setCookiesForURL):
782 Send messages to the web process.
784 (WebKit::PluginControllerProxy::isPrivateBrowsingEnabled):
785 Return whether private browsing is enabled or not.
787 (WebKit::PluginControllerProxy::handleKeyboardEvent):
788 Call Plugin::handleKeyboardEvent.
790 (WebKit::PluginControllerProxy::privateBrowsingStateChanged):
791 Call Plugin::privateBrowsingStateChanged.
793 * PluginProcess/PluginControllerProxy.messages.in:
796 * PluginProcess/WebProcessConnection.cpp:
797 (WebKit::WebProcessConnection::createPlugin):
798 Pass the isPrivateBrowsingEnabled flag.
800 * PluginProcess/WebProcessConnection.h:
801 * PluginProcess/WebProcessConnection.messages.in:
802 Update CreatePlugin message parameters.
804 * WebProcess/Plugins/PluginProcessConnection.cpp:
805 (WebKit::PluginProcessConnection::didReceiveMessage):
806 (WebKit::PluginProcessConnection::didReceiveSyncMessage):
807 It's OK for a plug-in to not get a sync message.
809 * WebProcess/Plugins/PluginProcessConnection.h:
810 * WebProcess/Plugins/PluginProxy.cpp:
811 (WebKit::PluginProxy::handleKeyboardEvent):
812 (WebKit::PluginProxy::privateBrowsingStateChanged):
815 (WebKit::PluginProxy::proxiesForURL):
816 (WebKit::PluginProxy::cookiesForURL):
817 (WebKit::PluginProxy::setCookiesForURL):
818 Call the plug-in controller.
820 * WebProcess/Plugins/PluginProxy.messages.in:
823 2010-10-03 Anders Carlsson <andersca@apple.com>
825 Reviewed by Sam Weinig.
827 Send keyboard events to plug-ins
828 https://bugs.webkit.org/show_bug.cgi?id=47064
829 <rdar://problem/8507148>
831 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
832 (WebKit::NetscapePlugin::handleKeyboardEvent):
833 Call platformHandleKeyboardEvent.
835 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
836 (WebKit::modifierFlags):
837 Return the modifier flags given a WebKeyboardEvent.
839 (WebKit::initializeKeyboardEvent):
840 Initialize an NPCocoaEvent from a WebKeyboardEvent.
842 (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
843 Initialize the event and dispatch it using NPP_HandleEvent.
845 * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
846 (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
849 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
850 (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
853 * WebProcess/Plugins/Plugin.h:
854 Add handleKeyboardEvent.
856 * WebProcess/Plugins/PluginView.cpp:
857 (WebKit::PluginView::handleEvent):
858 Call Plugin::handleKeyboardEvent if we see a keydown or keyup event.
860 2010-10-01 Mark Rowe <mrowe@apple.com>
864 Clear the executable bit from a number of source files.
866 * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
868 2010-10-01 Anders Carlsson <andersca@apple.com>
870 Reviewed by Sam Weinig.
872 Plug-ins should have access to the private browsing state.
873 https://bugs.webkit.org/show_bug.cgi?id=47031
874 <rdar://problem/8505405>
876 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
877 (WebKit::NPN_GetValue):
878 Handle NPNVprivateModeBool.
880 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
881 (WebKit::NetscapePlugin::isPrivateBrowsingEnabled):
882 Call PluginController::isPrivateBrowsingEnabled.
884 (WebKit::NetscapePlugin::NPP_SetValue):
885 Add NPP_SetValue wrapper.
887 (WebKit::NetscapePlugin::privateBrowsingStateChanged):
888 Call NPP_SetValue with the updated state.
890 * WebProcess/Plugins/Plugin.h:
891 Add privateBrowsingStateChanged pure virtual member function.
893 * WebProcess/Plugins/PluginController.h:
894 Add isPrivateBrowsingEnabled pure virtual member function.
896 * WebProcess/Plugins/PluginView.cpp:
897 (WebKit::PluginView::privateBrowsingStateChanged):
898 Call Plugin::privateBrowsingStateChanged.
900 2010-10-01 Sam Weinig <sam@webkit.org>
902 Reviewed by Anders Carlsson.
904 Add SPI to convert a WKStringRef to a JSStringRef and vice-versa.
906 API Test: WebKit2/WKStringJSString
908 * Shared/API/c/WKString.cpp:
909 (WKStringCreateWithJSString):
910 (WKStringCopyJSString):
911 * Shared/API/c/WKStringPrivate.h: Added.
912 * Shared/WebString.h:
913 (WebKit::WebString::create):
914 (WebKit::WebString::createJSString):
916 * WebKit2.xcodeproj/project.pbxproj:
917 * win/WebKit2.vcproj:
918 * win/WebKit2Generated.make:
920 2010-10-01 Anders Carlsson <andersca@apple.com>
922 Reviewed by Sam Weinig.
924 Implement proxiesForURL, cookiesForURL and setCookiesForURL
925 https://bugs.webkit.org/show_bug.cgi?id=47029
927 * WebProcess/Plugins/PluginView.cpp:
928 (WebKit::PluginView::proxiesForURL):
929 (WebKit::PluginView::cookiesForURL):
930 (WebKit::PluginView::setCookiesForURL):
932 2010-10-01 Sam Weinig <sam@webkit.org>
934 Reviewed by Kenneth Rohde Christiansen.
936 Add additional WKString API
937 https://bugs.webkit.org/show_bug.cgi?id=46958
939 API Test: WebKit2/WKString
941 * Shared/API/c/WKString.cpp:
942 (WKStringCreateWithUTF8CString):
943 (WKStringGetMaximumUTF8CStringSize):
944 (WKStringGetUTF8CString):
946 (WKStringIsEqualToUTF8CString):
947 * Shared/API/c/WKString.h:
948 * Shared/WebString.h:
949 (WebKit::WebString::createFromUTF8String):
950 (WebKit::WebString::maximumUTF8CStringSize):
951 (WebKit::WebString::getUTF8CString):
952 (WebKit::WebString::equal):
953 (WebKit::WebString::equalToUTF8String):
955 2010-10-01 Anders Carlsson <andersca@apple.com>
957 Reviewed by Dan Bernstein.
959 Implement NPN_GetValueForURL/NPN_SetValueForURL and stub out PluginController functions
960 https://bugs.webkit.org/show_bug.cgi?id=46992
962 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
963 (WebKit::copyCString):
964 Helper function for allocating a string using NPN_MemAlloc.
966 (WebKit::NPN_GetValueForURL):
967 Ask the plug-in for either the proxy or the cookies given an URL.
969 (WebKit::NPN_SetValueForURL):
970 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
971 Tell the plug-in to set the cookies for the given URL.
973 (WebKit::NetscapePlugin::proxiesForURL):
974 (WebKit::NetscapePlugin::cookiesForURL):
975 (WebKit::NetscapePlugin::setCookiesForURL):
976 Call the corresponding PluginController functions.
978 * WebProcess/Plugins/PluginController.h:
979 Add new pure virtual member functions.
981 * WebProcess/Plugins/PluginView.cpp:
982 (WebKit::PluginView::proxiesForURL):
983 (WebKit::PluginView::cookiesForURL):
984 (WebKit::PluginView::setCookiesForURL):
985 Add stubbed out implementations of the new PluginController functions.
987 * WebProcess/Plugins/PluginView.h:
989 2010-10-01 Adam Roben <aroben@apple.com>
991 Implement NPN_GetValue(NPNVnetscapeWindow)
993 Fixes <http://webkit.org/b/46726> <rdar://problem/8486319>
994 Right-clicking on windowless Flash plugin in WebKit2 makes a context
995 menu appear in the bottom-right corner of the screen
997 Test: platform/win/plugins/get-value-netscape-window.html
999 Reviewed by Anders Carlsson.
1001 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1002 (WebKit::NPN_GetValue): Added case for NPNVnetscapeWindow that calls
1003 through to NetscapePlugin::containingWindow.
1005 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added containingWindow
1008 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1009 (WebKit::NetscapePlugin::containingWindow): Added. Calls through to
1010 the PluginController.
1011 (WebKit::NetscapePlugin::platformPostInitialize): Changed to use
1014 2010-09-30 Simon Fraser <simon.fraser@apple.com>
1016 Reviewed by Darin Adler.
1018 Background doesn't draw when entering accelerated compositing
1019 https://bugs.webkit.org/show_bug.cgi?id=45848
1021 LayerBackedDrawingArea::setSize() is normally called in response
1022 to a message from the UI process, so this can come some time after
1023 LayerBackedDrawingArea creation. Depending on the timing, we could
1024 end up being at size 0x0 for the first invalidate and paint, resulting
1027 The fix is to size the backing layer on creation, using the WebView's size.
1029 Also changed various calls to syncCompositingStateForThisLayerOnly()
1030 to do lazy updates via scheduleCompositingLayerSync().
1032 Also add the fix for https://bugs.webkit.org/show_bug.cgi?id=46226 (r68028)
1033 to the WebKit2 code, in scheduleUpdateLayoutRunLoopObserver().
1035 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1036 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
1037 (WebKit::LayerBackedDrawingArea::setNeedsDisplay):
1038 (WebKit::LayerBackedDrawingArea::setSize):
1039 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1040 (WebKit::LayerBackedDrawingArea::platformInit):
1041 (WebKit::LayerBackedDrawingArea::attachCompositingContext):
1042 (WebKit::LayerBackedDrawingArea::detachCompositingContext):
1043 (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
1044 (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
1045 (WebKit::LayerBackedDrawingArea::scheduleUpdateLayoutRunLoopObserver):
1047 2010-09-29 Jon Honeycutt <jhoneycutt@apple.com>
1049 WebKit2 on Windows should use Windows fonts for the various standard
1051 https://bugs.webkit.org/show_bug.cgi?id=43499
1052 <rdar://problem/8272758>
1054 Reviewed by Adam Roben.
1056 * Shared/WebPreferencesStore.cpp:
1057 (WebKit::WebPreferencesStore::WebPreferencesStore):
1058 Use Windows fonts on Windows.
1060 2010-09-30 Brady Eidson <beidson@apple.com>
1062 Reviewed by Sam Weinig.
1064 https://bugs.webkit.org/show_bug.cgi?id=46774 - Add WKStringIsEqual API
1066 * Shared/API/c/WKString.cpp:
1068 * Shared/API/c/WKString.h:
1070 2010-09-30 Anders Carlsson <andersca@apple.com>
1072 Reviewed by Adam Roben.
1074 Forward declare structs with 'struct' in the message headers
1075 https://bugs.webkit.org/show_bug.cgi?id=46925
1076 <rdar://problem/8497940>
1078 * Scripts/webkit2/messages.py:
1079 (struct_or_class): New function which given a type and a namespace returns the correct
1080 forward declaration syntax (struct or class).
1082 * Scripts/webkit2/messages_unittest.py:
1083 Update expected results.
1085 2010-09-30 Kenneth Rohde Christiansen <kenneth@webkit.org>
1087 Reviewed by Antti Koivisto.
1089 Original patch by Zalan Bujtas.
1091 The m_readBuffer might be smaller than the incoming message size and
1092 thus result in memory corruption. Do a similar fix as the win port,
1093 resizing the m_readBuffer to have room for the message.
1095 * Platform/CoreIPC/qt/ConnectionQt.cpp:
1096 (CoreIPC::Connection::readyReadHandler):
1098 2010-09-29 Anders Carlsson <andersca@apple.com>
1100 Reviewed by Simon Fraser.
1102 Calling Connection::send/sendSync from Connection::Client::didClose should always fail
1103 https://bugs.webkit.org/show_bug.cgi?id=46859
1104 <rdar://problem/8212583>
1106 * Platform/CoreIPC/Connection.cpp:
1107 (CoreIPC::Connection::dispatchConnectionDidClose):
1109 2010-09-29 Simon Fraser <simon.fraser@apple.com>
1111 Reviewed by Anders Carlsson.
1113 Assertion then crash closing WebKit2 window with accelerated compositing in
1114 https://bugs.webkit.org/show_bug.cgi?id=46857
1116 Fix two issues when closing a WebKit2 window using accelerated
1119 The first is that the response to the sync DidChangeAcceleratedCompositing message
1120 sent by changeAcceleratedCompositingMode() may be empty, because the corresponding
1121 page may have been destroyed already in the UI process. In that case newDrawingAreaInfo
1122 is not filled in, so we get a DrawingArea::Type of None. Don't attempt to make a new
1123 drawing area in that case.
1125 We then have to null-check the drawing area in WebPage::didReceiveMessage(),
1126 in the case where the UI process is calling back with a SuspendPainting message,
1127 before our page has gone away.
1129 * WebProcess/WebPage/WebPage.cpp:
1130 (WebKit::WebPage::changeAcceleratedCompositingMode):
1131 (WebKit::WebPage::didReceiveMessage):
1133 2010-09-29 Anders Carlsson <andersca@apple.com>
1135 Reviewed by Sam Weinig.
1137 Implement more of PluginProxy and PLuginControllerProxy.
1139 * Platform/CoreIPC/ArgumentDecoder.cpp:
1140 (CoreIPC::ArgumentDecoder::decodeBytes):
1141 * Platform/CoreIPC/ArgumentDecoder.h:
1142 Add new overload that takes a DataReference. Wrap the debug function in #ifndef NDEBUG.
1144 * Platform/CoreIPC/ArgumentEncoder.cpp:
1145 * Platform/CoreIPC/ArgumentEncoder.h:
1146 Wrap the debug function in #ifndef NDEBUG.
1148 * Platform/CoreIPC/Arguments.h:
1151 * Platform/CoreIPC/DataReference.cpp:
1152 * Platform/CoreIPC/DataReference.h:
1153 Add a DataReference class.
1155 * Platform/CoreIPC/HandleMessage.h:
1156 (CoreIPC::handleMessage):
1159 * PluginProcess/PluginControllerProxy.cpp:
1160 (WebKit::PluginControllerProxy::didEvaluateJavaScript):
1161 (WebKit::PluginControllerProxy::streamDidReceiveResponse):
1162 (WebKit::PluginControllerProxy::streamDidReceiveData):
1163 (WebKit::PluginControllerProxy::streamDidFinishLoading):
1164 (WebKit::PluginControllerProxy::streamDidFail):
1165 call Plugin member functions.
1167 * PluginProcess/PluginControllerProxy.messages.in:
1171 * WebKit2.xcodeproj/project.pbxproj:
1172 * win/WebKit2.vcproj:
1173 Add DataReference.cpp and DataReference.h
1175 * WebProcess/Plugins/PluginProxy.cpp:
1176 (WebKit::PluginProxy::didEvaluateJavaScript):
1177 (WebKit::PluginProxy::streamDidReceiveResponse):
1178 (WebKit::PluginProxy::streamDidReceiveData):
1179 (WebKit::PluginProxy::streamDidFinishLoading):
1180 (WebKit::PluginProxy::streamDidFail):
1183 2010-09-29 Anders Carlsson <andersca@apple.com>
1185 Update expected results.
1187 * Scripts/webkit2/messages_unittest.py:
1189 2010-09-29 Anders Carlsson <andersca@apple.com>
1191 Reviewed by Sam Weinig.
1194 https://bugs.webkit.org/show_bug.cgi?id=46826
1196 * Platform/CoreIPC/ArgumentCoders.h:
1197 Move String argument coder here from WebCoreArgumentCoders.h. Add
1198 argument coder for AtomicString.
1200 * Platform/CoreIPC/Arguments.h:
1201 Add typedefs for Arguments7.
1203 * Platform/CoreIPC/HandleMessage.h:
1204 (CoreIPC::handleMessage):
1205 Add handleMessage overload that takes 7 parameters.
1207 * PluginProcess/PluginControllerProxy.cpp:
1208 (WebKit::PluginControllerProxy::loadURL):
1209 Send the LoadURL message.
1211 * Scripts/webkit2/messages.py:
1212 (parse_parameter_string): Use rsplit in case the type name contains spaces.
1213 (argument_coder_headers_for_type): Special case Vector.
1215 * Scripts/webkit2/messages_unittest.py:
1218 * Shared/WebCoreArgumentCoders.h:
1219 Add argument coder for HTTPHeaderMap.
1221 * WebProcess/Plugins/PluginProxy.cpp:
1222 (WebKit::PluginProxy::loadURL):
1223 Ask the plug-in controller to load the URL.
1225 * WebProcess/Plugins/PluginProxy.messages.in:
1226 Add LoadURL message.
1228 2010-09-29 Anders Carlsson <andersca@apple.com>
1230 Reviewed by Sam Weinig.
1232 Handle getting the user agent in the plug-in process
1233 https://bugs.webkit.org/show_bug.cgi?id=46819
1235 * Platform/CoreIPC/HandleMessage.h:
1236 (CoreIPC::handleMessage):
1237 Add new handleMessage overload.
1239 * PluginProcess/PluginControllerProxy.cpp:
1240 (WebKit::PluginControllerProxy::create):
1241 (WebKit::PluginControllerProxy::PluginControllerProxy):
1242 Pass the user agent to the plug-in controller proxy.
1244 (WebKit::PluginControllerProxy::userAgent):
1245 Return the user agent.
1247 * PluginProcess/WebProcessConnection.cpp:
1248 (WebKit::WebProcessConnection::createPlugin):
1249 Pass the user agent when creating the plug-in controller proxy.
1251 * PluginProcess/WebProcessConnection.messages.in:
1254 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1255 (WebKit::NetscapePlugin::userAgent):
1256 * WebProcess/Plugins/PluginController.h:
1257 Remove the URL parameter to userAgent.
1259 * WebProcess/Plugins/PluginProxy.cpp:
1260 (WebKit::PluginProxy::initialize):
1261 Pass the user agent to WebProcessConnection::CreatePlugin.
1263 * WebProcess/Plugins/PluginView.cpp:
1264 (WebKit::PluginView::userAgent):
1265 Remove url parameter.
1267 2010-09-29 Anders Carlsson <andersca@apple.com>
1269 Reviewed by Sam Weinig.
1271 Implement more PluginProxy member functions
1272 https://bugs.webkit.org/show_bug.cgi?id=46815
1274 * Platform/CoreIPC/HandleMessage.h:
1275 (CoreIPC::handleMessage):
1276 * PluginProcess/PluginControllerProxy.cpp:
1277 (WebKit::PluginControllerProxy::handleMouseEvent):
1278 (WebKit::PluginControllerProxy::handleWheelEvent):
1279 (WebKit::PluginControllerProxy::handleMouseEnterEvent):
1280 (WebKit::PluginControllerProxy::handleMouseLeaveEvent):
1281 (WebKit::PluginControllerProxy::setFocus):
1282 (WebKit::PluginControllerProxy::windowFocusChanged):
1283 (WebKit::PluginControllerProxy::windowFrameChanged):
1284 (WebKit::PluginControllerProxy::windowVisibilityChanged):
1285 Call the appropriate Plugin member functions.
1287 * PluginProcess/PluginControllerProxy.messages.in:
1290 * PluginProcess/WebProcessConnection.cpp:
1291 (WebKit::WebProcessConnection::didReceiveMessage):
1292 It's OK to get a message for a plug-in controller proxy that has gone away.
1294 (WebKit::WebProcessConnection::didReceiveSyncMessage):
1295 Forward the message to the PluginControllerProxy handler.
1297 * WebProcess/Plugins/PluginProxy.cpp:
1298 (WebKit::PluginProxy::handleMouseEvent):
1299 (WebKit::PluginProxy::handleWheelEvent):
1300 (WebKit::PluginProxy::handleMouseEnterEvent):
1301 (WebKit::PluginProxy::handleMouseLeaveEvent):
1302 (WebKit::PluginProxy::setFocus):
1303 (WebKit::PluginProxy::windowFocusChanged):
1304 (WebKit::PluginProxy::windowFrameChanged):
1305 (WebKit::PluginProxy::windowVisibilityChanged):
1306 Send messages to the plug-in process.
1308 (WebKit::PluginProxy::controller):
1309 Return the plug-in controller.
1311 2010-09-29 Adam Roben <aroben@apple.com>
1313 Look for WebKit.dll (not WebKit_debug.dll) when launching the web
1314 process in Debug builds
1316 Fixes <http://webkit.org/b/46809> <rdar://problem/8491809> REGRESSION
1317 (r67979): All tests crashing on Windows WebKit2 test bot
1319 Reviewed by Sam Weinig.
1321 * UIProcess/Launcher/win/ProcessLauncherWin.cpp: WebKit_debug.dll is
1322 only used in Debug_All builds (but WebKit2WebProcess_debug.exe is used
1323 in all non-Debug_Internal debug-style builds).
1325 2010-09-28 Anders Carlsson <andersca@apple.com>
1327 Reviewed by Sam Weinig.
1329 Paint the plug-in backing store into the WebProcess backing store
1330 https://bugs.webkit.org/show_bug.cgi?id=46768
1332 * DerivedSources.make:
1335 * Platform/CoreIPC/MessageID.h:
1336 Add PluginProxy message class.
1338 * PluginProcess/PluginControllerProxy.cpp:
1339 (WebKit::PluginControllerProxy::paint):
1340 Let the web process know that we've painted.
1342 * WebKit2.xcodeproj/project.pbxproj:
1345 * WebProcess/Plugins/PluginProcessConnection.cpp:
1346 (WebKit::PluginProcessConnection::didReceiveMessage):
1347 Pass the message on to a plug-in proxy.
1349 * WebProcess/Plugins/PluginProxy.cpp:
1350 (WebKit::PluginProxy::paint):
1351 Paint our backing store into the graphics context.
1353 (WebKit::PluginProxy::controller):
1354 Add notImplemented().
1356 (WebKit::PluginProxy::update):
1357 Blit the plug-in backing store into the local backing store and tell the plug-in
1358 controller that we want to repaint.
1360 * WebProcess/Plugins/PluginProxy.messages.in: Added.
1362 2010-09-28 Jenn Braithwaite <jennb@chromium.org>
1364 Reviewed by Dmitry Titov.
1366 Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument.
1367 https://bugs.webkit.org/show_bug.cgi?id=46663
1369 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1370 (WebKit::WebFrameLoaderClient::didTransferChildFrameToNewDocument):
1371 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1373 2010-09-28 Anders Carlsson <andersca@apple.com>
1375 Reviewed by Sam Weinig.
1377 Begin hooking up painting in the plug-in process
1378 https://bugs.webkit.org/show_bug.cgi?id=46766
1380 * DerivedSources.make:
1381 Add PluginControllerProxy.
1383 * Platform/CoreIPC/MessageID.h:
1384 Add a MessageClassPluginControllerProxy message class.
1386 * PluginProcess/PluginControllerProxy.cpp:
1387 (WebKit::PluginControllerProxy::PluginControllerProxy):
1388 Initialize the paint timer.
1390 (WebKit::PluginControllerProxy::paint):
1391 Create a graphics context referencing our backing store and paint into it.
1393 (WebKit::PluginControllerProxy::invalidate):
1394 Update the dirty rect and start the paint timer if necessary.
1396 (WebKit::PluginControllerProxy::geometryDidChange):
1397 If we're passed a new backing store handle, reinitialize the backing store.
1399 * PluginProcess/PluginControllerProxy.messages.in: Added.
1400 * PluginProcess/WebProcessConnection.cpp:
1401 (WebKit::WebProcessConnection::didReceiveMessage):
1402 If the message has a destination ID, forward it to the plug-in controller proxy.
1404 * Scripts/webkit2/messages.py:
1405 Always include WebCoreArgumentCoders.h if the type is in the WebCore namespace.
1407 * WebKit2.xcodeproj/project.pbxproj:
1410 * WebProcess/Plugins/PluginProxy.cpp:
1411 (WebKit::PluginProxy::geometryDidChange):
1412 Update the size of the backing store. Create a new plug-in backing store if needed and send
1413 it over to the plug-in process.
1415 2010-09-28 Anders Carlsson <andersca@apple.com>
1417 Reviewed by Sam Weinig.
1419 ASSERT when launching the plugin process
1420 https://bugs.webkit.org/show_bug.cgi?id=46754
1421 <rdar://problem/8484570>
1423 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1424 (WebKit::ProcessLauncher::launchProcess):
1425 Don't assert if we fail to launch the process. Instead, set the connection identifier
1426 and process ID to null and deallocate the port we created.
1428 * UIProcess/Plugins/PluginProcessProxy.cpp:
1429 (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
1430 Move all code from didClose here.
1432 (WebKit::PluginProcessProxy::didClose):
1433 Call pluginProcessCrashedOrFailedToLaunch.
1435 (WebKit::PluginProcessProxy::didFinishLaunching):
1436 If we failed to launch, call pluginProcessCrashedOrFailedToLaunch.
1438 2010-09-28 Anders Carlsson <andersca@apple.com>
1440 Reviewed by Sam Weinig.
1442 Differentiate waitForSyncReply from waitForReply
1443 https://bugs.webkit.org/show_bug.cgi?id=46752
1445 Since waitForSyncReply is going to need to dispatch incoming sync messages while
1446 waiting for the correct reply, we need to add a new waitForSyncReply function that
1449 * Platform/CoreIPC/Connection.cpp:
1450 (CoreIPC::Connection::sendSyncMessage):
1451 Push the pending sync reply information on the m_pendingSyncReplies stack,
1452 send the message, wait for a reply and pop the information off the stack.
1454 (CoreIPC::Connection::waitForSyncReply):
1455 Block while waiting for a reply to the sync message with the given ID.
1457 (CoreIPC::Connection::processIncomingMessage):
1458 If the incoming message is a sync reply, set the didReceiveReply flag and the replyDecoder
1459 members in the pending sync reply and signal the client thread to wakeup.
1461 * Platform/CoreIPC/Connection.h:
1462 Add a stack of PendingSyncReply structs.
1464 2010-09-28 Sam Weinig <sam@webkit.org>
1466 Reviewed by Darin Adler and Dave Hyatt.
1468 Vertical scroll bar on apple.com is too short with WebKit2
1469 <rdar://problem/8379230>
1470 https://bugs.webkit.org/show_bug.cgi?id=46739
1472 This gets us most of the way to having correct scroll corner behavior. We should
1473 follow this up by moving to painting the window re-sizer in WebCore.
1475 * UIProcess/API/mac/WKView.mm:
1476 (-[WKView _ownsWindowGrowBox]):
1477 (-[WKView _updateGrowBoxForWindowFrameChange]): Calculate whether we should
1478 be taking the scroll corner into account when laying out scrollbars.
1479 * UIProcess/WebPageProxy.cpp:
1480 (WebKit::WebPageProxy::setWindowResizerSize):
1481 * UIProcess/WebPageProxy.h:
1482 * WebProcess/WebPage/WebPage.cpp:
1483 (WebKit::WebPage::setWindowResizerSize):
1484 (WebKit::WebPage::windowResizerRect): This now returns IntRect() for
1485 non-mac platforms (or any platform that never sends a setWindowResizerSize
1487 * WebProcess/WebPage/WebPage.h:
1488 * WebProcess/WebPage/WebPage.messages.in:
1490 2010-09-28 Adam Roben <aroben@apple.com>
1492 Tell the UI client when a key event is not handled
1494 When the web process receives an event, it sends a
1495 WebPageProxyMessage::DidReceiveEvent message back to the UI process.
1496 That message is now sent after handling the event, and includes a
1497 boolean signifying whether or not the event was actually handled.
1499 Every time WebPageProxy receives a key event, it adds it to a queue.
1500 When it receives a WebPageProxyMessage::DidReceiveEvent for a key
1501 event, the event is removed from the queue. If the event was not
1502 handled, we tell the UI client.
1504 Fixes <http://webkit.org/b/46660> <rdar://problem/8483465> Need API to
1505 tell a WebKit2 client application that a key event was not handled
1507 Reviewed by Kenneth Rohde Christiansen and Sam Weinig.
1509 * Shared/NativeWebKeyboardEvent.h: Added. This class wraps a
1510 WebKeyboardEvent and the native event that was used to construct it.
1511 (WebKit::NativeWebKeyboardEvent::nativeEvent): Simple getter.
1513 * Shared/WebEvent.h: Made isKeyboardEventType public for
1514 WebPageProxy's benefit.
1516 * Shared/mac/NativeWebKeyboardEventMac.mm: Added.
1517 (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1518 * Shared/qt/NativeWebKeyboardEventQt.cpp: Added.
1519 (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1520 * Shared/win/NativeWebKeyboardEventWin.cpp: Added.
1521 (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1522 The constructor creates a WebKeyboardEvent and stores the native
1525 * UIProcess/API/C/WKNativeEvent.h: Added.
1527 * UIProcess/API/C/WKPage.h: Added WKPageDidNotHandleKeyEventCallback
1528 and WKPageUIClient::didNotHandleKeyEvent.
1530 * UIProcess/API/mac/WKView.mm:
1532 (-[WKView keyDown:]):
1533 * UIProcess/win/WebView.cpp:
1534 (WebKit::WebView::onKeyEvent):
1535 * UIProcess/API/qt/qwkpage.cpp:
1536 (QWKPagePrivate::keyPressEvent):
1537 (QWKPagePrivate::keyReleaseEvent):
1538 Changed to use NativeWebKeyboardEvent.
1540 (QWKPage::QWKPage): Updated for addition of didNotHandleKeyEvent.
1542 * UIProcess/WebPageProxy.cpp:
1543 (WebKit::WebPageProxy::handleKeyboardEvent): Changed to take a
1544 NativeWebKeyboardEvent and to add it to m_keyEventQueue.
1545 (WebKit::WebPageProxy::didReceiveMessage): Changed to expect a boolean
1546 parameter in WebPageProxyMessage::DidReceiveEvent.
1547 (WebKit::WebPageProxy::didReceiveEvent): Added a boolean "handled"
1548 parameter. If the event was a keyboard event, we remove it from
1549 m_keyEventQueue, and if it wasn't handled by WebCore, we tell the UI
1552 * UIProcess/WebPageProxy.h: Added m_keyEventQueue.
1554 * UIProcess/WebUIClient.cpp:
1555 (WebKit::WebUIClient::didNotHandleKeyEvent):
1556 * UIProcess/WebUIClient.h:
1557 Added. Just calls through to the WKPageUIClient.
1559 * WebProcess/WebPage/WebPage.cpp:
1560 (WebKit::handleMouseEvent):
1561 (WebKit::WebPage::mouseEvent):
1562 (WebKit::handleWheelEvent):
1563 (WebKit::WebPage::wheelEvent):
1564 (WebKit::handleKeyEvent):
1565 (WebKit::WebPage::keyEvent):
1566 (WebKit::handleTouchEvent):
1567 (WebKit::WebPage::touchEvent):
1568 Moved code from the *Event functions into new helper handle*Event
1569 functions, and changed to pass a boolean to
1570 WebPageProxyMessage::DidReceiveEvent signaling whether the event was
1574 * WebKit2.xcodeproj/project.pbxproj:
1575 * win/WebKit2.vcproj:
1576 * win/WebKit2Generated.make:
1577 Added WKNativeEvent.h and NativeWebKeyboardEvent.
1579 2010-09-28 Anders Carlsson <andersca@apple.com>
1581 Reviewed by Adam Roben.
1583 Implement PluginProxy::destroy
1584 https://bugs.webkit.org/show_bug.cgi?id=46737
1586 * Platform/CoreIPC/HandleMessage.h:
1587 (CoreIPC::handleMessage):
1588 Add overload for a sync message with one in parameter and no out parameters.
1590 * PluginProcess/WebProcessConnection.cpp:
1591 (WebKit::WebProcessConnection::destroyPluginControllerProxy):
1592 Rename this to avoid conflicts with the destroyPlugin message handler.
1594 (WebKit::WebProcessConnection::destroyPlugin):
1595 Call destroyPluginControllerProxy.
1597 * PluginProcess/WebProcessConnection.messages.in:
1598 Add DestroyPlugin message.
1600 * WebProcess/Plugins/PluginProcessConnection.cpp:
1601 (WebKit::PluginProcessConnection::didClose):
1603 * WebProcess/Plugins/PluginProxy.cpp:
1604 (WebKit::PluginProxy::PluginProxy):
1605 (WebKit::PluginProxy::~PluginProxy):
1606 Don't add and/the plug-in proxy from the map in the constructor/destructor. Instead,
1607 do it in initialize/destroy, since otherwise we could be calling pluginProcessCrashed on a
1608 PluginController that had already been freed.
1610 (WebKit::PluginProxy::initialize):
1611 (WebKit::PluginProxy::destroy):
1612 send the DestroyPlugin message.
1614 2010-09-28 Anders Carlsson <andersca@apple.com>
1616 Reviewed by Adam Roben.
1618 Improve plug-in process lifecycle handling
1619 https://bugs.webkit.org/show_bug.cgi?id=46734
1621 * PluginProcess/WebProcessConnection.cpp:
1622 (WebKit::WebProcessConnection::destroyPlugin):
1623 Destroy and delete the plug-in.
1625 (WebKit::WebProcessConnection::didClose):
1626 Our web process crashed, go through and delete all plug-in instances.
1628 * UIProcess/Plugins/PluginProcessProxy.cpp:
1629 (WebKit::PluginProcessProxy::didClose):
1630 The plug-in process crashed. Go through all pending replies and send them so the
1631 web processes won't be blocked waiting for a reply.
1633 (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
1634 We need to remove the pending reply connection once we've sent the reply.
1636 * WebProcess/Plugins/PluginProcessConnection.cpp:
1637 (WebKit::PluginProcessConnection::didClose):
1638 The plug-in process crashed. Iterate over all proxies and let them know that the plug-in
1639 process has crashed.
1641 * WebProcess/Plugins/PluginProxy.cpp:
1642 (WebKit::PluginProxy::pluginProcessCrashed):
1643 Tell our controller that the plug-in process crashed.
1645 (WebKit::PluginProxy::destroy):
1646 Null out the controller.
1648 2010-09-28 Anders Carlsson <andersca@apple.com>
1650 Reviewed by Adam Roben.
1652 Implement PluginControllerProxy::initialize and have it create a plug-in
1653 https://bugs.webkit.org/show_bug.cgi?id=46731
1655 * PluginProcess/PluginControllerProxy.cpp:
1656 (WebKit::PluginControllerProxy::initialize):
1657 Create the plug-in and try to initialize it.
1659 (WebKit::PluginControllerProxy::destroy):
1660 Destroy the plug-in.
1662 * PluginProcess/WebProcessConnection.cpp:
1663 (WebKit::WebProcessConnection::addPluginControllerProxy):
1664 Add the given plug-in controller proxy to the map and assume ownership of it.
1666 (WebKit::WebProcessConnection::removePluginControllerProxy):
1667 Remove the given plug-in controller proxy from the map and delete it.
1669 (WebKit::WebProcessConnection::createPlugin):
1670 Create a plug-in controller proxy and try to initialize it.
1672 2010-09-28 Anders Carlsson <andersca@apple.com>
1674 Reviewed by Adam Roben.
1676 Add PluginControllerProxy class
1677 https://bugs.webkit.org/show_bug.cgi?id=46728
1679 * PluginProcess/PluginControllerProxy.cpp: Added.
1680 * PluginProcess/PluginControllerProxy.h: Added.
1681 Add stubbed out PluginControllerProxy class.
1683 * PluginProcess/WebProcessConnection.cpp:
1684 (WebKit::WebProcessConnection::~WebProcessConnection):
1685 Assert that we don't have any live plug-in controller proxies.
1687 (WebKit::WebProcessConnection::addPluginControllerProxy):
1688 Add the plug-in controller proxy to the map.
1690 (WebKit::WebProcessConnection::removePluginControllerProxy):
1691 Remove the plug-in controller proxy from the map. If the last plug-in controller
1692 proxy went away, invalidate the connection.
1694 * WebKit2.xcodeproj/project.pbxproj:
1697 2010-09-28 Adam Roben <aroben@apple.com>
1699 Don't call NPP_SetWindow until the plugin's HWND has been
1702 Test: platform/win/plugins/window-geometry-initialized-before-set-window.html
1704 Reviewed by Anders Carlsson.
1706 Fixes <http://webkit.org/b/46716> <rdar://problem/8482014> Full-page
1707 Adobe Reader does not paint until window is resized
1709 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1710 (WebKit::NetscapePlugin::geometryDidChange): Call NPP_SetWindow after
1711 updating the platform (HWND) geometry.
1713 2010-09-28 Anders Carlsson <andersca@apple.com>
1715 Out of process plug-ins shouldn't be turned on just yet...
1719 2010-09-28 Andras Becsi <abecsi@webkit.org>
1721 Reviewed by Kenneth Rohde Christiansen.
1723 [Qt] ProcessLauncherHelper should not leave stray socket files in /tmp.
1724 https://bugs.webkit.org/show_bug.cgi?id=46722
1726 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1727 (WebKit::ProcessLauncherHelper::~ProcessLauncherHelper): close the socket.
1728 (WebKit::ProcessLauncherHelper::ProcessLauncherHelper): delete the helper on exit.
1730 2010-09-28 Benjamin Poulain <benjamin.poulain@nokia.com>
1732 Reviewed by Andreas Kling.
1734 [Qt] Remove support for Qt 4.5
1735 https://bugs.webkit.org/show_bug.cgi?id=46718
1737 Remove the code for versions of Qt prior to 4.6.
1739 * UIProcess/API/qt/qgraphicswkview.cpp:
1740 (QGraphicsWKView::event):
1741 * UIProcess/API/qt/qwkpage.cpp:
1742 * UIProcess/API/qt/qwkpage_p.h:
1744 2010-09-28 Andras Becsi <abecsi@webkit.org>
1746 Reviewed by Csaba Osztrogonác.
1748 [Qt] Fix generation of WebPageMessages.h and WebPageMessageReceiver.cpp
1749 to avoid rebuilding them every time.
1751 * DerivedSources.pro: add target to extra compilers.
1753 2010-09-27 Brady Eidson <beidson@apple.com>
1755 Reviewed by Sam Weinig.
1757 https://bugs.webkit.org/show_bug.cgi?id=46688 - Add an API to get the WKBackForwardItem at an arbitrary index.
1759 * UIProcess/API/C/WKBackForwardList.cpp:
1760 (WKBackForwardListGetItemAtIndex):
1761 * UIProcess/API/C/WKBackForwardList.h:
1763 2010-09-27 Anders Carlsson <andersca@apple.com>
1765 Turns out people other than me might want to build this thing.
1767 * WebKit2.xcodeproj/project.pbxproj:
1769 2010-09-27 Darin Adler <darin@apple.com>
1771 * Scripts/webkit2: Added property svn:ignore.
1773 2010-09-27 Anders Carlsson <andersca@apple.com>
1775 Reviewed by Sam Weinig.
1777 * Platform/CoreIPC/Connection.h:
1778 (CoreIPC::Connection::sendSync):
1779 Add new sendSync overload that takes a message struct.
1781 * PluginProcess/WebProcessConnection.cpp:
1782 (WebKit::WebProcessConnection::didReceiveSyncMessage):
1783 Call didReceiveSyncWebProcessConnectionMessage.
1785 * WebProcess/Plugins/PluginProcessConnection.cpp:
1786 (WebKit::PluginProcessConnection::addPluginProxy):
1787 Add the plug-in proxy to the map.
1789 (WebKit::PluginProcessConnection::removePluginProxy):
1790 Remove the plug-in proxy from the map. If the map is empty, disconnect from the
1793 * WebProcess/Plugins/PluginProxy.cpp:
1794 (WebKit::generatePluginInstanceID):
1795 Generate a unique plug-in instance ID.
1797 (WebKit::PluginProxy::PluginProxy):
1798 Add the plug-in proxy to the map.
1800 (WebKit::PluginProxy::~PluginProxy):
1801 Remove the plug-in proxy from the map.
1803 (WebKit::PluginProxy::initialize):
1804 Ask the plug-in process to create a plug-in.
1806 2010-09-27 Sam Weinig <sam@webkit.org>
1808 Reviewed by Anders Carlsson.
1810 Add remaining event handlers to WKView.
1812 Also fixes <rdar://problem/8467058>
1813 Does not get decidePolicyForNavigationAction callback when middle clicking a link
1815 - Adds otherButton and rightButton NSResponder event handlers to WKView.
1816 - Renames WebPageProxy event handlers to use the handle prefix.
1817 - Uses a macro to reduce duplicate code for WKView event handlers.
1818 - Add view parameter to WebEventFactory::createWebKeyboardEvent on the mac
1821 * Shared/mac/WebEventFactory.h:
1822 * Shared/mac/WebEventFactory.mm:
1823 (WebKit::WebEventFactory::createWebKeyboardEvent):
1824 * UIProcess/API/mac/WKView.mm:
1825 * UIProcess/API/qt/qwkpage.cpp:
1826 (QWKPagePrivate::keyPressEvent):
1827 (QWKPagePrivate::keyReleaseEvent):
1828 (QWKPagePrivate::mouseMoveEvent):
1829 (QWKPagePrivate::mousePressEvent):
1830 (QWKPagePrivate::mouseReleaseEvent):
1831 (QWKPagePrivate::mouseDoubleClickEvent):
1832 (QWKPagePrivate::wheelEvent):
1833 (QWKPagePrivate::touchEvent):
1834 * UIProcess/WebPageProxy.cpp:
1835 (WebKit::WebPageProxy::handleMouseEvent):
1836 (WebKit::WebPageProxy::handleWheelEvent):
1837 (WebKit::WebPageProxy::handleKeyboardEvent):
1838 (WebKit::WebPageProxy::handleTouchEvent):
1839 * UIProcess/WebPageProxy.h:
1840 * UIProcess/win/WebView.cpp:
1841 (WebKit::WebView::onMouseEvent):
1842 (WebKit::WebView::onWheelEvent):
1843 (WebKit::WebView::onKeyEvent):
1845 2010-09-27 Ivan Krstić <ike@apple.com>
1847 Reviewed by Mark Rowe.
1849 <rdar://problem/8348990> / <http://webkit.org/b/46633> Make it possible to disable sandboxing of
1850 web process via runtime flag.
1852 Enable sandboxing of the web process only if the DisableSandbox user default is not set for the
1855 * WebProcess/mac/WebProcessMainMac.mm:
1856 (WebKit::WebProcessMain):
1858 2010-09-27 Anders Carlsson <andersca@apple.com>
1860 Reviewed by Adam Roben.
1862 Add WebProcessConnection CreatePlugin message
1863 https://bugs.webkit.org/show_bug.cgi?id=46668
1865 * DerivedSources.make:
1866 Add WebProcessConnection.
1868 * Platform/CoreIPC/HandleMessage.h:
1869 Add handleMessage overload for a sync message with two input parameters
1870 and one output parameter.
1872 (CoreIPC::handleMessage):
1873 * Platform/CoreIPC/MessageID.h:
1874 Add MessageClassWebProcessConnection.
1876 * PluginProcess/WebProcessConnection.cpp:
1877 (WebKit::WebProcessConnection::createPlugin):
1880 * PluginProcess/WebProcessConnection.messages.in: Added.
1881 * Scripts/webkit2/messages.py:
1882 Include headers directly for types that we believe are nested structs.
1884 * Scripts/webkit2/messages_unittest.py:
1885 Update expected results.
1887 * WebKit2.xcodeproj/project.pbxproj:
1890 2010-09-27 Anders Carlsson <andersca@apple.com>
1892 Reviewed by Adam Roben.
1894 Add support for autogenerating synchronous message handlers
1895 https://bugs.webkit.org/show_bug.cgi?id=46654
1897 * Scripts/webkit2/messages.py:
1898 (reply_type): Renamed from reply_base_class.
1899 (delayed_reply_type): Renamed from delayed_reply_base_class.
1900 (message_to_struct_declaration): Add a Reply type typedef.
1901 (async_case_statement): Rename from case_statement.
1902 (generate_message_handler): Generate a sync message handler as well.
1904 * Scripts/webkit2/messages_unittest.py:
1905 Update expected results.
1907 2010-09-27 Andras Becsi <abecsi@webkit.org>
1909 Reviewed by Csaba Osztrogonác.
1911 [Qt] Make generate-forwarding-headers.pl aware of moved headers
1912 https://bugs.webkit.org/show_bug.cgi?id=46621
1914 * generate-forwarding-headers.pl:
1916 2010-09-27 Sam Weinig <sam@webkit.org>
1918 Reviewed by Anders Carlsson.
1920 The mouseDidMoveOverElement callback in the injected bundle should include modifier info
1921 https://bugs.webkit.org/show_bug.cgi?id=46629
1923 - Moves event related API enums to WKEvent.h which can be shared between
1924 both the bundle and the main API.
1926 * Shared/API/c/WKEvent.h: Added.
1927 * Shared/API/c/WKSharedAPICast.h:
1929 * UIProcess/API/C/WKAPICast.h:
1930 * UIProcess/API/C/WKPage.h:
1931 * WebKit2.xcodeproj/project.pbxproj:
1932 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1933 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1934 (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
1935 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1936 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1937 (WebKit::WebChromeClient::mouseDidMoveOverElement):
1938 * win/WebKit2.vcproj:
1939 * win/WebKit2Generated.make:
1941 2010-09-27 Adam Roben <aroben@apple.com>
1943 Give mouse wheel events the right coordinates on Windows
1945 Fixes <http://webkit.org/b/46625> <rdar://problem/8481161> Placing
1946 mouse cursor inside a scrollable area and scrolling the mouse wheel
1947 generally doesn't scroll the area
1949 Reviewed by Sam Weinig.
1951 * Shared/win/WebEventFactory.cpp:
1952 (WebKit::point): Renamed from positionForEvent. The old name implied
1953 that all events used the same relative origin, which is untrue.
1954 (WebKit::WebEventFactory::createWebMouseEvent): Changed to use point
1955 and ::ClientToScreen explicitly rather than relying on
1956 positionForEvent/globalPositionForEvent.
1957 (WebKit::WebEventFactory::createWebWheelEvent): Changed to use point
1958 and ::ScreenToClient. The old code was assuming that wheel event
1959 points are relative to the client area, but they are in fact relative
1962 2010-09-27 Sam Weinig <sam@webkit.org>
1964 Reviewed by Adam Roben.
1966 Opening links in a new window asserts while decoding decidePolicyForNewWindowAction.
1967 <rdar://problem/8479445>
1968 https://bugs.webkit.org/show_bug.cgi?id=46623
1970 * UIProcess/WebPageProxy.cpp:
1971 (WebKit::WebPageProxy::didReceiveMessage): Fix the order of decoding to
1972 match the order of encoding. (Swapping url and mouseButton).
1974 2010-09-27 Adam Roben <aroben@apple.com>
1976 Stop leaking the web process's process handle on Windows
1978 Fixes <http://webkit.org/b/46133> <rdar://problem/8455343>
1980 Reviewed by Anders Carlsson.
1982 * UIProcess/Launcher/ProcessLauncher.cpp:
1983 (WebKit::ProcessLauncher::invalidate): Call platformInvalidate.
1985 * UIProcess/Launcher/ProcessLauncher.h: Added platformInvalidate.
1987 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1988 (WebKit::ProcessLauncher::platformInvalidate):
1989 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1990 (WebKit::ProcessLauncher::platformInvalidate):
1993 * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
1994 (WebKit::ProcessLauncher::platformInvalidate): Close the process
1995 handle like MSDN says we should.
1997 2010-09-27 Adam Roben <aroben@apple.com>
1999 Don't double-free CERT_CONTEXTs when copying PlatformCertificateInfos
2002 Fixes <http://webkit.org/b/46536> <rdar://problem/8477292> REGRESSION
2003 (r68260): Crash in PlatformCertificateInfo::~PlatformCertificateInfo
2004 when navigating away from Gmail
2006 Reviewed by Sam Weinig.
2008 * Shared/win/PlatformCertificateInfo.cpp:
2009 (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
2010 (WebKit::PlatformCertificateInfo::operator=):
2011 * Shared/win/PlatformCertificateInfo.h:
2012 Added a copy constructor and assigment operator to handle correctly
2013 reffing/dereffing the CERT_CONTEXTs when copying a
2014 PlatformCertificateInfo.
2016 2010-09-26 Sam Weinig <sam@webkit.org>
2018 Reviewed by Simon Fraser.
2020 MiniBrowser crashes when opening main menu item
2021 https://bugs.webkit.org/show_bug.cgi?id=46588
2023 * UIProcess/API/mac/PageClientImpl.mm:
2024 (WebKit::PageClientImpl::setEditCommandState): Don't allow default
2025 String -> NSString conversion to take place, and use the increasingly
2026 misnamed nsStringFromWebCoreString instead.
2028 2010-09-26 Sam Weinig <sam@webkit.org>
2030 Another windows build fix windows attempt.
2032 * win/WebKit2Common.vsprops:
2034 2010-09-26 Sam Weinig <sam@webkit.org>
2036 Another windows build fix windows attempt.
2038 * win/WebKit2Generated.make:
2040 2010-09-26 Sam Weinig <sam@webkit.org>
2042 Attempt to fix windows build.
2044 * win/WebKit2Common.vsprops:
2046 2010-09-26 Sam Weinig <sam@webkit.org>
2048 Attempt to fix Qt build.
2052 2010-09-26 Sam Weinig <sam@webkit.org>
2054 Reviewed by Anders Carlsson.
2056 Move shared WebKit2 API (used by both bundle and main API) to WebKit2/Shared/API
2057 https://bugs.webkit.org/show_bug.cgi?id=46587
2059 - Moves shared types (WKArrayRef, WKDictionaryRef, etc) to Shared/API/c.
2060 - Removes WKBundleBase.h and moves all opaque type declarations to WKBase.h (which
2061 moves to Shared/API/c).
2062 - Adds WKSharedAPICast.h which includes shared API casting logic and is included
2063 by both WKAPICast.h and WKBundleAPICast.h now. Moved to using macros for API
2064 mappings to reduce verbosity.
2065 - Move windows c API files from UIProcess/API/win to UIProcess/API/C/win.
2067 * Shared/API: Added.
2068 * Shared/API/c: Added.
2069 * Shared/API/c/WKArray.cpp: Copied from UIProcess/API/C/WKArray.cpp.
2070 * Shared/API/c/WKArray.h: Copied from UIProcess/API/C/WKArray.h.
2071 * Shared/API/c/WKBase.h: Copied from UIProcess/API/C/WKBase.h.
2072 * Shared/API/c/WKCertificateInfo.cpp: Copied from UIProcess/API/C/WKCertificateInfo.cpp.
2073 * Shared/API/c/WKCertificateInfo.h: Copied from UIProcess/API/C/WKCertificateInfo.h.
2074 * Shared/API/c/WKData.cpp: Copied from UIProcess/API/C/WKData.cpp.
2075 * Shared/API/c/WKData.h: Copied from UIProcess/API/C/WKData.h.
2076 * Shared/API/c/WKDictionary.cpp: Copied from UIProcess/API/C/WKDictionary.cpp.
2077 * Shared/API/c/WKDictionary.h: Copied from UIProcess/API/C/WKDictionary.h.
2078 * Shared/API/c/WKError.cpp: Copied from UIProcess/API/C/WKError.cpp.
2079 * Shared/API/c/WKError.h: Copied from UIProcess/API/C/WKError.h.
2080 * Shared/API/c/WKMutableArray.cpp: Copied from UIProcess/API/C/WKMutableArray.cpp.
2081 * Shared/API/c/WKMutableArray.h: Copied from UIProcess/API/C/WKMutableArray.h.
2082 * Shared/API/c/WKMutableDictionary.cpp: Copied from UIProcess/API/C/WKMutableDictionary.cpp.
2083 * Shared/API/c/WKMutableDictionary.h: Copied from UIProcess/API/C/WKMutableDictionary.h.
2084 * Shared/API/c/WKNumber.cpp: Copied from UIProcess/API/C/WKNumber.cpp.
2085 * Shared/API/c/WKNumber.h: Copied from UIProcess/API/C/WKNumber.h.
2086 * Shared/API/c/WKSerializedScriptValue.cpp: Copied from UIProcess/API/C/WKSerializedScriptValue.cpp.
2087 * Shared/API/c/WKSerializedScriptValue.h: Copied from UIProcess/API/C/WKSerializedScriptValue.h.
2088 * Shared/API/c/WKSharedAPICast.h: Copied from UIProcess/API/C/WKAPICast.h.
2089 * Shared/API/c/WKString.cpp: Copied from UIProcess/API/C/WKString.cpp.
2090 * Shared/API/c/WKString.h: Copied from UIProcess/API/C/WKString.h.
2091 * Shared/API/c/WKType.cpp: Copied from UIProcess/API/C/WKType.cpp.
2092 * Shared/API/c/WKType.h: Copied from UIProcess/API/C/WKType.h.
2093 * Shared/API/c/WKURL.cpp: Copied from UIProcess/API/C/WKURL.cpp.
2094 * Shared/API/c/WKURL.h: Copied from UIProcess/API/C/WKURL.h.
2095 * Shared/API/c/WKURLRequest.cpp: Copied from UIProcess/API/C/WKURLRequest.cpp.
2096 * Shared/API/c/WKURLRequest.h: Copied from UIProcess/API/C/WKURLRequest.h.
2097 * Shared/API/c/WKURLResponse.cpp: Copied from UIProcess/API/C/WKURLResponse.cpp.
2098 * Shared/API/c/WKURLResponse.h: Copied from UIProcess/API/C/WKURLResponse.h.
2099 * Shared/API/c/cf: Copied from UIProcess/API/C/cf.
2100 * Shared/API/c/mac: Copied from UIProcess/API/C/mac.
2101 * Shared/API/c/win: Added.
2102 * Shared/API/c/win/WKBaseWin.h: Copied from UIProcess/API/win/WKBaseWin.h.
2103 * Shared/API/c/win/WKCertificateInfoWin.cpp: Copied from UIProcess/API/C/win/WKCertificateInfoWin.cpp.
2104 * Shared/API/c/win/WKCertificateInfoWin.h: Copied from UIProcess/API/C/win/WKCertificateInfoWin.h.
2105 * UIProcess/API/C/WKAPICast.h: Replaced.
2106 * UIProcess/API/C/WKArray.cpp: Removed.
2107 * UIProcess/API/C/WKArray.h: Removed.
2108 * UIProcess/API/C/WKBase.h: Removed.
2109 * UIProcess/API/C/WKCertificateInfo.cpp: Removed.
2110 * UIProcess/API/C/WKCertificateInfo.h: Removed.
2111 * UIProcess/API/C/WKData.cpp: Removed.
2112 * UIProcess/API/C/WKData.h: Removed.
2113 * UIProcess/API/C/WKDictionary.cpp: Removed.
2114 * UIProcess/API/C/WKDictionary.h: Removed.
2115 * UIProcess/API/C/WKError.cpp: Removed.
2116 * UIProcess/API/C/WKError.h: Removed.
2117 * UIProcess/API/C/WKMutableArray.cpp: Removed.
2118 * UIProcess/API/C/WKMutableArray.h: Removed.
2119 * UIProcess/API/C/WKMutableDictionary.cpp: Removed.
2120 * UIProcess/API/C/WKMutableDictionary.h: Removed.
2121 * UIProcess/API/C/WKNumber.cpp: Removed.
2122 * UIProcess/API/C/WKNumber.h: Removed.
2123 * UIProcess/API/C/WKSerializedScriptValue.cpp: Removed.
2124 * UIProcess/API/C/WKSerializedScriptValue.h: Removed.
2125 * UIProcess/API/C/WKString.cpp: Removed.
2126 * UIProcess/API/C/WKString.h: Removed.
2127 * UIProcess/API/C/WKType.cpp: Removed.
2128 * UIProcess/API/C/WKType.h: Removed.
2129 * UIProcess/API/C/WKURL.cpp: Removed.
2130 * UIProcess/API/C/WKURL.h: Removed.
2131 * UIProcess/API/C/WKURLRequest.cpp: Removed.
2132 * UIProcess/API/C/WKURLRequest.h: Removed.
2133 * UIProcess/API/C/WKURLResponse.cpp: Removed.
2134 * UIProcess/API/C/WKURLResponse.h: Removed.
2135 * UIProcess/API/C/cf: Removed.
2136 * UIProcess/API/C/cf/WKStringCF.cpp: Removed.
2137 * UIProcess/API/C/cf/WKStringCF.h: Removed.
2138 * UIProcess/API/C/cf/WKURLCF.cpp: Removed.
2139 * UIProcess/API/C/cf/WKURLCF.h: Removed.
2140 * UIProcess/API/C/cf/WKURLRequestCF.cpp: Removed.
2141 * UIProcess/API/C/cf/WKURLRequestCF.h: Removed.
2142 * UIProcess/API/C/cf/WKURLResponseCF.cpp: Removed.
2143 * UIProcess/API/C/cf/WKURLResponseCF.h: Removed.
2144 * UIProcess/API/C/mac: Removed.
2145 * UIProcess/API/C/mac/WKCertificateInfoMac.h: Removed.
2146 * UIProcess/API/C/mac/WKCertificateInfoMac.mm: Removed.
2147 * UIProcess/API/C/mac/WKURLRequestNS.h: Removed.
2148 * UIProcess/API/C/mac/WKURLRequestNS.mm: Removed.
2149 * UIProcess/API/C/mac/WKURLResponseNS.h: Removed.
2150 * UIProcess/API/C/mac/WKURLResponseNS.mm: Removed.
2151 * UIProcess/API/C/win/WKAPICastWin.h: Copied from UIProcess/API/win/WKAPICastWin.h.
2152 * UIProcess/API/C/win/WKBaseWin.h: Copied from UIProcess/API/win/WKBaseWin.h.
2153 * UIProcess/API/C/win/WKCertificateInfoWin.cpp: Removed.
2154 * UIProcess/API/C/win/WKCertificateInfoWin.h: Removed.
2155 * UIProcess/API/C/win/WKView.cpp: Copied from UIProcess/API/win/WKView.cpp.
2156 * UIProcess/API/C/win/WKView.h: Copied from UIProcess/API/win/WKView.h.
2157 * UIProcess/API/win: Removed.
2158 * UIProcess/API/win/WKAPICastWin.h: Removed.
2159 * UIProcess/API/win/WKBaseWin.h: Removed.
2160 * UIProcess/API/win/WKView.cpp: Removed.
2161 * UIProcess/API/win/WKView.h: Removed.
2163 * WebKit2.xcodeproj/project.pbxproj:
2164 * WebProcess/InjectedBundle/API/c/WKBundle.h:
2165 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2166 * WebProcess/InjectedBundle/API/c/WKBundleBase.h: Removed.
2167 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2168 * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2169 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
2170 * WebProcess/InjectedBundle/API/c/WKBundleInitialize.h:
2171 * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h:
2172 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2173 * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2174 * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2175 * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.h:
2176 * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
2177 * win/WebKit2.vcproj:
2178 * win/WebKit2Generated.make:
2180 2010-09-26 Anders Carlsson <andersca@apple.com>
2184 * Platform/SharedMemory.h:
2185 * Platform/mac/SharedMemoryMac.cpp:
2186 (WebKit::SharedMemory::Handle::isNull):
2188 2010-09-26 Anders Carlsson <andersca@apple.com>
2190 Reviewed by Sam Weinig.
2192 Add PluginProxy class
2193 https://bugs.webkit.org/show_bug.cgi?id=46586
2195 * WebKit2.xcodeproj/project.pbxproj:
2198 * WebProcess/Plugins/PluginProxy.cpp: Added.
2199 * WebProcess/Plugins/PluginProxy.h: Added.
2201 * WebProcess/WebPage/WebPage.cpp:
2202 (WebKit::WebPage::createPlugin):
2203 Create a PluginProxy wrapper.
2205 2010-09-26 Anders Carlsson <andersca@apple.com>
2207 Reviewed by Sam Weinig.
2209 Make it possible to encode null SharedMemory::Handle objects
2210 https://bugs.webkit.org/show_bug.cgi?id=46585
2212 * Platform/SharedMemory.h:
2213 (WebKit::SharedMemory::Handle::isNull):
2216 * Platform/mac/SharedMemoryMac.cpp:
2217 (WebKit::SharedMemory::Handle::encode):
2220 (WebKit::SharedMemory::create):
2221 Bail if we see a null handle. Also work around a kernel bug where
2222 mach_vm_map fails if the given address to map is already mapped, even if
2223 VM_FLAG_ANYWHERE is set.
2225 2010-09-26 Anders Carlsson <andersca@apple.com>
2227 Reviewed by Sam Weinig.
2229 Add BackingStore class
2230 https://bugs.webkit.org/show_bug.cgi?id=46584
2232 * Shared/BackingStore.cpp: Added.
2233 (WebKit::BackingStore::create):
2234 Create a backing store backed by fastMalloc memory.
2236 (WebKit::BackingStore::createSharable):
2237 Create a backing store backed by shared memory.
2239 (WebKit::BackingStore::createHandle):
2240 Create a handle that can be sent over the wire.
2242 (WebKit::BackingStore::resize):
2243 Resize the backing store memory.
2245 (WebKit::BackingStore::data):
2246 Return the backing store data.
2248 * Shared/mac/BackingStoreMac.mm: Added.
2249 (WebKit::BackingStore::createGraphicsContext):
2250 Create a graphics context that will paint into the backing store.
2252 (WebKit::BackingStore::paint):
2253 Paint the backing store in a graphics context.
2255 * WebKit2.xcodeproj/project.pbxproj:
2258 2010-09-26 Anders Carlsson <andersca@apple.com>
2260 Reviewed by Sam Weinig.
2262 Establish a connection between the plug-in process and the web process
2263 https://bugs.webkit.org/show_bug.cgi?id=46583
2265 * PluginProcess/PluginProcess.cpp:
2266 (WebKit::PluginProcess::didReceiveMessage):
2267 Call the auto-generated didReceivePluginProcessMessage.
2269 * PluginProcess/PluginProcess.h:
2270 Add didReceivePluginProcessMessage declaration.
2272 * PluginProcess/PluginProcess.messages.in:
2273 Add new "CreateWebProcessConnection" message.
2275 * PluginProcess/WebProcessConnection.cpp:
2276 (WebKit::WebProcessConnection::didReceiveMessage):
2277 (WebKit::WebProcessConnection::didReceiveSyncMessage):
2278 (WebKit::WebProcessConnection::didClose):
2279 (WebKit::WebProcessConnection::didReceiveInvalidMessage):
2280 Add stubbed out member functions.
2282 * UIProcess/Plugins/PluginProcessManager.cpp:
2283 (WebKit::PluginProcessManager::getPluginProcessConnection):
2284 Ask the plug-in process proxy to create a connection.
2286 * UIProcess/Plugins/PluginProcessProxy.cpp:
2287 (WebKit::PluginProcessProxy::createWebProcessConnection):
2288 Add the WebProcessProxy and the reply encoder to the queue of pending replies.
2289 If the process is still launching, keep track of how many pending requests we have, otherwise
2290 just send the request.
2292 (WebKit::PluginProcessProxy::didReceiveMessage):
2293 Call the auto-generated didReceivePluginProcessMessage.
2295 (WebKit::PluginProcessProxy::didFinishLaunching):
2296 Send all pending connection requests.
2298 (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
2299 Get the first pending reply and send it with the mach port.
2301 * WebKit2.xcodeproj/project.pbxproj:
2302 Actually compile PluginProcessMessageReceiver.
2304 * WebProcess/Plugins/PluginProcessConnection.cpp:
2305 (WebKit::PluginProcessConnection::PluginProcessConnection):
2306 Create a CoreIPC connection.
2308 (WebKit::PluginProcessConnection::didReceiveMessage):
2309 (WebKit::PluginProcessConnection::didClose):
2310 (WebKit::PluginProcessConnection::didReceiveInvalidMessage):
2311 Add stubbed out member functions.
2313 * WebProcess/WebPage/WebPage.cpp:
2314 (WebKit::WebPage::createPlugin):
2315 Ask the plug-in process connection manager for a connection.
2317 2010-09-26 Anders Carlsson <andersca@apple.com>
2319 Reviewed by Sam Weinig.
2321 Generated message handlers should include argument coder headers for some types
2322 https://bugs.webkit.org/show_bug.cgi?id=46582
2324 * Scripts/webkit2/messages.py:
2325 When determining which headers to use when generating a message handler, consider the
2326 argument coder headers.
2328 * Scripts/webkit2/messages_unittest.py:
2331 2010-09-24 Sam Weinig <sam@webkit.org>
2335 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2337 2010-09-24 Enrica Casucci <enrica@apple.com>
2341 * UIProcess/API/qt/qwkpage.cpp:
2342 (QWKPagePrivate::setEditCommandState):
2344 2010-09-24 Sam Weinig <sam@webkit.org>
2346 Reviewed by Darin Adler.
2348 Implement WebKit2 callback equivalent to -[WebUIDelegate mouseDidMoveOverElement:modifierFlags:]
2349 <rdar://problem/8359279>
2350 https://bugs.webkit.org/show_bug.cgi?id=46546
2352 - Adds new WKBundleHitTestResultRef object to represent a content under a cursor.
2353 - Adds new Bundle and UI level mouseDidMoveOverElement UIClient callbacks, with
2354 pass through userData to communicate context up to the UIProcess
2356 * Shared/APIObject.h:
2357 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2358 * UIProcess/API/C/WKPage.h:
2359 * UIProcess/API/qt/qwkpage.cpp:
2361 * UIProcess/WebPageProxy.cpp:
2362 (WebKit::WebPageProxy::didReceiveMessage):
2363 (WebKit::WebPageProxy::mouseDidMoveOverElement):
2364 * UIProcess/WebPageProxy.h:
2365 * UIProcess/WebUIClient.cpp:
2366 (WebKit::WebUIClient::mouseDidMoveOverElement):
2367 * UIProcess/WebUIClient.h:
2369 * WebKit2.xcodeproj/project.pbxproj:
2370 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2371 * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
2372 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: Added.
2373 (WKBundleHitTestResultGetTypeID):
2374 (WKBundleHitTestResultGetNodeHandle):
2375 (WKBundleHitTestResultGetFrame):
2376 (WKBundleHitTestResultCopyAbsoluteLinkURL):
2377 * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: Added.
2378 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2379 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: Added.
2380 (WebKit::InjectedBundleHitTestResult::create):
2381 (WebKit::InjectedBundleHitTestResult::nodeHandle):
2382 (WebKit::InjectedBundleHitTestResult::webFrame):
2383 (WebKit::InjectedBundleHitTestResult::absoluteLinkURL):
2384 * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: Added.
2385 (WebKit::InjectedBundleHitTestResult::coreHitTestResult):
2386 (WebKit::InjectedBundleHitTestResult::InjectedBundleHitTestResult):
2387 (WebKit::InjectedBundleHitTestResult::type):
2388 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2389 (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
2390 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2391 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2392 (WebKit::WebChromeClient::mouseDidMoveOverElement):
2393 * win/WebKit2.vcproj:
2395 2010-09-24 Enrica Casucci <enrica@apple.com>
2399 * UIProcess/API/qt/qwkpage_p.h:
2400 * UIProcess/win/WebView.cpp:
2401 (WebKit::WebView::setEditCommandState):
2402 * UIProcess/win/WebView.h:
2404 2010-09-24 Enrica Casucci <enrica@apple.com>
2406 Reviewed by Darin Adler.
2408 Maui: Pasteboard support (42317)
2409 <rdar://problem/7660537>
2410 https://bugs.webkit.org/show_bug.cgi?id=42317
2412 This is the final piece of the pasteboard support for WebKit2.
2413 The menu validation has been hooked up for Mac. The validation is
2414 performed asynchronously and the menu entries updated while the menu
2415 is visible. I've created a generic mechanism to call editing commands
2416 that will make it easy to add new commands we will support in the future.
2417 The commands supported now are copy, cut, paste, pasteAsPlainText, delete
2420 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Added DidValidateMenuItem.
2421 * UIProcess/API/mac/PageClientImpl.h: Added setEditCommandState.
2422 * UIProcess/API/mac/PageClientImpl.mm: Added setEditCommandState implementation.
2423 (WebKit::PageClientImpl::setEditCommandState): Added.
2424 * UIProcess/API/mac/WKView.mm:
2425 (WebCore::MenuItemInfo::MenuItemInfo):
2426 (-[WKView initWithFrame:pageNamespaceRef:]):
2427 (createSelectorExceptionMap): Added.
2428 (commandNameForSelector): Added.
2429 (-[WKView validateUserInterfaceItem:]): Added implementation.
2430 (-[WKView _setUserInterfaceItemState:enabled:state:]): Added.
2431 * UIProcess/API/mac/WKViewInternal.h:
2432 * UIProcess/PageClient.h:
2433 * UIProcess/WebPageProxy.cpp:
2434 (WebKit::WebPageProxy::validateMenuItem):
2435 (WebKit::WebPageProxy::executeEditCommand):
2436 (WebKit::WebPageProxy::didReceiveMessage): Now processing also
2437 DidValidateMenuItem.
2438 * UIProcess/WebPageProxy.h:
2439 * WebProcess/WebPage/WebPage.cpp:
2440 (WebKit::WebPage::executeEditingCommand): Fixed.
2441 (WebKit::WebPage::isEditingCommandEnabled): Fixed.
2442 (WebKit::WebPage::validateMenuItem): Added.
2443 (WebKit::WebPage::executeEditCommand): Added.
2444 * WebProcess/WebPage/WebPage.h: Removed cut, copy, paste, selectAll.
2445 Added validateMenuItem and executeEditCommand.
2446 * WebProcess/WebPage/WebPage.messages.in: Added new messages.
2447 * UIProcess/API/qt/qwkpage.cpp:
2448 (WebKit::QWKPage::setEditCommandState): Added.
2449 * UIProcess/API/qt/qwkpage_p.h: Added
2452 2010-09-24 Anders Carlsson <andersca@apple.com>
2456 * WebKit2.xcodeproj/project.pbxproj:
2458 2010-09-24 Adam Roben <aroben@apple.com>
2460 Give windowed Netscape plugins their own window
2462 The plugin window is a child of the WebView's window. The WebView's
2463 window is in the UI process, and the plugin's window is in the web
2464 process (though someday it will be in the plugin process), but Windows
2465 mostly handles this just fine. Right now we move the plugin's window
2466 in the web process, but we need to do it at paint time in the UI
2467 process instead so that the plugin windows will stay in sync with the
2468 web page's contents. There are also a whole bunch of plugin quirks
2469 that WebKit1 supports that we don't support yet, but that's a task for
2472 Fixes <http://webkit.org/b/44428> Get basic in-process windowed
2473 plugins working in WebKit2 on Windows
2475 Reviewed by Anders Carlsson.
2477 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2478 (WebKit::NetscapePlugin::destroy):
2479 (WebKit::NetscapePlugin::geometryDidChange):
2480 Call the new platform-specific functions.
2482 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added
2483 platformDestroy/platformGeometryDidChange, and an m_window member on
2484 Windows to hold our window.
2486 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2487 (WebKit::NetscapePlugin::platformDestroy):
2488 (WebKit::NetscapePlugin::platformGeometryDidChange):
2489 * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2490 (WebKit::NetscapePlugin::platformDestroy):
2491 (WebKit::NetscapePlugin::platformGeometryDidChange):
2494 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2495 (WebKit::registerPluginView): Added. The code came from
2496 WebCore's PluginViewWin.cpp, though I changed it to add one to
2497 COLOR_WINDOW, since that's what MSDN says we should do.
2498 (WebKit::NetscapePlugin::platformPostInitialize): If we're windowed,
2499 create a window for the plugin and make it a child of the WebView's
2500 window. If we're not windowed, just set m_window to 0.
2501 (WebKit::NetscapePlugin::platformDestroy): Destroy our window if we
2502 have one and it hasn't been destroyed already.
2503 (WebKit::NetscapePlugin::platformGeometryDidChange): Update our
2504 window's size and position.
2506 * WebProcess/Plugins/PluginController.h:
2507 * WebProcess/Plugins/PluginView.cpp:
2508 (WebKit::PluginView::nativeParentWindow):
2509 * WebProcess/Plugins/PluginView.h:
2510 Added nativeParentWindow on Windows to return the WebView's window.
2512 2010-09-24 Adam Roben <aroben@apple.com>
2514 Pass the WebView's HWND over to the web process
2516 The HWND is packaged up in the WebPageCreationParameters and stored in
2517 the WebPage. It will eventually be used by windowed plugins.
2519 Fixes <http://webkit.org/b/46512> WebPage needs access to its
2520 corresponding HWND from the UI process
2522 Reviewed by Anders Carlsson.
2524 * Shared/WebPageCreationParameters.cpp:
2525 (WebKit::WebPageCreationParameters::encode):
2526 (WebKit::WebPageCreationParameters::decode):
2527 Encode and decode the HWND as a uint64_t.
2529 * Shared/WebPageCreationParameters.h: Added a nativeWindow member to
2532 * UIProcess/PageClient.h: Added a nativeWindow function on Windows.
2534 * UIProcess/WebPageProxy.cpp:
2535 (WebKit::WebPageProxy::creationParameters): Store the HWND from the
2536 page client in the struct to be sent to the web process.
2538 * UIProcess/win/WebView.cpp:
2539 (WebKit::WebView::WebView): Moved the call to initializeWebPage after
2540 we've created our window so that our window will be ready when
2541 WebPageProxy asks for it to send it to the web process.
2542 (WebKit::WebView::nativeWindow): Added. Just returns our window.
2544 * UIProcess/win/WebView.h: Added nativeWindow.
2546 * WebProcess/WebPage/WebPage.cpp:
2547 (WebKit::WebPage::WebPage): Store the HWND in the new m_nativeWindow
2550 * WebProcess/WebPage/WebPage.h:
2551 (WebKit::WebPage::nativeWindow): Added this simple getter.
2553 2010-09-24 Adam Roben <aroben@apple.com>
2555 Add WebPageProxy::creationParameters
2557 Fixes <http://webkit.org/b/46510> WebPageProxy has a bunch of
2558 duplicated WebPageCreationParameters code
2560 Reviewed by Anders Carlsson.
2562 * UIProcess/WebPageProxy.cpp:
2563 (WebKit::WebPageProxy::initializeWebPage):
2564 (WebKit::WebPageProxy::reinitializeWebPage):
2565 (WebKit::WebPageProxy::didReceiveSyncMessage):
2566 Use creationParameters.
2568 (WebKit::WebPageProxy::creationParameters):
2569 * UIProcess/WebPageProxy.h:
2570 Added creationParameters.
2572 2010-09-24 Adam Roben <aroben@apple.com>
2574 Make WebPage::create take a WebPageCreationParameter struct
2576 It only makes sense, after all.
2578 Fixes <http://webkit.org/b/46502>.
2580 Reviewed by Anders Carlsson.
2582 * WebProcess/WebPage/WebPage.cpp:
2583 (WebKit::WebPage::create):
2584 (WebKit::WebPage::WebPage):
2585 * WebProcess/WebPage/WebPage.h:
2586 Changed to take a WebPageCreationParameters struct.
2588 * WebProcess/WebProcess.cpp:
2589 (WebKit::WebProcess::createWebPage): Changed to pass a
2590 WebPageCreationParameters struct.
2592 2010-09-24 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
2594 Reviewed by Andreas Kling.
2596 Expose all WebKit2 C API preferences via the Qt API.
2598 Also rename a wrongly named C method (was using Web instead of WK).
2600 * UIProcess/API/C/WKPreferences.cpp:
2601 (WKPreferencesCopyStandardFontFamily):
2602 * UIProcess/API/C/WKPreferences.h:
2603 * UIProcess/API/qt/qwkpreferences.cpp:
2604 (QWKPreferences::setFontFamily):
2605 (QWKPreferences::fontFamily):
2606 (QWKPreferences::testAttribute):
2607 (QWKPreferences::setAttribute):
2608 * UIProcess/API/qt/qwkpreferences.h:
2610 2010-09-24 Anders Carlsson <andersca@apple.com>
2612 Reviewed by Adam Roben.
2614 Fill in more of PluginProcess
2615 https://bugs.webkit.org/show_bug.cgi?id=46534
2617 * DerivedSources.make:
2618 Add PluginProcessProxy.
2620 * Platform/CoreIPC/MessageID.h:
2621 Add a MessageClassPluginProcessProxy message class.
2623 * PluginProcess/PluginProcess.cpp:
2624 (WebKit::PluginProcess::PluginProcess):
2625 Initialize the shutdown timer.
2627 (WebKit::PluginProcess::initializeConnection):
2628 Rename this to initializeConnection to avoid conflicts in the CoreIPC message handler.
2630 (WebKit::PluginProcess::removeWebProcessConnection):
2631 Remove the given web process connection from our vector.
2633 (WebKit::PluginProcess::initialize):
2634 Create the plug-in module.
2636 (WebKit::PluginProcess::createWebProcessConnection):
2637 Create a connection handle and send it to the UI process.
2639 (WebKit::PluginProcess::shutdownTimerFired):
2642 * PluginProcess/mac/PluginProcessMainMac.mm:
2643 (WebKit::PluginProcessMain):
2644 Call initializeConnection.
2646 * Scripts/webkit2/messages.py:
2647 Add CoreIPC::MachPort as a special case.
2649 * Scripts/webkit2/messages_unittest.py:
2652 * UIProcess/Plugins/PluginProcessProxy.cpp:
2653 (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
2656 * UIProcess/Plugins/PluginProcessProxy.messages.in: Added.
2657 * WebKit2.xcodeproj/project.pbxproj:
2658 Add PluginProcessProxy.messages.in.
2661 Add an ENABLE_PLUGIN_PROCESS #define which is 0 for now.
2663 2010-09-24 Anders Carlsson <andersca@apple.com>
2665 Reviewed by Adam Roben.
2667 messages_unittest.py should compare the generated results against expected results
2668 https://bugs.webkit.org/show_bug.cgi?id=46490
2670 * Scripts/webkit2/messages_unittest.py:
2672 2010-09-24 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
2674 Reviewed by Antonio Gomes.
2676 Make it possible to get the page preferences for Qt WebKit2 port.
2678 * UIProcess/API/qt/qwkpage.cpp:
2679 (QWKPagePrivate::QWKPagePrivate):
2680 (QWKPage::preferences):
2681 * UIProcess/API/qt/qwkpage.h:
2682 * UIProcess/API/qt/qwkpage_p.h:
2683 * UIProcess/API/qt/qwkpreferences.cpp:
2684 (QWKPreferencesPrivate::createPreferences):
2685 (QWKPreferencesPrivate::createSharedPreferences):
2686 (QWKPreferences::sharedPreferences):
2687 (QWKPreferences::QWKPreferences):
2688 * UIProcess/API/qt/qwkpreferences.h:
2690 2010-09-24 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
2692 Reviewed by Sam Weinig.
2694 Add WebKit2 C API for setting/getting frame flattening and plugin settings.
2695 http://webkit.org/b/46477
2697 NOTE: The plugin setting was partly done but there was no C API.
2699 * Shared/WebPreferencesStore.cpp:
2700 (WebKit::WebPreferencesStore::WebPreferencesStore):
2701 (WebKit::WebPreferencesStore::encode):
2702 (WebKit::WebPreferencesStore::decode):
2703 * Shared/WebPreferencesStore.h:
2704 * UIProcess/API/C/WKPreferences.cpp:
2705 (WKPreferencesSetFrameFlatteningEnabled):
2706 (WKPreferencesGetFrameFlatteningEnabled):
2707 (WKPreferencesSetPluginsEnabled):
2708 (WKPreferencesGetPluginsEnabled):
2709 * UIProcess/API/C/WKPreferences.h:
2710 * UIProcess/WebPreferences.cpp:
2711 (WebKit::WebPreferences::setFrameFlatteningEnabled):
2712 (WebKit::WebPreferences::frameFlatteningEnabled):
2713 (WebKit::WebPreferences::setPluginsEnabled):
2714 (WebKit::WebPreferences::pluginsEnabled):
2715 * UIProcess/WebPreferences.h:
2716 * WebProcess/WebPage/WebPage.cpp:
2717 (WebKit::WebPage::WebPage):
2718 (WebKit::WebPage::preferencesDidChange):
2720 2010-09-24 Adam Roben <aroben@apple.com>
2722 Add WebPageCreationParameters
2724 This struct is used in any messages that end up creating a WebPage.
2725 Using a struct instead of individual parameters will make it easier to
2726 add platform-specific data, such as an HWND on Windows.
2728 Fixes <http://webkit.org/b/46470> Pass parameters for creating a
2729 WebPage in a single struct
2731 Reviewed by Anders Carlsson.
2733 * Shared/WebPageCreationParameters.cpp: Added.
2734 (WebKit::WebPageCreationParameters::encode):
2735 (WebKit::WebPageCreationParameters::decode):
2736 Simple encode/decode functions.
2738 * Shared/WebPageCreationParameters.h: Added.
2740 * UIProcess/WebPageProxy.cpp:
2741 (WebKit::WebPageProxy::initializeWebPage):
2742 (WebKit::WebPageProxy::reinitializeWebPage):
2743 (WebKit::WebPageProxy::didReceiveSyncMessage):
2744 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2745 (WebKit::WebChromeClient::createWindow):
2746 * WebProcess/WebProcess.cpp:
2747 (WebKit::WebProcess::createWebPage):
2748 (WebKit::WebProcess::didReceiveMessage):
2749 * WebProcess/WebProcess.h:
2750 Changed to use WebPageCreationParameters instead of passing the
2751 values individually.
2754 * WebKit2.xcodeproj/project.pbxproj:
2755 * win/WebKit2.vcproj:
2756 Added WebPageCreationParameters.
2758 2010-09-24 Adam Roben <aroben@apple.com>
2760 Stop pretending that we know how to encode a DrawingArea and just
2761 encode the DrawingAreaInfo directly
2763 DrawingAreaBase and friends were trying to hide the fact that they
2764 were just encoding/decoding a DrawingAreaInfo behind the scenes, but
2765 everyone knew what was going on and it was getting embarassing.
2767 Fixes <http://webkit.org/b/46469> Code to encode/decode a
2768 DrawingAreaInfo is confusing
2770 Reviewed by Anders Carlsson.
2772 * Shared/DrawingAreaBase.cpp: Removed.
2773 * Shared/DrawingAreaBase.h: Removed encode/decode.
2774 * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Removed encode override.
2776 * UIProcess/WebPageProxy.cpp:
2777 (WebKit::WebPageProxy::initializeWebPage):
2778 (WebKit::WebPageProxy::reinitializeWebPage):
2779 (WebKit::WebPageProxy::didReceiveSyncMessage):
2780 Changed to encode the DrawingAreaInfo directly.
2783 * WebKit2.xcodeproj/project.pbxproj:
2784 * win/WebKit2.vcproj:
2785 Removed DrawingAreaBase.cpp.
2787 2010-09-24 Adam Roben <aroben@apple.com>
2789 Expose a whole DrawingAreaInfo instead of its constituent parts from
2792 This is just a step toward cleaning up how drawing areas are
2795 Fixes <http://webkit.org/b/46468> DrawingAreaInfo should be used in
2798 Reviewed by Anders Carlsson.
2800 * Shared/DrawingAreaBase.cpp:
2801 (WebKit::DrawingAreaBase::encode): Changed to use info().
2803 * Shared/DrawingAreaBase.h:
2804 (WebKit::DrawingAreaBase::info): Added. Replaces type() and id().
2805 (WebKit::DrawingAreaBase::DrawingAreaBase): Changed to store a
2806 DrawingAreaInfo instead of storing its constituent parts.
2808 * UIProcess/API/mac/WKView.mm:
2809 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
2810 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
2811 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2812 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
2813 * WebProcess/WebPage/WebPage.cpp:
2814 Updated to use info().
2816 2010-09-24 Anders Carlsson <andersca@apple.com>
2818 Reviewed by Sam Weinig.
2820 Add WebProcessConnection class
2821 https://bugs.webkit.org/show_bug.cgi?id=46478
2823 * PluginProcess/WebProcessConnection.cpp: Added.
2824 * PluginProcess/WebProcessConnection.h: Added.
2825 Add stubbed out WebProcessConnection class.
2827 * WebKit2.xcodeproj/project.pbxproj:
2830 2010-09-24 Anders Carlsson <andersca@apple.com>
2832 Reviewed by Sam Weinig.
2834 Add PluginProcess class
2835 https://bugs.webkit.org/show_bug.cgi?id=46476
2837 * PluginProcess/PluginProcess.cpp: Added.
2838 * PluginProcess/PluginProcess.h: Added.
2839 Add stubbed out PluginProcess class.
2841 * PluginProcess/mac/PluginProcessMainMac.mm:
2842 (WebKit::PluginProcessMain):
2843 Initialize the plug-in process.
2845 * WebKit2.xcodeproj/project.pbxproj:
2848 * WebProcess/Plugins/PluginProcessConnection.h:
2849 Add a comment about which connection this is.
2851 2010-09-24 Sam Weinig <sam@webkit.org>
2855 * Shared/win/PlatformCertificateInfo.cpp:
2856 (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
2858 2010-09-23 Sam Weinig <sam@webkit.org>
2860 Reviewed by Adam Roben.
2862 Add Windows implementation of PlatformCertificateInfo
2863 Part of <rdar://problem/8350189>
2864 https://bugs.webkit.org/show_bug.cgi?id=46450
2866 * Shared/win/PlatformCertificateInfo.cpp: Added.
2867 (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
2868 (WebKit::PlatformCertificateInfo::~PlatformCertificateInfo):
2869 (WebKit::PlatformCertificateInfo::encode):
2870 (WebKit::PlatformCertificateInfo::decode):
2871 (WebKit::organizationNameForCertificate):
2872 * Shared/win/PlatformCertificateInfo.h:
2873 (WebKit::PlatformCertificateInfo::certificateContext):
2874 * UIProcess/API/C/win/WKCertificateInfoWin.cpp: Added.
2875 (WKCertificateInfoGetCertificateContext):
2876 * UIProcess/API/C/win/WKCertificateInfoWin.h: Added.
2877 * win/WebKit2.vcproj:
2878 * win/WebKit2Generated.make:
2880 2010-09-23 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
2882 Reviewed by Sam Weinig.
2884 Add WebKit2 C API for setting the font families.
2885 https://bugs.webkit.org/show_bug.cgi?id=46408
2887 * UIProcess/API/C/WKPreferences.cpp:
2888 (WKPreferencesSetStandardFontFamily):
2889 (WebPreferencesCopyStandardFontFamily):
2890 (WKPreferencesSetFixedFontFamily):
2891 (WKPreferencesCopyFixedFontFamily):
2892 (WKPreferencesSetSerifFontFamily):
2893 (WKPreferencesCopySerifFontFamily):
2894 (WKPreferencesSetSansSerifFontFamily):
2895 (WKPreferencesCopySansSerifFontFamily):
2896 (WKPreferencesSetCursiveFontFamily):
2897 (WKPreferencesCopyCursiveFontFamily):
2898 (WKPreferencesSetFantasyFontFamily):
2899 (WKPreferencesCopyFantasyFontFamily):
2900 * UIProcess/API/C/WKPreferences.h:
2901 * UIProcess/WebPreferences.cpp:
2902 (WebKit::WebPreferences::setStandardFontFamily):
2903 (WebKit::WebPreferences::standardFontFamily):
2904 (WebKit::WebPreferences::setFixedFontFamily):
2905 (WebKit::WebPreferences::fixedFontFamily):
2906 (WebKit::WebPreferences::setSerifFontFamily):
2907 (WebKit::WebPreferences::serifFontFamily):
2908 (WebKit::WebPreferences::setSansSerifFontFamily):
2909 (WebKit::WebPreferences::sansSerifFontFamily):
2910 (WebKit::WebPreferences::setCursiveFontFamily):
2911 (WebKit::WebPreferences::cursiveFontFamily):
2912 (WebKit::WebPreferences::setFantasyFontFamily):
2913 (WebKit::WebPreferences::fantasyFontFamily):
2914 * UIProcess/WebPreferences.h:
2915 * WebProcess/WebPage/WebPage.cpp:
2916 (WebKit::WebPage::preferencesDidChange):
2918 2010-09-23 Csaba Osztrogonác <ossy@webkit.org>
2920 Unreviewed buildfix after r68220 on WebKit2.
2922 WebKit2 API: Need way to know when a frame is removed from the hierarchy
2923 https://bugs.webkit.org/show_bug.cgi?id=46432
2925 [Qt] qt_wk_didRemoveFrameFromHierarchy needs to be implemented
2927 * UIProcess/API/qt/ClientImpl.cpp:
2928 (qt_wk_didRemoveFrameFromHierarchy):
2929 * UIProcess/API/qt/ClientImpl.h:
2930 * UIProcess/API/qt/qwkpage.cpp:
2933 2010-09-23 Sam Weinig <sam@webkit.org>
2935 Reviewed by Anders Carlsson.
2937 WebKit2 API: Need way to know when a frame is removed from the hierarchy
2938 <rdar://problem/8414062>
2939 https://bugs.webkit.org/show_bug.cgi?id=46432
2941 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2942 * UIProcess/API/C/WKPage.h:
2943 * UIProcess/WebLoaderClient.cpp:
2944 (WebKit::WebLoaderClient::didRemoveFrameFromHierarchy):
2945 * UIProcess/WebLoaderClient.h:
2946 * UIProcess/WebPageProxy.cpp:
2947 (WebKit::WebPageProxy::didReceiveMessage):
2948 (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
2949 * UIProcess/WebPageProxy.h:
2950 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2951 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2952 (WebKit::InjectedBundlePageLoaderClient::didRemoveFrameFromHierarchy):
2953 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2954 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2955 (WebKit::WebFrameLoaderClient::detachedFromParent2):
2956 (WebKit::WebFrameLoaderClient::didTransferChildFrameToNewDocument):
2958 2010-09-23 Anders Carlsson <andersca@apple.com>
2960 Reviewed by Sam Weinig.
2962 Add PluginProcessConnection and PluginProcessConnectionManager
2963 https://bugs.webkit.org/show_bug.cgi?id=46425
2965 * WebKit2.xcodeproj/project.pbxproj:
2968 * WebProcess/Plugins/PluginProcessConnection.cpp:
2969 Add empty file for now.
2971 * WebProcess/Plugins/PluginProcessConnection.h:
2974 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: Added.
2975 (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2976 Check for an existing plug-in process connection. If we don't have one, ask the
2977 UI process to create one.
2979 (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
2980 Remove the connection from our global vector.
2982 2010-09-23 Adam Roben <aroben@apple.com>
2984 Remove the DrawingAreaProxy parameter to
2985 WebPagProxy::initializeWebPage
2987 Callers are now required to set the drawing area via
2988 WebPageProxy::setDrawingArea before calling initializeWebPage. This
2989 will allow us to delay calling initializeWebPage on Windows until
2990 after we've created the WebView's HWND, which in turn will allow us to
2991 send the HWND over to the web process when the page is created. (The
2992 drawing area must be set before creating the HWND so that its size can
2993 be updated, etc., as the window is created.)
2995 Fixes <http://webkit.org/b/46409> DrawingAreaProxy parameter to
2996 initializeWebPage is unnecessary, and causes problems on Windows
2998 Reviewed by Anders Carlsson.
3000 * UIProcess/API/mac/WKView.mm:
3001 (-[WKView initWithFrame:pageNamespaceRef:]):
3002 * UIProcess/API/qt/qwkpage.cpp:
3003 (QWKPagePrivate::init):
3004 * UIProcess/win/WebView.cpp:
3005 (WebKit::WebView::WebView):
3006 Added explicit calls to setDrawingArea.
3008 * UIProcess/WebPageProxy.cpp:
3009 (WebKit::WebPageProxy::initializeWebPage):
3010 * UIProcess/WebPageProxy.h:
3011 Removed the DrawingAreaProxy parameter and a stray puts(), and added
3014 2010-09-23 Anders Carlsson <andersca@apple.com>
3016 Reviewed by Darin Adler.
3018 Implement handlers for the GetPluginProcessConnection message
3019 https://bugs.webkit.org/show_bug.cgi?id=46415
3021 * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
3022 Add GetPluginProcessConnection message kind
3024 * UIProcess/Plugins/PluginProcessManager.cpp:
3025 (WebKit::PluginProcessManager::PluginProcessManager):
3026 Add missing constructor.
3028 * UIProcess/WebProcessProxy.cpp:
3029 (WebKit::WebProcessProxy::getPluginProcessConnection):
3030 Ask the plug-in process manager for a connection.
3032 (WebKit::WebProcessProxy::didReceiveSyncMessage):
3033 Call getPluginProcessConnection.
3035 * UIProcess/WebProcessProxy.h:
3036 * WebProcess/WebPage/WebPage.cpp:
3037 (WebKit::WebPage::createPlugin):
3038 Send the GetPluginProcessConnection message.
3040 2010-09-23 Matthew Delaney <mdelaney@apple.com>
3042 Reviewed by Simon Fraser.
3044 Reduce minimum DOMTimer interval
3045 https://bugs.webkit.org/show_bug.cgi?id=45362
3047 * WebProcess/WebPage/WebPage.cpp:
3048 Updating set interval call to use Settings' static version.
3050 2010-09-23 Adam Roben <aroben@apple.com>
3052 Try to fix the Windows build
3054 * win/WebKit2Common.vsprops: Add WebKit2/PluginProcess to the include
3057 2010-09-23 Anders Carlsson <andersca@apple.com>
3059 Reviewed by Sam Weinig.
3061 Add PluginProcessMain files
3062 https://bugs.webkit.org/show_bug.cgi?id=46379
3064 * PluginProcess/PluginProcessMain.h: Added.
3065 * PluginProcess/mac/PluginProcessMainMac.mm: Added.
3067 * WebKit2.xcodeproj/project.pbxproj:
3068 Add PluginProcessMain files. Remove PluginProcess.messages.in from the target so it
3069 won't be installed in the WebKit2.framework bundle.
3071 * WebProcess/WebKitMain.cpp:
3073 Call PluginProcessMain if the process type is ProcessLauncher::PluginProcess.
3075 2010-09-23 Anders Carlsson <andersca@apple.com>
3077 Reviewed by Sam Weinig.
3079 Add PluginProcessProxy class
3080 https://bugs.webkit.org/show_bug.cgi?id=46377
3082 * DerivedSources.make:
3085 * Platform/CoreIPC/Connection.h:
3086 (CoreIPC::Connection::send):
3087 Add send overload that takes a message.
3089 * Platform/CoreIPC/MessageID.h:
3090 Add MessageClassPluginProcess message kind.
3092 * PluginProcess/PluginProcess.messages.in: Added.
3093 Add PluginProcess messages.
3095 * UIProcess/Plugins/PluginInfoStore.cpp:
3096 (WebKit::PluginInfoStore::infoForPluginWithPath):
3097 * UIProcess/Plugins/PluginInfoStore.h:
3098 New function that returns the plug-in info for a plug-in with the given path.
3100 * UIProcess/Plugins/PluginProcessManager.cpp:
3101 (WebKit::PluginProcessManager::getPluginProcessConnection):
3102 Look for an existing plug-in process proxy.
3104 * UIProcess/Plugins/PluginProcessProxy.cpp: Added.
3105 (WebKit::PluginProcessProxy::create):
3108 (WebKit::PluginProcessProxy::didReceiveMessage):
3109 (WebKit::PluginProcessProxy::didReceiveInvalidMessage):
3110 Add stubbed out functions.
3112 (WebKit::PluginProcessProxy::didClose):
3113 Delete the plug-in process proxy.
3115 (WebKit::PluginProcessProxy::didFinishLaunching):
3116 Open a connection to the plug-in process proxy.
3118 * UIProcess/Plugins/PluginProcessProxy.h: Added.
3119 (WebKit::PluginProcessProxy::pluginInfo):
3120 Return the plug-in info.
3122 * UIProcess/WebProcessProxy.h:
3123 (WebKit::WebProcessProxy::context):
3124 Add a context getter.
3126 * WebKit2.xcodeproj/project.pbxproj:
3129 2010-09-23 Jessie Berlin <jberlin@apple.com>
3131 Reviewed by Sam Weinig.
3133 Expose the BundlePage on the BundleFrame in the API.
3134 https://bugs.webkit.org/show_bug.cgi?id=46366
3136 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3137 (WKBundleFrameGetPage):
3138 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3140 2010-09-23 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
3142 Reviewed by Andreas Kling.
3144 Add a preference class for Qt for WebKit2.
3146 * UIProcess/API/qt/qwkpreferences.cpp: Added.
3147 (QWKPreferences::globalPreferences):
3148 (QWKPreferences::QWKPreferences):
3149 (QWKPreferences::~QWKPreferences):
3150 (QWKPreferences::testAttribute):
3151 (QWKPreferences::setAttribute):
3152 * UIProcess/API/qt/qwkpreferences.h: Added.
3155 2010-09-23 Anders Carlsson <andersca@apple.com>
3157 Reviewed by Adam Roben.
3159 It should be possible to conditionally define an entire group of messages
3160 https://bugs.webkit.org/show_bug.cgi?id=46368
3162 * Scripts/webkit2/messages.py:
3163 Check for a condition when parsing the "messages -> " string and set it as the
3164 message receiver condition.
3166 * Scripts/webkit2/messages_unittest.py:
3169 2010-09-23 Anders Carlsson <andersca@apple.com>
3171 Reviewed by Adam Roben.
3173 Message autogeneration script should parse sync message syntax
3174 https://bugs.webkit.org/show_bug.cgi?id=46359
3176 * Scripts/webkit2/messages.py:
3177 (MessageReceiver.parse): Expand the regular expression to handle sync messages.
3178 (function_parameter_type): Use a const reference for all parameters except the known builtins.
3179 (base_class): Returns the base class for a sync message reply struct.
3180 (delayed_base_class): Returns the base class for a delayed sync message reply struct.
3182 * Scripts/webkit2/messages_unittest.py:
3183 Add unit tests for various sync messages.
3185 2010-09-22 Andras Becsi <abecsi@webkit.org>
3187 Unreviewed build fix after r68079.
3189 [Qt] Also generate WebPage's message-receiving code and message types
3190 for the Qt port of WebKit2.
3192 * DerivedSources.pro:
3195 2010-09-22 Anders Carlsson <andersca@apple.com>
3197 Reviewed by Adam Roben.
3199 Stub out a PluginProcessManager class
3200 https://bugs.webkit.org/show_bug.cgi?id=46305
3202 * UIProcess/Plugins/PluginProcessManager.cpp: Added.
3203 (WebKit::PluginProcessManager::shared):
3204 (WebKit::PluginProcessManager::getPluginProcessConnection):
3205 (WebKit::PluginProcessManager::removePluginProcessProxy):
3206 * UIProcess/Plugins/PluginProcessManager.h: Added.
3207 * WebKit2.xcodeproj/project.pbxproj:
3209 2010-09-22 Kenneth Rohde Christiansen <kenneth@webkit.org>
3211 Reviewed by Antonio Gomes.
3213 Add a ViewportConfiguration class for the Qt WebKit2 API, which
3214 currently calculated a fallback viewport configuration.
3216 * UIProcess/API/qt/qwkpage.cpp:
3217 (QWKPage::ViewportConfiguration::ViewportConfiguration):
3218 (QWKPage::ViewportConfiguration::~ViewportConfiguration):
3219 (QWKPage::ViewportConfiguration::operator=):
3220 (QWKPage::viewportConfigurationForSize):
3221 * UIProcess/API/qt/qwkpage.h:
3222 * UIProcess/API/qt/qwkpage_p.h:
3223 (QtViewportConfigurationPrivate::QtViewportConfigurationPrivate):
3225 2010-09-22 Adam Roben <aroben@apple.com>
3229 * WebProcess/WebKitMain.cpp:
3230 (WebKitMain): Fix typo
3232 2010-09-22 Adam Roben <aroben@apple.com>
3234 Autogenerate WebPage's message-receiving code and message types
3236 This patch encompasses several changes that allow message types and
3237 receiving code to be generated by a script, and add some type-safety
3238 as a bonus. Messages are now represented by structs instead of an ID +
3239 ArgumentCoder. The struct contains the arguments and the ID together,
3240 and has a constructor that enforces the use of correct types.
3241 Correspondingly, a new overload of WebProcessProxy::send that takes a
3242 message struct (instead of a message ID and separate arguments) has
3243 been added. Eventually all callers should use this overload and the
3244 old one can be removed.
3246 This patch only touches WebPage's messages. We should transition other
3247 message receivers over to this new system eventually.
3249 Fixes <http://webkit.org/b/43636> <rdar://problem/8282462> Add a
3250 type-safe IPC mechanism to WebKit2
3252 Reviewed by Anders Carlsson.
3254 * DerivedSources.make: Added. Calls generate-message-receiver.py and
3255 generate-messages-header.py for each message receiver it knows about
3256 (just WebPage for now).
3258 * Platform/CoreIPC/Arguments.h: Added First/Second/ThirdArgumentType
3259 typedefs for use in handleMessage.
3261 * Platform/CoreIPC/HandleMessage.h: Added.
3262 (CoreIPC::handleMessage): This overloaded function template decodes
3263 arguments and passes them along to the specified function.
3265 * Scripts/generate-message-receiver.py: Added.
3266 * Scripts/generate-messages-header.py: Added.
3267 These scripts just wrap functionality in messages.py.
3269 * Scripts/webkit2/__init__.py: Added. This just exists so that Python
3270 will treat this directory as a package.
3272 * Scripts/webkit2/messages.py: Added. Contains the code to parse
3273 messages files and generate .cpp/.h files from them.
3274 (MessageReceiver.__init__): This class represents a single receiver of
3276 (MessageReceiver.iterparameters): Returns a generator that can be used
3277 to iterate over all the parameters of all the messages of this
3279 (MessageReceiver.parse): Reads a messages file from a file-like object
3280 and parses it into a MessageReceiver object.
3281 (Message.__init__): This class represents a single message.
3282 (Message.id): Returns the ID name for this message.
3283 (Parameter.__init__): This class represents a single parameter for a
3285 (messages_header_filename): Returns the name of the header that
3286 defines the messages for a given receiver.
3287 (surround_in_condition): Surrounds the given string in #if/#endif if
3288 there is an associated condition.
3289 (messages_to_kind_enum): Returns a string that defines the Kind enum
3291 (function_parameter_type): Returns the type that should be used when
3292 passing a value of the given type as a parameter to a function.
3293 (base_class): Returns the base class for a message struct.
3294 (message_to_struct_declaration): Returns a string that declares the
3295 struct for this message.
3296 (forward_declarations_for_namespace): Returns a string that contains
3297 forward-declarations for a set of types in a given namespace.
3298 (forward_declarations): Returns a string that contains all the
3299 forward-declarations needed in order to declare all the message
3300 structs for this receiver.
3301 (generate_header_file): Returns a string containing the messages
3302 header file for this receiver.
3303 (handler_function): Returns the name of the function that handles a
3304 given message for a given receiver.
3305 (case_statement): Returns a string containing a case statement for
3306 handling the given message.
3307 (header_for_type): Returns the header needed to define a given type,
3308 enclosed in quotes or angle brackets as needed.
3309 (generate_message_handler): Returns a string containing the contents
3310 of a .cpp file that defines a didReceive*Message function.
3312 * Scripts/webkit2/messages_unittest.py: Added. Contains tests for
3315 * Shared/CoreIPCSupport/WebPageMessageKinds.h: Removed. This has been
3316 replaced by a generated WebPageMessages.h header.
3318 * UIProcess/WebEditCommandProxy.cpp:
3319 * UIProcess/WebPageProxy.cpp:
3320 Updated to use the new message structs and WebProcessProxy::send
3323 * UIProcess/WebProcessProxy.h:
3324 (WebKit::WebProcessProxy::send): Added this new overload that takes a
3327 * WebKit2.xcodeproj/project.pbxproj: Added a Derived Sources shell
3328 script target that invokes DerivedSources.make. Added "Derived
3329 Sources" and "Scripts" groups that contain the various new files.
3331 * WebProcess/WebPage/WebPage.cpp:
3332 (WebKit::WebPage::didReceivePolicyDecision):
3333 (WebKit::WebPage::getSourceForFrame):
3334 Changed these functions to take the raw IPC types and do the necessary
3335 translation themselves. This keeps the generated code from need to
3336 know how to perform the translation.
3338 (WebKit::WebPage::didReceiveMessage): Replaced handling of WebPage
3339 messages with a call to didReceiveWebPageMessage, whose implementation
3340 is generated by the scripts.
3342 * WebProcess/WebPage/WebPage.h: Added didReceiveWebPageMessage.
3344 * WebProcess/WebPage/WebPage.messages.in: Added. This file declares
3345 all of the messages that WebPage receives, roughly grouped by
3348 * win/WebKit2.vcproj: Added "Derived Sources" and "Scripts" filters
3349 that contain the various new files. Let VS resort some other files.
3351 * win/WebKit2Common.vsprops: Added
3352 $(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources to the include
3353 path so that the generated messages header can be found.
3355 * win/WebKit2.make: Copy the generated source files to $(DSTROOT).
3357 * win/WebKit2Generated.make: Added a call to build-generated-files.sh.
3359 * win/WebKit2Generated.vcproj: Added build-generated-files.sh.
3361 * win/build-generated-files.sh: Added. Invokes DerivedSources.make.
3363 2010-09-22 Anders Carlsson <andersca@apple.com>
3365 Reviewed by Darin Adler.
3367 Enhance ProcessLauncher to be able to launch plug-in processes
3368 https://bugs.webkit.org/show_bug.cgi?id=46295
3370 * UIProcess/Launcher/ProcessLauncher.cpp:
3371 (WebKit::ProcessLauncher::ProcessLauncher):
3372 Make the ProcessLauncher constructor take a LaunchOptions struct.
3374 (WebKit::ProcessLauncher::processTypeAsString):
3375 Given a process type, return its string representation.
3377 (WebKit::ProcessLauncher::getProcessTypeFromString):
3380 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3381 (WebKit::ProcessLauncher::launchProcess):
3382 Rename "mode" to "type" and pass the type as a string based on the LaunchOptions struct.
3383 Also, set the launch architecture from the LaunchOptions struct.
3385 * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
3386 (WebKit::ProcessLauncher::launchProcess):
3387 Rename "mode" to "type."
3389 * UIProcess/WebProcessProxy.cpp:
3390 (WebKit::WebProcessProxy::connect):
3391 Initialize a LaunchOptions struct.
3393 * WebProcess/WebKitMain.cpp:
3395 Factor code that can be shared between the mac and windows WebKitMain code out into a
3396 WebKitMain overload that takes a CommandLine.
3398 * WebProcess/WebProcessMain.h:
3399 * WebProcess/mac/WebProcessMainMac.mm:
3400 (WebKit::WebProcessMain):
3401 * WebProcess/win/WebProcessMainWin.cpp:
3402 (WebKit::WebProcessMain):
3403 Change WebProcessMain to take a const CommandLine reference instead of a pointer.
3405 2010-09-22 Anders Carlsson <andersca@apple.com>
3407 Reviewed by Adam Roben.
3409 Rename GetPluginHostConnection to GetPluginPath
3410 https://bugs.webkit.org/show_bug.cgi?id=46292
3412 Rename GetPluginHostConnection to GetPluginPath since this message will always get the
3413 plug-in path. We'll add another message to actually get the connection.
3415 * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
3416 * UIProcess/WebProcessProxy.cpp:
3417 (WebKit::WebProcessProxy::getPluginPath):
3418 (WebKit::WebProcessProxy::didReceiveMessage):
3419 (WebKit::WebProcessProxy::didReceiveSyncMessage):
3420 * UIProcess/WebProcessProxy.h:
3421 * WebProcess/WebPage/WebPage.cpp:
3422 (WebKit::WebPage::createPlugin):
3424 2010-09-22 Anders Carlsson <andersca@apple.com>
3426 Reviewed by Adam Roben.
3428 Move plug-in creation to WebPage::createPlugin
3429 https://bugs.webkit.org/show_bug.cgi?id=46289
3431 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3432 (WebKit::WebFrameLoaderClient::createPlugin):
3433 Call WebPage::createPlugin.
3435 * WebProcess/WebPage/WebPage.cpp:
3436 (WebKit::WebPage::createPlugin):
3439 2010-09-22 Anders Carlsson <andersca@apple.com>
3441 Reviewed by Darin Adler.
3443 Random plug-in cleanups
3444 https://bugs.webkit.org/show_bug.cgi?id=46279
3446 * WebProcess/Plugins/Plugin.cpp:
3447 (WebKit::Plugin::Parameters::encode):
3448 (WebKit::Plugin::Parameters::decode):
3449 Add CoreIPC coding support for the Plugin::Parameters struct.
3451 * WebProcess/Plugins/PluginController.h:
3452 Add pluginProcessCrashed pure virtual member function.
3454 * WebProcess/Plugins/PluginView.cpp:
3455 (WebKit::PluginView::handleEvent):
3456 handleEvent can be called when m_plugin is null.
3458 (WebKit::PluginView::pluginProcessCrashed):
3459 Ask the renderer to show the crashed plug-in indicator.
3461 2010-09-22 Anders Carlsson <andersca@apple.com>
3463 Reviewed by John Sullivan.
3465 Don't listen for some window notifications on all windows
3466 https://bugs.webkit.org/show_bug.cgi?id=46277
3468 Only listen for NSWindowDidBecomeKeyNotification and NSWindowDidResignKeyNotification notifications
3469 on all windows; this matches old WebKit and fixes a crash where we would send notifications to views whose
3470 underlying pages were invalid.
3472 * UIProcess/API/mac/WKView.mm:
3473 (-[WKView addWindowObserversForWindow:]):
3474 (-[WKView removeWindowObservers]):
3476 2010-09-22 Anders Carlsson <andersca@apple.com>
3478 Reviewed by Adam Roben.
3480 Crash when running plug-in layout tests
3481 https://bugs.webkit.org/show_bug.cgi?id=46269
3483 Store the web page directly in the PluginView class, instead of getting it from the frame
3484 of the plug-in element; this fixes two crashes, one where the plug-in element had been deallocated
3485 before the plug-in view, and another where the plug-in element's document did not have a frame.
3487 This also makes things more robust since we're asserting in the WebPage destructor that no plug-ins have
3488 an outstanding reference to it.
3490 * WebProcess/Plugins/PluginView.cpp:
3492 (WebKit::PluginView::PluginView):
3493 (WebKit::PluginView::~PluginView):
3494 (WebKit::PluginView::initializePlugin):
3495 * WebProcess/Plugins/PluginView.h:
3497 2010-09-22 Anders Carlsson <andersca@apple.com>
3499 Reviewed by Adam Roben.
3501 Change a bunch of Vector<char> to Vector<uint8_t> to better indicate that we're
3502 dealing with raw bytes.
3504 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3505 (WebKit::parsePostBuffer):
3506 (WebKit::NPN_GetURL):
3507 (WebKit::NPN_PostURL):
3508 (WebKit::NPN_GetURLNotify):
3509 (WebKit::NPN_PostURLNotify):
3510 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3511 (WebKit::NetscapePlugin::loadURL):
3512 (WebKit::NetscapePlugin::initialize):
3513 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3514 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3515 (WebKit::NetscapePluginStream::deliverData):
3516 (WebKit::NetscapePluginStream::deliverDataToPlugin):
3517 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
3518 * WebProcess/Plugins/PluginController.h:
3519 * WebProcess/Plugins/PluginView.cpp:
3520 (WebKit::PluginView::loadURL):
3521 * WebProcess/Plugins/PluginView.h:
3523 2010-09-22 Anders Carlsson <andersca@apple.com>
3525 Reviewed by Adam Roben.
3527 Assertion fails in [WKView _updateWindowFrame] when closing a WebKit2 window
3528 https://bugs.webkit.org/show_bug.cgi?id=46264
3529 <rdar://problem/8463534>
3531 * UIProcess/API/mac/WKView.mm:
3532 (-[WKView viewDidMoveToWindow]):
3533 Only update window visibility and frame when we're moving to a window.
3535 2010-09-22 Balazs Kelemen <kb@inf.u-szeged.hu>
3537 Reviewed by Kenneth Rohde Christiansen.
3539 [Qt] PluginStrategy implementation is broken
3540 https://bugs.webkit.org/show_bug.cgi?id=46078
3542 * UIProcess/API/qt/qwkpage.cpp:
3543 (QWKPagePrivate::QWKPagePrivate):
3544 Initialize the WebPlatformStrategies at the UI side as well because
3545 we are using the LocalizationStrategy in the UI process.
3546 Added a FIXME since this should be fixed in the future.
3548 2010-09-22 Balazs Kelemen <kb@inf.u-szeged.hu>
3550 Reviewed by Kenneth Rohde Christiansen.
3552 PluginStrategy should satisfy the needs of Qt
3553 https://bugs.webkit.org/show_bug.cgi?id=45857
3554 No new functionality so no new tests.
3556 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3557 (WebKit::WebPlatformStrategies::getPluginInfo):
3558 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3560 2010-09-21 Steve Falkenburg <sfalken@apple.com>
3562 Rubber stamped by Simon Fraser.
3564 Add DirectX SDK include path.
3566 * win/WebKit2DirectX.vsprops:
3568 2010-09-21 Anders Carlsson <andersca@apple.com>
3570 Reviewed by Dan Bernstein.
3572 Forward window focus changes to the plug-in
3573 https://bugs.webkit.org/show_bug.cgi?id=46227
3575 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3576 (WebKit::NetscapePlugin::windowFocusChanged):
3577 Send the NPCocoaEventWindowFocusChanged event.
3579 (WebKit::NetscapePlugin::windowFrameChanged):
3580 (WebKit::NetscapePlugin::windowVisibilityChanged):
3583 * WebProcess/Plugins/Plugin.h:
3584 Add windowFocusChanged, windowFrameChanged and windowVisibilityChanged.
3586 * WebProcess/Plugins/PluginView.cpp:
3587 (WebKit::PluginView::webPage):
3588 Make webPage a member function instead.
3590 (WebKit::PluginView::setWindowIsFocused):
3591 Call the plug-in member function.
3593 (WebKit::PluginView::initializePlugin):
3594 When the plug-in has been initialized, update its window frame, window visibility
3595 and window focus states.
3597 (WebKit::PluginView::setParent):
3598 Move viewGeometryDidChange to initializePlugin.
3600 * WebProcess/Plugins/PluginView.h:
3601 * WebProcess/WebPage/WebPage.cpp:
3602 (WebKit::WebPage::setActive):
3603 Tell all plug-in views about the new window focus state.
3605 (WebKit::WebPage::windowIsFocused):
3606 Return whether the window is focused or not.
3608 * WebProcess/WebPage/WebPage.h:
3609 (WebKit::WebPage::windowIsVisible):
3610 (WebKit::WebPage::windowFrame):
3613 2010-09-21 Anders Carlsson <andersca@apple.com>
3615 Reviewed by John Sullivan.
3617 Handle booleans in injected bundle messages
3618 https://bugs.webkit.org/show_bug.cgi?id=46213
3620 * Shared/UserMessageCoders.h:
3621 (WebKit::UserMessageEncoder::baseEncode):
3622 (WebKit::UserMessageDecoder::baseDecode):
3624 2010-09-21 Brian Weinstein <bweinstein@apple.com>
3626 Reviewed by Adam Roben.
3628 WebKit2 should look for WebKit2WebProcess.exe next to WebKit.dll
3629 https://bugs.webkit.org/show_bug.cgi?id=46209
3630 <rdar://problem/8445639>
3632 Find WebKit2WebProcess.exe by getting the full path to WebKit.dll, and then
3633 removing the last path component and replacing it with WebKit2WebProcess.exe.
3635 * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
3636 (WebKit::ProcessLauncher::launchProcess):
3638 2010-09-21 Anders Carlsson <andersca@apple.com>
3640 Reviewed by Adam Roben.
3642 Send window visibility and window frame change sizes to the plug-in
3643 https://bugs.webkit.org/show_bug.cgi?id=46202
3645 * Shared/CoreIPCSupport/WebPageMessageKinds.h:
3646 * UIProcess/API/mac/WKView.mm:
3647 (-[WKView _updateWindowVisibility]):
3648 Call WebPageProxy::setWindowIsVisible.
3650 (-[WKView addWindowObserversForWindow:]):
3651 Add additional observers.
3653 (-[WKView removeWindowObservers]):
3656 (-[WKView _updateWindowFrame]):
3657 Call WebPageProxy::setWindowFrame.
3659 (-[WKView viewDidMoveToWindow]):
3660 Update the window visibility and the web frame.
3662 (-[WKView _windowDidMiniaturize:]):
3663 (-[WKView _windowDidDeminiaturize:]):
3664 Update the window visibility.
3666 (-[WKView _windowFrameDidChange:]):
3667 Update the window frame.
3669 * UIProcess/WebPageProxy.cpp:
3670 (WebKit::WebPageProxy::setWindowIsVisible):
3671 (WebKit::WebPageProxy::setWindowFrame):
3672 Send messages along to the web process.
3674 * WebProcess/Plugins/PluginView.cpp:
3675 (WebKit::PluginView::PluginView):
3676 Register the plug-in view.
3678 (WebKit::PluginView::~PluginView):
3679 Unregister the plug-in view.
3681 (WebKit::PluginView::setWindowIsVisible):
3682 (WebKit::PluginView::setWindowFrame):
3685 * WebProcess/WebPage/WebPage.cpp:
3686 (WebKit::WebPage::WebPage):
3687 Initialize m_windowIsVisible.
3689 (WebKit::WebPage::~WebPage):
3690 Assert that all plug-in views have been removed.
3692 (WebKit::WebPage::setWindowIsVisible):
3693 Notify all plug-ins about the window visibility change.
3695 (WebKit::WebPage::setWindowFrame):
3696 Notify all plug-ins about the window frame change.
3698 (WebKit::WebPage::didReceiveMessage):
3699 Handle setWindowIsVisible and setWindowFrame.
3701 2010-09-21 Anders Carlsson <andersca@apple.com>
3703 Reviewed by Mark Rowe.
3705 * Configurations/WebKit2.xcconfig:
3706 Add a note about keeping the path in MainMac.cpp in sync with the install path.
3710 Use the correct framework path.
3712 2010-09-21 Anders Carlsson <andersca@apple.com>
3717 (closeUnusedFileDescriptors):
3718 Move this out into a separate function.
3721 Don't use the soft linking macros, they were bringing in WTFReportAssertionFailure.
3723 2010-09-20 Anders Carlsson <andersca@apple.com>
3725 Reviewed by Dan Bernstein.
3727 Zombie WebProcesses are left around
3728 https://bugs.webkit.org/show_bug.cgi?id=46148
3729 <rdar://problem/8455898>
3731 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3732 (WebKit::setupTerminationNotificationHandler):
3733 Register a dispatch handler that calls waitpid when the child process exits. This prevents zombies from
3734 staying around after the child process has quit.
3736 (WebKit::ProcessLauncher::launchProcess):
3737 Pass POSIX_SPAWN_START_SUSPENDED to posix_spawn to avoid race conditions when setting up the termination
3738 notification handler. When the handler is set up we send the SIGCONT signal to the child process.
3742 Loop through all file descriptors except for stdin, stdout and stderr and close them.
3744 * WebKit2.xcodeproj/project.pbxproj:
3745 Soft-link the Web process with WebKit2. We do this so we can ensure that we won't accidentally close any
3746 file descriptors opened by initialization code that would have been called before main().
3748 2010-09-21 Andras Becsi <abecsi@inf.u-szeged.hu>
3750 Reviewed by Csaba Osztrogonác.
3752 [Qt] QtWebProcess should clean up shared memory map files on close
3753 https://bugs.webkit.org/show_bug.cgi?id=45984
3755 Relocate MappedMemory struct code to it's own header and implement
3756 a singleton pool class (MappedMemoryPool) which tracks shared memory
3757 to be able to clean up map files from disk if RunLoop stops.
3759 * Shared/qt/MappedMemory.h: Added.
3760 (WebKit::MappedMemory::markUsed):
3761 (WebKit::MappedMemory::markFree):
3762 (WebKit::MappedMemory::isFree):
3763 * Shared/qt/MappedMemoryPool.cpp: Added.
3764 (WebKit::MappedMemoryPool::MappedMemoryPool):
3765 (WebKit::MappedMemoryPool::instance):
3766 (WebKit::MappedMemoryPool::size):
3767 (WebKit::MappedMemoryPool::at):
3768 (WebKit::MappedMemoryPool::append):
3769 (WebKit::MappedMemoryPool::cleanUp):
3770 * Shared/qt/UpdateChunk.cpp:
3771 (WebKit::mapMemory):
3773 * Shared/qt/UpdateChunk.h:
3776 2010-09-20 Philippe Normand <pnormand@igalia.com>
3778 Reviewed by Eric Carlson.
3780 [GTK] enhanced context menu for media elements
3781 https://bugs.webkit.org/show_bug.cgi?id=45021
3783 New localized strings for the media element context-menu.
3785 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3786 (WebKit::WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
3787 (WebKit::WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
3788 (WebKit::WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
3789 (WebKit::WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
3790 (WebKit::WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
3791 (WebKit::WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
3792 (WebKit::WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
3793 (WebKit::WebPlatformStrategies::contextMenuItemTagMediaPlay):
3794 (WebKit::WebPlatformStrategies::contextMenuItemTagMediaPause):
3795 (WebKit::WebPlatformStrategies::contextMenuItemTagMediaMute):
3796 (WebKit::WebPlatformStrategies::contextMenuItemTagMediaUnMute):
3797 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3799 2010-09-20 Anders Carlsson <andersca@apple.com>
3801 Reviewed by Adam Roben.
3803 Add a way to delay sending replies to sync requests
3804 https://bugs.webkit.org/show_bug.cgi?id=46117
3806 Change the didReceiveSyncMessage client message to return a SyncReplyMode. If the SyncReplyMode is
3807 AutomaticReply, the reply will be sent when the didReceiveSyncMessage function returns. However, if it is
3808 ManualReply, then the client is handed ownership of the reply ArgumentEncoder and can choose to send it
3809 at a later time using Connection::sendSyncReply.
3811 * Platform/CoreIPC/Connection.cpp:
3812 (CoreIPC::Connection::sendSyncReply):
3813 Send the message as a sync reply.
3815 (CoreIPC::Connection::dispatchMessages):
3816 Check the return value of didReceiveSyncMessage. If it is AutomaticReply, immediately send the reply.
3818 * Platform/CoreIPC/Connection.h:
3819 (CoreIPC::Connection::MessageReceiver::didReceiveSyncMessage):
3822 * UIProcess/WebProcessProxy.cpp:
3823 (WebKit::WebProcessProxy::didReceiveSyncMessage):
3824 * UIProcess/WebProcessProxy.h:
3825 Update for changed return type.
3827 2010-09-20 Anders Carlsson <andersca@apple.com>
3829 Reviewed by Adam Roben.
3831 Don't use bufferIsLargeEnoughToContain for Vectors with variable sized elements
3832 https://bugs.webkit.org/show_bug.cgi?id=46109
3834 Add a new VectorArgumentCoder class template, with specializations based on whether the
3835 element is fixed size or not. Then update the ArgumentEncoder<Vector<T>> specialization to choose the
3836 right VectorArgumentCoder specialization. To determine this, we use the "IsArithmetic" type trait,
3837 which holds true for all integer types and all floating point types.
3839 * Platform/CoreIPC/ArgumentCoders.h:
3841 2010-09-20 Enrica Casucci <enrica@apple.com>
3843 Reviewed by Sam Weinig.
3845 Pasteboard doesn't work in WebKit2.
3846 https://bugs.webkit.org/show_bug.cgi?id=42317
3847 <rdar://problem/7660537>
3849 Adding support for RTF, RTFD and NSUrl formats on the Mac.
3850 Still missing the selective enabling of the menu entries.
3852 * WebKit2.xcodeproj/project.pbxproj: Added WebEditorClientMac.mm.
3853 * WebProcess/WebCoreSupport/WebEditorClient.cpp: Removed Mac only methods
3854 that are now in WebEditorClientMac.mm
3855 * WebProcess/WebCoreSupport/WebEditorClient.h: Fixed style and changed parameter
3856 type in documentFragmentFromAttributedString to be a Vector of RefPtr.
3857 * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added.
3858 All the following methods have been moved from WebEditorClient.cpp.
3859 (WebKit::WebEditorClient::userVisibleString): Added implementation.
3860 (WebKit::createExcludedElementsForAttributedStringConversion): Added.
3861 (WebKit::WebEditorClient::documentFragmentFromAttributedString): Added implementation.
3862 (WebKit::WebEditorClient::setInsertionPasteboard):
3863 (WebKit::WebEditorClient::pasteboardTypesForSelection):
3864 (WebKit::WebEditorClient::uppercaseWord):
3865 (WebKit::WebEditorClient::lowercaseWord):
3866 (WebKit::WebEditorClient::capitalizeWord):
3867 (WebKit::WebEditorClient::showSubstitutionsPanel):
3868 (WebKit::WebEditorClient::substitutionsPanelIsShowing):
3869 (WebKit::WebEditorClient::toggleSmartInsertDelete):
3870 (WebKit::WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
3871 (WebKit::WebEditorClient::toggleAutomaticQuoteSubstitution):
3872 (WebKit::WebEditorClient::isAutomaticLinkDetectionEnabled):
3873 (WebKit::WebEditorClient::toggleAutomaticLinkDetection):
3874 (WebKit::WebEditorClient::isAutomaticDashSubstitutionEnabled):
3875 (WebKit::WebEditorClient::toggleAutomaticDashSubstitution):
3876 (WebKit::WebEditorClient::isAutomaticTextReplacementEnabled):
3877 (WebKit::WebEditorClient::toggleAutomaticTextReplacement):
3878 (WebKit::WebEditorClient::isAutomaticSpellingCorrectionEnabled):
3879 (WebKit::WebEditorClient::toggleAutomaticSpellingCorrection):
3880 (WebKit::WebEditorClient::checkTextOfParagraph):
3881 (WebKit::WebEditorClient::showCorrectionPanel):
3882 (WebKit::WebEditorClient::dismissCorrectionPanel):
3883 (WebKit::WebEditorClient::isShowingCorrectionPanel):
3885 2010-09-20 Andy Estes <aestes@apple.com>
3887 Reviewed by Darin Adler.
3889 Fix a style issue and add a FIXME to make the AppleConnect plug-in
3890 workaround dependent on site-specific quirks being enabled, which
3891 WebKit2 does not yet support in its WebPreferences implementation.
3892 https://bugs.webkit.org/show_bug.cgi?id=45960
3894 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3895 (WebKit::WebFrameLoaderClient::createPlugin):
3897 2010-09-20 Sam Weinig <sam@webkit.org>
3899 Reviewed by Adam Roben.
3901 Add WebKit2 API to load a string as plain text
3902 https://bugs.webkit.org/show_bug.cgi?id=46091
3904 * Shared/CoreIPCSupport/WebPageMessageKinds.h:
3905 * UIProcess/API/C/WKPage.cpp:
3906 (WKPageLoadPlainTextString):
3907 * UIProcess/API/C/WKPage.h:
3908 * UIProcess/WebPageProxy.cpp:
3909 (WebKit::WebPageProxy::loadPlainTextString):
3910 * UIProcess/WebPageProxy.h:
3911 * WebProcess/WebPage/WebPage.cpp:
3912 (WebKit::WebPage::loadData):
3913 (WebKit::WebPage::loadHTMLString):
3914 (WebKit::WebPage::loadPlainTextString):
3915 (WebKit::WebPage::didReceiveMessage):
3916 * WebProcess/WebPage/WebPage.h:
3918 2010-09-19 Sam Weinig <sam@webkit.org>
3922 * UIProcess/API/C/WKPage.h:
3924 2010-09-19 Sam Weinig <sam@webkit.org>
3926 Attempt to fix Qt build.
3928 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3929 (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
3931 2010-09-19 Sam Weinig <sam@webkit.org>
3933 Reviewed by Anders Carlsson.
3935 Add WebKit2 equivalent of the WebFormDelegate's doCommandBySelector
3936 <rdar://problem/8377088>
3937 https://bugs.webkit.org/show_bug.cgi?id=46073
3939 Add bundle client to match the behavior of:
3940 - (BOOL)textField:(DOMHTMLInputElement *)element doCommandBySelector:(SEL)commandSelector inFrame:(WebFrame *)frame;
3942 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3943 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
3944 (WebKit::InjectedBundlePageFormClient::shouldPerformActionInTextField):
3945 * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
3946 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3947 (WebKit::getActionTypeForKeyEvent):
3948 (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
3949 (WebKit::WebEditorClient::textWillBeDeletedInTextField):
3951 2010-09-19 Sam Weinig <sam@webkit.org>
3953 Reviewed by Anders Carlsson.
3955 WebKit2 decidePolicyForNavigationAction should include mouse button information
3956 <rdar://problem/8413165>
3957 https://bugs.webkit.org/show_bug.cgi?id=46060
3959 * UIProcess/API/C/WKAPICast.h:
3961 * UIProcess/API/C/WKPage.h:
3962 * UIProcess/WebPageProxy.cpp:
3963 (WebKit::WebPageProxy::didReceiveMessage):
3964 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3965 (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
3966 * UIProcess/WebPageProxy.h:
3967 * UIProcess/WebPolicyClient.cpp:
3968 (WebKit::WebPolicyClient::decidePolicyForNavigationAction):
3969 (WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
3970 * UIProcess/WebPolicyClient.h:
3971 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3972 (WebKit::findMouseEvent):
3973 (WebKit::mouseButtonForNavigationAction):
3974 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
3975 (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3977 2010-09-19 Csaba Osztrogonác <ossy@webkit.org>
3979 [Qt] Unreviewed buildfix after r67813.
3981 Replace WKBundleRangeRef with WKBundleRangeHandleRef.
3982 https://bugs.webkit.org/show_bug.cgi?id=46054
3984 * DerivedSources.pro: Add WebCore/generated/JSRange.h to WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2
3986 2010-09-19 Csaba Osztrogonác <ossy@webkit.org>
3988 [Qt] Unreviewed buildfix after r67802.
3990 WebKit2: Improve/unify the PageLoadClient interfaces.
3991 https://bugs.webkit.org/show_bug.cgi?id=46043
3993 * UIProcess/API/qt/ClientImpl.h:
3995 2010-09-19 Sam Weinig <sam@webkit.org>
3997 Reviewed by Anders Carlsson.
3999 Replace WKBundleRangeRef with WKBundleRangeHandleRef.
4000 https://bugs.webkit.org/show_bug.cgi?id=46054
4002 The new one acts like WKBundleNodeHandleRef and allows for getting a
4003 wrapper in a specific world for the handle.
4005 * Shared/APIObject.h:
4007 * WebKit2.xcodeproj/project.pbxproj:
4008 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
4009 * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
4010 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
4011 (WKBundleFrameGetJavaScriptWrapperForRangeForWorld):
4012 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
4013 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
4014 * WebProcess/InjectedBundle/API/c/WKBundleRange.cpp: Removed.
4015 * WebProcess/InjectedBundle/API/c/WKBundleRange.h: Removed.
4016 * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp: Added.
4017 (WKBundleRangeHandleGetTypeID):
4018 * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.h: Added.
4019 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
4020 (WebKit::InjectedBundleNodeHandle::getOrCreate):
4021 * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
4022 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: Added.
4023 (WebKit::domHandleCache):
4024 (WebKit::InjectedBundleRangeHandle::getOrCreate):
4025 (WebKit::InjectedBundleRangeHandle::create):
4026 (WebKit::InjectedBundleRangeHandle::InjectedBundleRangeHandle):
4027 (WebKit::InjectedBundleRangeHandle::~InjectedBundleRangeHandle):
4028 (WebKit::InjectedBundleRangeHandle::coreRange):
4029 * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h: Added.
4030 (WebKit::InjectedBundleRangeHandle::type):
4031 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
4032 (WebKit::InjectedBundlePageEditorClient::shouldBeginEditing):
4033 (WebKit::InjectedBundlePageEditorClient::shouldEndEditing):
4034 (WebKit::InjectedBundlePageEditorClient::shouldInsertNode):
4035 (WebKit::InjectedBundlePageEditorClient::shouldInsertText):
4036 (WebKit::InjectedBundlePageEditorClient::shouldDeleteRange):
4037 (WebKit::InjectedBundlePageEditorClient::shouldChangeSelectedRange):
4038 (WebKit::InjectedBundlePageEditorClient::shouldApplyStyle):
4039 * WebProcess/WebPage/WebFrame.cpp:
4040 (WebKit::WebFrame::jsWrapperForWorld):
4041 * WebProcess/WebPage/WebFrame.h:
4042 * win/WebKit2.vcproj:
4043 * win/WebKit2Generated.make:
4045 2010-09-18 Sam Weinig <sam@webkit.org>
4047 Reviewed by Dan Bernstein.
4049 Improve/unify the PageLoadClient interfaces.
4050 https://bugs.webkit.org/show_bug.cgi?id=46043
4052 - Ensure that all the PageLoadClient functions (that are load related)
4053 have bundle API equivalents (this meant adding didFirstLayoutForFrame
4054 and didFirstVisuallyNonEmptyLayoutForFrame to the BundlePageLoadClient).
4055 - Add a userData out parameters to all the now paired BundlePageLoadClient
4056 functions, and a matching userData parameter to the PageLoadClient ones.
4058 * UIProcess/API/C/WKPage.h:
4059 * UIProcess/API/qt/ClientImpl.cpp:
4060 (qt_wk_didStartProvisionalLoadForFrame):
4061 (qt_wk_didReceiveServerRedirectForProvisionalLoadForFrame):
4062 (qt_wk_didFailProvisionalLoadWithErrorForFrame):
4063 (qt_wk_didCommitLoadForFrame):
4064 (qt_wk_didFinishDocumentLoadForFrame):
4065 (qt_wk_didFinishLoadForFrame):
4066 (qt_wk_didFailLoadWithErrorForFrame):
4067 (qt_wk_didReceiveTitleForFrame):
4068 (qt_wk_didFirstLayoutForFrame):
4069 (qt_wk_didFirstVisuallyNonEmptyLayoutForFrame):
4070 * UIProcess/WebLoaderClient.cpp:
4071 (WebKit::WebLoaderClient::didStartProvisionalLoadForFrame):
4072 (WebKit::WebLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
4073 (WebKit::WebLoaderClient::didFailProvisionalLoadWithErrorForFrame):
4074 (WebKit::WebLoaderClient::didCommitLoadForFrame):
4075 (WebKit::WebLoaderClient::didFinishDocumentLoadForFrame):
4076 (WebKit::WebLoaderClient::didFinishLoadForFrame):
4077 (WebKit::WebLoaderClient::didFailLoadWithErrorForFrame):
4078 (WebKit::WebLoaderClient::didReceiveTitleForFrame):
4079 (WebKit::WebLoaderClient::didFirstLayoutForFrame):
4080 (WebKit::WebLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
4081 (WebKit::WebLoaderClient::didStartProgress):
4082 (WebKit::WebLoaderClient::didChangeProgress):
4083 (WebKit::WebLoaderClient::didFinishProgress):
4084 (WebKit::WebLoaderClient::didBecomeUnresponsive):
4085 (WebKit::WebLoaderClient::didBecomeResponsive):
4086 (WebKit::WebLoaderClient::processDidExit):
4087 (WebKit::WebLoaderClient::didChangeBackForwardList):
4088 * UIProcess/WebLoaderClient.h:
4089 * UIProcess/WebPageProxy.cpp:
4090 (WebKit::WebPageProxy::didReceiveMessage):
4091 (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
4092 (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
4093 (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
4094 (WebKit::WebPageProxy::didCommitLoadForFrame):
4095 (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
4096 (WebKit::WebPageProxy::didFinishLoadForFrame):
4097 (WebKit::WebPageProxy::didFailLoadForFrame):
4098 (WebKit::WebPageProxy::didReceiveTitleForFrame):
4099 (WebKit::WebPageProxy::didFirstLayoutForFrame):
4100 (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
4101 * UIProcess/WebPageProxy.h:
4102 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
4103 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
4104 (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
4105 (WebKit::InjectedBundlePageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
4106 (WebKit::InjectedBundlePageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
4107 (WebKit::InjectedBundlePageLoaderClient::didCommitLoadForFrame):
4108 (WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
4109 (WebKit::InjectedBundlePageLoaderClient::didFinishLoadForFrame):
4110 (WebKit::InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame):
4111 (WebKit::InjectedBundlePageLoaderClient::didReceiveTitleForFrame):
4112 (WebKit::InjectedBundlePageLoaderClient::didFirstLayoutForFrame):
4113 (WebKit::InjectedBundlePageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
4114 (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
4115 (WebKit::InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame):
4116 (WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
4117 (WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
4118 (WebKit::InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame):
4119 (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
4120 (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
4121 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
4122 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4123 (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
4124 (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
4125 (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
4126 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
4127 (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
4128 (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
4129 (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
4130 (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
4131 (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
4132 (WebKit::WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
4134 2010-09-18 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
4136 Reviewed by Kenneth Rohde Christiansen.
4138 Enable Platform Strategies on Qt
4140 [Qt] Turn on PLATFORM_STRATEGIES
4141 https://bugs.webkit.org/show_bug.cgi?id=45831
4143 * WebKit2.pro: Added Added WebPlatformStrategies.{cpp,h}
4145 2010-09-17 Sam Weinig <sam@webkit.org>
4147 Reviewed by Jon Honeycutt.
4149 Need a way to load data (as plain text) in a WKPage
4150 <rdar://problem/8424239>
4152 * Shared/CoreIPCSupport/WebPageMessageKinds.h:
4153 * UIProcess/API/C/WKPage.cpp:
4154 (WKPageLoadHTMLString):
4155 * UIProcess/API/C/WKPage.h:
4156 * UIProcess/WebPageProxy.cpp:
4157 (WebKit::WebPageProxy::loadHTMLString):
4158 * UIProcess/WebPageProxy.h:
4159 * WebProcess/WebPage/WebPage.cpp:
4160 (WebKit::WebPage::loadHTMLString):
4161 (WebKit::WebPage::didReceiveMessage):
4162 * WebProcess/WebPage/WebPage.h:
4164 2010-09-17 Sam Weinig <sam@webkit.org>
4166 Rubber-stamped by Anders Carlsson.
4168 Replace all uses of WTF::String and WTF::AtomicString with
4169 String and AtomicString.
4171 * Platform/Module.h:
4172 * Shared/CommandLine.h:
4173 (WebKit::CommandLine::operator[]):
4174 * Shared/WebCoreArgumentCoders.h:
4175 * Shared/WebEvent.h:
4176 (WebKit::WebKeyboardEvent::WebKeyboardEvent):
4177 (WebKit::WebKeyboardEvent::text):
4178 (WebKit::WebKeyboardEvent::unmodifiedText):
4179 (WebKit::WebKeyboardEvent::keyIdentifier):
4180 (WebKit::WebKeyboardEvent::decode):
4181 * Shared/WebNavigationDataStore.h:
4182 * Shared/WebPreferencesStore.h:
4183 * Shared/WebString.h:
4184 (WebKit::WebString::create):
4185 (WebKit::WebString::string):
4186 (WebKit::WebString::WebString):
4188 (WebKit::WebURL::create):
4189 (WebKit::WebURL::string):
4190 (WebKit::WebURL::WebURL):
4191 * UIProcess/API/C/WKAPICast.h:
4194 (WebKit::toCopiedRef):
4195 (WebKit::toCopiedURLRef):
4196 (WebKit::toWTFString):
4197 * UIProcess/API/C/WKContext.cpp:
4199 * UIProcess/API/mac/PageClientImpl.h:
4200 * UIProcess/API/mac/PageClientImpl.mm:
4201 (WebKit::nsStringFromWebCoreString):
4202 * UIProcess/PageClient.h:
4203 * UIProcess/Plugins/PluginInfoStore.cpp:
4204 (WebKit::PluginInfoStore::setAdditionalPluginsDirectories):
4205 * UIProcess/Plugins/PluginInfoStore.h:
4206 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
4207 (WebKit::PluginInfoStore::getPluginInfo):
4208 (WebKit::PluginInfoStore::getMIMETypeForExtension):
4209 * UIProcess/WebBackForwardListItem.h:
4210 (WebKit::WebBackForwardListItem::create):
4211 (WebKit::WebBackForwardListItem::setOriginalURL):
4212 (WebKit::WebBackForwardListItem::originalURL):
4213 (WebKit::WebBackForwardListItem::setURL):
4214 (WebKit::WebBackForwardListItem::url):
4215 (WebKit::WebBackForwardListItem::setTitle):
4216 (WebKit::WebBackForwardListItem::title):
4217 * UIProcess/WebContext.cpp:
4218 (WebKit::WebContext::WebContext):
4219 (WebKit::WebContext::setAdditionalPluginsDirectory):
4220 * UIProcess/WebContext.h:
4221 (WebKit::WebContext::injectedBundlePath):
4222 * UIProcess/WebContextInjectedBundleClient.h:
4223 * UIProcess/WebFrameProxy.cpp:
4224 (WebKit::WebFrameProxy::didReceiveTitle):
4225 * UIProcess/WebFrameProxy.h:
4226 (WebKit::WebFrameProxy::url):
4227 (WebKit::WebFrameProxy::provisionalURL):
4228 * UIProcess/WebHistoryClient.h:
4229 * UIProcess/WebLoaderClient.cpp:
4230 (WebKit::WebLoaderClient::didReceiveTitleForFrame):
4231 * UIProcess/WebLoaderClient.h:
4232 * UIProcess/WebNavigationData.h:
4233 (WebKit::WebNavigationData::title):
4234 (WebKit::WebNavigationData::url):
4235 * UIProcess/WebPageProxy.h:
4236 (WebKit::WebPageProxy::pageTitle):
4237 (WebKit::WebPageProxy::toolTip):
4238 (WebKit::WebPageProxy::urlAtProcessExit):
4239 * UIProcess/WebPolicyClient.h:
4240 * UIProcess/WebProcessProxy.cpp:
4241 (WebKit::WebProcessProxy::getPluginHostConnection):
4242 * UIProcess/WebProcessProxy.h:
4243 * UIProcess/WebUIClient.h:
4244 * WebProcess/InjectedBundle/InjectedBundle.h:
4245 (WebKit::InjectedBundle::create):
4246 (WebKit::InjectedBundle::setSandboxToken):
4247 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
4248 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
4249 (WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
4250 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
4251 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
4252 * WebProcess/Plugins/NPRuntimeObjectMap.h:
4253 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
4254 * WebProcess/Plugins/Netscape/NetscapePluginModule.h:
4255 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
4256 (WebKit::NetscapePluginStream::start):
4257 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
4258 * WebProcess/Plugins/Plugin.h:
4259 * WebProcess/Plugins/PluginController.h:
4260 * WebProcess/Plugins/PluginView.h:
4261 * WebProcess/WebCoreSupport/WebChromeClient.h:
4262 * WebProcess/WebCoreSupport/WebContextMenuClient.h:
4263 * WebProcess/WebCoreSupport/WebDragClient.h:
4264 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
4265 (WebKit::WebEditorClient::showCorrectionPanel):
4266 * WebProcess/WebCoreSupport/WebEditorClient.h:
4267 * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
4268 * WebProcess/WebCoreSupport/WebInspectorClient.h:
4269 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
4270 * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
4271 (WebKit::WebSearchPopupMenu::saveRecentSearches):
4272 (WebKit::WebSearchPopupMenu::loadRecentSearches):
4273 * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
4274 * WebProcess/WebPage/WebFrame.h:
4275 * WebProcess/WebPage/WebPage.cpp:
4276 (WebKit::WebPage::runJavaScriptInMainFrame):
4277 * WebProcess/WebPage/WebPage.h:
4278 * WebProcess/WebProcess.cpp:
4279 (WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
4280 * WebProcess/WebProcess.h:
4282 2010-09-17 Sam Weinig <sam@webkit.org>
4284 Fix Windows and Qt builds.
4286 * Shared/qt/PlatformCertificateInfo.h:
4287 (WebKit::PlatformCertificateInfo::decode):
4288 * Shared/win/PlatformCertificateInfo.h:
4289 (WebKit::PlatformCertificateInfo::decode):
4291 2010-09-17 Darin Adler <darin@apple.com>
4293 Reviewed by Sam Weinig.
4295 REGRESSION (r60104): Zoom level is unexpectedly reset on page reload