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