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