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