1 2010-07-19 Balazs Kelemen <kb@inf.u-szeged.hu>
3 Reviewed by Kenneth Rohde Christiansen.
5 [Qt] Setup the QtWebProcess
7 https://bugs.webkit.org/show_bug.cgi?id=42623
9 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
10 Remove the framework entry point from here to WebProcess/qt/WebProcessMainQt.cpp to match with with the mac and the win port.
12 * WebProcess/qt/WebProcessMainQt.cpp: Added.
13 (WebKit::WebProcessMainQt): Framework entry point for Qt.
14 * qt/MainQt.cpp: Added.
17 2010-07-22 Darin Adler <darin@apple.com>
19 Reviewed by Sam Weinig.
21 Eliminate unneeded WKBundleFrameCopyInnerText function from WebKit2
22 https://bugs.webkit.org/show_bug.cgi?id=42847
24 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: Removed WKBundleFrameCopyInnerText.
25 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
26 * WebProcess/WebPage/WebFrame.cpp: Removed innerText.
27 * WebProcess/WebPage/WebFrame.h: Ditto.
29 2010-07-22 Alexey Proskuryakov <ap@apple.com>
31 More Windows build fixing.
33 * win/WebKit2Generated.make: Copy the new public headers to $(WEBKITOUTPUTDIR)\include\WebKit2.
35 2010-07-22 Alexey Proskuryakov <ap@apple.com>
39 * win/WebKit2.vcproj: Added new files.
41 2010-07-22 Alexey Proskuryakov <ap@apple.com>
43 Reviewed by Sam Weinig and Darin Adler.
45 https://bugs.webkit.org/show_bug.cgi?id=42193
46 Support layoutTestController.dumpEditingDelegates in WebKitTestRunner
48 Step 1: Add the method, and implement one actual delegate call as proof of concept. No tests
49 fixed, but this makes difference one line smaller on many editing tests.
51 * WebKit2.xcodeproj/project.pbxproj:
52 * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
53 * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
54 * WebProcess/InjectedBundle/API/c/WKBundleNode.cpp: Added.
55 (WKBundleNodeCopyNodeName):
56 (WKBundleNodeGetParent):
57 * WebProcess/InjectedBundle/API/c/WKBundleNode.h: Added.
58 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
59 (WKBundlePageSetEditorClient):
60 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
61 * WebProcess/InjectedBundle/API/c/WKBundleRange.cpp: Added.
62 (WKBundleRangeGetStartOffset):
63 (WKBundleRangeGetStartContainer):
64 (WKBundleRangeGetEndOffset):
65 (WKBundleRangeGetEndContainer):
66 * WebProcess/InjectedBundle/API/c/WKBundleRange.h: Added.
67 Added WKBundleRangeRef and WKBundleNodeRef types for injected bundles. These are just pointers
68 to respective WebCore objects, without any WebKit2 wrappers.
70 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp: Added.
71 (WebKit::InjectedBundlePageEditorClient::InjectedBundlePageEditorClient):
72 (WebKit::InjectedBundlePageEditorClient::initialize):
73 (WebKit::InjectedBundlePageEditorClient::shouldBeginEditing):
74 * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: Added.
75 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
76 (WebKit::WebEditorClient::shouldBeginEditing):
77 * WebProcess/WebPage/WebPage.cpp:
78 (WebKit::WebPage::initializeInjectedBundleEditorClient):
79 * WebProcess/WebPage/WebPage.h:
80 (WebKit::WebPage::injectedBundleEditorClient):
81 Added the plumbing for invoking injected bundle code for editor client. There is no real API
82 for editor client yet.
84 2010-07-22 Ivan Krstić <ike@apple.com>
86 Reviewed by Anders Carlsson.
88 Adapt sandbox for new WebProcess bootstrap service naming scheme.
89 <rdar://problem/8225000>
91 * WebProcess/com.apple.WebProcess.sb:
93 2010-07-22 Anders Carlsson <andersca@apple.com>
95 Reviewed by Adam Roben.
97 It should be possible to attach to the WebProcess in gdb during startup
98 https://bugs.webkit.org/show_bug.cgi?id=42853
100 Create an unique bootstrap service name and pass it to the web process, instead of registering a per process
101 name (which was incorrect anyway). This lets us get rid of the requirement that the UI process always should be
102 the parent process of the web process, something which is false when running under the debugger.
104 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
105 (WebKit::ProcessLauncher::launchProcess):
106 * WebProcess/mac/WebProcessMainMac.mm:
107 (WebKit::WebProcessMain):
109 2010-07-22 Anders Carlsson <andersca@apple.com>
111 Reviewed by Sam Weinig.
113 Don't assert when Connection::invalidate is called before Connection::dispatchConnectionDidClose
114 https://bugs.webkit.org/show_bug.cgi?id=42851
116 * Platform/CoreIPC/Connection.cpp:
117 (CoreIPC::Connection::dispatchConnectionDidClose):
118 Just return early if m_client is 0.
120 2010-07-22 Adam Roben <aroben@apple.com>
122 Use ::MessageBox instead of ::DebugBreak to make the web process wait
125 While ::DebugBreak can make it easier to attach a debugger (because it
126 brings up the Just-in-Time debugger window), using ::MessageBox has
128 1) It explains to the user what's going on, so it's harder to
129 mistake this debugging aid for a bug.
130 2) It allows you to debug the UI process and the web process using
131 the same debugger, if desired.
133 Special thanks to John Sullivan for help with the text that's shown in
136 Fixes <http://webkit.org/b/42848> WebKit2's wait-for-debugger
137 debugging aid should explain to the user what's happening
139 Reviewed by John Sullivan and Anders Carlsson.
141 * WebProcess/WebKitMain.cpp:
142 (WebKitMain): Use a ::MessageBox instead of a ::DebugBreak to wait for
143 the debugger. The alert explains to the user what's going on.
145 2010-07-22 Adam Roben <aroben@apple.com>
147 Make WorkQueue aware of potential errors with ::WaitForMultipleObjects
149 Fixes <http://webkit.org/b/42846> WorkQueue should detect
150 ::WaitForMultipleObject failures
152 Reviewed by Anders Carlsson.
154 * Platform/win/WorkQueueWin.cpp:
155 (WorkQueue::workQueueThreadBody): Added some assertions about the
156 various things that can fail with ::WaitForMultipleObjects,
158 - Passing too many objects
159 - Timeouts (which shouldn't happen since we pass a timeout interval
161 - Abandoned mutexes (which shouldn't happen since we don't wait on
162 any mutexes currently)
163 - Miscellaneous failures
165 2010-07-22 Sam Weinig <sam@webkit.org>
167 Reviewed by Anders Carlsson.
169 Patch for https://bugs.webkit.org/show_bug.cgi?id=42836
170 Add localized strings stubs for WebKit2.
172 Gets us below 200 tests failing in WebKitTestRunner.
174 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
175 * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
177 2010-07-22 Andras Becsi <abecsi@webkit.org>
179 Unreviewed trivial build fix.
181 [Qt] Mend remaining issues to fix the WebKit2 build.
183 * Shared/qt/UpdateChunk.h: add missing function
184 (WebKit::UpdateChunk::isEmpty):
185 * UIProcess/API/qt/qwkpage_p.h: Add stub implementation
186 (QWKPagePrivate::pageDidEnterAcceleratedCompositing):
187 (QWKPagePrivate::pageDidLeaveAcceleratedCompositing):
189 2010-07-22 Andras Becsi <abecsi@webkit.org>
191 Reviewed by Antonio Gomes.
193 [Qt] Implement WebContext::applicationCacheDirectory() for the Qt port of WebKit2.
194 https://bugs.webkit.org/show_bug.cgi?id=42830
196 * UIProcess/qt/WebContextQt.cpp: Added.
197 (WebKit::WebContext::applicationCacheDirectory):
199 2010-07-22 Balazs Kelemen <kb@inf.u-szeged.hu>
201 Unreviewed build fix.
203 [Qt] Fix WebKit2 build
205 https://bugs.webkit.org/show_bug.cgi?id=42638
207 * UIProcess/API/qt/qwkpage_p.h:
208 (QWKPagePrivate::setCursor): Added empty implementation.
210 2010-07-22 Balazs Kelemen <kb@inf.u-szeged.hu>
212 Reviewed by Antonio Gomes.
214 Lazy cursor creation should be guarded by #if USE(LAZY_NATIVE_CURSOR) in WebKit2
216 https://bugs.webkit.org/show_bug.cgi?id=42622
218 * Shared/WebCoreArgumentCoders.h:
219 * UIProcess/WebPageProxy.cpp:
220 (WebKit::WebPageProxy::didReceiveMessage):
221 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
222 (WebKit::WebChromeClient::setCursor):
224 2010-07-22 Jon Honeycutt <jhoneycutt@apple.com>
226 Build fix. Unreviewed.
228 * win/WebKit2WebProcess.vcproj:
229 Remove the pre- and post-build events, so that they will use the value
230 inherited from the vsprops.
232 2010-07-21 Darin Adler <darin@apple.com>
234 Reviewed by Sam Weinig.
236 WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
237 https://bugs.webkit.org/show_bug.cgi?id=42548
239 Added WKBundleFrameCopyName.
241 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
242 (WKBundleFrameCopyName): Added.
243 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
245 * WebProcess/WebPage/WebFrame.cpp:
246 (WebKit::WebFrame::name): Added.
247 * WebProcess/WebPage/WebFrame.h: Ditto.
249 2010-07-21 Darin Adler <darin@apple.com>
251 Reviewed by Sam Weinig.
253 WebKitTestRunner needs to support dumping of scroll position
254 https://bugs.webkit.org/show_bug.cgi?id=42514
256 Added WKBundleFrameGetJavaScriptContext function.
258 * WebKit2.xcodeproj: Added property svn:ignore.
260 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
261 (WKBundleFrameGetJavaScriptContext): Added.
262 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
264 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
265 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
266 (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
267 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
268 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
269 (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
270 Use JSGlobalContextRef instead of JSContextRef and context instead of ct.
272 2010-07-21 Adam Roben <aroben@apple.com>
274 Handle broken pipes in more places in CoreIPC
276 Fixes <http://webkit.org/b/42784> Assertion failure in
277 Connection::readEventHandler when WebKitTestRunner exits
279 Reviewed by Anders Carlsson.
281 * Platform/CoreIPC/win/ConnectionWin.cpp:
282 (CoreIPC::Connection::readEventHandler): Check for a broken pipe
283 whenever we call ::PeekNamedPipe.
285 2010-07-21 Adam Roben <aroben@apple.com>
287 Teach CoreIPC how to handle messages that are larger than the pipe's
290 ::GetOverlappedResult and ::ReadFile can fail with ERROR_MORE_DATA
291 when there is more data available on the pipe than was requested in
292 the read operation. In those cases, the appropriate response is to
293 perform another read operation to read the extra data. We now do this.
295 Also, MSDN says that, because we are doing asynchronous read
296 operations, we should not pass a pointer to ::ReadFile to find out how
297 many bytes were read. Instead we should always call
298 ::GetOverlappedResult to find this out. I've changed
299 Connection::readEventHandler to have a single loop that calls
300 ::GetOverlappedResult and ::ReadFile in alternation, rather than
301 sometimes calling ::ReadFile multiple times in a row, to satisfy this
304 In order to simplify the logic in this function, I've made us request
305 only a single byte from the pipe when there are no messages already in
306 the pipe. (Previously we were requesting 4096 bytes in this case.)
307 This allows us not to have to consider the case where the received
308 message is smaller than our read buffer. If we decide that this has a
309 negative impact on performance, we can of course change it. I've
310 mitigated this somewhat by using ::PeekNamedMessage to find out the
311 size of the next message in the pipe (if any), so that we can read it
312 all in one read operation.
314 Fixes <http://webkit.org/b/42710> <rdar://problem/8197571> Assertion
315 in Connection::readEventHandler when launching WebKitTestRunner
317 Reviewed by Anders Carlsson.
319 * Platform/CoreIPC/win/ConnectionWin.cpp:
320 (CoreIPC::Connection::readEventHandler): Put the call to
321 ::GetOverlappedResult in the same loop as ::ReadFile so that we will
322 call them alternately. If ::GetOverlappedResult fails with
323 ERROR_MORE_DATA, use ::PeekNamedPipe to determine the size of the rest
324 of the message, then read it from the pipe. After dispatching the
325 message, use ::PeekNamedPipe to find out the size of the next message
326 in the pipe so we can read it all in one operation. If there's no
327 message in the pipe, we'll request just a single byte of the next
328 message that becomes available, and Windows will tell us when the rest
329 of the message is ready. If ::ReadFile fails with ERROR_MORE_DATA it
330 means there is data available now even though we didn't think there
331 was any. We go back to the top of the loop in this case and call
332 ::GetOverlappedResult again to retrieve the available data.
334 2010-07-21 Sam Weinig <sam@webkit.org>
336 Reviewed by Anders Carlsson.
338 Patch for https://bugs.webkit.org/show_bug.cgi?id=42539
339 WebKitTestRunner needs to support printing ALERT, PROMPT and CONFIRM messages
341 - Convert injected bundle UIClient functions to will-style, at least until we establish
342 more concrete use cases for them past the TestRunner.
344 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
345 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
346 (WebKit::InjectedBundlePageUIClient::willAddMessageToConsole):
347 (WebKit::InjectedBundlePageUIClient::willSetStatusbarText):
348 (WebKit::InjectedBundlePageUIClient::willRunJavaScriptAlert):
349 (WebKit::InjectedBundlePageUIClient::willRunJavaScriptConfirm):
350 (WebKit::InjectedBundlePageUIClient::willRunJavaScriptPrompt):
351 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
352 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
353 (WebKit::WebChromeClient::addMessageToConsole):
354 (WebKit::WebChromeClient::runJavaScriptAlert):
355 (WebKit::WebChromeClient::runJavaScriptConfirm):
356 (WebKit::WebChromeClient::runJavaScriptPrompt):
357 (WebKit::WebChromeClient::setStatusbarText):
359 2010-07-21 Simon Fraser <simon.fraser@apple.com>
363 Need to supply implementations of PageClient::pageDidEnterAcceleratedCompositing()
364 and pageDidLeaveAcceleratedCompositing() for WebView on Windows.
366 * UIProcess/win/WebView.cpp:
367 (WebKit::WebView::pageDidEnterAcceleratedCompositing):
368 (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
369 * UIProcess/win/WebView.h:
371 2010-07-21 Anders Carlsson <andersca@apple.com>
373 Reviewed by Sam Weinig.
375 Don't assert when clicking on a plug-in in WebKit2
376 https://bugs.webkit.org/show_bug.cgi?id=42762
378 Add stub for PluginView::handleEvent.
380 * WebProcess/Plugins/PluginView.cpp:
381 (WebKit::PluginView::handleEvent):
382 * WebProcess/Plugins/PluginView.h:
384 2010-07-21 Simon Fraser <simon.fraser@apple.com>
386 Reviewed by Anders Carlsson.
388 Get accelerated compositing working with webkit2
389 https://bugs.webkit.org/show_bug.cgi?id=41084
391 Hook up dynamic DrawingArea switching, so that when the WebProcess hits a page
392 that requires accelerated compositing, we switch to the LayerBackedDrawingArea.
394 * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
395 (DrawingAreaProxyMessage::):
396 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
397 (WebPageProxyMessage::):
398 * UIProcess/API/mac/PageClientImpl.h:
399 * UIProcess/API/mac/PageClientImpl.mm:
400 (WebKit::PageClientImpl::pageDidEnterAcceleratedCompositing):
401 (WebKit::PageClientImpl::pageDidLeaveAcceleratedCompositing):
402 * UIProcess/API/mac/WKView.mm:
403 (-[WKView _startAcceleratedCompositing:]):
404 (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaProxy::]):
405 (-[WKView _pageDidEnterAcceleratedCompositing]):
406 (-[WKView _pageDidLeaveAcceleratedCompositing]):
407 * UIProcess/API/mac/WKViewInternal.h:
408 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
409 (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveSyncMessage):
410 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
411 * UIProcess/DrawingAreaProxy.h:
412 (WebKit::DrawingAreaProxy::):
413 (WebKit::DrawingAreaProxy::type):
414 * UIProcess/LayerBackedDrawingAreaProxy.cpp:
415 (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
416 (WebKit::LayerBackedDrawingAreaProxy::didReceiveMessage):
417 (WebKit::LayerBackedDrawingAreaProxy::didReceiveSyncMessage):
418 * UIProcess/LayerBackedDrawingAreaProxy.h:
419 * UIProcess/PageClient.h:
420 * UIProcess/WebPageProxy.cpp:
421 (WebKit::WebPageProxy::setDrawingArea):
422 (WebKit::WebPageProxy::didReceiveSyncMessage):
423 (WebKit::WebPageProxy::didEnterAcceleratedCompositing):
424 (WebKit::WebPageProxy::didLeaveAcceleratedCompositing):
425 * UIProcess/WebPageProxy.h:
426 * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
427 (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
428 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
429 (WebKit::WebChromeClient::attachRootGraphicsLayer):
430 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
431 (WebKit::ChunkedUpdateDrawingArea::attachCompositingContext):
432 (WebKit::ChunkedUpdateDrawingArea::setRootCompositingLayer):
433 * WebProcess/WebPage/DrawingArea.cpp:
434 (WebKit::DrawingArea::create):
435 * WebProcess/WebPage/DrawingArea.h:
436 (WebKit::DrawingArea::):
437 (WebKit::DrawingArea::type):
438 * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
439 (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
440 (WebKit::LayerBackedDrawingArea::setNeedsDisplay):
441 (WebKit::LayerBackedDrawingArea::setSize):
442 (WebKit::LayerBackedDrawingArea::didUpdate):
443 (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
444 * WebProcess/WebPage/LayerBackedDrawingArea.h:
445 * WebProcess/WebPage/WebPage.cpp:
446 (WebKit::WebPage::changeAcceleratedCompositingMode):
447 (WebKit::WebPage::enterAcceleratedCompositingMode):
448 (WebKit::WebPage::exitAcceleratedCompositingMode):
449 * WebProcess/WebPage/WebPage.h:
450 * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
451 (WebKit::LayerBackedDrawingArea::platformInit):
452 (WebKit::LayerBackedDrawingArea::attachCompositingContext):
453 (WebKit::LayerBackedDrawingArea::detachCompositingContext):
454 (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
456 2010-07-20 Steve Falkenburg <sfalken@apple.com>
458 Reviewed by Adam Roben.
460 WebKit on Windows should build optionally with an unversioned ICU DLL
461 https://bugs.webkit.org/show_bug.cgi?id=42722
462 <rdar://problem/8211767> WebKit needs to link against unversioned ICU
464 To get the proper value for U_DISABLE_RENAMING into all source files, we force
465 the include of ICUVersion.h (our generated header) via the compiler options.
467 Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib)
468 we copy the ICU lib to an intermediate location under obj with a common name. This
469 allows us to link properly with either without adding a new build configuration.
471 * win/WebKit2Common.vsprops:
472 Copy ICU libs into a common location with a common name.
473 Add additional library search path to pick up icu lib.
474 Change ICU library filename specified to linker.
475 Add forced include of ICUVersion.h.
477 2010-07-21 Adam Roben <aroben@apple.com>
481 * Shared/win/UpdateChunk.h:
482 (WebKit::UpdateChunk::isEmpty): Added to match the Mac definition.
484 2010-07-21 Anders Carlsson <andersca@apple.com>
486 Land file I forgot to add.
488 * WebProcess/com.apple.WebProcess.sb: Added.
490 2010-07-21 Adam Roben <aroben@apple.com>
492 Move WebKit2WebProcess's settings to a vsprops file
494 Fixes <http://webkit.org/b/42751> WebKit2WebProcess should use vsprops
497 Reviewed by Darin Adler.
499 * win/WebKit2WebProcess.vcproj: Moved settings from here...
500 * win/WebKit2WebProcessCommon.vsprops: ...to here.
502 2010-07-20 Ivan Krstić <ike@apple.com>
504 Reviewed and tweaked by Anders Carlsson and Sam Weinig.
506 Put WebProcess in a sandbox. All of the following changes are
508 <rdar://problem/7865269>
510 * UIProcess/WebProcessProxy.cpp:
511 (WebKit::WebProcessProxy::WebProcessProxy):
512 Send Sandbox extension for injected bundle to WebProcess.
514 * WebKit2.xcodeproj/project.pbxproj:
515 Add Sandbox profile to Resources for WebProcess.
517 * WebProcess/InjectedBundle/InjectedBundle.h:
518 New function InjectedBundle::setSandboxToken.
520 * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
521 (WebKit::InjectedBundle::load):
522 Consume Sandbox token for the bundle if present.
524 (WebKit::InjectedBundle::setSandboxToken):
525 Set Sandbox token for the bundle.
527 * WebProcess/WebProcess.cpp:
528 (WebKit::WebProcess::loadInjectedBundle):
529 Extra function parameter for Sandbox token.
531 (WebKit::WebProcess::didReceiveMessage):
532 Pass Sandbox token to loadInjectedBundle().
534 * WebProcess/WebProcess.h:
535 Extra function parameter for Sandbox token in loadInjectedBundle().
537 * WebProcess/com.apple.WebProcess.sb: Added.
538 Sandbox profile for WebProcess.
540 * WebProcess/mac/WebProcessMainMac.mm:
541 (WebKit::WebProcessMain):
542 Initialize Sandbox, exit on failure.
544 2010-07-20 Sam Weinig <sam@webkit.org>
546 Reviewed by Brady Eidson.
548 Patch for https://bugs.webkit.org/show_bug.cgi?id=42719
549 Make Acid2 pass in WebKit2
551 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
552 (WebKit::WebFrameLoaderClient::objectContentType): Check for supported image mimetypes
553 before falling back to plugins.
555 2010-07-20 Adam Roben <aroben@apple.com>
559 WebKit.sln builds all the same projects.
561 Rubber-stamped in advance by Steve Falkenburg.
563 * WebKit2.sln: Removed.
565 2010-07-20 Adam Roben <aroben@apple.com>
567 Make the web process break into the debugger when Ctrl-Alt-Shift is
570 Fixes <http://webkit.org/b/42670> Would like a way to break into the
571 debugger when the web process launches
573 Reviewed by Anders Carlsson.
575 * WebProcess/WebKitMain.cpp:
576 (WebKitMain): If the Control, Alt, and Shift keys are held down in a
577 Debug build, call DebugBreak() so that we will break into the
580 2010-07-20 Adam Roben <aroben@apple.com>
582 Teach Connection how to handle a slow receiver
584 Fixes <http://webkit.org/b/42667> Assertion in
585 Connection::sendOutgoingMessage when browser or web process is paused
587 Reviewed by Anders Carlsson.
589 * Platform/CoreIPC/win/ConnectionWin.cpp:
590 (CoreIPC::Connection::sendOutgoingMessage): If WriteFile returns FALSE
591 and the last error is ERROR_IO_PENDING, Windows will write the data as
592 soon as the current write operation is completed. We don't need to do
593 anything special in this case, so there's no need to assert about it.
595 2010-07-20 Anders Carlsson <andersca@apple.com>
597 Reviewed by Dan Bernstein.
599 Handle WKView visibility changes
600 <rdar://problem/7891077>
602 * Shared/mac/UpdateChunk.h:
603 (WebKit::UpdateChunk::isEmpty):
604 Add convenience getter.
606 * UIProcess/API/mac/WKView.mm:
607 (-[WKView viewDidMoveToWindow]):
608 Reorder the calls to _updateActiveState and _updateVisibility based on whether the view is moved to
609 a window or away from a window.
611 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
612 (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
613 Initialize m_forceRepaintWhenResumingPainting to false.
615 (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
616 Pass the m_forceRepaintWhenResumingPainting along to the DrawingAreaMessage::ResumePainting message.
618 (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
619 Don't try to paint empty update chunks.
621 (WebKit::ChunkedUpdateDrawingAreaProxy::update):
622 Don't paint the update chunk if we're not visible. Instead, make sure that the entire page is being redrawn
623 when its shown again.
625 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
626 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
627 (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
628 (WebKit::ChunkedUpdateDrawingArea::display):
629 (WebKit::ChunkedUpdateDrawingArea::suspendPainting):
630 Rename m_shouldPaint to m_isPaintingSuspended and invert its logic.
632 (WebKit::ChunkedUpdateDrawingArea::scheduleDisplay):
633 Don't schedule a display timer if the dirty rect is empty.
635 (WebKit::ChunkedUpdateDrawingArea::setSize):
636 If painting is suspended, just send back an empty update chunk in the DidSetSize message.
638 (WebKit::ChunkedUpdateDrawingArea::resumePainting):
639 If forceRepaint is true, repaint the entire drawing area.
641 2010-07-20 Anders Carlsson <andersca@apple.com>
643 Reviewed by Dan Bernstein.
645 Implement NPN_GetURL and NPN_PostURL
646 https://bugs.webkit.org/show_bug.cgi?id=42650
648 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
649 (WebKit::parsePostBuffer):
650 Add a FIXME about deleting the file.
652 (WebKit::makeURLString):
653 Move this static method before NPN_GetURL.
655 (WebKit::NPN_GetURL):
656 Call NetscapePLugin::LoadURL.
658 (WebKit::NPN_PostURL):
661 (WebKit::NPN_PostURLNotify):
662 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
663 Remove unreached code.
665 (WebKit::NetscapePluginStream::deliverDataToPlugin):
666 Stop the stream if the plug-in returns -1 from NPP_Write.
668 2010-07-19 Anders Carlsson <andersca@apple.com>
670 Reviewed by Sam Weinig.
672 WebKitTestRunner and WebProcess simultaneously stall in CoreIPC::Connection::sendOutgoingMessage
673 https://bugs.webkit.org/show_bug.cgi?id=42356
675 Up the port queue length from 5 to 1024. While this does solve the problem, we should still try to
676 make sendOutgoingMessage not block. I've filed https://bugs.webkit.org/show_bug.cgi?id=42611 to track
677 doing this on Mac and Windows.
679 * Platform/CoreIPC/mac/ConnectionMac.cpp:
680 (CoreIPC::Connection::open):
681 Call setMachPortQueueLength.
683 * Platform/mac/MachUtilities.cpp: Added.
684 (setMachPortQueueLength):
685 Given a mach port receive right, sets the port queue length.
687 * Platform/mac/MachUtilities.h: Added.
689 * WebKit2.xcodeproj/project.pbxproj:
690 Add MachUtilities.cpp and MachUtilities.h
692 2010-07-19 Anders Carlsson <andersca@apple.com>
694 Reviewed by Darin Adler, Adam Roben, Dan Bernstein and Sam Weinig.
696 Handle NP_ASFILE and NP_ASFILEONLY transfer modes
697 https://bugs.webkit.org/show_bug.cgi?id=42587
699 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
700 (WebKit::NetscapePlugin::NPP_StreamAsFile):
701 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
704 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
705 (WebKit::NetscapePluginStream::NetscapePluginStream):
706 Initialize m_fileHandle.
708 (WebKit::isSupportedTransferMode):
709 NP_ASFILE and NP_ASFILEONLY is now supported.
711 (WebKit::NetscapePluginStream::deliverData):
712 Call deliverDataToFile if necessary.
714 (WebKit::NetscapePluginStream::deliverDataToFile):
715 Create a temporary file and write the data into it.
717 (WebKit::NetscapePluginStream::stop):
718 If the transfer mode is either NP_ASFILE or NP_ASFILEONLY, make sure to
719 call NPP_StreamAsFile and close the file and delete it.
721 * WebProcess/Plugins/PluginView.cpp:
722 (WebKit::PluginView::cancelStreamLoad):
723 Keep a reference to the Stream since cancelling it will remove it from the map.
725 2010-07-19 Anders Carlsson <andersca@apple.com>
727 Reviewed by Sam Weinig.
729 Implement NPN_PostURLNotify
730 https://bugs.webkit.org/show_bug.cgi?id=42602
732 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
733 (WebKit::parsePostBuffer):
734 Read the buffer from a file if necessary and parse it.
736 (WebKit::NPN_GetURLNotify):
739 (WebKit::NPN_PostURLNotify):
740 Parse the post buffer, then call NetscapePlugin::loadURL.
742 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
743 (WebKit::NetscapePlugin::loadURL):
744 Pass the method, the header fields and form data along.
746 (WebKit::NetscapePlugin::allowPopups):
747 Just return false for now.
749 (WebKit::NetscapePlugin::initialize):
750 Pass extra arguments to loadURL.
752 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
753 * WebProcess/Plugins/PluginController.h:
754 Add method, header fields and form data.
756 * WebProcess/Plugins/PluginView.cpp:
757 (WebKit::PluginView::loadURL):
758 Set the method, add the header fields and set the body.
760 2010-07-19 Sam Weinig <sam@webkit.org>
762 Reviewed by Darin Adler.
764 Add local storage support for WebKit2
765 https://bugs.webkit.org/show_bug.cgi?id=42584
767 * Shared/WebPreferencesStore.cpp:
768 (WebKit::WebPreferencesStore::WebPreferencesStore):
769 (WebKit::WebPreferencesStore::swap):
770 * Shared/WebPreferencesStore.h:
771 (WebKit::WebPreferencesStore::encode):
772 (WebKit::WebPreferencesStore::decode):
773 * UIProcess/API/C/WKPreferences.cpp:
774 (WKPreferencesSetLocalStorageEnabled):
775 (WKPreferencesGetLocalStorageEnabled):
776 * UIProcess/API/C/WKPreferences.h:
777 * UIProcess/WebPreferences.cpp:
778 (WebKit::WebPreferences::setLocalStorageEnabled):
779 (WebKit::WebPreferences::localStorageEnabled):
780 * UIProcess/WebPreferences.h:
781 * WebProcess/WebPage/WebPage.cpp:
782 (WebKit::WebPage::WebPage):
783 (WebKit::WebPage::preferencesDidChange):
785 2010-07-19 Simon Fraser <simon.fraser@apple.com>
787 Reviewed by Anders Carlsson.
789 Uae an OwnPtr for the drawing area in WebPage (fixes a leak!).
791 * WebProcess/WebPage/WebPage.h:
792 (WebKit::WebPage::drawingArea):
794 2010-07-19 Anders carlsson <andersca@apple.com>
796 Reviewed by Adam Roben.
798 WebKit2 does not have application cache
799 https://bugs.webkit.org/show_bug.cgi?id=42552
801 * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
802 (WebProcessMessage::):
803 Add SetApplicationCacheDirectory.
805 * Shared/WebPreferencesStore.h:
806 (WebKit::WebPreferencesStore::encode):
807 (WebKit::WebPreferencesStore::decode):
808 add offlineWebApplicationCacheEnabled.
810 * UIProcess/API/C/WKPreferences.cpp:
811 (WKPreferencesSetOfflineWebApplicationCacheEnabled):
812 (WKPreferencesGetOfflineWebApplicationCacheEnabled):
813 * UIProcess/API/C/WKPreferences.h:
814 Add getters/setters for whether the application cache is enabled.
816 * UIProcess/WebContext.h:
817 * UIProcess/WebPreferences.cpp:
818 (WebKit::WebPreferences::setOfflineWebApplicationCacheEnabled):
819 Update the store and call update().
821 * UIProcess/WebPreferences.h:
822 * UIProcess/WebProcessProxy.cpp:
823 (WebKit::WebProcessProxy::WebProcessProxy):
824 Ask the web process to set the application cache directory.
826 * UIProcess/mac/WebContextMac.mm: Added.
827 (WebKit::WebContext::applicationCacheDirectory):
828 Return the application cache directory.
830 * UIProcess/win/WebContextWin.cpp: Added.
831 (WebKit::WebContext::applicationCacheDirectory):
834 * WebKit2.xcodeproj/project.pbxproj:
837 * WebProcess/WebPage/WebPage.cpp:
838 (WebKit::WebPage::preferencesDidChange):
840 (WebKit::WebPage::didReceiveMessage):
841 Handle PreferencesDidChange. Get rid of the default: case statement so we'll
842 get warnings if we have unhandled message kinds.
844 * WebProcess/WebProcess.cpp:
845 (WebKit::WebProcess::setApplicationCacheDirectory):
846 Set the application cache directory.
848 (WebKit::WebProcess::didReceiveMessage):
849 Handle SetApplicationCacheDirectory.
852 Add WebContextWin.cpp
854 2010-07-18 Anders Carlsson <andersca@apple.com>
856 Another attempt at fixing the Windows build.
858 * WebProcess/Plugins/NPJSObjectMap.h:
860 2010-07-18 Anders Carlsson <andersca@apple.com>
862 Try to fix Windows build.
864 * win/WebKit2.vcproj:
866 2010-07-18 Anders Carlsson <andersca@apple.com>
868 Reviewed by Sam Weinig.
871 https://bugs.webkit.org/show_bug.cgi?id=42526
873 * WebProcess/Plugins/NPJSObjectMap.cpp:
874 (WebKit::identifierFromIdentifierRep):
875 (WebKit::NPJSObject::hasProperty):
876 Check if the JSObject has the given property.
878 (WebKit::NPJSObject::getProperty):
879 Add stubbed out function.
881 (WebKit::NPJSObject::npClass):
882 Add NP_HasProperty and NP_GetProperty.
884 (WebKit::NPJSObject::NP_HasProperty):
885 Call NPJSObject::hasProperty.
887 (WebKit::NPJSObject::NP_GetProperty):
888 Call NPJSObject::getProperty.
890 * WebProcess/Plugins/NPRuntimeUtilities.cpp:
891 (WebKit::releaseNPVariantValue):
892 Release the given NPVariant.
894 * WebProcess/Plugins/NPRuntimeUtilities.h:
895 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
896 (WebKit::NPN_GetProperty):
897 Call the NPClass GetProperty function.
899 (WebKit::NPN_HasProperty):
900 Call the NPClass HasProperty function.
902 (WebKit::NPN_ReleaseVariantValue):
903 Call releaseNPVariantValue.
905 2010-07-18 Anders Carlsson <andersca@apple.com>
907 Reviewed by Sam Weinig.
909 Add NPJSObjectMap class
910 https://bugs.webkit.org/show_bug.cgi?id=42524
912 * WebKit2.xcodeproj/project.pbxproj:
915 * WebProcess/Plugins/NPJSObjectMap.cpp: Added.
916 * WebProcess/Plugins/NPJSObjectMap.h: Added.
917 Add NPJSObjectMap, a map which contains NPObjects that wrap JavaScript objects.
919 * WebProcess/Plugins/PluginView.cpp:
920 (WebKit::PluginView::PluginView):
923 (WebKit::PluginView::~PluginView):
926 (WebKit::PluginView::frame):
929 (WebKit::PluginView::windowScriptNPObject):
930 Wrap the window object.
932 (WebKit::PluginView::pluginElementNPObject):
933 Wrap the plug-in element object.
935 * WebProcess/Plugins/PluginView.h:
937 2010-07-18 Anders Carlsson <andersca@apple.com>
939 Reviewed by Sam Weinig.
941 Implement more NPRuntime related NPN_ functions
942 https://bugs.webkit.org/show_bug.cgi?id=42520
944 * WebKit2.xcodeproj/project.pbxproj:
945 * WebProcess/Plugins/NPRuntimeUtilities.cpp: Added.
946 * WebProcess/Plugins/NPRuntimeUtilities.h: Added.
947 Add new file with NPRuntime related utility functions.
949 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
950 (WebKit::NPN_CreateObject):
951 (WebKit::NPN_RetainObject):
952 (WebKit::NPN_ReleaseObject):
953 Call the corresponding NPRuntimeUtilities functions.
955 2010-07-18 Anders Carlsson <andersca@apple.com>
957 Reviewed by Dan Bernstein.
959 Begin work on NPRuntime support
960 https://bugs.webkit.org/show_bug.cgi?id=42519
962 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
963 (WebKit::NPN_GetValue):
964 Handle NPNVWindowNPObject and NPNVPluginElementNPObject.
966 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
967 (WebKit::NetscapePlugin::windowScriptNPObject):
968 (WebKit::NetscapePlugin::pluginElementNPObject):
969 Call the plug-in controller.
971 * WebProcess/Plugins/PluginController.h:
972 Add new windowScriptNPObject and pluginElementNPObject functions.
974 * WebProcess/Plugins/PluginView.cpp:
975 (WebKit::PluginView::windowScriptNPObject):
976 (WebKit::PluginView::pluginElementNPObject):
977 Add stubbed out functions.
979 2010-07-18 Anders Carlsson <andersca@apple.com>
981 Reviewed by Dan Bernstein.
983 Implement some NPRuntime related NPN_ functions
984 https://bugs.webkit.org/show_bug.cgi?id=42518
986 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
987 (WebKit::NPN_GetStringIdentifier):
988 (WebKit::NPN_GetStringIdentifiers):
989 (WebKit::NPN_GetIntIdentifier):
990 (WebKit::NPN_IdentifierIsString):
991 (WebKit::NPN_UTF8FromIdentifier):
992 (WebKit::NPN_IntFromIdentifier):
993 (WebKit::NPN_CreateObject):
995 2010-07-18 Anders Carlsson <andersca@apple.com>
997 Reviewed by Dan Bernstein.
999 Add dumping of statusbar text to WebKitTestRunner
1000 https://bugs.webkit.org/show_bug.cgi?id=42516
1002 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1003 Add setStatusbarText callback to WKBundlePageUIClient.
1005 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1006 (WebKit::InjectedBundlePageUIClient::setStatusbarText):
1007 Call setStatusbarText.
1009 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1010 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1011 (WebKit::WebChromeClient::setStatusbarText):
1012 Call the bundle page UI client.
1014 2010-07-17 Anders Carlsson <andersca@apple.com>
1016 Reviewed by Maciej Stachowiak.
1018 WebKitTestRunner should load the test plug-in
1019 https://bugs.webkit.org/show_bug.cgi?id=42509
1021 * UIProcess/API/C/WKContext.cpp:
1022 (_WKContextSetAdditionalPluginPath):
1023 Add a private function for setting a single additional plug-in path. the WebKit1 SPI that does the
1024 same thing takes an array of paths, but this is good enough for now.
1026 * UIProcess/Plugins/PluginInfoStore.cpp:
1027 (WebKit::PluginInfoStore::setAdditionalPluginPaths):
1028 Set the additional plug-in paths vector and refresh the database.
1030 (WebKit::PluginInfoStore::loadPluginsIfNecessary):
1031 First try to load plug-ins in the additional plug-in paths.
1033 * UIProcess/WebContext.cpp:
1034 (WebKit::WebContext::setAdditionalPluginPath):
1035 Call PluginInfoStore::setAdditionalPluginPaths.
1037 * UIProcess/WebContext.h:
1038 (WebKit::WebContext::pluginInfoStore):
1039 Make the plug-in info store per context instead of having a single shared info store.
1041 * UIProcess/WebProcessProxy.cpp:
1042 (WebKit::WebProcessProxy::getPlugins):
1043 (WebKit::WebProcessProxy::getPluginHostConnection):
1044 * UIProcess/WebProcessProxy.h:
1045 Get the plug-in info store from the context.
1047 2010-07-17 Anders Carlsson <andersca@apple.com>
1049 Reviewed by Dan Bernstein.
1051 Stop all NPStreams before destroying a plug-in
1052 https://bugs.webkit.org/show_bug.cgi?id=42504
1054 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1055 (WebKit::NetscapePlugin::stopAllStreams):
1056 Go through all streams and stop them.
1058 (WebKit::NetscapePlugin::destroy):
1059 Call stopAllStreams.
1061 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1064 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1067 2010-07-17 Anders Carlsson <andersca@apple.com>
1069 Reviewed by Dan Bernstein.
1071 Open streams should not keep a plug-in view alive
1072 https://bugs.webkit.org/show_bug.cgi?id=42503
1074 PluginView::Stream now has a weak reference to its PluginView.
1076 * WebProcess/Plugins/PluginView.cpp:
1077 (WebKit::PluginView::Stream::~Stream):
1078 Assert that the plug-in view is null.
1080 (WebKit::PluginView::Stream::didFail):
1081 After calling removeStream, set the plug-in view member variable to 0. This is OK to do
1082 since we keep a reference to the Stream, so we're sure that the call to removeStream does not
1085 (WebKit::PluginView::Stream::didFinishLoading):
1088 (WebKit::PluginView::~PluginView):
1091 (WebKit::PluginView::cancelAllStreams):
1094 2010-07-16 Zhe Su <suzhe@chromium.org>
1096 Reviewed by Darin Adler.
1098 REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
1099 https://bugs.webkit.org/show_bug.cgi?id=42253
1101 Dummy implementation of EditorClient::willSetInputMethodState.
1103 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1104 (WebKit::WebEditorClient::willSetInputMethodState):
1105 * WebProcess/WebCoreSupport/WebEditorClient.h:
1107 2010-07-16 Alice Liu <alice.liu@apple.com>
1109 Build fix, not reviewed.
1111 Reverted http://trac.webkit.org/changeset/63585 because getopt isn't
1112 available in the OpenSource support libraries
1116 2010-07-16 Sam Weinig <sam@webkit.org>
1118 Reviewed by Anders Carlsson.
1120 Fix for https://bugs.webkit.org/show_bug.cgi?id=42482
1121 <rdar://problem/8197701>
1122 Add notification of when the BackForwardList changes
1123 to aid invalidation of Back/Forward related UI elements.
1125 * UIProcess/API/C/WKPage.h:
1126 Add didChangeBackForwardList to the WKPageLoaderClient. This
1127 fires whenever an item is added or removed from the back forward
1128 list or when the cursor changes position.
1130 * UIProcess/WebBackForwardList.cpp:
1131 (WebKit::WebBackForwardList::addItem):
1132 (WebKit::WebBackForwardList::goToItem):
1133 * UIProcess/WebLoaderClient.cpp:
1134 (WebKit::WebLoaderClient::didChangeBackForwardList):
1135 * UIProcess/WebLoaderClient.h:
1136 * UIProcess/WebPageProxy.cpp:
1137 (WebKit::WebPageProxy::didChangeBackForwardList):
1138 * UIProcess/WebPageProxy.h:
1139 Pipe changes to the WebBackForwardList up to the page load client.
1141 2010-07-16 Alice Liu <alice.liu@apple.com>
1143 Reviewed by Sam Weinig.
1145 Add WebKitTestRunner to the WebKit2 solution
1147 * WebKit2.sln: Add InjectedBundle and WebKitTestRunner projects. Also change the build dependency order from
1148 DumpRunderTree --> WebKitAPITest to
1149 DumpRenderTree --> InjectedBundle --> WebKitTestRunner --> WebKitAPITest
1151 2010-07-15 Anders Carlsson <andersca@apple.com>
1153 Reviewed by Dan Bernstein.
1155 Set notifyData to the stream's notification data
1156 https://bugs.webkit.org/show_bug.cgi?id=42429
1158 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1159 (WebKit::NetscapePluginStream::start):
1161 2010-07-15 Brent Fulgham <bfulgham@webkit.org>
1163 Build fix. Don't include CoreGraphics.h on non-CG builds.
1165 * WebKit2Prefix.h: Conditionalize include of CoreGraphics.h
1166 to avoid build break on WinCairo.
1168 2010-07-15 Anders Carlsson <andersca@apple.com>
1170 Reviewed by Sam Weinig.
1172 If needed, NPN_GetURL the src URL
1173 https://bugs.webkit.org/show_bug.cgi?id=42424
1175 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1176 (WebKit::NetscapePlugin::NPP_GetValue):
1177 Add NPP_GetValue wrapper.
1179 (WebKit::NetscapePlugin::shouldLoadSrcURL):
1180 Check whether the src url should be cancelled.
1182 (WebKit::NetscapePlugin::initialize):
1183 If the src URL should be loaded, then load it.
1185 2010-07-15 Anders Carlsson <andersca@apple.com>
1187 Reviewed by Sam Weinig.
1189 Stop the plug-in stream when it's finished loading
1190 https://bugs.webkit.org/show_bug.cgi?id=42423
1192 * WebProcess/Plugins/DummyPlugin.cpp:
1193 (WebKit::DummyPlugin::streamDidFinishLoading):
1194 * WebProcess/Plugins/DummyPlugin.h:
1197 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1198 (WebKit::NetscapePlugin::streamDidFinishLoading):
1199 Call NetscapePluginStream::didFinishLoading.
1201 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1202 (WebKit::NetscapePluginStream::didFinishLoading):
1203 Stop the stream with NPRES_DONE.
1205 * WebProcess/Plugins/Plugin.h:
1206 Add streamDidFinishLoading.
1208 * WebProcess/Plugins/PluginView.cpp:
1209 (WebKit::PluginView::Stream::didFinishLoading):
1210 Call Plugin::streamDidFinishLoading.
1212 2010-07-15 Anders Carlsson <andersca@apple.com>
1214 Reviewed by Sam Weinig.
1216 Pass URL stream data to the plug-in
1217 https://bugs.webkit.org/show_bug.cgi?id=42420
1219 * WebProcess/Plugins/DummyPlugin.cpp:
1220 (WebKit::DummyPlugin::streamDidReceiveData):
1221 * WebProcess/Plugins/DummyPlugin.h:
1224 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1225 (WebKit::NetscapePlugin::streamDidReceiveData):
1226 Call NetscapePluginStream::didReceiveData.
1228 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1229 (WebKit::NetscapePluginStream::didReceiveData):
1230 Deliver the data to the plug-in.
1232 * WebProcess/Plugins/Plugin.h:
1233 Add pure virtual streamDidReceiveData member function.
1235 * WebProcess/Plugins/PluginView.cpp:
1236 (WebKit::PluginView::Stream::didReceiveData):
1237 Call Plugin::streamDidReceiveData.
1239 2010-07-15 Anders Carlsson <andersca@apple.com>
1241 Reviewed by Sam Weinig.
1243 Handle failed loads correctly
1244 https://bugs.webkit.org/show_bug.cgi?id=42418
1246 * WebProcess/Plugins/DummyPlugin.cpp:
1247 (WebKit::DummyPlugin::streamDidFail):
1248 * WebProcess/Plugins/DummyPlugin.h:
1251 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1252 (WebKit::NetscapePlugin::streamDidFail):
1253 Call NetscapePluginStream::didFail.
1255 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1256 (WebKit::NetscapePluginStream::didReceiveResponse):
1257 Take a reference to the plug-in stream in case starting it causes it to be destroyed.
1259 (WebKit::NetscapePluginStream::didFail):
1260 Take a reference to the plug-in stream in case stopping it causes it to be destroyed.
1262 (WebKit::NetscapePluginStream::destroy):
1265 (WebKit::NetscapePluginStream::start):
1266 If we fail to start the stream, cancel the load.
1268 (WebKit::NetscapePluginStream::cancel):
1269 Call NetscapePlugin::cancelStreamLoad.
1271 (WebKit::NetscapePluginStream::notifyAndDestroyStream):
1272 Don't call cancel here. notifyAndDestroyStream can be called when we don't want to cancel the
1273 load, such as when it's already failed to load.
1275 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1278 * WebProcess/Plugins/Plugin.h:
1279 Add pure virtual streamDidFail member function.
1281 * WebProcess/Plugins/PluginView.cpp:
1282 (WebKit::PluginView::Stream::Stream):
1283 Initialize m_streamWasCancelled to false.
1285 (WebKit::PluginView::Stream::cancel):
1286 Set m_streamWasCancelled to true.
1288 (WebKit::PluginView::Stream::didFail):
1289 Call Plugin::streamDidFail.
1291 2010-07-15 Sam Weinig <sam@webkit.org>
1293 Reviewed by Anders Carlsson.
1295 Fix for https://bugs.webkit.org/show_bug.cgi?id=42358
1296 <rdar://problem/8194512>
1297 Hyphenation tests crash the Web process
1299 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1300 (InitWebCoreSystemInterface): Add missing initializer.
1302 2010-07-15 Anders Carlsson <andersca@apple.com>
1304 Attempt to fix the Windows build.
1306 * WebProcess/Plugins/PluginView.cpp:
1307 (WebKit::PluginView::Stream::didReceiveResponse):
1308 expectedContentLength should be a signed long long.
1310 2010-07-15 Anders Carlsson <andersca@apple.com>
1312 Reviewed by Sam Weinig.
1314 Cancel stream loads when destroying NetscapePluginStreams
1315 https://bugs.webkit.org/show_bug.cgi?id=42413
1317 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1318 (WebKit::NetscapePlugin::cancelStreamLoad):
1319 Call PluginController::cancelStreamLoad.
1321 (WebKit::NetscapePlugin::streamDidReceiveResponse):
1322 Call NetscapePluginStream::didReceiveResponse.
1324 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1325 (WebKit::NetscapePluginStream::didReceiveResponse):
1326 Try to start the stream.
1328 (WebKit::NetscapePluginStream::sendJavaScriptStream):
1329 Don't stop the stream if it can't be started. start handles that now.
1331 (WebKit::isSupportedTransferMode):
1332 Return whether the given transfer mode is supported.
1334 (WebKit::NetscapePluginStream::start):
1335 If the stream fails to start, call notifyAndDestroyStream. If it starts successfully but has
1336 an unsupported transfer mode, call stop.
1338 (WebKit::NetscapePluginStream::notifyAndDestroyStream):
1339 Cancel the stream load unless it's being destroyed because it has finished loading.
1341 * WebProcess/Plugins/PluginController.h:
1342 Add cancelStreamLoad pure virtual member function.
1344 * WebProcess/Plugins/PluginView.cpp:
1345 (WebKit::PluginView::Stream::cancel):
1346 Tell the stream loader to cancel and null it out.
1348 (WebKit::PluginView::cancelStreamLoad):
1349 Get the stream and cancel it.
1351 * WebProcess/Plugins/PluginView.h:
1353 2010-07-15 Anders Carlsson <andersca@apple.com>
1355 Reviewed by Sam Weinig.
1357 Start loading plug-in streams
1358 https://bugs.webkit.org/show_bug.cgi?id=42407
1360 * WebProcess/Plugins/DummyPlugin.cpp:
1361 (WebKit::DummyPlugin::streamDidReceiveResponse):
1362 * WebProcess/Plugins/DummyPlugin.h:
1365 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1366 (WebKit::NetscapePlugin::streamDidReceiveResponse):
1367 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1370 * WebProcess/Plugins/Plugin.h:
1371 Add streamDidReceiveResponse pure virtual member function.
1373 * WebProcess/Plugins/PluginView.cpp:
1374 Make PluginView::Stream a NetscapePlugInStreamLoaderClient.
1376 (WebKit::PluginView::Stream::start):
1377 Create a plug-in loader and start loading.
1379 (WebKit::PluginView::Stream::didReceiveResponse):
1380 Get the necessary data out of the resource response and call streamDidReceiveResponse.
1382 (WebKit::PluginView::Stream::didReceiveData):
1383 (WebKit::PluginView::Stream::didFail):
1384 (WebKit::PluginView::Stream::didFinishLoading):
1387 2010-07-15 Sam Weinig <sam@webkit.org>
1389 Reviewed by Anders Carlsson.
1391 Patch for https://bugs.webkit.org/show_bug.cgi?id=42396
1392 Give the navigation type in the policy client callbacks meaning.
1394 - Use the new WKFrameNavigationType instead of just uint32_t.
1396 * UIProcess/API/C/WKAPICast.h:
1398 Add conversion method from WebCore::NavigationType to WKFrameNavigationType.
1399 * UIProcess/API/C/WKPage.h:
1400 * UIProcess/WebPageProxy.cpp:
1401 (WebKit::WebPageProxy::didReceiveMessage):
1402 (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1403 (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1404 * UIProcess/WebPageProxy.h:
1405 * UIProcess/WebPolicyClient.cpp:
1406 (WebKit::WebPolicyClient::decidePolicyForNavigationAction):
1407 (WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
1408 * UIProcess/WebPolicyClient.h:
1409 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1411 2010-07-15 Anders Carlsson <andersca@apple.com>
1413 Reviewed by Sam Weinig.
1415 Add a PluginView::Stream class
1416 https://bugs.webkit.org/show_bug.cgi?id=42398
1418 * WebProcess/Plugins/PluginView.cpp:
1419 Add the Stream class.
1421 (WebKit::PluginView::performURLRequest):
1422 Create the stream and start it.
1424 (WebKit::PluginView::addStream):
1425 Add the stream to the map.
1427 (WebKit::PluginView::removeStream):
1428 Remove the stream from the map.
1430 * WebProcess/Plugins/PluginView.h:
1431 Add Stream forward declaration and the m_streams map.
1433 2010-07-15 Anders Carlsson <andersca@apple.com>
1435 Reviewed by Sam Weinig.
1437 Don't allow multiple calls to NetscapePluginStream::stop
1438 https://bugs.webkit.org/show_bug.cgi?id=42395
1440 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1441 (WebKit::NetscapePluginStream::NetscapePluginStream):
1442 Initialize m_urlNotifyHasBeenCalled.
1444 (WebKit::NetscapePluginStream::~NetscapePluginStream):
1445 Assert that the stream didn't need a URL notification or that one was sent.
1447 (WebKit::NetscapePluginStream::sendJavaScriptStream):
1448 Don't call stop in the JS failure case because the stream won't be started.
1450 (WebKit::NetscapePluginStream::stop):
1451 Remove m_isStarted check and add an assertion instead. Move code that calls NPP_URLNotify and
1452 destroys the stream out to a separate function.
1454 (WebKit::NetscapePluginStream::notifyAndDestroyStream):
1455 Call NPP_URLNotify if necessary and destroy the stream.
1457 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1459 2010-07-15 Anders Carlsson <andersca@apple.com>
1461 Reviewed by Sam Weinig.
1463 Implement NPN_DestroyStream
1464 https://bugs.webkit.org/show_bug.cgi?id=42393
1466 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1467 (WebKit::NPN_DestroyStream):
1468 Call NetscapePlugin::destroyStream.
1470 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1471 (WebKit::NetscapePlugin::destroyStream):
1472 Check if the stream is valid, and if it is call NetscapePluginStream::destroy.
1474 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1475 (WebKit::NetscapePluginStream::sendJavaScriptStream):
1476 Keep a reference to the stream in case it's destroyed by an NPP_ call.
1478 (WebKit::NetscapePluginStream::destroy):
1479 Verify that the stream can be destroyed and stop it.
1481 (WebKit::NetscapePluginStream::deliverDataToPlugin):
1482 Add m_isStarted checks after any calls to NPP_ functions.
1484 (WebKit::NetscapePluginStream::stop):
1485 Set m_isStarted to false before calling NPP_DestroyStream.
1487 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1488 (WebKit::NetscapePluginStream::npStream):
1489 Add NPStream getter.
1491 2010-07-15 Anders Carlsson <andersca@apple.com>
1493 Reviewed by Darin Adler.
1495 WebKitTestRunner goes off the deep end, spinning in a dispatch queue thread
1496 https://bugs.webkit.org/show_bug.cgi?id=42355
1498 Sometimes, when receiving a message whose size is very close to the inlineMessageMaxSize,
1499 mach_msg would return with MACH_RCV_TOO_LARGE. In debug builds we would assert, but in release
1500 builds we would just bail and the receiveSourceEventHandler would be run again shortly since we didn't
1501 actually pull the message off the mach message queue.
1503 Fix this by setting the receive source buffer size to include the maximum message trailer size, which
1504 mach_msg requires. Also, handle mach_msg returning MACH_RCV_TOO_LARGE (even though in theory it would never happen
1505 now that the receivedBufferSize always includes the maximum message trailer size.
1507 * Platform/CoreIPC/mac/ConnectionMac.cpp:
1508 (CoreIPC::Connection::receiveSourceEventHandler):
1509 Use a Vector with inline data instead of a char array. This way we can resize the Vector if the message received
1512 2010-07-15 Anders Carlsson <andersca@apple.com>
1514 Reviewed by Darin Adler.
1516 Send JavaScript stream data to plug-ins
1517 https://bugs.webkit.org/show_bug.cgi?id=42384
1519 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1520 (WebKit::NetscapePlugin::NPP_WriteReady):
1521 (WebKit::NetscapePlugin::NPP_Write):
1522 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1525 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1526 (WebKit::NetscapePluginStream::NetscapePluginStream):
1527 Initialize m_deliveryDataTimer and m_stopstreamWhenDoneDelivering.
1529 (WebKit::NetscapePluginStream::sendJavaScriptStream):
1530 Call deliverData and stop.
1532 (WebKit::NetscapePluginStream::deliverData):
1533 Add the data to m_deliveryData and call deliverDataToPlugin.
1535 (WebKit::NetscapePluginStream::deliverDataToPlugin):
1536 Deliver the data in m_deliveryData to the plug-in. Call NPP_WriteReady to see how much
1537 data the plug-in can handle right now. If the plug-in returns zero or a negative value, delay the
1538 delivery using the delivery data timer. Otherwise, call NPP_Write in chunks until all the data has been
1539 delivered, then stop the stream if needed.
1541 (WebKit::NetscapePluginStream::stop):
1542 If the reason for stopping the stream is that it's finished and the plug-in hasn't processed all the data,
1543 don't close the stream now. Instead, set m_stopStreamWhenDoneDelivering to true which will cause the stream to be
1544 closed once all data has been delivered.
1546 * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1547 Add member functions and member variables.
1549 2010-07-14 Brent Fulgham <bfulgham@webkit.org>
1551 Reviewed by Steve Falkenburg.
1553 Patch for https://bugs.webkit.org/show_bug.cgi?id=42299
1554 Correct WinCairo build for new WebKit2 project structure.
1556 * win/WebKit2Apple.vsprops: Put WebKit2.def here.
1557 * win/WebKit2CFLite.def: Added CFLite version of def file.
1558 * win/WebKit2CFLite.vsprops: Add new WebKit2CFLite.def here.
1559 * win/WebKit2Common.vsprops: Remove WebKit2.def definition as
1560 WinCairo and Apple need different versions of this.
1561 * win/WebKit2WebProcess.vcproj: Add a new Debug_Cairo target
1562 for the WebKit2WebProcess project.
1564 2010-07-15 Mark Rowe <mrowe@apple.com>
1566 Update the sorting in the Xcode project files.
1568 * WebKit2.xcodeproj/project.pbxproj:
1570 2010-07-14 Sam Weinig <sam@webkit.org>
1572 Reviewed by Dan Bernstein.
1574 Patch for https://bugs.webkit.org/show_bug.cgi?id=42315
1575 <rdar://problem/8185281>
1576 All text in WebKit2 draws with no subpixel antialiasing
1578 - Change CGBitmapInfo passed to CGBitmapContextCreate and CGImageCreate
1579 from kCGImageAlphaPremultipliedLast to kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host.
1581 * Shared/mac/UpdateChunk.cpp:
1582 (WebKit::UpdateChunk::createImage):
1583 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
1584 (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
1585 * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
1586 (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
1588 2010-07-14 Maciej Stachowiak <mjs@apple.com>
1590 Reviewed by Mark Rowe.
1592 - Fix WebKitTestRunner build
1594 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add stdint.h include.
1596 2010-07-14 Anders Carlsson <andersca@apple.com>
1598 Try to fix Windows build.
1600 * win/WebKit2.vcproj:
1602 2010-07-14 Anders Carlsson <andersca@apple.com>
1604 Reviewed by Sam Weinig.
1606 More work on plug-in streams
1607 https://bugs.webkit.org/show_bug.cgi?id=42308
1609 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1610 (WebKit::NetscapePlugin::loadURL):
1611 If the target is null, create a NetscapePluginStream and add it to the m_streams map.
1613 (WebKit::NetscapePlugin::removePluginStream):
1614 Remove the given NetscapePluginStream from the m_streams map.
1616 (WebKit::NetscapePlugin::NPP_NewStream):
1617 (WebKit::NetscapePlugin::NPP_DestroyStream):
1620 (WebKit::NetscapePlugin::streamFromID):
1621 Return the plug-in stream given a stream ID.
1623 (WebKit::NetscapePlugin::didEvaluateJavaScript):
1624 Find the plug-in stream and call sendJavaScriptStream.
1626 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1627 (WebKit::NetscapePluginStream::NetscapePluginStream):
1628 Initialize member variables.
1630 (WebKit::NetscapePluginStream::~NetscapePluginStream):
1631 Assert that we aren't started.
1633 (WebKit::NetscapePluginStream::sendJavaScriptStream):
1634 If the JavaScript request was successful, start the stream. Otherwise call stop() which just
1635 ends up calling NPP_URLNotify when the stream isn't started.
1637 (WebKit::NetscapePluginStream::start):
1638 Set up the NPStream object. Call NPP_NewStream. Return false if the call was not successful, or if
1639 the requested stream type is one that we don't yet support.
1641 (WebKit::NetscapePluginStream::stop):
1642 Call NPP_DestroyStream if the stream is started. Call NPP_URLNotify if necessary.
1644 * WebProcess/Plugins/PluginView.cpp:
1645 (WebKit::PluginView::performJavaScriptURLRequest):
1646 Remove unneeded comment.
1648 2010-07-14 Sam Weinig <sam@webkit.org>
1650 Reviewed by John Sullivan.
1652 Make Back/Forward work.
1654 * UIProcess/WebPageProxy.cpp:
1655 (WebKit::WebPageProxy::goForward): Pass the item ID to avoid roundtrip.
1656 (WebKit::WebPageProxy::goBack): Ditto.
1657 (WebKit::WebPageProxy::didReceiveMessage): Implement WebPageProxyMessage::BackForwardGoToItem.
1658 * WebProcess/WebPage/WebPage.cpp:
1659 (WebKit::WebPage::WebPage):
1660 (WebKit::WebPage::goForward): Use m_page->goToItem with the correct type instead of the Page shortcut.
1661 (WebKit::WebPage::goBack): Ditto.
1662 (WebKit::WebPage::didReceiveMessage):
1663 * WebProcess/WebPage/WebPage.h:
1664 Remove unused m_canGoBack and m_canGoForward.
1666 2010-07-14 Anders Carlsson <andersca@apple.com>
1668 Reviewed by Darin Adler.
1670 Add NetscapePluginStream class
1671 https://bugs.webkit.org/show_bug.cgi?id=42296
1673 * WebKit2.xcodeproj/project.pbxproj:
1674 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: Added.
1675 (WebKit::NetscapePluginStream::NetscapePluginStream):
1676 (WebKit::NetscapePluginStream::~NetscapePluginStream):
1677 * WebProcess/Plugins/Netscape/NetscapePluginStream.h: Added.
1678 (WebKit::NetscapePluginStream::create):
1680 2010-07-14 Sam Weinig <sam@webkit.org>
1682 Reviewed by Darin Adler.
1684 Patch for https://bugs.webkit.org/show_bug.cgi?id=42297
1685 <rdar://problem/8187355>
1686 Make titles in WebBackForwardListItems work.
1688 - Make WebBackForwardListItemMap per WebProcessProxy to allow updating
1689 them separate from a page. They are conceptually per process anyway.
1690 - Add a message to add or update a WebBackForwardListItemMap triggered
1691 by the WebCore::notifyHistoryItemChanged mechanism.
1693 * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
1694 (WebProcessProxyMessage::):
1695 Add AddOrUpdateBackForwardItem message.
1697 * UIProcess/WebBackForwardListItem.h:
1698 (WebKit::WebBackForwardListItem::setOriginalURL):
1699 (WebKit::WebBackForwardListItem::setURL):
1700 (WebKit::WebBackForwardListItem::setTitle):
1703 * UIProcess/WebPageProxy.cpp:
1704 (WebKit::WebPageProxy::didReceiveMessage):
1705 BackForwardAddItem now assumes the item has already been created, so
1706 now just forwards the add message onto the WebBackForwardList.
1708 (WebKit::WebPageProxy::addItemToBackForwardList): Take a WebBackForwardList instead of an ID.
1709 (WebKit::WebPageProxy::goToItemInBackForwardList): Ditto.
1710 * UIProcess/WebPageProxy.h: Ditto.
1712 * UIProcess/WebProcessProxy.cpp:
1713 (WebKit::WebProcessProxy::webBackForwardItem):
1714 (WebKit::WebProcessProxy::addOrUpdateBackForwardListItem):
1715 (WebKit::WebProcessProxy::didReceiveMessage):
1716 (WebKit::WebProcessProxy::didReceiveSyncMessage):
1717 * UIProcess/WebProcessProxy.h:
1718 Have the WebProcessProxy manage the WebBackForwardListItems.
1720 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1721 (WebKit::updateBackForwardItem):
1722 (WebKit::WK2NotifyHistoryItemChanged): Use this to notify UIProcess
1723 of HistoryItem changes (such as the title being added).
1724 (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
1725 Register the notifyHistoryItemChanged function.
1726 (WebKit::WebBackForwardListProxy::addItem):
1727 Just send the ID as the updateBackForwardItem is already going to have
1728 been called by this time.
1730 2010-07-14 Anders Carlsson <andersca@apple.com>
1732 Reviewed by Sam Weinig.
1734 Call NPN_URLNotify for frame loads initiated by plug-ins
1735 https://bugs.webkit.org/show_bug.cgi?id=42291
1737 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1738 (WebKit::NetscapePlugin::loadURL):
1739 If needed, keep track of the request ID and URL so we can call NPP_URLNotify at a later point.
1741 (WebKit::NetscapePlugin::frameDidFinishLoading):
1742 Get the notification data and the URL from the map and call NPP_URLNotify.
1744 (WebKit::NetscapePlugin::frameDidFail):
1745 Get the notification data and the URL from the map and call NPP_URLNotify.
1747 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1749 2010-07-14 Anders Carlsson <andersca@apple.com>
1751 Reviewed by Sam Weinig.
1753 Add NetscapePlugin::NPP_ member functions for calling into the plug-in
1754 https://bugs.webkit.org/show_bug.cgi?id=42287
1756 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1757 (WebKit::NetscapePlugin::NPP_New):
1758 (WebKit::NetscapePlugin::NPP_Destroy):
1759 (WebKit::NetscapePlugin::NPP_SetWindow):
1760 (WebKit::NetscapePlugin::NPP_URLNotify):
1761 (WebKit::NetscapePlugin::callSetWindow):
1762 (WebKit::NetscapePlugin::initialize):
1763 (WebKit::NetscapePlugin::destroy):
1764 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1766 2010-07-14 Anders Carlsson <andersca@apple.com>
1768 Reviewed by Sam Weinig.
1770 Send JavaScript url request results back to the plug-in
1771 https://bugs.webkit.org/show_bug.cgi?id=42277
1773 * WebProcess/Plugins/DummyPlugin.cpp:
1774 (WebKit::DummyPlugin::didEvaluateJavaScript):
1775 * WebProcess/Plugins/DummyPlugin.h:
1778 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1779 (WebKit::NetscapePlugin::didEvaluateJavaScript):
1780 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1783 * WebProcess/Plugins/Plugin.h:
1784 Add didEvaluateJavaScript pure virtual member function.
1786 * WebProcess/Plugins/PluginView.cpp:
1787 (WebKit::PluginView::performJavaScriptURLRequest):
1788 If target is not null, Call Plugin::frameDidFail or Plugin::frameDidFinishLoading.
1789 If target is null, call didEvaluateJavaScript with the result string.
1791 2010-07-14 Sam Weinig <sam@webkit.org>
1793 Reviewed by Darin Adler.
1795 Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
1796 Make changing Cursors work in WebKit2.
1798 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
1799 Add SetCursor message.
1801 * Shared/WebCoreArgumentCoders.h:
1802 Add encoding/decoding of Cursors. For now we don't support Custom
1805 * UIProcess/API/mac/PageClientImpl.h:
1806 * UIProcess/API/mac/PageClientImpl.mm:
1807 (WebKit::PageClientImpl::setCursor):
1808 * UIProcess/PageClient.h:
1809 Add pass through functions to get the cursor from the WebPageProxy
1812 * UIProcess/API/mac/WKView.mm:
1813 (-[WKView _setCursor:]):
1814 * UIProcess/API/mac/WKViewInternal.h:
1815 Implement changing the cursor.
1817 * UIProcess/WebPageProxy.cpp:
1818 (WebKit::WebPageProxy::didReceiveMessage):
1819 (WebKit::WebPageProxy::setCursor):
1820 * UIProcess/WebPageProxy.h:
1823 * UIProcess/win/WebView.cpp:
1824 (WebKit::WebView::wndProc):
1825 (WebKit::WebView::WebView):
1826 (WebKit::WebView::onSetCursor):
1827 (WebKit::WebView::setCursor):
1828 * UIProcess/win/WebView.h:
1829 Implement changing the cursor.
1831 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1832 (WebKit::WebChromeClient::setCursor):
1833 (WebKit::WebChromeClient::setLastSetCursorToCurrentCursor):
1834 * WebProcess/WebCoreSupport/WebChromeClient.h:
1835 Encode the cursor when setCursor is called.
1837 2010-07-13 Anders Carlsson <andersca@apple.com>
1839 Reviewed by Sam Weinig.
1841 Add support for loading javascript: URLs
1842 https://bugs.webkit.org/show_bug.cgi?id=42221
1844 * WebProcess/Plugins/DummyPlugin.cpp:
1845 (WebKit::DummyPlugin::controller):
1846 * WebProcess/Plugins/DummyPlugin.h:
1849 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1850 (WebKit::NetscapePlugin::destroy):
1851 Set the plug-in controller to 0.
1853 (WebKit::NetscapePlugin::controller):
1854 Return the plug-in controller.
1856 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1857 Add controller() member function.
1859 * WebProcess/Plugins/Plugin.h:
1860 Add controller() pure virtual member function.
1862 * WebProcess/Plugins/PluginView.cpp:
1863 (WebKit::PluginView::performURLRequest):
1864 If the given URL request has a javascript: protocol, call
1865 performJavaScriptURLRequest.
1867 (WebKit::PluginView::performFrameLoadURLRequest):
1868 Add a security origin check.
1870 (WebKit::PluginView::performJavaScriptURLRequest):
1871 Evaluate the JavaScript code, Get the resulting string.
1873 * WebProcess/Plugins/PluginView.h:
1874 Add performJavaScriptURLRequest.
1876 2010-07-13 Anders Carlsson <andersca@apple.com>
1878 Reviewed by Sam Weinig.
1880 Add support for URL frame loading using NPN_GetURLNotify
1881 https://bugs.webkit.org/show_bug.cgi?id=42192
1883 * WebProcess/Plugins/DummyPlugin.cpp:
1884 (WebKit::DummyPlugin::frameDidFinishLoading):
1885 (WebKit::DummyPlugin::frameDidFail):
1886 * WebProcess/Plugins/DummyPlugin.h:
1889 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1890 Implement NPN_GetURLNotify and have it call NetscapePlugin::loadURL.
1892 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1893 (WebKit::NetscapePlugin::NetscapePlugin):
1894 Initialize m_nextRequestID to 0.
1896 (WebKit::NetscapePlugin::loadURL):
1897 Ask the plug-in controller to load the URL.
1899 (WebKit::NetscapePlugin::frameDidFinishLoading):
1900 (WebKit::NetscapePlugin::frameDidFail):
1901 Add empty stubs for now.
1903 * WebProcess/Plugins/Plugin.h:
1904 Add new member functions for frame load notifications.
1906 * WebProcess/Plugins/PluginController.h:
1909 * WebProcess/Plugins/PluginView.cpp:
1910 (WebKit::PluginView::URLRequest::URLRequest):
1911 Add class that represents an URL request.
1913 (WebKit::PluginView::PluginView):
1914 Initialize m_pendingURLRequestsTimer.
1916 (WebKit::PluginView::~PluginView):
1917 Unset all active load listeners.
1919 (WebKit::PluginView::pendingURLRequestsTimerFired):
1920 Take the first request in the queue and process it.
1922 (WebKit::PluginView::performURLRequest):
1923 Call performFrameLoadURLRequest if necessary.
1925 (WebKit::PluginView::performFrameLoadURLRequest):
1926 Find a frame to load the request in. If a frame doesn't exist try to create a new frame.
1928 (WebKit::PluginView::loadURL):
1929 Create a URLRequest and add it to the queue.
1931 (WebKit::PluginView::didFinishLoad):
1932 Get the pending frame load request and call Plugin::frameDidFinishLoading.
1934 (WebKit::PluginView::didFailLoad):
1935 Get the pending frame load request and call Plugin::frameDidFail.
1937 * WebProcess/Plugins/PluginView.h:
1938 Inherit from WebFrame::LoadListener.
1940 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1941 (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
1942 (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
1943 (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
1944 (WebKit::WebFrameLoaderClient::didFinishLoad):
1945 Call the WebFrame's load listener if needed.
1947 * WebProcess/WebPage/WebFrame.cpp:
1948 (WebKit::WebFrame::WebFrame):
1949 Initialize m_loadListener to 0.
1951 * WebProcess/WebPage/WebFrame.h:
1952 Add a LoadListener class that the plug-in view can use to track frame loads.
1954 (WebKit::WebFrame::LoadListener::~LoadListener):
1955 (WebKit::WebFrame::setLoadListener):
1956 (WebKit::WebFrame::loadListener):
1958 2010-07-13 Diego Gonzalez <diegohcg@webkit.org>
1960 Reviewed by Kenneth Rohde Christiansen.
1962 [Qt] [WebKit2] Hook up navigation actions
1963 https://bugs.webkit.org/show_bug.cgi?id=42183
1965 Make Back, Forward, Stop and Reload being enable/disabled according
1968 * UIProcess/API/qt/ClientImpl.cpp:
1969 (qt_wk_didStartProvisionalLoadForFrame):
1970 (qt_wk_didCommitLoadForFrame):
1971 (qt_wk_didFinishLoadForFrame):
1972 (qt_wk_didFailLoadWithErrorForFrame):
1973 * UIProcess/API/qt/qwkpage.cpp:
1974 (QWKPagePrivate::updateAction):
1976 2010-07-13 John Sullivan <sullivan@apple.com>
1978 Written by Simon Fraser, reviewed by me.
1980 Cleaner fix for previous check-in.
1982 * UIProcess/WebBackForwardList.cpp:
1983 (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
1984 Use std::max<int> for int-casting brevity.
1986 2010-07-13 John Sullivan <sullivan@apple.com>
1988 Reviewed by Sam Weinig.
1990 Fixed signed/unsigned problem that led to bogus contents in the array
1991 returned by WKBackForwardListCopyBackListWithLimit().
1993 * UIProcess/WebBackForwardList.cpp:
1994 (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
1995 Cast m_current and limit to signed values in std::max call.
1997 2010-07-13 Steve Falkenburg <sfalken@apple.com>
1999 Reviewed by Ada Chan.
2001 Fix missing resources causing layout test failures
2002 https://bugs.webkit.org/show_bug.cgi?id=42179
2004 Quick fix to get the layout tests going again.
2005 I'll work on getting resource.h from WebKit into a cross-project
2006 propagated header after this lands.
2009 * win/resource.h: Copied from WebKit/win/WebKit.vcproj/resource.h.
2011 2010-07-13 Anders Carlsson <andersca@apple.com>
2013 Reviewed by Adam Roben.
2015 Make all NPN_ functions static.
2017 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2019 2010-07-13 Anders Carlsson <andersca@apple.com>
2021 Reviewed by Adam Roben.
2023 Document the member functions of the abstract Plugin and PluginController classes.
2025 * WebProcess/Plugins/Plugin.h:
2026 * WebProcess/Plugins/PluginController.h:
2028 2010-07-13 Simon Hausmann <simon.hausmann@nokia.com>
2030 [Qt] Trivial build fix.
2032 Provide a stub for mimeTypeFromExtension() that uses notImplemented().
2034 * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
2035 (WebKit::PluginInfoStore::mimeTypeFromExtension):
2037 2010-07-13 Simon Hausmann <simon.hausmann@nokia.com>
2039 Reviewed by Kenneth Rohde Christiansen.
2041 [Qt] Tweaks needed to compile WebKit2 with Qt
2042 https://bugs.webkit.org/show_bug.cgi?id=41604
2044 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2045 (WebKit::ProcessLauncherHelper::launch): Adjust to PassOwnPtr API changes.
2046 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Don't include JavaScriptCore.h,
2047 as it unconditionally includes JSStringRefCF. Instead include JavaScript.h.
2049 2010-07-12 Steve Falkenburg <sfalken@apple.com>
2052 Don't build MiniBrowser except for Debug_Internal.
2056 2010-07-12 Steve Falkenburg <sfalken@apple.com>
2058 Reviewed by Maciej Stachowiak.
2060 Make WebKit2 be built by build-webkit (so it will be built by build.webkit.org bots)
2061 https://bugs.webkit.org/show_bug.cgi?id=40922
2063 Add additional dependent projects. Necessary since our WebKit build on
2064 Windows is packaged into a DLL with WebKit2.
2068 2010-07-12 Mark Rowe <mrowe@apple.com>
2070 Rubber-stamped by Maciej Stachowiak.
2072 Fix WebKit2 to use the same compiler-selection logic as the other projects.
2074 * WebKit2.xcodeproj/project.pbxproj: Don't hard-code WebKit2 to build with GCC 4.2.
2076 2010-07-12 Maciej Stachowiak <mjs@apple.com>
2078 Reviewed by Anders Carlsson.
2080 WKView should override setFrameSize: instead of setFrame:
2081 https://bugs.webkit.org/show_bug.cgi?id=42127
2083 * UIProcess/API/mac/WKView.mm:
2084 (-[WKView setFrameSize:]): Override this method instead of setFrame:,
2085 since that is the right way to do it.
2087 2010-07-12 Steve Falkenburg <sfalken@apple.com>
2089 Reviewed by Alice Liu.
2091 <rdar://problem/8113038> WebKit1 and WebKit2 should build as a single DLL
2092 https://bugs.webkit.org/show_bug.cgi?id=40921
2094 Pre-WebKit2 WebKit now builds into a static library named WebKitLib.lib.
2095 WebKit.dll now links in WebCore.lib, WebKitLib.lib and WebKit2 code.
2097 This is a first step. We'll likely want to migrate the remainder of
2098 the non-deprecated WebKit code (strings, DLLMain, resources) into WebKit2.
2100 * UIProcess/API/C/WKBase.h: Updated to new BUILDING_ name.
2101 * WebProcess/InjectedBundle/API/c/WKBundleBase.h: Updated to new BUILDING_ name.
2102 * WebProcess/WebCoreSupport/win/WebCoreLocalizedStrings.cpp: Removed.
2103 * WebProcess/win/DllMain.cpp: Removed. Overlaps with implementation in WebKitLib.lib.
2104 * WebProcess/win/WebLocalizableStrings.cpp: Removed. Overlaps with implementation in WebKitLib.lib.
2105 * WebProcess/win/WebLocalizableStrings.h: Removed. Overlaps with implementation in WebKitLib.lib.
2106 * win/WebKit2.def: Added. Copied from WebKit project.
2107 * win/WebKit2.rc: Added resources previously in WebKit.
2108 * win/WebKit2.vcproj: Changed project name to WebKit so we will link output to WebKit.dll.
2109 Removed implementations overlapping with WebKitLib (WebCoreLocalizedStrings, DllMain, WebLocalizableStrings, WebProcessMain).
2110 * win/WebKit2Common.vsprops: Use a framework name of WebKit instead of WebKit2 to reflect project name.
2111 Renamed BUILDING_WEBKIT2 to BUILDING_WEBKIT since there is now just a single WebKit.dll.
2112 * win/WebKit2WebProcess.vcproj: Link against WebKit instead of WebKit2 due to renaming.
2113 * win/deleteButton.png: Copied from ../WebKit/win/WebKit.vcproj/deleteButton.png.
2114 * win/deleteButtonPressed.png: Copied from ../WebKit/win/WebKit.vcproj/deleteButtonPressed.png.
2115 * win/fsVideoAudioVolumeHigh.png: Copied from ../WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png.
2116 * win/fsVideoAudioVolumeLow.png: Copied from ../WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png.
2117 * win/fsVideoExitFullscreen.png: Copied from ../WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png.
2118 * win/fsVideoPause.png: Copied from ../WebKit/win/WebKit.vcproj/fsVideoPause.png.
2119 * win/fsVideoPlay.png: Copied from ../WebKit/win/WebKit.vcproj/fsVideoPlay.png.
2120 * win/missingImage.png: Copied from ../WebKit/win/WebKit.vcproj/missingImage.png.
2121 * win/nullplugin.png: Copied from ../WebKit/win/WebKit.vcproj/nullplugin.png.
2122 * win/panEastCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panEastCursor.png.
2123 * win/panIcon.png: Copied from ../WebKit/win/WebKit.vcproj/panIcon.png.
2124 * win/panNorthCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panNorthCursor.png.
2125 * win/panNorthEastCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panNorthEastCursor.png.
2126 * win/panNorthWestCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panNorthWestCursor.png.
2127 * win/panSouthCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panSouthCursor.png.
2128 * win/panSouthEastCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panSouthEastCursor.png.
2129 * win/panSouthWestCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panSouthWestCursor.png.
2130 * win/panWestCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panWestCursor.png.
2131 * win/searchCancel.png: Copied from ../WebKit/win/WebKit.vcproj/searchCancel.png.
2132 * win/searchCancelPressed.png: Copied from ../WebKit/win/WebKit.vcproj/searchCancelPressed.png.
2133 * win/searchMagnifier.png: Copied from ../WebKit/win/WebKit.vcproj/searchMagnifier.png.
2134 * win/searchMagnifierResults.png: Copied from ../WebKit/win/WebKit.vcproj/searchMagnifierResults.png.
2135 * win/textAreaResizeCorner.png: Copied from ../WebKit/win/WebKit.vcproj/textAreaResizeCorner.png.
2136 * win/verticalTextCursor.png: Copied from ../WebKit/win/WebKit.vcproj/verticalTextCursor.png.
2137 * win/zoomInCursor.png: Copied from ../WebKit/win/WebKit.vcproj/zoomInCursor.png.
2138 * win/zoomOutCursor.png: Copied from ../WebKit/win/WebKit.vcproj/zoomOutCursor.png.
2140 2010-07-12 Maciej Stachowiak <mjs@apple.com>
2142 Reviewed by Anders Carlsson.
2144 Get rid of auto_ptr use in WebKit2
2145 https://bugs.webkit.org/show_bug.cgi?id=42119
2147 Replace all use of auto_ptr with OwnPtr/PassOwnPtr.
2149 * Platform/CoreIPC/Connection.cpp:
2150 (CoreIPC::Connection::sendMessage):
2151 (CoreIPC::Connection::waitForMessage):
2152 (CoreIPC::Connection::sendSyncMessage):
2153 (CoreIPC::Connection::processIncomingMessage):
2154 (CoreIPC::Connection::sendOutgoingMessages):
2155 (CoreIPC::Connection::dispatchMessages):
2156 * Platform/CoreIPC/Connection.h:
2157 (CoreIPC::Connection::Message::Message):
2158 (CoreIPC::Connection::send):
2159 (CoreIPC::Connection::sendSync):
2160 (CoreIPC::Connection::waitFor):
2161 * Platform/CoreIPC/mac/ConnectionMac.cpp:
2162 (CoreIPC::Connection::sendOutgoingMessage):
2163 (CoreIPC::createArgumentDecoder):
2164 (CoreIPC::Connection::receiveSourceEventHandler):
2165 * Platform/CoreIPC/qt/ConnectionQt.cpp:
2166 (CoreIPC::Connection::readyReadHandler):
2167 (CoreIPC::Connection::sendOutgoingMessage):
2168 * Platform/CoreIPC/win/ConnectionWin.cpp:
2169 (CoreIPC::Connection::readEventHandler):
2170 (CoreIPC::Connection::sendOutgoingMessage):
2171 * Platform/RunLoop.cpp:
2172 (RunLoop::performWork):
2173 (RunLoop::scheduleWork):
2174 * Platform/RunLoop.h:
2175 * Platform/WorkItem.h:
2177 * Platform/WorkQueue.h:
2178 * Platform/mac/WorkQueueMac.cpp:
2179 (WorkQueue::executeWorkItem):
2180 (WorkQueue::scheduleWork):
2181 (WorkQueue::EventSource::EventSource):
2182 (WorkQueue::registerMachPortEventHandler):
2183 * Platform/qt/WorkQueueQt.cpp:
2184 (WorkQueue::connectSignal):
2185 (WorkQueue::scheduleWork):
2186 * Platform/win/WorkQueueWin.cpp:
2187 (WorkQueue::registerHandle):
2188 (WorkQueue::scheduleWork):
2189 (WorkQueue::performWork):
2190 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
2191 (WebKit::ChunkedUpdateDrawingAreaProxy::paint):
2192 * UIProcess/WebProcessProxy.cpp:
2193 (WebKit::WebProcessProxy::sendMessage):
2194 (WebKit::WebProcessProxy::didFinishLaunching):
2195 * UIProcess/WebProcessProxy.h:
2196 (WebKit::WebProcessProxy::send):
2198 2010-07-12 Ada Chan <adachan@apple.com>
2200 Build fix. Copy WKArray.h to the include directory.
2202 * win/WebKit2Generated.make:
2204 2010-07-12 Mark Rowe <mrowe@apple.com>
2206 Re-do an Xcode project change that Xcode decided not to save.
2208 * WebKit2.xcodeproj/project.pbxproj: Remove WebKit2.exp from the project.
2209 For some reason it was being copied in to the framework wrapper.
2211 2010-07-12 Mark Rowe <mrowe@apple.com>
2213 Reviewed by Sam Weinig.
2215 Remove the exports file from WebKit2.
2217 * Configurations/Base.xcconfig: Have symbols default to hidden visibility.
2218 * Configurations/WebKit2.xcconfig: Remove the export file.
2219 * UIProcess/API/mac/WKView.h: Export the WKView class.
2220 * WebProcess/WebKitMain.cpp: Export the WebKitMain function.
2221 * mac/WebKit2.exp: Removed.
2223 2010-07-12 Adam Roben <aroben@apple.com>
2225 Move WebKit2.vcproj's settings into .vsprops files
2227 This makes it easier to make changes that affect all configurations.
2229 Fixes <http://webkit.org/b/42097> WebKit2 should use .vsprops files
2231 Reviewed by Steve Falkenburg.
2233 * win/WebKit2.vcproj: Moved settings from here to the files below.
2234 * win/WebKit2Apple.vsprops: Added. Links against Apple-specific
2236 * win/WebKit2CFLite.vsprops: Added. Links against CFLite.
2237 * win/WebKit2Common.vsprops: Added. Contains settings shared by all
2239 * win/WebKit2DirectX.vsprops: Added. Contains settings to help with
2240 linking against DirectX.
2242 2010-07-12 Adam Roben <aroben@apple.com>
2244 Stop generating stripped symbols for Release builds
2246 It turns out we can strip the symbols after-the-fact using PDBCopy.
2248 Fixes <http://webkit.org/b/42085>.
2250 Reviewed by Steve Falkenburg.
2252 * win/WebKit2.vcproj: Removed the no-longer-needed Release override of
2253 the StripPrivateSymbols attribute. (This attribute is no longer set in
2254 release.vsprops, so doesn't need to be overridden.)
2256 2010-07-12 Brian Weinstein <bweinstein@apple.com>
2258 WebKit2 build fix for Windows.
2260 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Remove some stub function definitions.
2261 * win/WebKit2.vcproj: Add PluginController.h to the vcproj.
2263 2010-07-12 Anders Carlsson <andersca@apple.com>
2265 Reviewed by Adam Roben.
2267 Add a PluginController class, use it for invalidation and getting the user agent
2268 https://bugs.webkit.org/show_bug.cgi?id=42084
2270 * WebKit2.xcodeproj/project.pbxproj:
2271 Add PluginController.h
2273 * WebProcess/Plugins/DummyPlugin.cpp:
2274 (WebKit::DummyPlugin::initialize):
2275 * WebProcess/Plugins/DummyPlugin.h:
2276 Pass the PluginController to initialize.
2278 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2279 Implement NPN_UserAgent, NPN_MemAlloc, NPN_MemFree, NPN_InvalidateRect and NPN_InvalidateRegion.
2281 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2282 (WebKit::NetscapePlugin::NetscapePlugin):
2283 Initialize m_pluginController to null.
2285 (WebKit::NetscapePlugin::invalidate):
2286 Ask the plug-in controller to invalidate.
2288 (WebKit::NetscapePlugin::userAgent):´
2289 Ask the plug-in controller for the user agent.
2291 (WebKit::NetscapePlugin::initialize):
2292 Set the m_pluginController member variable.
2294 * WebProcess/Plugins/Plugin.h:
2295 Make initialize take a PluginController.
2297 * WebProcess/Plugins/PluginController.h: Added.
2299 * WebProcess/Plugins/PluginView.cpp:
2300 (WebKit::PluginView::initializePlugin):
2301 Pass the PluginController to initialize.
2303 (WebKit::PluginView::invalidateRect):
2304 Tell the host window to invalidate the given rect.
2306 (WebKit::PluginView::invalidate):
2307 Call invalidateRect.
2309 (WebKit::PluginView::userAgent):
2310 Ask the frame loader client for the user agent.
2312 * WebProcess/Plugins/PluginView.h:
2314 2010-07-12 Adam Roben <aroben@apple.com>
2318 * WebProcess/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: Added.
2319 (WebKit::NetscapePluginModule::tryLoad):
2320 (WebKit::NetscapePluginModule::unload):
2323 * win/WebKit2.vcproj: Added a Netscape filter beneath
2324 WebProcess/Plugins, and moved NetscapePlugin into it. Added
2325 NetscapePluginModule to the new Netscape filter. Added
2326 WebProcess/Plugins to the include path for all configurations (it was
2327 only added to Release and Debug_Internal previously) and added
2328 WebProcess/Plugins/Netscape to the include path for all
2331 2010-07-11 Maciej Stachowiak <mjs@apple.com>
2333 Reviewed by Dan Bernstein.
2335 Implement animation-related methods for WebKitTestRunner
2336 https://bugs.webkit.org/show_bug.cgi?id=42053
2338 Implemented some helpers for WebKitTestRunner;
2340 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2341 (WKBundleFrameGetNumberOfActiveAnimations):
2342 (WKBundleFramePauseAnimationOnElementWithId):
2343 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2344 * WebProcess/WebPage/WebFrame.cpp:
2345 (WebKit::WebFrame::numberOfActiveAnimations):
2346 (WebKit::WebFrame::pauseAnimationOnElementWithId):
2347 * WebProcess/WebPage/WebFrame.h:
2350 2010-07-10 Anders Carlsson <andersca@apple.com>
2352 Reviewed by Sam Weinig.
2354 Don't initialize plug-ins until allowed by the page
2355 https://bugs.webkit.org/show_bug.cgi?id=42033
2357 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2358 (WebKit::NetscapePlugin::paint):
2359 (WebKit::NetscapePlugin::geometryDidChange):
2360 Assert that the plug-in is started.
2362 * WebProcess/Plugins/PluginView.cpp:
2363 (WebKit::PluginView::PluginView):
2364 Initialize m_isWaitingUntilMediaCanStart.
2366 (WebKit::PluginView::~PluginView):
2367 If necessary, remove the plug-in view as a MediaCanStartListener.
2369 (WebKit::PluginView::initializePlugin):
2370 If we're not allowed to initialize the plug-in, add the plug-in view as a MediaCanStartListener.
2372 (WebKit::PluginView::paint):
2373 Check that the plug-in is initialized.
2375 (WebKit::PluginView::viewGeometryDidChange):
2378 (WebKit::PluginView::mediaCanStart):
2379 Initialize the plug-in.
2381 * WebProcess/Plugins/PluginView.h:
2383 2010-07-10 Anders Carlsson <andersca@apple.com>
2385 Reviewed by Dan Bernstein.
2387 Have the plug-in view initialize the plug-in
2388 https://bugs.webkit.org/show_bug.cgi?id=42030
2390 * WebProcess/Plugins/DummyPlugin.cpp:
2391 (WebKit::DummyPlugin::initialize):
2392 * WebProcess/Plugins/DummyPlugin.h:
2393 Plugin::initialize now takes a struct.
2395 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2396 (WebKit::NetscapePlugin::initialize):
2397 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2398 Plugin::initialize now takes a struct.
2400 * WebProcess/Plugins/Plugin.h:
2401 Add Parameters struct.
2403 * WebProcess/Plugins/PluginView.cpp:
2404 (WebKit::PluginView::PluginView):
2405 Add Parameters parameter.
2407 (WebKit::PluginView::~PluginView):
2408 Add m_plugin null check.
2410 (WebKit::PluginView::initializePlugin):
2411 Try to initialize the plug-in and zero out the plug-in if initialization fails.
2413 (WebKit::PluginView::paint):
2414 Add m_plugin null check.
2416 (WebKit::PluginView::setParent):
2417 Initialize the plug-in.
2419 * WebProcess/Plugins/PluginView.h:
2420 (WebKit::PluginView::create):
2421 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2422 (WebKit::WebFrameLoaderClient::createPlugin):
2423 Don't initialize the plug-in here.
2425 2010-07-10 Anders Carlsson <andersca@apple.com>
2427 Reviewed by Oliver Hunt.
2429 Call Page::canStartMedia when the WKView is added to/removed from a window
2430 https://bugs.webkit.org/show_bug.cgi?id=42029
2432 * Shared/CoreIPCSupport/WebPageMessageKinds.h:
2436 * UIProcess/API/mac/WKView.mm:
2437 (-[WKView initWithFrame:pageNamespaceRef:]):
2440 (-[WKView _updateVisibility]):
2443 * UIProcess/WebPageProxy.cpp:
2444 (WebKit::WebPageProxy::WebPageProxy):
2445 Initialize m_isInWindow.
2447 (WebKit::WebPageProxy::setIsInWindow):
2448 Send WebPageMessage::SetIsInWindow.
2450 * UIProcess/WebPageProxy.h:
2451 * WebProcess/WebPage/WebPage.cpp:
2452 (WebKit::WebPage::setIsInWindow):
2453 Call Page::canStartMedia.
2455 (WebKit::WebPage::didReceiveMessage):
2456 Handle the SetIsInWindow message.
2458 * WebProcess/WebPage/WebPage.h:
2460 2010-07-10 Anders Carlsson <andersca@apple.com>
2462 Reviewed by Dan Bernstein.
2464 Reuse initialized NetscapePluginModules, pass parameters to NPP_New
2465 https://bugs.webkit.org/show_bug.cgi?id=42028
2467 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2468 (WebKit::NetscapePlugin::NetscapePlugin):
2469 Let the plug-in module know that a plug-in has been created.
2471 (WebKit::NetscapePlugin::~NetscapePlugin):
2472 Let the plug-in module know that a plug-in has been destroyed.
2474 (WebKit::NetscapePlugin::initialize):
2475 Pass the MIME type and parameters to the plug-in.
2477 * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
2478 (WebKit::initializedNetscapePluginModules):
2479 Add list of initialized plug-in modules.
2481 (WebKit::NetscapePluginModule::NetscapePluginModule):
2482 Initialize m_pluginCount to 0.
2484 (WebKit::NetscapePluginModule::~NetscapePluginModule):
2485 Assert that we're not in the list of initialized plug-ins.
2487 (WebKit::NetscapePluginModule::pluginCreated):
2488 Increment the plug-in count.
2490 (WebKit::NetscapePluginModule::pluginDestroyed):
2491 Decrement the plug-in count and call shutdown if it's 0.
2493 (WebKit::NetscapePluginModule::shutdown):
2494 Call NP_Shutdown and remove the plug-in from the list of initialized plug-ins.
2496 (WebKit::NetscapePluginModule::getOrCreate):
2497 Look for an already initialized plug-in module before creating one.
2499 (WebKit::NetscapePluginModule::load):
2500 Set m_isInitialized to true.
2502 * WebProcess/Plugins/Netscape/mac/NetscapePluginModuleMac.cpp:
2503 (WebKit::NetscapePluginModule::unload):
2504 Leak the CFBundleRef to avoid possible crashes.
2506 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2507 (WebKit::WebFrameLoaderClient::createPlugin):
2508 Call getOrCreate instead of create.
2510 2010-07-09 Leon Clarke <leonclarke@google.com>
2512 Reviewed by Adam Barth.
2514 add support for link prefetching
2515 https://bugs.webkit.org/show_bug.cgi?id=3652
2517 * Configurations/FeatureDefines.xcconfig:
2519 2010-07-09 Anders Carlsson <andersca@apple.com>
2521 Reviewed by Sam Weinig and Dan Bernstein.
2523 Handle setting of drawing and event models
2524 https://bugs.webkit.org/show_bug.cgi?id=41994
2526 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2527 Handle NPPVpluginDrawingModel and NPPVpluginEventModel.
2529 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2530 (WebKit::NetscapePlugin::NetscapePlugin):
2531 Initialize m_inNPPNew.
2533 (WebKit::NetscapePlugin::~NetscapePlugin):
2534 Assert that we aren't still running.
2536 (WebKit::NetscapePlugin::fromNPP):
2537 New function that returns a NetscapePlugin object given a NPP pointer.
2539 (WebKit::NetscapePlugin::initialize):
2540 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.cpp:
2541 (WebKit::NetscapePlugin::setDrawingModel):
2542 Set the drawing model.
2544 (WebKit::NetscapePlugin::setEventModel):
2545 Set the event model.
2547 (WebKit::initializeEvent):
2548 (WebKit::NetscapePlugin::platformPaint):
2549 Only send the Cocoa event when using the Cocoa event model.
2551 2010-07-09 Sam Weinig <sam@webkit.org>
2553 Reviewed by Anders Carlsson.
2555 Patch for https://bugs.webkit.org/show_bug.cgi?id=41971
2556 Add really basic BackForwardList support.
2558 * Shared/CoreIPCSupport/WebPageMessageKinds.h:
2560 Add new message kind.
2562 * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2563 (WebPageProxyMessage::):
2564 Add new message kinds. Remove DidChangeCanGoBack and DidChangeCanGoForward.
2566 * UIProcess/API/C/WKPage.cpp:
2567 (WKPageGoToBackForwardListItem):
2568 * UIProcess/API/C/WKPage.h:
2569 Add function to initiate a navigation to a BackForward item. The
2570 BackForward list will be updated to use this as the current item
2573 * UIProcess/WebBackForwardList.cpp:
2574 (WebKit::WebBackForwardList::WebBackForwardList):
2575 (WebKit::WebBackForwardList::addItem): Added.
2576 (WebKit::WebBackForwardList::goToItem): Added.
2577 (WebKit::WebBackForwardList::itemAtIndex): Added.
2578 (WebKit::WebBackForwardList::backListCount): Changed to return int matching WebCore.
2579 (WebKit::WebBackForwardList::forwardListCount): Ditto.
2580 (WebKit::WebBackForwardList::backListWithLimit): Add cast to int.
2581 (WebKit::WebBackForwardList::forwardListWithLimit): Ditto.
2582 (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit): Ditto.
2583 (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit): Ditto.
2584 * UIProcess/WebBackForwardList.h:
2586 * UIProcess/WebBackForwardListItem.cpp:
2587 (WebKit::WebBackForwardListItem::WebBackForwardListItem):
2588 * UIProcess/WebBackForwardListItem.h:
2589 (WebKit::WebBackForwardListItem::create):
2590 (WebKit::WebBackForwardListItem::itemID):
2593 * UIProcess/WebPageProxy.cpp:
2594 (WebKit::WebPageProxy::WebPageProxy):
2595 (WebKit::WebPageProxy::close):
2596 (WebKit::WebPageProxy::canGoForward):
2597 (WebKit::WebPageProxy::canGoBack):
2598 (WebKit::WebPageProxy::goToBackForwardItem):
2599 (WebKit::WebPageProxy::didReceiveMessage):
2600 (WebKit::WebPageProxy::didReceiveSyncMessage):
2601 (WebKit::WebPageProxy::addItemToBackForwardList):
2602 (WebKit::WebPageProxy::goToItemInBackForwardList):
2603 (WebKit::WebPageProxy::processDidExit):
2604 * UIProcess/WebPageProxy.h:
2605 - Removed m_canGoBack and m_canGoForward booleans and instead use the BackForwardList.
2606 - Forward goToBackForwardItem to the WebProcess.
2607 - Respond to messages from the WebBackForwardListProxy in the WebProcess,
2608 forwarding to the WebBackForwardList.
2610 * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp:
2611 (WebKit::WebBackForwardControllerClient::createBackForwardList):
2612 Start using a WebBackForwardListProxy instead of a BackForwardListImpl.
2614 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2615 (WebKit::WebFrameLoaderClient::dispatchDidAddBackForwardItem):
2616 (WebKit::WebFrameLoaderClient::dispatchDidRemoveBackForwardItem):
2617 (WebKit::WebFrameLoaderClient::dispatchDidChangeBackForwardIndex):
2618 Remove calls backForwardListDidChange() now that we communicate much more
2619 information than just this state.
2621 * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2622 (WebKit::idToHistoryItemMap):
2623 (WebKit::historyItemToIDMap):
2624 (WebKit::generateHistoryItemID):
2625 (WebKit::getIDForHistoryItem):
2626 (WebKit::WebBackForwardListProxy::itemForID):
2627 Add leaking cached maps of HistoryItems to IDs, the life time of these
2628 objects will be improved in a subsequent patch.
2630 (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
2631 (WebKit::WebBackForwardListProxy::addItem):
2632 (WebKit::WebBackForwardListProxy::goBack):
2633 (WebKit::WebBackForwardListProxy::goForward):
2634 (WebKit::WebBackForwardListProxy::goToItem):
2635 (WebKit::WebBackForwardListProxy::backItem):
2636 (WebKit::WebBackForwardListProxy::currentItem):
2637 (WebKit::WebBackForwardListProxy::forwardItem):
2638 (WebKit::WebBackForwardListProxy::itemAtIndex):
2639 (WebKit::WebBackForwardListProxy::backListWithLimit):
2640 (WebKit::WebBackForwardListProxy::forwardListWithLimit):
2641 (WebKit::WebBackForwardListProxy::capacity):
2642 (WebKit::WebBackForwardListProxy::setCapacity):
2643 (WebKit::WebBackForwardListProxy::enabled):
2644 (WebKit::WebBackForwardListProxy::setEnabled):
2645 (WebKit::WebBackForwardListProxy::backListCount):
2646 (WebKit::WebBackForwardListProxy::forwardListCount):
2647 (WebKit::WebBackForwardListProxy::containsItem):
2648 (WebKit::WebBackForwardListProxy::close):
2649 (WebKit::WebBackForwardListProxy::closed):
2650 (WebKit::WebBackForwardListProxy::removeItem):
2651 (WebKit::WebBackForwardListProxy::entries):
2652 (WebKit::WebBackForwardListProxy::pushStateItem):
2653 * WebProcess/WebPage/WebBackForwardListProxy.h:
2654 Forward functions to the UIProcess.
2656 * WebProcess/WebPage/WebPage.cpp:
2657 (WebKit::WebPage::goToBackForwardItem):
2658 (WebKit::WebPage::didReceiveMessage):
2659 * WebProcess/WebPage/WebPage.h:
2660 Respond to GoToBackForwardItem message.
2662 * mac/WebKit2.exp: Add new API function.
2664 2010-07-09 Anders Carlsson <andersca@apple.com>
2666 Reviewed by Sam Weinig.
2668 Verify drawing coordinates, add crude painting support
2669 https://bugs.webkit.org/show_bug.cgi?id=41984
2671 * WebKit2.xcodeproj/project.pbxproj:
2672 Add NetscapePluginMac.cpp.
2674 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2675 (WebKit::NetscapePlugin::NetscapePlugin):
2676 Initialize drawing and event models.
2678 (WebKit::NetscapePlugin::initialize):
2679 Call platformPostInitialize.
2681 (WebKit::NetscapePlugin::destroy):
2684 (WebKit::NetscapePlugin::paint):
2687 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2688 Add member functions.
2690 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.cpp: Added.
2691 (WebKit::NetscapePlugin::platformPostInitialize):
2692 Set default event and drawing models and verify that they are compatible.
2694 (WebKit::NetscapePlugin::platformPaint):
2695 Send a paint event (assuming the Cocoa event model currently).
2697 * WebProcess/Plugins/PluginView.cpp:
2698 (WebKit::PluginView::paint):
2699 Change the paint rect to be in window coordinates.
2701 (WebKit::PluginView::viewGeometryDidChange):
2702 (WebKit::PluginView::clipRectInWindowCoordinates):
2703 * WebProcess/Plugins/PluginView.h:
2705 2010-07-09 Anders Carlsson <andersca@apple.com>
2707 Reviewed by Sam Weinig.
2709 Pass a clip rect to the plugin and call NPP_SetWindow
2710 https://bugs.webkit.org/show_bug.cgi?id=41969
2712 * WebProcess/Plugins/DummyPlugin.cpp:
2713 (WebKit::DummyPlugin::geometryDidChange):
2714 * WebProcess/Plugins/DummyPlugin.h:
2715 Add clip rect parameter.
2717 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2718 (WebKit::NetscapePlugin::NetscapePlugin):
2719 Initialize m_npWindow.
2721 (WebKit::NetscapePlugin::callSetWindow):
2724 (WebKit::NetscapePlugin::initialize):
2725 Set the window type to NPWindowTypeDrawable for now.
2727 (WebKit::NetscapePlugin::geometryDidChange):
2728 Update the frame and clip rects and call NPP_SetWindow.
2730 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2731 Add an NPWindow member variable.
2733 * WebProcess/Plugins/Plugin.h:
2734 Add a clipRect parameter to geometryDidChange.
2736 * WebProcess/Plugins/PluginView.cpp:
2737 (WebKit::PluginView::PluginView):
2738 Add the plug-in element to the constructor.
2740 (WebKit::PluginView::viewGeometryDidChange):
2741 Compute the clip rect and pass it to the plug-in.
2743 * WebProcess/Plugins/PluginView.h:
2744 (WebKit::PluginView::create):
2745 Pass the plug-in element to the constructor.
2747 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2748 (WebKit::WebFrameLoaderClient::createPlugin):
2749 Pass the plug-in element to PluginView::create.
2751 2010-07-09 Anders Carlsson <andersca@apple.com>
2753 Reviewed by Simon Fraser.
2755 Instantiate Netscape plug-ins, pass geometry information to Plugin
2756 https://bugs.webkit.org/show_bug.cgi?id=41960
2758 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2759 Handle NPNVsupportsCoreGraphicsBool and NPNVsupportsCocoaBool.
2761 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2762 (WebKit::NetscapePlugin::NetscapePlugin):
2765 (WebKit::NetscapePlugin::initialize):
2766 Try to instantiate the plug-in by calling NPP_New.
2768 * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2769 Store the NetscapePluginModule and the NPP struct.
2771 * WebProcess/Plugins/Netscape/NetscapePluginModule.h:
2772 Add a getter for the NPPluginFuncs vtable.
2774 * WebProcess/Plugins/PluginView.cpp:
2775 (WebKit::PluginView::frameRectsChanged):
2776 Make sure to call viewGeometryDidChange.
2778 (WebKit::PluginView::setParent):
2781 (WebKit::PluginView::viewGeometryDidChange):
2782 Convert the frame rect to window coordinates and pass it to the plug-in.
2784 * WebProcess/Plugins/PluginView.h:
2785 Add function declarations.
2787 2010-07-08 Diego Gonzalez <diegohcg@webkit.org>
2789 Reviewed by Kenneth Rohde Christiansen.
2791 [Qt] [WebKit2] Make QWKPage call _q_webActionTriggered as a private slot
2792 https://bugs.webkit.org/show_bug.cgi?id=41880
2794 * UIProcess/API/qt/qwkpage.cpp:
2795 * UIProcess/API/qt/qwkpage.h:
2797 2010-07-09 Antti Koivisto <koivisto@iki.fi>
2803 * UIProcess/API/qt/qwkpage.h:
2805 2010-07-08 Brian Weinstein <bweinstein@apple.com>
2807 WebKit2 build fix for Windows.
2809 * WebProcess/Plugins/PluginView.h: Change the forward declaration of Plugin
2811 * win/WebKit2.vcproj: Update the include paths for Release to match Debug, and
2812 add some files to the vcproj that were added on Mac.
2814 2010-07-08 Sam Weinig <sam@webkit.org>
2816 Attempt to fix the windows build.
2818 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2819 (WebKit::WebFrameLoaderClient::createPlugin):
2821 2010-07-08 Anders Carlsson <andersca@apple.com>
2823 Reviewed by Sam Weinig.
2825 Add NetscapePlugin class
2826 https://bugs.webkit.org/show_bug.cgi?id=41919
2828 * WebKit2.xcodeproj/project.pbxproj:
2829 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Added.
2830 (WebKit::NetscapePlugin::NetscapePlugin):
2831 (WebKit::NetscapePlugin::~NetscapePlugin):
2832 (WebKit::NetscapePlugin::initialize):
2833 (WebKit::NetscapePlugin::destroy):
2834 (WebKit::NetscapePlugin::paint):
2835 (WebKit::NetscapePlugin::geometryDidChange):
2836 * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added.
2837 (WebKit::NetscapePlugin::create):
2838 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2839 (WebKit::WebFrameLoaderClient::createPlugin):
2841 2010-07-08 Anders Carlsson <andersca@apple.com>
2843 Reviewed by Sam Weinig.
2845 Enable notImplemented messages by default and have the various clients explicitly disable them.
2847 * Shared/NotImplemented.h:
2848 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2849 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2850 * WebProcess/WebCoreSupport/WebDragClient.cpp:
2851 * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2852 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2853 * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2855 2010-07-08 Anders Carlsson <andersca@apple.com>
2857 Reviewed by Sam Weinig.
2859 Add stubbed out NPN functions
2860 https://bugs.webkit.org/show_bug.cgi?id=41917
2862 * WebKit2.xcodeproj/project.pbxproj:
2863 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: Added.
2864 (WebKit::initializeBrowserFuncs):
2865 (WebKit::netscapeBrowserFuncs):
2866 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h: Added.
2867 * WebProcess/Plugins/Netscape/mac/NetscapePluginModuleMac.cpp:
2868 (WebKit::NetscapePluginModule::tryLoad):
2870 2010-07-08 Anders Carlsson <andersca@apple.com>
2874 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2876 2010-07-08 Luiz Agostini <luiz.agostini@openbossa.org>
2878 Reviewed by Kenneth Rohde Christiansen.
2880 [Qt] Spelling and style correction
2881 https://bugs.webkit.org/show_bug.cgi?id=41891
2883 Correcting a spelling and a style mistakes.
2885 * UIProcess/Launcher/ProcessLauncher.h:
2886 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2888 2010-07-08 Anders Carlsson <andersca@apple.com>
2890 Reviewed by Sam Weinig.
2892 Implement more of NetscapePluginModule
2893 https://bugs.webkit.org/show_bug.cgi?id=41910
2895 * WebKit2.xcodeproj/project.pbxproj:
2896 * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
2897 (WebKit::NetscapePluginModule::create):
2898 (WebKit::NetscapePluginModule::load):
2899 * WebProcess/Plugins/Netscape/NetscapePluginModule.h:
2900 * WebProcess/Plugins/Netscape/mac/NetscapePluginModuleMac.cpp: Added.
2901 (WebKit::NetscapePluginModule::unload):
2902 (WebKit::pointerToFunction):
2903 (WebKit::NetscapePluginModule::tryLoad):
2904 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2905 (WebKit::WebFrameLoaderClient::createPlugin):
2907 2010-07-08 Anders Carlsson <andersca@apple.com>
2909 Reviewed by Sam Weinig.
2911 Add stubbed out NetscapePluginModule class
2912 https://bugs.webkit.org/show_bug.cgi?id=41901
2914 * WebKit2.xcodeproj/project.pbxproj:
2915 * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp: Added.
2916 (WebKit::NetscapePluginModule::NetscapePluginModule):
2917 * WebProcess/Plugins/Netscape/NetscapePluginModule.h: Added.
2918 (WebKit::NetscapePluginModule::create):
2919 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2920 (WebKit::WebFrameLoaderClient::createPlugin):
2922 2010-07-08 Luiz Agostini <luiz.agostini@openbossa.org>
2924 Reviewed by Kenneth Rohde Christiansen.
2926 [Qt] Move socket objects to connection's thread
2927 https://bugs.webkit.org/show_bug.cgi?id=41897
2929 To receive network related notifications in the WorkQueue thread, the
2930 QLocalSocket instances must be moved to that thread.
2932 * Platform/CoreIPC/qt/ConnectionQt.cpp:
2933 (CoreIPC::Connection::open):
2934 * Platform/WorkQueue.h:
2935 * Platform/qt/WorkQueueQt.cpp:
2936 (WorkQueue::moveSocketToWorkThread):
2938 2010-07-08 Alice Liu <alice.liu@apple.com>
2940 Reviewed by Sam Weinig.
2942 https://bugs.webkit.org/show_bug.cgi?id=41653
2943 Add new WebKitTestRunner project for Windows
2945 * win/WebKit2Generated.make: Add files needed for WebKitTestRunner
2947 2010-07-08 Anders Carlsson <andersca@apple.com>
2949 Reviewed by Sam Weinig.
2951 Add a GetPluginHostConnection WebProcessProxy message
2952 https://bugs.webkit.org/show_bug.cgi?id=41893
2954 * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
2955 (WebProcessProxyMessage::):
2956 * UIProcess/WebProcessProxy.cpp:
2957 (WebKit::WebProcessProxy::getPluginHostConnection):
2958 (WebKit::WebProcessProxy::didReceiveMessage):
2959 (WebKit::WebProcessProxy::didReceiveSyncMessage):
2960 * UIProcess/WebProcessProxy.h:
2961 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2962 (WebKit::WebFrameLoaderClient::createPlugin):
2964 2010-07-08 Anders Carlsson <andersca@apple.com>
2966 Reviewed by Sam Weinig.
2968 Add more parameters to Plugin::initialize
2969 https://bugs.webkit.org/show_bug.cgi?id=41890
2971 * WebProcess/Plugins/DummyPlugin.cpp:
2972 (WebKit::DummyPlugin::initialize):
2973 * WebProcess/Plugins/DummyPlugin.h:
2974 * WebProcess/Plugins/Plugin.h:
2975 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2976 (WebKit::WebFrameLoaderClient::createPlugin):
2978 2010-07-08 Anders Carlsson <andersca@apple.com>
2982 * WebProcess/Plugins/DummyPlugin.h:
2984 2010-07-08 Anders Carlsson <andersca@apple.com>
2986 Reviewed by Sam Weinig.
2988 Add a Plugin abstract base class and a DummyPlugin that implements it
2989 https://bugs.webkit.org/show_bug.cgi?id=41885
2991 * WebKit2.xcodeproj/project.pbxproj:
2994 * WebProcess/Plugins/DummyPlugin.cpp: Added.
2995 (WebKit::DummyPlugin::paint):
2996 Paint a red rectangle.
2998 * WebProcess/Plugins/Plugin.cpp: Added.
2999 * WebProcess/Plugins/Plugin.h: Added.
3000 Add Plugin, an abstract baseclass.
3002 * WebProcess/Plugins/PluginView.cpp:
3003 (WebKit::PluginView::PluginView):
3004 (WebKit::PluginView::~PluginView):
3005 (WebKit::PluginView::paint):
3006 (WebKit::PluginView::viewGeometryDidChange):
3007 * WebProcess/Plugins/PluginView.h:
3008 (WebKit::PluginView::create):
3009 Add a Plugin member function and forward PluginView calls to it.
3011 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3012 (WebKit::WebFrameLoaderClient::createPlugin):
3013 Make a DummyPlugin and pass it to the PluginView.
3015 * win/WebKit2.vcproj:
3018 2010-07-08 Anders Carlsson <andersca@apple.com>
3020 Reviewed by Sam Weinig.
3022 Add stubbed out PluginView class
3023 https://bugs.webkit.org/show_bug.cgi?id=41879
3025 * WebKit2.xcodeproj/project.pbxproj:
3026 Add PluginView.cpp and PluginView.h
3028 * WebProcess/Plugins/PluginView.cpp: Added.
3029 (WebKit::PluginView::PluginView):
3030 (WebKit::PluginView::~PluginView):
3031 (WebKit::PluginView::setFrameRect):
3032 (WebKit::PluginView::paint):
3033 (WebKit::PluginView::viewGeometryDidChange):
3034 (WebKit::PluginView::invalidateRect):
3035 Stub out these functions.
3037 * WebProcess/Plugins/PluginView.h: Added.
3038 (WebKit::PluginView::create):
3039 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3040 (WebKit::WebFrameLoaderClient::createPlugin):
3041 Create a plug-in view.
3043 * win/WebKit2.vcproj:
3044 Add PluginView.cpp and PluginView.h.
3046 2010-07-08 Steve Falkenburg <sfalken@apple.com>
3048 Reviewed by Adam Roben.
3050 WebKit2 on Windows needs a version resource
3051 https://bugs.webkit.org/show_bug.cgi?id=41870
3052 <rdar://problem/8170501>
3054 * win/WebKit2.rc: Added.
3055 * win/WebKit2.vcproj:
3056 * win/WebKit2WebProcess.rc: Added.
3057 * win/WebKit2WebProcess.vcproj:
3059 2010-07-08 Sam Weinig <sam@webkit.org>
3061 Reviewed by Anders Carlsson.
3063 Patch for https://bugs.webkit.org/show_bug.cgi?id=41874
3064 Add stubbed out WebBackForwardListProxy
3066 - No behavior change.
3067 - Rename the old WebBackForwardListProxy to WebBackForwardList since it
3068 will be the implementation, not the proxy.
3070 * UIProcess/API/C/WKAPICast.h:
3071 * UIProcess/API/C/WKBackForwardList.cpp:
3072 * UIProcess/API/C/WKPage.cpp:
3073 * UIProcess/WebBackForwardList.cpp: Copied from UIProcess/WebBackForwardListProxy.cpp.
3074 * UIProcess/WebBackForwardList.h: Copied from UIProcess/WebBackForwardListProxy.h.
3075 (WebKit::WebBackForwardList::create):
3076 * UIProcess/WebBackForwardListProxy.cpp: Removed.
3077 * UIProcess/WebBackForwardListProxy.h: Removed.
3078 * UIProcess/WebPageProxy.cpp:
3079 (WebKit::WebPageProxy::WebPageProxy):
3080 * UIProcess/WebPageProxy.h:
3081 (WebKit::WebPageProxy::backForwardList):
3082 * WebKit2.xcodeproj/project.pbxproj:
3083 * WebProcess/WebPage/WebBackForwardListProxy.cpp: Added.
3084 * WebProcess/WebPage/WebBackForwardListProxy.h: Added.
3085 (WebKit::WebBackForwardListProxy::create):
3086 * win/WebKit2.vcproj:
3088 2010-07-08 Sam Weinig <sam@webkit.org>
3090 Reviewed by Anders Carlsson.
3092 Pass Page to BackForwardControllerClient::createBackForwardList since it
3093 may be called before implementations of BackForwardControllerClient have
3096 * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp:
3097 (WebKit::WebBackForwardControllerClient::createBackForwardList):
3098 * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h:
3100 2010-07-08 Anders Carlsson <andersca@apple.com>
3102 Reviewed by Sam Weinig.
3104 Fix fallout from Darin's adoptRef assertion changes.
3106 * UIProcess/WebContext.cpp:
3107 (WebKit::WebContext::sharedProcessContext):
3108 (WebKit::WebContext::sharedThreadContext):
3109 * WebProcess/WebPage/WebFrame.cpp:
3110 (WebKit::WebFrame::createMainFrame):
3111 (WebKit::WebFrame::createSubframe):
3112 (WebKit::WebFrame::create):
3113 (WebKit::WebFrame::WebFrame):
3114 * WebProcess/WebPage/WebFrame.h:
3116 2010-07-08 Steve Falkenburg <sfalken@apple.com>
3118 Reviewed by Mark Rowe.
3120 WebKit2 should enable DEP (Data Execution Prevention) on Windows via /NXCOMPAT
3121 https://bugs.webkit.org/show_bug.cgi?id=41837
3122 <rdar://problem/8170505>
3124 * win/WebKit2WebProcess.vcproj:
3126 2010-07-08 Sam Weinig <sam@webkit.org>
3128 Reviewed by Anders Carlsson.
3130 Patch for https://bugs.webkit.org/show_bug.cgi?id=41826
3131 Convert BackForwardList to an abstract base class and add BackForwardListImpl
3132 as the concrete implementation of it.
3134 * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp:
3135 (WebKit::WebBackForwardControllerClient::createBackForwardList):
3137 2010-07-08 Luiz Agostini <luiz@webkit.org>, Kenneth Rohde Christiansen <kenneth@webkit.org>
3139 Reviewed by Antti Koivisto.
3141 [Qt] Improve QtWebkit2 secondary process launching procedure
3142 https://bugs.webkit.org/show_bug.cgi?id=41853
3144 Changing secondary process launching procedure to make sure that the method
3145 ProcessLauncher::didFinishLaunchingProcess will only be called after secondary
3146 process has been launched and the connection has been stablished between the
3147 UIProcess and WebProcess.
3149 This solves the timing issues ocasionaly observed when launching MiniBrowser.
3151 QLocalServer object and related code has been removed from the class Connection.
3152 Server instances of the Connection class now get the QLocalSocket via ProcessLauncher.
3154 * Platform/CoreIPC/Connection.h:
3155 * Platform/CoreIPC/qt/ConnectionQt.cpp:
3156 (CoreIPC::Connection::platformInitialize):
3157 (CoreIPC::Connection::platformInvalidate):
3158 (CoreIPC::Connection::open):
3160 Using QProcess* as PlatformProcessIdentifier.
3162 * Platform/PlatformProcessIdentifier.h:
3164 A new singleton class named ProcessLauncherHelper was created to handle the QLocalServer
3165 object used to receive connections. This class launches the process and waits for it to connect
3166 before calling ProcessLauncher::didFinishLaunchingProcess.
3168 * UIProcess/Launcher/ProcessLauncher.h:
3169 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3170 (WebKit::ProcessLauncherHelper::launch):
3171 (WebKit::ProcessLauncherHelper::takePendingConnection):
3172 (WebKit::ProcessLauncherHelper::ProcessLauncherHelper):
3173 (WebKit::ProcessLauncherHelper::instance):
3174 (WebKit::ProcessLauncherHelper::newConnection):
3175 (WebKit::ProcessLauncher::launchProcess):
3176 (WebKit::ProcessLauncher::terminateProcess):
3177 (_qt_takePendingConnection):
3179 2010-07-08 Antti Koivisto <koivisto@iki.fi>
3181 Reviewed by Kenneth Rohde Christiansen.
3183 [Qt] Initial WebKit2 implementation
3184 https://bugs.webkit.org/show_bug.cgi?id=40233
3188 * Shared/qt/WebEventFactoryQt.cpp:
3189 * UIProcess/API/qt/ClientImpl.cpp:
3190 * UIProcess/API/qt/qwkpage.cpp:
3191 * UIProcess/API/qt/qwkpage.h:
3192 * UIProcess/DrawingAreaProxy.h:
3193 * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
3194 * WebProcess/WebProcess.cpp:
3196 2010-07-07 Zoltan Horvath <zoltan@webkit.org>
3198 Reviewed by Kenneth Rohde Christiansen.
3200 [Qt] Terminate QtWebProcess on exit
3201 https://bugs.webkit.org/show_bug.cgi?id=41766
3203 Call WKPageTerminate to terminate QtWebProcess on exit.
3205 * UIProcess/API/qt/qwkpage.cpp:
3206 (QWKPage::~QWKPage):
3208 2010-07-07 Steve Falkenburg <sfalken@apple.com>
3210 Windows release build fix.
3211 Don't generate public symbols since this is exceeding address space on our builders.
3213 * win/WebKit2.vcproj:
3215 2010-07-07 Sam Weinig <sam@webkit.org>
3217 Reviewed by Anders Carlsson.
3219 Patch for https://bugs.webkit.org/show_bug.cgi?id=41772
3220 Add basic piping for BackForwardControllerClient.
3222 - Add very basic WebBackForwardControllerClient.
3224 * WebKit2.xcodeproj/project.pbxproj:
3225 * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp: Added.
3226 (WebKit::WebBackForwardControllerClient::backForwardControllerDestroyed):
3227 (WebKit::WebBackForwardControllerClient::createBackForwardList):
3228 * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h: Added.
3229 (WebKit::WebBackForwardControllerClient::WebBackForwardControllerClient):
3230 * WebProcess/WebPage/WebPage.cpp:
3231 (WebKit::WebPage::WebPage):
3232 * win/WebKit2.vcproj:
3234 2010-07-07 Antti Koivisto <koivisto@iki.fi>
3236 Reviewed by Kenneth Rohde Christiansen.
3238 [Qt] Initial WebKit2 implementation
3239 https://bugs.webkit.org/show_bug.cgi?id=40233
3241 Add Qt section to the prefix header.
3245 2010-07-07 Antti Koivisto <koivisto@iki.fi>
3249 Fix build, remove some left over debugging code.
3251 * Platform/CoreIPC/qt/ConnectionQt.cpp:
3252 (CoreIPC::Connection::readyReadHandler):
3253 (CoreIPC::Connection::sendOutgoingMessage):
3255 2010-07-07 Antti Koivisto <koivisto@iki.fi>
3257 Reviewed by Kenneth Rohde Christiansen.
3259 [Qt] Initial WebKit2 implementation
3260 https://bugs.webkit.org/show_bug.cgi?id=40233
3262 Implement WebPage for Qt.
3264 * WebProcess/WebPage/qt/WebPageQt.cpp: Added.
3265 (WebKit::WebPage::platformInitialize):
3267 (WebKit::WebPage::interpretKeyEvent):
3270 2010-07-06 Anders Carlsson <andersca@apple.com>
3272 Fix Windows WebKit2 build.
3274 * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
3275 (WebKit::PluginInfoStore::mimeTypeFromExtension):
3277 2010-07-06 Anders Carlsson <andersca@apple.com>
3279 Reviewed by Sam Weinig.
3281 Add PluginInfoStore::findPlugin
3282 https://bugs.webkit.org/show_bug.cgi?id=41719
3284 * UIProcess/Plugins/PluginInfoStore.cpp:
3285 (WebKit::PluginInfoStore::getPlugins):
3286 (WebKit::PluginInfoStore::findPluginForMIMEType):
3287 (WebKit::PluginInfoStore::findPluginForExtension):
3288 (WebKit::pathExtension):
3289 (WebKit::PluginInfoStore::findPlugin):
3290 * UIProcess/Plugins/PluginInfoStore.h:
3291 * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3292 (WebKit::PluginInfoStore::mimeTypeFromExtension):
3294 2010-07-06 Sam Weinig <sam@webkit.org>
3296 Reviewed by Anders Carlsson.
3298 Add injected bundle API for exposing console messages.
3300 - Split WKBundlePageClient into multiple clients matching WKPage.
3301 (For now we only have a loader client and a UI client)
3303 * WebKit2.xcodeproj/project.pbxproj:
3304 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3305 (WKBundlePageSetLoaderClient):
3306 (WKBundlePageSetUIClient):
3307 * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3308 * WebProcess/InjectedBundle/InjectedBundlePageClient.cpp: Removed.
3309 * WebProcess/InjectedBundle/InjectedBundlePageClient.h: Removed.
3310 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: Copied from WebProcess/InjectedBundle/InjectedBundlePageClient.cpp.
3311 (WebKit::InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient):
3312 (WebKit::InjectedBundlePageLoaderClient::initialize):
3313 (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
3314 (WebKit::InjectedBundlePageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
3315 (WebKit::InjectedBundlePageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
3316 (WebKit::InjectedBundlePageLoaderClient::didCommitLoadForFrame):
3317 (WebKit::InjectedBundlePageLoaderClient::didFinishLoadForFrame):
3318 (WebKit::InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame):
3319 (WebKit::InjectedBundlePageLoaderClient::didReceiveTitleForFrame):
3320 (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
3321 * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: Copied from WebProcess/InjectedBundle/InjectedBundlePageClient.h.
3322 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Added.
3323 (WebKit::InjectedBundlePageUIClient::InjectedBundlePageUIClient):
3324 (WebKit::InjectedBundlePageUIClient::initialize):
3325 (WebKit::InjectedBundlePageUIClient::addMessageToConsole):
3326 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Added.
3327 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3328 (WebKit::WebChromeClient::addMessageToConsole):
3329 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3330 (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
3331 (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3332 (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
3333 (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
3334 (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
3335 (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
3336 (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
3337 (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
3338 * WebProcess/WebPage/WebPage.cpp:
3339 (WebKit::WebPage::initializeInjectedBundleLoaderClient):
3340 (WebKit::WebPage::initializeInjectedBundleUIClient):
3341 * WebProcess/WebPage/WebPage.h:
3342 (WebKit::WebPage::injectedBundleLoaderClient):
3343 (WebKit::WebPage::injectedBundleUIClient):
3345 * win/WebKit2.vcproj:
3347 2010-07-06 Sam Weinig <sam@webkit.org>
3349 Reviewed by Anders Carlsson.
3351 Patch for https://bugs.webkit.org/show_bug.cgi?id=41707
3352 Add ability to dump frame inner text for the test runner
3354 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3355 (WKBundleFrameCopyInnerText):
3356 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3357 * WebProcess/WebPage/WebFrame.cpp:
3358 (WebKit::WebFrame::innerText):
3359 * WebProcess/WebPage/WebFrame.h:
3362 2010-07-06 Anders Carlsson <andersca@apple.com>
3364 Reviewed by Sam Weinig.
3366 Only export a single WebKitMain function for the Web Process to call
3367 https://bugs.webkit.org/show_bug.cgi?id=41702
3369 * Shared/CommandLine.h:
3370 Add windows CommandLine::parse overload.
3372 * Shared/win/CommandLineWin.cpp: Added.
3373 (WebKit::CommandLine::parse):
3374 Move parse overload from WebProcess/win/WebProcessMain.cpp.
3376 * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
3377 (WebKit::ProcessLauncher::launchProcess):
3378 Pass the right mode to.
3380 * WebKit2.xcodeproj/project.pbxproj:
3383 * WebProcess/Launching/mac/WebProcessMain.mm: Removed.
3384 * WebProcess/Launching/win/WebProcessWinMain.cpp: Removed.
3385 * WebProcess/WebKitMain.cpp: Added.
3387 (enableTerminationOnHeapCorruption):
3388 Add WebKitMain functions for Mac and Windows.
3390 * WebProcess/WebProcessMain.h: Added.
3391 * WebProcess/mac/WebProcessMainMac.mm: Added.
3392 (WebKit::WebProcessMain):
3393 Add Mac version of WebProcessMain.
3395 * WebProcess/win/WebProcessMain.cpp: Removed.
3396 * WebProcess/win/WebProcessMain.h: Removed.
3397 * WebProcess/win/WebProcessMainWin.cpp: Added.
3398 (WebKit::WebProcessMain):
3399 Add Windows version of WebProcessMain.
3401 * mac/MainMac.cpp: Added.
3403 Add Mac WebProcess main function.
3406 Remove functions that we don't need to export.
3408 * win/MainWin.cpp: Added.
3410 Add Windows WebProcess main function.
3412 * win/WebKit2.vcproj:
3413 * win/WebKit2WebProcess.vcproj:
3416 2010-07-05 Luiz Agostini <luiz.agostini@openbossa.org>
3418 Reviewed by Kenneth Rohde Christiansen.
3420 [Qt] WebKit2 triple click
3421 https://bugs.webkit.org/show_bug.cgi?id=41629
3423 QtWebkit2 triple click implementation.
3425 * UIProcess/API/qt/qwkpage.cpp:
3426 (QWKPagePrivate::mousePressEvent):
3427 (QWKPagePrivate::mouseDoubleClickEvent):
3428 (QWKPage::timerEvent):
3429 * UIProcess/API/qt/qwkpage.h:
3430 * UIProcess/API/qt/qwkpage_p.h:
3432 2010-07-05 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
3434 Reviewed by Antti Koivisto.
3436 [Qt] Initial WebKit2 implementation
3437 https://bugs.webkit.org/show_bug.cgi?id=40233
3441 * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp: Copied from WebKit2/UIProcess/Plugins/win/PluginInfoStoreWin.cpp.
3442 (WebKit::PluginInfoStore::pluginDirectories):
3443 (WebKit::PluginInfoStore::pluginPathsInDirectory):
3444 (WebKit::PluginInfoStore::getPluginInfo):
3445 (WebKit::PluginInfoStore::shouldUsePlugin):
3446 * WebProcess/InjectedBundle/InjectedBundle.h:
3447 * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp: Added.
3448 (WebKit::InjectedBundle::load):
3450 2010-07-05 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
3452 Reviewed by Antti Koivisto.
3454 [Qt] Initial WebKit2 implementation
3455 https://bugs.webkit.org/show_bug.cgi?id=40233
3459 * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp: Added.
3461 (WebKit::cancelledError):
3462 (WebKit::blockedError):
3463 (WebKit::cannotShowURLError):
3464 (WebKit::interruptForPolicyChangeError):
3465 (WebKit::cannotShowMIMETypeError):
3466 (WebKit::fileDoesNotExistError):
3468 2010-07-05 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
3470 Reviewed by Antti Koivisto.
3472 [Qt] Initial WebKit2 implementation
3473 https://bugs.webkit.org/show_bug.cgi?id=40233
3475 Add Qt C API integration.
3477 * UIProcess/API/cpp/qt/WKStringQt.cpp: Added.
3478 (WKStringCreateWithQString):
3479 (WKStringCopyQString):
3480 * UIProcess/API/cpp/qt/WKStringQt.h: Added.
3481 * UIProcess/API/cpp/qt/WKURLQt.cpp: Added.
3482 (WKURLCreateWithQUrl):
3484 * UIProcess/API/cpp/qt/WKURLQt.h: Added.
3486 2010-07-05 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
3488 Reviewed by Antti Koivisto.
3490 [Qt] Initial WebKit2 implementation
3491 https://bugs.webkit.org/show_bug.cgi?id=40233
3493 Add the Qt process launcher.
3495 * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: Added.
3496 (WebKit::ProcessLauncher::launchProcess):
3497 (WebKit::ProcessLauncher::terminateProcess):
3498 (WebKit::webThreadBody):
3499 (WebKit::ProcessLauncher::createWebThread):
3502 2010-07-05 Antti Koivisto <koivisto@iki.fi>
3504 Reviewed by Kenneth Rohde Christiansen.
3506 [Qt] Initial WebKit2 implementation
3507 https://bugs.webkit.org/show_bug.cgi?id=40233
3509 Implement ChunkedUpdateDrawingArea + Proxy for Qt. Not built yet.
3511 * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
3512 * UIProcess/qt: Added.
3513 * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: Added.
3514 (WebKit::ChunkedUpdateDrawingAreaProxy::page):
3515 (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
3516 (WebKit::ChunkedUpdateDrawingAreaProxy::invalidateBackingStore):
3517 (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
3518 (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
3519 * WebProcess/WebPage/qt: Added.
3520 * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp: Added.
3521 (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
3523 2010-07-04 Anders Carlsson <andersca@apple.com>
3525 Reviewed by Dan Bernstein.
3527 Add simple command line parser and pass mode argument to the web process
3528 https://bugs.webkit.org/show_bug.cgi?id=41586
3530 * Shared/CommandLine.h:
3531 (WebKit::CommandLine::operator[]):
3532 Add CommandLine class.
3534 * Shared/mac/CommandLineMac.cpp:
3535 (WebKit::CommandLine::parse):
3536 Implement Mac version of CommandLine::parse.
3538 * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3539 (WebKit::ProcessLauncher::launchProcess):
3540 Add "legacywebprocess" mode to the posix_spawn call.
3542 * WebKit2.xcodeproj/project.pbxproj:
3543 Add CommandLine to the xcode project.
3545 * WebProcess/Launching/mac/WebProcessMain.mm:
3548 Parse the command line and check the mode.
3550 2010-07-04 Maciej Stachowiak <mjs@apple.com>
3552 Reviewed by Mark Rowe.
3554 WebProcess crashes in release for simple layout tests
3555 https://bugs.webkit.org/show_bug.cgi?id=41575
3557 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3558 (WKBundlePageCopyRenderTreeExternalRepresentation): ref external representation StringImpl*
3559 before taking it out of its parent String, to avoid returning freed memory.
3561 2010-07-03 Maciej Stachowiak <mjs@apple.com>
3563 Rubber stamped by Anders Carlsson.
3565 Add stdint.h include to fix WebKitTestRunner build.
3567 * UIProcess/API/C/WKPage.h:
3569 2010-07-02 Luiz Agostini <luiz.agostini@openbossa.org>
3571 Reviewed by Kenneth Rohde Christiansen.
3573 [Qt] Wrong method name in file Connection.h
3574 https://bugs.webkit.org/show_bug.cgi?id=41536
3576 Method openConnectionHandler was spelled as openConnection in class Connection.
3578 * Platform/CoreIPC/Connection.h:
3580 2010-07-02 Luiz Agostini <luiz.agostini@openbossa.org>
3582 Reviewed by Sam Weinig.
3584 Adding notification and touch events methods to WebChromeClient
3585 https://bugs.webkit.org/show_bug.cgi?id=41527
3587 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3588 (WebKit::WebChromeClient::notificationPresenter):
3589 (WebKit::WebChromeClient::needTouchEvents):
3590 * WebProcess/WebCoreSupport/WebChromeClient.h:
3592 2010-07-02 Luiz Agostini <luiz.agostini@openbossa.org>
3594 Reviewed by Sam Weinig.
3596 Removing CoreFoundation.h include from WKFrame.h
3597 https://bugs.webkit.org/show_bug.cgi?id=41528
3599 * UIProcess/API/C/WKFrame.h:
3601 2010-07-02 Sam Weinig <sam@webkit.org>
3603 Reviewed by Oliver Hunt.
3605 Patch for https://bugs.webkit.org/show_bug.cgi?id=41540
3606 WebKit2: Add InjectedCode API to get a list of subframes
3608 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3609 (WKBundleFrameCopyChildFrames):
3610 * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3611 * WebProcess/WebPage/WebFrame.cpp:
3612 (WebKit::childFrameRef):
3613 (WebKit::childFrameDeref):
3614 (WebKit::WebFrame::childFrames):
3615 * WebProcess/WebPage/WebFrame.h:
3618 2010-07-02 Sam Weinig <sam@webkit.org>
3620 Reviewed by Anders Carlsson.
3622 Turn off the Objective-C garbage collection for the WebProcess.
3624 * Configurations/WebProcess.xcconfig:
3625 * WebProcess/Launching/mac/WebProcessMain.mm:
3626 (main): Assert that GC is off.
3628 2010-07-02 Sam Weinig <sam@webkit.org>
3630 Reviewed by Anders Carlsson.
3632 There is no longer a reason to check that the process is valid when posting
3633 a message to the bundle, the process code will take care of that for us.
3635 * UIProcess/WebContext.cpp:
3636 (WebKit::WebContext::postMessageToInjectedBundle):
3638 2010-07-02 Sam Weinig <sam@webkit.org>
3640 Reviewed by Anders Carlsson.
3642 Use send instead of connection()->send(), now that connections() are created
3643 asynchronously it can be null at this point and the message needs to be queued.
3645 * UIProcess/mac/WebProcessProxyMac.mm:
3646 (WebKit::WebProcessProxy::setUpAcceleratedCompositing):
3648 2010-07-01 Steve Falkenburg <sfalken@apple.com>
3650 Even more Windows build fixing.
3651 Removed bogus post-build event commands.
3652 Removed unnecessary link libraries.
3654 * win/WebKit2.vcproj:
3656 2010-07-01 Steve Falkenburg <sfalken@apple.com>
3658 Fix Windows while not breaking Qt (didn't realize this was building for Qt).
3660 * WebProcess/WebProcess.cpp:
3662 2010-07-01 Steve Falkenburg <sfalken@apple.com>
3666 * win/WebKit2Generated.make:
3668 2010-07-01 Steve Falkenburg <sfalken@apple.com>
3672 * WebProcess/WebProcess.cpp:
3674 2010-07-01 Sam Weinig <sam@webkit.org>
3676 Reviewed by Jon Honeycutt.
3678 Make WebKit2 compile (though not work) on Leopard.
3680 * Platform/WorkQueue.h:
3681 * Platform/mac/WorkQueueMac.cpp:
3682 (WorkQueue::EventSource::EventSource):
3683 (WorkQueue::scheduleWork):
3684 (WorkQueue::registerMachPortEventHandler):