0558592f0e2f038dafb5e5c17f11354750ef812f
[WebKit-https.git] / WebKit2 / ChangeLog
1 2010-07-22  Darin Adler  <darin@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         Eliminate unneeded WKBundleFrameCopyInnerText function from WebKit2
6         https://bugs.webkit.org/show_bug.cgi?id=42847
7
8         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: Removed WKBundleFrameCopyInnerText.
9         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
10         * WebProcess/WebPage/WebFrame.cpp: Removed innerText.
11         * WebProcess/WebPage/WebFrame.h: Ditto.
12
13 2010-07-22  Alexey Proskuryakov  <ap@apple.com>
14
15         More Windows build fixing.
16
17         * win/WebKit2Generated.make: Copy the new public headers to $(WEBKITOUTPUTDIR)\include\WebKit2.
18
19 2010-07-22  Alexey Proskuryakov  <ap@apple.com>
20
21         Windows build fix.
22
23         * win/WebKit2.vcproj: Added new files.
24
25 2010-07-22  Alexey Proskuryakov  <ap@apple.com>
26
27         Reviewed by Sam Weinig and Darin Adler.
28
29         https://bugs.webkit.org/show_bug.cgi?id=42193
30         Support layoutTestController.dumpEditingDelegates in WebKitTestRunner
31
32         Step 1: Add the method, and implement one actual delegate call as proof of concept. No tests
33         fixed, but this makes difference one line smaller on many editing tests.
34
35         * WebKit2.xcodeproj/project.pbxproj:
36         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
37         * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
38         * WebProcess/InjectedBundle/API/c/WKBundleNode.cpp: Added.
39         (WKBundleNodeCopyNodeName):
40         (WKBundleNodeGetParent):
41         * WebProcess/InjectedBundle/API/c/WKBundleNode.h: Added.
42         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
43         (WKBundlePageSetEditorClient):
44         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
45         * WebProcess/InjectedBundle/API/c/WKBundleRange.cpp: Added.
46         (WKBundleRangeGetStartOffset):
47         (WKBundleRangeGetStartContainer):
48         (WKBundleRangeGetEndOffset):
49         (WKBundleRangeGetEndContainer):
50         * WebProcess/InjectedBundle/API/c/WKBundleRange.h: Added.
51         Added WKBundleRangeRef and WKBundleNodeRef types for injected bundles. These are just pointers
52         to respective WebCore objects, without any WebKit2 wrappers.
53
54         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp: Added.
55         (WebKit::InjectedBundlePageEditorClient::InjectedBundlePageEditorClient):
56         (WebKit::InjectedBundlePageEditorClient::initialize):
57         (WebKit::InjectedBundlePageEditorClient::shouldBeginEditing):
58         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: Added.
59         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
60         (WebKit::WebEditorClient::shouldBeginEditing):
61         * WebProcess/WebPage/WebPage.cpp:
62         (WebKit::WebPage::initializeInjectedBundleEditorClient):
63         * WebProcess/WebPage/WebPage.h:
64         (WebKit::WebPage::injectedBundleEditorClient):
65         Added the plumbing for invoking injected bundle code for editor client. There is no real API
66         for editor client yet.
67
68 2010-07-22  Ivan Krstić  <ike@apple.com>
69
70         Reviewed by Anders Carlsson.
71
72         Adapt sandbox for new WebProcess bootstrap service naming scheme.
73         <rdar://problem/8225000>
74
75         * WebProcess/com.apple.WebProcess.sb:
76
77 2010-07-22  Anders Carlsson  <andersca@apple.com>
78
79         Reviewed by Adam Roben.
80
81         It should be possible to attach to the WebProcess in gdb during startup
82         https://bugs.webkit.org/show_bug.cgi?id=42853
83
84         Create an unique bootstrap service name and pass it to the web process, instead of registering a per process
85         name (which was incorrect anyway). This lets us get rid of the requirement that the UI process always should be
86         the parent process of the web process, something which is false when running under the debugger.
87
88         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
89         (WebKit::ProcessLauncher::launchProcess):
90         * WebProcess/mac/WebProcessMainMac.mm:
91         (WebKit::WebProcessMain):
92
93 2010-07-22  Anders Carlsson  <andersca@apple.com>
94
95         Reviewed by Sam Weinig.
96
97         Don't assert when Connection::invalidate is called before Connection::dispatchConnectionDidClose
98         https://bugs.webkit.org/show_bug.cgi?id=42851
99
100         * Platform/CoreIPC/Connection.cpp:
101         (CoreIPC::Connection::dispatchConnectionDidClose):
102         Just return early if m_client is 0.
103
104 2010-07-22  Adam Roben  <aroben@apple.com>
105
106         Use ::MessageBox instead of ::DebugBreak to make the web process wait
107         for a debugger
108
109         While ::DebugBreak can make it easier to attach a debugger (because it
110         brings up the Just-in-Time debugger window), using ::MessageBox has
111         two advantages:
112           1) It explains to the user what's going on, so it's harder to
113              mistake this debugging aid for a bug.
114           2) It allows you to debug the UI process and the web process using
115              the same debugger, if desired.
116
117         Special thanks to John Sullivan for help with the text that's shown in
118         the alert.
119
120         Fixes <http://webkit.org/b/42848> WebKit2's wait-for-debugger
121         debugging aid should explain to the user what's happening
122
123         Reviewed by John Sullivan and Anders Carlsson.
124
125         * WebProcess/WebKitMain.cpp:
126         (WebKitMain): Use a ::MessageBox instead of a ::DebugBreak to wait for
127         the debugger. The alert explains to the user what's going on.
128
129 2010-07-22  Adam Roben  <aroben@apple.com>
130
131         Make WorkQueue aware of potential errors with ::WaitForMultipleObjects
132
133         Fixes <http://webkit.org/b/42846> WorkQueue should detect
134         ::WaitForMultipleObject failures
135
136         Reviewed by Anders Carlsson.
137
138         * Platform/win/WorkQueueWin.cpp:
139         (WorkQueue::workQueueThreadBody): Added some assertions about the
140         various things that can fail with ::WaitForMultipleObjects,
141         specifically:
142           - Passing too many objects
143           - Timeouts (which shouldn't happen since we pass a timeout interval
144             of INFINITE)
145           - Abandoned mutexes (which shouldn't happen since we don't wait on
146             any mutexes currently)
147           - Miscellaneous failures
148
149 2010-07-22  Sam Weinig  <sam@webkit.org>
150
151         Reviewed by Anders Carlsson.
152
153         Patch for https://bugs.webkit.org/show_bug.cgi?id=42836
154         Add localized strings stubs for WebKit2.
155
156         Gets us below 200 tests failing in WebKitTestRunner.
157
158         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
159         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
160
161 2010-07-22  Andras Becsi  <abecsi@webkit.org>
162
163         Unreviewed trivial build fix.
164
165         [Qt] Mend remaining issues to fix the WebKit2 build.
166
167         * Shared/qt/UpdateChunk.h: add missing function
168         (WebKit::UpdateChunk::isEmpty):
169         * UIProcess/API/qt/qwkpage_p.h: Add stub implementation
170         (QWKPagePrivate::pageDidEnterAcceleratedCompositing):
171         (QWKPagePrivate::pageDidLeaveAcceleratedCompositing):
172
173 2010-07-22  Andras Becsi  <abecsi@webkit.org>
174
175         Reviewed by Antonio Gomes.
176
177         [Qt] Implement WebContext::applicationCacheDirectory() for the Qt port of WebKit2.
178         https://bugs.webkit.org/show_bug.cgi?id=42830
179
180         * UIProcess/qt/WebContextQt.cpp: Added.
181         (WebKit::WebContext::applicationCacheDirectory):
182
183 2010-07-22  Balazs Kelemen  <kb@inf.u-szeged.hu>
184
185         Unreviewed build fix.
186
187         [Qt] Fix WebKit2 build
188
189         https://bugs.webkit.org/show_bug.cgi?id=42638
190
191         * UIProcess/API/qt/qwkpage_p.h:
192         (QWKPagePrivate::setCursor): Added empty implementation.
193
194 2010-07-22  Balazs Kelemen  <kb@inf.u-szeged.hu>
195
196         Reviewed by Antonio Gomes.
197
198         Lazy cursor creation should be guarded by #if USE(LAZY_NATIVE_CURSOR) in WebKit2
199
200         https://bugs.webkit.org/show_bug.cgi?id=42622
201
202         * Shared/WebCoreArgumentCoders.h:
203         * UIProcess/WebPageProxy.cpp:
204         (WebKit::WebPageProxy::didReceiveMessage):
205         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
206         (WebKit::WebChromeClient::setCursor):
207
208 2010-07-22  Jon Honeycutt  <jhoneycutt@apple.com>
209
210         Build fix. Unreviewed.
211
212         * win/WebKit2WebProcess.vcproj:
213         Remove the pre- and post-build events, so that they will use the value
214         inherited from the vsprops.
215
216 2010-07-21  Darin Adler  <darin@apple.com>
217
218         Reviewed by Sam Weinig.
219
220         WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
221         https://bugs.webkit.org/show_bug.cgi?id=42548
222
223         Added WKBundleFrameCopyName.
224
225         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
226         (WKBundleFrameCopyName): Added.
227         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
228
229         * WebProcess/WebPage/WebFrame.cpp:
230         (WebKit::WebFrame::name): Added.
231         * WebProcess/WebPage/WebFrame.h: Ditto.
232
233 2010-07-21  Darin Adler  <darin@apple.com>
234
235         Reviewed by Sam Weinig.
236
237         WebKitTestRunner needs to support dumping of scroll position
238         https://bugs.webkit.org/show_bug.cgi?id=42514
239
240         Added WKBundleFrameGetJavaScriptContext function.
241
242         * WebKit2.xcodeproj: Added property svn:ignore.
243
244         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
245         (WKBundleFrameGetJavaScriptContext): Added.
246         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
247
248         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
249         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
250         (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
251         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
252         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
253         (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
254         Use JSGlobalContextRef instead of JSContextRef and context instead of ct.
255
256 2010-07-21  Adam Roben  <aroben@apple.com>
257
258         Handle broken pipes in more places in CoreIPC
259
260         Fixes <http://webkit.org/b/42784> Assertion failure in
261         Connection::readEventHandler when WebKitTestRunner exits
262
263         Reviewed by Anders Carlsson.
264
265         * Platform/CoreIPC/win/ConnectionWin.cpp:
266         (CoreIPC::Connection::readEventHandler): Check for a broken pipe
267         whenever we call ::PeekNamedPipe.
268
269 2010-07-21  Adam Roben  <aroben@apple.com>
270
271         Teach CoreIPC how to handle messages that are larger than the pipe's
272         buffer
273
274         ::GetOverlappedResult and ::ReadFile can fail with ERROR_MORE_DATA
275         when there is more data available on the pipe than was requested in
276         the read operation. In those cases, the appropriate response is to
277         perform another read operation to read the extra data. We now do this.
278
279         Also, MSDN says that, because we are doing asynchronous read
280         operations, we should not pass a pointer to ::ReadFile to find out how
281         many bytes were read. Instead we should always call
282         ::GetOverlappedResult to find this out. I've changed
283         Connection::readEventHandler to have a single loop that calls
284         ::GetOverlappedResult and ::ReadFile in alternation, rather than
285         sometimes calling ::ReadFile multiple times in a row, to satisfy this
286         requirement.
287
288         In order to simplify the logic in this function, I've made us request
289         only a single byte from the pipe when there are no messages already in
290         the pipe. (Previously we were requesting 4096 bytes in this case.)
291         This allows us not to have to consider the case where the received
292         message is smaller than our read buffer. If we decide that this has a
293         negative impact on performance, we can of course change it. I've
294         mitigated this somewhat by using ::PeekNamedMessage to find out the
295         size of the next message in the pipe (if any), so that we can read it
296         all in one read operation.
297
298         Fixes <http://webkit.org/b/42710> <rdar://problem/8197571> Assertion
299         in Connection::readEventHandler when launching WebKitTestRunner
300
301         Reviewed by Anders Carlsson.
302
303         * Platform/CoreIPC/win/ConnectionWin.cpp:
304         (CoreIPC::Connection::readEventHandler): Put the call to
305         ::GetOverlappedResult in the same loop as ::ReadFile so that we will
306         call them alternately. If ::GetOverlappedResult fails with
307         ERROR_MORE_DATA, use ::PeekNamedPipe to determine the size of the rest
308         of the message, then read it from the pipe. After dispatching the
309         message, use ::PeekNamedPipe to find out the size of the next message
310         in the pipe so we can read it all in one operation. If there's no
311         message in the pipe, we'll request just a single byte of the next
312         message that becomes available, and Windows will tell us when the rest
313         of the message is ready. If ::ReadFile fails with ERROR_MORE_DATA it
314         means there is data available now even though we didn't think there
315         was any. We go back to the top of the loop in this case and call
316         ::GetOverlappedResult again to retrieve the available data.
317
318 2010-07-21  Sam Weinig  <sam@webkit.org>
319
320         Reviewed by Anders Carlsson.
321
322         Patch for https://bugs.webkit.org/show_bug.cgi?id=42539
323         WebKitTestRunner needs to support printing ALERT, PROMPT and CONFIRM messages
324
325         - Convert injected bundle UIClient functions to will-style, at least until we establish
326           more concrete use cases for them past the TestRunner.
327
328         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
329         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
330         (WebKit::InjectedBundlePageUIClient::willAddMessageToConsole):
331         (WebKit::InjectedBundlePageUIClient::willSetStatusbarText):
332         (WebKit::InjectedBundlePageUIClient::willRunJavaScriptAlert):
333         (WebKit::InjectedBundlePageUIClient::willRunJavaScriptConfirm):
334         (WebKit::InjectedBundlePageUIClient::willRunJavaScriptPrompt):
335         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
336         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
337         (WebKit::WebChromeClient::addMessageToConsole):
338         (WebKit::WebChromeClient::runJavaScriptAlert):
339         (WebKit::WebChromeClient::runJavaScriptConfirm):
340         (WebKit::WebChromeClient::runJavaScriptPrompt):
341         (WebKit::WebChromeClient::setStatusbarText):
342
343 2010-07-21  Simon Fraser  <simon.fraser@apple.com>
344
345         Windows build fix.
346
347         Need to supply implementations of PageClient::pageDidEnterAcceleratedCompositing()
348         and pageDidLeaveAcceleratedCompositing() for WebView on Windows.
349
350         * UIProcess/win/WebView.cpp:
351         (WebKit::WebView::pageDidEnterAcceleratedCompositing):
352         (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
353         * UIProcess/win/WebView.h:
354
355 2010-07-21  Anders Carlsson  <andersca@apple.com>
356
357         Reviewed by Sam Weinig.
358
359         Don't assert when clicking on a plug-in in WebKit2
360         https://bugs.webkit.org/show_bug.cgi?id=42762
361
362         Add stub for PluginView::handleEvent.
363
364         * WebProcess/Plugins/PluginView.cpp:
365         (WebKit::PluginView::handleEvent):
366         * WebProcess/Plugins/PluginView.h:
367
368 2010-07-21  Simon Fraser  <simon.fraser@apple.com>
369
370         Reviewed by Anders Carlsson.
371
372         Get accelerated compositing working with webkit2
373         https://bugs.webkit.org/show_bug.cgi?id=41084
374         
375         Hook up dynamic DrawingArea switching, so that when the WebProcess hits a page
376         that requires accelerated compositing, we switch to the LayerBackedDrawingArea.
377         
378         * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
379         (DrawingAreaProxyMessage::):
380         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
381         (WebPageProxyMessage::):
382         * UIProcess/API/mac/PageClientImpl.h:
383         * UIProcess/API/mac/PageClientImpl.mm:
384         (WebKit::PageClientImpl::pageDidEnterAcceleratedCompositing):
385         (WebKit::PageClientImpl::pageDidLeaveAcceleratedCompositing):
386         * UIProcess/API/mac/WKView.mm:
387         (-[WKView _startAcceleratedCompositing:]):
388         (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaProxy::]):
389         (-[WKView _pageDidEnterAcceleratedCompositing]):
390         (-[WKView _pageDidLeaveAcceleratedCompositing]):
391         * UIProcess/API/mac/WKViewInternal.h:
392         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
393         (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveSyncMessage):
394         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
395         * UIProcess/DrawingAreaProxy.h:
396         (WebKit::DrawingAreaProxy::):
397         (WebKit::DrawingAreaProxy::type):
398         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
399         (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
400         (WebKit::LayerBackedDrawingAreaProxy::didReceiveMessage):
401         (WebKit::LayerBackedDrawingAreaProxy::didReceiveSyncMessage):
402         * UIProcess/LayerBackedDrawingAreaProxy.h:
403         * UIProcess/PageClient.h:
404         * UIProcess/WebPageProxy.cpp:
405         (WebKit::WebPageProxy::setDrawingArea):
406         (WebKit::WebPageProxy::didReceiveSyncMessage):
407         (WebKit::WebPageProxy::didEnterAcceleratedCompositing):
408         (WebKit::WebPageProxy::didLeaveAcceleratedCompositing):
409         * UIProcess/WebPageProxy.h:
410         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
411         (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
412         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
413         (WebKit::WebChromeClient::attachRootGraphicsLayer):
414         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
415         (WebKit::ChunkedUpdateDrawingArea::attachCompositingContext):
416         (WebKit::ChunkedUpdateDrawingArea::setRootCompositingLayer):
417         * WebProcess/WebPage/DrawingArea.cpp:
418         (WebKit::DrawingArea::create):
419         * WebProcess/WebPage/DrawingArea.h:
420         (WebKit::DrawingArea::):
421         (WebKit::DrawingArea::type):
422         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
423         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
424         (WebKit::LayerBackedDrawingArea::setNeedsDisplay):
425         (WebKit::LayerBackedDrawingArea::setSize):
426         (WebKit::LayerBackedDrawingArea::didUpdate):
427         (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
428         * WebProcess/WebPage/LayerBackedDrawingArea.h:
429         * WebProcess/WebPage/WebPage.cpp:
430         (WebKit::WebPage::changeAcceleratedCompositingMode):
431         (WebKit::WebPage::enterAcceleratedCompositingMode):
432         (WebKit::WebPage::exitAcceleratedCompositingMode):
433         * WebProcess/WebPage/WebPage.h:
434         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
435         (WebKit::LayerBackedDrawingArea::platformInit):
436         (WebKit::LayerBackedDrawingArea::attachCompositingContext):
437         (WebKit::LayerBackedDrawingArea::detachCompositingContext):
438         (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
439
440 2010-07-20  Steve Falkenburg  <sfalken@apple.com>
441
442         Reviewed by Adam Roben.
443
444         WebKit on Windows should build optionally with an unversioned ICU DLL
445         https://bugs.webkit.org/show_bug.cgi?id=42722
446         <rdar://problem/8211767> WebKit needs to link against unversioned ICU
447
448         To get the proper value for U_DISABLE_RENAMING into all source files, we force
449         the include of ICUVersion.h (our generated header) via the compiler options.
450
451         Since the versioned and unversioned ICU have different filenames (libicuuc.lib vs icuuc.lib)
452         we copy the ICU lib to an intermediate location under obj with a common name. This
453         allows us to link properly with either without adding a new build configuration.
454
455         * win/WebKit2Common.vsprops:
456         Copy ICU libs into a common location with a common name.
457         Add additional library search path to pick up icu lib.
458         Change ICU library filename specified to linker.
459         Add forced include of ICUVersion.h.        
460
461 2010-07-21  Adam Roben  <aroben@apple.com>
462
463         Windows build fix
464
465         * Shared/win/UpdateChunk.h:
466         (WebKit::UpdateChunk::isEmpty): Added to match the Mac definition.
467
468 2010-07-21  Anders Carlsson  <andersca@apple.com>
469
470         Land file I forgot to add.
471
472         * WebProcess/com.apple.WebProcess.sb: Added.
473
474 2010-07-21  Adam Roben  <aroben@apple.com>
475
476         Move WebKit2WebProcess's settings to a vsprops file
477
478         Fixes <http://webkit.org/b/42751> WebKit2WebProcess should use vsprops
479         files
480
481         Reviewed by Darin Adler.
482
483         * win/WebKit2WebProcess.vcproj: Moved settings from here...
484         * win/WebKit2WebProcessCommon.vsprops: ...to here.
485
486 2010-07-20  Ivan Krstić  <ike@apple.com>
487
488         Reviewed and tweaked by Anders Carlsson and Sam Weinig.
489
490         Put WebProcess in a sandbox. All of the following changes are
491         Mac-only.
492         <rdar://problem/7865269>
493
494         * UIProcess/WebProcessProxy.cpp:
495         (WebKit::WebProcessProxy::WebProcessProxy):
496         Send Sandbox extension for injected bundle to WebProcess.
497
498         * WebKit2.xcodeproj/project.pbxproj:
499         Add Sandbox profile to Resources for WebProcess.
500
501         * WebProcess/InjectedBundle/InjectedBundle.h:
502         New function InjectedBundle::setSandboxToken.
503
504         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
505         (WebKit::InjectedBundle::load):
506         Consume Sandbox token for the bundle if present.
507
508         (WebKit::InjectedBundle::setSandboxToken):
509         Set Sandbox token for the bundle.
510
511         * WebProcess/WebProcess.cpp:
512         (WebKit::WebProcess::loadInjectedBundle):
513         Extra function parameter for Sandbox token.
514
515         (WebKit::WebProcess::didReceiveMessage):
516         Pass Sandbox token to loadInjectedBundle().
517
518         * WebProcess/WebProcess.h:
519         Extra function parameter for Sandbox token in loadInjectedBundle().
520
521         * WebProcess/com.apple.WebProcess.sb: Added.
522         Sandbox profile for WebProcess.
523
524         * WebProcess/mac/WebProcessMainMac.mm:
525         (WebKit::WebProcessMain):
526         Initialize Sandbox, exit on failure.
527
528 2010-07-20  Sam Weinig  <sam@webkit.org>
529
530         Reviewed by Brady Eidson.
531
532         Patch for https://bugs.webkit.org/show_bug.cgi?id=42719
533         Make Acid2 pass in WebKit2
534
535         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
536         (WebKit::WebFrameLoaderClient::objectContentType): Check for supported image mimetypes
537         before falling back to plugins.
538
539 2010-07-20  Adam Roben  <aroben@apple.com>
540
541         Remove WebKit2.sln
542
543         WebKit.sln builds all the same projects.
544
545         Rubber-stamped in advance by Steve Falkenburg.
546
547         * WebKit2.sln: Removed.
548
549 2010-07-20  Adam Roben  <aroben@apple.com>
550
551         Make the web process break into the debugger when Ctrl-Alt-Shift is
552         held during launch
553
554         Fixes <http://webkit.org/b/42670> Would like a way to break into the
555         debugger when the web process launches
556
557         Reviewed by Anders Carlsson.
558
559         * WebProcess/WebKitMain.cpp:
560         (WebKitMain): If the Control, Alt, and Shift keys are held down in a
561         Debug build, call DebugBreak() so that we will break into the
562         debugger.
563
564 2010-07-20  Adam Roben  <aroben@apple.com>
565
566         Teach Connection how to handle a slow receiver
567
568         Fixes <http://webkit.org/b/42667> Assertion in
569         Connection::sendOutgoingMessage when browser or web process is paused
570
571         Reviewed by Anders Carlsson.
572
573         * Platform/CoreIPC/win/ConnectionWin.cpp:
574         (CoreIPC::Connection::sendOutgoingMessage): If WriteFile returns FALSE
575         and the last error is ERROR_IO_PENDING, Windows will write the data as
576         soon as the current write operation is completed. We don't need to do
577         anything special in this case, so there's no need to assert about it.
578
579 2010-07-20  Anders Carlsson  <andersca@apple.com>
580
581         Reviewed by Dan Bernstein.
582
583         Handle WKView visibility changes
584         <rdar://problem/7891077>
585     
586         * Shared/mac/UpdateChunk.h:
587         (WebKit::UpdateChunk::isEmpty):
588         Add convenience getter.
589
590         * UIProcess/API/mac/WKView.mm:
591         (-[WKView viewDidMoveToWindow]):
592         Reorder the calls to _updateActiveState and _updateVisibility based on whether the view is moved to
593         a window or away from a window.
594
595         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
596         (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
597         Initialize m_forceRepaintWhenResumingPainting to false.
598
599         (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
600         Pass the m_forceRepaintWhenResumingPainting along to the DrawingAreaMessage::ResumePainting message.
601
602         (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
603         Don't try to paint empty update chunks.
604
605         (WebKit::ChunkedUpdateDrawingAreaProxy::update):
606         Don't paint the update chunk if we're not visible. Instead, make sure that the entire page is being redrawn
607         when its shown again.
608
609         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
610         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
611         (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
612         (WebKit::ChunkedUpdateDrawingArea::display):
613         (WebKit::ChunkedUpdateDrawingArea::suspendPainting):
614         Rename m_shouldPaint to m_isPaintingSuspended and invert its logic.
615         
616         (WebKit::ChunkedUpdateDrawingArea::scheduleDisplay):
617         Don't schedule a display timer if the dirty rect is empty.
618
619         (WebKit::ChunkedUpdateDrawingArea::setSize):
620         If painting is suspended, just send back an empty update chunk in the DidSetSize message.
621
622         (WebKit::ChunkedUpdateDrawingArea::resumePainting):
623         If forceRepaint is true, repaint the entire drawing area.
624
625 2010-07-20  Anders Carlsson  <andersca@apple.com>
626
627         Reviewed by Dan Bernstein.
628
629         Implement NPN_GetURL and NPN_PostURL
630         https://bugs.webkit.org/show_bug.cgi?id=42650
631
632         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
633         (WebKit::parsePostBuffer):
634         Add a FIXME about deleting the file.
635
636         (WebKit::makeURLString):
637         Move this static method before NPN_GetURL.
638
639         (WebKit::NPN_GetURL):
640         Call NetscapePLugin::LoadURL.
641         
642         (WebKit::NPN_PostURL):
643         Ditto.
644
645         (WebKit::NPN_PostURLNotify):
646         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
647         Remove unreached code.
648
649         (WebKit::NetscapePluginStream::deliverDataToPlugin):
650         Stop the stream if the plug-in returns -1 from NPP_Write.
651
652 2010-07-19  Anders Carlsson  <andersca@apple.com>
653
654         Reviewed by Sam Weinig.
655
656         WebKitTestRunner and WebProcess simultaneously stall in CoreIPC::Connection::sendOutgoingMessage
657         https://bugs.webkit.org/show_bug.cgi?id=42356
658
659         Up the port queue length from 5 to 1024. While this does solve the problem, we should still try to
660         make sendOutgoingMessage not block. I've filed https://bugs.webkit.org/show_bug.cgi?id=42611 to track 
661         doing this on Mac and Windows.
662
663         * Platform/CoreIPC/mac/ConnectionMac.cpp:
664         (CoreIPC::Connection::open):
665         Call setMachPortQueueLength.
666
667         * Platform/mac/MachUtilities.cpp: Added.
668         (setMachPortQueueLength):
669         Given a mach port receive right, sets the port queue length.
670
671         * Platform/mac/MachUtilities.h: Added.
672         
673         * WebKit2.xcodeproj/project.pbxproj:
674         Add MachUtilities.cpp and MachUtilities.h
675
676 2010-07-19  Anders Carlsson  <andersca@apple.com>
677
678         Reviewed by Darin Adler, Adam Roben, Dan Bernstein and Sam Weinig.
679
680         Handle NP_ASFILE and NP_ASFILEONLY transfer modes
681         https://bugs.webkit.org/show_bug.cgi?id=42587
682
683         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
684         (WebKit::NetscapePlugin::NPP_StreamAsFile):
685         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
686         Add NPP_ wrapper.
687
688         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
689         (WebKit::NetscapePluginStream::NetscapePluginStream):
690         Initialize m_fileHandle.
691
692         (WebKit::isSupportedTransferMode):
693         NP_ASFILE and NP_ASFILEONLY is now supported.
694
695         (WebKit::NetscapePluginStream::deliverData):
696         Call deliverDataToFile if necessary.
697
698         (WebKit::NetscapePluginStream::deliverDataToFile):
699         Create a temporary file and write the data into it.
700
701         (WebKit::NetscapePluginStream::stop):
702         If the transfer mode is either NP_ASFILE or NP_ASFILEONLY, make sure to
703         call NPP_StreamAsFile and close the file and delete it.
704
705         * WebProcess/Plugins/PluginView.cpp:
706         (WebKit::PluginView::cancelStreamLoad):
707         Keep a reference to the Stream since cancelling it will remove it from the map.
708
709 2010-07-19  Anders Carlsson  <andersca@apple.com>
710
711         Reviewed by Sam Weinig.
712
713         Implement NPN_PostURLNotify
714         https://bugs.webkit.org/show_bug.cgi?id=42602
715
716         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
717         (WebKit::parsePostBuffer):
718         Read the buffer from a file if necessary and parse it.
719
720         (WebKit::NPN_GetURLNotify):
721         Add extra arguments.
722
723         (WebKit::NPN_PostURLNotify):
724         Parse the post buffer, then call NetscapePlugin::loadURL.
725
726         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
727         (WebKit::NetscapePlugin::loadURL):
728         Pass the method, the header fields and form data along.
729
730         (WebKit::NetscapePlugin::allowPopups):
731         Just return false for now.
732
733         (WebKit::NetscapePlugin::initialize):
734         Pass extra arguments to loadURL.
735
736         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
737         * WebProcess/Plugins/PluginController.h:
738         Add method, header fields and form data.
739
740         * WebProcess/Plugins/PluginView.cpp:
741         (WebKit::PluginView::loadURL):
742         Set the method, add the header fields and set the body.
743
744 2010-07-19  Sam Weinig  <sam@webkit.org>
745
746         Reviewed by Darin Adler.
747
748         Add local storage support for WebKit2
749         https://bugs.webkit.org/show_bug.cgi?id=42584
750
751         * Shared/WebPreferencesStore.cpp:
752         (WebKit::WebPreferencesStore::WebPreferencesStore):
753         (WebKit::WebPreferencesStore::swap):
754         * Shared/WebPreferencesStore.h:
755         (WebKit::WebPreferencesStore::encode):
756         (WebKit::WebPreferencesStore::decode):
757         * UIProcess/API/C/WKPreferences.cpp:
758         (WKPreferencesSetLocalStorageEnabled):
759         (WKPreferencesGetLocalStorageEnabled):
760         * UIProcess/API/C/WKPreferences.h:
761         * UIProcess/WebPreferences.cpp:
762         (WebKit::WebPreferences::setLocalStorageEnabled):
763         (WebKit::WebPreferences::localStorageEnabled):
764         * UIProcess/WebPreferences.h:
765         * WebProcess/WebPage/WebPage.cpp:
766         (WebKit::WebPage::WebPage):
767         (WebKit::WebPage::preferencesDidChange):
768
769 2010-07-19  Simon Fraser  <simon.fraser@apple.com>
770
771         Reviewed by Anders Carlsson.
772
773         Uae an OwnPtr for the drawing area in WebPage (fixes a leak!).
774
775         * WebProcess/WebPage/WebPage.h:
776         (WebKit::WebPage::drawingArea):
777
778 2010-07-19  Anders carlsson  <andersca@apple.com>
779
780         Reviewed by Adam Roben.
781
782         WebKit2 does not have application cache
783         https://bugs.webkit.org/show_bug.cgi?id=42552
784
785         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
786         (WebProcessMessage::):
787         Add SetApplicationCacheDirectory.
788
789         * Shared/WebPreferencesStore.h:
790         (WebKit::WebPreferencesStore::encode):
791         (WebKit::WebPreferencesStore::decode):
792         add offlineWebApplicationCacheEnabled.
793
794         * UIProcess/API/C/WKPreferences.cpp:
795         (WKPreferencesSetOfflineWebApplicationCacheEnabled):
796         (WKPreferencesGetOfflineWebApplicationCacheEnabled):
797         * UIProcess/API/C/WKPreferences.h:
798         Add getters/setters for whether the application cache is enabled.
799
800         * UIProcess/WebContext.h:
801         * UIProcess/WebPreferences.cpp:
802         (WebKit::WebPreferences::setOfflineWebApplicationCacheEnabled):
803         Update the store and call update().
804         
805         * UIProcess/WebPreferences.h:
806         * UIProcess/WebProcessProxy.cpp:
807         (WebKit::WebProcessProxy::WebProcessProxy):
808         Ask the web process to set the application cache directory.
809
810         * UIProcess/mac/WebContextMac.mm: Added.
811         (WebKit::WebContext::applicationCacheDirectory):
812         Return the application cache directory.
813
814         * UIProcess/win/WebContextWin.cpp: Added.
815         (WebKit::WebContext::applicationCacheDirectory):
816         Ditto.
817
818         * WebKit2.xcodeproj/project.pbxproj:
819         Add WebContextMac.mm
820
821         * WebProcess/WebPage/WebPage.cpp:
822         (WebKit::WebPage::preferencesDidChange):
823         
824         (WebKit::WebPage::didReceiveMessage):
825         Handle PreferencesDidChange. Get rid of the default: case statement so we'll
826         get warnings if we have unhandled message kinds.
827
828         * WebProcess/WebProcess.cpp:
829         (WebKit::WebProcess::setApplicationCacheDirectory):
830         Set the application cache directory.
831
832         (WebKit::WebProcess::didReceiveMessage):
833         Handle SetApplicationCacheDirectory.
834
835         win/WebKit2.vcproj:
836         Add WebContextWin.cpp
837
838 2010-07-18  Anders Carlsson  <andersca@apple.com>
839
840         Another attempt at fixing the Windows build.
841
842         * WebProcess/Plugins/NPJSObjectMap.h:
843
844 2010-07-18  Anders Carlsson  <andersca@apple.com>
845
846         Try to fix Windows build.
847
848         * win/WebKit2.vcproj:
849
850 2010-07-18  Anders Carlsson  <andersca@apple.com>
851
852         Reviewed by Sam Weinig.
853
854         More NPRuntime work
855         https://bugs.webkit.org/show_bug.cgi?id=42526
856
857         * WebProcess/Plugins/NPJSObjectMap.cpp:
858         (WebKit::identifierFromIdentifierRep):
859         (WebKit::NPJSObject::hasProperty):
860         Check if the JSObject has the given property.
861
862         (WebKit::NPJSObject::getProperty):
863         Add stubbed out function.
864
865         (WebKit::NPJSObject::npClass):
866         Add NP_HasProperty and NP_GetProperty.
867
868         (WebKit::NPJSObject::NP_HasProperty):
869         Call NPJSObject::hasProperty.
870
871         (WebKit::NPJSObject::NP_GetProperty):
872         Call NPJSObject::getProperty.
873
874         * WebProcess/Plugins/NPRuntimeUtilities.cpp:
875         (WebKit::releaseNPVariantValue):
876         Release the given NPVariant.
877
878         * WebProcess/Plugins/NPRuntimeUtilities.h:
879         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
880         (WebKit::NPN_GetProperty):
881         Call the NPClass GetProperty function.
882
883         (WebKit::NPN_HasProperty):
884         Call the NPClass HasProperty function.
885         
886         (WebKit::NPN_ReleaseVariantValue):
887         Call releaseNPVariantValue.
888
889 2010-07-18  Anders Carlsson  <andersca@apple.com>
890
891         Reviewed by Sam Weinig.
892
893         Add NPJSObjectMap class
894         https://bugs.webkit.org/show_bug.cgi?id=42524
895
896         * WebKit2.xcodeproj/project.pbxproj:
897         Add files.
898
899         * WebProcess/Plugins/NPJSObjectMap.cpp: Added.
900         * WebProcess/Plugins/NPJSObjectMap.h: Added.
901         Add NPJSObjectMap, a map which contains NPObjects that wrap JavaScript objects.
902
903         * WebProcess/Plugins/PluginView.cpp:
904         (WebKit::PluginView::PluginView):
905         Initialize the map.
906
907         (WebKit::PluginView::~PluginView):
908         Invalidate the map.
909
910         (WebKit::PluginView::frame):
911         Add frame getter.
912
913         (WebKit::PluginView::windowScriptNPObject):
914         Wrap the window object.
915
916         (WebKit::PluginView::pluginElementNPObject):
917         Wrap the plug-in element object.
918
919         * WebProcess/Plugins/PluginView.h:
920
921 2010-07-18  Anders Carlsson  <andersca@apple.com>
922
923         Reviewed by Sam Weinig.
924
925         Implement more NPRuntime related NPN_ functions
926         https://bugs.webkit.org/show_bug.cgi?id=42520
927
928         * WebKit2.xcodeproj/project.pbxproj:
929         * WebProcess/Plugins/NPRuntimeUtilities.cpp: Added.
930         * WebProcess/Plugins/NPRuntimeUtilities.h: Added.
931         Add new file with NPRuntime related utility functions.
932
933         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
934         (WebKit::NPN_CreateObject):
935         (WebKit::NPN_RetainObject):
936         (WebKit::NPN_ReleaseObject):
937         Call the corresponding NPRuntimeUtilities functions.
938
939 2010-07-18  Anders Carlsson  <andersca@apple.com>
940
941         Reviewed by Dan Bernstein.
942
943         Begin work on NPRuntime support
944         https://bugs.webkit.org/show_bug.cgi?id=42519
945
946         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
947         (WebKit::NPN_GetValue):
948         Handle NPNVWindowNPObject and NPNVPluginElementNPObject.
949
950         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
951         (WebKit::NetscapePlugin::windowScriptNPObject):
952         (WebKit::NetscapePlugin::pluginElementNPObject):
953         Call the plug-in controller.
954
955         * WebProcess/Plugins/PluginController.h:
956         Add new windowScriptNPObject and pluginElementNPObject functions.
957
958         * WebProcess/Plugins/PluginView.cpp:
959         (WebKit::PluginView::windowScriptNPObject):
960         (WebKit::PluginView::pluginElementNPObject):
961         Add stubbed out functions.
962
963 2010-07-18  Anders Carlsson  <andersca@apple.com>
964
965         Reviewed by Dan Bernstein.
966
967         Implement some NPRuntime related NPN_ functions
968         https://bugs.webkit.org/show_bug.cgi?id=42518
969
970         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
971         (WebKit::NPN_GetStringIdentifier):
972         (WebKit::NPN_GetStringIdentifiers):
973         (WebKit::NPN_GetIntIdentifier):
974         (WebKit::NPN_IdentifierIsString):
975         (WebKit::NPN_UTF8FromIdentifier):
976         (WebKit::NPN_IntFromIdentifier):
977         (WebKit::NPN_CreateObject):
978
979 2010-07-18  Anders Carlsson  <andersca@apple.com>
980
981         Reviewed by Dan Bernstein.
982
983         Add dumping of statusbar text to WebKitTestRunner
984         https://bugs.webkit.org/show_bug.cgi?id=42516
985
986         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
987         Add setStatusbarText callback to WKBundlePageUIClient.
988
989         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
990         (WebKit::InjectedBundlePageUIClient::setStatusbarText):
991         Call setStatusbarText.
992
993         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
994         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
995         (WebKit::WebChromeClient::setStatusbarText):
996         Call the bundle page UI client.
997
998 2010-07-17  Anders Carlsson  <andersca@apple.com>
999
1000         Reviewed by Maciej Stachowiak.
1001
1002         WebKitTestRunner should load the test plug-in
1003         https://bugs.webkit.org/show_bug.cgi?id=42509
1004
1005         * UIProcess/API/C/WKContext.cpp:
1006         (_WKContextSetAdditionalPluginPath):
1007         Add a private function for setting a single additional plug-in path. the WebKit1 SPI that does the
1008         same thing takes an array of paths, but this is good enough for now.
1009
1010         * UIProcess/Plugins/PluginInfoStore.cpp:
1011         (WebKit::PluginInfoStore::setAdditionalPluginPaths):
1012         Set the additional plug-in paths vector and refresh the database.
1013         
1014         (WebKit::PluginInfoStore::loadPluginsIfNecessary):
1015         First try to load plug-ins in the additional plug-in paths.
1016         
1017         * UIProcess/WebContext.cpp:
1018         (WebKit::WebContext::setAdditionalPluginPath):
1019         Call PluginInfoStore::setAdditionalPluginPaths.
1020
1021         * UIProcess/WebContext.h:
1022         (WebKit::WebContext::pluginInfoStore):
1023         Make the plug-in info store per context instead of having a single shared info store.
1024
1025         * UIProcess/WebProcessProxy.cpp:
1026         (WebKit::WebProcessProxy::getPlugins):
1027         (WebKit::WebProcessProxy::getPluginHostConnection):
1028         * UIProcess/WebProcessProxy.h:
1029         Get the plug-in info store from the context.
1030
1031 2010-07-17  Anders Carlsson  <andersca@apple.com>
1032
1033         Reviewed by Dan Bernstein.
1034
1035         Stop all NPStreams before destroying a plug-in
1036         https://bugs.webkit.org/show_bug.cgi?id=42504
1037
1038         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1039         (WebKit::NetscapePlugin::stopAllStreams):
1040         Go through all streams and stop them.
1041
1042         (WebKit::NetscapePlugin::destroy):
1043         Call stopAllStreams.
1044
1045         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1046         Add stopAllStreams.
1047         
1048         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1049         Make stop public.
1050
1051 2010-07-17  Anders Carlsson  <andersca@apple.com>
1052
1053         Reviewed by Dan Bernstein.
1054
1055         Open streams should not keep a plug-in view alive
1056         https://bugs.webkit.org/show_bug.cgi?id=42503
1057
1058         PluginView::Stream now has a weak reference to its PluginView.
1059
1060         * WebProcess/Plugins/PluginView.cpp:
1061         (WebKit::PluginView::Stream::~Stream):
1062         Assert that the plug-in view is null.
1063
1064         (WebKit::PluginView::Stream::didFail):
1065         After calling removeStream, set the plug-in view member variable to 0. This is OK to do
1066         since we keep a reference to the Stream, so we're sure that the call to removeStream does not
1067         destroy the stream.
1068
1069         (WebKit::PluginView::Stream::didFinishLoading):
1070         Ditto .
1071
1072         (WebKit::PluginView::~PluginView):
1073         Cancel all streams.
1074         
1075         (WebKit::PluginView::cancelAllStreams):
1076         Cancel all streams.
1077
1078 2010-07-16  Zhe Su  <suzhe@chromium.org>
1079
1080         Reviewed by Darin Adler.
1081
1082         REGRESSION(r61484): Broke focus behaviour on Qt and probably other platforms
1083         https://bugs.webkit.org/show_bug.cgi?id=42253
1084
1085         Dummy implementation of EditorClient::willSetInputMethodState.
1086
1087         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1088         (WebKit::WebEditorClient::willSetInputMethodState):
1089         * WebProcess/WebCoreSupport/WebEditorClient.h:
1090
1091 2010-07-16  Alice Liu  <alice.liu@apple.com>
1092
1093         Build fix, not reviewed.
1094
1095         Reverted http://trac.webkit.org/changeset/63585 because getopt isn't 
1096         available in the OpenSource support libraries
1097
1098         * WebKit2.sln:
1099
1100 2010-07-16  Sam Weinig  <sam@webkit.org>
1101
1102         Reviewed by Anders Carlsson.
1103
1104         Fix for https://bugs.webkit.org/show_bug.cgi?id=42482
1105         <rdar://problem/8197701>
1106         Add notification of when the BackForwardList changes
1107         to aid invalidation of Back/Forward related UI elements.
1108
1109         * UIProcess/API/C/WKPage.h:
1110         Add didChangeBackForwardList to the WKPageLoaderClient. This 
1111         fires whenever an item is added or removed from the back forward
1112         list or when the cursor changes position.
1113
1114         * UIProcess/WebBackForwardList.cpp:
1115         (WebKit::WebBackForwardList::addItem):
1116         (WebKit::WebBackForwardList::goToItem):
1117         * UIProcess/WebLoaderClient.cpp:
1118         (WebKit::WebLoaderClient::didChangeBackForwardList):
1119         * UIProcess/WebLoaderClient.h:
1120         * UIProcess/WebPageProxy.cpp:
1121         (WebKit::WebPageProxy::didChangeBackForwardList):
1122         * UIProcess/WebPageProxy.h:
1123         Pipe changes to the WebBackForwardList up to the page load client.
1124
1125 2010-07-16  Alice Liu  <alice.liu@apple.com>
1126
1127         Reviewed by Sam Weinig.
1128
1129         Add WebKitTestRunner to the WebKit2 solution
1130
1131         * WebKit2.sln: Add InjectedBundle and WebKitTestRunner projects.  Also change the build dependency order from
1132         DumpRunderTree --> WebKitAPITest to
1133         DumpRenderTree --> InjectedBundle --> WebKitTestRunner --> WebKitAPITest
1134
1135 2010-07-15  Anders Carlsson  <andersca@apple.com>
1136
1137         Reviewed by Dan Bernstein.
1138
1139         Set notifyData to the stream's notification data
1140         https://bugs.webkit.org/show_bug.cgi?id=42429
1141
1142         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1143         (WebKit::NetscapePluginStream::start):
1144
1145 2010-07-15  Brent Fulgham  <bfulgham@webkit.org>
1146
1147         Build fix.  Don't include CoreGraphics.h on non-CG builds.
1148
1149         * WebKit2Prefix.h: Conditionalize include of CoreGraphics.h
1150         to avoid build break on WinCairo.
1151
1152 2010-07-15  Anders Carlsson  <andersca@apple.com>
1153
1154         Reviewed by Sam Weinig.
1155
1156         If needed, NPN_GetURL the src URL
1157         https://bugs.webkit.org/show_bug.cgi?id=42424
1158
1159         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1160         (WebKit::NetscapePlugin::NPP_GetValue):
1161         Add NPP_GetValue wrapper.
1162
1163         (WebKit::NetscapePlugin::shouldLoadSrcURL):
1164         Check whether the src url should be cancelled.
1165
1166         (WebKit::NetscapePlugin::initialize):
1167         If the src URL should be loaded, then load it.
1168         
1169 2010-07-15  Anders Carlsson  <andersca@apple.com>
1170
1171         Reviewed by Sam Weinig.
1172
1173         Stop the plug-in stream when it's finished loading
1174         https://bugs.webkit.org/show_bug.cgi?id=42423
1175
1176         * WebProcess/Plugins/DummyPlugin.cpp:
1177         (WebKit::DummyPlugin::streamDidFinishLoading):
1178         * WebProcess/Plugins/DummyPlugin.h:
1179         Add empty stub.
1180         
1181         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1182         (WebKit::NetscapePlugin::streamDidFinishLoading):
1183         Call NetscapePluginStream::didFinishLoading.
1184
1185         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1186         (WebKit::NetscapePluginStream::didFinishLoading):
1187         Stop the stream with NPRES_DONE.
1188
1189         * WebProcess/Plugins/Plugin.h:
1190         Add streamDidFinishLoading.
1191
1192         * WebProcess/Plugins/PluginView.cpp:
1193         (WebKit::PluginView::Stream::didFinishLoading):
1194         Call Plugin::streamDidFinishLoading.
1195
1196 2010-07-15  Anders Carlsson  <andersca@apple.com>
1197
1198         Reviewed by Sam Weinig.
1199
1200         Pass URL stream data to the plug-in
1201         https://bugs.webkit.org/show_bug.cgi?id=42420
1202
1203         * WebProcess/Plugins/DummyPlugin.cpp:
1204         (WebKit::DummyPlugin::streamDidReceiveData):
1205         * WebProcess/Plugins/DummyPlugin.h:
1206         Add empty stub.
1207
1208         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1209         (WebKit::NetscapePlugin::streamDidReceiveData):
1210         Call NetscapePluginStream::didReceiveData.
1211
1212         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1213         (WebKit::NetscapePluginStream::didReceiveData):
1214         Deliver the data to the plug-in.
1215
1216         * WebProcess/Plugins/Plugin.h:
1217         Add pure virtual streamDidReceiveData member function.
1218
1219         * WebProcess/Plugins/PluginView.cpp:
1220         (WebKit::PluginView::Stream::didReceiveData):
1221         Call Plugin::streamDidReceiveData.
1222
1223 2010-07-15  Anders Carlsson  <andersca@apple.com>
1224
1225         Reviewed by Sam Weinig.
1226
1227         Handle failed loads correctly
1228         https://bugs.webkit.org/show_bug.cgi?id=42418
1229
1230         * WebProcess/Plugins/DummyPlugin.cpp:
1231         (WebKit::DummyPlugin::streamDidFail):
1232         * WebProcess/Plugins/DummyPlugin.h:
1233         Add empty stub.
1234
1235         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1236         (WebKit::NetscapePlugin::streamDidFail):
1237         Call NetscapePluginStream::didFail.
1238     
1239         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1240         (WebKit::NetscapePluginStream::didReceiveResponse):
1241         Take a reference to the plug-in stream in case starting it causes it to be destroyed.
1242         
1243         (WebKit::NetscapePluginStream::didFail):
1244         Take a reference to the plug-in stream in case stopping it causes it to be destroyed.
1245
1246         (WebKit::NetscapePluginStream::destroy):
1247         Cancel the stream.
1248
1249         (WebKit::NetscapePluginStream::start):
1250         If we fail to start the stream, cancel the load.
1251
1252         (WebKit::NetscapePluginStream::cancel):
1253         Call NetscapePlugin::cancelStreamLoad.
1254
1255         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
1256         Don't call cancel here. notifyAndDestroyStream can be called when we don't want to cancel the
1257         load, such as when it's already failed to load.
1258
1259         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1260         Add didFail.
1261
1262         * WebProcess/Plugins/Plugin.h:
1263         Add pure virtual streamDidFail member function.
1264
1265         * WebProcess/Plugins/PluginView.cpp:
1266         (WebKit::PluginView::Stream::Stream):
1267         Initialize m_streamWasCancelled to false.
1268
1269         (WebKit::PluginView::Stream::cancel):
1270         Set m_streamWasCancelled to true.
1271
1272         (WebKit::PluginView::Stream::didFail):
1273         Call Plugin::streamDidFail.
1274
1275 2010-07-15  Sam Weinig  <sam@webkit.org>
1276
1277         Reviewed by Anders Carlsson.
1278
1279         Fix for https://bugs.webkit.org/show_bug.cgi?id=42358
1280         <rdar://problem/8194512>
1281         Hyphenation tests crash the Web process
1282
1283         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1284         (InitWebCoreSystemInterface): Add missing initializer.
1285
1286 2010-07-15  Anders Carlsson  <andersca@apple.com>
1287
1288         Attempt to fix the Windows build.
1289
1290         * WebProcess/Plugins/PluginView.cpp:
1291         (WebKit::PluginView::Stream::didReceiveResponse):
1292         expectedContentLength should be a signed long long.
1293
1294 2010-07-15  Anders Carlsson  <andersca@apple.com>
1295
1296         Reviewed by Sam Weinig.
1297
1298         Cancel stream loads when destroying NetscapePluginStreams
1299         https://bugs.webkit.org/show_bug.cgi?id=42413
1300
1301         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1302         (WebKit::NetscapePlugin::cancelStreamLoad):
1303         Call PluginController::cancelStreamLoad.
1304
1305         (WebKit::NetscapePlugin::streamDidReceiveResponse):
1306         Call NetscapePluginStream::didReceiveResponse.
1307
1308         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1309         (WebKit::NetscapePluginStream::didReceiveResponse):
1310         Try to start the stream.
1311
1312         (WebKit::NetscapePluginStream::sendJavaScriptStream):
1313         Don't stop the stream if it can't be started. start handles that now.
1314
1315         (WebKit::isSupportedTransferMode):
1316         Return whether the given transfer mode is supported.
1317
1318         (WebKit::NetscapePluginStream::start):
1319         If the stream fails to start, call notifyAndDestroyStream. If it starts successfully but has
1320         an unsupported transfer mode, call stop.
1321         
1322         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
1323         Cancel the stream load unless it's being destroyed because it has finished loading.
1324
1325         * WebProcess/Plugins/PluginController.h:
1326         Add cancelStreamLoad pure virtual member function.
1327
1328         * WebProcess/Plugins/PluginView.cpp:
1329         (WebKit::PluginView::Stream::cancel):
1330         Tell the stream loader to cancel and null it out.
1331
1332         (WebKit::PluginView::cancelStreamLoad):
1333         Get the stream and cancel it.
1334
1335         * WebProcess/Plugins/PluginView.h:
1336
1337 2010-07-15  Anders Carlsson  <andersca@apple.com>
1338
1339         Reviewed by Sam Weinig.
1340
1341         Start loading plug-in streams
1342         https://bugs.webkit.org/show_bug.cgi?id=42407
1343
1344         * WebProcess/Plugins/DummyPlugin.cpp:
1345         (WebKit::DummyPlugin::streamDidReceiveResponse):
1346         * WebProcess/Plugins/DummyPlugin.h:
1347         Add empty stub.
1348
1349         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1350         (WebKit::NetscapePlugin::streamDidReceiveResponse):
1351         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1352         Add empty stub.
1353
1354         * WebProcess/Plugins/Plugin.h:
1355         Add streamDidReceiveResponse pure virtual member function.
1356
1357         * WebProcess/Plugins/PluginView.cpp:
1358         Make PluginView::Stream a NetscapePlugInStreamLoaderClient.
1359
1360         (WebKit::PluginView::Stream::start):
1361         Create a plug-in loader and start loading.
1362
1363         (WebKit::PluginView::Stream::didReceiveResponse):
1364         Get the necessary data out of the resource response and call streamDidReceiveResponse.
1365
1366         (WebKit::PluginView::Stream::didReceiveData):
1367         (WebKit::PluginView::Stream::didFail):
1368         (WebKit::PluginView::Stream::didFinishLoading):
1369         Add empty stubs.
1370
1371 2010-07-15  Sam Weinig  <sam@webkit.org>
1372
1373         Reviewed by Anders Carlsson.
1374
1375         Patch for https://bugs.webkit.org/show_bug.cgi?id=42396
1376         Give the navigation type in the policy client callbacks meaning. 
1377
1378         - Use the new WKFrameNavigationType instead of just uint32_t.
1379
1380         * UIProcess/API/C/WKAPICast.h:
1381         (toWK):
1382         Add conversion method from WebCore::NavigationType to WKFrameNavigationType.
1383         * UIProcess/API/C/WKPage.h:
1384         * UIProcess/WebPageProxy.cpp:
1385         (WebKit::WebPageProxy::didReceiveMessage):
1386         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1387         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
1388         * UIProcess/WebPageProxy.h:
1389         * UIProcess/WebPolicyClient.cpp:
1390         (WebKit::WebPolicyClient::decidePolicyForNavigationAction):
1391         (WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
1392         * UIProcess/WebPolicyClient.h:
1393         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1394
1395 2010-07-15  Anders Carlsson  <andersca@apple.com>
1396
1397         Reviewed by Sam Weinig.
1398
1399         Add a PluginView::Stream class
1400         https://bugs.webkit.org/show_bug.cgi?id=42398
1401
1402         * WebProcess/Plugins/PluginView.cpp:
1403         Add the Stream class.
1404
1405         (WebKit::PluginView::performURLRequest):
1406         Create the stream and start it.
1407
1408         (WebKit::PluginView::addStream):
1409         Add the stream to the map.
1410
1411         (WebKit::PluginView::removeStream):
1412         Remove the stream from the map.
1413
1414         * WebProcess/Plugins/PluginView.h:
1415         Add Stream forward declaration and the m_streams map.
1416
1417 2010-07-15  Anders Carlsson  <andersca@apple.com>
1418
1419         Reviewed by Sam Weinig.
1420
1421         Don't allow multiple calls to NetscapePluginStream::stop
1422         https://bugs.webkit.org/show_bug.cgi?id=42395
1423
1424         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1425         (WebKit::NetscapePluginStream::NetscapePluginStream):
1426         Initialize m_urlNotifyHasBeenCalled.
1427
1428         (WebKit::NetscapePluginStream::~NetscapePluginStream):
1429         Assert that the stream didn't need a URL notification or that one was sent.
1430
1431         (WebKit::NetscapePluginStream::sendJavaScriptStream):
1432         Don't call stop in the JS failure case because the stream won't be started.
1433
1434         (WebKit::NetscapePluginStream::stop):
1435         Remove m_isStarted check and add an assertion instead. Move code that calls NPP_URLNotify and
1436         destroys the stream out to a separate function.
1437
1438         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
1439         Call NPP_URLNotify if necessary and destroy the stream.
1440
1441         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1442
1443 2010-07-15  Anders Carlsson  <andersca@apple.com>
1444
1445         Reviewed by Sam Weinig.
1446
1447         Implement NPN_DestroyStream
1448         https://bugs.webkit.org/show_bug.cgi?id=42393
1449
1450         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1451         (WebKit::NPN_DestroyStream):
1452         Call NetscapePlugin::destroyStream.
1453
1454         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1455         (WebKit::NetscapePlugin::destroyStream):
1456         Check if the stream is valid, and if it is call NetscapePluginStream::destroy.
1457
1458         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1459         (WebKit::NetscapePluginStream::sendJavaScriptStream):
1460         Keep a reference to the stream in case it's destroyed by an NPP_ call.
1461
1462         (WebKit::NetscapePluginStream::destroy):
1463         Verify that the stream can be destroyed and stop it.
1464
1465         (WebKit::NetscapePluginStream::deliverDataToPlugin):
1466         Add m_isStarted checks after any calls to NPP_ functions.
1467
1468         (WebKit::NetscapePluginStream::stop):
1469         Set m_isStarted to false before calling NPP_DestroyStream.
1470         
1471         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1472         (WebKit::NetscapePluginStream::npStream):
1473         Add NPStream getter.
1474
1475 2010-07-15  Anders Carlsson  <andersca@apple.com>
1476
1477         Reviewed by Darin Adler.
1478
1479         WebKitTestRunner goes off the deep end, spinning in a dispatch queue thread
1480         https://bugs.webkit.org/show_bug.cgi?id=42355
1481
1482         Sometimes, when receiving a message whose size is very close to the inlineMessageMaxSize,
1483         mach_msg would return with MACH_RCV_TOO_LARGE. In debug builds we would assert, but in release
1484         builds we would just bail and the receiveSourceEventHandler would be run again shortly since we didn't
1485         actually pull the message off the mach message queue.
1486
1487         Fix this by setting the receive source buffer size to include the maximum message trailer size, which
1488         mach_msg requires. Also, handle mach_msg returning MACH_RCV_TOO_LARGE (even though in theory it would never happen
1489         now that the receivedBufferSize always includes the maximum message trailer size.
1490
1491         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1492         (CoreIPC::Connection::receiveSourceEventHandler):
1493         Use a Vector with inline data instead of a char array. This way we can resize the Vector if the message received
1494         is too big.
1495
1496 2010-07-15  Anders Carlsson  <andersca@apple.com>
1497
1498         Reviewed by Darin Adler.
1499
1500         Send JavaScript stream data to plug-ins
1501         https://bugs.webkit.org/show_bug.cgi?id=42384
1502
1503         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1504         (WebKit::NetscapePlugin::NPP_WriteReady):
1505         (WebKit::NetscapePlugin::NPP_Write):
1506         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1507         Add NPP_ wrappers.
1508         
1509         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1510         (WebKit::NetscapePluginStream::NetscapePluginStream):
1511         Initialize m_deliveryDataTimer and m_stopstreamWhenDoneDelivering.
1512
1513         (WebKit::NetscapePluginStream::sendJavaScriptStream):
1514         Call deliverData and stop.
1515
1516         (WebKit::NetscapePluginStream::deliverData):
1517         Add the data to m_deliveryData and call deliverDataToPlugin.
1518
1519         (WebKit::NetscapePluginStream::deliverDataToPlugin):
1520         Deliver the data in m_deliveryData to the plug-in. Call NPP_WriteReady to see how much
1521         data the plug-in can handle right now. If the plug-in returns zero or a negative value, delay the
1522         delivery using the delivery data timer. Otherwise, call NPP_Write in chunks until all the data has been
1523         delivered, then stop the stream if needed.
1524
1525         (WebKit::NetscapePluginStream::stop):
1526         If the reason for stopping the stream is that it's finished and the plug-in hasn't processed all the data,
1527         don't close the stream now. Instead, set m_stopStreamWhenDoneDelivering to true which will cause the stream to be
1528         closed once all data has been delivered.
1529
1530         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
1531         Add member functions and member variables.
1532
1533 2010-07-14  Brent Fulgham  <bfulgham@webkit.org>
1534
1535         Reviewed by Steve Falkenburg.
1536
1537         Patch for https://bugs.webkit.org/show_bug.cgi?id=42299
1538         Correct WinCairo build for new WebKit2 project structure.
1539
1540         * win/WebKit2Apple.vsprops: Put WebKit2.def here.
1541         * win/WebKit2CFLite.def: Added CFLite version of def file.
1542         * win/WebKit2CFLite.vsprops: Add new WebKit2CFLite.def here.
1543         * win/WebKit2Common.vsprops: Remove WebKit2.def definition as
1544           WinCairo and Apple need different versions of this.
1545         * win/WebKit2WebProcess.vcproj: Add a new Debug_Cairo target
1546           for the WebKit2WebProcess project.
1547
1548 2010-07-15  Mark Rowe  <mrowe@apple.com>
1549
1550         Update the sorting in the Xcode project files.
1551
1552         * WebKit2.xcodeproj/project.pbxproj:
1553
1554 2010-07-14  Sam Weinig  <sam@webkit.org>
1555
1556         Reviewed by Dan Bernstein.
1557
1558         Patch for https://bugs.webkit.org/show_bug.cgi?id=42315
1559         <rdar://problem/8185281>
1560         All text in WebKit2 draws with no subpixel antialiasing
1561
1562         - Change CGBitmapInfo passed to CGBitmapContextCreate and CGImageCreate
1563           from kCGImageAlphaPremultipliedLast to kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host.
1564
1565         * Shared/mac/UpdateChunk.cpp:
1566         (WebKit::UpdateChunk::createImage):
1567         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
1568         (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
1569         * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
1570         (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
1571
1572 2010-07-14  Maciej Stachowiak  <mjs@apple.com>
1573
1574         Reviewed by Mark Rowe.
1575
1576         - Fix WebKitTestRunner build
1577
1578         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add stdint.h include.
1579
1580 2010-07-14  Anders Carlsson  <andersca@apple.com>
1581
1582         Try to fix Windows build.
1583
1584         * win/WebKit2.vcproj:
1585
1586 2010-07-14  Anders Carlsson  <andersca@apple.com>
1587
1588         Reviewed by Sam Weinig.
1589
1590         More work on plug-in streams
1591         https://bugs.webkit.org/show_bug.cgi?id=42308
1592
1593         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1594         (WebKit::NetscapePlugin::loadURL):
1595         If the target is null, create a NetscapePluginStream and add it to the m_streams map.
1596
1597         (WebKit::NetscapePlugin::removePluginStream):
1598         Remove the given NetscapePluginStream from the m_streams map.
1599
1600         (WebKit::NetscapePlugin::NPP_NewStream):
1601         (WebKit::NetscapePlugin::NPP_DestroyStream):
1602         Add NPP_ wrappers.
1603
1604         (WebKit::NetscapePlugin::streamFromID):
1605         Return the plug-in stream given a stream ID.
1606
1607         (WebKit::NetscapePlugin::didEvaluateJavaScript):
1608         Find the plug-in stream and call sendJavaScriptStream.
1609
1610         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1611         (WebKit::NetscapePluginStream::NetscapePluginStream):
1612         Initialize member variables.
1613
1614         (WebKit::NetscapePluginStream::~NetscapePluginStream):
1615         Assert that we aren't started.
1616
1617         (WebKit::NetscapePluginStream::sendJavaScriptStream):
1618         If the JavaScript request was successful, start the stream. Otherwise call stop() which just
1619         ends up calling NPP_URLNotify when the stream isn't started.
1620
1621         (WebKit::NetscapePluginStream::start):
1622         Set up the NPStream object. Call NPP_NewStream. Return false if the call was not successful, or if
1623         the requested stream type is one that we don't yet support.
1624
1625         (WebKit::NetscapePluginStream::stop):
1626         Call NPP_DestroyStream if the stream is started. Call NPP_URLNotify if necessary.
1627
1628         * WebProcess/Plugins/PluginView.cpp:
1629         (WebKit::PluginView::performJavaScriptURLRequest):
1630         Remove unneeded comment.
1631
1632 2010-07-14  Sam Weinig  <sam@webkit.org>
1633
1634         Reviewed by John Sullivan.
1635
1636         Make Back/Forward work.
1637
1638         * UIProcess/WebPageProxy.cpp:
1639         (WebKit::WebPageProxy::goForward): Pass the item ID to avoid roundtrip.
1640         (WebKit::WebPageProxy::goBack): Ditto.
1641         (WebKit::WebPageProxy::didReceiveMessage): Implement WebPageProxyMessage::BackForwardGoToItem.
1642         * WebProcess/WebPage/WebPage.cpp:
1643         (WebKit::WebPage::WebPage):
1644         (WebKit::WebPage::goForward): Use m_page->goToItem with the correct type instead of the Page shortcut.
1645         (WebKit::WebPage::goBack): Ditto.
1646         (WebKit::WebPage::didReceiveMessage):
1647         * WebProcess/WebPage/WebPage.h:
1648         Remove unused m_canGoBack and m_canGoForward.
1649
1650 2010-07-14  Anders Carlsson  <andersca@apple.com>
1651
1652         Reviewed by Darin Adler.
1653
1654         Add NetscapePluginStream class
1655         https://bugs.webkit.org/show_bug.cgi?id=42296
1656
1657         * WebKit2.xcodeproj/project.pbxproj:
1658         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: Added.
1659         (WebKit::NetscapePluginStream::NetscapePluginStream):
1660         (WebKit::NetscapePluginStream::~NetscapePluginStream):
1661         * WebProcess/Plugins/Netscape/NetscapePluginStream.h: Added.
1662         (WebKit::NetscapePluginStream::create):
1663
1664 2010-07-14  Sam Weinig  <sam@webkit.org>
1665
1666         Reviewed by Darin Adler.
1667
1668         Patch for https://bugs.webkit.org/show_bug.cgi?id=42297
1669         <rdar://problem/8187355>
1670         Make titles in WebBackForwardListItems work.
1671
1672         - Make WebBackForwardListItemMap per WebProcessProxy to allow updating
1673           them separate from a page. They are conceptually per process anyway.
1674         - Add a message to add or update a WebBackForwardListItemMap triggered
1675           by the WebCore::notifyHistoryItemChanged mechanism.
1676
1677         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
1678         (WebProcessProxyMessage::):
1679         Add AddOrUpdateBackForwardItem message.
1680
1681         * UIProcess/WebBackForwardListItem.h:
1682         (WebKit::WebBackForwardListItem::setOriginalURL):
1683         (WebKit::WebBackForwardListItem::setURL):
1684         (WebKit::WebBackForwardListItem::setTitle):
1685         Add setters.
1686
1687         * UIProcess/WebPageProxy.cpp:
1688         (WebKit::WebPageProxy::didReceiveMessage):
1689         BackForwardAddItem now assumes the item has already been created, so
1690         now just forwards the add message onto the WebBackForwardList.
1691
1692         (WebKit::WebPageProxy::addItemToBackForwardList): Take a WebBackForwardList instead of an ID.
1693         (WebKit::WebPageProxy::goToItemInBackForwardList): Ditto.
1694         * UIProcess/WebPageProxy.h: Ditto.
1695
1696         * UIProcess/WebProcessProxy.cpp:
1697         (WebKit::WebProcessProxy::webBackForwardItem):
1698         (WebKit::WebProcessProxy::addOrUpdateBackForwardListItem):
1699         (WebKit::WebProcessProxy::didReceiveMessage):
1700         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1701         * UIProcess/WebProcessProxy.h:
1702         Have the WebProcessProxy manage the WebBackForwardListItems.
1703
1704         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1705         (WebKit::updateBackForwardItem):
1706         (WebKit::WK2NotifyHistoryItemChanged): Use this to notify UIProcess
1707         of HistoryItem changes (such as the title being added).
1708         (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
1709         Register the notifyHistoryItemChanged function.
1710         (WebKit::WebBackForwardListProxy::addItem):
1711         Just send the ID as the updateBackForwardItem is already going to have
1712         been called by this time.
1713
1714 2010-07-14  Anders Carlsson  <andersca@apple.com>
1715
1716         Reviewed by Sam Weinig.
1717
1718         Call NPN_URLNotify for frame loads initiated by plug-ins
1719         https://bugs.webkit.org/show_bug.cgi?id=42291
1720
1721         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1722         (WebKit::NetscapePlugin::loadURL):
1723         If needed, keep track of the request ID and URL so we can call NPP_URLNotify at a later point.
1724
1725         (WebKit::NetscapePlugin::frameDidFinishLoading):
1726         Get the notification data and the URL from the map and call NPP_URLNotify.
1727
1728         (WebKit::NetscapePlugin::frameDidFail):
1729         Get the notification data and the URL from the map and call NPP_URLNotify.
1730
1731         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1732
1733 2010-07-14  Anders Carlsson  <andersca@apple.com>
1734
1735         Reviewed by Sam Weinig.
1736
1737         Add NetscapePlugin::NPP_ member functions for calling into the plug-in
1738         https://bugs.webkit.org/show_bug.cgi?id=42287
1739
1740         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1741         (WebKit::NetscapePlugin::NPP_New):
1742         (WebKit::NetscapePlugin::NPP_Destroy):
1743         (WebKit::NetscapePlugin::NPP_SetWindow):
1744         (WebKit::NetscapePlugin::NPP_URLNotify):
1745         (WebKit::NetscapePlugin::callSetWindow):
1746         (WebKit::NetscapePlugin::initialize):
1747         (WebKit::NetscapePlugin::destroy):
1748         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1749
1750 2010-07-14  Anders Carlsson  <andersca@apple.com>
1751
1752         Reviewed by Sam Weinig.
1753
1754         Send JavaScript url request results back to the plug-in
1755         https://bugs.webkit.org/show_bug.cgi?id=42277
1756
1757         * WebProcess/Plugins/DummyPlugin.cpp:
1758         (WebKit::DummyPlugin::didEvaluateJavaScript):
1759         * WebProcess/Plugins/DummyPlugin.h:
1760         Add empty stub.
1761
1762         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1763         (WebKit::NetscapePlugin::didEvaluateJavaScript):
1764         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1765         Add Empty stub.
1766
1767         * WebProcess/Plugins/Plugin.h:
1768         Add didEvaluateJavaScript pure virtual member function.
1769
1770         * WebProcess/Plugins/PluginView.cpp:
1771         (WebKit::PluginView::performJavaScriptURLRequest):
1772         If target is not null, Call Plugin::frameDidFail or Plugin::frameDidFinishLoading.
1773         If target is null, call didEvaluateJavaScript with the result string.
1774
1775 2010-07-14  Sam Weinig  <sam@webkit.org>
1776
1777         Reviewed by Darin Adler.
1778
1779         Patch for https://bugs.webkit.org/show_bug.cgi?id=42232
1780         Make changing Cursors work in WebKit2.
1781
1782         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
1783         Add SetCursor message.
1784
1785         * Shared/WebCoreArgumentCoders.h:
1786         Add encoding/decoding of Cursors. For now we don't support Custom
1787         cursors.
1788
1789         * UIProcess/API/mac/PageClientImpl.h:
1790         * UIProcess/API/mac/PageClientImpl.mm:
1791         (WebKit::PageClientImpl::setCursor):
1792         * UIProcess/PageClient.h:
1793         Add pass through functions to get the cursor from the WebPageProxy
1794         to the WKView.
1795
1796         * UIProcess/API/mac/WKView.mm:
1797         (-[WKView _setCursor:]):
1798         * UIProcess/API/mac/WKViewInternal.h:
1799         Implement changing the cursor.
1800
1801         * UIProcess/WebPageProxy.cpp:
1802         (WebKit::WebPageProxy::didReceiveMessage):
1803         (WebKit::WebPageProxy::setCursor):
1804         * UIProcess/WebPageProxy.h:
1805         Decode the cursor.
1806
1807         * UIProcess/win/WebView.cpp:
1808         (WebKit::WebView::wndProc):
1809         (WebKit::WebView::WebView):
1810         (WebKit::WebView::onSetCursor):
1811         (WebKit::WebView::setCursor):
1812         * UIProcess/win/WebView.h:
1813         Implement changing the cursor.
1814
1815         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1816         (WebKit::WebChromeClient::setCursor):
1817         (WebKit::WebChromeClient::setLastSetCursorToCurrentCursor):
1818         * WebProcess/WebCoreSupport/WebChromeClient.h:
1819         Encode the cursor when setCursor is called.
1820
1821 2010-07-13  Anders Carlsson  <andersca@apple.com>
1822
1823         Reviewed by Sam Weinig.
1824
1825         Add support for loading javascript: URLs
1826         https://bugs.webkit.org/show_bug.cgi?id=42221
1827
1828         * WebProcess/Plugins/DummyPlugin.cpp:
1829         (WebKit::DummyPlugin::controller):
1830         * WebProcess/Plugins/DummyPlugin.h:
1831         Add stub function.
1832
1833         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1834         (WebKit::NetscapePlugin::destroy):
1835         Set the plug-in controller to 0.
1836
1837         (WebKit::NetscapePlugin::controller):
1838         Return the plug-in controller.
1839
1840         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1841         Add controller() member function.
1842
1843         * WebProcess/Plugins/Plugin.h:
1844         Add controller() pure virtual member function.
1845         
1846         * WebProcess/Plugins/PluginView.cpp:
1847         (WebKit::PluginView::performURLRequest):
1848         If the given URL request has a javascript: protocol, call
1849         performJavaScriptURLRequest.
1850
1851         (WebKit::PluginView::performFrameLoadURLRequest):
1852         Add a security origin check.
1853
1854         (WebKit::PluginView::performJavaScriptURLRequest):
1855         Evaluate the JavaScript code, Get the resulting string.
1856
1857         * WebProcess/Plugins/PluginView.h:
1858         Add performJavaScriptURLRequest.
1859
1860 2010-07-13  Anders Carlsson  <andersca@apple.com>
1861
1862         Reviewed by Sam Weinig.
1863
1864         Add support for URL frame loading using NPN_GetURLNotify
1865         https://bugs.webkit.org/show_bug.cgi?id=42192
1866
1867         * WebProcess/Plugins/DummyPlugin.cpp:
1868         (WebKit::DummyPlugin::frameDidFinishLoading):
1869         (WebKit::DummyPlugin::frameDidFail):
1870         * WebProcess/Plugins/DummyPlugin.h:
1871         Add empty stubs.
1872         
1873         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1874         Implement NPN_GetURLNotify and have it call NetscapePlugin::loadURL.
1875
1876         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1877         (WebKit::NetscapePlugin::NetscapePlugin):
1878         Initialize m_nextRequestID to 0.
1879
1880         (WebKit::NetscapePlugin::loadURL):
1881         Ask the plug-in controller to load the URL.
1882
1883         (WebKit::NetscapePlugin::frameDidFinishLoading):
1884         (WebKit::NetscapePlugin::frameDidFail):
1885         Add empty stubs for now.
1886
1887         * WebProcess/Plugins/Plugin.h:
1888         Add new member functions for frame load notifications.
1889
1890         * WebProcess/Plugins/PluginController.h:
1891         Add loadURL.
1892
1893         * WebProcess/Plugins/PluginView.cpp:
1894         (WebKit::PluginView::URLRequest::URLRequest):
1895         Add class that represents an URL request.
1896
1897         (WebKit::PluginView::PluginView):
1898         Initialize m_pendingURLRequestsTimer.
1899
1900         (WebKit::PluginView::~PluginView):
1901         Unset all active load listeners.
1902
1903         (WebKit::PluginView::pendingURLRequestsTimerFired):
1904         Take the first request in the queue and process it.
1905
1906         (WebKit::PluginView::performURLRequest):
1907         Call performFrameLoadURLRequest if necessary.
1908
1909         (WebKit::PluginView::performFrameLoadURLRequest):
1910         Find a frame to load the request in. If a frame doesn't exist try to create a new frame.
1911
1912         (WebKit::PluginView::loadURL):
1913         Create a URLRequest and add it to the queue.
1914
1915         (WebKit::PluginView::didFinishLoad):
1916         Get the pending frame load request and call Plugin::frameDidFinishLoading.
1917
1918         (WebKit::PluginView::didFailLoad):
1919         Get the pending frame load request and call Plugin::frameDidFail.
1920
1921         * WebProcess/Plugins/PluginView.h:
1922         Inherit from WebFrame::LoadListener.
1923
1924         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1925         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
1926         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
1927         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
1928         (WebKit::WebFrameLoaderClient::didFinishLoad):
1929         Call the WebFrame's load listener if needed.
1930
1931         * WebProcess/WebPage/WebFrame.cpp:
1932         (WebKit::WebFrame::WebFrame):
1933         Initialize m_loadListener to 0.
1934
1935         * WebProcess/WebPage/WebFrame.h:
1936         Add a LoadListener class that the plug-in view can use to track frame loads.
1937
1938         (WebKit::WebFrame::LoadListener::~LoadListener):
1939         (WebKit::WebFrame::setLoadListener):
1940         (WebKit::WebFrame::loadListener):
1941
1942 2010-07-13  Diego Gonzalez  <diegohcg@webkit.org>
1943
1944         Reviewed by Kenneth Rohde Christiansen.
1945
1946         [Qt] [WebKit2] Hook up navigation actions
1947         https://bugs.webkit.org/show_bug.cgi?id=42183
1948
1949         Make Back, Forward, Stop and Reload being enable/disabled according
1950         page loading.
1951
1952         * UIProcess/API/qt/ClientImpl.cpp:
1953         (qt_wk_didStartProvisionalLoadForFrame):
1954         (qt_wk_didCommitLoadForFrame):
1955         (qt_wk_didFinishLoadForFrame):
1956         (qt_wk_didFailLoadWithErrorForFrame):
1957         * UIProcess/API/qt/qwkpage.cpp:
1958         (QWKPagePrivate::updateAction):
1959
1960 2010-07-13  John Sullivan  <sullivan@apple.com>
1961
1962         Written by Simon Fraser, reviewed by me.
1963
1964         Cleaner fix for previous check-in.
1965
1966         * UIProcess/WebBackForwardList.cpp:
1967         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
1968         Use std::max<int> for int-casting brevity.
1969
1970 2010-07-13  John Sullivan  <sullivan@apple.com>
1971
1972         Reviewed by Sam Weinig.
1973
1974         Fixed signed/unsigned problem that led to bogus contents in the array
1975         returned by WKBackForwardListCopyBackListWithLimit().
1976
1977         * UIProcess/WebBackForwardList.cpp:
1978         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
1979         Cast m_current and limit to signed values in std::max call.
1980
1981 2010-07-13  Steve Falkenburg  <sfalken@apple.com>
1982
1983         Reviewed by Ada Chan.
1984
1985         Fix missing resources causing layout test failures
1986         https://bugs.webkit.org/show_bug.cgi?id=42179
1987         
1988         Quick fix to get the layout tests going again.
1989         I'll work on getting resource.h from WebKit into a cross-project
1990         propagated header after this lands.
1991
1992         * win/WebKit2.rc:
1993         * win/resource.h: Copied from WebKit/win/WebKit.vcproj/resource.h.
1994
1995 2010-07-13  Anders Carlsson  <andersca@apple.com>
1996
1997         Reviewed by Adam Roben.
1998
1999         Make all NPN_ functions static.
2000
2001         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2002
2003 2010-07-13  Anders Carlsson  <andersca@apple.com>
2004
2005         Reviewed by Adam Roben.
2006
2007         Document the member functions of the abstract Plugin and PluginController classes.
2008
2009         * WebProcess/Plugins/Plugin.h:
2010         * WebProcess/Plugins/PluginController.h:
2011
2012 2010-07-13  Simon Hausmann  <simon.hausmann@nokia.com>
2013
2014         [Qt] Trivial build fix.
2015
2016         Provide a stub for mimeTypeFromExtension() that uses notImplemented().
2017
2018         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
2019         (WebKit::PluginInfoStore::mimeTypeFromExtension):
2020
2021 2010-07-13  Simon Hausmann  <simon.hausmann@nokia.com>
2022
2023         Reviewed by Kenneth Rohde Christiansen.
2024
2025         [Qt] Tweaks needed to compile WebKit2 with Qt
2026         https://bugs.webkit.org/show_bug.cgi?id=41604
2027
2028         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2029         (WebKit::ProcessLauncherHelper::launch): Adjust to PassOwnPtr API changes.
2030         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Don't include JavaScriptCore.h,
2031         as it unconditionally includes JSStringRefCF. Instead include JavaScript.h.
2032
2033 2010-07-12  Steve Falkenburg  <sfalken@apple.com>
2034
2035         Windows build fix.
2036         Don't build MiniBrowser except for Debug_Internal.
2037
2038         * WebKit2.sln:
2039
2040 2010-07-12  Steve Falkenburg  <sfalken@apple.com>
2041
2042         Reviewed by Maciej Stachowiak.
2043
2044         Make WebKit2 be built by build-webkit (so it will be built by build.webkit.org bots)
2045         https://bugs.webkit.org/show_bug.cgi?id=40922
2046         
2047         Add additional dependent projects. Necessary since our WebKit build on
2048         Windows is packaged into a DLL with WebKit2.
2049
2050         * WebKit2.sln:
2051
2052 2010-07-12  Mark Rowe  <mrowe@apple.com>
2053
2054         Rubber-stamped by Maciej Stachowiak.
2055
2056         Fix WebKit2 to use the same compiler-selection logic as the other projects.
2057
2058         * WebKit2.xcodeproj/project.pbxproj: Don't hard-code WebKit2 to build with GCC 4.2.
2059
2060 2010-07-12  Maciej Stachowiak  <mjs@apple.com>
2061
2062         Reviewed by Anders Carlsson.
2063
2064         WKView should override setFrameSize: instead of setFrame:
2065         https://bugs.webkit.org/show_bug.cgi?id=42127
2066
2067         * UIProcess/API/mac/WKView.mm:
2068         (-[WKView setFrameSize:]): Override this method instead of setFrame:,
2069         since that is the right way to do it.
2070
2071 2010-07-12  Steve Falkenburg  <sfalken@apple.com>
2072
2073         Reviewed by Alice Liu.
2074
2075         <rdar://problem/8113038> WebKit1 and WebKit2 should build as a single DLL
2076         https://bugs.webkit.org/show_bug.cgi?id=40921
2077         
2078         Pre-WebKit2 WebKit now builds into a static library named WebKitLib.lib.
2079         WebKit.dll now links in WebCore.lib, WebKitLib.lib and WebKit2 code.
2080
2081         This is a first step. We'll likely want to migrate the remainder of
2082         the non-deprecated WebKit code (strings, DLLMain, resources) into WebKit2.
2083
2084         * UIProcess/API/C/WKBase.h: Updated to new BUILDING_ name.
2085         * WebProcess/InjectedBundle/API/c/WKBundleBase.h: Updated to new BUILDING_ name.
2086         * WebProcess/WebCoreSupport/win/WebCoreLocalizedStrings.cpp: Removed.
2087         * WebProcess/win/DllMain.cpp: Removed. Overlaps with implementation in WebKitLib.lib.
2088         * WebProcess/win/WebLocalizableStrings.cpp: Removed. Overlaps with implementation in WebKitLib.lib.
2089         * WebProcess/win/WebLocalizableStrings.h: Removed. Overlaps with implementation in WebKitLib.lib.
2090         * win/WebKit2.def: Added. Copied from WebKit project.
2091         * win/WebKit2.rc: Added resources previously in WebKit.
2092         * win/WebKit2.vcproj: Changed project name to WebKit so we will link output to WebKit.dll.
2093         Removed implementations overlapping with WebKitLib (WebCoreLocalizedStrings, DllMain, WebLocalizableStrings, WebProcessMain).
2094         * win/WebKit2Common.vsprops: Use a framework name of WebKit instead of WebKit2 to reflect project name.
2095         Renamed BUILDING_WEBKIT2 to BUILDING_WEBKIT since there is now just a single WebKit.dll.
2096         * win/WebKit2WebProcess.vcproj: Link against WebKit instead of WebKit2 due to renaming.        
2097         * win/deleteButton.png: Copied from ../WebKit/win/WebKit.vcproj/deleteButton.png.
2098         * win/deleteButtonPressed.png: Copied from ../WebKit/win/WebKit.vcproj/deleteButtonPressed.png.
2099         * win/fsVideoAudioVolumeHigh.png: Copied from ../WebKit/win/WebKit.vcproj/fsVideoAudioVolumeHigh.png.
2100         * win/fsVideoAudioVolumeLow.png: Copied from ../WebKit/win/WebKit.vcproj/fsVideoAudioVolumeLow.png.
2101         * win/fsVideoExitFullscreen.png: Copied from ../WebKit/win/WebKit.vcproj/fsVideoExitFullscreen.png.
2102         * win/fsVideoPause.png: Copied from ../WebKit/win/WebKit.vcproj/fsVideoPause.png.
2103         * win/fsVideoPlay.png: Copied from ../WebKit/win/WebKit.vcproj/fsVideoPlay.png.
2104         * win/missingImage.png: Copied from ../WebKit/win/WebKit.vcproj/missingImage.png.
2105         * win/nullplugin.png: Copied from ../WebKit/win/WebKit.vcproj/nullplugin.png.
2106         * win/panEastCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panEastCursor.png.
2107         * win/panIcon.png: Copied from ../WebKit/win/WebKit.vcproj/panIcon.png.
2108         * win/panNorthCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panNorthCursor.png.
2109         * win/panNorthEastCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panNorthEastCursor.png.
2110         * win/panNorthWestCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panNorthWestCursor.png.
2111         * win/panSouthCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panSouthCursor.png.
2112         * win/panSouthEastCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panSouthEastCursor.png.
2113         * win/panSouthWestCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panSouthWestCursor.png.
2114         * win/panWestCursor.png: Copied from ../WebKit/win/WebKit.vcproj/panWestCursor.png.
2115         * win/searchCancel.png: Copied from ../WebKit/win/WebKit.vcproj/searchCancel.png.
2116         * win/searchCancelPressed.png: Copied from ../WebKit/win/WebKit.vcproj/searchCancelPressed.png.
2117         * win/searchMagnifier.png: Copied from ../WebKit/win/WebKit.vcproj/searchMagnifier.png.
2118         * win/searchMagnifierResults.png: Copied from ../WebKit/win/WebKit.vcproj/searchMagnifierResults.png.
2119         * win/textAreaResizeCorner.png: Copied from ../WebKit/win/WebKit.vcproj/textAreaResizeCorner.png.
2120         * win/verticalTextCursor.png: Copied from ../WebKit/win/WebKit.vcproj/verticalTextCursor.png.
2121         * win/zoomInCursor.png: Copied from ../WebKit/win/WebKit.vcproj/zoomInCursor.png.
2122         * win/zoomOutCursor.png: Copied from ../WebKit/win/WebKit.vcproj/zoomOutCursor.png.
2123
2124 2010-07-12  Maciej Stachowiak  <mjs@apple.com>
2125
2126         Reviewed by Anders Carlsson.
2127
2128         Get rid of auto_ptr use in WebKit2
2129         https://bugs.webkit.org/show_bug.cgi?id=42119
2130         
2131         Replace all use of auto_ptr with OwnPtr/PassOwnPtr.
2132
2133         * Platform/CoreIPC/Connection.cpp:
2134         (CoreIPC::Connection::sendMessage):
2135         (CoreIPC::Connection::waitForMessage):
2136         (CoreIPC::Connection::sendSyncMessage):
2137         (CoreIPC::Connection::processIncomingMessage):
2138         (CoreIPC::Connection::sendOutgoingMessages):
2139         (CoreIPC::Connection::dispatchMessages):
2140         * Platform/CoreIPC/Connection.h:
2141         (CoreIPC::Connection::Message::Message):
2142         (CoreIPC::Connection::send):
2143         (CoreIPC::Connection::sendSync):
2144         (CoreIPC::Connection::waitFor):
2145         * Platform/CoreIPC/mac/ConnectionMac.cpp:
2146         (CoreIPC::Connection::sendOutgoingMessage):
2147         (CoreIPC::createArgumentDecoder):
2148         (CoreIPC::Connection::receiveSourceEventHandler):
2149         * Platform/CoreIPC/qt/ConnectionQt.cpp:
2150         (CoreIPC::Connection::readyReadHandler):
2151         (CoreIPC::Connection::sendOutgoingMessage):
2152         * Platform/CoreIPC/win/ConnectionWin.cpp:
2153         (CoreIPC::Connection::readEventHandler):
2154         (CoreIPC::Connection::sendOutgoingMessage):
2155         * Platform/RunLoop.cpp:
2156         (RunLoop::performWork):
2157         (RunLoop::scheduleWork):
2158         * Platform/RunLoop.h:
2159         * Platform/WorkItem.h:
2160         (WorkItem::create):
2161         * Platform/WorkQueue.h:
2162         * Platform/mac/WorkQueueMac.cpp:
2163         (WorkQueue::executeWorkItem):
2164         (WorkQueue::scheduleWork):
2165         (WorkQueue::EventSource::EventSource):
2166         (WorkQueue::registerMachPortEventHandler):
2167         * Platform/qt/WorkQueueQt.cpp:
2168         (WorkQueue::connectSignal):
2169         (WorkQueue::scheduleWork):
2170         * Platform/win/WorkQueueWin.cpp:
2171         (WorkQueue::registerHandle):
2172         (WorkQueue::scheduleWork):
2173         (WorkQueue::performWork):
2174         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
2175         (WebKit::ChunkedUpdateDrawingAreaProxy::paint):
2176         * UIProcess/WebProcessProxy.cpp:
2177         (WebKit::WebProcessProxy::sendMessage):
2178         (WebKit::WebProcessProxy::didFinishLaunching):
2179         * UIProcess/WebProcessProxy.h:
2180         (WebKit::WebProcessProxy::send):
2181
2182 2010-07-12  Ada Chan  <adachan@apple.com>
2183
2184         Build fix.  Copy WKArray.h to the include directory.
2185
2186         * win/WebKit2Generated.make:
2187
2188 2010-07-12  Mark Rowe  <mrowe@apple.com>
2189
2190         Re-do an Xcode project change that Xcode decided not to save.
2191
2192         * WebKit2.xcodeproj/project.pbxproj: Remove WebKit2.exp from the project.
2193         For some reason it was being copied in to the framework wrapper.
2194
2195 2010-07-12  Mark Rowe  <mrowe@apple.com>
2196
2197         Reviewed by Sam Weinig.
2198
2199         Remove the exports file from WebKit2.
2200
2201         * Configurations/Base.xcconfig: Have symbols default to hidden visibility.
2202         * Configurations/WebKit2.xcconfig: Remove the export file.
2203         * UIProcess/API/mac/WKView.h: Export the WKView class.
2204         * WebProcess/WebKitMain.cpp: Export the WebKitMain function.
2205         * mac/WebKit2.exp: Removed.
2206
2207 2010-07-12  Adam Roben  <aroben@apple.com>
2208
2209         Move WebKit2.vcproj's settings into .vsprops files
2210
2211         This makes it easier to make changes that affect all configurations.
2212
2213         Fixes <http://webkit.org/b/42097> WebKit2 should use .vsprops files
2214
2215         Reviewed by Steve Falkenburg.
2216
2217         * win/WebKit2.vcproj: Moved settings from here to the files below.
2218         * win/WebKit2Apple.vsprops: Added. Links against Apple-specific
2219         libraries.
2220         * win/WebKit2CFLite.vsprops: Added. Links against CFLite.
2221         * win/WebKit2Common.vsprops: Added. Contains settings shared by all
2222         configurations.
2223         * win/WebKit2DirectX.vsprops: Added. Contains settings to help with
2224         linking against DirectX.
2225
2226 2010-07-12  Adam Roben  <aroben@apple.com>
2227
2228         Stop generating stripped symbols for Release builds
2229
2230         It turns out we can strip the symbols after-the-fact using PDBCopy.
2231
2232         Fixes <http://webkit.org/b/42085>.
2233
2234         Reviewed by Steve Falkenburg.
2235
2236         * win/WebKit2.vcproj: Removed the no-longer-needed Release override of
2237         the StripPrivateSymbols attribute. (This attribute is no longer set in
2238         release.vsprops, so doesn't need to be overridden.)
2239
2240 2010-07-12  Brian Weinstein  <bweinstein@apple.com>
2241
2242         WebKit2 build fix for Windows.
2243
2244         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Remove some stub function definitions.
2245         * win/WebKit2.vcproj: Add PluginController.h to the vcproj.
2246
2247 2010-07-12  Anders Carlsson  <andersca@apple.com>
2248
2249         Reviewed by Adam Roben.
2250
2251         Add a PluginController class, use it for invalidation and getting the user agent
2252         https://bugs.webkit.org/show_bug.cgi?id=42084
2253
2254         * WebKit2.xcodeproj/project.pbxproj:
2255         Add PluginController.h
2256
2257         * WebProcess/Plugins/DummyPlugin.cpp:
2258         (WebKit::DummyPlugin::initialize):
2259         * WebProcess/Plugins/DummyPlugin.h:
2260         Pass the PluginController to initialize.
2261
2262         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2263         Implement NPN_UserAgent, NPN_MemAlloc, NPN_MemFree, NPN_InvalidateRect and NPN_InvalidateRegion.
2264
2265         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2266         (WebKit::NetscapePlugin::NetscapePlugin):
2267         Initialize m_pluginController to null.
2268
2269         (WebKit::NetscapePlugin::invalidate):
2270         Ask the plug-in controller to invalidate.
2271
2272         (WebKit::NetscapePlugin::userAgent):´
2273         Ask the plug-in controller for the user agent.
2274
2275         (WebKit::NetscapePlugin::initialize):
2276         Set the m_pluginController member variable.
2277
2278         * WebProcess/Plugins/Plugin.h:
2279         Make initialize take a PluginController.
2280
2281         * WebProcess/Plugins/PluginController.h: Added.
2282
2283         * WebProcess/Plugins/PluginView.cpp:
2284         (WebKit::PluginView::initializePlugin):
2285         Pass the PluginController to initialize.
2286
2287         (WebKit::PluginView::invalidateRect):
2288         Tell the host window to invalidate the given rect.
2289
2290         (WebKit::PluginView::invalidate):
2291         Call invalidateRect.
2292
2293         (WebKit::PluginView::userAgent):
2294         Ask the frame loader client for the user agent.
2295
2296         * WebProcess/Plugins/PluginView.h:
2297
2298 2010-07-12  Adam Roben  <aroben@apple.com>
2299
2300         Windows build fix
2301
2302         * WebProcess/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: Added.
2303         (WebKit::NetscapePluginModule::tryLoad):
2304         (WebKit::NetscapePluginModule::unload):
2305         Stubbed these out.
2306
2307         * win/WebKit2.vcproj: Added a Netscape filter beneath
2308         WebProcess/Plugins, and moved NetscapePlugin into it. Added
2309         NetscapePluginModule to the new Netscape filter. Added
2310         WebProcess/Plugins to the include path for all configurations (it was
2311         only added to Release and Debug_Internal previously) and added
2312         WebProcess/Plugins/Netscape to the include path for all
2313         configurations.
2314
2315 2010-07-11  Maciej Stachowiak  <mjs@apple.com>
2316
2317         Reviewed by Dan Bernstein.
2318
2319         Implement animation-related methods for WebKitTestRunner
2320         https://bugs.webkit.org/show_bug.cgi?id=42053
2321
2322         Implemented some helpers for WebKitTestRunner;
2323         
2324         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2325         (WKBundleFrameGetNumberOfActiveAnimations):
2326         (WKBundleFramePauseAnimationOnElementWithId):
2327         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2328         * WebProcess/WebPage/WebFrame.cpp:
2329         (WebKit::WebFrame::numberOfActiveAnimations):
2330         (WebKit::WebFrame::pauseAnimationOnElementWithId):
2331         * WebProcess/WebPage/WebFrame.h:
2332         * mac/WebKit2.exp:
2333
2334 2010-07-10  Anders Carlsson  <andersca@apple.com>
2335
2336         Reviewed by Sam Weinig.
2337
2338         Don't initialize plug-ins until allowed by the page
2339         https://bugs.webkit.org/show_bug.cgi?id=42033
2340
2341         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2342         (WebKit::NetscapePlugin::paint):
2343         (WebKit::NetscapePlugin::geometryDidChange):
2344         Assert that the plug-in is started.
2345
2346         * WebProcess/Plugins/PluginView.cpp:
2347         (WebKit::PluginView::PluginView):
2348         Initialize m_isWaitingUntilMediaCanStart.
2349         
2350         (WebKit::PluginView::~PluginView):
2351         If necessary, remove the plug-in view as a MediaCanStartListener.
2352
2353         (WebKit::PluginView::initializePlugin):
2354         If we're not allowed to initialize the plug-in, add the plug-in view as a MediaCanStartListener.
2355
2356         (WebKit::PluginView::paint):
2357         Check that the plug-in is initialized.
2358
2359         (WebKit::PluginView::viewGeometryDidChange):
2360         Ditto.
2361
2362         (WebKit::PluginView::mediaCanStart):
2363         Initialize the plug-in.
2364
2365         * WebProcess/Plugins/PluginView.h:
2366
2367 2010-07-10  Anders Carlsson  <andersca@apple.com>
2368
2369         Reviewed by Dan Bernstein.
2370
2371         Have the plug-in view initialize the plug-in
2372         https://bugs.webkit.org/show_bug.cgi?id=42030
2373
2374         * WebProcess/Plugins/DummyPlugin.cpp:
2375         (WebKit::DummyPlugin::initialize):
2376         * WebProcess/Plugins/DummyPlugin.h:
2377         Plugin::initialize now takes a struct.
2378         
2379         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2380         (WebKit::NetscapePlugin::initialize):        
2381         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2382         Plugin::initialize now takes a struct.
2383         
2384         * WebProcess/Plugins/Plugin.h:
2385         Add Parameters struct.
2386
2387         * WebProcess/Plugins/PluginView.cpp:
2388         (WebKit::PluginView::PluginView):
2389         Add Parameters parameter.
2390
2391         (WebKit::PluginView::~PluginView):
2392         Add m_plugin null check.
2393
2394         (WebKit::PluginView::initializePlugin):
2395         Try to initialize the plug-in and zero out the plug-in if initialization fails.
2396
2397         (WebKit::PluginView::paint):
2398         Add m_plugin null check.
2399         
2400         (WebKit::PluginView::setParent):
2401         Initialize the plug-in.
2402     
2403         * WebProcess/Plugins/PluginView.h:
2404         (WebKit::PluginView::create):
2405         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2406         (WebKit::WebFrameLoaderClient::createPlugin):
2407         Don't initialize the plug-in here.
2408
2409 2010-07-10  Anders Carlsson  <andersca@apple.com>
2410
2411         Reviewed by Oliver Hunt.
2412
2413         Call Page::canStartMedia when the WKView is added to/removed from a window
2414         https://bugs.webkit.org/show_bug.cgi?id=42029
2415
2416         * Shared/CoreIPCSupport/WebPageMessageKinds.h:
2417         (WebPageMessage::):
2418         Add SetIsInWindow.
2419
2420         * UIProcess/API/mac/WKView.mm:
2421         (-[WKView initWithFrame:pageNamespaceRef:]):
2422         Call setIsInWindow.
2423
2424         (-[WKView _updateVisibility]):
2425         Call setIsInWindow.
2426
2427         * UIProcess/WebPageProxy.cpp:
2428         (WebKit::WebPageProxy::WebPageProxy):
2429         Initialize m_isInWindow.
2430
2431         (WebKit::WebPageProxy::setIsInWindow):
2432         Send WebPageMessage::SetIsInWindow.
2433
2434         * UIProcess/WebPageProxy.h:
2435         * WebProcess/WebPage/WebPage.cpp:
2436         (WebKit::WebPage::setIsInWindow):
2437         Call Page::canStartMedia.
2438
2439         (WebKit::WebPage::didReceiveMessage):
2440         Handle the SetIsInWindow message.
2441
2442         * WebProcess/WebPage/WebPage.h:
2443
2444 2010-07-10  Anders Carlsson  <andersca@apple.com>
2445
2446         Reviewed by Dan Bernstein.
2447
2448         Reuse initialized NetscapePluginModules, pass parameters to NPP_New
2449         https://bugs.webkit.org/show_bug.cgi?id=42028
2450
2451         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2452         (WebKit::NetscapePlugin::NetscapePlugin):
2453         Let the plug-in module know that a plug-in has been created.
2454
2455         (WebKit::NetscapePlugin::~NetscapePlugin):
2456         Let the plug-in module know that a plug-in has been destroyed.
2457
2458         (WebKit::NetscapePlugin::initialize):
2459         Pass the MIME type and parameters to the plug-in.
2460
2461         * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
2462         (WebKit::initializedNetscapePluginModules):
2463         Add list of initialized plug-in modules.
2464
2465         (WebKit::NetscapePluginModule::NetscapePluginModule):
2466         Initialize m_pluginCount to 0.
2467
2468         (WebKit::NetscapePluginModule::~NetscapePluginModule):
2469         Assert that we're not in the list of initialized plug-ins.
2470
2471         (WebKit::NetscapePluginModule::pluginCreated):
2472         Increment the plug-in count.
2473
2474         (WebKit::NetscapePluginModule::pluginDestroyed):
2475         Decrement the plug-in count and call shutdown if it's 0.
2476
2477         (WebKit::NetscapePluginModule::shutdown):
2478         Call NP_Shutdown and remove the plug-in from the list of initialized plug-ins.
2479
2480         (WebKit::NetscapePluginModule::getOrCreate):
2481         Look for an already initialized plug-in module before creating one.
2482
2483         (WebKit::NetscapePluginModule::load):
2484         Set m_isInitialized to true.
2485
2486         * WebProcess/Plugins/Netscape/mac/NetscapePluginModuleMac.cpp:
2487         (WebKit::NetscapePluginModule::unload):
2488         Leak the CFBundleRef to avoid possible crashes.
2489
2490         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2491         (WebKit::WebFrameLoaderClient::createPlugin):
2492         Call getOrCreate instead of create.
2493
2494 2010-07-09  Leon Clarke  <leonclarke@google.com>
2495
2496         Reviewed by Adam Barth.
2497
2498         add support for link prefetching
2499         https://bugs.webkit.org/show_bug.cgi?id=3652
2500
2501         * Configurations/FeatureDefines.xcconfig:
2502
2503 2010-07-09  Anders Carlsson  <andersca@apple.com>
2504
2505         Reviewed by Sam Weinig and Dan Bernstein.
2506
2507         Handle setting of drawing and event models
2508         https://bugs.webkit.org/show_bug.cgi?id=41994
2509
2510         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2511         Handle NPPVpluginDrawingModel and NPPVpluginEventModel.
2512
2513         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2514         (WebKit::NetscapePlugin::NetscapePlugin):
2515         Initialize m_inNPPNew.
2516
2517         (WebKit::NetscapePlugin::~NetscapePlugin):
2518         Assert that we aren't still running.
2519
2520         (WebKit::NetscapePlugin::fromNPP):
2521         New function that returns a NetscapePlugin object given a NPP pointer.
2522
2523         (WebKit::NetscapePlugin::initialize):
2524         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.cpp:
2525         (WebKit::NetscapePlugin::setDrawingModel):
2526         Set the drawing model.
2527
2528         (WebKit::NetscapePlugin::setEventModel):
2529         Set the event model.
2530
2531         (WebKit::initializeEvent):
2532         (WebKit::NetscapePlugin::platformPaint):
2533         Only send the Cocoa event when using the Cocoa event model.
2534
2535 2010-07-09  Sam Weinig  <sam@webkit.org>
2536
2537         Reviewed by Anders Carlsson.
2538
2539         Patch for https://bugs.webkit.org/show_bug.cgi?id=41971
2540         Add really basic BackForwardList support.
2541
2542         * Shared/CoreIPCSupport/WebPageMessageKinds.h:
2543         (WebPageMessage::):
2544         Add new message kind.
2545
2546         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2547         (WebPageProxyMessage::):
2548         Add new message kinds. Remove DidChangeCanGoBack and DidChangeCanGoForward.
2549
2550         * UIProcess/API/C/WKPage.cpp:
2551         (WKPageGoToBackForwardListItem):
2552         * UIProcess/API/C/WKPage.h:
2553         Add function to initiate a navigation to a BackForward item.  The
2554         BackForward list will be updated to use this as the current item
2555         asynchronously. 
2556
2557         * UIProcess/WebBackForwardList.cpp:
2558         (WebKit::WebBackForwardList::WebBackForwardList):
2559         (WebKit::WebBackForwardList::addItem): Added.
2560         (WebKit::WebBackForwardList::goToItem): Added.
2561         (WebKit::WebBackForwardList::itemAtIndex): Added.
2562         (WebKit::WebBackForwardList::backListCount): Changed to return int matching WebCore.
2563         (WebKit::WebBackForwardList::forwardListCount): Ditto.
2564         (WebKit::WebBackForwardList::backListWithLimit): Add cast to int.
2565         (WebKit::WebBackForwardList::forwardListWithLimit): Ditto.
2566         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit): Ditto.
2567         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit): Ditto.
2568         * UIProcess/WebBackForwardList.h:
2569
2570         * UIProcess/WebBackForwardListItem.cpp:
2571         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
2572         * UIProcess/WebBackForwardListItem.h:
2573         (WebKit::WebBackForwardListItem::create):
2574         (WebKit::WebBackForwardListItem::itemID):
2575         Added itemID.
2576
2577         * UIProcess/WebPageProxy.cpp:
2578         (WebKit::WebPageProxy::WebPageProxy):
2579         (WebKit::WebPageProxy::close):
2580         (WebKit::WebPageProxy::canGoForward):
2581         (WebKit::WebPageProxy::canGoBack):
2582         (WebKit::WebPageProxy::goToBackForwardItem):
2583         (WebKit::WebPageProxy::didReceiveMessage):
2584         (WebKit::WebPageProxy::didReceiveSyncMessage):
2585         (WebKit::WebPageProxy::addItemToBackForwardList):
2586         (WebKit::WebPageProxy::goToItemInBackForwardList):
2587         (WebKit::WebPageProxy::processDidExit):
2588         * UIProcess/WebPageProxy.h:
2589         - Removed m_canGoBack and m_canGoForward booleans and instead use the BackForwardList.
2590         - Forward goToBackForwardItem to the WebProcess.
2591         - Respond to messages from the WebBackForwardListProxy in the WebProcess,
2592           forwarding to the WebBackForwardList.
2593
2594         * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp:
2595         (WebKit::WebBackForwardControllerClient::createBackForwardList):
2596         Start using a WebBackForwardListProxy instead of a BackForwardListImpl.
2597
2598         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2599         (WebKit::WebFrameLoaderClient::dispatchDidAddBackForwardItem):
2600         (WebKit::WebFrameLoaderClient::dispatchDidRemoveBackForwardItem):
2601         (WebKit::WebFrameLoaderClient::dispatchDidChangeBackForwardIndex):
2602         Remove calls backForwardListDidChange() now that we communicate much more
2603         information than just this state.
2604
2605         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2606         (WebKit::idToHistoryItemMap):
2607         (WebKit::historyItemToIDMap):
2608         (WebKit::generateHistoryItemID):
2609         (WebKit::getIDForHistoryItem):
2610         (WebKit::WebBackForwardListProxy::itemForID):
2611         Add leaking cached maps of HistoryItems to IDs, the life time of these
2612         objects will be improved in a subsequent patch.
2613
2614         (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
2615         (WebKit::WebBackForwardListProxy::addItem):
2616         (WebKit::WebBackForwardListProxy::goBack):
2617         (WebKit::WebBackForwardListProxy::goForward):
2618         (WebKit::WebBackForwardListProxy::goToItem):
2619         (WebKit::WebBackForwardListProxy::backItem):
2620         (WebKit::WebBackForwardListProxy::currentItem):
2621         (WebKit::WebBackForwardListProxy::forwardItem):
2622         (WebKit::WebBackForwardListProxy::itemAtIndex):
2623         (WebKit::WebBackForwardListProxy::backListWithLimit):
2624         (WebKit::WebBackForwardListProxy::forwardListWithLimit):
2625         (WebKit::WebBackForwardListProxy::capacity):
2626         (WebKit::WebBackForwardListProxy::setCapacity):
2627         (WebKit::WebBackForwardListProxy::enabled):
2628         (WebKit::WebBackForwardListProxy::setEnabled):
2629         (WebKit::WebBackForwardListProxy::backListCount):
2630         (WebKit::WebBackForwardListProxy::forwardListCount):
2631         (WebKit::WebBackForwardListProxy::containsItem):
2632         (WebKit::WebBackForwardListProxy::close):
2633         (WebKit::WebBackForwardListProxy::closed):
2634         (WebKit::WebBackForwardListProxy::removeItem):
2635         (WebKit::WebBackForwardListProxy::entries):
2636         (WebKit::WebBackForwardListProxy::pushStateItem):
2637         * WebProcess/WebPage/WebBackForwardListProxy.h:
2638         Forward functions to the UIProcess.
2639
2640         * WebProcess/WebPage/WebPage.cpp:
2641         (WebKit::WebPage::goToBackForwardItem):
2642         (WebKit::WebPage::didReceiveMessage):
2643         * WebProcess/WebPage/WebPage.h:
2644         Respond to GoToBackForwardItem message.
2645
2646         * mac/WebKit2.exp: Add new API function.
2647
2648 2010-07-09  Anders Carlsson  <andersca@apple.com>
2649
2650         Reviewed by Sam Weinig.
2651
2652         Verify drawing coordinates, add crude painting support
2653         https://bugs.webkit.org/show_bug.cgi?id=41984
2654     
2655         * WebKit2.xcodeproj/project.pbxproj:
2656         Add NetscapePluginMac.cpp.
2657
2658         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2659         (WebKit::NetscapePlugin::NetscapePlugin):
2660         Initialize drawing and event models.
2661
2662         (WebKit::NetscapePlugin::initialize):
2663         Call platformPostInitialize.
2664
2665         (WebKit::NetscapePlugin::destroy):
2666         Call NPP_Destroy.
2667
2668         (WebKit::NetscapePlugin::paint):
2669         Call platformPaint.
2670
2671         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2672         Add member functions.
2673
2674         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.cpp: Added.
2675         (WebKit::NetscapePlugin::platformPostInitialize):
2676         Set default event and drawing models and verify that they are compatible.
2677         
2678         (WebKit::NetscapePlugin::platformPaint):
2679         Send a paint event (assuming the Cocoa event model currently).
2680
2681         * WebProcess/Plugins/PluginView.cpp:
2682         (WebKit::PluginView::paint):
2683         Change the paint rect to be in window coordinates.
2684
2685         (WebKit::PluginView::viewGeometryDidChange):
2686         (WebKit::PluginView::clipRectInWindowCoordinates):
2687         * WebProcess/Plugins/PluginView.h:
2688
2689 2010-07-09  Anders Carlsson  <andersca@apple.com>
2690
2691         Reviewed by Sam Weinig.
2692
2693         Pass a clip rect to the plugin and call NPP_SetWindow
2694         https://bugs.webkit.org/show_bug.cgi?id=41969
2695
2696         * WebProcess/Plugins/DummyPlugin.cpp:
2697         (WebKit::DummyPlugin::geometryDidChange):
2698         * WebProcess/Plugins/DummyPlugin.h:
2699         Add clip rect parameter.
2700
2701         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2702         (WebKit::NetscapePlugin::NetscapePlugin):
2703         Initialize m_npWindow.
2704
2705         (WebKit::NetscapePlugin::callSetWindow):
2706         Call NPP_SetWindow.
2707
2708         (WebKit::NetscapePlugin::initialize):
2709         Set the window type to NPWindowTypeDrawable for now.
2710
2711         (WebKit::NetscapePlugin::geometryDidChange):
2712         Update the frame and clip rects and call NPP_SetWindow.
2713
2714         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2715         Add an NPWindow member variable.
2716
2717         * WebProcess/Plugins/Plugin.h:
2718         Add a clipRect parameter to geometryDidChange.
2719
2720         * WebProcess/Plugins/PluginView.cpp:
2721         (WebKit::PluginView::PluginView):
2722         Add the plug-in element to the constructor.
2723         
2724         (WebKit::PluginView::viewGeometryDidChange):
2725         Compute the clip rect and pass it to the plug-in.
2726
2727         * WebProcess/Plugins/PluginView.h:
2728         (WebKit::PluginView::create):
2729         Pass the plug-in element to the constructor.
2730
2731         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2732         (WebKit::WebFrameLoaderClient::createPlugin):
2733         Pass the plug-in element to PluginView::create.
2734
2735 2010-07-09  Anders Carlsson  <andersca@apple.com>
2736
2737         Reviewed by Simon Fraser.
2738
2739         Instantiate Netscape plug-ins, pass geometry information to Plugin
2740         https://bugs.webkit.org/show_bug.cgi?id=41960
2741
2742         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2743         Handle NPNVsupportsCoreGraphicsBool and NPNVsupportsCocoaBool.
2744
2745         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2746         (WebKit::NetscapePlugin::NetscapePlugin):
2747         Set npp.ndata.
2748
2749         (WebKit::NetscapePlugin::initialize):
2750         Try to instantiate the plug-in by calling NPP_New.
2751
2752         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2753         Store the NetscapePluginModule and the NPP struct.
2754
2755         * WebProcess/Plugins/Netscape/NetscapePluginModule.h:
2756         Add a getter for the NPPluginFuncs vtable.
2757
2758         * WebProcess/Plugins/PluginView.cpp:
2759         (WebKit::PluginView::frameRectsChanged):
2760         Make sure to call viewGeometryDidChange.
2761
2762         (WebKit::PluginView::setParent):
2763         Ditto.
2764
2765         (WebKit::PluginView::viewGeometryDidChange):
2766         Convert the frame rect to window coordinates and pass it to the plug-in.
2767
2768         * WebProcess/Plugins/PluginView.h:
2769         Add function declarations.
2770
2771 2010-07-08  Diego Gonzalez  <diegohcg@webkit.org>
2772
2773         Reviewed by Kenneth Rohde Christiansen.
2774
2775         [Qt] [WebKit2] Make QWKPage call _q_webActionTriggered as a private slot
2776         https://bugs.webkit.org/show_bug.cgi?id=41880
2777
2778         * UIProcess/API/qt/qwkpage.cpp:
2779         * UIProcess/API/qt/qwkpage.h:
2780
2781 2010-07-09  Antti Koivisto  <koivisto@iki.fi>
2782
2783         Not reviewed.
2784
2785         Build fix.
2786
2787         * UIProcess/API/qt/qwkpage.h:
2788
2789 2010-07-08  Brian Weinstein  <bweinstein@apple.com>
2790
2791         WebKit2 build fix for Windows.
2792
2793         * WebProcess/Plugins/PluginView.h: Change the forward declaration of Plugin
2794             to an include.
2795         * win/WebKit2.vcproj: Update the include paths for Release to match Debug, and
2796             add some files to the vcproj that were added on Mac.
2797
2798 2010-07-08  Sam Weinig  <sam@webkit.org>
2799
2800         Attempt to fix the windows build.
2801
2802         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2803         (WebKit::WebFrameLoaderClient::createPlugin):
2804
2805 2010-07-08  Anders Carlsson  <andersca@apple.com>
2806
2807         Reviewed by Sam Weinig.
2808
2809         Add NetscapePlugin class
2810         https://bugs.webkit.org/show_bug.cgi?id=41919
2811
2812         * WebKit2.xcodeproj/project.pbxproj:
2813         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Added.
2814         (WebKit::NetscapePlugin::NetscapePlugin):
2815         (WebKit::NetscapePlugin::~NetscapePlugin):
2816         (WebKit::NetscapePlugin::initialize):
2817         (WebKit::NetscapePlugin::destroy):
2818         (WebKit::NetscapePlugin::paint):
2819         (WebKit::NetscapePlugin::geometryDidChange):
2820         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added.
2821         (WebKit::NetscapePlugin::create):
2822         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2823         (WebKit::WebFrameLoaderClient::createPlugin):
2824
2825 2010-07-08  Anders Carlsson  <andersca@apple.com>
2826
2827         Reviewed by Sam Weinig.
2828
2829         Enable notImplemented messages by default and have the various clients explicitly disable them.
2830
2831         * Shared/NotImplemented.h:
2832         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2833         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2834         * WebProcess/WebCoreSupport/WebDragClient.cpp:
2835         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2836         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2837         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2838
2839 2010-07-08  Anders Carlsson  <andersca@apple.com>
2840
2841         Reviewed by Sam Weinig.
2842
2843         Add stubbed out NPN functions
2844         https://bugs.webkit.org/show_bug.cgi?id=41917
2845
2846         * WebKit2.xcodeproj/project.pbxproj:
2847         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: Added.
2848         (WebKit::initializeBrowserFuncs):
2849         (WebKit::netscapeBrowserFuncs):
2850         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h: Added.
2851         * WebProcess/Plugins/Netscape/mac/NetscapePluginModuleMac.cpp:
2852         (WebKit::NetscapePluginModule::tryLoad):
2853
2854 2010-07-08  Anders Carlsson  <andersca@apple.com>
2855
2856         Fix Windows build.
2857
2858         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2859
2860 2010-07-08  Luiz Agostini  <luiz.agostini@openbossa.org>
2861
2862         Reviewed by Kenneth Rohde Christiansen.
2863
2864         [Qt] Spelling and style correction
2865         https://bugs.webkit.org/show_bug.cgi?id=41891
2866
2867         Correcting a spelling and a style mistakes.
2868
2869         * UIProcess/Launcher/ProcessLauncher.h:
2870         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2871
2872 2010-07-08  Anders Carlsson  <andersca@apple.com>
2873
2874         Reviewed by Sam Weinig.
2875
2876         Implement more of NetscapePluginModule
2877         https://bugs.webkit.org/show_bug.cgi?id=41910
2878
2879         * WebKit2.xcodeproj/project.pbxproj:
2880         * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
2881         (WebKit::NetscapePluginModule::create):
2882         (WebKit::NetscapePluginModule::load):
2883         * WebProcess/Plugins/Netscape/NetscapePluginModule.h:
2884         * WebProcess/Plugins/Netscape/mac/NetscapePluginModuleMac.cpp: Added.
2885         (WebKit::NetscapePluginModule::unload):
2886         (WebKit::pointerToFunction):
2887         (WebKit::NetscapePluginModule::tryLoad):
2888         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2889         (WebKit::WebFrameLoaderClient::createPlugin):
2890
2891 2010-07-08  Anders Carlsson  <andersca@apple.com>
2892
2893         Reviewed by Sam Weinig.
2894
2895         Add stubbed out NetscapePluginModule class
2896         https://bugs.webkit.org/show_bug.cgi?id=41901
2897
2898         * WebKit2.xcodeproj/project.pbxproj:
2899         * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp: Added.
2900         (WebKit::NetscapePluginModule::NetscapePluginModule):
2901         * WebProcess/Plugins/Netscape/NetscapePluginModule.h: Added.
2902         (WebKit::NetscapePluginModule::create):
2903         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2904         (WebKit::WebFrameLoaderClient::createPlugin):
2905
2906 2010-07-08  Luiz Agostini  <luiz.agostini@openbossa.org>
2907
2908         Reviewed by Kenneth Rohde Christiansen.
2909
2910         [Qt] Move socket objects to connection's thread
2911         https://bugs.webkit.org/show_bug.cgi?id=41897
2912
2913         To receive network related notifications in the WorkQueue thread, the
2914         QLocalSocket instances must be moved to that thread.
2915
2916         * Platform/CoreIPC/qt/ConnectionQt.cpp:
2917         (CoreIPC::Connection::open):
2918         * Platform/WorkQueue.h:
2919         * Platform/qt/WorkQueueQt.cpp:
2920         (WorkQueue::moveSocketToWorkThread):
2921
2922 2010-07-08  Alice Liu  <alice.liu@apple.com>
2923
2924         Reviewed by Sam Weinig.
2925
2926         https://bugs.webkit.org/show_bug.cgi?id=41653
2927         Add new WebKitTestRunner project for Windows
2928
2929         * win/WebKit2Generated.make: Add files needed for WebKitTestRunner
2930
2931 2010-07-08  Anders Carlsson  <andersca@apple.com>
2932
2933         Reviewed by Sam Weinig.
2934
2935         Add a GetPluginHostConnection WebProcessProxy message
2936         https://bugs.webkit.org/show_bug.cgi?id=41893
2937         
2938         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
2939         (WebProcessProxyMessage::):
2940         * UIProcess/WebProcessProxy.cpp:
2941         (WebKit::WebProcessProxy::getPluginHostConnection):
2942         (WebKit::WebProcessProxy::didReceiveMessage):
2943         (WebKit::WebProcessProxy::didReceiveSyncMessage):
2944         * UIProcess/WebProcessProxy.h:
2945         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2946         (WebKit::WebFrameLoaderClient::createPlugin):
2947
2948 2010-07-08  Anders Carlsson  <andersca@apple.com>
2949
2950         Reviewed by Sam Weinig.
2951
2952         Add more parameters to Plugin::initialize
2953         https://bugs.webkit.org/show_bug.cgi?id=41890
2954
2955         * WebProcess/Plugins/DummyPlugin.cpp:
2956         (WebKit::DummyPlugin::initialize):
2957         * WebProcess/Plugins/DummyPlugin.h:
2958         * WebProcess/Plugins/Plugin.h:
2959         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2960         (WebKit::WebFrameLoaderClient::createPlugin):
2961
2962 2010-07-08  Anders Carlsson  <andersca@apple.com>
2963
2964         Fix build.
2965
2966         * WebProcess/Plugins/DummyPlugin.h:
2967
2968 2010-07-08  Anders Carlsson  <andersca@apple.com>
2969
2970         Reviewed by Sam Weinig.
2971
2972         Add a Plugin abstract base class and a DummyPlugin that implements it
2973         https://bugs.webkit.org/show_bug.cgi?id=41885
2974
2975         * WebKit2.xcodeproj/project.pbxproj:
2976         Add files.
2977
2978         * WebProcess/Plugins/DummyPlugin.cpp: Added.
2979         (WebKit::DummyPlugin::paint):
2980         Paint a red rectangle.
2981         
2982         * WebProcess/Plugins/Plugin.cpp: Added.
2983         * WebProcess/Plugins/Plugin.h: Added.
2984         Add Plugin, an abstract baseclass.
2985
2986         * WebProcess/Plugins/PluginView.cpp:
2987         (WebKit::PluginView::PluginView):
2988         (WebKit::PluginView::~PluginView):
2989         (WebKit::PluginView::paint):
2990         (WebKit::PluginView::viewGeometryDidChange):
2991         * WebProcess/Plugins/PluginView.h:
2992         (WebKit::PluginView::create):
2993         Add a Plugin member function and forward PluginView calls to it.
2994
2995         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2996         (WebKit::WebFrameLoaderClient::createPlugin):
2997         Make a DummyPlugin and pass it to the PluginView.
2998
2999         * win/WebKit2.vcproj:
3000         Add files.
3001         
3002 2010-07-08  Anders Carlsson  <andersca@apple.com>
3003
3004         Reviewed by Sam Weinig.
3005
3006         Add stubbed out PluginView class
3007         https://bugs.webkit.org/show_bug.cgi?id=41879
3008
3009         * WebKit2.xcodeproj/project.pbxproj:
3010         Add PluginView.cpp and PluginView.h
3011
3012         * WebProcess/Plugins/PluginView.cpp: Added.
3013         (WebKit::PluginView::PluginView):
3014         (WebKit::PluginView::~PluginView):
3015         (WebKit::PluginView::setFrameRect):
3016         (WebKit::PluginView::paint):
3017         (WebKit::PluginView::viewGeometryDidChange):
3018         (WebKit::PluginView::invalidateRect):
3019         Stub out these functions.
3020
3021         * WebProcess/Plugins/PluginView.h: Added.
3022         (WebKit::PluginView::create):
3023         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3024         (WebKit::WebFrameLoaderClient::createPlugin):
3025         Create a plug-in view.
3026         
3027         * win/WebKit2.vcproj:
3028         Add PluginView.cpp and PluginView.h.
3029
3030 2010-07-08  Steve Falkenburg  <sfalken@apple.com>
3031
3032         Reviewed by Adam Roben.
3033
3034         WebKit2 on Windows needs a version resource
3035         https://bugs.webkit.org/show_bug.cgi?id=41870
3036         <rdar://problem/8170501>
3037
3038         * win/WebKit2.rc: Added.
3039         * win/WebKit2.vcproj:
3040         * win/WebKit2WebProcess.rc: Added.
3041         * win/WebKit2WebProcess.vcproj:
3042
3043 2010-07-08  Sam Weinig  <sam@webkit.org>
3044
3045         Reviewed by Anders Carlsson.
3046
3047         Patch for https://bugs.webkit.org/show_bug.cgi?id=41874
3048         Add stubbed out WebBackForwardListProxy
3049
3050         - No behavior change.
3051         - Rename the old WebBackForwardListProxy to WebBackForwardList since it
3052           will be the implementation, not the proxy.
3053
3054         * UIProcess/API/C/WKAPICast.h:
3055         * UIProcess/API/C/WKBackForwardList.cpp:
3056         * UIProcess/API/C/WKPage.cpp:
3057         * UIProcess/WebBackForwardList.cpp: Copied from UIProcess/WebBackForwardListProxy.cpp.
3058         * UIProcess/WebBackForwardList.h: Copied from UIProcess/WebBackForwardListProxy.h.
3059         (WebKit::WebBackForwardList::create):
3060         * UIProcess/WebBackForwardListProxy.cpp: Removed.
3061         * UIProcess/WebBackForwardListProxy.h: Removed.
3062         * UIProcess/WebPageProxy.cpp:
3063         (WebKit::WebPageProxy::WebPageProxy):
3064         * UIProcess/WebPageProxy.h:
3065         (WebKit::WebPageProxy::backForwardList):
3066         * WebKit2.xcodeproj/project.pbxproj:
3067         * WebProcess/WebPage/WebBackForwardListProxy.cpp: Added.
3068         * WebProcess/WebPage/WebBackForwardListProxy.h: Added.
3069         (WebKit::WebBackForwardListProxy::create):
3070         * win/WebKit2.vcproj:
3071
3072 2010-07-08  Sam Weinig  <sam@webkit.org>
3073
3074         Reviewed by Anders Carlsson.
3075
3076         Pass Page to BackForwardControllerClient::createBackForwardList since it
3077         may be called before implementations of BackForwardControllerClient have
3078         access to a Page.
3079
3080         * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp:
3081         (WebKit::WebBackForwardControllerClient::createBackForwardList):
3082         * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h:
3083
3084 2010-07-08  Anders Carlsson  <andersca@apple.com>
3085
3086         Reviewed by Sam Weinig.
3087
3088         Fix fallout from Darin's adoptRef assertion changes.
3089
3090         * UIProcess/WebContext.cpp:
3091         (WebKit::WebContext::sharedProcessContext):
3092         (WebKit::WebContext::sharedThreadContext):
3093         * WebProcess/WebPage/WebFrame.cpp:
3094         (WebKit::WebFrame::createMainFrame):
3095         (WebKit::WebFrame::createSubframe):
3096         (WebKit::WebFrame::create):
3097         (WebKit::WebFrame::WebFrame):
3098         * WebProcess/WebPage/WebFrame.h:
3099
3100 2010-07-08  Steve Falkenburg  <sfalken@apple.com>
3101
3102         Reviewed by Mark Rowe.
3103
3104         WebKit2 should enable DEP (Data Execution Prevention) on Windows via /NXCOMPAT
3105         https://bugs.webkit.org/show_bug.cgi?id=41837
3106         <rdar://problem/8170505>
3107
3108         * win/WebKit2WebProcess.vcproj:
3109
3110 2010-07-08  Sam Weinig  <sam@webkit.org>
3111
3112         Reviewed by Anders Carlsson.
3113
3114         Patch for https://bugs.webkit.org/show_bug.cgi?id=41826
3115         Convert BackForwardList to an abstract base class and add BackForwardListImpl
3116         as the concrete implementation of it.
3117
3118         * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp:
3119         (WebKit::WebBackForwardControllerClient::createBackForwardList):
3120
3121 2010-07-08  Luiz Agostini  <luiz@webkit.org>, Kenneth Rohde Christiansen <kenneth@webkit.org>
3122
3123         Reviewed by Antti Koivisto.
3124
3125         [Qt] Improve QtWebkit2 secondary process launching procedure
3126         https://bugs.webkit.org/show_bug.cgi?id=41853
3127
3128         Changing secondary process launching procedure to make sure that the method
3129         ProcessLauncher::didFinishLaunchingProcess will only be called after secondary
3130         process has been launched and the connection has been stablished between the
3131         UIProcess and WebProcess.
3132
3133         This solves the timing issues ocasionaly observed when launching MiniBrowser.
3134
3135         QLocalServer object and related code has been removed from the class Connection.
3136         Server instances of the Connection class now get the QLocalSocket via ProcessLauncher.
3137
3138         * Platform/CoreIPC/Connection.h:
3139         * Platform/CoreIPC/qt/ConnectionQt.cpp:
3140         (CoreIPC::Connection::platformInitialize):
3141         (CoreIPC::Connection::platformInvalidate):
3142         (CoreIPC::Connection::open):
3143
3144         Using QProcess* as PlatformProcessIdentifier.
3145
3146         * Platform/PlatformProcessIdentifier.h:
3147
3148         A new singleton class named ProcessLauncherHelper was created to handle the QLocalServer
3149         object used to receive connections. This class launches the process and waits for it to connect
3150         before calling ProcessLauncher::didFinishLaunchingProcess.
3151
3152         * UIProcess/Launcher/ProcessLauncher.h:
3153         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3154         (WebKit::ProcessLauncherHelper::launch):
3155         (WebKit::ProcessLauncherHelper::takePendingConnection):
3156         (WebKit::ProcessLauncherHelper::ProcessLauncherHelper):
3157         (WebKit::ProcessLauncherHelper::instance):
3158         (WebKit::ProcessLauncherHelper::newConnection):
3159         (WebKit::ProcessLauncher::launchProcess):
3160         (WebKit::ProcessLauncher::terminateProcess):
3161         (_qt_takePendingConnection):
3162
3163 2010-07-08  Antti Koivisto  <koivisto@iki.fi>
3164
3165         Reviewed by Kenneth Rohde Christiansen.
3166
3167         [Qt] Initial WebKit2 implementation
3168         https://bugs.webkit.org/show_bug.cgi?id=40233
3169     
3170         Random build fixes.
3171
3172         * Shared/qt/WebEventFactoryQt.cpp:
3173         * UIProcess/API/qt/ClientImpl.cpp:
3174         * UIProcess/API/qt/qwkpage.cpp:
3175         * UIProcess/API/qt/qwkpage.h:
3176         * UIProcess/DrawingAreaProxy.h:
3177         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
3178         * WebProcess/WebProcess.cpp:
3179
3180 2010-07-07  Zoltan Horvath  <zoltan@webkit.org>
3181
3182         Reviewed by Kenneth Rohde Christiansen.
3183
3184         [Qt] Terminate QtWebProcess on exit
3185         https://bugs.webkit.org/show_bug.cgi?id=41766
3186
3187         Call WKPageTerminate to terminate QtWebProcess on exit.
3188
3189         * UIProcess/API/qt/qwkpage.cpp:
3190         (QWKPage::~QWKPage):
3191
3192 2010-07-07  Steve Falkenburg  <sfalken@apple.com>
3193
3194         Windows release build fix.
3195         Don't generate public symbols since this is exceeding address space on our builders.
3196
3197         * win/WebKit2.vcproj:
3198
3199 2010-07-07  Sam Weinig  <sam@webkit.org>
3200
3201         Reviewed by Anders Carlsson.
3202
3203         Patch for https://bugs.webkit.org/show_bug.cgi?id=41772
3204         Add basic piping for BackForwardControllerClient.
3205
3206         - Add very basic WebBackForwardControllerClient.
3207
3208         * WebKit2.xcodeproj/project.pbxproj:
3209         * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp: Added.
3210         (WebKit::WebBackForwardControllerClient::backForwardControllerDestroyed):
3211         (WebKit::WebBackForwardControllerClient::createBackForwardList):
3212         * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h: Added.
3213         (WebKit::WebBackForwardControllerClient::WebBackForwardControllerClient):
3214         * WebProcess/WebPage/WebPage.cpp:
3215         (WebKit::WebPage::WebPage):
3216         * win/WebKit2.vcproj:
3217
3218 2010-07-07  Antti Koivisto  <koivisto@iki.fi>
3219
3220         Reviewed by Kenneth Rohde Christiansen.
3221
3222         [Qt] Initial WebKit2 implementation
3223         https://bugs.webkit.org/show_bug.cgi?id=40233
3224         
3225         Add Qt section to the prefix header.
3226
3227         * WebKit2Prefix.h:
3228
3229 2010-07-07  Antti Koivisto  <koivisto@iki.fi>
3230
3231         Not reviewed.
3232
3233         Fix build, remove some left over debugging code.
3234
3235         * Platform/CoreIPC/qt/ConnectionQt.cpp:
3236         (CoreIPC::Connection::readyReadHandler):
3237         (CoreIPC::Connection::sendOutgoingMessage):
3238
3239 2010-07-07  Antti Koivisto  <koivisto@iki.fi>
3240
3241         Reviewed by Kenneth Rohde Christiansen.
3242
3243         [Qt] Initial WebKit2 implementation
3244         https://bugs.webkit.org/show_bug.cgi?id=40233
3245         
3246         Implement WebPage for Qt.
3247
3248         * WebProcess/WebPage/qt/WebPageQt.cpp: Added.
3249         (WebKit::WebPage::platformInitialize):
3250         (WebKit::):
3251         (WebKit::WebPage::interpretKeyEvent):
3252
3253
3254 2010-07-06  Anders Carlsson  <andersca@apple.com>
3255
3256         Fix Windows WebKit2 build.
3257
3258         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
3259         (WebKit::PluginInfoStore::mimeTypeFromExtension):
3260
3261 2010-07-06  Anders Carlsson  <andersca@apple.com>
3262
3263         Reviewed by Sam Weinig.
3264
3265         Add PluginInfoStore::findPlugin
3266         https://bugs.webkit.org/show_bug.cgi?id=41719
3267
3268         * UIProcess/Plugins/PluginInfoStore.cpp:
3269         (WebKit::PluginInfoStore::getPlugins):
3270         (WebKit::PluginInfoStore::findPluginForMIMEType):
3271         (WebKit::PluginInfoStore::findPluginForExtension):
3272         (WebKit::pathExtension):
3273         (WebKit::PluginInfoStore::findPlugin):
3274         * UIProcess/Plugins/PluginInfoStore.h:
3275         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3276         (WebKit::PluginInfoStore::mimeTypeFromExtension):
3277
3278 2010-07-06  Sam Weinig  <sam@webkit.org>
3279
3280         Reviewed by Anders Carlsson.
3281
3282         Add injected bundle API for exposing console messages.
3283
3284         - Split WKBundlePageClient into multiple clients matching WKPage.
3285           (For now we only have a loader client and a UI client)
3286
3287         * WebKit2.xcodeproj/project.pbxproj:
3288         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3289         (WKBundlePageSetLoaderClient):
3290         (WKBundlePageSetUIClient):
3291         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3292         * WebProcess/InjectedBundle/InjectedBundlePageClient.cpp: Removed.
3293         * WebProcess/InjectedBundle/InjectedBundlePageClient.h: Removed.
3294         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: Copied from WebProcess/InjectedBundle/InjectedBundlePageClient.cpp.
3295         (WebKit::InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient):
3296         (WebKit::InjectedBundlePageLoaderClient::initialize):
3297         (WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
3298         (WebKit::InjectedBundlePageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
3299         (WebKit::InjectedBundlePageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
3300         (WebKit::InjectedBundlePageLoaderClient::didCommitLoadForFrame):
3301         (WebKit::InjectedBundlePageLoaderClient::didFinishLoadForFrame):
3302         (WebKit::InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame):
3303         (WebKit::InjectedBundlePageLoaderClient::didReceiveTitleForFrame):
3304         (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
3305         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: Copied from WebProcess/InjectedBundle/InjectedBundlePageClient.h.
3306         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Added.
3307         (WebKit::InjectedBundlePageUIClient::InjectedBundlePageUIClient):
3308         (WebKit::InjectedBundlePageUIClient::initialize):
3309         (WebKit::InjectedBundlePageUIClient::addMessageToConsole):
3310         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Added.
3311         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3312         (WebKit::WebChromeClient::addMessageToConsole):
3313         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3314         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
3315         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3316         (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
3317         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
3318         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
3319         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
3320         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
3321         (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
3322         * WebProcess/WebPage/WebPage.cpp:
3323         (WebKit::WebPage::initializeInjectedBundleLoaderClient):
3324         (WebKit::WebPage::initializeInjectedBundleUIClient):
3325         * WebProcess/WebPage/WebPage.h:
3326         (WebKit::WebPage::injectedBundleLoaderClient):
3327         (WebKit::WebPage::injectedBundleUIClient):
3328         * mac/WebKit2.exp:
3329         * win/WebKit2.vcproj:
3330
3331 2010-07-06  Sam Weinig  <sam@webkit.org>
3332
3333         Reviewed by Anders Carlsson.
3334
3335         Patch for https://bugs.webkit.org/show_bug.cgi?id=41707
3336         Add ability to dump frame inner text for the test runner
3337
3338         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3339         (WKBundleFrameCopyInnerText):
3340         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3341         * WebProcess/WebPage/WebFrame.cpp:
3342         (WebKit::WebFrame::innerText):
3343         * WebProcess/WebPage/WebFrame.h:
3344         * mac/WebKit2.exp:
3345
3346 2010-07-06  Anders Carlsson  <andersca@apple.com>
3347
3348         Reviewed by Sam Weinig.
3349
3350         Only export a single WebKitMain function for the Web Process to call
3351         https://bugs.webkit.org/show_bug.cgi?id=41702
3352
3353         * Shared/CommandLine.h:
3354         Add windows CommandLine::parse overload.
3355
3356         * Shared/win/CommandLineWin.cpp: Added.
3357         (WebKit::CommandLine::parse):
3358         Move parse overload from WebProcess/win/WebProcessMain.cpp.
3359
3360         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
3361         (WebKit::ProcessLauncher::launchProcess):
3362         Pass the right mode to.
3363
3364         * WebKit2.xcodeproj/project.pbxproj:
3365         Update for moves.
3366         
3367         * WebProcess/Launching/mac/WebProcessMain.mm: Removed.
3368         * WebProcess/Launching/win/WebProcessWinMain.cpp: Removed.
3369         * WebProcess/WebKitMain.cpp: Added.
3370         (WebKitMain):
3371         (enableTerminationOnHeapCorruption):
3372         Add WebKitMain functions for Mac and Windows.
3373
3374         * WebProcess/WebProcessMain.h: Added.
3375         * WebProcess/mac/WebProcessMainMac.mm: Added.
3376         (WebKit::WebProcessMain):
3377         Add Mac version of WebProcessMain.
3378
3379         * WebProcess/win/WebProcessMain.cpp: Removed.
3380         * WebProcess/win/WebProcessMain.h: Removed.
3381         * WebProcess/win/WebProcessMainWin.cpp: Added.
3382         (WebKit::WebProcessMain):
3383         Add Windows version of WebProcessMain.
3384
3385         * mac/MainMac.cpp: Added.
3386         (main):
3387         Add Mac WebProcess main function.
3388
3389         * mac/WebKit2.exp:
3390         Remove functions that we don't need to export.
3391
3392         * win/MainWin.cpp: Added.
3393         (wWinMain):
3394         Add Windows WebProcess main function.
3395
3396         * win/WebKit2.vcproj:
3397         * win/WebKit2WebProcess.vcproj:
3398         Update for moves.
3399
3400 2010-07-05  Luiz Agostini  <luiz.agostini@openbossa.org>
3401
3402         Reviewed by Kenneth Rohde Christiansen.
3403
3404         [Qt] WebKit2 triple click
3405         https://bugs.webkit.org/show_bug.cgi?id=41629
3406
3407         QtWebkit2 triple click implementation.
3408
3409         * UIProcess/API/qt/qwkpage.cpp:
3410         (QWKPagePrivate::mousePressEvent):
3411         (QWKPagePrivate::mouseDoubleClickEvent):
3412         (QWKPage::timerEvent):
3413         * UIProcess/API/qt/qwkpage.h:
3414         * UIProcess/API/qt/qwkpage_p.h:
3415
3416 2010-07-05  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
3417
3418         Reviewed by Antti Koivisto.
3419
3420         [Qt] Initial WebKit2 implementation
3421         https://bugs.webkit.org/show_bug.cgi?id=40233
3422
3423         Add stubs
3424
3425         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp: Copied from WebKit2/UIProcess/Plugins/win/PluginInfoStoreWin.cpp.
3426         (WebKit::PluginInfoStore::pluginDirectories):
3427         (WebKit::PluginInfoStore::pluginPathsInDirectory):
3428         (WebKit::PluginInfoStore::getPluginInfo):
3429         (WebKit::PluginInfoStore::shouldUsePlugin):
3430         * WebProcess/InjectedBundle/InjectedBundle.h:
3431         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp: Added.
3432         (WebKit::InjectedBundle::load):
3433
3434 2010-07-05  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
3435
3436         Reviewed by Antti Koivisto.
3437
3438         [Qt] Initial WebKit2 implementation
3439         https://bugs.webkit.org/show_bug.cgi?id=40233
3440
3441         Add WebErrorsQt
3442
3443         * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp: Added.
3444         (WebKit::):
3445         (WebKit::cancelledError):
3446         (WebKit::blockedError):
3447         (WebKit::cannotShowURLError):
3448         (WebKit::interruptForPolicyChangeError):
3449         (WebKit::cannotShowMIMETypeError):
3450         (WebKit::fileDoesNotExistError):
3451
3452 2010-07-05  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
3453
3454         Reviewed by Antti Koivisto.
3455
3456         [Qt] Initial WebKit2 implementation
3457         https://bugs.webkit.org/show_bug.cgi?id=40233
3458
3459         Add Qt C API integration.
3460
3461         * UIProcess/API/cpp/qt/WKStringQt.cpp: Added.
3462         (WKStringCreateWithQString):
3463         (WKStringCopyQString):
3464         * UIProcess/API/cpp/qt/WKStringQt.h: Added.
3465         * UIProcess/API/cpp/qt/WKURLQt.cpp: Added.
3466         (WKURLCreateWithQUrl):
3467         (WKURLCopyQUrl):
3468         * UIProcess/API/cpp/qt/WKURLQt.h: Added.
3469
3470 2010-07-05  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
3471
3472         Reviewed by Antti Koivisto.
3473
3474         [Qt] Initial WebKit2 implementation
3475         https://bugs.webkit.org/show_bug.cgi?id=40233
3476
3477         Add the Qt process launcher.
3478
3479         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: Added.
3480         (WebKit::ProcessLauncher::launchProcess):
3481         (WebKit::ProcessLauncher::terminateProcess):
3482         (WebKit::webThreadBody):
3483         (WebKit::ProcessLauncher::createWebThread):
3484         (webProcessMain):
3485
3486 2010-07-05  Antti Koivisto  <koivisto@iki.fi>
3487
3488         Reviewed by Kenneth Rohde Christiansen.
3489
3490         [Qt] Initial WebKit2 implementation
3491         https://bugs.webkit.org/show_bug.cgi?id=40233
3492         
3493         Implement ChunkedUpdateDrawingArea + Proxy for Qt. Not built yet.
3494
3495         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
3496         * UIProcess/qt: Added.
3497         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: Added.
3498         (WebKit::ChunkedUpdateDrawingAreaProxy::page):
3499         (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
3500         (WebKit::ChunkedUpdateDrawingAreaProxy::invalidateBackingStore):
3501         (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
3502         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
3503         * WebProcess/WebPage/qt: Added.
3504         * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp: Added.
3505         (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
3506
3507 2010-07-04  Anders Carlsson  <andersca@apple.com>
3508
3509         Reviewed by Dan Bernstein.
3510
3511         Add simple command line parser and pass mode argument to the web process
3512         https://bugs.webkit.org/show_bug.cgi?id=41586
3513
3514         * Shared/CommandLine.h:
3515         (WebKit::CommandLine::operator[]):
3516         Add CommandLine class.
3517
3518         * Shared/mac/CommandLineMac.cpp:
3519         (WebKit::CommandLine::parse):
3520         Implement Mac version of CommandLine::parse.
3521
3522         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3523         (WebKit::ProcessLauncher::launchProcess):
3524         Add "legacywebprocess" mode to the posix_spawn call.
3525
3526         * WebKit2.xcodeproj/project.pbxproj:
3527         Add CommandLine to the xcode project.
3528
3529         * WebProcess/Launching/mac/WebProcessMain.mm:
3530         (webProcessMain):
3531         (main):
3532         Parse the command line and check the mode.
3533
3534 2010-07-04  Maciej Stachowiak  <mjs@apple.com>
3535
3536         Reviewed by Mark Rowe.
3537
3538         WebProcess crashes in release for simple layout tests
3539         https://bugs.webkit.org/show_bug.cgi?id=41575
3540
3541         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3542         (WKBundlePageCopyRenderTreeExternalRepresentation): ref external representation StringImpl*
3543         before taking it out of its parent String, to avoid returning freed memory.
3544
3545 2010-07-03  Maciej Stachowiak  <mjs@apple.com>
3546
3547         Rubber stamped by Anders Carlsson.
3548
3549         Add stdint.h include to fix WebKitTestRunner build.
3550
3551         * UIProcess/API/C/WKPage.h:
3552
3553 2010-07-02  Luiz Agostini  <luiz.agostini@openbossa.org>
3554
3555         Reviewed by Kenneth Rohde Christiansen.
3556
3557         [Qt] Wrong method name in file  Connection.h
3558         https://bugs.webkit.org/show_bug.cgi?id=41536
3559
3560         Method openConnectionHandler was spelled as openConnection in class Connection.
3561
3562         * Platform/CoreIPC/Connection.h:
3563
3564 2010-07-02  Luiz Agostini  <luiz.agostini@openbossa.org>
3565
3566         Reviewed by Sam Weinig.
3567
3568         Adding notification and touch events methods to WebChromeClient
3569         https://bugs.webkit.org/show_bug.cgi?id=41527
3570
3571         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3572         (WebKit::WebChromeClient::notificationPresenter):
3573         (WebKit::WebChromeClient::needTouchEvents):
3574         * WebProcess/WebCoreSupport/WebChromeClient.h:
3575
3576 2010-07-02  Luiz Agostini  <luiz.agostini@openbossa.org>
3577
3578         Reviewed by Sam Weinig.
3579
3580         Removing CoreFoundation.h include from WKFrame.h
3581         https://bugs.webkit.org/show_bug.cgi?id=41528
3582
3583         * UIProcess/API/C/WKFrame.h:
3584
3585 2010-07-02  Sam Weinig  <sam@webkit.org>
3586
3587         Reviewed by Oliver Hunt.
3588
3589         Patch for https://bugs.webkit.org/show_bug.cgi?id=41540
3590         WebKit2: Add InjectedCode API to get a list of subframes
3591
3592         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3593         (WKBundleFrameCopyChildFrames):
3594         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3595         * WebProcess/WebPage/WebFrame.cpp:
3596         (WebKit::childFrameRef):
3597         (WebKit::childFrameDeref):
3598         (WebKit::WebFrame::childFrames):
3599         * WebProcess/WebPage/WebFrame.h:
3600         * mac/WebKit2.exp:
3601
3602 2010-07-02  Sam Weinig  <sam@webkit.org>
3603
3604         Reviewed by Anders Carlsson.
3605
3606         Turn off the Objective-C garbage collection for the WebProcess.
3607
3608         * Configurations/WebProcess.xcconfig:
3609         * WebProcess/Launching/mac/WebProcessMain.mm:
3610         (main): Assert that GC is off.
3611
3612 2010-07-02  Sam Weinig  <sam@webkit.org>
3613
3614         Reviewed by Anders Carlsson.
3615
3616         There is no longer a reason to check that the process is valid when posting
3617         a message to the bundle, the process code will take care of that for us.
3618
3619         * UIProcess/WebContext.cpp:
3620         (WebKit::WebContext::postMessageToInjectedBundle):
3621
3622 2010-07-02  Sam Weinig  <sam@webkit.org>
3623
3624         Reviewed by Anders Carlsson.
3625
3626         Use send instead of connection()->send(), now that connections() are created
3627         asynchronously it can be null at this point and the message needs to be queued.
3628
3629         * UIProcess/mac/WebProcessProxyMac.mm:
3630         (WebKit::WebProcessProxy::setUpAcceleratedCompositing):
3631
3632 2010-07-01  Steve Falkenburg  <sfalken@apple.com>
3633
3634         Even more Windows build fixing.
3635         Removed bogus post-build event commands.
3636         Removed unnecessary link libraries.
3637
3638         * win/WebKit2.vcproj:
3639
3640 2010-07-01  Steve Falkenburg  <sfalken@apple.com>
3641
3642         Fix Windows while not breaking Qt (didn't realize this was building for Qt).
3643
3644         * WebProcess/WebProcess.cpp:
3645
3646 2010-07-01  Steve Falkenburg  <sfalken@apple.com>
3647
3648         Windows build fix.
3649
3650         * win/WebKit2Generated.make:
3651
3652 2010-07-01  Steve Falkenburg  <sfalken@apple.com>
3653
3654         Windows build fix.
3655
3656         * WebProcess/WebProcess.cpp:
3657
3658 2010-07-01  Sam Weinig  <sam@webkit.org>
3659
3660         Reviewed by Jon Honeycutt.
3661
3662         Make WebKit2 compile (though not work) on Leopard.
3663
3664         * Platform/WorkQueue.h:
3665         * Platform/mac/WorkQueueMac.cpp:
3666         (WorkQueue::EventSource::EventSource):
3667         (WorkQueue::scheduleWork):
3668         (WorkQueue::registerMachPortEventHandler):
3669         (WorkQueue::unregisterMachPortEventHandler):
3670         (WorkQueue::platformInitialize):
3671         (WorkQueue::platformInvalidate):
3672         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
3673         (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
3674         * UIProcess/mac/WebProcessProxyMac.mm:
3675         (WebKit::WebProcessProxy::setUpAcceleratedCompositing):
3676         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3677         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
3678         (WebKit::LayerBackedDrawingArea::setNeedsDisplay):
3679         * WebProcess/WebPage/LayerBackedDrawingArea.h:
3680         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
3681         (WebKit::LayerBackedDrawingArea::platformClear):
3682         (WebKit::LayerBackedDrawingArea::attachCompositingContext):
3683
3684 2010-07