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