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