Implement WebKit2 callback equivalent to - [WebUIDelegate webView:setStatusText:]
[WebKit.git] / WebKit2 / ChangeLog
1 2010-09-11  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Dan Bernstein.
4
5         Implement WebKit2 callback equivalent to - [WebUIDelegate webView:setStatusText:]
6         <rdar://problem/8359252>
7         https://bugs.webkit.org/show_bug.cgi?id=45605
8
9         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
10         * UIProcess/API/C/WKPage.h:
11         * UIProcess/API/qt/qwkpage.cpp:
12         (QWKPage::QWKPage):
13         * UIProcess/WebPageProxy.cpp:
14         (WebKit::WebPageProxy::didReceiveMessage):
15         (WebKit::WebPageProxy::setStatusText):
16         * UIProcess/WebPageProxy.h:
17         * UIProcess/WebUIClient.cpp:
18         (WebKit::WebUIClient::setStatusText):
19         * UIProcess/WebUIClient.h:
20         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
21         (WebKit::WebChromeClient::setStatusbarText):
22
23 2010-09-11  Sam Weinig  <sam@webkit.org>
24
25         Reviewed by Dan Bernstein.
26
27         Add callback mechanism for the getting the source of a frame
28         <rdar://problem/8364681>
29         https://bugs.webkit.org/show_bug.cgi?id=45604
30
31         * Shared/CoreIPCSupport/WebPageMessageKinds.h:
32         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
33         * UIProcess/API/C/WKPage.cpp:
34         (WKPageGetSourceForFrame):
35         (callGetSourceForFrameBlockBlockAndDispose):
36         (WKPageGetSourceForFrame_b):
37         * UIProcess/API/C/WKPage.h:
38         * UIProcess/WebPageProxy.cpp:
39         (WebKit::WebPageProxy::close):
40         (WebKit::WebPageProxy::getSourceForFrame):
41         (WebKit::WebPageProxy::didReceiveMessage):
42         (WebKit::WebPageProxy::didGetSourceForFrame):
43         (WebKit::WebPageProxy::processDidExit):
44         * UIProcess/WebPageProxy.h:
45         * WebProcess/WebPage/WebFrame.cpp:
46         (WebKit::WebFrame::source):
47         * WebProcess/WebPage/WebFrame.h:
48         * WebProcess/WebPage/WebPage.cpp:
49         (WebKit::WebPage::getSourceForFrame):
50         (WebKit::WebPage::didReceiveMessage):
51         * WebProcess/WebPage/WebPage.h:
52
53 2010-09-10  Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
54
55         Reviewed by Darin Adler.
56
57         Add NetworkingContext to avoid layer violations
58         https://bugs.webkit.org/show_bug.cgi?id=42292
59
60         * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.cpp:
61         * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
62         (WebFrameNetworkingContext::create):
63
64 2010-09-10  Sam Weinig  <sam@webkit.org>
65
66         Reviewed by Dan Bernstein.
67
68         Add zoom support to WebKit2 API
69         <rdar://problem/7660657>
70         https://bugs.webkit.org/show_bug.cgi?id=45585
71
72         - Add UIProcess API for setting zoom factors.
73         - Change bundle zoom API to be in terms of doubles
74           for consistency.
75
76         * Shared/CoreIPCSupport/WebPageMessageKinds.h:
77         * UIProcess/API/C/WKPage.cpp:
78         (WKPageGetTextZoomFactor):
79         (WKPageSetTextZoomFactor):
80         (WKPageGetPageZoomFactor):
81         (WKPageSetPageZoomFactor):
82         (WKPageSetPageAndTextZoomFactors):
83         * UIProcess/API/C/WKPage.h:
84         * UIProcess/WebPageProxy.cpp:
85         (WebKit::WebPageProxy::WebPageProxy):
86         (WebKit::WebPageProxy::setTextZoomFactor):
87         (WebKit::WebPageProxy::setPageZoomFactor):
88         (WebKit::WebPageProxy::setPageAndTextZoomFactors):
89         * UIProcess/WebPageProxy.h:
90         (WebKit::WebPageProxy::textZoomFactor):
91         (WebKit::WebPageProxy::pageZoomFactor):
92         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
93         (WKBundlePageGetTextZoomFactor):
94         (WKBundlePageSetTextZoomFactor):
95         (WKBundlePageGetPageZoomFactor):
96         (WKBundlePageSetPageZoomFactor):
97         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
98         * WebProcess/WebPage/WebPage.cpp:
99         (WebKit::WebPage::textZoomFactor):
100         (WebKit::WebPage::setTextZoomFactor):
101         (WebKit::WebPage::pageZoomFactor):
102         (WebKit::WebPage::setPageZoomFactor):
103         (WebKit::WebPage::setPageAndTextZoomFactors):
104         (WebKit::WebPage::didReceiveMessage):
105         * WebProcess/WebPage/WebPage.h:
106
107 2010-09-10  Balazs Kelemen  <kb@inf.u-szeged.hu>
108
109         Reviewed by Andreas Kling.
110
111         Application cache directory should be checked before sending to the web process
112         https://bugs.webkit.org/show_bug.cgi?id=45462
113
114         * UIProcess/WebProcessProxy.cpp:
115         (WebKit::WebProcessProxy::WebProcessProxy): Check the return value of
116         m_context->applicationCacheDirectoy() to avoid sending a null string
117         to the web process what makes it asserting.
118
119 2010-09-10  Sam Weinig  <sam@webkit.org>
120
121         Reviewed by Darin Adler.
122
123         Remove unnecessary constraint in WebCore of choosing either text zoom or full page zoom.
124         Precursor to <rdar://problem/7660657>
125         https://bugs.webkit.org/show_bug.cgi?id=45522
126
127         Now that WebCore doesn't require a mode, change the bundle API for zoom to not
128         require one either.
129
130         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
131         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
132         (WKBundlePageStopLoading):
133         (WKBundlePageGetTextZoomFactor):
134         (WKBundlePageSetTextZoomFactor):
135         (WKBundlePageGetPageZoomFactor):
136         (WKBundlePageSetPageZoomFactor):
137         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
138         * WebProcess/WebPage/WebPage.cpp:
139         (WebKit::WebPage::WebPage):
140         (WebKit::WebPage::textZoomFactor):
141         (WebKit::WebPage::setTextZoomFactor):
142         (WebKit::WebPage::pageZoomFactor):
143         (WebKit::WebPage::setPageZoomFactor):
144         * WebProcess/WebPage/WebPage.h:
145
146 2010-09-10  Balazs Kelemen  <kb@inf.u-szeged.hu>
147
148         Reviewed by Andreas Kling.
149
150         [Qt] Implement port specific part of WebKit::InjectedBundle
151         https://bugs.webkit.org/show_bug.cgi?id=45541
152
153         * WebProcess/InjectedBundle/InjectedBundle.h: Typedef PlatformBundle as QLibrary for qt.
154         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
155         (WebKit::InjectedBundle::load): Implemented.
156
157 2010-09-10  Balazs Kelemen  <kb@inf.u-szeged.hu>
158
159         Reviewed by Andreas Kling.
160
161         [Qt] MiniBrowser crashes with multiply windows when closing one of them
162         https://bugs.webkit.org/show_bug.cgi?id=45536
163
164         * UIProcess/API/qt/qwkpage.cpp:
165         (QWKPage::~QWKPage): Do not call WKPageTerminate since this is designed
166         to terminate the web process. We are correctly detaching the page without
167         this call anyway.
168
169 2010-09-10  Adam Barth  <abarth@webkit.org>
170
171         Reviewed by Darin Fisher.
172
173         Move code from WebKit-layer to DocumentLoader
174         https://bugs.webkit.org/show_bug.cgi?id=45569
175
176         This code looks copy/pasted from Mac.  It's unclear whether whether all
177         the complexity is needed here, but I don't have a good way to find out.
178
179         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
180         (WebKit::WebFrameLoaderClient::committedLoad):
181         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
182
183 2010-09-10  Anders Carlsson  <andersca@apple.com>
184
185         Reviewed by Mark Rowe and Darin Adler.
186
187         Set the visible name for the web process
188         https://bugs.webkit.org/show_bug.cgi?id=45564
189         <rdar://problem/8416970>
190
191         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
192         (WebKit::processName):
193         Add a thread safe implementation of -[NSProcessInfo processName].
194
195         (WebKit::ProcessLauncher::launchProcess):
196         Pass the process name to the child process.
197
198         * WebProcess/mac/WebProcessMainMac.mm:
199         (WebKit::WebProcessMain):
200         Set the visible name.
201
202 2010-09-10  Adam Barth  <abarth@webkit.org>
203
204         Reviewed by Eric Seidel.
205
206         Main resource bytes shouldn't bounce through FrameLoader
207         https://bugs.webkit.org/show_bug.cgi?id=45496
208
209         Now return the bytes to the DocumentLoader.
210
211         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
212         (WebKit::WebFrameLoaderClient::receivedData):
213
214 2010-09-10  Adam Roben  <aroben@apple.com>
215
216         Don't crash when a frame is destroyed after the UI process has
217         disconnected
218
219         Fixes <http://webkit.org/b/45535> <rdar://problem/8412928> Crash in
220         WebProcess::removeWebFrame on exit with WebKit2 (Release builds only)
221
222         Reviewed by Darin Adler.
223
224         * WebProcess/WebProcess.cpp:
225         (WebKit::WebProcess::removeWebFrame): Null-check m_connection before
226         dereferencing it.
227
228 2010-09-09  Simon Fraser  <simon.fraser@apple.com>
229
230         Reviewed by Adam Roben.
231
232         Scrollbars fail to render in composited iframes.
233         https://bugs.webkit.org/show_bug.cgi?id=45335
234
235         Use LocalWindowsContext when painting the plugin.
236
237         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
238         (WebKit::NetscapePlugin::platformPaint):
239
240 2010-09-09  Sam Weinig  <sam@webkit.org>
241
242         Reviewed by Anders Carlsson.
243
244         Allow passing WebDoubles via postMessage.
245
246         * Shared/UserMessageCoders.h:
247         (WebKit::UserMessageEncoder::baseEncode):
248         (WebKit::UserMessageDecoder::baseDecode):
249
250 2010-09-08  Sam Weinig  <sam@webkit.org>
251
252         Reviewed by Dan Bernstein.
253
254         WebKit2 needs a way to box numbers (for Array, Dictionary, etc.)
255         <rdar://problem/8408844>
256         https://bugs.webkit.org/show_bug.cgi?id=45429
257
258         This adds a generic WebNumber class that can be used for any scalar
259         numeric type. Right now, we are only exposing a double version, but it
260         is designed to allow more.
261
262         * Shared/APIObject.h:
263         * Shared/WebNumber.h: Added.
264         (WebKit::WebNumber::create):
265         (WebKit::WebNumber::value):
266         (WebKit::WebNumber::setValue):
267         (WebKit::WebNumber::WebNumber):
268         (WebKit::WebNumber::type):
269         * UIProcess/API/C/WKAPICast.h:
270         * UIProcess/API/C/WKBase.h:
271         * UIProcess/API/C/WKNumber.cpp: Added.
272         (WKDoubleGetTypeID):
273         (WKDoubleCreate):
274         (WKDoubleGetValue):
275         (WKDoubleSetValue):
276         * UIProcess/API/C/WKNumber.h: Added.
277         * UIProcess/API/C/WebKit2.h:
278         * WebKit2.pro:
279         * WebKit2.xcodeproj/project.pbxproj:
280         * win/WebKit2.vcproj:
281         * win/WebKit2Generated.make:
282
283 2010-09-08  Anders Carlsson  <andersca@apple.com>
284
285         Don't include the std namespace in a header. This hopefully fixes the Windows build.
286
287         * Shared/WebCoreArgumentCoders.h:
288
289 2010-09-08  Anders Carlsson  <andersca@apple.com>
290
291         Suggested and reviewed by Darin Adler.
292
293         Fix an overflow bug in bufferIsLargeEnoughToContain.
294
295         * Platform/CoreIPC/ArgumentDecoder.h:
296         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
297
298 2010-09-08  Anders Carlsson  <andersca@apple.com>
299
300         Reviewed by Darin Adler.
301
302         Improve CoreIPC encoding of strings
303         https://bugs.webkit.org/show_bug.cgi?id=45418
304
305         Encode and decode null Strings. Check that the string length isn't bogus.
306
307         * Platform/CoreIPC/ArgumentCoders.h:
308         * Platform/CoreIPC/ArgumentDecoder.cpp:
309         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
310         * Platform/CoreIPC/ArgumentDecoder.h:
311         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
312         * Shared/WebCoreArgumentCoders.h:
313
314 2010-09-08  Adam Roben  <aroben@apple.com>
315
316         Add a way to cause the web process to crash at a random time
317
318         Setting the WEBKIT2_CRASH_WEB_PROCESS_RANDOMLY environment variable
319         will cause the web process to crash at a random point up to 3 minutes
320         after launching.
321
322         Fixes <http://webkit.org/b/43058> <rdar://problem/8240150>
323
324         Reviewed by Darin Adler.
325
326         * WebProcess/WebProcess.cpp:
327         (WebKit::sleep): Added an implementation of this function for Windows.
328         It just calls through to ::Sleep.
329         (WebKit::randomCrashThread): Added. Sleeps for a random amount of time
330         up to 3 minutes, then crashes.
331         (WebKit::startRandomCrashThreadIfRequested): Added. Starts the crash
332         thread if the WEBKIT2_CRASH_WEB_PROCESS_RANDOMLY environment variable
333         is set.
334         (WebKit::WebProcess::initialize): Added a call to
335         startRandomCrashThreadIfRequested.
336
337 2010-09-08  Adam Roben  <aroben@apple.com>
338
339         Fix potential ref-counting issues with WorkItemWin
340
341         Reviewed by Anders Carlsson.
342
343         * Platform/WorkQueue.h: Changed WorkItemWin to inherit from
344         ThreadSafeShared instead of RefCounted so that its ref-count will stay
345         consistent when used on multiple threads.
346
347 2010-09-08  Adam Roben  <aroben@apple.com>
348
349         Teach WorkQueue how to stop waiting on objects on Windows
350
351         WorkQueue now uses a subclass of WorkItemWin, HandleWorkItem, to hold
352         the waited-upon HANDLE and its corresponding wait handle. When a
353         HANDLE is unregistered, we use the HandleWorkItem to cancel the wait
354         and destroy the HANDLE.
355
356         Fixes <http://webkit.org/b/42826> <rdar://problem/8222253> Crash in
357         thread pool because WorkQueue keeps waiting on closed HANDLEs
358
359         Reviewed by Anders Carlsson.
360
361         * Platform/CoreIPC/win/ConnectionWin.cpp:
362         (CoreIPC::Connection::platformInvalidate): Changed to call
363         WorkQueue::unregisterAndCloseHandle instead of closing our handles
364         manually.
365
366         (CoreIPC::Connection::readEventHandler):
367         (CoreIPC::Connection::writeEventHandler):
368         Handle cases where the pipe has already closed by just bailing out.
369         This can happen if a WorkItem to call one of these functions has
370         already been scheduled before platformInvalidate is called.
371
372         * Platform/WorkQueue.h: Gave WorkItemWin a virtual destructor, added
373         HandleWorkItem, changed m_handles to hold HandleWorkItems, and added
374         functions for unregistering waits.
375
376         * Platform/win/WorkQueueWin.cpp:
377         (WorkQueue::WorkItemWin::~WorkItemWin): Added. This virtual destructor
378         ensures that HandleWorkItem's destructor gets called.
379
380         (WorkQueue::HandleWorkItem::HandleWorkItem):
381         (WorkQueue::HandleWorkItem::createByAdoptingHandle):
382         Added simple constructor/creator.
383
384         (WorkQueue::HandleWorkItem::~HandleWorkItem): Closes the handle we
385         adopted.
386         (WorkQueue::registerHandle): Changed to create a HandleWorkItemWin and
387         to store the wait handle in it.
388         (WorkQueue::unregisterAndCloseHandle): Added. Removes the
389         HandleWorkItem for this HANDLE from m_handles and then schedules its
390         wait to be unregistered and the item to be destroyed.
391         (WorkQueue::platformInvalidate): Added an assertion and removed an
392         obsolete FIXME.
393         (WorkQueue::unregisterWaitAndDestroyItemSoon): Added. Calls
394         unregisterWaitAndDestroyItemCallback on a worker thread, passing it
395         ownership of the HandleWorkItem.
396         (WorkQueue::unregisterWaitAndDestroyItemCallback): Added. Adopts the
397         passed-in HandleWorkItem, then unregisters the handle's wait, then
398         destroys the HandleWorkItem when the RefPtr holding it goes out of
399         scope. Destroying the HandleWorkItem closes the handle.
400
401 2010-09-08  Adam Roben  <aroben@apple.com>
402
403         Remove WKSerializedScriptValue.cpp/h from the Copy Files build phase
404
405         * WebKit2.xcodeproj/project.pbxproj:
406
407 2010-09-08  Adam Roben  <aroben@apple.com>
408
409         Get rid of WorkQueue::m_performWorkEvent
410
411         We were signaling m_performWorkEvent to spawn a worker thread. We can
412         use ::QueueUserWorkItem to spawn the thread instead.
413
414         Fixes <http://webkit.org/b/45407> WorkQueue::m_performWorkEvent is
415         unnecessary
416
417         Reviewed by Anders Carlsson.
418
419         * Platform/WorkQueue.h: Removed m_performWorkEvent.
420
421         * Platform/win/WorkQueueWin.cpp:
422         (WorkQueue::workThreadCallback): Replaced eventCallback with this
423         function. Its functionality is unchanged.
424
425         (WorkQueue::platformInitialize):
426         (WorkQueue::platformInvalidate):
427         Removed code to set up and clean up m_performWorkEvent.
428
429         (WorkQueue::scheduleWork): Use ::QueueUserWorkItem instead of
430         signaling m_performWorkEvent to spawn a worker thread.
431
432 2010-09-08  Adam Roben  <aroben@apple.com>
433
434         Fix WebKit2Common.vsprops line-endings
435
436         * win/WebKit2Common.vsprops: Made all line-endings be CRLF, as this is
437         the format Visual Studio wants.
438
439 2010-09-07  Oliver Hunt  <oliver@apple.com>
440
441         Reviewed by Anders Carlsson.
442
443         Support SerializedScriptValue in WebKit2
444         https://bugs.webkit.org/show_bug.cgi?id=45340
445
446         Add wrappers and IPC serialization for SerializedScriptValue
447
448         * Shared/APIObject.h:
449         * Shared/UserMessageCoders.h:
450         (WebKit::UserMessageEncoder::baseEncode):
451         (WebKit::UserMessageDecoder::baseDecode):
452         * Shared/WebSerializedScriptValue.h: Added.
453         (WebKit::WebSerializedScriptValue::create):
454         (WebKit::WebSerializedScriptValue::adopt):
455         (WebKit::WebSerializedScriptValue::deserialize):
456         (WebKit::WebSerializedScriptValue::data):
457         (WebKit::WebSerializedScriptValue::WebSerializedScriptValue):
458         (WebKit::WebSerializedScriptValue::type):
459         * UIProcess/API/C/WKAPICast.h:
460         * UIProcess/API/C/WKBase.h:
461         * UIProcess/API/C/WKSerializedScriptValue.cpp: Added.
462         (WKSerializedScriptValueGetTypeID):
463         (WKSerializedScriptValueCreate):
464         (WKSerializedScriptValueDeserialize):
465         * UIProcess/API/C/WKSerializedScriptValue.h: Added.
466         * WebKit2.xcodeproj/project.pbxproj:
467
468 2010-09-08  Sam Weinig  <sam@webkit.org>
469
470         Reviewed by Jon Honeycutt.
471
472         Would like WKBundleFrameRef to turn into WKFrameRef across postMessage boundary, a la PageRef
473         <rdar://problem/8402804>
474         https://bugs.webkit.org/show_bug.cgi?id=45370
475
476         * UIProcess/WebContextUserMessageCoders.h:
477         (WebKit::WebContextUserMessageEncoder::encode):
478         (WebKit::WebContextUserMessageDecoder::decode):
479         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
480         (WebKit::InjectedBundleUserMessageEncoder::encode):
481         (WebKit::InjectedBundleUserMessageDecoder::decode):
482
483 2010-09-07  Kinuko Yasuda  <kinuko@chromium.org>
484
485         Unreviewed, another Qt release build fix attempt.
486
487         * UIProcess/API/cpp/qt/WKURLQt.cpp:
488
489 2010-09-07  Kinuko Yasuda  <kinuko@chromium.org>
490
491         Unreviewed, attempt to fix Qt release build.
492
493         * UIProcess/API/cpp/qt/WKStringQt.cpp:
494
495 2010-09-07  Brent Fulgham  <bfulgham@webkit.org>
496
497         Build correction, no review.
498
499         * win/WebKit2.vcproj: Disable two unused files for
500         the WinCairo target.
501
502 2010-09-07  Anders Carlsson  <andersca@apple.com>
503
504         Reviewed by Sam Weinig.
505
506         Fix clang++ build.
507
508         * UIProcess/API/C/WKAPICast.h:
509         Move all functions into the WebKit namespace.
510         
511         * UIProcess/API/C/cf/WKStringCF.cpp:
512         Add using namespace WebKit.
513
514         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
515         Move all functions into the WebKit namespace.
516
517 2010-09-07  Anders Carlsson  <andersca@apple.com>
518
519         Reviewed by Darin Adler.
520
521         <rdar://problem/8381749> -Wcast-align warning emitted when building with clang
522
523         Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
524
525         * Configurations/Base.xcconfig:
526
527 2010-09-07  Sam Weinig  <sam@webkit.org>
528
529         Another windows fix.
530
531         * UIProcess/win/WebView.cpp:
532
533 2010-09-07  Sam Weinig  <sam@webkit.org>
534
535         Try and fix windows.
536
537         * UIProcess/WebEditCommandProxy.h:
538
539 2010-09-07  Sam Weinig  <sam@webkit.org>
540
541         Reviewed by Darin Adler.
542
543         Fix incorrect parameter name.
544
545         * UIProcess/API/mac/PageClientImpl.mm:
546
547 2010-09-07  Sam Weinig  <sam@webkit.org>
548
549         Reviewed by Darin Adler.
550
551         Add support for Undo/Redo
552         <rdar://problem/7660519>
553         https://bugs.webkit.org/show_bug.cgi?id=42781
554
555         Adds platform independent parts of Undo/Redo support and the mac
556         platform support.
557
558         To work around the common assumption made by platforms, that a redo
559         item will be added synchronously while an undo is in progress, we
560         ignore the calls from WebCore to add redo items, and instead add add
561         them after telling WebCore to unapply the EditCommand. We similarly
562         need to ignore undos, that take place during a redo, and force the
563         addition ourselves.
564
565         * Shared/CoreIPCSupport/WebPageMessageKinds.h:
566         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
567         Add new messages.
568
569         * UIProcess/API/mac/PageClientImpl.h:
570         * UIProcess/API/mac/PageClientImpl.mm:
571         (-[WebEditCommandObjC initWithWebEditCommandProxy:WebKit::]):
572         (-[WebEditCommandObjC WebKit::]):
573         (-[WebEditorUndoTargetObjC undoEditing:]):
574         (-[WebEditorUndoTargetObjC redoEditing:]):
575         (WebKit::PageClientImpl::PageClientImpl):
576         (WebKit::nameForEditAction):
577         (WebKit::PageClientImpl::registerEditCommand):
578         (WebKit::PageClientImpl::clearAllEditCommands):
579         * UIProcess/API/qt/qwkpage.cpp:
580         (QWKPagePrivate::registerEditCommand):
581         (QWKPagePrivate::clearAllEditCommands):
582         * UIProcess/API/qt/qwkpage_p.h:
583         * UIProcess/PageClient.h:
584         * UIProcess/win/WebView.cpp:
585         (WebKit::WebView::registerEditCommand):
586         (WebKit::WebView::clearAllEditCommands):
587         * UIProcess/win/WebView.h:
588         Add platform specific hooks for undo/redo.
589
590         * UIProcess/WebEditCommandProxy.cpp: Added.
591         (WebKit::WebEditCommandProxy::WebEditCommandProxy):
592         (WebKit::WebEditCommandProxy::~WebEditCommandProxy):
593         (WebKit::WebEditCommandProxy::unapply):
594         (WebKit::WebEditCommandProxy::reapply):
595         * UIProcess/WebEditCommandProxy.h: Added.
596         (WebKit::WebEditCommandProxy::create):
597         (WebKit::WebEditCommandProxy::commandID):
598         (WebKit::WebEditCommandProxy::editAction):
599         (WebKit::WebEditCommandProxy::invalidate):
600         A proxy for the WebEditCommands in the WebProcess. These are owned
601         by the platform back/forward list, with a weak reference back to the
602         WebPageProxy (which holds a weakset of live WebEditCommandProxys).
603
604         * UIProcess/WebPageProxy.cpp:
605         (WebKit::WebPageProxy::close):
606         (WebKit::WebPageProxy::didReceiveMessage):
607         (WebKit::WebPageProxy::registerEditCommandForUndo):
608         (WebKit::WebPageProxy::clearAllEditCommands):
609         (WebKit::WebPageProxy::registerEditCommandForRedo):
610         (WebKit::WebPageProxy::addEditCommand):
611         (WebKit::WebPageProxy::removeEditCommand):
612         (WebKit::WebPageProxy::processDidExit):
613         * UIProcess/WebPageProxy.h:
614         Forward messages.
615
616         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
617         (WebKit::WebEditorClient::registerCommandForUndo):
618         (WebKit::WebEditorClient::registerCommandForRedo):
619         (WebKit::WebEditorClient::clearUndoRedoOperations):
620         Send undo/redo registration and clearing to the UIProcess.
621
622         * WebProcess/WebPage/WebEditCommand.cpp: Added.
623         (WebKit::generateCommandID):
624         (WebKit::WebEditCommand::WebEditCommand):
625         * WebProcess/WebPage/WebEditCommand.h: Added.
626         (WebKit::WebEditCommand::create):
627         (WebKit::WebEditCommand::command):
628         (WebKit::WebEditCommand::commandID):
629         Wrapper for WebCore::EditCommand, with an added unique ID.
630
631         * WebProcess/WebPage/WebPage.cpp:
632         (WebKit::WebPage::WebPage):
633         (WebKit::WebPage::webEditCommand):
634         (WebKit::WebPage::addWebEditCommand):
635         (WebKit::WebPage::removeWebEditCommand):
636         (WebKit::WebPage::unapplyEditCommand):
637         (WebKit::WebPage::reapplyEditCommand):
638         (WebKit::WebPage::didRemoveEditCommand):
639         (WebKit::WebPage::didReceiveMessage):
640         * WebProcess/WebPage/WebPage.h:
641         (WebKit::WebPage::isInRedo):
642         Forward messages.
643
644         * WebKit2.pro:
645         * WebKit2.xcodeproj/project.pbxproj:
646         * win/WebKit2.vcproj:
647         Add new files.
648
649 2010-09-07  Jessie Berlin  <jberlin@apple.com>
650
651         Reviewed by Darin Adler.
652
653         Indicate which one of the ScriptWorlds for a Frame the Window Object has been cleared for
654         https://bugs.webkit.org/show_bug.cgi?id=45217
655
656         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
657
658         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
659         (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
660         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
661
662         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
663         (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
664
665 2010-09-06  Adam Barth  <abarth@webkit.org>
666
667         Reviewed by Darin Adler.
668
669         Rename SecurityOrigin::canLoad to canDisplay
670         https://bugs.webkit.org/show_bug.cgi?id=45214
671
672         Propagate name change.
673
674         * WebProcess/Plugins/PluginView.cpp:
675         (WebKit::PluginView::performFrameLoadURLRequest):
676
677 2010-09-04  Sam Weinig  <sam@webkit.org>
678
679         Reviewed by Anders Carlsson.
680
681         Allow passing null to postMessage API functions
682         https://bugs.webkit.org/show_bug.cgi?id=45234
683
684         * Shared/APIObject.h: Add TypeNull to enum. This is only used
685         for serialization purposes, and does not represent a concrete subclass
686         of APIObject.
687
688         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Remove WillSubmitFormWithUserData
689         now that it is not needed.
690
691         * Shared/UserMessageCoders.h:
692         (WebKit::UserMessageEncoder::baseEncode):
693         (WebKit::UserMessageDecoder::baseDecode):
694         Add explicit encoding/decoding of null for user messages.
695
696         * UIProcess/WebContextUserMessageCoders.h:
697         (WebKit::WebContextUserMessageEncoder::encode):
698         (WebKit::WebContextUserMessageDecoder::decode):
699         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
700         (WebKit::InjectedBundleUserMessageEncoder::encode):
701         (WebKit::InjectedBundleUserMessageDecoder::decode):
702         Update UserMessageCoders subclasses to call the base class in the correct
703         way to work with null messages. This means moving the encoding/decoding
704         of the type down to the base class, which is a nice cleanup.
705
706         * UIProcess/WebPageProxy.cpp:
707         (WebKit::WebPageProxy::didReceiveMessage):
708         Remove now redundant WillSubmitFormWithUserData implementation.
709
710         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
711         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
712         Ditto.
713
714 2010-09-03  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
715
716         Reviewed by Darin Adler.
717
718         Add NetworkingContext to avoid layer violations
719         https://bugs.webkit.org/show_bug.cgi?id=42292
720
721         Add FrameNetworkingContext implementation.
722
723         * WebKit2.pro:
724         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
725         (WebKit::WebFrameLoaderClient::createNetworkingContext):
726         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
727         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
728         (WebKit::WebFrameNetworkingContext::needsSiteSpecificQuirks):
729         (WebKit::WebFrameNetworkingContext::localFileContentSniffingEnabled):
730         (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs):
731         (WebKit::WebFrameNetworkingContext::blockedError):
732         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp: Added.
733         (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
734         (WebCore::WebFrameNetworkingContext::create):
735         (WebCore::WebFrameNetworkingContext::originatingObject):
736         (WebCore::WebFrameNetworkingContext::networkAccessManager):
737         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h: Added.
738         * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.cpp: Added.
739         * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h: Added.
740         (WebFrameNetworkingContext::create):
741         (WebFrameNetworkingContext::WebFrameNetworkingContext):
742         * win/WebKit2.vcproj:
743         * win/WebKit2Common.vsprops:
744
745 2010-09-03  Sam Weinig  <sam@webkit.org>
746
747         Reviewed by Dan Bernstein.
748
749         Add ability to send UserData to willSubmitForm
750         https://bugs.webkit.org/show_bug.cgi?id=45222
751
752         - Adds a willSubmitForm callback to the BundlePageFormClient with an out
753           parameter WKTypeRef* parameter.
754         - That out parameter gets serialized and then passed to the PageFormClient's
755           willSubmitForm, which now has WKTypeRef parameter.
756
757         - Temporarily adds a new WillSubmitFormWithUserData message kind. This will
758           be replaced by the ability to explicitly serialize null as a UserMessage.
759
760         * Platform/CoreIPC/Arguments.h:
761         (CoreIPC::Arguments6::Arguments6):
762         (CoreIPC::Arguments6::encode):
763         (CoreIPC::Arguments6::decode):
764         (CoreIPC::In):
765         (CoreIPC::Out):
766         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
767         * UIProcess/API/C/WKPage.h:
768         * UIProcess/WebFormClient.cpp:
769         (WebKit::WebFormClient::willSubmitForm):
770         * UIProcess/WebFormClient.h:
771         * UIProcess/WebPageProxy.cpp:
772         (WebKit::WebPageProxy::didReceiveMessage):
773         (WebKit::WebPageProxy::willSubmitForm):
774         * UIProcess/WebPageProxy.h:
775         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
776         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
777         (WebKit::InjectedBundlePageFormClient::textFieldDidBeginEditing):
778         (WebKit::InjectedBundlePageFormClient::textFieldDidEndEditing):
779         (WebKit::InjectedBundlePageFormClient::textDidChangeInTextField):
780         (WebKit::InjectedBundlePageFormClient::textDidChangeInTextArea):
781         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
782         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
783         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
784         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
785
786 2010-09-03  Sam Weinig  <sam@webkit.org>
787
788         Reviewed by Gavin Barraclough.
789
790         Change WKDictionaryIsMutable to take a WKDictionaryRef instead of a WKMutableDictionaryRef.
791         If the type is already states it is mutable, there would be no reason for the check.
792
793         * UIProcess/API/C/WKMutableDictionary.cpp:
794         (WKDictionaryIsMutable):
795         * UIProcess/API/C/WKMutableDictionary.h:
796
797 2010-09-02  Sam Weinig  <sam@webkit.org>
798
799         Reviewed by Anders Carlsson.
800
801         Add ability to send WKDictionaryRefs via post message.
802         https://bugs.webkit.org/show_bug.cgi?id=45151
803
804         * Shared/ImmutableDictionary.cpp:
805         (WebKit::ImmutableDictionary::ImmutableDictionary):
806         * Shared/ImmutableDictionary.h:
807         (WebKit::ImmutableDictionary::adopt): Remove tag, it wasn't doing anything.
808         (WebKit::ImmutableDictionary::isMutable):
809         (WebKit::ImmutableDictionary::map): Add accessor of internal
810         map for encoder.
811
812         * Shared/UserMessageCoders.h:
813         (WebKit::UserMessageEncoder::baseEncode):
814         (WebKit::UserMessageDecoder::baseDecode):
815         Add encoder/decoder.
816
817 2010-09-02  Sam Weinig  <sam@webkit.org>
818
819         Reviewed by Anders Carlsson.
820
821         Share the common parts of UserMessage coding between both processes.
822         https://bugs.webkit.org/show_bug.cgi?id=45139
823
824         Add base classes UserMessageEncoder and UserMessageDecoder which implement
825         encoding/decoding of ImmutableArray and String (soon to be others as well, such
826         as ImmutableDictionary, Data, etc.) and add derived classes which implement the
827         process specific bits such as Page -> BundlePage conversion.
828
829         * Shared/UserMessageCoders.h: Copied from WebProcess/InjectedBundle/InjectedBundle.cpp.
830         (WebKit::UserMessageEncoder::baseEncode):
831         (WebKit::UserMessageEncoder::UserMessageEncoder):
832         (WebKit::UserMessageDecoder::baseDecode):
833         (WebKit::UserMessageDecoder::UserMessageDecoder):
834         * UIProcess/WebContext.cpp:
835         (WebKit::WebContext::postMessageToInjectedBundle):
836         (WebKit::WebContext::didReceiveMessage):
837         * UIProcess/WebContextUserMessageCoders.h: Copied from UIProcess/WebContext.cpp.
838         (WebKit::WebContextUserMessageEncoder::WebContextUserMessageEncoder):
839         (WebKit::WebContextUserMessageEncoder::encode):
840         (WebKit::WebContextUserMessageDecoder::WebContextUserMessageDecoder):
841         (WebKit::WebContextUserMessageDecoder::decode):
842         * WebKit2.pro:
843         * WebKit2.xcodeproj/project.pbxproj:
844         * WebProcess/InjectedBundle/InjectedBundle.cpp:
845         (WebKit::InjectedBundle::postMessage):
846         (WebKit::InjectedBundle::didReceiveMessage):
847         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h: Copied from WebProcess/InjectedBundle/InjectedBundle.cpp.
848         (WebKit::InjectedBundleUserMessageEncoder::InjectedBundleUserMessageEncoder):
849         (WebKit::InjectedBundleUserMessageEncoder::encode):
850         (WebKit::InjectedBundleUserMessageDecoder::InjectedBundleUserMessageDecoder):
851         (WebKit::InjectedBundleUserMessageDecoder::decode):
852         * win/WebKit2.vcproj:
853
854 2010-09-02  Sam Weinig  <sam@webkit.org>
855
856         Reviewed by Anders Carlsson.
857
858         Simplify ownership semantics of some WebKit2 types
859         https://bugs.webkit.org/show_bug.cgi?id=45120
860
861         - Make ImmutableArray and MutableArray use a Vector<RefPtr<APIObject> > and
862           therefore ref any items it takes in.
863         - Make the PostMessageDecoder operate on a RefPtr<APIObject>& to avoid the odd
864           leaking semantics.
865
866         * Shared/ImmutableArray.cpp:
867         (WebKit::ImmutableArray::ImmutableArray): This constructor now uses a for-loop
868         instead of memcpy to ref each item.
869         (WebKit::ImmutableArray::~ImmutableArray): No longer necessary to manually deref.
870         * Shared/ImmutableArray.h:
871         (WebKit::ImmutableArray::adopt):
872         (WebKit::ImmutableArray::at):
873         Changes to accommodate entries being changed to a Vector<RefPtr<APIObject> >.
874
875         * Shared/ImmutableDictionary.cpp:
876         (WebKit::ImmutableDictionary::keys):
877         Build a Vector<RefPtr<APIObject> >.
878
879         * UIProcess/WebBackForwardList.cpp:
880         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
881         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
882         Ditto.
883
884         * UIProcess/WebContext.cpp:
885         (WebKit::PostMessageEncoder::PostMessageDecoder::PostMessageDecoder):
886         (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
887         (WebKit::WebContext::didReceiveMessage):
888         APIObject>& to avoid the odd leaking semantics.
889
890         * WebProcess/InjectedBundle/InjectedBundle.cpp:
891         (WebKit::PostMessageEncoder::PostMessageDecoder::PostMessageDecoder):
892         (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
893         (WebKit::InjectedBundle::didReceiveMessage):
894         Ditto.
895
896         * WebProcess/WebPage/WebFrame.cpp:
897         (WebKit::WebFrame::childFrames):
898         Build a Vector<RefPtr<APIObject> >.
899
900 2010-09-02  Sam Weinig  <sam@webkit.org>
901
902         Reviewed by Anders Carlsson.
903
904         Add WKMutableDictionary API for WebKit2
905         https://bugs.webkit.org/show_bug.cgi?id=45117
906
907         Add WKMutableDictionary API that inherits from WKDictionaryRef
908         the same way WKMutableArrayRef inherits from WKArrayRef.
909
910         * Shared/ImmutableDictionary.h:
911         (WebKit::ImmutableDictionary::get):
912         (WebKit::ImmutableDictionary::isMutable):
913         * Shared/MutableDictionary.cpp: Added.
914         (WebKit::MutableDictionary::MutableDictionary):
915         (WebKit::MutableDictionary::~MutableDictionary):
916         (WebKit::MutableDictionary::add):
917         (WebKit::MutableDictionary::set):
918         * Shared/MutableDictionary.h: Added.
919         (WebKit::MutableDictionary::create):
920         (WebKit::MutableDictionary::isMutable):
921         * UIProcess/API/C/WKAPICast.h:
922         (toWK):
923         * UIProcess/API/C/WKBase.h:
924         * UIProcess/API/C/WKMutableDictionary.cpp: Added.
925         (WKMutableDictionaryCreate):
926         (WKDictionaryIsMutable):
927         (WKDictionaryAddItem):
928         (WKDictionarySetItem):
929         * UIProcess/API/C/WKMutableDictionary.h: Added.
930         * UIProcess/API/C/WebKit2.h:
931         * WebKit2.pro:
932         * WebKit2.xcodeproj/project.pbxproj:
933         * win/WebKit2.vcproj:
934         * win/WebKit2Generated.make:
935
936 2010-09-02  Jessie Berlin  <jberlin@apple.com>
937
938         Windows build fix. Unreviewed.
939
940         * UIProcess/API/win/WKAPICastWin.h:
941         (toWK):
942         * UIProcess/API/win/WKBaseWin.h:
943
944 2010-09-01  Jia Pu  <jpu@apple.com>
945
946         Reviewed by Dan Bernstein.
947
948         Add support for autocorrection UI on Mac OS X.
949         https://bugs.webkit.org/show_bug.cgi?id=44958
950         <rdar://problem/7326847>
951
952         See detailed high level description in WebCore/ChangeLog.
953
954         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
955         (WebKit::WebEditorClient::showCorrectionPanel): Dummy implementation.
956         (WebKit::WebEditorClient::dismissCorrectionPanel): Ditto
957
958         * WebProcess/WebCoreSupport/WebEditorClient.h: Added new methods declared in base class.
959
960 2010-09-01  Sam Weinig  <sam@webkit.org>
961
962         Fix the build.
963
964         As with CF, const struct OpaqueType* should be the default type
965         so that const_casts are not necessary in user code.
966
967         * UIProcess/API/C/WKArray.cpp:
968         (WKArrayCreate):
969         * UIProcess/API/C/WKBase.h:
970         * UIProcess/API/C/WKType.cpp:
971         (WKGetTypeID):
972         (WKRetain):
973         (WKRelease):
974         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
975         (toWK):
976         * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
977
978 2010-09-01  Sam Weinig  <sam@webkit.org>
979
980         Reviewed by Adam Roben.
981
982         Add mutable array API to WebKit2
983         https://bugs.webkit.org/show_bug.cgi?id=45082
984
985         Add a mutable API to WebKit2 called WKMutableArrayRef. Make it "inherit" from 
986         WKArrayRef in the same way JSObjectRef can inherit from JSValueRef in the JSC
987         API, by abusing the c type system (WKArrayRef is defined as a const version of
988         WKMutableArrayRef). Add very basic mutable API to go along with it.
989
990         * Shared/ImmutableArray.h:
991         (WebKit::ImmutableArray::isMutable):
992         Add ability to ask it an array is mutable.
993
994         * Shared/MutableArray.cpp: Added.
995         (WebKit::MutableArray::MutableArray):
996         (WebKit::MutableArray::~MutableArray):
997         (WebKit::MutableArray::append):
998         * Shared/MutableArray.h: Added.
999         (WebKit::MutableArray::create):
1000         (WebKit::MutableArray::isMutable):
1001         Sketch out the mutable array interface.
1002
1003         * UIProcess/API/C/WKAPICast.h:
1004         (toWK):
1005         Now that the opaque types can be const, use template magic to const_cast
1006         it away.
1007
1008         * UIProcess/API/C/WKBase.h:
1009         Add new type and re-type WKArrayRef as const.
1010
1011         * UIProcess/API/C/WKMutableArray.cpp: Added.
1012         (WKMutableArrayCreate):
1013         (WKArrayIsMutable):
1014         (WKArrayAppendItem):
1015         * UIProcess/API/C/WKMutableArray.h: Added.
1016         Fill in basic API.
1017
1018         * WebKit2.pro:
1019         * WebKit2.xcodeproj/project.pbxproj:
1020         * win/WebKit2.vcproj:
1021         * win/WebKit2Generated.make:
1022         Add files.
1023
1024 2010-09-01  Balazs Kelemen  <kb@inf.u-szeged.hu>
1025
1026         Reviewed by Kenneth Rohde Christiansen.
1027
1028         [Qt] Implement PluginInfoStore for UNIX
1029         https://bugs.webkit.org/show_bug.cgi?id=45038
1030
1031         This implementation is generally just reusing the logic in WebCore since
1032         there is no way to get informations from a UNIX plugin without loading it
1033         - in contrast to mac bundles and windows dll-s.
1034         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
1035         (WebKit::PluginInfoStore::pluginsDirectories):
1036         (WebKit::PluginInfoStore::pluginPathsInDirectory):
1037         (WebKit::PluginInfoStore::getPluginInfo):
1038         (WebKit::PluginInfoStore::shouldUsePlugin):
1039
1040 2010-09-01  Mark Rowe  <mrowe@apple.com>
1041
1042         Reviewed by Sam Weinig.
1043
1044         Allow the web process to load frameworks other than WebKit2.framework from the build directory
1045         when running engineering builds.
1046
1047         * WebProcess/mac/WebProcessMainMac.mm:
1048         (WebKit::WebProcessMain): Pass the path containing WebKit2.framework to the sandbox rather than
1049         the path of the WebKit2.framework itself.
1050
1051 2010-09-01  Sam Weinig  <sam@webkit.org>
1052
1053         Reviewed by John Sullivan.
1054
1055         Change ImmutableArray to be backed by a Vector
1056         https://bugs.webkit.org/show_bug.cgi?id=45064
1057
1058         Change ImmutableArray to be backed by a Vector to work toward having 
1059         a mutable subclass and to improve the API when working with it in WebKit2
1060         itself.
1061
1062         - Also remove WKArrayCreateAdoptingValues which was confusing and unused.
1063
1064         * Shared/ImmutableArray.cpp:
1065         (WebKit::ImmutableArray::ImmutableArray):
1066         (WebKit::ImmutableArray::~ImmutableArray):
1067         * Shared/ImmutableArray.h:
1068         (WebKit::ImmutableArray::adopt):
1069         (WebKit::ImmutableArray::at):
1070         (WebKit::ImmutableArray::size):
1071         * Shared/ImmutableDictionary.cpp:
1072         (WebKit::ImmutableDictionary::keys):
1073         * UIProcess/API/C/WKArray.cpp:
1074         * UIProcess/API/C/WKArray.h:
1075         * UIProcess/WebBackForwardList.cpp:
1076         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
1077         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
1078         * UIProcess/WebContext.cpp:
1079         (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
1080         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1081         (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
1082         * WebProcess/WebPage/WebFrame.cpp:
1083         (WebKit::WebFrame::childFrames):
1084
1085 2010-09-01  Sam Weinig  <sam@webkit.org>
1086
1087         Reviewed by Anders Carlsson.
1088
1089         Add URLResponse API for WebKit2
1090         https://bugs.webkit.org/show_bug.cgi?id=45062
1091
1092         Add WebURLResponse class and WKURLResponseRef C API to go with it. Right now,
1093         instance of WKURLResponseRef are manipulated via platform types just like
1094         WKURLRequestRef.
1095
1096         This just adds the type and conversion functions, no uses yet.
1097
1098         * Shared/APIObject.h:
1099         * Shared/WebCoreArgumentCoders.h:
1100         * Shared/WebURLResponse.cpp: Added.
1101         (WebKit::WebURLResponse::WebURLResponse):
1102         * Shared/WebURLResponse.h: Added.
1103         (WebKit::WebURLResponse::create):
1104         (WebKit::WebURLResponse::resourceResponse):
1105         (WebKit::WebURLResponse::type):
1106         * Shared/mac/WebCoreArgumentCodersMac.mm:
1107         (CoreIPC::encodeWithNSKeyedArchiver):
1108         (CoreIPC::decodeWithNSKeyedArchiver):
1109         (CoreIPC::encodeResourceRequest):
1110         (CoreIPC::decodeResourceRequest):
1111         * Shared/mac/WebURLResponseMac.mm: Added.
1112         (WebKit::WebURLResponse::WebURLResponse):
1113         (WebKit::WebURLResponse::platformResponse):
1114         * Shared/qt/WebURLResponseQt.cpp: Added.
1115         (WebKit::WebURLResponse::WebURLResponse):
1116         (WebKit::WebURLResponse::platformResponse):
1117         * Shared/win/WebURLResponseWin.cpp: Added.
1118         (WebKit::WebURLResponse::WebURLResponse):
1119         (WebKit::WebURLResponse::platformResponse):
1120         * UIProcess/API/C/WKURLResponse.cpp: Added.
1121         (WKURLResponseGetTypeID):
1122         * UIProcess/API/C/WKURLResponse.h: Added.
1123         * UIProcess/API/C/cf/WKURLResponseCF.cpp: Added.
1124         (WKURLResponseCreateWithCFURLResponse):
1125         (WKURLResponseCopyCFURLResponse):
1126         * UIProcess/API/C/cf/WKURLResponseCF.h: Added.
1127         * UIProcess/API/C/mac/WKURLResponseNS.h: Added.
1128         * UIProcess/API/C/mac/WKURLResponseNS.mm: Added.
1129         (WKURLResponseCreateWithNSURLResponse):
1130         (WKURLResponseCopyNSURLResponse):
1131         * WebKit2.pro:
1132         * WebKit2.xcodeproj/project.pbxproj:
1133         * win/WebKit2.vcproj:
1134         * win/WebKit2Generated.make:
1135
1136 2010-09-01  Andras Becsi  <abecsi@webkit.org>
1137
1138         Reviewed by Antti Koivisto.
1139
1140         [Qt] Auto-generate WebKit2 forwarding headers
1141         https://bugs.webkit.org/show_bug.cgi?id=44692
1142
1143         * DerivedSources.pro: let the generate-forwarding-headers.pl
1144         script generate forwarding headers.
1145         * generate-forwarding-headers.pl: Added.
1146
1147 2010-08-31  Dave Hyatt  <hyatt@apple.com>
1148
1149         Reviewed by Sam Weinig.
1150
1151         https://bugs.webkit.org/show_bug.cgi?id=44863
1152
1153         * WebProcess/WebPage/WebPage.cpp:
1154         (WebKit::WebPage::layoutIfNeeded):
1155
1156 2010-08-31  Jon Honeycutt  <jhoneycutt@apple.com>
1157
1158         Fix some copy/paste errors.
1159
1160         Reviewed by Steve Falkenburg.
1161
1162         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1163         (WebKit::InjectedBundlePageFormClient::textFieldDidEndEditing):
1164         Null check the correct callback.
1165         (WebKit::InjectedBundlePageFormClient::textDidChangeInTextField):
1166         Ditto.
1167         (WebKit::InjectedBundlePageFormClient::textDidChangeInTextArea):
1168         Ditto.
1169
1170 2010-08-31  Jon Honeycutt  <jhoneycutt@apple.com>
1171
1172         Crash when closing a page with a form field when using WebKit2.
1173
1174         Reviewed by Anders Carlsson.
1175
1176         The crash came from accessing a BundlePageFormClient that had been
1177         destroyed. The client was intended to be cleared by a call to
1178         WKBundlePageSetFormClient, but a null check there caused it not to be
1179         cleared.
1180
1181         I fixed this and all of the other WK "set client" functions.
1182
1183         * UIProcess/API/C/WKContext.cpp:
1184         (WKContextSetInjectedBundleClient):
1185         Return early if the caller passed a client with a version not equal to
1186         0.
1187         (WKContextSetHistoryClient):
1188         Ditto.
1189
1190         * UIProcess/API/C/WKPage.cpp:
1191         (WKPageSetPageLoaderClient):
1192         Ditto.
1193         (WKPageSetPagePolicyClient):
1194         Ditto.
1195         (WKPageSetPageFormClient):
1196         Ditto.
1197         (WKPageSetPageUIClient):
1198         Ditto.
1199
1200         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1201         (WKBundleSetClient):
1202         Ditto.
1203
1204         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1205         (WKBundlePageSetEditorClient):
1206         Ditto.
1207         (WKBundlePageSetFormClient):
1208         Ditto.
1209         (WKBundlePageSetLoaderClient):
1210         Ditto.
1211         (WKBundlePageSetUIClient):
1212         Ditto.
1213
1214 2010-08-31  Alexey Proskuryakov  <ap@apple.com>
1215
1216         Build fix.
1217
1218         * Shared/WebPreferencesStore.h: Actually remove encode(), which has been moved to WebPreferencesStore.cpp.
1219
1220 2010-08-31  Alexey Proskuryakov  <ap@apple.com>
1221
1222         Reviewed by Sam Weinig.
1223
1224         https://bugs.webkit.org/show_bug.cgi?id=42195
1225         <rdar://problem/8186761> WebKitTestRunner needs to support layoutTestController.setXSSAuditorEnabled
1226
1227         * Shared/WebPreferencesStore.cpp:
1228         (WebKit::WebPreferencesStore::WebPreferencesStore): Initialize xssAuditorEnabled.
1229         (WebKit::WebPreferencesStore::decode): Moved from header, added xssAuditorEnabled.
1230         (WebKit::WebPreferencesStore::encode): Ditto.
1231         (WebKit::WebPreferencesStore::overrideXSSAuditorEnabledForTestRunner): Set an override, so
1232         that decoding a WebPreferencesStore in the process will give the override result. WebProcess
1233         doesn't hold to WebPreferencesStore, so there are no existing ones to patch.
1234         (WebKit::WebPreferencesStore::removeTestRunnerOverrides): Remove the override.
1235
1236         * Shared/WebPreferencesStore.h: Added xssAuditorEnabled.
1237
1238         * UIProcess/API/C/WKPreferences.cpp:
1239         (WKPreferencesSetXSSAuditorEnabled):
1240         (WKPreferencesGetXSSAuditorEnabled):
1241         * UIProcess/API/C/WKPreferences.h:
1242         Added an API method to change xssAuditorEnabled preference.
1243
1244         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::preferencesDidChange): Added a comment
1245         explaining how making this method smarter could affect WebKitTestRunner.
1246
1247         * UIProcess/WebPreferences.cpp:
1248         (WebKit::WebPreferences::setXSSAuditorEnabled):
1249         (WebKit::WebPreferences::xssAuditorEnabled):
1250         * UIProcess/WebPreferences.h:
1251         Implemented xssAuditorEnabled preference accessors.
1252
1253         * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleOverrideXSSAuditorEnabledForTestRunner):
1254         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1255         Added a private methods to temporarily change xssAuditor setting from an injected bundle,
1256         not notifying UIProcess about the change.
1257
1258         * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner):
1259         * WebProcess/InjectedBundle/InjectedBundle.h:
1260         Change the setting in existing pages, and override it for future ones.
1261
1262         * WebProcess/WebPage/WebPage.cpp:
1263         (WebKit::WebPage::WebPage): Take xssAuditorEnabled from preferences store.
1264         (WebKit::WebPage::preferencesDidChange): If preferences change, forget our override. This only
1265         happens in WKRT when the next test begins.
1266
1267 2010-08-31  Sam Weinig  <sam@webkit.org>
1268
1269         Reviewed by Gavin Barraclough.
1270
1271         WebKitTestRunner needs layoutTestController.addUserStyleSheet
1272         https://bugs.webkit.org/show_bug.cgi?id=42680
1273
1274         WebKitTestRunner needs layoutTestController.addUserScript
1275         https://bugs.webkit.org/show_bug.cgi?id=42681
1276
1277         Improve UserContent APIs to allow passing null in the same places
1278         the WebKit1 API allowed. Add convenience function toWTFString to do
1279         WKStringRef conversion with correct null string behavior.
1280
1281         * UIProcess/API/C/WKAPICast.h:
1282         (toWTFString):
1283         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1284         (WKBundleAddUserScript):
1285         (WKBundleAddUserStyleSheet):
1286         (WKBundleRemoveUserScript):
1287         (WKBundleRemoveUserStyleSheet):
1288         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1289         (WebKit::toStringVector):
1290
1291 2010-08-31  Steve Falkenburg  <sfalken@apple.com>
1292
1293         Rubber stamped by Sam Weinig.
1294
1295         Remove library directive from def file to fix Debug_All build.
1296
1297         * win/WebKit2.def:
1298
1299 2010-08-31  Adam Roben  <aroben@apple.com>
1300
1301         Handle WM_PRINTCLIENT in WebKit2 on Windows
1302
1303         Reviewed by Sam Weinig.
1304
1305         * UIProcess/win/WebView.cpp:
1306         (WebKit::WebView::wndProc): Call through to onPrintClientEvent when we
1307         get a WM_PRINTCLIENT message.
1308         (WebKit::WebView::onPrintClientEvent): Added. Paints the entire view
1309         into the HDC provided by Windows.
1310
1311         * UIProcess/win/WebView.h: Added onPrintClientEvent.
1312
1313 2010-08-27  Adam Roben  <aroben@apple.com>
1314
1315         Don't send messages to the injected bundle if the web process has
1316         exited
1317
1318         Fixes <http://webkit.org/b/43046> <rdar://problem/8239455> Crash in
1319         WKContextPostMessageToInjectedBundle if the web process has exited
1320
1321         Reviewed by Sam Weinig.
1322
1323         * UIProcess/WebContext.cpp:
1324         (WebKit::WebContext::postMessageToInjectedBundle): Only send messages
1325         when we have a valid web process.
1326
1327 2010-08-27  Adam Roben  <aroben@apple.com>
1328
1329         Use the Windows thread pool instead of a dedicated thread for
1330         WorkQueue on Windows
1331
1332         WorkQueue now uses ::RegisterWaitForSingleObject to find out when work
1333         items need to be executed. This causes Windows to wait on the objects
1334         on a thread pool wait thread, and then to spawn a thread pool worker
1335         thread when an object is signaled. This is more efficient than using
1336         our own dedicated thread to perform the wait and the work because
1337         multiple WorkQueues (and even other parts of WebKit or other modules)
1338         can all share the same wait thread and worker thread pool.
1339
1340         Each time WorkQueue::m_performWorkEvent or any handle in
1341         WorkQueue::m_handles is signaled, a worker thread will be spawned.
1342         To maintain WorkQueue's serial nature, only one worker thread is
1343         allowed to perform work items at a time. (The worker thread that is
1344         actually performing work items is called the queue's "work thread".)
1345         To accomplish this, worker threads must register as the queue's work
1346         thread before performing work items.
1347         WorkQueue::m_isWorkThreadRegistered is used as an atomic guard to make
1348         sure that only one worker thread is registered at a time.
1349         
1350         Fixes <http://webkit.org/b/43150> <rdar://problem/8247280>.
1351
1352         Reviewed by Anders Carlsson.
1353
1354         * Platform/WorkQueue.h:
1355           - Added the WorkItemWin class, which is used to wrap WorkItems for
1356             WorkQueue's Windows implementation
1357           - Changed m_workItemQueue and m_handles to hold
1358             RefPtr<WorkItemWin>s
1359           - Replaced "work queue thread"-related members with new members that
1360             handle our thread pool code
1361
1362         * Platform/win/WorkQueueWin.cpp:
1363         (WorkQueue::WorkItemWin::WorkItemWin):
1364         (WorkQueue::WorkItemWin::create):
1365         Added simple constructor/creator.
1366
1367         (WorkQueue::handleCallback): Added. This function is called whenever a
1368         handle in WorkQueue::m_handles is signaled. We add the WorkItemWin
1369         that corresponds to the handle (passed via the context parameter) to
1370         the work item queue, then try to register as the work thread and
1371         perform any queued work. If another thread is already registered as
1372         the work thread, we just exit and let that thread handle the work we
1373         queued.
1374         (WorkQueue::registerHandle): Changed to wrap the WorkItem in a
1375         WorkItemWin, and to use ::RegisterWaitForSingleObject to wait on the
1376         handle.
1377         (WorkQueue::eventCallback): Added. This function is called whenever
1378         m_performWorkEvent is signaled. We try to register as the work thread
1379         and perfom any queued work. If another thread is already registered as
1380         the work thread, we just exit and let that thread handle the work.
1381         (WorkQueue::performWorkOnRegisteredWorkThread): Added. Performs any
1382         queued work in a loop until either the queue becomes invalid or no
1383         work is left to perform. Unregisters as the work thread before exiting
1384         so that other threads can perform work in the future.
1385         (WorkQueue::platformInitialize): Added initialization of
1386         m_isWorkThreadRegistered. Replaced code to spawn the old work queue
1387         thread with a call to ::RegisterWaitForSingleObject so that a worker
1388         thread from the thread pool will be spawned when m_performWorkEvent is
1389         signaled.
1390         (WorkQueue::tryRegisterAsWorkThread): Added. Attempts an atomic
1391         compare-and-swap to change m_isWorkThreadRegistered from 0 to 1. If
1392         sucessful, we return true to indicate that this thread is now
1393         registered as the work thread.
1394         (WorkQueue::unregisterAsWorkThread): Added. Uses an atomic
1395         compare-and-swap to change m_isWorkThreadRegistered back from 1 to 0.
1396         (WorkQueue::scheduleWork): Changed to wrap the WorkItem in a
1397         WorkItemWin. Also added an optimization to avoid signaling
1398         m_performWorkEvent when a work thread is already performing work, as
1399         it will pick up the item we just queued without us having to do
1400         anything.
1401
1402 2010-08-31  Csaba Osztrogonác  <ossy@webkit.org>
1403
1404         Reviewed by Antonio Gomes.
1405
1406         [Qt] Fix warnings in WebKit2 directory
1407         https://bugs.webkit.org/show_bug.cgi?id=44593
1408
1409         * Platform/CoreIPC/qt/ConnectionQt.cpp: Mark unused variables for compiler.
1410         (CoreIPC::Connection::readyReadHandler):
1411         (CoreIPC::Connection::sendOutgoingMessage):
1412         * Shared/qt/WebEventFactoryQt.cpp:
1413         (WebKit::WebEventFactory::createWebTouchEvent): Initialize state variable. Default case added.
1414         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
1415         (WebKit::toNP): Return initialized NPEvent.
1416
1417 2010-08-31  Andras Becsi  <abecsi@webkit.org>
1418
1419         Reviewed by Antonio Gomes.
1420
1421         [Qt] Determine application path of MiniBrowser at runtime and use that path
1422         for QtWebProcess if the executable exists in that path.
1423
1424         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1425         (WebKit::ProcessLauncherHelper::launch):
1426
1427 2010-08-31  Zoltan Horvath  <zoltan@webkit.org>
1428
1429         Build fix after r66448 on WebKit2.
1430
1431         [Qt] qt_wk_didFinishDocumentLoadForFrame needs to be implemented 
1432         https://bugs.webkit.org/show_bug.cgi?id=44934
1433
1434         * UIProcess/API/qt/ClientImpl.cpp:
1435         (qt_wk_didFinishDocumentLoadForFrame):
1436         * UIProcess/API/qt/ClientImpl.h:
1437
1438 2010-08-30  Alice Liu  <alice.liu@apple.com>
1439
1440         Reviewed by Darin Adler.
1441
1442         Add missing parts of didFinishDocumentLoadForFrame
1443         https://bugs.webkit.org/show_bug.cgi?id=44913
1444
1445         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Added new kind
1446         * UIProcess/API/C/WKPage.h:
1447         * UIProcess/API/qt/qwkpage.cpp:
1448         (QWKPage::QWKPage): Updated struct
1449         * UIProcess/WebLoaderClient.cpp:
1450         (WebKit::WebLoaderClient::didFinishDocumentLoadForFrame): Added
1451         * UIProcess/WebLoaderClient.h:
1452         * UIProcess/WebPageProxy.cpp:
1453         (WebKit::WebPageProxy::didReceiveMessage): Added case for WebPageProxyMessage::DidFinishDocumentLoadForFrame
1454         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Added
1455         * UIProcess/WebPageProxy.h:
1456
1457         Just rearranging existing code in these:
1458         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1459         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1460         (WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
1461         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1462
1463 2010-08-30  Sam Weinig  <sam@webkit.org>
1464
1465         Try and fix the WebKit2 buildbot.
1466
1467         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1468         (InitWebCoreSystemInterface): Add missing initialization of QTMovieDisableComponent.
1469
1470 2010-08-30  Sam Weinig  <sam@webkit.org>
1471
1472         Reviewed by Anders Carlsson.
1473
1474         Add URLRequest API for WebKit2
1475         https://bugs.webkit.org/show_bug.cgi?id=44910
1476
1477         Add WebURLRequest class and WKURLRequestRef C API to go with it. Right now,
1478         instance of WKURLRequestRef are manipulated via platform types, a la the
1479         WKStringRef and WKURLRef types.
1480
1481         - Pipes WKPageLoadURLRequest through to the WebProcess.
1482
1483         * Shared/APIObject.h:
1484         * Shared/CoreIPCSupport/WebPageMessageKinds.h:
1485         * Shared/WebCoreArgumentCoders.h:
1486         * Shared/WebURLRequest.cpp: Added.
1487         (WebKit::WebURLRequest::WebURLRequest):
1488         * Shared/WebURLRequest.h: Added.
1489         (WebKit::WebURLRequest::create):
1490         (WebKit::WebURLRequest::resourceRequest):
1491         (WebKit::WebURLRequest::type):
1492         * Shared/mac/WebCoreArgumentCodersMac.mm: Added.
1493         (CoreIPC::encodeResourceRequest):
1494         (CoreIPC::decodeResourceRequest):
1495         * Shared/mac/WebURLRequestMac.mm: Added.
1496         (WebKit::WebURLRequest::WebURLRequest):
1497         (WebKit::WebURLRequest::platformRequest):
1498         * Shared/qt/WebCoreArgumentCodersQt.cpp: Added.
1499         (CoreIPC::encodeResourceRequest):
1500         (CoreIPC::decodeResourceRequest):
1501         * Shared/qt/WebURLRequestQt.cpp: Added.
1502         (WebKit::WebURLRequest::WebURLRequest):
1503         (WebKit::WebURLRequest::platformRequest):
1504         * Shared/win/WebCoreArgumentCodersWin.cpp: Added.
1505         (CoreIPC::encodeResourceRequest):
1506         (CoreIPC::decodeResourceRequest):
1507         * Shared/win/WebURLRequestWin.cpp: Added.
1508         (WebKit::WebURLRequest::WebURLRequest):
1509         (WebKit::WebURLRequest::platformRequest):
1510         * UIProcess/API/C/WKAPICast.h:
1511         * UIProcess/API/C/WKBase.h:
1512         * UIProcess/API/C/WKPage.cpp:
1513         (WKPageLoadURLRequest):
1514         * UIProcess/API/C/WKPage.h:
1515         * UIProcess/API/C/WKURLRequest.cpp: Added.
1516         (WKURLRequestGetTypeID):
1517         * UIProcess/API/C/WKURLRequest.h: Added.
1518         * UIProcess/API/C/WebKit2.h:
1519         * UIProcess/API/C/cf/WKURLRequestCF.cpp: Added.
1520         (WKURLRequestCreateWithCFURLRequest):
1521         (WKURLRequestCopyCFURLRequest):
1522         * UIProcess/API/C/cf/WKURLRequestCF.h: Added.
1523         * UIProcess/API/C/mac: Added.
1524         * UIProcess/API/C/mac/WKURLRequestNS.h: Added.
1525         * UIProcess/API/C/mac/WKURLRequestNS.mm: Added.
1526         (WKURLRequestCreateWithNSURLRequest):
1527         (WKURLRequestCopyNSURLRequest):
1528         * UIProcess/WebPageProxy.cpp:
1529         (WebKit::WebPageProxy::loadURL):
1530         (WebKit::WebPageProxy::loadURLRequest):
1531         * UIProcess/WebPageProxy.h:
1532         * WebKit2.pro:
1533         * WebKit2.xcodeproj/project.pbxproj:
1534         * WebProcess/WebPage/WebPage.cpp:
1535         (WebKit::WebPage::loadURL):
1536         (WebKit::WebPage::loadURLRequest):
1537         (WebKit::WebPage::didReceiveMessage):
1538         * WebProcess/WebPage/WebPage.h:
1539         * win/WebKit2.vcproj:
1540         * win/WebKit2Generated.make:
1541
1542 2010-08-30  Anders Carlsson  <andersca@apple.com>
1543
1544         Reviewed by Sam Weinig.
1545
1546         WorkQueue leaks its dispatch queue
1547         <rdar://problem/8358509>
1548         https://bugs.webkit.org/show_bug.cgi?id=44689
1549
1550         * Platform/mac/WorkQueueMac.cpp:
1551         (WorkQueue::platformInvalidate):
1552
1553 2010-08-27  Sam Weinig  <sam@webkit.org>
1554
1555         Reviewed by Dan Bernstein.
1556
1557         Add UserContent API to WebKit2 InjectedBundle
1558         <rdar://problem/8367587>
1559         https://bugs.webkit.org/show_bug.cgi?id=44810
1560
1561         The new API differs from the version in WebKit1 in that the function do not take
1562         a group name since we currently do not expose a way to make multiple PageGroups in
1563         the API.
1564
1565         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1566         (toUserScriptInjectionTime):
1567         (toUserContentInjectedFrames):
1568         Add conversion functions for enums.
1569
1570         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1571         (WKBundleAddUserScript):
1572         (WKBundleAddUserStyleSheet):
1573         (WKBundleRemoveUserScript):
1574         (WKBundleRemoveUserStyleSheet):
1575         (WKBundleRemoveUserScripts):
1576         (WKBundleRemoveUserStyleSheets):
1577         (WKBundleRemoveAllUserContent):
1578         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1579         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1580         (WebKit::toStringVector):
1581         (WebKit::InjectedBundle::addUserScript):
1582         (WebKit::InjectedBundle::addUserStyleSheet):
1583         (WebKit::InjectedBundle::removeUserScript):
1584         (WebKit::InjectedBundle::removeUserStyleSheet):
1585         (WebKit::InjectedBundle::removeUserScripts):
1586         (WebKit::InjectedBundle::removeUserStyleSheets):
1587         (WebKit::InjectedBundle::removeAllUserContent):
1588         * WebProcess/InjectedBundle/InjectedBundle.h:
1589         Forward API to PageGroup.
1590
1591         * WebProcess/WebProcess.cpp:
1592         (WebKit::WebProcess::sharedPageGroup):
1593         (WebKit::WebProcess::visitedLinkStateChanged):
1594         (WebKit::WebProcess::allVisitedLinkStateChanged):
1595         * WebProcess/WebProcess.h: Ad accessor for global PageGroup.
1596
1597 2010-08-27  Sam Weinig  <sam@webkit.org>
1598
1599         Reviewed by Gavin Barraclough.
1600
1601         Move WKBundle didCreatePage callback to outside the WebPage
1602         constructor to avoid adoptRef errors.
1603
1604         * WebProcess/WebPage/WebPage.cpp:
1605         (WebKit::WebPage::create):
1606         (WebKit::WebPage::WebPage):
1607
1608 2010-08-27  Brady Eidson  <beidson@apple.com>
1609
1610         Reviewed by Sam Weinig.
1611
1612         <rdar://problem/8147879> - Null URL passed to WebKit2 HistoryDelegate
1613
1614         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1615         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): WK2 now loads initial about:blank document's synchronously,
1616           without consulting the policy delegate.
1617         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
1618
1619 2010-08-27  Adam Roben  <aroben@apple.com>
1620
1621         Handle ERROR_IO_INCOMPLETE more correctly in Connection
1622
1623         We still don't know exactly why we're getting this error, but at least
1624         we can do something sensible when we do.
1625
1626         Fixes <http://webkit.org/b/44776> Occasional crash in
1627         Connection::readEventHandler or assertion failure in
1628         Connection::writeEventHandler due to ERROR_IO_INCOMPLETE
1629
1630         Reviewed by Sam Weinig.
1631
1632         * Platform/CoreIPC/win/ConnectionWin.cpp:
1633         (CoreIPC::Connection::readEventHandler): Bail out of this function
1634         entirely when we get ERROR_IO_INCOMPLETE. We'll get called back later
1635         when the read completes. Continuing in the function at this point
1636         would cause us to treat an incomplete read as a complete one, leading
1637         to a crash. Added an assertion to make the crash more understandable
1638         in the future.
1639         (CoreIPC::Connection::writeEventHandler): Bail out when we get
1640         ERROR_IO_INCOMPLETE. We'll get called back later when the write
1641         completes.
1642
1643 2010-08-27  Adam Roben  <aroben@apple.com>
1644
1645         Make the web process pause on launch when the
1646         WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH environment variable is set
1647
1648         This is a bit easier to use than holding Ctrl-Alt-Shift during launch,
1649         since the process can sometimes take a long time to launch under the
1650         debugger. Ctrl-Alt-Shift still works, however.
1651
1652         Fixes <http://webkit.org/b/44774> Would like an easier way to pause
1653         the web process on launch
1654
1655         Reviewed by Sam Weinig.
1656
1657         * WebProcess/WebKitMain.cpp:
1658         (WebKitMain):
1659
1660 2010-08-27  Sam Weinig  <sam@webkit.org>
1661
1662         Rubber-stamped by Adam Roben.
1663
1664         * WebKit2.xcodeproj/project.pbxproj: Make WKBundleScriptWorld.h public.
1665
1666 2010-08-26  Daniel Bates  <dbates@rim.com>
1667
1668         Attempt to fix the Qt WebKit2 build.
1669
1670         * WebProcess/WebPage/qt/WebPageQt.cpp:
1671         (WebKit::WebPage::performDefaultBehaviorForKeyEvent): Pass m_page.get() to WebKit::scroll()
1672         instead of m_page since it expects a raw pointer.
1673
1674 2010-08-26  Gavin Barraclough  <barraclough@apple.com>
1675
1676         Speculative windows build fix.
1677
1678         * UIProcess/win/WebView.cpp:
1679         (WebKit::WebView::WebView):
1680
1681 2010-08-26  Sam Weinig  <sam@webkit.org>
1682
1683         Reviewed by Darin Adler.
1684
1685         Adopt more uses OwnPtr/OwnArray in WebKit2.
1686         https://bugs.webkit.org/show_bug.cgi?id=44728
1687
1688         Also clears up weird create vs. adoption semantics. Now both create
1689         and adopt both don't ref their pointers, adoption is just about the
1690         buffer.
1691
1692         * Shared/ImmutableArray.cpp:
1693         (WebKit::ImmutableArray::ImmutableArray):
1694         (WebKit::ImmutableArray::~ImmutableArray):
1695         * Shared/ImmutableArray.h:
1696         (WebKit::ImmutableArray::adopt):
1697         * Shared/ImmutableDictionary.cpp:
1698         (WebKit::ImmutableDictionary::keys):
1699         * Shared/WebData.h:
1700         * UIProcess/API/mac/PageClientImpl.h:
1701         * UIProcess/API/mac/PageClientImpl.mm:
1702         (WebKit::PageClientImpl::create):
1703         * UIProcess/API/mac/WKView.mm:
1704         (-[WKView initWithFrame:pageNamespaceRef:]):
1705         (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaProxy::]):
1706         * UIProcess/API/qt/qgraphicswkview.cpp:
1707         (QGraphicsWKView::QGraphicsWKView):
1708         * UIProcess/API/qt/qwkpage.cpp:
1709         (QWKPagePrivate::init):
1710         * UIProcess/API/qt/qwkpage_p.h:
1711         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1712         (WebKit::ChunkedUpdateDrawingAreaProxy::create):
1713         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1714         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1715         (WebKit::LayerBackedDrawingAreaProxy::create):
1716         * UIProcess/LayerBackedDrawingAreaProxy.h:
1717         * UIProcess/WebBackForwardList.cpp:
1718         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
1719         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
1720         * UIProcess/WebContext.cpp:
1721         (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
1722         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1723         (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
1724         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1725         (WebKit::WebChromeClient::createPopupMenu):
1726         (WebKit::WebChromeClient::createSearchPopupMenu):
1727         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
1728         (WebKit::WebPopupMenu::create):
1729         * WebProcess/WebCoreSupport/WebPopupMenu.h:
1730         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
1731         (WebKit::WebSearchPopupMenu::create):
1732         (WebKit::WebSearchPopupMenu::WebSearchPopupMenu):
1733         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h:
1734         * WebProcess/WebPage/WebFrame.cpp:
1735         (WebKit::WebFrame::childFrames):
1736         * WebProcess/WebPage/WebPage.cpp:
1737         (WebKit::WebPage::WebPage):
1738         (WebKit::WebPage::close):
1739         * WebProcess/WebPage/WebPage.h:
1740         (WebKit::WebPage::corePage):
1741         * WebProcess/WebPage/mac/WebPageMac.mm:
1742         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1743         * WebProcess/WebPage/win/WebPageWin.cpp:
1744         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1745
1746 2010-08-26  Alexey Proskuryakov  <ap@apple.com>
1747
1748         Reviewed by Sam Weinig.
1749
1750         https://bugs.webkit.org/show_bug.cgi?id=44726
1751         <rdar://problem/7935518> WebFrameProxies aren't destroyed until a page is destroyed
1752
1753         Since frames can be moved across documents, they are not really a Page level concept.
1754         Moved frame tracking to WebProcess/WebProcessProxy.
1755
1756         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
1757         (WebProcessProxyMessage::):
1758         * UIProcess/WebPageProxy.cpp:
1759         (WebKit::WebPageProxy::close):
1760         (WebKit::WebPageProxy::getStatistics):
1761         (WebKit::WebPageProxy::didReceiveMessage):
1762         (WebKit::WebPageProxy::didReceiveSyncMessage):
1763         (WebKit::WebPageProxy::didCreateMainFrame):
1764         (WebKit::WebPageProxy::didCreateSubFrame):
1765         (WebKit::WebPageProxy::processDidExit):
1766         * UIProcess/WebPageProxy.h:
1767         * UIProcess/WebProcessProxy.cpp:
1768         (WebKit::WebProcessProxy::didReceiveMessage):
1769         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1770         (WebKit::WebProcessProxy::didClose):
1771         (WebKit::WebProcessProxy::webFrame):
1772         (WebKit::WebProcessProxy::frameCreated):
1773         (WebKit::WebProcessProxy::frameDestroyed):
1774         (WebKit::WebProcessProxy::disconnectFramesFromPage):
1775         (WebKit::WebProcessProxy::frameCountInPage):
1776         * UIProcess/WebProcessProxy.h:
1777         * WebProcess/WebPage/WebFrame.cpp:
1778         (WebKit::WebFrame::WebFrame):
1779         (WebKit::WebFrame::invalidate):
1780         * WebProcess/WebPage/WebPage.cpp:
1781         (WebKit::WebPage::didReceiveMessage):
1782         * WebProcess/WebPage/WebPage.h:
1783         * WebProcess/WebProcess.cpp:
1784         (WebKit::WebProcess::webFrame):
1785         (WebKit::WebProcess::addWebFrame):
1786         (WebKit::WebProcess::removeWebFrame):
1787         * WebProcess/WebProcess.h:
1788
1789 2010-08-26  Sam Weinig  <sam@webkit.org>
1790
1791         Reviewed by Darin Adler.
1792
1793         Add PassOwnArrayPtr
1794         https://bugs.webkit.org/show_bug.cgi?id=44627
1795
1796         * UIProcess/WebContext.cpp:
1797         (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
1798         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1799         (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
1800
1801 2010-08-26  Peter Kasting  <pkasting@google.com>
1802
1803         Reviewed by Dimitri Glazkov.
1804
1805         Misc. cleanup split off from bug 32356.
1806         https://bugs.webkit.org/show_bug.cgi?id=44696
1807
1808         * WebProcess/WebPage/qt/WebPageQt.cpp:
1809         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1810
1811 2010-08-25  Brent Fulgham  <bfulgham@webkit.org>
1812
1813         Build fix, no review.
1814
1815         Add conditional guards around Safari-specific
1816         include files.
1817
1818         * WebProcess/WebPage/win/WebPageWin.cpp:
1819
1820 2010-08-25  Adam Roben  <aroben@apple.com>
1821
1822         Clean up Connection::open on Windows
1823
1824         Fixes <http://webkit.org/b/44185>.
1825
1826         Reviewed by Steve Falkenburg.
1827
1828         * Platform/CoreIPC/win/ConnectionWin.cpp:
1829         (CoreIPC::Connection::platformInitialize): Set m_isConnected to true
1830         since the pipe got connected before it was even given to us.
1831         (CoreIPC::Connection::readEventHandler): Removed code that will never
1832         run now that m_isConnected is always true when this function is
1833         called. Since no outgoing messages will have been queued before
1834         m_isConnected is set to true, there's no need to send them explicitly
1835         here; they'll get sent as they're queued.
1836         (CoreIPC::Connection::open): Removed the call to ::ConnectNamedPipe,
1837         since the pipe is already connected by this point. Changed to schedule
1838         a read in the server and client the same way (rather than using
1839         ::SetEvent in the server).
1840
1841 2010-08-19  Adam Roben  <aroben@apple.com>
1842
1843         Call NP_GetEntryPoints before NP_Initialize on Windows
1844
1845         Doing otherwise will cause Flash and QuickTime to crash inside
1846         NP_Initialize.
1847
1848         Fixes <http://webkit.org/b/44270> <rdar://problem/8330393> Crash in
1849         NP_Initialize when loading QuickTime when running
1850         plugins/embed-attributes-setting.html in WebKit2 on Windows
1851
1852         Reviewed by John Sullivan.
1853
1854         * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
1855         (WebKit::NetscapePluginModule::tryLoad): On Windows, first call
1856         NP_GetEntryPoints, then NP_Initialize. Do the reverse on Mac to
1857         prevent Silverlight (e.g.) from crashing (see r38858).
1858
1859 2010-08-25  Balazs Kelemen  <kb@inf.u-szeged.hu>
1860
1861         Reviewed by Kenneth Rohde Christiansen.
1862
1863         [Qt] Implement WebKit::Module for qt
1864         https://bugs.webkit.org/show_bug.cgi?id=44527
1865
1866         * Platform/Module.h:
1867         * Platform/qt/ModuleQt.cpp:
1868         (WebKit::Module::load):
1869         (WebKit::Module::unload):
1870         (WebKit::Module::platformFunctionPointer):
1871
1872 2010-08-24  Sam Weinig  <sam@webkit.org>
1873
1874         Reviewed by Mark Rowe.
1875
1876         WebKit2 should launch the WebProcess in 32-bit mode if the UIProcess is in 32-bit mode
1877         <rdar://problem/8348100>
1878         https://bugs.webkit.org/show_bug.cgi?id=44537
1879
1880         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1881         (WebKit::ProcessLauncher::launchProcess): Use posix_spawnattr_setbinpref_np
1882         to tell posix_spawn to launch the WebProcess in 32-bit mode when the UIProcess
1883         is running in 32-bit mode.
1884
1885 2010-08-24  Mark Rowe  <mrowe@apple.com>
1886
1887         Rubber-stamped by Sam Weinig.
1888
1889         Set the install path of WebKit2.framework to the build directory for debug and release builds
1890         to match our other frameworks.
1891
1892         * WebKit2.xcodeproj/project.pbxproj:
1893
1894 2010-08-24  Sam Weinig  <sam@webkit.org>
1895
1896         Reviewed by John Sullivan.
1897
1898         Update profile.
1899
1900         * WebProcess/com.apple.WebProcess.sb:
1901
1902 2010-08-23  Darin Adler  <darin@apple.com>
1903
1904         Reviewed by Geoff Garen.
1905
1906         * WebProcess/InjectedBundle/API/c/WKBundleNode.cpp:
1907         (WKBundleNodeGetParent): Update since parent now returns a
1908         ContainerNode*. The toRef function is a bit too picky to convert
1909         it without a bit of help.
1910
1911 2010-08-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1912
1913         Unreviewed, rolling out r65703.
1914         http://trac.webkit.org/changeset/65703
1915         https://bugs.webkit.org/show_bug.cgi?id=44460
1916
1917         "Causing lots of crashes on Snow Leopard when running the
1918         layout tests" (Requested by eseidel2 on #webkit).
1919
1920         * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
1921         (WebKit::NetscapePluginModule::tryLoad):
1922
1923 2010-08-23  Jon Honeycutt  <jhoneycutt@apple.com>
1924
1925         Layout tests do not run when using WebKitTestRunner in a Debug build.
1926         https://bugs.webkit.org/show_bug.cgi?id=44409
1927
1928         Reviewed by Dan Bernstein.
1929
1930         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
1931         (WebKit::ProcessLauncher::launchProcess):
1932         Use WebKit2WebProcess_debug.exe when building Debug.
1933
1934 2010-08-23  Daniel Bates  <dbates@rim.com>
1935
1936         Rubber-stamped by Adam Roben.
1937
1938         Substitute "sizeof("javascript:") - 1" for the hardcoded constant 11 when
1939         extracting the JavaScript code portion of a JavaScript URL so as to make
1940         it clearer that the 11 represents the length of the scheme portion of
1941         a JavaScript URL.
1942
1943         * WebProcess/Plugins/PluginView.cpp:
1944         (WebKit::PluginView::performJavaScriptURLRequest):
1945
1946 2010-08-23  Balazs Kelemen  <kb@inf.u-szeged.hu>
1947
1948         Reviewed by Ariya Hidayat.
1949
1950         [Qt] Find needed forwarding headers for WebKit2 automatically
1951         https://bugs.webkit.org/show_bug.cgi?id=44336
1952
1953         * DerivedSources.pro: Use the new enumerate-included-framework-headers script for generating
1954         the list of forwarding headers we want to create.
1955
1956 2010-08-23  Zoltan Horvath  <zoltan@webkit.org>
1957
1958         [Qt] Build fix.
1959
1960         * DerivedSources.pro:
1961         * WebKit2.pro:
1962         * WebProcess/Plugins/Netscape/qt: Added.
1963         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: Added.
1964         (WebKit::NetscapePlugin::platformPostInitialize):
1965         (WebKit::NetscapePlugin::platformPaint):
1966         (WebKit::toNP):
1967         (WebKit::NetscapePlugin::platformHandleMouseEvent):
1968         (WebKit::NetscapePlugin::platformHandleWheelEvent):
1969         (WebKit::NetscapePlugin::platformSetFocus):
1970         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
1971         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
1972
1973 2010-08-22  Juha Savolainen  <juha.savolainen@weego.fi>
1974
1975         Reviewed by Kenneth Rohde Christiansen.
1976
1977         [Qt] Add QTouchEvents support for WebKit2
1978         https://bugs.webkit.org/show_bug.cgi?id=44330
1979
1980         This patch adds support for QTouchEvents in WebKit2. A new WebEvent-class
1981         is created for touchevents, WebTouchEvent. Also touchpoints needed a new
1982         class, WebPlatformTouchPoint. This is similar solution like in other
1983         events(like MouseEvent) on WebKit2. These classes are introduced in WebEvent.h 
1984         Also there was a need to create an empty constructor to PlatformTouchPoint-class.
1985
1986         * DerivedSources.pro:
1987         * Shared/CoreIPCSupport/WebPageMessageKinds.h:
1988         (WebPageMessage::):
1989         * Shared/WebEvent.h:
1990         (WebKit::WebEvent::):
1991         (WebKit::WebTouchPoint::):
1992         (WebKit::WebTouchPoint::WebTouchPoint):
1993         (WebKit::WebTouchPoint::id):
1994         (WebKit::WebTouchPoint::state):
1995         (WebKit::WebTouchPoint::screenPosX):
1996         (WebKit::WebTouchPoint::screenPosY):
1997         (WebKit::WebTouchPoint::posX):
1998         (WebKit::WebTouchPoint::posY):
1999         (WebKit::WebTouchPoint::setState):
2000         (WebKit::WebTouchPoint::encode):
2001         (WebKit::WebTouchPoint::decode):
2002         (WebKit::WebTouchEvent::WebTouchEvent):
2003         (WebKit::WebTouchEvent::type):
2004         (WebKit::WebTouchEvent::touchPoints):
2005         (WebKit::WebTouchEvent::encode):
2006         (WebKit::WebTouchEvent::decode):
2007         (WebKit::WebTouchEvent::isTouchEventType):
2008         * Shared/WebEventConversion.cpp:
2009         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
2010         (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
2011         (WebKit::platform):
2012         * Shared/WebEventConversion.h:
2013         * Shared/qt/WebEventFactoryQt.cpp:
2014         (WebKit::webEventTypeForEvent):
2015         (WebKit::WebEventFactory::createWebTouchEvent):
2016         * Shared/qt/WebEventFactoryQt.h:
2017         * UIProcess/API/qt/qgraphicswkview.cpp:
2018         (QGraphicsWKView::event):
2019         (QGraphicsWKView::touchEvent):
2020         * UIProcess/API/qt/qgraphicswkview.h:
2021         * UIProcess/API/qt/qwkpage.cpp:
2022         (QWKPagePrivate::touchEvent):
2023         * UIProcess/API/qt/qwkpage_p.h:
2024         * UIProcess/WebPageProxy.cpp:
2025         (WebKit::WebPageProxy::touchEvent):
2026         * UIProcess/WebPageProxy.h:
2027         * WebProcess/WebPage/WebPage.cpp:
2028         (WebKit::WebPage::touchEvent):
2029         (WebKit::WebPage::didReceiveMessage):
2030         * WebProcess/WebPage/WebPage.h:
2031
2032 2010-08-21  Sam Weinig  <sam@webkit.org>
2033
2034         Reviewed by Dan Bernstein.
2035
2036         Remove specialized retain/release functions in favor of a single one for WKTypeRefs
2037         https://bugs.webkit.org/show_bug.cgi?id=44386
2038
2039         * UIProcess/API/C/WKArray.cpp:
2040         (WKArrayGetSize):
2041         * UIProcess/API/C/WKArray.h:
2042         * UIProcess/API/C/WKBackForwardList.cpp:
2043         (WKBackForwardListCopyForwardListWithLimit):
2044         * UIProcess/API/C/WKBackForwardList.h:
2045         * UIProcess/API/C/WKBackForwardListItem.cpp:
2046         (WKBackForwardListItemCopyTitle):
2047         * UIProcess/API/C/WKBackForwardListItem.h:
2048         * UIProcess/API/C/WKBase.h:
2049         * UIProcess/API/C/WKContext.cpp:
2050         * UIProcess/API/C/WKContext.h:
2051         * UIProcess/API/C/WKData.cpp:
2052         (WKDataGetSize):
2053         * UIProcess/API/C/WKData.h:
2054         * UIProcess/API/C/WKDictionary.cpp:
2055         (WKDictionaryCopyKeys):
2056         * UIProcess/API/C/WKDictionary.h:
2057         * UIProcess/API/C/WKError.h:
2058         * UIProcess/API/C/WKFormSubmissionListener.cpp:
2059         (WKFormSubmissionListenerContinue):
2060         * UIProcess/API/C/WKFormSubmissionListener.h:
2061         * UIProcess/API/C/WKFrame.cpp:
2062         (WKFrameGetPage):
2063         * UIProcess/API/C/WKFrame.h:
2064         * UIProcess/API/C/WKFramePolicyListener.cpp:
2065         (WKFramePolicyListenerIgnore):
2066         * UIProcess/API/C/WKFramePolicyListener.h:
2067         * UIProcess/API/C/WKNavigationData.cpp:
2068         (WKNavigationDataCopyURL):
2069         * UIProcess/API/C/WKNavigationData.h:
2070         * UIProcess/API/C/WKPage.cpp:
2071         * UIProcess/API/C/WKPage.h:
2072         * UIProcess/API/C/WKPageNamespace.cpp:
2073         (WKPageNamespaceGetContext):
2074         * UIProcess/API/C/WKPageNamespace.h:
2075         * UIProcess/API/C/WKPreferences.cpp:
2076         (WKPreferencesCreate):
2077         (WKPreferencesGetLocalStorageEnabled):
2078         * UIProcess/API/C/WKPreferences.h:
2079         * UIProcess/API/C/WKString.cpp:
2080         * UIProcess/API/C/WKString.h:
2081         * UIProcess/API/C/WKType.cpp:
2082         (WKRetain):
2083         (WKRelease):
2084         * UIProcess/API/C/WKType.h:
2085         * UIProcess/API/C/WKURL.cpp:
2086         (WKURLGetTypeID):
2087         * UIProcess/API/C/WKURL.h:
2088         * UIProcess/API/cpp/WKRetainPtr.h:
2089         * UIProcess/API/win/WKView.cpp:
2090         * UIProcess/API/win/WKView.h:
2091         * UIProcess/WebPreferences.cpp:
2092         (WebKit::WebPreferences::shared):
2093         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2094         (WKBundleNodeHandleGetTypeID):
2095         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h:
2096         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
2097         (WKBundleScriptWorldNormalWorld):
2098         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
2099
2100 2010-08-20  Balazs Kelemen  <kb@inf.u-szeged.hu>
2101
2102         Reviewed by Antonio Gomes.
2103
2104         [Qt] Implement cursor change in WebKit2
2105         https://bugs.webkit.org/show_bug.cgi?id=44263
2106
2107         Implemented PageClient::setCursor.
2108         * UIProcess/API/qt/qgraphicswkview.cpp: Added updateCursor slot to be connected to the QWKPage::setCursor signal.
2109         (QGraphicsWKView::QGraphicsWKView):
2110         (QGraphicsWKView::updateCursor): Sets the cursor of the widget.
2111         * UIProcess/API/qt/qgraphicswkview.h:
2112         * UIProcess/API/qt/qwkpage.cpp:
2113         (QWKPagePrivate::setCursor): Added implementation for PageClient::setCursor. Emitting singal through the QWKPage.
2114         * UIProcess/API/qt/qwkpage.h: Added setCursor signal.
2115         * UIProcess/API/qt/qwkpage_p.h:
2116
2117 2010-08-19  David Kilzer  <ddkilzer@apple.com>
2118
2119         BUILD FIX: Fix Mac build after Windows WebKit2 changes for Netscape Plug-ins
2120
2121         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2122         (WebKit::NetscapePlugin::platformPaint): Changed frameRect() to
2123         m_frameRect.
2124
2125 2010-08-19  Adam Roben  <aroben@apple.com>
2126
2127         Send mouse events to windowless plugins on Windows
2128
2129         This seems to have been the last issue blocking us from playing videos
2130         on vimeo.com.
2131
2132         Fixes <http://webkit.org/b/44276> <rdar://problem/8330398> Can't click
2133         play button in vimeo.com Flash video player in WebKit2 on Windows
2134
2135         Reviewed by Sam Weinig.
2136
2137         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2138         (WebKit::toNP): Added. Converts a WebMouseEvent to an NPEvent. Code
2139         was adapted from WebCore's PluginViewWin.cpp.
2140
2141         (WebKit::NetscapePlugin::platformHandleMouseEvent):
2142         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
2143         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
2144         Convert the WebMouseEvent to an NPEvent and send it to the plugin.
2145
2146 2010-08-19  Adam Roben  <aroben@apple.com>
2147
2148         Add support for painting windowless plugins on Windows
2149
2150         This gets the video on the front page of vimeo.com painting (though
2151         you can't make it play because we don't support mouse events yet).
2152
2153         Fixes <http://webkit.org/b/44274> <rdar://problem/8330395> Windowless
2154         plugins don't paint in WebKit2 on Windows
2155
2156         Reviewed by Sam Weinig.
2157
2158         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2159         (WebKit::NPN_GetValue): Tell the plugin that we support windowless
2160         mode on Windows.
2161         (WebKit::NPN_SetValue): Implemented handling of NPPVpluginWindowBool
2162         by calling through to NetscapePlugin::setIsWindowed.
2163
2164         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2165         (WebKit::NetscapePlugin::NetscapePlugin): Added initialization of
2166         m_isWindowed. It defaults to false on Mac and true on other platforms,
2167         matching WebCore's PluginView.
2168
2169         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added m_isWindowed.
2170         (WebKit::NetscapePlugin::setIsWindowed): Added standard setter.
2171
2172         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2173         (WebKit::NetscapePlugin::platformPaint): Moved Mac-specific context
2174         translation code here from PluginView::paint.
2175
2176         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2177         (WebKit::NetscapePlugin::platformPaint): Implemented. Code was ported
2178         from WebCore's PluginViewWin.cpp.
2179
2180         * WebProcess/Plugins/Plugin.h: Updated the comment for Plugin::paint
2181         to explain the coordinate system of the context.
2182
2183         * WebProcess/Plugins/PluginView.cpp:
2184         (WebKit::PluginView::paint): Changed to translate the context from
2185         document to window coordinates. We were previously trying to translate
2186         to plugin-local coordinates, but this only worked for documents whose
2187         origin was the same as the window's origin (i.e., the main frame). The
2188         plugin takes care of any further translations needed. (Mac translates
2189         the context into plugin-local coordinates, and Windows leaves it in
2190         window coordinates.)
2191
2192 2010-08-19  Adam Roben  <aroben@apple.com>
2193
2194         Implement PluginInfoStore::pluginsDirectories
2195
2196         This makes WebKit2 able to find and load Flash on Windows.
2197
2198         Note that we aren't yet respecting the MozillaPlugins registry key.
2199         That's covered by <http://webkit.org/b/44271>.
2200
2201         Fixes <http://webkit.org/b/43510> <rdar://problem/8273827> WebKit2
2202         should load plugins from the same directories as old-WebKit
2203
2204         Reviewed by Jon Honeycutt and Ada Chan.
2205
2206         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2207         (WebKit::parseVersionString):
2208         (WebKit::compareVersions):
2209         (WebKit::safariPluginsDirectory):
2210         (WebKit::addMozillaPluginDirectories):
2211         (WebKit::addWindowsMediaPlayerPluginDirectory):
2212         (WebKit::addQuickTimePluginDirectory):
2213         (WebKit::addAdobeAcrobatPluginDirectory):
2214         (WebKit::addMacromediaPluginDirectories):
2215         (WebKit::PluginInfoStore::pluginsDirectories):
2216         Ported (and ever-so-slightly cleaned up) code from WebCore's
2217         PluginDatabaseWin.cpp.
2218
2219 2010-08-19  Adam Roben  <aroben@apple.com>
2220
2221         Call NP_GetEntryPoints before NP_Initialize on Windows
2222
2223         Doing otherwise will cause Flash and QuickTime to crash inside
2224         NP_Initialize.
2225
2226         Fixes <http://webkit.org/b/44270> <rdar://problem/8330393> Crash in
2227         NP_Initialize when loading QuickTime when running
2228         plugins/embed-attributes-setting.html in WebKit2 on Windows
2229
2230         Reviewed by Sam Weinig.
2231
2232         * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
2233         (WebKit::NetscapePluginModule::tryLoad): On Windows, first call
2234         NP_GetEntryPoints, then NP_Initialize. Do the reverse on Mac to
2235         prevent Silverlight (e.g.) from crashing (see r38858).
2236
2237 2010-08-19  Adam Roben  <aroben@apple.com>
2238
2239         Add NetscapePluginWin.cpp
2240
2241         Fixes <http://webkit.org/b/44269> <rdar://problem/8330391>
2242         NetscapePlugin.h contains functions that should be in
2243         NetscapePluginWin.cpp
2244
2245         Reviewed by Sam Weinig.
2246
2247         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Moved functions from
2248         here...
2249         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: ...to here.
2250
2251         * win/WebKit2.vcproj: Added NetscapePluginWin.cpp and let VS reorder
2252         the file list.
2253
2254 2010-08-19  Sam Weinig  <sam@webkit.org>
2255
2256         Reviewed by Adam Roben.
2257
2258         Add modifier key info to policy client functions in WebKit2
2259         <rdar://problem/8185298>
2260         https://bugs.webkit.org/show_bug.cgi?id=44280
2261
2262         * UIProcess/API/C/WKAPICast.h:
2263         Add conversion function for modifiers and rename an incorrectly named
2264         toWK to toRef.
2265
2266         * UIProcess/API/C/WKPage.h:
2267         Add WKEventModifiers enum.
2268
2269         * UIProcess/WebPageProxy.cpp:
2270         (WebKit::WebPageProxy::didReceiveMessage):
2271         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2272         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
2273         * UIProcess/WebPageProxy.h:
2274         * UIProcess/WebPolicyClient.cpp:
2275         (WebKit::WebPolicyClient::decidePolicyForNavigationAction):
2276         (WebKit::WebPolicyClient::decidePolicyForNewWindowAction):
2277         * UIProcess/WebPolicyClient.h:
2278         Pipe through modifier info.
2279
2280         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2281         (WebKit::modifiersForNavigationAction):
2282         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2283         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2284         Get modifier info out of the NavigationInfo class in the same manner as
2285         WebKit1.
2286
2287 2010-08-18  Sam Weinig  <sam@webkit.org>
2288
2289         Reviewed by Adam Roben.
2290
2291         Add ability to get all the keys from a WKDictionaryRef
2292         https://bugs.webkit.org/show_bug.cgi?id=44221
2293
2294         * Shared/ImmutableDictionary.cpp:
2295         (WebKit::ImmutableDictionary::keys):
2296         * Shared/ImmutableDictionary.h:
2297         Add keys function.
2298
2299         * UIProcess/API/C/WKDictionary.cpp:
2300         (WKDictionaryCopyKeys):
2301         * UIProcess/API/C/WKDictionary.h:
2302         Wrap keys function.
2303
2304 2010-08-18  Sam Weinig  <sam@webkit.org>
2305
2306         Reviewed by Jon Honeycutt.
2307
2308         Add ability to set custom userAgent for WebKit2
2309         https://bugs.webkit.org/show_bug.cgi?id=44215
2310
2311         * Shared/CoreIPCSupport/WebPageMessageKinds.h:
2312         (WebPageMessage::):
2313         * UIProcess/API/C/WKPage.cpp:
2314         (WKPageSetCustomUserAgent):
2315         * UIProcess/API/C/WKPage.h:
2316         * UIProcess/WebPageProxy.cpp:
2317         (WebKit::WebPageProxy::setCustomUserAgent):
2318         * UIProcess/WebPageProxy.h:
2319         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2320         (WebKit::WebFrameLoaderClient::userAgent):
2321         * WebProcess/WebPage/WebPage.cpp:
2322         (WebKit::WebPage::setCustomUserAgent):
2323         (WebKit::WebPage::userAgent):
2324         (WebKit::WebPage::didReceiveMessage):
2325         * WebProcess/WebPage/WebPage.h:
2326
2327 2010-08-18  Sam Weinig  <sam@webkit.org>
2328
2329         Rubber-stamped by John Sullivan.
2330
2331         Make WKBundleNodeHandleRef usable from WKRetainPtr.
2332
2333         * WebKit2.xcodeproj/project.pbxproj: Make WKBundleNodeHandle.h public.
2334         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h: Add WKRetain/WKRelease overloads.
2335
2336 2010-08-18  Zoltan Horvath  <zoltan@webkit.org>
2337
2338         Reviewed by Kenneth Rohde Christiansen.
2339
2340         [Qt] Forwards QtWebProcess' stdout, stderr onto the UI process
2341         https://bugs.webkit.org/show_bug.cgi?id=44159
2342
2343         For debugging purposes forwards stdout and stderr of QtWebProcess onto the UI process.
2344
2345         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2346         (WebKit::ProcessLauncherHelper::launch):
2347
2348 2010-08-17  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2349
2350         Reviewed by Darin Adler.
2351
2352         Add NetworkingContext to avoid layer violations
2353         https://bugs.webkit.org/show_bug.cgi?id=42292
2354
2355         Preparation: Just add the files to the build system.
2356
2357         * WebKit2.xcodeproj/project.pbxproj: Added new files.
2358         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Added.
2359         Placeholder with tentative code that might be changed when landing
2360         the rest of it.
2361         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Added.
2362         Empty placeholder for now.
2363
2364 2010-08-16  Jon Honeycutt  <jhoneycutt@apple.com>
2365
2366         Allow some tests to pass in WebKitTestRunner before SharedMemory and
2367         PluginInfoStore are implemented on Windows.
2368
2369         Reviewed by Sam Weinig.
2370
2371         * Platform/win/SharedMemoryWin.cpp:
2372         Disable not implemented warnings.
2373         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2374         Ditto.
2375
2376 2010-08-16  Gavin Barraclough  <barraclough@apple.com>
2377
2378         Rubber stamped by Sam Weinig
2379
2380         Remove unnecessary includes from UString.h, add new includes as necessary.
2381
2382         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2383
2384 2010-08-16  Sam Weinig  <sam@webkit.org>
2385
2386         Fix windows build.
2387
2388         * Shared/win/CommandLineWin.cpp:
2389
2390 2010-08-16  Sam Weinig  <sam@webkit.org>
2391
2392         Reviewed by Gavin Barraclough.
2393
2394         Remove #includes of <WebCore/PlatformString.h> in favor of <wtf/text/WTFString.h>
2395
2396         * Platform/Module.cpp:
2397         * Platform/Module.h:
2398         * Shared/CommandLine.h:
2399         * Shared/WebCoreArgumentCoders.h:
2400         * Shared/WebEvent.h:
2401         * Shared/WebNavigationDataStore.h:
2402         * Shared/WebPreferencesStore.h:
2403         * Shared/WebString.h:
2404         * Shared/WebURL.h:
2405         * Shared/mac/CommandLineMac.cpp:
2406         * Shared/qt/UpdateChunk.cpp:
2407         * UIProcess/API/C/WKContext.cpp:
2408         * UIProcess/API/C/cf/WKStringCF.cpp:
2409         * UIProcess/API/C/cf/WKURLCF.cpp:
2410         * UIProcess/API/cpp/qt/WKStringQt.cpp:
2411         * UIProcess/API/cpp/qt/WKURLQt.cpp:
2412         * UIProcess/API/mac/PageClientImpl.mm:
2413         * UIProcess/API/qt/qgraphicswkview.cpp:
2414         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2415         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2416         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
2417         * UIProcess/WebBackForwardListItem.cpp:
2418         * UIProcess/WebBackForwardListItem.h:
2419         * UIProcess/WebContext.h:
2420         * UIProcess/WebContextInjectedBundleClient.cpp:
2421         * UIProcess/WebFrameProxy.cpp:
2422         * UIProcess/WebFrameProxy.h:
2423         * UIProcess/WebPageProxy.h:
2424         * UIProcess/WebPolicyClient.cpp:
2425         * UIProcess/WebProcessProxy.cpp:
2426         * UIProcess/WebUIClient.cpp:
2427         * UIProcess/win/WebView.cpp:
2428         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2429         * WebProcess/InjectedBundle/InjectedBundle.h:
2430         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
2431         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2432         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2433         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
2434         * WebProcess/Plugins/JSNPObject.cpp:
2435         * WebProcess/Plugins/NPJSObject.cpp:
2436         * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
2437         * WebProcess/Plugins/Netscape/NetscapePluginModule.h:
2438         * WebProcess/WebCoreSupport/WebChromeClient.h:
2439         * WebProcess/WebKitMain.cpp:
2440         * WebProcess/win/WebProcessMainWin.cpp:
2441
2442 2010-08-16  Sam Weinig  <sam@webkit.org>
2443
2444         Reviewed by Gavin Barraclough.
2445
2446         Null CFURLRef returned from provisionalURL after searching on zillow.com
2447         <rdar://problem/8261812>
2448         https://bugs.webkit.org/show_bug.cgi?id=44072
2449
2450         Conversion from WKURLRef to CFRURLRef was breaking on URLs using characters
2451         such as '{'.
2452
2453         * UIProcess/API/C/cf/WKURLCF.cpp:
2454         (WKURLCopyCFURL): Use code similar to that found in KURLCFNet.cpp for conversion.
2455
2456 2010-08-16  Sam Weinig  <sam@webkit.org>
2457
2458         Reviewed by Gavin Barraclough.
2459
2460         Remove unnecessary copy constructor, assignment operator and swap function.
2461         The defaults (for all except swap) should do just fine.
2462
2463         * Shared/WebPreferencesStore.cpp:
2464         * Shared/WebPreferencesStore.h:
2465
2466 2010-08-16  Balazs Kelemen  <kb@inf.u-szeged.hu>
2467
2468         Reviewed by Kenneth Rohde Christiansen.
2469
2470         Handle content size change in WebKit2
2471         Re-landing after fix.
2472
2473         https://bugs.webkit.org/show_bug.cgi?id=43198
2474
2475         Based on the work of Antti Koivisto.
2476         Send message to the UI client when the contents size has changed through the WebChromeClient
2477         and propagate it to the WKPageUIClient.
2478
2479         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2480         (WebPageProxyMessage::): Added ContentsSizeChanged message kind.
2481         * UIProcess/API/C/WKPage.h: Added WKPageContentsSizeChangedCallback callback to the WKPageUIClient.
2482         * UIProcess/API/qt/qwkpage.cpp:
2483         (QWKPage::QWKPage): Initialize the new callback to 0.
2484         * UIProcess/WebPageProxy.cpp:
2485         (WebKit::WebPageProxy::didReceiveMessage): Handle ContentsSizeChanged message. Calls contetsSizeChanged.
2486         (WebKit::WebPageProxy::contentsSizeChanged): Added. Propagate the event to the the UI client.
2487         * UIProcess/WebPageProxy.h:
2488         * UIProcess/WebUIClient.cpp:
2489         (WebKit::WebUIClient::contentsSizeChanged): Added. Propagate the event forward to the WKPageUIClient.
2490         * UIProcess/WebUIClient.h:
2491         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2492         (WebKit::WebChromeClient::contentsSizeChanged): Implemented.
2493
2494 2010-08-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2495
2496         Unreviewed, rolling out r65419.
2497         http://trac.webkit.org/changeset/65419
2498         https://bugs.webkit.org/show_bug.cgi?id=44053
2499
2500         Broke the Windows build (Requested by bbandix on #webkit).
2501
2502         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2503         (WebPageProxyMessage::):
2504         * UIProcess/API/C/WKPage.h:
2505         * UIProcess/API/qt/qwkpage.cpp:
2506         (QWKPage::QWKPage):
2507         * UIProcess/WebPageProxy.cpp:
2508         (WebKit::WebPageProxy::didReceiveMessage):
2509         * UIProcess/WebPageProxy.h:
2510         * UIProcess/WebUIClient.cpp:
2511         * UIProcess/WebUIClient.h:
2512         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2513         (WebKit::WebChromeClient::contentsSizeChanged):
2514
2515 2010-08-16  Balazs Kelemen  <kb@inf.u-szeged.hu>
2516
2517         Reviewed by Kenneth Rohde Christiansen.
2518
2519         Handle content size change in WebKit2
2520
2521         https://bugs.webkit.org/show_bug.cgi?id=43198
2522
2523         Based on the work of Antti Koivisto.
2524         Send message to the UI client when the contents size has changed through the WebChromeClient
2525         and propagate it to the WKPageUIClient.
2526
2527         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2528         (WebPageProxyMessage::): Added ContentsSizeChanged message kind.
2529         * UIProcess/API/C/WKPage.h: Added WKPageContentsSizeChangedCallback callback to the WKPageUIClient.
2530         * UIProcess/API/qt/qwkpage.cpp:
2531         (QWKPage::QWKPage): Initialize the new callback to 0.
2532         * UIProcess/WebPageProxy.cpp:
2533         (WebKit::WebPageProxy::didReceiveMessage): Handle ContentsSizeChanged message. Calls contetsSizeChanged.
2534         (WebKit::WebPageProxy::contentsSizeChanged): Added. Propagate the event to the the UI client.
2535         * UIProcess/WebPageProxy.h:
2536         * UIProcess/WebUIClient.cpp:
2537         (WebKit::WebUIClient::contentsSizeChanged): Added. Propagate the event forward to the WKPageUIClient.
2538         * UIProcess/WebUIClient.h:
2539         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2540         (WebKit::WebChromeClient::contentsSizeChanged): Implemented.
2541
2542 2010-08-16  Balazs Kelemen  <kb@inf.u-szeged.hu>
2543
2544         Unreviewed Qt WebKit2 build fix.
2545
2546         * UIProcess/qt/WebContextQt.cpp:
2547         (WebKit::WebContext::platformSetUpWebProcess): Added empty stub implementation.
2548         * WebKit2.pro: Enumerate new files, include WebKit.pri for correct define macro set.
2549
2550 2010-08-15  Dan Bernstein  <mitz@apple.com>
2551
2552         Revised build fix from r65363 based on suggestion from Darin Adler.
2553
2554         * UIProcess/API/C/WKArray.h: Include stddef.h.
2555         * UIProcess/API/C/WKBase.h: Uninclude ctype.h.
2556         * UIProcess/API/C/WKData.h: Include stddef.h.
2557         * UIProcess/API/C/WKDictionary.h: Ditto.
2558
2559 2010-08-14  Dan Bernstein  <mitz@apple.com>
2560
2561         Reviewed by Anders Carlsson in Sweden.
2562
2563         Clean build of WebKitTestRunner fails with “'size_t' has not been declared” in WKArray.h
2564         https://bugs.webkit.org/show_bug.cgi?id=44005
2565
2566         * UIProcess/API/C/WKBase.h: Include ctype.h.
2567
2568 2010-08-13  Sam Weinig  <sam@webkit.org>
2569
2570         Fix build.
2571
2572         * WebKit2.xcodeproj/project.pbxproj: Make WKDictionary.h public.
2573
2574 2010-08-13  Sam Weinig  <sam@webkit.org>
2575
2576         Reviewed by Brady Eidson.
2577
2578         Pass values map to willSubmitForm in WebKit2 API
2579         Part of <rdar://problem/8255932>
2580         https://bugs.webkit.org/show_bug.cgi?id=43995
2581
2582         * Platform/CoreIPC/ArgumentCoders.h:
2583         (CoreIPC::):
2584         Add overload for std::pair.
2585
2586         * Shared/ImmutableDictionary.h:
2587         (WebKit::ImmutableDictionary::adopt):
2588         Fix function signature by removing size parameter.
2589
2590         * UIProcess/API/C/WKPage.h:
2591         Add dictionary parameter to callback.
2592
2593         * UIProcess/WebFormClient.cpp:
2594         (WebKit::WebFormClient::willSubmitForm):
2595         Create an ImmutableDictionary from the vector of string pairs.
2596
2597         * UIProcess/WebFormClient.h:
2598         * UIProcess/WebPageProxy.cpp:
2599         (WebKit::WebPageProxy::didReceiveMessage):
2600         (WebKit::WebPageProxy::willSubmitForm):
2601         * UIProcess/WebPageProxy.h:
2602         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2603         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
2604         Plumb through the values vector.
2605
2606 2010-08-13  Sam Weinig  <sam@webkit.org>
2607
2608         Reviewed by Brady Eidson.
2609
2610         Add dictionary API type
2611         https://bugs.webkit.org/show_bug.cgi?id=43990
2612
2613         Add an immutable dictionary type (WKStringRef -> WKTypeRef).
2614
2615         * Shared/APIObject.h:
2616         (WebKit::APIObject::):
2617         Add new APIType.
2618
2619         * Shared/ImmutableDictionary.cpp: Added.
2620         (WebKit::ImmutableDictionary::ImmutableDictionary):
2621         (WebKit::ImmutableDictionary::~ImmutableDictionary):
2622         * Shared/ImmutableDictionary.h: Added.
2623         (WebKit::ImmutableDictionary::create):
2624         (WebKit::ImmutableDictionary::adopt):
2625         (WebKit::ImmutableDictionary::get):
2626         (WebKit::ImmutableDictionary::size):
2627         (WebKit::ImmutableDictionary::):
2628         (WebKit::ImmutableDictionary::type):
2629         Add basic implementation
2630
2631         * UIProcess/API/C/WKAPICast.h:
2632         (WebKit::):
2633         Add new mappings.
2634
2635         * UIProcess/API/C/WKBase.h:
2636         Add new opaque type.
2637
2638         * UIProcess/API/C/WKDictionary.cpp: Added.
2639         (WKDictionaryGetTypeID):
2640         (WKDictionaryGetItemForKey):
2641         (WKDictionaryGetSize):
2642         (WKDictionaryRetain):
2643         (WKDictionaryRelease):
2644         * UIProcess/API/C/WKDictionary.h: Added.
2645         Add API wrappings.
2646     
2647         * UIProcess/API/C/WebKit2.h:
2648         Add missing public headers.
2649
2650         * WebKit2.xcodeproj/project.pbxproj:
2651         * win/WebKit2.vcproj:
2652         * win/WebKit2Generated.make:
2653         Add new files.
2654
2655 2010-08-13  Sam Weinig  <sam@webkit.org>
2656
2657         Reviewed by Jon Honeycutt.
2658
2659         Add form submission listener to WebKit2
2660         Part of <rdar://problem/8255932>
2661         https://bugs.webkit.org/show_bug.cgi?id=43947
2662
2663         * Shared/APIObject.h:
2664         Add TypeFormSubmissionListener APIType.
2665         
2666         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2667         Add WillSubmitForm message kind.
2668
2669         * UIProcess/API/C/WKAPICast.h:
2670         Add new mappings for WKFormSubmissionListenerRef -> WebFormSubmissionListener
2671
2672         * UIProcess/API/C/WKBase.h:
2673         Add OpaqueWKFormSubmissionListener and rename the other opaque types to match.
2674
2675         * UIProcess/API/C/WKFormSubmissionListener.cpp: Added.
2676         (WKFormSubmissionListenerGetTypeID):
2677         (WKFormSubmissionListenerContinue):
2678         (WKFormSubmissionListenerRetain):
2679         (WKFormSubmissionListenerRelease):
2680         * UIProcess/API/C/WKFormSubmissionListener.h: Added.
2681         Add C wrapper for WebFormSubmissionListener.
2682
2683         * UIProcess/API/C/WKPage.cpp:
2684         (WKPageSetPageFormClient):
2685         * UIProcess/API/C/WKPage.h:
2686         Add WKPageFormClient with willSubmitForm callback. Additional callbacks will be added as
2687         needed.
2688
2689         * UIProcess/API/C/WebKit2.h:
2690         Add include for WKFormSubmissionListener.h
2691
2692         * UIProcess/WebFormClient.cpp: Added.
2693         (WebKit::WebFormClient::WebFormClient):
2694         (WebKit::WebFormClient::initialize):
2695         (WebKit::WebFormClient::willSubmitForm):
2696         * UIProcess/WebFormClient.h: Added.
2697         Add client for form related delagations.
2698
2699         * UIProcess/WebFormSubmissionListenerProxy.cpp: Added.
2700         (WebKit::WebFormSubmissionListenerProxy::WebFormSubmissionListenerProxy):
2701         (WebKit::WebFormSubmissionListenerProxy::continueSubmission):
2702         * UIProcess/WebFormSubmissionListenerProxy.h: Added.
2703         (WebKit::WebFormSubmissionListenerProxy::create):
2704         (WebKit::WebFormSubmissionListenerProxy::type):
2705         * UIProcess/WebFrameListenerProxy.cpp: Copied from UIProcess/WebFramePolicyListenerProxy.cpp.
2706         Add new type of listener for form submissions. It inherits from the new base class
2707         for listeners, WebFrameListenerProxy.
2708
2709         (WebKit::WebFrameListenerProxy::WebFrameListenerProxy):
2710         (WebKit::WebFrameListenerProxy::~WebFrameListenerProxy):
2711         (WebKit::WebFrameListenerProxy::invalidate):
2712         (WebKit::WebFrameListenerProxy::receivedPolicyDecision):
2713         * UIProcess/WebFrameListenerProxy.h: Copied from UIProcess/WebFramePolicyListenerProxy.h.
2714         Move logic that would have to be shared between WebFramePolicyListenerProxy and
2715         WebFormSubmissionListenerProxy into shared base class.
2716
2717         * UIProcess/WebFramePolicyListenerProxy.cpp:
2718         (WebKit::WebFramePolicyListenerProxy::WebFramePolicyListenerProxy):
2719         * UIProcess/WebFramePolicyListenerProxy.h:
2720         (WebKit::WebFramePolicyListenerProxy::create):
2721         (WebKit::WebFramePolicyListenerProxy::type):
2722         Move to inheriting from WebFrameListenerProxy.
2723
2724         * UIProcess/WebFrameProxy.cpp:
2725         (WebKit::WebFrameProxy::disconnect):
2726         (WebKit::WebFrameProxy::receivedPolicyDecision):
2727         (WebKit::WebFrameProxy::setUpPolicyListenerProxy):
2728         (WebKit::WebFrameProxy::setUpFormSubmissionListenerProxy):
2729         * UIProcess/WebFrameProxy.h:
2730         Change listener functions to act on WebFrameListenerProxys and add setUpFormSubmissionListenerProxy.
2731
2732         * UIProcess/WebPageProxy.cpp:
2733         (WebKit::WebPageProxy::initializeFormClient):
2734         (WebKit::WebPageProxy::didReceiveMessage):
2735         (WebKit::WebPageProxy::willSubmitForm):
2736         * UIProcess/WebPageProxy.h:
2737         Plumb through willSubmitForm call as we do with the other listeners.
2738
2739         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2740         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
2741         Ditto.
2742
2743         * WebKit2.xcodeproj/project.pbxproj: Add new files.
2744         * win/WebKit2.vcproj: Add new files.
2745         * win/WebKit2Generated.make: Ditto.
2746
2747 2010-08-13  Gavin Barraclough  <barraclough@apple.com>
2748
2749         Reviewed by Sam Weinig
2750
2751         Unify UString::UTF8String() & String::utf8() methods,
2752         remove UString::cost() & make atArrayIndex a free function.
2753
2754         * WebProcess/Plugins/JSNPObject.cpp:
2755         (WebKit::npIdentifierFromIdentifier):
2756         * WebProcess/Plugins/NPJSObject.cpp:
2757         (WebKit::NPJSObject::enumerate):
2758         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
2759         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
2760
2761 2010-08-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2762
2763         Unreviewed, rolling out r65295.
2764         http://trac.webkit.org/changeset/65295
2765         https://bugs.webkit.org/show_bug.cgi?id=43950
2766
2767         It broke 4 sputnik tests (Requested by Ossy on #webkit).
2768
2769         * WebProcess/Plugins/JSNPObject.cpp:
2770         (WebKit::npIdentifierFromIdentifier):
2771         * WebProcess/Plugins/NPJSObject.cpp:
2772         (WebKit::NPJSObject::enumerate):
2773         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
2774         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
2775
2776 2010-08-12  Gavin Barraclough  <barraclough@apple.com>
2777
2778         Reviewed by Sam Weinig
2779
2780         Unify UString::UTF8String() & String::utf8() methods,
2781         remove UString::cost() & make atArrayIndex a free function.
2782
2783         * WebProcess/Plugins/JSNPObject.cpp:
2784         (WebKit::npIdentifierFromIdentifier):
2785         * WebProcess/Plugins/NPJSObject.cpp:
2786         (WebKit::NPJSObject::enumerate):
2787         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
2788         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
2789
2790 2010-08-12  Maciej Stachowiak  <mjs@apple.com>
2791
2792         Reviewed by Sam Weinig.
2793
2794         WebKit2 crashes when WebFrame outlives WebPage
2795         https://bugs.webkit.org/show_bug.cgi?id=43939
2796
2797         * WebProcess/WebCoreSupport/WebChromeClient.h:
2798         (WebKit::WebChromeClient::page): Add this method, to allow
2799         WebFrame to retrieve its WebPage following WebCore pointers.
2800         * WebProcess/WebPage/WebFrame.cpp:
2801         (WebKit::WebFrame::WebFrame): Do not initialize m_page (it's gone).
2802         (WebKit::WebFrame::page): Don't use the data member, get it from
2803         WebCore.
2804         (WebKit::WebFrame::invalidate): Use method to get page() and null check.
2805         (WebKit::WebFrame::isMainFrame): ditto
2806         * WebProcess/WebPage/WebFrame.h:
2807
2808 2010-08-12  Jon Honeycutt  <jhoneycutt@apple.com>
2809
2810         WebKit2 needs to initialize SafariTheme
2811         https://bugs.webkit.org/show_bug.cgi?id=43901
2812
2813         Reviewed by Sam Weinig.
2814
2815         * WebProcess/win/WebProcessMainWin.cpp:
2816         (WebKit::initializeSafariTheme):
2817         Copied from old WebKit.
2818         (WebKit::WebProcessMain):
2819         If we're using SafariTheme, initialize it.
2820
2821 2010-08-12  Jon Honeycutt  <jhoneycutt@apple.com>
2822
2823         WebKitTestRunner needs to run tests without using native controls
2824         https://bugs.webkit.org/show_bug.cgi?id=43772
2825
2826         Reviewed by Sam Weinig.
2827
2828         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
2829         (WebProcessMessage::):
2830         Add a new message.
2831
2832         * UIProcess/API/C/win/WKContextPrivateWin.h: Added.
2833         Declare WKContextSetShouldPaintNativeControls().
2834
2835         * UIProcess/API/C/win/WKContextWin.cpp: Added.
2836         (WKContextSetShouldPaintNativeControls):
2837         Call the WebContext's setShouldPaintNativeControls().
2838
2839         * UIProcess/WebContext.cpp:
2840         (WebKit::WebContext::WebContext):
2841         Initialize m_shouldPaintNativeControls.
2842         (WebKit::WebContext::ensureWebProcess):
2843         If we created a web process, call platformSetUpWebProcess().
2844
2845         * UIProcess/WebContext.h:
2846         Declare new functions and a member to store whether we should paint
2847         native controls.
2848
2849         * UIProcess/mac/WebContextMac.mm:
2850         (WebKit::WebContext::platformSetUpWebProcess):
2851         Stubbed.
2852
2853         * UIProcess/win/WebContextWin.cpp:
2854         (WebKit::WebContext::setShouldPaintNativeControls):
2855         Set m_shouldPaintNativeControls. If we have a valid web process, send a
2856         SetShouldPaintNativeControls message.
2857         (WebKit::WebContext::platformSetUpWebProcess):
2858         Send a SetShouldPaintNativeControls message.
2859
2860         * WebProcess/WebProcess.cpp:
2861         (WebKit::WebProcess::didReceiveMessage):
2862         If this is a SetShouldPaintNativeControls message, decode the argument,
2863         and call Settings::setShouldPaintNativeControls().
2864
2865         * win/WebKit2.vcproj:
2866         Add WKContextPrivateWin.h and WKContextWin.cpp to project.
2867
2868         * win/WebKit2Generated.make:
2869         Copy WKContextPrivateWin.h.
2870
2871 2010-08-11  Sam Weinig  <sam@webkit.org>
2872
2873         Reviewed by Gavin Barraclough.
2874
2875         Add SPI to stop loading from the InjectedBundle.
2876
2877         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2878         (WKBundlePageStopLoading):
2879         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2880         * WebProcess/WebPage/WebPage.h:
2881
2882 2010-08-11  Sam Weinig  <sam@webkit.org>
2883
2884         Reviewed by Gavin Barraclough.
2885
2886         WKPageStopLoading always asserts
2887
2888         * WebProcess/WebPage/WebPage.cpp:
2889         (WebKit::WebPage::didReceiveMessage): Switch break to return, break made us
2890         hit the ASSERT_NOT_REACHED at the end of the function.
2891
2892 2010-08-11  Balazs Kelemen  <kb@inf.u-szeged.hu>
2893
2894         Unreviewed build fix.
2895
2896         [Qt] Update WebKit2 build environment, add stub implementation of SharedMemory.
2897
2898         * DerivedSources.pro:
2899         * Platform/qt/SharedMemoryQt.cpp: Added.
2900         (WebKit::SharedMemory::Handle::Handle):
2901         (WebKit::SharedMemory::Handle::~Handle):
2902         (WebKit::SharedMemory::Handle::encode):
2903         (WebKit::SharedMemory::Handle::decode):
2904         (WebKit::SharedMemory::create):
2905         (WebKit::SharedMemory::~SharedMemory):
2906         (WebKit::SharedMemory::createHandle):
2907         (WebKit::SharedMemory::systemPageSize):
2908         * WebKit2.pro:
2909         * WebKit2Prefix.h:
2910
2911 2010-08-11  Mark Rowe  <mrowe@apple.com>
2912
2913         Build fix.  Update references to StringHash.h.
2914
2915         * Shared/CommandLine.h:
2916         * UIProcess/WebContext.h:
2917         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2918         * WebProcess/win/WebProcessMainWin.cpp:
2919
2920 2010-08-10  Darin Adler  <darin@apple.com>
2921
2922         Reviewed by Sam Weinig.
2923
2924         Add leakRef and clear to all RefPtr variants
2925         https://bugs.webkit.org/show_bug.cgi?id=42389
2926
2927         * UIProcess/API/cpp/WKRetainPtr.h: Changed all uses of "template <...>" to
2928         "template<...>". Defined many of the inlined functions outside the class
2929         definition, to avoid style checker warnings about multiple statements on
2930         a single line and for slightly better clarity of the class definition itself.
2931         Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
2932         don't have to rename all callers at once. Added a clear function.
2933
2934 2010-08-10  Balazs Kelemen  <kb@inf.u-szeged.hu>
2935
2936         Reviewed by Antonio Gomes.
2937
2938         [Qt] Build WebKit2 into a static lib
2939
2940         https://bugs.webkit.org/show_bug.cgi?id=43621
2941
2942         * WebKit2.pri: Added. Defined addWebKit2Lib function that defines how to link against the static lib.
2943         * WebKit2.pro:  Build specification for the WebKit2 framework.
2944         * WebProcess.pro: Copied from WebKit2/WebKit2.pro. Build specification for the WebProcess binary.
2945
2946 2010-08-09  Sam Weinig  <sam@webkit.org>
2947
2948         Reviewed by Geoffrey Garen.
2949
2950         Add zoom support for injected bundle
2951         https://bugs.webkit.org/show_bug.cgi?id=43759
2952
2953         Add SPI to change the zoom factor for a page.
2954
2955         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2956         (toZoomMode):
2957         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2958         (WKBundlePageGetZoomFactor):
2959         (WKBundlePageSetZoomFactor):
2960         (WKBundlePageSetZoomMode):
2961         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2962         * WebProcess/WebPage/WebPage.cpp:
2963         (WebKit::WebPage::zoomFactor):
2964         (WebKit::WebPage::setZoomFactor):
2965         (WebKit::WebPage::setZoomMode):
2966         * WebProcess/WebPage/WebPage.h:
2967
2968 2010-08-06  Gavin Barraclough  <barraclough@apple.com>
2969
2970         Rubber stamped by Sam Weinig
2971
2972         Bug 43594 - Add string forwards to Forward.h
2973         This allows us to remove forward declarations for these classes from
2974         WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
2975
2976         * UIProcess/PageClient.h:
2977         * UIProcess/VisitedLinkProvider.h:
2978         * UIProcess/WebContextInjectedBundleClient.h:
2979         * UIProcess/WebFrameProxy.h:
2980         * UIProcess/WebHistoryClient.h:
2981         * UIProcess/WebLoaderClient.h:
2982         * UIProcess/WebPolicyClient.h:
2983         * UIProcess/WebProcessProxy.h:
2984         * UIProcess/WebUIClient.h:
2985         * UIProcess/win/WebView.h:
2986         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
2987         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2988         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2989         * WebProcess/Plugins/NPRuntimeObjectMap.h:
2990         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2991         * WebProcess/Plugins/PluginController.h:
2992         * WebProcess/WebPage/WebFrame.h:
2993         * WebProcess/WebPage/WebPage.h:
2994         * WebProcess/WebProcess.h:
2995
2996 2010-08-09  Balazs Kelemen  <kb@inf.u-szeged.hu>
2997
2998         Reviewed by Kenneth Rohde Christiansen.
2999
3000         [Qt] No need for PageClientImpl
3001
3002         https://bugs.webkit.org/show_bug.cgi?id=43728
3003
3004         Remove PageClientImpl, take the implementation of WebKit::PageClient into QWKPagePrivate.
3005
3006         * UIProcess/API/qt/qwkpage.cpp:
3007         (QWKPagePrivate::QWKPagePrivate):
3008         (QWKPagePrivate::toolTipChanged):
3009         * UIProcess/API/qt/qwkpage_p.h:
3010         (QWKPagePrivate::pageDidEnterAcceleratedCompositing):
3011         (QWKPagePrivate::pageDidLeaveAcceleratedCompositing):
3012         (QWKPagePrivate::processDidExit):
3013         (QWKPagePrivate::processDidRevive):
3014         (QWKPagePrivate::setCursor):
3015         (QWKPagePrivate::takeFocus):
3016
3017 2010-08-07  Sam Weinig  <sam@webkit.org>
3018
3019         Reviewed by Anders Carlsson.
3020
3021         WebKitTestRunner needs to print onunload handler information
3022         <rdar://problem/8213831>
3023         https://bugs.webkit.org/show_bug.cgi?id=42703
3024
3025         Add SPI to get the number of pending unload events.
3026
3027         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3028         (WKBundleFrameGetPendingUnloadCount):
3029         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
3030         * WebProcess/WebPage/WebFrame.cpp:
3031         (WebKit::WebFrame::pendingUnloadCount):
3032         * WebProcess/WebPage/WebFrame.h:
3033
3034 2010-08-07  Sam Weinig  <sam@webkit.org>
3035
3036         Reviewed by Anders Carlsson.
3037
3038         Add additional loader client functions need to complete WebKitTestRunner
3039         https://bugs.webkit.org/show_bug.cgi?id=43684
3040
3041         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3042         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3043         (WebKit::InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame):
3044         (WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
3045         (WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
3046         (WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
3047         (WebKit::InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame):
3048         (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
3049         (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
3050         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3051         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3052         (WebKit::WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
3053         (WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect):
3054         (WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
3055         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
3056         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
3057         (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
3058         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
3059
3060 2010-08-07  Sam Weinig  <sam@webkit.org>
3061
3062         Another fix for the windows build.
3063
3064         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3065         (WebKit::NetscapePlugin::isAcceleratedCompositingEnabled):
3066
3067 2010-08-07  Sam Weinig  <sam@webkit.org>
3068
3069         Fix windows build.
3070
3071         * WebProcess/Plugins/PluginView.cpp:
3072         (WebKit::PluginView::platformLayer):
3073         * WebProcess/Plugins/PluginView.h:
3074
3075 2010-08-07  Sam Weinig  <sam@webkit.org>
3076
3077         Reviewed by Anders Carlsson.
3078
3079         WebKitTestRunner needs GCController
3080         <rdar://problem/8213834>
3081         https://bugs.webkit.org/show_bug.cgi?id=42701
3082
3083         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3084         (WKBundleGarbageCollectJavaScriptObjects):
3085         (WKBundleGarbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
3086         (WKBundleGetJavaScriptObjectsCount):
3087         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3088         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3089         (WebKit::InjectedBundle::garbageCollectJavaScriptObjects):
3090         (WebKit::InjectedBundle::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
3091         (WebKit::InjectedBundle::javaScriptObjectsCount):
3092         * WebProcess/InjectedBundle/InjectedBundle.h:
3093
3094 2010-08-07  Anders Carlsson  <andersca@apple.com>
3095
3096         Reviewed by Sam Weinig.
3097
3098         CA drawing model support for Mac Plugins
3099         https://bugs.webkit.org/show_bug.cgi?id=43678
3100         <rdar://problem/7929701>
3101
3102         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3103         (WebKit::NPN_GetValue):
3104         Handle WKNVSupportsCompositingCoreAnimationPluginsBool and 
3105         NPNVsupportsCoreAnimationBool and return true if accelerated compositing is enabled.
3106
3107         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3108         (WebKit::NetscapePlugin::isAcceleratedCompositingEnabled):
3109         Call PluginController::isAcceleratedCompositingEnabled.
3110
3111         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3112         (WebKit::NetscapePlugin::platformPostInitialize):
3113         If the plug-in uses the Core Animation drawing model, ask it for its layer.
3114
3115         (WebKit::NetscapePlugin::platformPaint):
3116         Don't send draw events if the Core Animation drawing model is used.
3117
3118         (WebKit::NetscapePlugin::pluginLayer):
3119         Return the plug-in layer.
3120
3121         * WebProcess/Plugins/Plugin.h:
3122         Add a pluginLayer pure virtual member function.
3123
3124         * WebProcess/Plugins/PluginController.h:
3125         Add an isAcceleratedCompositingEnabled pure virtual member function.
3126
3127         * WebProcess/Plugins/PluginView.cpp:
3128         (WebKit::PluginView::initializePlugin):
3129         If the plug-in has a layer, enter compositing mode.
3130
3131         (WebKit::PluginView::platformLayer):
3132         Ask the plug-in for its layer.
3133
3134         (WebKit::PluginView::isAcceleratedCompositingEnabled):
3135         Call Settings::acceleratedCompositingEnabled.
3136
3137         * WebProcess/Plugins/PluginView.h:
3138
3139 2010-08-06  Sam Weinig  <sam@webkit.org>
3140
3141         Reviewed by Anders Carlsson.
3142
3143         Delete key doesn't go Back in WebKit2
3144         <rdar://problem/8272978>
3145         https://bugs.webkit.org/show_bug.cgi?id=43665
3146
3147         - Adds support for delete key going back (mac only for now)
3148         - Adds support for command-left/command right going back/forward
3149         - Flesh out scrolling due to arrow keys on the mac to match old webkit.
3150         - Made performDefaultBehaviorForKeyEvent platform specific and added
3151           a boolean return value which will be used later to inform the UI process
3152           about what events have been processed.
3153
3154         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
3155         (WebPageProxyMessage::):
3156         * UIProcess/API/mac/WKView.mm:
3157         (-[WKView _wantsKeyDownForEvent:]):
3158         * UIProcess/WebPageProxy.cpp:
3159         (WebKit::WebPageProxy::didReceiveSyncMessage):
3160         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3161         (WebKit::WebBackForwardListProxy::backItem):
3162         (WebKit::WebBackForwardListProxy::forwardItem):
3163         * WebProcess/WebPage/WebPage.cpp:
3164         (WebKit::WebPage::keyEvent):
3165         * WebProcess/WebPage/WebPage.h:
3166         * WebProcess/WebPage/mac/WebPageMac.mm:
3167         (WebKit::scroll):
3168         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
3169         * WebProcess/WebPage/qt/WebPageQt.cpp:
3170         (WebKit::scroll):
3171         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
3172         * WebProcess/WebPage/win/WebPageWin.cpp:
3173         (WebKit::scroll):
3174         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
3175
3176 2010-08-07  Sheriff Bot  <webkit.review.bot@gmail.com>
3177
3178         Unreviewed, rolling out r64904.
3179         http://trac.webkit.org/changeset/64904
3180         https://bugs.webkit.org/show_bug.cgi?id=43671
3181
3182         Broke the Qt Windows builders. (Requested by bbandix on
3183         #webkit).
3184
3185         * WebKit2.pri: Removed.
3186         * WebKit2.pro:
3187         * WebProcess.pro: Removed.
3188
3189 2010-08-07  Balazs Kelemen  <kb@inf.u-szeged.hu>
3190
3191         Reviewed by Eric Seidel.
3192
3193         NPAPI headers should be included through npruntime_internal.h
3194
3195         https://bugs.webkit.org/show_bug.cgi?id=43620
3196
3197         * DerivedSources.pro:
3198         * WebProcess/Plugins/NPJSObject.h:
3199         * WebProcess/Plugins/NPRuntimeUtilities.h:
3200         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
3201
3202 2010-08-07  Balazs Kelemen  <kb@inf.u-szeged.hu>
3203
3204         Reviewed by Eric Seidel.
3205
3206         [Qt] Build WebKit2 into a static lib
3207
3208         https://bugs.webkit.org/show_bug.cgi?id=43621
3209
3210         * WebKit2.pri: Added. Defined addWebKit2Lib function that defines how to link against the static lib.
3211         * WebKit2.pro:  Build specification for the WebKit2 framework.
3212         * WebProcess.pro: Copied from WebKit2/WebKit2.pro. Build specification for the WebProcess binary.
3213
3214 2010-08-05  Jon Honeycutt  <jhoneycutt@apple.com>
3215
3216         WebKitTestRunner needs to be able to set the font smoothing type
3217         https://bugs.webkit.org/show_bug.cgi?id=43406
3218
3219         Reviewed by Adam Roben.
3220
3221         * Shared/FontSmoothingLevel.h: Added.
3222         (WebKit::):
3223
3224         * Shared/WebPreferencesStore.cpp:
3225         (WebKit::WebPreferencesStore::WebPreferencesStore):
3226         Initialize fontSmoothingLevel.
3227         (WebKit::WebPreferencesStore::swap):
3228         Copy fontSmoothingLevel.
3229
3230         * Shared/WebPreferencesStore.h:
3231         (WebKit::WebPreferencesStore::encode):
3232         Encode fontSmoothingLevel.
3233         (WebKit::WebPreferencesStore::decode):
3234         Decode it.
3235
3236         * UIProcess/API/C/WKPreferencesPrivate.cpp: Added.
3237         (WKPreferencesSetFontSmoothingLevel):
3238         Get the font smoothing level from the WKFontSmoothingLevel, and call
3239         WebPreferences::setFontSmoothingLevel().
3240         (WKPreferencesGetFontSmoothingLevel):
3241         Get the font smoothing level from WebPreferences, and translate it to a
3242         WKFontSmoothingLevel.
3243
3244         * UIProcess/API/C/WKPreferencesPrivate.h: Added.
3245         Declare the font smoothing levels, and declare functions to get and set
3246         the level.
3247
3248         * UIProcess/WebPreferences.cpp:
3249         (WebKit::WebPreferences::setFontSmoothingLevel):
3250         Set fontSmoothingLevel and call update().
3251         (WebKit::WebPreferences::fontSmoothingLevel):
3252         Return the level.
3253
3254         * UIProcess/WebPreferences.h:
3255         Declare getter and setter for fontSmoothingLevel.
3256
3257         * WebKit2.xcodeproj/project.pbxproj:
3258         Add new files to project.
3259
3260         * WebProcess/WebPage/WebPage.cpp:
3261         (WebKit::WebPage::preferencesDidChange):
3262         Call platformPreferencesDidChange().
3263
3264         * WebProcess/WebPage/WebPage.h:
3265         Declare platformPreferencesDidChange().
3266
3267         * WebProcess/WebPage/mac/WebPageMac.mm:
3268         (WebKit::WebPage::platformPreferencesDidChange):
3269         Stubbed.
3270
3271         * WebProcess/WebPage/qt/WebPageQt.cpp:
3272         (WebKit::WebPage::platformPreferencesDidChange):
3273         Stubbed.
3274
3275         * WebProcess/WebPage/win/WebPageWin.cpp:
3276         (WebKit::WebPage::platformPreferencesDidChange):
3277         On CG platforms, call wkSetFontSmoothingLevel(). This matches the code
3278         in old WebKit's WebPreferences. Set the font rendering mode to either
3279         normal (CG) or alternative (GDI) based on the font smoothing level. This
3280         matches what was done in old WebKit's WebView.
3281
3282         * win/WebKit2.vcproj:
3283         Add FontSmoothingLevel.h and WKPreferencesPrivate.{h,cpp} to project.
3284
3285         * win/WebKit2Generated.make:
3286         Copy WKPreferencesPrivate.h.
3287
3288 2010-08-06  Anders Carlsson  <andersca@apple.com>
3289
3290         Build fixes.
3291
3292         * Platform/win/SharedMemoryWin.cpp:
3293         (WebKit::SharedMemory::Handle::encode):
3294         (WebKit::SharedMemory::Handle::decode):
3295         * Shared/qt/UpdateChunk.cpp:
3296         (WebKit::UpdateChunk::encode):
3297         (WebKit::UpdateChunk::decode):
3298         * Shared/qt/UpdateChunk.h:
3299         * Shared/win/UpdateChunk.cpp:
3300         (WebKit::UpdateChunk::encode):
3301         (WebKit::UpdateChunk::decode):
3302         * Shared/win/UpdateChunk.h:
3303
3304 2010-08-06  Anders Carlsson  <andersca@apple.com>
3305
3306         Reviewed by Sam Weinig.
3307
3308         Change all ArgumentEncoder and ArgumentDecoder references to pointers
3309         https://bugs.webkit.org/show_bug.cgi?id=43651
3310
3311         * Platform/CoreIPC/ArgumentCoder.h:
3312         * Platform/CoreIPC/ArgumentDecoder.h:
3313         * Platform/CoreIPC/Arguments.h:
3314         * Platform/CoreIPC/Attachment.cpp:
3315         * Platform/CoreIPC/Attachment.h:
3316         * Platform/CoreIPC/mac/MachPort.h:
3317         * Platform/SharedMemory.h:
3318         * Platform/mac/SharedMemoryMac.cpp:
3319         * Shared/DrawingAreaBase.cpp:
3320         * Shared/DrawingAreaBase.h:
3321         * Shared/WebEvent.h:
3322         * Shared/WebNavigationDataStore.h:
3323         * Shared/WebPreferencesStore.h:
3324         * Shared/mac/UpdateChunk.cpp:
3325         * Shared/mac/UpdateChunk.h:
3326         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
3327         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
3328         * UIProcess/DrawingAreaProxy.h:
3329         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
3330         * UIProcess/LayerBackedDrawingAreaProxy.h:
3331         * UIProcess/WebContext.cpp:
3332         * UIProcess/WebContext.h:
3333         * UIProcess/WebPageProxy.cpp:
3334         * UIProcess/WebPageProxy.h:
3335         * UIProcess/WebProcessProxy.cpp:
3336         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3337         * WebProcess/InjectedBundle/InjectedBundle.h:
3338         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
3339         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
3340         * WebProcess/WebPage/DrawingArea.h:
3341         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3342         * WebProcess/WebPage/LayerBackedDrawingArea.h:
3343         * WebProcess/WebPage/WebPage.cpp:
3344         * WebProcess/WebPage/WebPage.h:
3345         * WebProcess/WebProcess.cpp:
3346
3347 2010-08-06  Anders Carlsson  <andersca@apple.com>
3348
3349         Reviewed by Sam Weinig.
3350
3351         Don't try to allocate a vector unless we know the buffer can contain it
3352         https://bugs.webkit.org/show_bug.cgi?id=43647
3353
3354         * Platform/CoreIPC/ArgumentCoders.h:
3355         (CoreIPC::):
3356         Check that the argument decoder buffer actually can hold all the vector elements.
3357
3358         * Platform/CoreIPC/ArgumentDecoder.cpp:
3359         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughtToContain):
3360         Align the current position to the given alignment, add the size and check if the position is
3361         past the end of the buffer.
3362
3363         * Platform/CoreIPC/ArgumentDecoder.h:
3364         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughtToContain):
3365         Get the size and alignment and call the other bufferIsLargeEnoughtToContain overload.
3366
3367 2010-08-06  Anders Carlsson  <andersca@apple.com>
3368
3369         Reviewed by Adam Roben.
3370
3371         Detect invalid CoreIPC messages and call didReceiveInvalidMessage
3372         https://bugs.webkit.org/show_bug.cgi?id=43643
3373         <rdar://problem/7891069>
3374
3375         * Platform/CoreIPC/ArgumentDecoder.cpp:
3376         (CoreIPC::ArgumentDecoder::alignBufferPosition):
3377         If we can't correctly align the buffer position, mark the decoder as invalid.
3378
3379         * Platform/CoreIPC/ArgumentDecoder.h:
3380         (CoreIPC::ArgumentDecoder::isInvalid):
3381         Check if the argument decoder is valid.
3382
3383         (CoreIPC::ArgumentDecoder::markInvalid):
3384         Mark the argument decoder as invalid, by setting its buffer position past its end position.
3385
3386         * Platform/CoreIPC/Connection.cpp:
3387         (CoreIPC::Connection::dispatchMessages):
3388         Check if m_client is null before dispatching messages. If an argument decoder was marked invalid, call
3389         Connection::Client::didReceiveInvalidMessage.
3390
3391         * Platform/CoreIPC/Connection.h:
3392         (CoreIPC::Connection::Message::releaseArguments):
3393         Rename destroy to releaseArguments and make it return a PassOwnPtr.
3394
3395         * UIProcess/WebProcessProxy.cpp:
3396         (WebKit::WebProcessProxy::~WebProcessProxy):
3397         Call releaseArguments instead of destroy.
3398
3399         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
3400         Kill the web process and invalidate its connection.
3401
3402         * WebProcess/WebProcess.cpp:
3403         (WebKit::WebProcess::didReceiveInvalidMessage):
3404         Don't do anything, if the UI process is sending invalid messages there's not much we can do.
3405
3406         * WebProcess/WebProcess.h:
3407
3408 2010-08-06  Anders Carlsson  <andersca@apple.com>
3409
3410         Reviewed by Adam Roben.
3411
3412         Add CoreIPC::MessageReceiver class
3413         https://bugs.webkit.org/show_bug.cgi?id=43637
3414
3415         * Platform/CoreIPC/Connection.h:
3416         (CoreIPC::Connection::MessageReceiver::~MessageReceiver):
3417         Add MessageReceiver class and make Client inherit from it.
3418
3419         (CoreIPC::Connection::MessageReceiver::didReceiveSyncMessage):
3420         Change didReceiveSyncMessage from being a pure virtual member function and make it
3421         assert by default instead.
3422
3423         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
3424         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
3425         Remove ChunkedUpdateDrawingAreaProxy::didReceiveSyncMessage.
3426
3427         * Shared/DrawingAreaBase.h:
3428         Include "Connection.h" instead.
3429
3430         * UIProcess/DrawingAreaProxy.h:
3431         (WebKit::DrawingAreaProxy::didReceiveSyncMessage):
3432         Change didReceiveSyncMessage from being a pure virtual member function and make it
3433         assert by default instead.
3434
3435         * WebProcess/WebProcess.cpp:
3436         * WebProcess/WebProcess.h:
3437         Remove didReceiveSyncMessage.
3438
3439 2010-08-06  Jessie Berlin  <jberlin@apple.com>
3440
3441         Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
3442         Unreviewed.
3443
3444         * UIProcess/PageClient.h:
3445         * UIProcess/VisitedLinkProvider.h:
3446         * UIProcess/WebContextInjectedBundleClient.h:
3447         * UIProcess/WebFrameProxy.h:
3448         * UIProcess/WebHistoryClient.h:
3449         * UIProcess/WebLoaderClient.h:
3450         * UIProcess/WebPolicyClient.h:
3451         * UIProcess/WebProcessProxy.h:
3452         * UIProcess/WebUIClient.h:
3453         * UIProcess/win/WebView.h:
3454         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
3455         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3456         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
3457         * WebProcess/Plugins/NPRuntimeObjectMap.h:
3458         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
3459         * WebProcess/Plugins/PluginController.h:
3460         * WebProcess/WebPage/WebFrame.h:
3461         * WebProcess/WebPage/WebPage.h:
3462         * WebProcess/WebProcess.h:
3463
3464 2010-08-05  Sam Weinig  <sam@webkit.org>
3465
3466         Reviewed by Anders Carlsson.
3467
3468         Add form client for injected bundle code
3469         https://bugs.webkit.org/show_bug.cgi?id=43603
3470
3471         * WebKit2.xcodeproj/project.pbxproj:
3472         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3473         (WKBundlePageSetFormClient):
3474         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3475         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: Added.
3476         (WebKit::InjectedBundlePageFormClient::InjectedBundlePageFormClient):
3477         (WebKit::InjectedBundlePageFormClient::initialize):
3478         (WebKit::InjectedBundlePageFormClient::textFieldDidBeginEditing):
3479         (WebKit::InjectedBundlePageFormClient::textFieldDidEndEditing):
3480         (WebKit::InjectedBundlePageFormClient::textDidChangeInTextField):
3481         (WebKit::InjectedBundlePageFormClient::textDidChangeInTextArea):
3482         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Added.
3483         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3484         (WebKit::WebEditorClient::textFieldDidBeginEditing):
3485         (WebKit::WebEditorClient::textFieldDidEndEditing):
3486         (WebKit::WebEditorClient::textDidChangeInTextField):
3487         (WebKit::WebEditorClient::textDidChangeInTextArea):
3488         * WebProcess/WebPage/WebPage.cpp:
3489         (WebKit::WebPage::initializeInjectedBundleFormClient):
3490         * WebProcess/WebPage/WebPage.h:
3491         (WebKit::WebPage::injectedBundleFormClient):
3492         * win/WebKit2.vcproj:
3493
3494 2010-08-05  Sam Weinig  <sam@webkit.org>
3495
3496         Reviewed by Anders Carlsson.
3497
3498         Add ability to get a JSValueRef for a node handle and a world
3499         https://bugs.webkit.org/show_bug.cgi?id=43591
3500
3501         - Add API to get a JSValueRef for a world, node and frame (the
3502           frame is currently necessary to pick the right globalObject for
3503           the node wrapper).
3504         - Add API to a JSGlobalContextRef for a world and a frame.
3505
3506         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3507         (WKBundleFrameGetJavaScriptContextForWorld):
3508         (WKBundleFrameGetJavaScriptWrapperForNodeForWorld):
3509         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3510         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h:
3511         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3512         (WebKit::InjectedBundleNodeHandle::coreNode):
3513         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3514         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
3515         (WebKit::InjectedBundleScriptWorld::coreWorld):
3516         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
3517         * WebProcess/WebPage/WebFrame.cpp:
3518         (WebKit::WebFrame::jsContext):
3519         (WebKit::WebFrame::jsContextForWorld):
3520         (WebKit::WebFrame::jsWrapperForWorld):
3521         * WebProcess/WebPage/WebFrame.h:
3522
3523 2010-08-05  Gavin Barraclough  <barraclough@apple.com>
3524
3525         Rubber stamped by Sam Weinig
3526
3527         Bug 43594 - Add string forwards to Forward.h
3528         This allows us to remove forward declarations for these classes from
3529         WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
3530
3531         * UIProcess/PageClient.h:
3532         * UIProcess/VisitedLinkProvider.h:
3533         * UIProcess/WebContextInjectedBundleClient.h:
3534         * UIProcess/WebFrameProxy.h:
3535         * UIProcess/WebHistoryClient.h:
3536         * UIProcess/WebLoaderClient.h:
3537         * UIProcess/WebPolicyClient.h:
3538         * UIProcess/WebProcessProxy.h:
3539         * UIProcess/WebUIClient.h:
3540         * UIProcess/win/WebView.h:
3541         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
3542         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3543         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
3544         * WebProcess/Plugins/NPRuntimeObjectMap.h:
3545         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
3546         * WebProcess/Plugins/PluginController.h:
3547         * WebProcess/WebPage/WebFrame.h:
3548         * WebProcess/WebPage/WebPage.h:
3549         * WebProcess/WebProcess.h:
3550
3551 2010-08-05  Anders Carlsson  <andersca@apple.com>
3552
3553         Reviewed by Sam Weinig.
3554
3555         Use the visited link provider for visited links
3556         https://bugs.webkit.org/show_bug.cgi?id=43583
3557
3558         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
3559         (WebProcessMessage::):
3560         Remove AddVisitedLink.
3561
3562         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
3563         (WebProcessProxyMessage::):
3564         Remove PopulateVisitedLinks and add AddVisitedLink.
3565
3566         * UIProcess/WebContext.cpp:
3567         (WebKit::WebContext::sharedProcessContext):
3568         Initialize the main run loop before creating the context.
3569         
3570         (WebKit::WebContext::sharedThreadContext):
3571         Ditto.
3572         
3573         (WebKit::WebContext::create):
3574         Ditto.
3575
3576         (WebKit::WebContext::WebContext):
3577         Initialize the visited link provider.
3578
3579         (WebKit::WebContext::processDidFinishLaunching):
3580         Ask the visited link provider to populate visited links.
3581
3582         (WebKit::WebContext::addVisitedLink):
3583         Ask the visited link provider to add the visited link.
3584
3585         * UIProcess/WebProcessProxy.cpp:
3586         (WebKit::WebProcessProxy::addVisitedLink):
3587         Call WebContext::addVisitedLink.
3588
3589         (WebKit::WebProcessProxy::didReceiveMessage):
3590         Handle AddVisitedLink.
3591
3592         (WebKit::WebProcessProxy::didFinishLaunching):
3593         Call WebContext::processdidFinishLaunching.
3594
3595         * UIProcess/WebProcessProxy.h:
3596         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3597         (WebKit::WebChromeClient::populateVisitedLinks):
3598         Don't send the WebProcessProxyMessage::PopulateVisitedLinks message.
3599
3600         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3601         (WebKit::WebPlatformStrategies::isLinkVisited):
3602         Call WebProcess::isLinkVisited.
3603         
3604         (WebKit::WebPlatformStrategies::addVisitedLink):
3605         Call WebProcess::addVisitedLink.
3606
3607         * WebProcess/WebProcess.cpp:
3608         (WebKit::WebProcess::setVisitedLinkTable):
3609         Create a shared memory object and tell the visited link table about it.
3610
3611         (WebKit::WebProcess::visitedLinkStateChanged):
3612         Go through the link hashes and call Page::visitedStateChanged.
3613
3614         (WebKit::WebProcess::allVisitedLinkStateChanged):
3615         Call Page::allVisitedStateChanged.
3616
3617         (WebKit::WebProcess::isLinkVisited):
3618         Call VisitedLinkTable::isLinkVisited.
3619
3620         (WebKit::WebProcess::addVisitedLink):
3621         Inform the UI process about the added link.
3622
3623         (WebKit::WebProcess::didReceiveMessage):
3624         Handle new messages.
3625
3626 2010-08-05  Steve Falkenburg  <sfalken@apple.com>
3627
3628         Windows build fix.
3629         Add missing include path.
3630
3631         * win/WebKit2Common.vsprops:
3632
3633 2010-08-05  Brady Eidson  <beidson@apple.com>
3634
3635         Rubberstamped by Sam Weinig.
3636
3637         Export WKError.h
3638
3639         * WebKit2.xcodeproj/project.pbxproj:
3640
3641 2010-08-05  Steve Falkenburg  <sfalken@apple.com>
3642
3643         Windows build fix.
3644         Correct vcproj nesting.
3645
3646         * win/WebKit2.vcproj:
3647
3648 2010-08-05  Sam Weinig  <sam@webkit.org>
3649
3650         Reviewed by Gavin Barraclough.
3651
3652         Add script world API for injected bundles
3653         https://bugs.webkit.org/show_bug.cgi?id=43577
3654
3655         * Shared/APIObject.h:
3656         (WebKit::APIObject::):
3657         * WebKit2.xcodeproj/project.pbxproj:
3658         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
3659         (WebKit::):
3660         * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
3661         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp: Added.
3662         (WKBundleScriptWorldGetTypeID):
3663         (WKBundleScriptWorldCreateWorld):
3664         (WKBundleScriptWorldNormalWorld):
3665         (WKBundleScriptWorldRetain):
3666         (WKBundleScriptWorldRelease):
3667         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h: Added.
3668         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3669         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp: Added.
3670         (WebKit::allWorlds):
3671         (WebKit::InjectedBundleScriptWorld::create):
3672         (WebKit::InjectedBundleScriptWorld::getOrCreate):
3673         (WebKit::InjectedBundleScriptWorld::normalWorld):
3674         (WebKit::InjectedBundleScriptWorld::InjectedBundleScriptWorld):
3675         (WebKit::InjectedBundleScriptWorld::~InjectedBundleScriptWorld):
3676         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h: Added.
3677         (WebKit::InjectedBundleScriptWorld::type):
3678         * win/WebKit2.vcproj:
3679         * win/WebKit2Generated.make:
3680
3681 2010-08-05  Sam Weinig  <sam@webkit.org>
3682
3683         Reviewed Anders Carlsson.
3684
3685         Add DOM Node wrapper class for injected bundle
3686         https://bugs.webkit.org/show_bug.cgi?id=43524
3687
3688         - This class should not expose any DOM APIs, but just be a handle that can be used to get a JS
3689           wrapper for the node in a specific world.
3690
3691         * Shared/APIObject.h:
3692         (WebKit::APIObject::):
3693         * WebKit2.xcodeproj/project.pbxproj:
3694         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
3695         (WebKit::):
3696         * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
3697         * WebProcess/InjectedBundle/API/c/WKBundleNode.h:
3698         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: Added.
3699         (WKBundleNodeHandleGetTypeID):
3700         (WKBundleNodeHandleRetain):
3701         (WKBundleNodeHandleRelease):
3702         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h: Added.
3703         * WebProcess/InjectedBundle/DOM: Added.
3704         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Added.
3705         (WebKit::domHandleCache):
3706         (WebKit::getDOMHandle):
3707         (WebKit::setDOMHandle):
3708         (WebKit::removeDOMHandle):
3709         (WebKit::InjectedBundleNodeHandle::getOrCreate):
3710         (WebKit::InjectedBundleNodeHandle::create):
3711         (WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
3712         (WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
3713         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Added.
3714         (WebKit::InjectedBundleNodeHandle::type):
3715         * win/WebKit2.vcproj:
3716         * win/WebKit2Generated.make:
3717
3718 2010-08-05  Anders Carlsson  <andersca@apple.com>