2010-08-12 Maciej Stachowiak <mjs@apple.com>
[WebKit.git] / WebKit2 / ChangeLog
1 2010-08-12  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         WebKit2 crashes when WebFrame outlives WebPage
6         https://bugs.webkit.org/show_bug.cgi?id=43939
7
8         * WebProcess/WebCoreSupport/WebChromeClient.h:
9         (WebKit::WebChromeClient::page): Add this method, to allow
10         WebFrame to retrieve its WebPage following WebCore pointers.
11         * WebProcess/WebPage/WebFrame.cpp:
12         (WebKit::WebFrame::WebFrame): Do not initialize m_page (it's gone).
13         (WebKit::WebFrame::page): Don't use the data member, get it from
14         WebCore.
15         (WebKit::WebFrame::invalidate): Use method to get page() and null check.
16         (WebKit::WebFrame::isMainFrame): ditto
17         * WebProcess/WebPage/WebFrame.h:
18
19 2010-08-12  Jon Honeycutt  <jhoneycutt@apple.com>
20
21         WebKitTestRunner needs to run tests without using native controls
22         https://bugs.webkit.org/show_bug.cgi?id=43772
23
24         Reviewed by Sam Weinig.
25
26         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
27         (WebProcessMessage::):
28         Add a new message.
29
30         * UIProcess/API/C/win/WKContextPrivateWin.h: Added.
31         Declare WKContextSetShouldPaintNativeControls().
32
33         * UIProcess/API/C/win/WKContextWin.cpp: Added.
34         (WKContextSetShouldPaintNativeControls):
35         Call the WebContext's setShouldPaintNativeControls().
36
37         * UIProcess/WebContext.cpp:
38         (WebKit::WebContext::WebContext):
39         Initialize m_shouldPaintNativeControls.
40         (WebKit::WebContext::ensureWebProcess):
41         If we created a web process, call platformSetUpWebProcess().
42
43         * UIProcess/WebContext.h:
44         Declare new functions and a member to store whether we should paint
45         native controls.
46
47         * UIProcess/mac/WebContextMac.mm:
48         (WebKit::WebContext::platformSetUpWebProcess):
49         Stubbed.
50
51         * UIProcess/win/WebContextWin.cpp:
52         (WebKit::WebContext::setShouldPaintNativeControls):
53         Set m_shouldPaintNativeControls. If we have a valid web process, send a
54         SetShouldPaintNativeControls message.
55         (WebKit::WebContext::platformSetUpWebProcess):
56         Send a SetShouldPaintNativeControls message.
57
58         * WebProcess/WebProcess.cpp:
59         (WebKit::WebProcess::didReceiveMessage):
60         If this is a SetShouldPaintNativeControls message, decode the argument,
61         and call Settings::setShouldPaintNativeControls().
62
63         * win/WebKit2.vcproj:
64         Add WKContextPrivateWin.h and WKContextWin.cpp to project.
65
66         * win/WebKit2Generated.make:
67         Copy WKContextPrivateWin.h.
68
69 2010-08-11  Sam Weinig  <sam@webkit.org>
70
71         Reviewed by Gavin Barraclough.
72
73         Add SPI to stop loading from the InjectedBundle.
74
75         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
76         (WKBundlePageStopLoading):
77         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
78         * WebProcess/WebPage/WebPage.h:
79
80 2010-08-11  Sam Weinig  <sam@webkit.org>
81
82         Reviewed by Gavin Barraclough.
83
84         WKPageStopLoading always asserts
85
86         * WebProcess/WebPage/WebPage.cpp:
87         (WebKit::WebPage::didReceiveMessage): Switch break to return, break made us
88         hit the ASSERT_NOT_REACHED at the end of the function.
89
90 2010-08-11  Balazs Kelemen  <kb@inf.u-szeged.hu>
91
92         Unreviewed build fix.
93
94         [Qt] Update WebKit2 build environment, add stub implementation of SharedMemory.
95
96         * DerivedSources.pro:
97         * Platform/qt/SharedMemoryQt.cpp: Added.
98         (WebKit::SharedMemory::Handle::Handle):
99         (WebKit::SharedMemory::Handle::~Handle):
100         (WebKit::SharedMemory::Handle::encode):
101         (WebKit::SharedMemory::Handle::decode):
102         (WebKit::SharedMemory::create):
103         (WebKit::SharedMemory::~SharedMemory):
104         (WebKit::SharedMemory::createHandle):
105         (WebKit::SharedMemory::systemPageSize):
106         * WebKit2.pro:
107         * WebKit2Prefix.h:
108
109 2010-08-11  Mark Rowe  <mrowe@apple.com>
110
111         Build fix.  Update references to StringHash.h.
112
113         * Shared/CommandLine.h:
114         * UIProcess/WebContext.h:
115         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
116         * WebProcess/win/WebProcessMainWin.cpp:
117
118 2010-08-10  Darin Adler  <darin@apple.com>
119
120         Reviewed by Sam Weinig.
121
122         Add leakRef and clear to all RefPtr variants
123         https://bugs.webkit.org/show_bug.cgi?id=42389
124
125         * UIProcess/API/cpp/WKRetainPtr.h: Changed all uses of "template <...>" to
126         "template<...>". Defined many of the inlined functions outside the class
127         definition, to avoid style checker warnings about multiple statements on
128         a single line and for slightly better clarity of the class definition itself.
129         Renamed releaseRef to leakRef. Added a releaseRef that calls leakRef so we
130         don't have to rename all callers at once. Added a clear function.
131
132 2010-08-10  Balazs Kelemen  <kb@inf.u-szeged.hu>
133
134         Reviewed by Antonio Gomes.
135
136         [Qt] Build WebKit2 into a static lib
137
138         https://bugs.webkit.org/show_bug.cgi?id=43621
139
140         * WebKit2.pri: Added. Defined addWebKit2Lib function that defines how to link against the static lib.
141         * WebKit2.pro:  Build specification for the WebKit2 framework.
142         * WebProcess.pro: Copied from WebKit2/WebKit2.pro. Build specification for the WebProcess binary.
143
144 2010-08-09  Sam Weinig  <sam@webkit.org>
145
146         Reviewed by Geoffrey Garen.
147
148         Add zoom support for injected bundle
149         https://bugs.webkit.org/show_bug.cgi?id=43759
150
151         Add SPI to change the zoom factor for a page.
152
153         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
154         (toZoomMode):
155         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
156         (WKBundlePageGetZoomFactor):
157         (WKBundlePageSetZoomFactor):
158         (WKBundlePageSetZoomMode):
159         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
160         * WebProcess/WebPage/WebPage.cpp:
161         (WebKit::WebPage::zoomFactor):
162         (WebKit::WebPage::setZoomFactor):
163         (WebKit::WebPage::setZoomMode):
164         * WebProcess/WebPage/WebPage.h:
165
166 2010-08-06  Gavin Barraclough  <barraclough@apple.com>
167
168         Rubber stamped by Sam Weinig
169
170         Bug 43594 - Add string forwards to Forward.h
171         This allows us to remove forward declarations for these classes from
172         WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
173
174         * UIProcess/PageClient.h:
175         * UIProcess/VisitedLinkProvider.h:
176         * UIProcess/WebContextInjectedBundleClient.h:
177         * UIProcess/WebFrameProxy.h:
178         * UIProcess/WebHistoryClient.h:
179         * UIProcess/WebLoaderClient.h:
180         * UIProcess/WebPolicyClient.h:
181         * UIProcess/WebProcessProxy.h:
182         * UIProcess/WebUIClient.h:
183         * UIProcess/win/WebView.h:
184         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
185         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
186         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
187         * WebProcess/Plugins/NPRuntimeObjectMap.h:
188         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
189         * WebProcess/Plugins/PluginController.h:
190         * WebProcess/WebPage/WebFrame.h:
191         * WebProcess/WebPage/WebPage.h:
192         * WebProcess/WebProcess.h:
193
194 2010-08-09  Balazs Kelemen  <kb@inf.u-szeged.hu>
195
196         Reviewed by Kenneth Rohde Christiansen.
197
198         [Qt] No need for PageClientImpl
199
200         https://bugs.webkit.org/show_bug.cgi?id=43728
201
202         Remove PageClientImpl, take the implementation of WebKit::PageClient into QWKPagePrivate.
203
204         * UIProcess/API/qt/qwkpage.cpp:
205         (QWKPagePrivate::QWKPagePrivate):
206         (QWKPagePrivate::toolTipChanged):
207         * UIProcess/API/qt/qwkpage_p.h:
208         (QWKPagePrivate::pageDidEnterAcceleratedCompositing):
209         (QWKPagePrivate::pageDidLeaveAcceleratedCompositing):
210         (QWKPagePrivate::processDidExit):
211         (QWKPagePrivate::processDidRevive):
212         (QWKPagePrivate::setCursor):
213         (QWKPagePrivate::takeFocus):
214
215 2010-08-07  Sam Weinig  <sam@webkit.org>
216
217         Reviewed by Anders Carlsson.
218
219         WebKitTestRunner needs to print onunload handler information
220         <rdar://problem/8213831>
221         https://bugs.webkit.org/show_bug.cgi?id=42703
222
223         Add SPI to get the number of pending unload events.
224
225         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
226         (WKBundleFrameGetPendingUnloadCount):
227         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
228         * WebProcess/WebPage/WebFrame.cpp:
229         (WebKit::WebFrame::pendingUnloadCount):
230         * WebProcess/WebPage/WebFrame.h:
231
232 2010-08-07  Sam Weinig  <sam@webkit.org>
233
234         Reviewed by Anders Carlsson.
235
236         Add additional loader client functions need to complete WebKitTestRunner
237         https://bugs.webkit.org/show_bug.cgi?id=43684
238
239         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
240         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
241         (WebKit::InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame):
242         (WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
243         (WebKit::InjectedBundlePageLoaderClient::didChangeLocationWithinPageForFrame):
244         (WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
245         (WebKit::InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame):
246         (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
247         (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
248         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
249         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
250         (WebKit::WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
251         (WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect):
252         (WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
253         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
254         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
255         (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
256         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
257
258 2010-08-07  Sam Weinig  <sam@webkit.org>
259
260         Another fix for the windows build.
261
262         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
263         (WebKit::NetscapePlugin::isAcceleratedCompositingEnabled):
264
265 2010-08-07  Sam Weinig  <sam@webkit.org>
266
267         Fix windows build.
268
269         * WebProcess/Plugins/PluginView.cpp:
270         (WebKit::PluginView::platformLayer):
271         * WebProcess/Plugins/PluginView.h:
272
273 2010-08-07  Sam Weinig  <sam@webkit.org>
274
275         Reviewed by Anders Carlsson.
276
277         WebKitTestRunner needs GCController
278         <rdar://problem/8213834>
279         https://bugs.webkit.org/show_bug.cgi?id=42701
280
281         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
282         (WKBundleGarbageCollectJavaScriptObjects):
283         (WKBundleGarbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
284         (WKBundleGetJavaScriptObjectsCount):
285         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
286         * WebProcess/InjectedBundle/InjectedBundle.cpp:
287         (WebKit::InjectedBundle::garbageCollectJavaScriptObjects):
288         (WebKit::InjectedBundle::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging):
289         (WebKit::InjectedBundle::javaScriptObjectsCount):
290         * WebProcess/InjectedBundle/InjectedBundle.h:
291
292 2010-08-07  Anders Carlsson  <andersca@apple.com>
293
294         Reviewed by Sam Weinig.
295
296         CA drawing model support for Mac Plugins
297         https://bugs.webkit.org/show_bug.cgi?id=43678
298         <rdar://problem/7929701>
299
300         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
301         (WebKit::NPN_GetValue):
302         Handle WKNVSupportsCompositingCoreAnimationPluginsBool and 
303         NPNVsupportsCoreAnimationBool and return true if accelerated compositing is enabled.
304
305         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
306         (WebKit::NetscapePlugin::isAcceleratedCompositingEnabled):
307         Call PluginController::isAcceleratedCompositingEnabled.
308
309         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
310         (WebKit::NetscapePlugin::platformPostInitialize):
311         If the plug-in uses the Core Animation drawing model, ask it for its layer.
312
313         (WebKit::NetscapePlugin::platformPaint):
314         Don't send draw events if the Core Animation drawing model is used.
315
316         (WebKit::NetscapePlugin::pluginLayer):
317         Return the plug-in layer.
318
319         * WebProcess/Plugins/Plugin.h:
320         Add a pluginLayer pure virtual member function.
321
322         * WebProcess/Plugins/PluginController.h:
323         Add an isAcceleratedCompositingEnabled pure virtual member function.
324
325         * WebProcess/Plugins/PluginView.cpp:
326         (WebKit::PluginView::initializePlugin):
327         If the plug-in has a layer, enter compositing mode.
328
329         (WebKit::PluginView::platformLayer):
330         Ask the plug-in for its layer.
331
332         (WebKit::PluginView::isAcceleratedCompositingEnabled):
333         Call Settings::acceleratedCompositingEnabled.
334
335         * WebProcess/Plugins/PluginView.h:
336
337 2010-08-06  Sam Weinig  <sam@webkit.org>
338
339         Reviewed by Anders Carlsson.
340
341         Delete key doesn't go Back in WebKit2
342         <rdar://problem/8272978>
343         https://bugs.webkit.org/show_bug.cgi?id=43665
344
345         - Adds support for delete key going back (mac only for now)
346         - Adds support for command-left/command right going back/forward
347         - Flesh out scrolling due to arrow keys on the mac to match old webkit.
348         - Made performDefaultBehaviorForKeyEvent platform specific and added
349           a boolean return value which will be used later to inform the UI process
350           about what events have been processed.
351
352         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
353         (WebPageProxyMessage::):
354         * UIProcess/API/mac/WKView.mm:
355         (-[WKView _wantsKeyDownForEvent:]):
356         * UIProcess/WebPageProxy.cpp:
357         (WebKit::WebPageProxy::didReceiveSyncMessage):
358         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
359         (WebKit::WebBackForwardListProxy::backItem):
360         (WebKit::WebBackForwardListProxy::forwardItem):
361         * WebProcess/WebPage/WebPage.cpp:
362         (WebKit::WebPage::keyEvent):
363         * WebProcess/WebPage/WebPage.h:
364         * WebProcess/WebPage/mac/WebPageMac.mm:
365         (WebKit::scroll):
366         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
367         * WebProcess/WebPage/qt/WebPageQt.cpp:
368         (WebKit::scroll):
369         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
370         * WebProcess/WebPage/win/WebPageWin.cpp:
371         (WebKit::scroll):
372         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
373
374 2010-08-07  Sheriff Bot  <webkit.review.bot@gmail.com>
375
376         Unreviewed, rolling out r64904.
377         http://trac.webkit.org/changeset/64904
378         https://bugs.webkit.org/show_bug.cgi?id=43671
379
380         Broke the Qt Windows builders. (Requested by bbandix on
381         #webkit).
382
383         * WebKit2.pri: Removed.
384         * WebKit2.pro:
385         * WebProcess.pro: Removed.
386
387 2010-08-07  Balazs Kelemen  <kb@inf.u-szeged.hu>
388
389         Reviewed by Eric Seidel.
390
391         NPAPI headers should be included through npruntime_internal.h
392
393         https://bugs.webkit.org/show_bug.cgi?id=43620
394
395         * DerivedSources.pro:
396         * WebProcess/Plugins/NPJSObject.h:
397         * WebProcess/Plugins/NPRuntimeUtilities.h:
398         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
399
400 2010-08-07  Balazs Kelemen  <kb@inf.u-szeged.hu>
401
402         Reviewed by Eric Seidel.
403
404         [Qt] Build WebKit2 into a static lib
405
406         https://bugs.webkit.org/show_bug.cgi?id=43621
407
408         * WebKit2.pri: Added. Defined addWebKit2Lib function that defines how to link against the static lib.
409         * WebKit2.pro:  Build specification for the WebKit2 framework.
410         * WebProcess.pro: Copied from WebKit2/WebKit2.pro. Build specification for the WebProcess binary.
411
412 2010-08-05  Jon Honeycutt  <jhoneycutt@apple.com>
413
414         WebKitTestRunner needs to be able to set the font smoothing type
415         https://bugs.webkit.org/show_bug.cgi?id=43406
416
417         Reviewed by Adam Roben.
418
419         * Shared/FontSmoothingLevel.h: Added.
420         (WebKit::):
421
422         * Shared/WebPreferencesStore.cpp:
423         (WebKit::WebPreferencesStore::WebPreferencesStore):
424         Initialize fontSmoothingLevel.
425         (WebKit::WebPreferencesStore::swap):
426         Copy fontSmoothingLevel.
427
428         * Shared/WebPreferencesStore.h:
429         (WebKit::WebPreferencesStore::encode):
430         Encode fontSmoothingLevel.
431         (WebKit::WebPreferencesStore::decode):
432         Decode it.
433
434         * UIProcess/API/C/WKPreferencesPrivate.cpp: Added.
435         (WKPreferencesSetFontSmoothingLevel):
436         Get the font smoothing level from the WKFontSmoothingLevel, and call
437         WebPreferences::setFontSmoothingLevel().
438         (WKPreferencesGetFontSmoothingLevel):
439         Get the font smoothing level from WebPreferences, and translate it to a
440         WKFontSmoothingLevel.
441
442         * UIProcess/API/C/WKPreferencesPrivate.h: Added.
443         Declare the font smoothing levels, and declare functions to get and set
444         the level.
445
446         * UIProcess/WebPreferences.cpp:
447         (WebKit::WebPreferences::setFontSmoothingLevel):
448         Set fontSmoothingLevel and call update().
449         (WebKit::WebPreferences::fontSmoothingLevel):
450         Return the level.
451
452         * UIProcess/WebPreferences.h:
453         Declare getter and setter for fontSmoothingLevel.
454
455         * WebKit2.xcodeproj/project.pbxproj:
456         Add new files to project.
457
458         * WebProcess/WebPage/WebPage.cpp:
459         (WebKit::WebPage::preferencesDidChange):
460         Call platformPreferencesDidChange().
461
462         * WebProcess/WebPage/WebPage.h:
463         Declare platformPreferencesDidChange().
464
465         * WebProcess/WebPage/mac/WebPageMac.mm:
466         (WebKit::WebPage::platformPreferencesDidChange):
467         Stubbed.
468
469         * WebProcess/WebPage/qt/WebPageQt.cpp:
470         (WebKit::WebPage::platformPreferencesDidChange):
471         Stubbed.
472
473         * WebProcess/WebPage/win/WebPageWin.cpp:
474         (WebKit::WebPage::platformPreferencesDidChange):
475         On CG platforms, call wkSetFontSmoothingLevel(). This matches the code
476         in old WebKit's WebPreferences. Set the font rendering mode to either
477         normal (CG) or alternative (GDI) based on the font smoothing level. This
478         matches what was done in old WebKit's WebView.
479
480         * win/WebKit2.vcproj:
481         Add FontSmoothingLevel.h and WKPreferencesPrivate.{h,cpp} to project.
482
483         * win/WebKit2Generated.make:
484         Copy WKPreferencesPrivate.h.
485
486 2010-08-06  Anders Carlsson  <andersca@apple.com>
487
488         Build fixes.
489
490         * Platform/win/SharedMemoryWin.cpp:
491         (WebKit::SharedMemory::Handle::encode):
492         (WebKit::SharedMemory::Handle::decode):
493         * Shared/qt/UpdateChunk.cpp:
494         (WebKit::UpdateChunk::encode):
495         (WebKit::UpdateChunk::decode):
496         * Shared/qt/UpdateChunk.h:
497         * Shared/win/UpdateChunk.cpp:
498         (WebKit::UpdateChunk::encode):
499         (WebKit::UpdateChunk::decode):
500         * Shared/win/UpdateChunk.h:
501
502 2010-08-06  Anders Carlsson  <andersca@apple.com>
503
504         Reviewed by Sam Weinig.
505
506         Change all ArgumentEncoder and ArgumentDecoder references to pointers
507         https://bugs.webkit.org/show_bug.cgi?id=43651
508
509         * Platform/CoreIPC/ArgumentCoder.h:
510         * Platform/CoreIPC/ArgumentDecoder.h:
511         * Platform/CoreIPC/Arguments.h:
512         * Platform/CoreIPC/Attachment.cpp:
513         * Platform/CoreIPC/Attachment.h:
514         * Platform/CoreIPC/mac/MachPort.h:
515         * Platform/SharedMemory.h:
516         * Platform/mac/SharedMemoryMac.cpp:
517         * Shared/DrawingAreaBase.cpp:
518         * Shared/DrawingAreaBase.h:
519         * Shared/WebEvent.h:
520         * Shared/WebNavigationDataStore.h:
521         * Shared/WebPreferencesStore.h:
522         * Shared/mac/UpdateChunk.cpp:
523         * Shared/mac/UpdateChunk.h:
524         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
525         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
526         * UIProcess/DrawingAreaProxy.h:
527         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
528         * UIProcess/LayerBackedDrawingAreaProxy.h:
529         * UIProcess/WebContext.cpp:
530         * UIProcess/WebContext.h:
531         * UIProcess/WebPageProxy.cpp:
532         * UIProcess/WebPageProxy.h:
533         * UIProcess/WebProcessProxy.cpp:
534         * WebProcess/InjectedBundle/InjectedBundle.cpp:
535         * WebProcess/InjectedBundle/InjectedBundle.h:
536         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
537         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
538         * WebProcess/WebPage/DrawingArea.h:
539         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
540         * WebProcess/WebPage/LayerBackedDrawingArea.h:
541         * WebProcess/WebPage/WebPage.cpp:
542         * WebProcess/WebPage/WebPage.h:
543         * WebProcess/WebProcess.cpp:
544
545 2010-08-06  Anders Carlsson  <andersca@apple.com>
546
547         Reviewed by Sam Weinig.
548
549         Don't try to allocate a vector unless we know the buffer can contain it
550         https://bugs.webkit.org/show_bug.cgi?id=43647
551
552         * Platform/CoreIPC/ArgumentCoders.h:
553         (CoreIPC::):
554         Check that the argument decoder buffer actually can hold all the vector elements.
555
556         * Platform/CoreIPC/ArgumentDecoder.cpp:
557         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughtToContain):
558         Align the current position to the given alignment, add the size and check if the position is
559         past the end of the buffer.
560
561         * Platform/CoreIPC/ArgumentDecoder.h:
562         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughtToContain):
563         Get the size and alignment and call the other bufferIsLargeEnoughtToContain overload.
564
565 2010-08-06  Anders Carlsson  <andersca@apple.com>
566
567         Reviewed by Adam Roben.
568
569         Detect invalid CoreIPC messages and call didReceiveInvalidMessage
570         https://bugs.webkit.org/show_bug.cgi?id=43643
571         <rdar://problem/7891069>
572
573         * Platform/CoreIPC/ArgumentDecoder.cpp:
574         (CoreIPC::ArgumentDecoder::alignBufferPosition):
575         If we can't correctly align the buffer position, mark the decoder as invalid.
576
577         * Platform/CoreIPC/ArgumentDecoder.h:
578         (CoreIPC::ArgumentDecoder::isInvalid):
579         Check if the argument decoder is valid.
580
581         (CoreIPC::ArgumentDecoder::markInvalid):
582         Mark the argument decoder as invalid, by setting its buffer position past its end position.
583
584         * Platform/CoreIPC/Connection.cpp:
585         (CoreIPC::Connection::dispatchMessages):
586         Check if m_client is null before dispatching messages. If an argument decoder was marked invalid, call
587         Connection::Client::didReceiveInvalidMessage.
588
589         * Platform/CoreIPC/Connection.h:
590         (CoreIPC::Connection::Message::releaseArguments):
591         Rename destroy to releaseArguments and make it return a PassOwnPtr.
592
593         * UIProcess/WebProcessProxy.cpp:
594         (WebKit::WebProcessProxy::~WebProcessProxy):
595         Call releaseArguments instead of destroy.
596
597         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
598         Kill the web process and invalidate its connection.
599
600         * WebProcess/WebProcess.cpp:
601         (WebKit::WebProcess::didReceiveInvalidMessage):
602         Don't do anything, if the UI process is sending invalid messages there's not much we can do.
603
604         * WebProcess/WebProcess.h:
605
606 2010-08-06  Anders Carlsson  <andersca@apple.com>
607
608         Reviewed by Adam Roben.
609
610         Add CoreIPC::MessageReceiver class
611         https://bugs.webkit.org/show_bug.cgi?id=43637
612
613         * Platform/CoreIPC/Connection.h:
614         (CoreIPC::Connection::MessageReceiver::~MessageReceiver):
615         Add MessageReceiver class and make Client inherit from it.
616
617         (CoreIPC::Connection::MessageReceiver::didReceiveSyncMessage):
618         Change didReceiveSyncMessage from being a pure virtual member function and make it
619         assert by default instead.
620
621         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
622         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
623         Remove ChunkedUpdateDrawingAreaProxy::didReceiveSyncMessage.
624
625         * Shared/DrawingAreaBase.h:
626         Include "Connection.h" instead.
627
628         * UIProcess/DrawingAreaProxy.h:
629         (WebKit::DrawingAreaProxy::didReceiveSyncMessage):
630         Change didReceiveSyncMessage from being a pure virtual member function and make it
631         assert by default instead.
632
633         * WebProcess/WebProcess.cpp:
634         * WebProcess/WebProcess.h:
635         Remove didReceiveSyncMessage.
636
637 2010-08-06  Jessie Berlin  <jberlin@apple.com>
638
639         Roll out http://trac.webkit.org/changeset/64801, which broke the Safari Windows Build.
640         Unreviewed.
641
642         * UIProcess/PageClient.h:
643         * UIProcess/VisitedLinkProvider.h:
644         * UIProcess/WebContextInjectedBundleClient.h:
645         * UIProcess/WebFrameProxy.h:
646         * UIProcess/WebHistoryClient.h:
647         * UIProcess/WebLoaderClient.h:
648         * UIProcess/WebPolicyClient.h:
649         * UIProcess/WebProcessProxy.h:
650         * UIProcess/WebUIClient.h:
651         * UIProcess/win/WebView.h:
652         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
653         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
654         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
655         * WebProcess/Plugins/NPRuntimeObjectMap.h:
656         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
657         * WebProcess/Plugins/PluginController.h:
658         * WebProcess/WebPage/WebFrame.h:
659         * WebProcess/WebPage/WebPage.h:
660         * WebProcess/WebProcess.h:
661
662 2010-08-05  Sam Weinig  <sam@webkit.org>
663
664         Reviewed by Anders Carlsson.
665
666         Add form client for injected bundle code
667         https://bugs.webkit.org/show_bug.cgi?id=43603
668
669         * WebKit2.xcodeproj/project.pbxproj:
670         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
671         (WKBundlePageSetFormClient):
672         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
673         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: Added.
674         (WebKit::InjectedBundlePageFormClient::InjectedBundlePageFormClient):
675         (WebKit::InjectedBundlePageFormClient::initialize):
676         (WebKit::InjectedBundlePageFormClient::textFieldDidBeginEditing):
677         (WebKit::InjectedBundlePageFormClient::textFieldDidEndEditing):
678         (WebKit::InjectedBundlePageFormClient::textDidChangeInTextField):
679         (WebKit::InjectedBundlePageFormClient::textDidChangeInTextArea):
680         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Added.
681         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
682         (WebKit::WebEditorClient::textFieldDidBeginEditing):
683         (WebKit::WebEditorClient::textFieldDidEndEditing):
684         (WebKit::WebEditorClient::textDidChangeInTextField):
685         (WebKit::WebEditorClient::textDidChangeInTextArea):
686         * WebProcess/WebPage/WebPage.cpp:
687         (WebKit::WebPage::initializeInjectedBundleFormClient):
688         * WebProcess/WebPage/WebPage.h:
689         (WebKit::WebPage::injectedBundleFormClient):
690         * win/WebKit2.vcproj:
691
692 2010-08-05  Sam Weinig  <sam@webkit.org>
693
694         Reviewed by Anders Carlsson.
695
696         Add ability to get a JSValueRef for a node handle and a world
697         https://bugs.webkit.org/show_bug.cgi?id=43591
698
699         - Add API to get a JSValueRef for a world, node and frame (the
700           frame is currently necessary to pick the right globalObject for
701           the node wrapper).
702         - Add API to a JSGlobalContextRef for a world and a frame.
703
704         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
705         (WKBundleFrameGetJavaScriptContextForWorld):
706         (WKBundleFrameGetJavaScriptWrapperForNodeForWorld):
707         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
708         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h:
709         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
710         (WebKit::InjectedBundleNodeHandle::coreNode):
711         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
712         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
713         (WebKit::InjectedBundleScriptWorld::coreWorld):
714         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
715         * WebProcess/WebPage/WebFrame.cpp:
716         (WebKit::WebFrame::jsContext):
717         (WebKit::WebFrame::jsContextForWorld):
718         (WebKit::WebFrame::jsWrapperForWorld):
719         * WebProcess/WebPage/WebFrame.h:
720
721 2010-08-05  Gavin Barraclough  <barraclough@apple.com>
722
723         Rubber stamped by Sam Weinig
724
725         Bug 43594 - Add string forwards to Forward.h
726         This allows us to remove forward declarations for these classes from
727         WebCore/WebKit (a step in moving these class from WebCore:: to WTF::).
728
729         * UIProcess/PageClient.h:
730         * UIProcess/VisitedLinkProvider.h:
731         * UIProcess/WebContextInjectedBundleClient.h:
732         * UIProcess/WebFrameProxy.h:
733         * UIProcess/WebHistoryClient.h:
734         * UIProcess/WebLoaderClient.h:
735         * UIProcess/WebPolicyClient.h:
736         * UIProcess/WebProcessProxy.h:
737         * UIProcess/WebUIClient.h:
738         * UIProcess/win/WebView.h:
739         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
740         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
741         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
742         * WebProcess/Plugins/NPRuntimeObjectMap.h:
743         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
744         * WebProcess/Plugins/PluginController.h:
745         * WebProcess/WebPage/WebFrame.h:
746         * WebProcess/WebPage/WebPage.h:
747         * WebProcess/WebProcess.h:
748
749 2010-08-05  Anders Carlsson  <andersca@apple.com>
750
751         Reviewed by Sam Weinig.
752
753         Use the visited link provider for visited links
754         https://bugs.webkit.org/show_bug.cgi?id=43583
755
756         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
757         (WebProcessMessage::):
758         Remove AddVisitedLink.
759
760         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
761         (WebProcessProxyMessage::):
762         Remove PopulateVisitedLinks and add AddVisitedLink.
763
764         * UIProcess/WebContext.cpp:
765         (WebKit::WebContext::sharedProcessContext):
766         Initialize the main run loop before creating the context.
767         
768         (WebKit::WebContext::sharedThreadContext):
769         Ditto.
770         
771         (WebKit::WebContext::create):
772         Ditto.
773
774         (WebKit::WebContext::WebContext):
775         Initialize the visited link provider.
776
777         (WebKit::WebContext::processDidFinishLaunching):
778         Ask the visited link provider to populate visited links.
779
780         (WebKit::WebContext::addVisitedLink):
781         Ask the visited link provider to add the visited link.
782
783         * UIProcess/WebProcessProxy.cpp:
784         (WebKit::WebProcessProxy::addVisitedLink):
785         Call WebContext::addVisitedLink.
786
787         (WebKit::WebProcessProxy::didReceiveMessage):
788         Handle AddVisitedLink.
789
790         (WebKit::WebProcessProxy::didFinishLaunching):
791         Call WebContext::processdidFinishLaunching.
792
793         * UIProcess/WebProcessProxy.h:
794         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
795         (WebKit::WebChromeClient::populateVisitedLinks):
796         Don't send the WebProcessProxyMessage::PopulateVisitedLinks message.
797
798         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
799         (WebKit::WebPlatformStrategies::isLinkVisited):
800         Call WebProcess::isLinkVisited.
801         
802         (WebKit::WebPlatformStrategies::addVisitedLink):
803         Call WebProcess::addVisitedLink.
804
805         * WebProcess/WebProcess.cpp:
806         (WebKit::WebProcess::setVisitedLinkTable):
807         Create a shared memory object and tell the visited link table about it.
808
809         (WebKit::WebProcess::visitedLinkStateChanged):
810         Go through the link hashes and call Page::visitedStateChanged.
811
812         (WebKit::WebProcess::allVisitedLinkStateChanged):
813         Call Page::allVisitedStateChanged.
814
815         (WebKit::WebProcess::isLinkVisited):
816         Call VisitedLinkTable::isLinkVisited.
817
818         (WebKit::WebProcess::addVisitedLink):
819         Inform the UI process about the added link.
820
821         (WebKit::WebProcess::didReceiveMessage):
822         Handle new messages.
823
824 2010-08-05  Steve Falkenburg  <sfalken@apple.com>
825
826         Windows build fix.
827         Add missing include path.
828
829         * win/WebKit2Common.vsprops:
830
831 2010-08-05  Brady Eidson  <beidson@apple.com>
832
833         Rubberstamped by Sam Weinig.
834
835         Export WKError.h
836
837         * WebKit2.xcodeproj/project.pbxproj:
838
839 2010-08-05  Steve Falkenburg  <sfalken@apple.com>
840
841         Windows build fix.
842         Correct vcproj nesting.
843
844         * win/WebKit2.vcproj:
845
846 2010-08-05  Sam Weinig  <sam@webkit.org>
847
848         Reviewed by Gavin Barraclough.
849
850         Add script world API for injected bundles
851         https://bugs.webkit.org/show_bug.cgi?id=43577
852
853         * Shared/APIObject.h:
854         (WebKit::APIObject::):
855         * WebKit2.xcodeproj/project.pbxproj:
856         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
857         (WebKit::):
858         * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
859         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp: Added.
860         (WKBundleScriptWorldGetTypeID):
861         (WKBundleScriptWorldCreateWorld):
862         (WKBundleScriptWorldNormalWorld):
863         (WKBundleScriptWorldRetain):
864         (WKBundleScriptWorldRelease):
865         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h: Added.
866         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
867         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp: Added.
868         (WebKit::allWorlds):
869         (WebKit::InjectedBundleScriptWorld::create):
870         (WebKit::InjectedBundleScriptWorld::getOrCreate):
871         (WebKit::InjectedBundleScriptWorld::normalWorld):
872         (WebKit::InjectedBundleScriptWorld::InjectedBundleScriptWorld):
873         (WebKit::InjectedBundleScriptWorld::~InjectedBundleScriptWorld):
874         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h: Added.
875         (WebKit::InjectedBundleScriptWorld::type):
876         * win/WebKit2.vcproj:
877         * win/WebKit2Generated.make:
878
879 2010-08-05  Sam Weinig  <sam@webkit.org>
880
881         Reviewed Anders Carlsson.
882
883         Add DOM Node wrapper class for injected bundle
884         https://bugs.webkit.org/show_bug.cgi?id=43524
885
886         - This class should not expose any DOM APIs, but just be a handle that can be used to get a JS
887           wrapper for the node in a specific world.
888
889         * Shared/APIObject.h:
890         (WebKit::APIObject::):
891         * WebKit2.xcodeproj/project.pbxproj:
892         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
893         (WebKit::):
894         * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
895         * WebProcess/InjectedBundle/API/c/WKBundleNode.h:
896         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: Added.
897         (WKBundleNodeHandleGetTypeID):
898         (WKBundleNodeHandleRetain):
899         (WKBundleNodeHandleRelease):
900         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h: Added.
901         * WebProcess/InjectedBundle/DOM: Added.
902         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Added.
903         (WebKit::domHandleCache):
904         (WebKit::getDOMHandle):
905         (WebKit::setDOMHandle):
906         (WebKit::removeDOMHandle):
907         (WebKit::InjectedBundleNodeHandle::getOrCreate):
908         (WebKit::InjectedBundleNodeHandle::create):
909         (WebKit::InjectedBundleNodeHandle::InjectedBundleNodeHandle):
910         (WebKit::InjectedBundleNodeHandle::~InjectedBundleNodeHandle):
911         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Added.
912         (WebKit::InjectedBundleNodeHandle::type):
913         * win/WebKit2.vcproj:
914         * win/WebKit2Generated.make:
915
916 2010-08-05  Anders Carlsson  <andersca@apple.com>
917
918         Build fix.
919
920         * Platform/mac/SharedMemoryMac.cpp:
921
922 2010-08-05  Anders Carlsson  <andersca@apple.com>
923
924         Reviewed by Sam Weinig.
925
926         Add VisitedLinkProvider class
927         https://bugs.webkit.org/show_bug.cgi?id=43570
928
929         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
930         (WebProcessMessage::):
931         Add SetVisitedLinkTable, VisitedLinkStateChanged and AllVisitedLinkStateChanged.
932
933         * UIProcess/VisitedLinkProvider.cpp: Added.
934         (WebKit::VisitedLinkProvider::VisitedLinkProvider):
935         Initialize table.
936
937         (WebKit::VisitedLinkProvider::populateVisitedLinksIfNeeded):
938         Ask the context to populate visited links.
939
940         (WebKit::VisitedLinkProvider::addVisitedLink):
941         Add the link hash to the set of pending visited links and start the timer.
942
943         (WebKit::nextPowerOf2):
944         Add helper function.
945
946         (WebKit::tableSizeForKeyCount):
947         Given a key count, returns a table size. The table size is always a power of two, and
948         is chosen so that the table is always at least half empty.
949
950         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
951         First, check if we need to resize the hash table and allocate new shared memory for it if that is the case.
952         Then, go through the pending link hash vector and insert all the elements in the table. Finally, notify the web
953         process about visited links whose state have changed.
954
955         * WebProcess/WebProcess.cpp:
956         (WebKit::WebProcess::didReceiveMessage):
957         Add case statements.
958
959         * win/WebKit2.vcproj:
960         * WebKit2.xcodeproj/project.pbxproj:
961         Add VisitedLinkProvider.cpp and VisitedLinkProvider.h.
962
963 2010-08-05  Anders Carlsson  <andersca@apple.com>
964
965         Reviewed by Sam Weinig.
966
967         Add VisitedLinkTable class
968         https://bugs.webkit.org/show_bug.cgi?id=43566
969
970         * Shared/VisitedLinkTable.cpp: Added.
971         (WebKit::VisitedLinkTable::VisitedLinkTable):
972         (WebKit::VisitedLinkTable::~VisitedLinkTable):
973         Add out of line constructors so we won't have to include SharedMemory.h in the 
974         VisitedLinkTable.h header.
975
976         (WebKit::isPowerOf2):
977         Add helper function.
978
979         (WebKit::VisitedLinkTable::setSharedMemory):
980         Set the new shared memory and update the table size and hash.
981
982         (WebKit::doubleHash):
983         Add helper function from the WTF HashTable.
984
985         (WebKit::VisitedLinkTable::addLinkHash):
986         Add a link hash to the table.
987
988         (WebKit::VisitedLinkTable::isLinkVisited):
989         See if there is an entry for the given link hash.
990
991         * Shared/VisitedLinkTable.h: Added.
992         (WebKit::VisitedLinkTable::sharedMemory):
993         * WebKit2.xcodeproj/project.pbxproj:
994         * win/WebKit2.vcproj:
995         Add VisitedLinkTable.cpp and VisitedLinkTable.h
996
997 2010-08-04  Anders Carlsson  <andersca@apple.com>
998
999         Reviewed by Adam Roben.
1000
1001         Add shared memory abstraction
1002         https://bugs.webkit.org/show_bug.cgi?id=43535
1003         <rdar://problem/8275295>
1004
1005         * Platform/SharedMemory.h: Added.
1006         (WebKit::SharedMemory::):
1007         (WebKit::SharedMemory::size):
1008         Return the size, in bytes, of the shared memory object.
1009         
1010         (WebKit::SharedMemory::data):
1011         Return a pointer to the shared memory object.
1012         
1013         * Platform/mac/SharedMemoryMac.cpp: Added.
1014         (WebKit::SharedMemory::Handle):
1015         A shared memory handle, which can be passed in a CoreIPC Connection.
1016
1017         (WebKit::SharedMemory::create):
1018         Allocate the shared memory.
1019
1020         (WebKit::SharedMemory::~SharedMemory):
1021         Deallocate the shared memory.
1022
1023         (WebKit::SharedMemory::createHandle):
1024         Create a mach port and pass it to the handle.
1025
1026         (WebKit::SharedMemory::systemPageSize):
1027         Return the system page size, in bytes.
1028         
1029         * Platform/win/SharedMemoryWin.cpp: Added.
1030         Add stubbed out version.
1031
1032         * WebKit2.xcodeproj/project.pbxproj:
1033         * win/WebKit2.vcproj:
1034         Add files.
1035
1036 2010-08-05  Jian Li  <jianli@chromium.org>
1037
1038         Reviewed by David Levin.
1039
1040         Unify blob related feature defines to ENABLE(BLOB).
1041         https://bugs.webkit.org/show_bug.cgi?id=43081
1042
1043         * Configurations/FeatureDefines.xcconfig:
1044
1045 2010-08-05  Balazs Kelemen  <kb@inf.u-szeged.hu>
1046
1047         Rubber-stamped by Kenneth Rohde Christiansen.
1048
1049         [Qt] Remove redundant include paths from WebKit2.pro.
1050
1051         * WebKit2.pro:
1052
1053 2010-08-04  Adam Roben  <aroben@apple.com>
1054
1055         Teach WebKit2 how to load the TestNetscapePlugin
1056
1057         Fixes <http://webkit.org/b/43513> WebKitTestRunner on Windows fails to
1058         load TestNetscapePlugin
1059
1060         Reviewed by Jon Honeycutt.
1061
1062         * Platform/Module.cpp:
1063         (WebKit::Module::Module): Initialize m_module on Windows.
1064
1065         * Platform/Module.h: Added m_module on Windows.
1066
1067         * Platform/win/ModuleWin.cpp:
1068         (WebKit::Module::load): Implemented using ::LoadLibraryExW.
1069         (WebKit::Module::unload): Implemented using ::FreeLibrary.
1070         (WebKit::Module::platformFunctionPointer): Implemented using
1071         ::GetProcAddress.
1072
1073         * Platform/win/RunLoopWin.cpp:
1074         (RunLoop::TimerBase::timerFired): Kill the native timer before calling
1075         the fired callback. This makes all our timers non-repeating, but
1076         that's all we need currently.
1077         (RunLoop::TimerBase::start): Added an assertion to help us figure out
1078         when we need to implement repeating timers. Also fixed a typo.
1079
1080         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
1081         (WebKit::PluginInfoStore::pluginsDirectories): Added a FIXME.
1082
1083         (WebKit::PathWalker::PathWalker):
1084         (WebKit::PathWalker::~PathWalker):
1085         (WebKit::PathWalker::isValid):
1086         (WebKit::PathWalker::data):
1087         (WebKit::PathWalker::step):
1088         Added. This class wraps the ::FindFirstFile/::FindNextFile APIs.
1089
1090         (WebKit::PluginInfoStore::pluginPathsInDirectory): Implemented by
1091         porting logic from
1092         WebCore::PluginDatabase::getPluginPathsInDirectories.
1093         (WebKit::getVersionInfo): Copied from PluginDatabaseWin.cpp.
1094         (WebKit::PluginInfoStore::getPluginInfo): Implemented by porting logic
1095         from WebCore::PluginPackage::fetchInfo.
1096         (WebKit::PluginInfoStore::shouldUsePlugin): Changed to always return
1097         true for now. Added a FIXME about implementing this for real.
1098
1099         * UIProcess/WebProcessProxy.cpp:
1100         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1101         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1102         (WebKit::WebFrameLoaderClient::createPlugin):
1103         Removed PLATFORM(MAC) guards around plugin code.
1104
1105         * win/WebKit2.vcproj: Let VS sort the file.
1106
1107 2010-08-05  Antti Koivisto  <koivisto@iki.fi>
1108
1109         Reviewed by Kenneth Rohde Christiansen.
1110
1111         Use toCopiedRef for making WK objects
1112         https://bugs.webkit.org/show_bug.cgi?id=43552
1113
1114         * UIProcess/API/cpp/qt/WKStringQt.cpp:
1115         (WKStringCreateWithQString):
1116         * UIProcess/API/cpp/qt/WKURLQt.cpp:
1117         (WKURLCreateWithQUrl):
1118
1119 2010-08-04  Brady Eidson  <beidson@apple.com>
1120
1121         Reviewed by Sam Weinig.
1122
1123         Change callback APIs to include an Error object in one callback, instead of having a second callback for failure.
1124         https://bugs.webkit.org/show_bug.cgi?id=43522
1125
1126         This includes adding a WKErrorRef object which - for now - either exists or doesn't.
1127         In the future, it may contain useful information about the error.
1128         
1129         * WebKit2.xcodeproj/project.pbxproj:
1130         * win/WebKit2.vcproj:
1131         * win/WebKit2Generated.make:
1132         
1133         * Shared/APIObject.h:
1134         (WebKit::APIObject::):
1135         * UIProcess/API/C/WKAPICast.h:
1136         * UIProcess/API/C/WKBase.h:
1137         
1138         * Shared/WebError.h: Added.
1139         (WebKit::WebError::create):
1140         (WebKit::WebError::WebError):
1141         (WebKit::WebError::type):
1142         
1143         * UIProcess/API/C/WKError.cpp: Added.
1144         (WKErrorGetTypeID):
1145         * UIProcess/API/C/WKError.h: Added.
1146         
1147         * UIProcess/API/C/WKPage.cpp:
1148         (WKPageRunJavaScriptInMainFrame):
1149         (callRunJavaScriptBlockAndRelease):
1150         (WKPageRunJavaScriptInMainFrame_b):
1151         (WKPageRenderTreeExternalRepresentation):
1152         (callRenderTreeExternalRepresentationBlockAndDispose):
1153         (WKPageRenderTreeExternalRepresentation_b):
1154         * UIProcess/API/C/WKPage.h:
1155         * UIProcess/API/C/WKPagePrivate.h:
1156         
1157         * UIProcess/GenericCallback.h:
1158         (WebKit::GenericCallback::create):
1159         (WebKit::GenericCallback::performCallbackWithReturnValue):
1160         (WebKit::GenericCallback::invalidate):
1161         (WebKit::GenericCallback::GenericCallback):
1162
1163 2010-08-04  Ada Chan  <adachan@apple.com>
1164
1165         Windows build fix        
1166
1167         * win/WebKit2Generated.make:
1168
1169 2010-08-04  John Sullivan  <sullivan@apple.com>
1170
1171         Build fix, rubber-stamped by Brady Eidson.
1172
1173         * WebKit2.xcodeproj/project.pbxproj:
1174         Made WKData.h a public header.
1175
1176 2010-08-04  Adam Roben  <aroben@apple.com>
1177
1178         Windows build fix
1179
1180         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1181         (WebKit::NPN_SetValue): Removed unreachable code.
1182
1183 2010-08-04  Adam Roben  <aroben@apple.com>
1184
1185         Windows build fix
1186
1187         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1188         (WebKit::NPN_SetValue): Added some case statements that are compiled
1189         on Windows to avoid a warning about having default but not cases.
1190
1191 2010-08-04  Adam Roben  <aroben@apple.com>
1192
1193         Windows build fix
1194
1195         * win/WebKit2.vcproj: Added NetscapeBrowserFuncs.
1196
1197 2010-08-04  Adam Roben  <aroben@apple.com>
1198
1199         Windows build fix
1200
1201         The functions in NetscapePluginModuleWin.cpp have been moved to
1202         NetscapePluginModule.cpp.
1203
1204         * WebProcess/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: Removed.
1205         * win/WebKit2.vcproj: Removed NetscapePluginModuleWin.
1206
1207 2010-08-04  Adam Roben  <aroben@apple.com>
1208
1209         Move bundle-loading code from NetscapePluginModule to a new Module
1210         class
1211
1212         This allows more NetscapePluginModule code to be cross-platform.
1213
1214         Fixes <http://webkit.org/b/43497> NetscapePluginModule::try/unload
1215         should be cross-platform
1216
1217         Reviewed by Anders Carlsson.
1218
1219         * Platform/Module.cpp: Added.
1220         (WebKit::Module::Module): Store our path.
1221         (WebKit::Module::~Module): Unload our native module.
1222
1223         * Platform/Module.h: Added.
1224         (WebKit::Module::leakBundle): Does what it says.
1225         (WebKit::Module::functionPointer): Returns a pointer to the named
1226         function, with the right type.
1227
1228         * Platform/mac/ModuleMac.mm: Added.
1229         (WebKit::Module::load): Code was moved here from
1230         NetscapePluginModule::tryLoad.
1231         (WebKit::Module::unload): Just clears our bundle.
1232         (WebKit::Module::platformFunctionPointer): Code was moved here from
1233         NetscapePluginModuleMac.cpp.
1234
1235         * Platform/qt/ModuleQt.cpp: Added.
1236         (WebKit::Module::load):
1237         (WebKit::Module::unload):
1238         (WebKit::Module::platformFunctionPointer):
1239         * Platform/win/ModuleWin.cpp: Added.
1240         (WebKit::Module::load):
1241         (WebKit::Module::unload):
1242         (WebKit::Module::platformFunctionPointer):
1243         Just stubbed out these functions.
1244
1245         * WebKit2.xcodeproj/project.pbxproj: Added Module.
1246
1247         * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
1248         (WebKit::NetscapePluginModule::tryLoad):
1249         (WebKit::NetscapePluginModule::unload):
1250         Moved here from NetscapePluginModuleMac.cpp. Now uses the
1251         cross-platform m_module member.
1252
1253         * WebProcess/Plugins/Netscape/NetscapePluginModule.h: Replaced
1254         m_bundle with m_module.
1255
1256         * WebProcess/Plugins/Netscape/mac/NetscapePluginModuleMac.cpp: Removed.
1257
1258         * win/WebKit2.vcproj: Added Module.
1259
1260 2010-08-04  Brady Eidson  <beidson@apple.com>
1261
1262         Reviewed by Sam Weinig.
1263
1264         Lay the groundwork for saving/restoring page session state to WK2
1265         https://bugs.webkit.org/show_bug.cgi?id=43495
1266
1267         * WebKit2.xcodeproj/project.pbxproj:
1268         * win/WebKit2.vcproj:
1269
1270         * Shared/APIObject.h:
1271         (WebKit::APIObject::):
1272         * UIProcess/API/C/WKAPICast.h:
1273         * UIProcess/API/C/WKBase.h:
1274         
1275         Arbitrary byte buffer:
1276         * Shared/WebData.h: Added.
1277         (WebKit::WebData::create):
1278         (WebKit::WebData::bytes):
1279         (WebKit::WebData::size):
1280         (WebKit::WebData::WebData):
1281         (WebKit::WebData::type):
1282         
1283         API facing object to act as a byte buffer:
1284         * UIProcess/API/C/WKData.cpp: Added.
1285         (WKDataGetTypeID):
1286         (WKDataCreate):
1287         (WKDataGetBytes):
1288         (WKDataGetSize):
1289         (WKDataRetain):
1290         (WKDataRelease):
1291         * UIProcess/API/C/WKData.h: Added.
1292
1293         API for saving/restoring state:
1294         * UIProcess/API/C/WKPage.cpp:
1295         (WKPageCopySessionState):
1296         (WKPageRestoreFromSessionState):
1297         * UIProcess/API/C/WKPage.h:
1298
1299         These will be filled in later:
1300         * UIProcess/WebPageProxy.cpp:
1301         (WebKit::WebPageProxy::sessionState):
1302         (WebKit::WebPageProxy::restoreFromSessionState):
1303         * UIProcess/WebPageProxy.h:
1304
1305
1306 2010-08-04  Sam Weinig  <sam@webkit.org>
1307
1308         Reviewed by Anders Carlsson.
1309
1310         Set correct default minimumFontSize.
1311
1312         * Shared/WebPreferencesStore.cpp:
1313         (WebKit::WebPreferencesStore::WebPreferencesStore):
1314
1315 2010-08-03  Adam Roben  <aroben@apple.com>
1316
1317         Turn on PLATFORM_STRATEGIES on Windows
1318
1319         Fixes <http://webkit.org/b/43431>.
1320
1321         Reviewed by Anders Carlsson.
1322
1323         * win/WebKit2.vcproj: Added WebPlatformStrategies. Also let VS reorder
1324         this file as it saw fit.
1325
1326 2010-08-03  Balazs Kelemen  <kb@inf.u-szeged.hu>
1327
1328         Reviewed by Kenneth Rohde Christiansen.
1329
1330         [Qt] Close the WebProcess
1331
1332         https://bugs.webkit.org/show_bug.cgi?id=41690
1333
1334         * Platform/CoreIPC/qt/ConnectionQt.cpp:
1335         (CoreIPC::Connection::open): Registered connectionDidClose to be called when the client disconnected.
1336         * Platform/qt/RunLoopQt.cpp:
1337         (RunLoop::stop): Implemented by calling QCoreApplication::exit.
1338
1339 2010-08-03  Jon Honeycutt  <jhoneycutt@apple.com>
1340
1341         WebKitTestRunner needs to activate the Mac font ascent hack
1342         https://bugs.webkit.org/show_bug.cgi?id=43404
1343
1344         Reviewed by Darin Adler.
1345
1346         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1347         (WKBundleActivateMacFontAscentHack):
1348         Get the InjectedBundle, and calls its activateMacFontAscentHack().
1349
1350         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1351         Declare WKBundleActivateMacFontAscentHack().
1352
1353         * WebProcess/InjectedBundle/InjectedBundle.h:
1354         Declare activateMacFontAscentHack().
1355
1356         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
1357         (WebKit::InjectedBundle::activateMacFontAscentHack):
1358         Stubbed.
1359
1360         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
1361         (WebKit::InjectedBundle::activateMacFontAscentHack):
1362         Stubbed.
1363
1364         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
1365         (WebKit::InjectedBundle::activateMacFontAscentHack):
1366         Activate the ascent hack.
1367
1368 2010-08-03  Simon Fraser  <simon.fraser@apple.com>
1369
1370         Fix typo in typo fix.
1371
1372         * Shared/DrawingAreaBase.h:
1373         (WebKit::DrawingAreaBase::DrawingAreaInfo::DrawingAreaInfo):
1374         (WebKit::DrawingAreaBase::DrawingAreaBase):
1375
1376 2010-08-03  Simon Fraser  <simon.fraser@apple.com>
1377
1378         Fix typo in previous commit.
1379
1380         * Shared/DrawingAreaBase.h:
1381         (WebKit::DrawingAreaBase::DrawingAreaInfo::DrawingAreaInfo):
1382         (WebKit::DrawingAreaBase::DrawingAreaBase):
1383
1384 2010-08-03  Simon Fraser  <simon.fraser@apple.com>
1385
1386         Reviewed by Anders Carlsson.
1387
1388         Compositing iframe layout test crashes in WebKit2
1389         https://bugs.webkit.org/show_bug.cgi?id=42860
1390         
1391         Fix assertion caused by a DrawingArea handling a message that was targetted at an older DrawingArea
1392         that it has replaced.
1393         
1394         This was done by assigning a unique ID to each DrawingAreaProxy that gets created, and passing
1395         this ID, along with the type, to the WebProcess via an encoded DrawingAreaInfo. Each message
1396         also includes this ID. Messages with an ID that doesn't match that of the current DrawingArea are ignored.
1397         
1398         Refactored some common code and data into a DrawingAreaBase class which is shared, and adding
1399         encode/decode of DrawingAreaInfo.
1400
1401         * Shared/DrawingAreaBase.cpp: Added.
1402         (WebKit::DrawingAreaBase::encode):
1403         (WebKit::DrawingAreaBase::decode):
1404         * Shared/DrawingAreaBase.h: Added.
1405         (WebKit::DrawingAreaBase::):
1406         (WebKit::DrawingAreaBase::~DrawingAreaBase):
1407         (WebKit::DrawingAreaBase::type):
1408         (WebKit::DrawingAreaBase::id):
1409         (WebKit::DrawingAreaBase::DrawingAreaInfo::DrawingAreaInfo):
1410         (WebKit::DrawingAreaBase::DrawingAreaBase):
1411         (CoreIPC::):
1412         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1413         (WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
1414         (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
1415         (WebKit::ChunkedUpdateDrawingAreaProxy::update):
1416         * UIProcess/DrawingAreaProxy.cpp:
1417         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1418         (WebKit::DrawingAreaProxy::nextDrawingAreaID):
1419         * UIProcess/DrawingAreaProxy.h:
1420         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1421         (WebKit::LayerBackedDrawingAreaProxy::setSize):
1422         (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
1423         (WebKit::LayerBackedDrawingAreaProxy::update):
1424         * UIProcess/LayerBackedDrawingAreaProxy.h:
1425         * UIProcess/WebPageProxy.cpp:
1426         (WebKit::WebPageProxy::didReceiveSyncMessage):
1427         * WebKit2.xcodeproj/project.pbxproj:
1428         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1429         (WebKit::WebChromeClient::createWindow):
1430         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1431         (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
1432         (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
1433         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1434         * WebProcess/WebPage/DrawingArea.cpp:
1435         (WebKit::DrawingArea::create):
1436         (WebKit::DrawingArea::DrawingArea):
1437         * WebProcess/WebPage/DrawingArea.h:
1438         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
1439         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
1440         (WebKit::LayerBackedDrawingArea::didReceiveMessage):
1441         * WebProcess/WebPage/LayerBackedDrawingArea.h:
1442         * WebProcess/WebPage/WebPage.cpp:
1443         (WebKit::WebPage::create):
1444         (WebKit::WebPage::WebPage):
1445         (WebKit::WebPage::changeAcceleratedCompositingMode):
1446         * WebProcess/WebPage/WebPage.h:
1447         * WebProcess/WebProcess.cpp:
1448         (WebKit::WebProcess::createWebPage):
1449         (WebKit::WebProcess::didReceiveMessage):
1450         * WebProcess/WebProcess.h:
1451         * win/WebKit2.vcproj:
1452
1453 2010-08-03  Alex Milowski  <alex@milowski.com>
1454
1455         Reviewed by Beth Dakin.
1456
1457         Changed the ENABLE_MATHML value to enable MathML by default.
1458
1459         * Configurations/FeatureDefines.xcconfig:
1460
1461 2010-08-03  Simon Fraser  <simon.fraser@apple.com>
1462
1463         Reviewed by Sam Weinig.
1464
1465         Compositing iframe layout test crashes in WebKit2
1466         https://bugs.webkit.org/show_bug.cgi?id=42860
1467         
1468         Part one of the fix: make DrawingArea ref-counted, so that the object
1469         can survide a swap in drawing areas inside the run loop observer callback.
1470
1471         * WebProcess/WebPage/DrawingArea.cpp:
1472         (WebKit::DrawingArea::create):
1473         * WebProcess/WebPage/DrawingArea.h:
1474         * WebProcess/WebPage/WebPage.h:
1475         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1476         (WebKit::LayerBackedDrawingArea::platformClear):
1477         (WebKit::LayerBackedDrawingArea::updateLayoutRunLoopObserverCallback):
1478         (WebKit::LayerBackedDrawingArea::updateLayoutRunLoopObserverFired):
1479
1480 2010-08-03  Anders Carlsson  <andersca@apple.com>
1481
1482         Reviewed by Adam Roben.
1483
1484         Frequent ASSERT_NOT_REACHED in Connection::processIncomingMessage when running regression tests
1485         https://bugs.webkit.org/show_bug.cgi?id=42926
1486         <rdar://problem/8237329>
1487
1488         Remove this assert, it's bogus. It would fire when a reply came in on the connection queue before 
1489         waitForReply was called on the client thread, but that case is already covered.
1490
1491         * Platform/CoreIPC/Connection.cpp:
1492         (CoreIPC::Connection::processIncomingMessage):
1493
1494 2010-08-03  Adam Roben  <aroben@apple.com>
1495
1496         Compile out two Mac-only localized strings on non-Mac platforms
1497
1498         Fixes <http://webkit.org/b/43433> copyImageUnknownFileLabel and
1499         AXARIAContentGroupText should only be compiled on Mac
1500
1501         Reviewed by Anders Carlsson.
1502
1503         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1504         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1505         Wrapped copyImageUnknownFileLabel and AXARIAContentGroupText in
1506         PLATFORM(MAC).
1507
1508 2010-08-03  Balazs Kelemen  <kb@inf.u-szeged.hu>
1509
1510         [Qt] Unreviewed typo fix in the WebKit2/DerivedSources.pro project file.
1511
1512         Use QMAKE_MKDIR as the command for directory creation.
1513
1514         * DerivedSources.pro:
1515
1516 2010-08-02  Brady Eidson  <beidson@apple.com>
1517
1518         Reviewed by Anders Carlsson.
1519
1520         Add VisitedLinkStrategy for each platform to implement
1521         https://bugs.webkit.org/show_bug.cgi?id=43393
1522
1523         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1524         (WebKit::WebPlatformStrategies::createVisitedLinkStrategy):
1525         (WebKit::WebPlatformStrategies::isLinkVisited): Call back into PageGroup's visited links, for now.
1526         (WebKit::WebPlatformStrategies::addVisitedLink): Ditto.
1527         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1528
1529 2010-07-27  Luiz Agostini  <luiz.agostini@openbossa.org>
1530
1531         Reviewed by Darin Fisher.
1532
1533         PopupMenu refactoring in preparation to WebKit2
1534         https://bugs.webkit.org/show_bug.cgi?id=42592
1535
1536         Classes WebPopupMenu and WebSearchPopupMenu inherit from PopupMenu and
1537         SearchPopupMenu respectively. At this point they are just empty implementations.
1538
1539         * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Added.
1540         (WebKit::WebPopupMenu::WebPopupMenu):
1541         (WebKit::WebPopupMenu::~WebPopupMenu):
1542         (WebKit::WebPopupMenu::disconnectClient):
1543         (WebKit::WebPopupMenu::show):
1544         (WebKit::WebPopupMenu::hide):
1545         (WebKit::WebPopupMenu::updateFromElement):
1546         * WebProcess/WebCoreSupport/WebPopupMenu.h: Added.
1547         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Added.
1548         (WebKit::WebSearchPopupMenu::WebSearchPopupMenu):
1549         (WebKit::WebSearchPopupMenu::popupMenu):
1550         (WebKit::WebSearchPopupMenu::saveRecentSearches):
1551         (WebKit::WebSearchPopupMenu::loadRecentSearches):
1552         (WebKit::WebSearchPopupMenu::enabled):
1553         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Added.
1554
1555         As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu
1556         instances, concrete classes that inherit from ChromeClient needed to be changed to
1557         implement the new methods.
1558
1559         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1560         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
1561         (WebKit::WebChromeClient::createPopupMenu):
1562         (WebKit::WebChromeClient::createSearchPopupMenu):
1563         * WebProcess/WebCoreSupport/WebChromeClient.h:
1564
1565         build issues:
1566
1567         * WebKit2.xcodeproj/project.pbxproj:
1568         * win/WebKit2.vcproj:
1569
1570 2010-08-02  Anders Carlsson  <andersca@apple.com>
1571
1572         Reviewed by Sam Weinig.
1573
1574         Fix plug-in test failures and remove tests from the Skipped list
1575         https://bugs.webkit.org/show_bug.cgi?id=43389
1576
1577         * WebProcess/Plugins/JSNPMethod.cpp:
1578         JSNPMethod::s_info should specify InternalFunction::info as its parent.
1579
1580         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1581         (WebKit::NetscapePlugin::cancelStreamLoad):
1582         Special-case the manual stream and call PluginController::cancelManualStreamLoad.
1583
1584         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1585         (WebKit::NetscapePluginStream::stop):
1586         It's OK to call stop on a stream that hasn't been started. Remove assertion and return early.
1587         
1588         * WebProcess/Plugins/PluginController.h:
1589         Add cancelManualStreamLoad.
1590
1591         * WebProcess/Plugins/PluginView.cpp:
1592         (WebKit::PluginView::cancelManualStreamLoad):
1593         Tell the document loader to cancel the main resource load.
1594
1595         * WebProcess/WebPage/WebFrame.cpp:
1596         (WebKit::WebFrame::innerText):
1597         Check for a null document element.
1598
1599 2010-08-02  Anders Carlsson  <andersca@apple.com>
1600
1601         Reviewed by Sam Weinig.
1602
1603         Add support for loading manual streams
1604         https://bugs.webkit.org/show_bug.cgi?id=43380
1605
1606         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1607         (WebKit::NetscapePlugin::NetscapePlugin):
1608         Initialize m_loadManually to false.
1609
1610         (WebKit::NetscapePlugin::removePluginStream):
1611         Special case the manual stream.
1612
1613         (WebKit::NetscapePlugin::initialize):
1614         Don't request the stream if we're already loading.
1615
1616         (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
1617         Create the manual stream and pass the response to it.
1618
1619         (WebKit::NetscapePlugin::manualStreamDidReceiveData):
1620         Pass the data to the manual stream.
1621
1622         (WebKit::NetscapePlugin::manualStreamDidFinishLoading):
1623         Call the manual stream.
1624
1625         (WebKit::NetscapePlugin::manualStreamDidFail):
1626         Ditto.
1627
1628         * WebProcess/Plugins/Plugin.h:
1629         Add pure virtual member functions for manual stream loading.
1630
1631         * WebProcess/Plugins/PluginView.cpp:
1632         (WebKit::buildHTTPHeaders):
1633         Put code in a function so both PluginView::Stream::didReceiveResponse and 
1634         manualLoadDidReceiveResponse can call it.
1635
1636         (WebKit::PluginView::Stream::didReceiveResponse):
1637         Call buildHTTPHeaders.
1638
1639         (WebKit::PluginView::Stream::didFinishLoading):
1640         Protect the plug-in when calling destroyStream.
1641
1642         (WebKit::PluginView::manualLoadDidReceiveResponse):
1643         Call Plugin::manualStreamDidReceiveResponse.
1644
1645         (WebKit::PluginView::manualLoadDidReceiveData):
1646         Call Plugin::manualStreamDidReceiveData.
1647
1648         (WebKit::PluginView::manualLoadDidFinishLoading):
1649         Call Plugin::manualStreamDidFinishLoading.
1650
1651         (WebKit::PluginView::manualLoadDidFail):
1652         Call Plugin::manualStreamDidFail.
1653
1654         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1655         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
1656         Initialize m_hasSentResponseToPluginView to false.
1657
1658         (WebKit::WebFrameLoaderClient::setMainDocumentError):
1659         Call PluginView::manualLoadDidFail.
1660
1661         (WebKit::WebFrameLoaderClient::committedLoad):
1662         Call PluginView::manualLoadDidReceiveResponse.
1663
1664         (WebKit::WebFrameLoaderClient::finishedLoading):
1665         Call PluginView::manualLoadDidFinishLoading.
1666
1667         (WebKit::WebFrameLoaderClient::redirectDataToPlugin):
1668         Keep track of the plug-in view.
1669
1670 2010-08-02  Brady Eidson  <beidson@apple.com>
1671
1672         Reviewed by Anders Carlsson.
1673
1674         Basic WK2 visited link coloring
1675         https://bugs.webkit.org/show_bug.cgi?id=43377
1676
1677         Add simple API that allows the WK2 app to add 1 visited link at a time.
1678         For now, this just pipes each individual LinkHash down to WebCore.
1679         
1680         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
1681         (WebProcessMessage::):
1682
1683         * UIProcess/API/C/WKContext.cpp:
1684         (WKContextAddVisitedLink):
1685         * UIProcess/API/C/WKContext.h:
1686
1687         * UIProcess/WebContext.cpp:
1688         (WebKit::WebContext::addVisitedLink):
1689         * UIProcess/WebContext.h:
1690
1691         * WebProcess/WebProcess.cpp:
1692         (WebKit::WebProcess::addVisitedLinkHash):
1693         (WebKit::WebProcess::didReceiveMessage):
1694         * WebProcess/WebProcess.h:
1695
1696 2010-08-02  Darin Adler  <darin@apple.com>
1697
1698         Reviewed by Sam Weinig.
1699
1700         WebKitTestRunner needs layoutTestController.setCanOpenWindows
1701         https://bugs.webkit.org/show_bug.cgi?id=42321
1702
1703         WebKitTestRunner needs layoutTestController.setCloseRemainingWindowsWhenComplete
1704         https://bugs.webkit.org/show_bug.cgi?id=42779
1705
1706         Implemented window.close, added a function that does a similar operation on behalf
1707         of injected bundle code named WKBundlePageClose, and fixed the reference counting of
1708         the result of the createNewPage client function.
1709
1710         * UIProcess/API/cpp/WKRetainPtr.h: Added clear. Tweaked formatting. Renamed
1711         releaseRef to leakRef.
1712
1713         * UIProcess/API/mac/WKView.mm:
1714         (-[WKView _updateVisibility]): Handle the case where drawing area is 0. This
1715         came up in WebKitTestRunner and other functions handle drawing area of 0.
1716
1717         * UIProcess/WebPageProxy.cpp:
1718         (WebKit::WebPageProxy::didReceiveSyncMessage): Update now that createNewPage
1719         returns a PassRefPtr.
1720         (WebKit::WebPageProxy::createNewPage): Changed to return a PassRefPtr.
1721         * UIProcess/WebPageProxy.h: Ditto.
1722
1723         * UIProcess/WebUIClient.cpp:
1724         (WebKit::WebUIClient::createNewPage): Changed to return a PassRefPtr and adopt
1725         the WKPageRef passed from the client. This follows the "create rule".
1726         * UIProcess/WebUIClient.h: Ditto.
1727
1728         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1729         (WKBundlePageClose): Added.
1730         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Added WKBundlePageClose
1731         and re-sorted the other functions in this file.
1732
1733         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1734         (WebKit::WebChromeClient::closeWindowSoon): Implemented this.
1735
1736         * WebProcess/WebPage/WebPage.cpp:
1737         (WebKit::WebPage::WebPage): Called setJavaScriptCanOpenWindowsAutomatically(true).
1738         I suppose we will need to revisit this later when we implement pop-up blocking.
1739         (WebKit::WebPage::tryClose): Factored out the part of this that sends a message
1740         to the other process.
1741         (WebKit::WebPage::sendClose): This is where the part that sends a message went.
1742         * WebProcess/WebPage/WebPage.h: Added sendClose, used by both closeWindowSoon
1743         and WKBundlePageClose.
1744
1745 2010-08-02  John Sullivan  <sullivan@apple.com>
1746
1747         https://bugs.webkit.org/show_bug.cgi?id=43369
1748         WebBackForwardList::forwardListAsImmutableArrayWithLimit can return partly-uninitialized array
1749         
1750         Reviewed by Ada Chan.
1751
1752         * UIProcess/WebBackForwardList.cpp:
1753         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
1754         Use a simpler and correct expression to determine "last".
1755
1756 2010-08-02  Anders Carlsson  <andersca@apple.com>
1757
1758         Reviewed by Sam Weinig.
1759
1760         Protect the plug-in from being destroyed while in plug-in code
1761         https://bugs.webkit.org/show_bug.cgi?id=43370
1762
1763         Add a PluginProtector to NPRuntimeObjectMap and use it in JSNPObject.
1764         
1765         * WebProcess/Plugins/JSNPObject.cpp:
1766         (WebKit::JSNPObject::callMethod):
1767         (WebKit::JSNPObject::callObject):
1768         (WebKit::JSNPObject::callConstructor):
1769         (WebKit::JSNPObject::put):
1770         (WebKit::JSNPObject::getOwnPropertyNames):
1771         (WebKit::JSNPObject::propertyGetter):
1772         Add PluginProtector declarations.
1773
1774         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
1775         (WebKit::NPRuntimeObjectMap::PluginProtector::PluginProtector):
1776         Ref the plug-in view (unless it's being destroyed).
1777
1778         (WebKit::NPRuntimeObjectMap::PluginProtector::~PluginProtector):
1779         * WebProcess/Plugins/NPRuntimeObjectMap.h:
1780
1781         * WebProcess/Plugins/PluginView.cpp:
1782         (WebKit::PluginView::PluginView):
1783         Initialize m_isBeingDestroyed.
1784
1785         (WebKit::PluginView::~PluginView):
1786         Set m_isBeingDestroyed to true.
1787
1788         (WebKit::PluginView::scriptObject):
1789         Don't crash if the plug-in failed to initialize.
1790
1791         (WebKit::PluginView::evaluate):
1792         Remove comment.
1793
1794         * WebProcess/Plugins/PluginView.h:
1795         (WebKit::PluginView::isBeingDestroyed):
1796
1797 2010-08-02  Anders Carlsson  <andersca@apple.com>
1798
1799         Reviewed by Sam Weinig.
1800
1801         Cache JSNPObjects and fix bugs in the object map
1802         https://bugs.webkit.org/show_bug.cgi?id=43368
1803
1804         * WebProcess/Plugins/JSNPObject.cpp:
1805         (WebKit::JSNPObject::JSNPObject):
1806         Assert that we're not trying to wrap an NPJSObject.
1807
1808         (WebKit::JSNPObject::~JSNPObject):
1809         Tell the object map that we're gone.
1810
1811         (WebKit::JSNPObject::invalidate):
1812         Release the NPObject and null out the pointer.
1813
1814         * WebProcess/Plugins/NPJSObject.cpp:
1815         (WebKit::NPJSObject::create):
1816         Assert that we're not trying to wrap a JSNPObject.
1817
1818         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
1819         (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
1820         If we're passed a JSNPObject, just extract its NPObject.
1821
1822         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
1823         If we're passed an NPJSObject, just extract its JSObject. Otherwise, check if we already have
1824         a JSObject for this NPObject and return it.
1825
1826         (WebKit::NPRuntimeObjectMap::jsNPObjectDestroyed):
1827         Remove the object from the map.
1828
1829         (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
1830         getOrCreateJSObject now checks for wrapped objects.
1831
1832         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
1833         getOrCreateNPObject now checks for wrapped objects.
1834
1835         (WebKit::NPRuntimeObjectMap::invalidate):
1836         Invalidate JSNPObjects as well.
1837
1838 2010-08-02  Jeremy Orlow  <jorlow@chromium.org>
1839
1840         Speculative revert of 64425 due to Chromium instability
1841         https://bugs.webkit.org/show_bug.cgi?id=43347
1842
1843         * WebKit2.xcodeproj/project.pbxproj:
1844         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1845         * WebProcess/WebCoreSupport/WebChromeClient.h:
1846         * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Removed.
1847         * WebProcess/WebCoreSupport/WebPopupMenu.h: Removed.
1848         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Removed.
1849         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Removed.
1850         * win/WebKit2.vcproj:
1851
1852 2010-08-02  Balazs Kelemen  <kb@inf.u-szeged.hu>
1853
1854         Reviewed by Simon Hausmann.
1855
1856         [Qt] Generate forwarding headers for WebKit2
1857
1858         https://bugs.webkit.org/show_bug.cgi?id=43336
1859
1860         * DerivedSources.pro: Added.
1861
1862 2010-08-01  Anders Carlsson  <andersca@apple.com>
1863
1864         Reviewed by Sam Weinig.
1865
1866         Implement NPN_SetException
1867         https://bugs.webkit.org/show_bug.cgi?id=43320
1868
1869         * WebProcess/Plugins/JSNPObject.cpp:
1870         (WebKit::JSNPObject::callConstructor):
1871         (WebKit::JSNPObject::put):
1872         (WebKit::JSNPObject::getOwnPropertyNames):
1873         (WebKit::JSNPObject::propertyGetter):
1874         Call NPRuntimeObjectMap::moveGlobalExceptionToExecState.
1875
1876         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
1877         (WebKit::globalExceptionString):
1878         Add static global.
1879
1880         (WebKit::NPRuntimeObjectMap::setGlobalException):
1881         Set the global exception string.
1882
1883         (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
1884         Create an error from the exception string.
1885
1886         * WebProcess/Plugins/NPRuntimeObjectMap.h:
1887         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1888         (WebKit::NPN_SetException):
1889         Call NetscapePlugin::setException.
1890
1891         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1892         (WebKit::NetscapePlugin::setException):
1893         Call NPRuntimeObjectMap::setGlobalException.
1894
1895 2010-08-01  Sam Weinig  <sam@webkit.org>
1896
1897         Roll r64446 out. It broke the test runner.
1898
1899         * UIProcess/WebContext.cpp:
1900         (WebKit::WebContext::postMessageToInjectedBundle):
1901
1902 2010-08-01  Sam Weinig  <sam@webkit.org>
1903
1904         Reviewed by Anders Carlsson.
1905
1906         Don't send user messages to the injected bundle if the process is not active
1907         https://bugs.webkit.org/show_bug.cgi?id=43317
1908
1909         * UIProcess/WebContext.cpp:
1910         (WebKit::WebContext::postMessageToInjectedBundle):
1911
1912 2010-08-01  Sam Weinig  <sam@webkit.org>
1913
1914         Reviewed by Anders Carlsson.
1915
1916         Add ability to reset frame names for WebKitTestRunner
1917         https://bugs.webkit.org/show_bug.cgi?id=43316
1918
1919         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1920         (WKBundlePageClearMainFrameName):
1921         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1922         * WebProcess/WebPage/WebPage.cpp:
1923         (WebKit::WebPage::clearMainFrameName):
1924         * WebProcess/WebPage/WebPage.h:
1925
1926 2010-08-01  Anders Carlsson  <andersca@apple.com>
1927
1928         Reviewed by Sam Weinig.
1929
1930         Minor NPRuntime fixes
1931         https://bugs.webkit.org/show_bug.cgi?id=43318
1932
1933         * WebProcess/Plugins/JSNPObject.h:
1934         (WebKit::JSNPObject::npObject):
1935         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
1936         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
1937         If we see an JSNPObject, extract the NPObject.
1938
1939         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1940         (WebKit::NPN_GetProperty):
1941         Don't check for whether the property exists before getting it.
1942
1943 2010-08-01  Anders Carlsson  <andersca@apple.com>
1944
1945         Reviewed by Sam Weinig.
1946
1947         Implement NPN_RemoveProperty
1948         https://bugs.webkit.org/show_bug.cgi?id=43315
1949
1950         * WebProcess/Plugins/NPJSObject.cpp:
1951         (WebKit::NPJSObject::removeProperty):
1952         Try to remove the property.
1953
1954         (WebKit::NPJSObject::npClass):
1955         Add NP_RemoveProperty.
1956
1957         (WebKit::NPJSObject::NP_RemoveProperty):
1958         Call NPJSObject::removeProperty.
1959
1960         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1961         (WebKit::NPN_RemoveProperty):
1962         Call the NPClass::removeProperty function.
1963
1964 2010-07-31  Sam Weinig  <sam@webkit.org>
1965
1966         Reviewed by Darin Adler.
1967
1968         Crash due to calling StringImpl::createCFString() from non-main thread in plug-in code
1969         https://bugs.webkit.org/show_bug.cgi?id=43306
1970         <rdar://problem/8259687>
1971
1972         * UIProcess/Plugins/PluginInfoStore.cpp:
1973         (WebKit::PluginInfoStore::getMIMETypeForExtension):
1974         (WebKit::PluginInfoStore::findPlugin):
1975         * UIProcess/Plugins/PluginInfoStore.h:
1976         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1977         (WebKit::safeCreateCFString):
1978         (WebKit::PluginInfoStore::getMIMETypeForExtension):
1979         Bypass MIMETypeRegistry in the UIProcess until we can safely convert Strings
1980         to CFStringRefs.
1981
1982 2010-07-31  Sam Weinig  <sam@webkit.org>
1983
1984         Reviewed by Dan Bernstein.
1985
1986         Patch for https://bugs.webkit.org/show_bug.cgi?id=43305
1987         Add back WKBundleFrameCopyInnerText to fix ~50 test failures
1988         due to SVGElements not having the innerText function.
1989
1990         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1991         (WKBundleFrameCopyInnerText):
1992         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1993         * WebProcess/WebPage/WebFrame.cpp:
1994         (WebKit::WebFrame::innerText):
1995         * WebProcess/WebPage/WebFrame.h:
1996
1997 2010-07-27  Luiz Agostini  <luiz.agostini@openbossa.org>
1998
1999         Reviewed by Darin Fisher.
2000
2001         PopupMenu refactoring in preparation to WebKit2
2002         https://bugs.webkit.org/show_bug.cgi?id=42592
2003
2004         Classes WebPopupMenu and WebSearchPopupMenu inherit from PopupMenu and
2005         SearchPopupMenu respectively. At this point they are just empty implementations.
2006
2007         * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Added.
2008         (WebKit::WebPopupMenu::WebPopupMenu):
2009         (WebKit::WebPopupMenu::~WebPopupMenu):
2010         (WebKit::WebPopupMenu::disconnectClient):
2011         (WebKit::WebPopupMenu::show):
2012         (WebKit::WebPopupMenu::hide):
2013         (WebKit::WebPopupMenu::updateFromElement):
2014         * WebProcess/WebCoreSupport/WebPopupMenu.h: Added.
2015         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Added.
2016         (WebKit::WebSearchPopupMenu::WebSearchPopupMenu):
2017         (WebKit::WebSearchPopupMenu::popupMenu):
2018         (WebKit::WebSearchPopupMenu::saveRecentSearches):
2019         (WebKit::WebSearchPopupMenu::loadRecentSearches):
2020         (WebKit::WebSearchPopupMenu::enabled):
2021         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Added.
2022
2023         As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu
2024         instances, concrete classes that inherit from ChromeClient needed to be changed to
2025         implement the new methods.
2026
2027         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2028         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
2029         (WebKit::WebChromeClient::createPopupMenu):
2030         (WebKit::WebChromeClient::createSearchPopupMenu):
2031         * WebProcess/WebCoreSupport/WebChromeClient.h:
2032
2033         build issues:
2034
2035         * WebKit2.xcodeproj/project.pbxproj:
2036         * win/WebKit2.vcproj:
2037
2038 2010-07-31  Sheriff Bot  <webkit.review.bot@gmail.com>
2039
2040         Unreviewed, rolling out r64422.
2041         http://trac.webkit.org/changeset/64422
2042         https://bugs.webkit.org/show_bug.cgi?id=43304
2043
2044         Build fixes are needed for Snow Leopard and Windows.
2045         (Requested by lca on #webkit).
2046
2047         * WebKit2.xcodeproj/project.pbxproj:
2048         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2049         * WebProcess/WebCoreSupport/WebChromeClient.h:
2050         * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Removed.
2051         * WebProcess/WebCoreSupport/WebPopupMenu.h: Removed.
2052         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Removed.
2053         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Removed.
2054         * win/WebKit2.vcproj:
2055
2056 2010-07-27  Luiz Agostini  <luiz.agostini@openbossa.org>
2057
2058         Reviewed by Darin Fisher.
2059
2060         PopupMenu refactoring in preparation to WebKit2
2061         https://bugs.webkit.org/show_bug.cgi?id=42592
2062
2063         Classes WebPopupMenu and WebSearchPopupMenu inherit from PopupMenu and
2064         SearchPopupMenu respectively. At this point they are just empty implementations.
2065
2066         * WebProcess/WebCoreSupport/WebPopupMenu.cpp: Added.
2067         (WebKit::WebPopupMenu::WebPopupMenu):
2068         (WebKit::WebPopupMenu::~WebPopupMenu):
2069         (WebKit::WebPopupMenu::disconnectClient):
2070         (WebKit::WebPopupMenu::show):
2071         (WebKit::WebPopupMenu::hide):
2072         (WebKit::WebPopupMenu::updateFromElement):
2073         * WebProcess/WebCoreSupport/WebPopupMenu.h: Added.
2074         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp: Added.
2075         (WebKit::WebSearchPopupMenu::WebSearchPopupMenu):
2076         (WebKit::WebSearchPopupMenu::popupMenu):
2077         (WebKit::WebSearchPopupMenu::saveRecentSearches):
2078         (WebKit::WebSearchPopupMenu::loadRecentSearches):
2079         (WebKit::WebSearchPopupMenu::enabled):
2080         * WebProcess/WebCoreSupport/WebSearchPopupMenu.h: Added.
2081
2082         As ChromeClient was made responsible for providing PopupMenu and SearchPopupMenu
2083         instances, concrete classes that inherit from ChromeClient needed to be changed to
2084         implement the new methods.
2085
2086         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2087         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
2088         (WebKit::WebChromeClient::createPopupMenu):
2089         (WebKit::WebChromeClient::createSearchPopupMenu):
2090         * WebProcess/WebCoreSupport/WebChromeClient.h:
2091
2092         build issues:
2093
2094         * WebKit2.xcodeproj/project.pbxproj:
2095         * win/WebKit2.vcproj:
2096
2097 2010-07-30  Darin Fisher  <darin@chromium.org>
2098
2099         Reviewed by Darin Adler.
2100
2101         Eliminate BackForwardList::pushStateItem
2102         https://bugs.webkit.org/show_bug.cgi?id=43282
2103
2104         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2105         * WebProcess/WebPage/WebBackForwardListProxy.h:
2106
2107 2010-07-30  Joseph Pecoraro  <joepeck@webkit.org>
2108
2109         Reviewed by David Kilzer.
2110
2111         Limit ApplicationCache Total and Per-Origin Storage Capacity (Quotas)
2112         https://bugs.webkit.org/show_bug.cgi?id=40627
2113
2114         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2115         (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota):
2116         * WebProcess/WebCoreSupport/WebChromeClient.h:
2117
2118 2010-07-30  Sam Weinig  <sam@webkit.org>
2119
2120         Reviewed by Maciej Stachowiak.
2121
2122         Patch for https://bugs.webkit.org/show_bug.cgi?id=43290
2123         Add structured message passing from the injected bundle to UIProcess
2124
2125         * Platform/CoreIPC/MessageID.h:
2126         * Shared/CoreIPCSupport/WebContextMessageKinds.h: Added.
2127         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
2128         (WebProcessProxyMessage::):
2129         * UIProcess/API/C/WKContext.h:
2130         * UIProcess/WebContext.cpp:
2131         (WebKit::):
2132         (WebKit::PostMessageEncoder::PostMessageDecoder::PostMessageDecoder):
2133         (WebKit::PostMessageEncoder::PostMessageDecoder::decode):
2134         (WebKit::WebContext::didReceiveMessageFromInjectedBundle):
2135         (WebKit::WebContext::didReceiveMessage):
2136         * UIProcess/WebContext.h:
2137         * UIProcess/WebContextInjectedBundleClient.cpp:
2138         (WebKit::WebContextInjectedBundleClient::didReceiveMessageFromInjectedBundle):
2139         * UIProcess/WebContextInjectedBundleClient.h:
2140         * UIProcess/WebProcessProxy.cpp:
2141         (WebKit::WebProcessProxy::didReceiveMessage):
2142         (WebKit::WebProcessProxy::didReceiveSyncMessage):
2143         * UIProcess/WebProcessProxy.h:
2144         * WebKit2.xcodeproj/project.pbxproj:
2145         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2146         (WKBundlePostMessage):
2147         * WebProcess/InjectedBundle/API/c/WKBundle.h:
2148         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2149         (WebKit::):
2150         (WebKit::InjectedBundle::InjectedBundle):
2151         (WebKit::InjectedBundle::~InjectedBundle):
2152         (WebKit::InjectedBundle::initializeClient):
2153         (WebKit::InjectedBundle::postMessage):
2154         (WebKit::InjectedBundle::setShouldTrackVisitedLinks):
2155         (WebKit::InjectedBundle::removeAllVisitedLinks):
2156         (WebKit::InjectedBundle::didCreatePage):
2157         (WebKit::InjectedBundle::willDestroyPage):
2158         (WebKit::InjectedBundle::didReceiveMessage):
2159         * WebProcess/InjectedBundle/InjectedBundle.h:
2160
2161 2010-07-30  Andy Estes  <aestes@apple.com>
2162
2163         Reviewed by David Kilzer.
2164
2165         Add support to Xcode for compiling WebKit against iOS SDKs.
2166         https://bugs.webkit.org/show_bug.cgi?id=42796
2167
2168         * Configurations/FeatureDefines.xcconfig:
2169
2170 2010-07-30  Brady Eidson  <beidson@apple.com>
2171
2172         Reviewed by Sam Weinig.
2173
2174         Cast the return value for the templated ImmutableArray::at().
2175
2176         * Shared/ImmutableArray.h:
2177         (WebKit::ImmutableArray::at):
2178
2179 2010-07-30  Sam Weinig  <sam@webkit.org>
2180
2181         Reviewed by Anders Carlsson.
2182
2183         Patch for https://bugs.webkit.org/show_bug.cgi?id=43283
2184         Add APIObject template introspection support.
2185
2186         Add a way to get the type the APIObject::Type from the APIObject subclass typenames
2187         for template fun. Use this to make a type checking version of ImmutableArray::at.
2188
2189         * Shared/ImmutableArray.h:
2190         (WebKit::ImmutableArray::at):
2191         (WebKit::ImmutableArray::type):
2192         * Shared/WebString.h:
2193         (WebKit::WebString::type):
2194         * Shared/WebURL.h:
2195         (WebKit::WebURL::type):
2196         * UIProcess/API/C/WKArray.cpp:
2197         (WKArrayGetTypeID):
2198         * UIProcess/API/C/WKBackForwardList.cpp:
2199         (WKBackForwardListGetTypeID):
2200         * UIProcess/API/C/WKBackForwardListItem.cpp:
2201         (WKBackForwardListItemGetTypeID):
2202         * UIProcess/API/C/WKContext.cpp:
2203         (WKContextGetTypeID):
2204         * UIProcess/API/C/WKFrame.cpp:
2205         (WKFrameGetTypeID):
2206         * UIProcess/API/C/WKFramePolicyListener.cpp:
2207         (WKFramePolicyListenerGetTypeID):
2208         * UIProcess/API/C/WKNavigationData.cpp:
2209         (WKNavigationDataGetTypeID):
2210         * UIProcess/API/C/WKPage.cpp:
2211         (WKPageGetTypeID):
2212         * UIProcess/API/C/WKPageNamespace.cpp:
2213         (WKPageNamespaceGetTypeID):
2214         * UIProcess/API/C/WKPreferences.cpp:
2215         (WKPreferencesGetTypeID):
2216         * UIProcess/API/C/WKString.cpp:
2217         (WKStringGetTypeID):
2218         * UIProcess/API/C/WKURL.cpp:
2219         (WKURLGetTypeID):
2220         * UIProcess/WebBackForwardList.h:
2221         (WebKit::WebBackForwardList::type):
2222         * UIProcess/WebBackForwardListItem.h:
2223         (WebKit::WebBackForwardListItem::type):
2224         * UIProcess/WebContext.h:
2225         (WebKit::WebContext::type):
2226         * UIProcess/WebFramePolicyListenerProxy.h:
2227         (WebKit::WebFramePolicyListenerProxy::type):
2228         * UIProcess/WebFrameProxy.h:
2229         (WebKit::WebFrameProxy::type):
2230         * UIProcess/WebNavigationData.h:
2231         (WebKit::WebNavigationData::type):
2232         * UIProcess/WebPageNamespace.h:
2233         (WebKit::WebPageNamespace::type):
2234         * UIProcess/WebPageProxy.h:
2235         (WebKit::WebPageProxy::type):
2236         * UIProcess/WebPreferences.h:
2237         (WebKit::WebPreferences::type):
2238         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2239         (WKBundleGetTypeID):
2240         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2241         (WKBundleFrameGetTypeID):
2242         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2243         (WKBundlePageGetTypeID):
2244         * WebProcess/InjectedBundle/InjectedBundle.h:
2245         (WebKit::InjectedBundle::type):
2246         * WebProcess/WebPage/WebFrame.h:
2247         (WebKit::WebFrame::type):
2248         * WebProcess/WebPage/WebPage.h:
2249         (WebKit::WebPage::type):
2250
2251 2010-07-30  Sam Weinig  <sam@webkit.org>
2252
2253         Reviewed by Anders Carlsson.
2254
2255         Patch for https://bugs.webkit.org/show_bug.cgi?id=43275
2256         Make WKArrayRef more usable.
2257
2258         - Add Create functions.
2259         - Make WKArrayGetItemAtIndex return a WKTypeRef.
2260
2261         * UIProcess/API/C/WKArray.cpp:
2262         (WKArrayCreate):
2263         (WKArrayCreateAdoptingValues):
2264         (WKArrayGetItemAtIndex):
2265         * UIProcess/API/C/WKArray.h:
2266
2267 2010-07-30  Ada Chan  <adachan@apple.com>
2268
2269         Reviewed by John Sullivan.
2270
2271         Fix issue with populating the back list when limit is a huge number.
2272         https://bugs.webkit.org/show_bug.cgi?id=43270
2273
2274         * UIProcess/WebBackForwardList.cpp:
2275         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
2276
2277 2010-07-29  Sam Weinig  <sam@webkit.org>
2278
2279         Reviewed by Anders Carlsson.
2280
2281         Patch for https://bugs.webkit.org/show_bug.cgi?id=43274
2282         Add first pass of structured message passing.
2283
2284         - Only supports passing messages from the UIProcess -> InjectedBundle
2285         - Only supports passing Strings, Arrays, and WebPage references (NOTE: There
2286           currently isn't a way to make an array).
2287         - Changed ImmutableArray to operate on APIObjects instead of void*'s and 
2288           removed the retain/release abstraction.
2289
2290         * Platform/CoreIPC/MessageID.h:
2291         (CoreIPC::):
2292         * Shared/CoreIPCSupport/InjectedBundleMessageKinds.h: Added.
2293         (InjectedBundleMessage::):
2294         (CoreIPC::):
2295         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
2296         (WebProcessMessage::):
2297         * Shared/ImmutableArray.cpp:
2298         (WebKit::ImmutableArray::ImmutableArray):
2299         (WebKit::ImmutableArray::~ImmutableArray):
2300         * Shared/ImmutableArray.h:
2301         (WebKit::ImmutableArray::create):
2302         (WebKit::ImmutableArray::adopt):
2303         (WebKit::ImmutableArray::at):
2304         * UIProcess/API/C/WKBase.h:
2305         * UIProcess/API/C/WKContext.cpp:
2306         (WKContextPostMessageToInjectedBundle):
2307         * UIProcess/API/C/WKContext.h:
2308         * UIProcess/API/C/WKType.cpp:
2309         (WKGetTypeID):
2310         * UIProcess/API/C/WebKit2.h:
2311         * UIProcess/WebBackForwardList.cpp:
2312         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
2313         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
2314         * UIProcess/WebContext.cpp:
2315         (WebKit::WebContext::postMessageToInjectedBundle):
2316         (WebKit::WebContext::didReceiveMessageFromInjectedBundle):
2317         * UIProcess/WebContext.h:
2318         * WebKit2.xcodeproj/project.pbxproj:
2319         * WebProcess/InjectedBundle/API/c/WKBundle.h:
2320         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2321         (WebKit::InjectedBundle::didReceiveMessage):
2322         * WebProcess/InjectedBundle/InjectedBundle.h:
2323         * WebProcess/WebPage/WebFrame.cpp:
2324         (WebKit::WebFrame::childFrames):
2325         * WebProcess/WebProcess.cpp:
2326         (WebKit::WebProcess::didReceiveMessage):
2327         * WebProcess/WebProcess.h:
2328         * win/WebKit2.vcproj:
2329
2330 2010-07-30  Anders Carlsson  <andersca@apple.com>
2331
2332         Reviewed by Sam Weinig.
2333
2334         Implement NPN_Evaluate
2335         https://bugs.webkit.org/show_bug.cgi?id=43268
2336
2337         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
2338         (WebKit::NPRuntimeObjectMap::evaluate):
2339         Evaluate the passed in string.
2340
2341         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2342         (WebKit::NPN_Evaluate):
2343         Call NetscapePlugin::evaluate.
2344
2345         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2346         (WebKit::NetscapePlugin::evaluate):
2347         Call PluginController::evaluate.
2348
2349         * WebProcess/Plugins/PluginController.h:
2350         Add evaluate pure virtual member function.
2351
2352         * WebProcess/Plugins/PluginView.cpp:
2353         (WebKit::PluginView::evaluate):
2354         Update the popup window state and call NPRuntimeObjectMap::evaluate.
2355
2356 2010-07-30  Anders Carlsson  <andersca@apple.com>
2357
2358         Reviewed by Sam Weinig.
2359
2360         Implement NPN_InvokeDefault
2361         https://bugs.webkit.org/show_bug.cgi?id=43266
2362
2363         * WebProcess/Plugins/JSNPObject.cpp:
2364         (WebKit::JSNPObject::JSNPObject):
2365         Remove ExecState parameter.
2366
2367         (WebKit::JSNPObject::callObject):
2368         Call the NPClass::invokeDefault function.
2369
2370         (WebKit::callNPJSObject):
2371         Call JSNPObject::callObject.
2372
2373         (WebKit::JSNPObject::getCallData):
2374         Check if the NPClass has an invokeDefault function.
2375
2376         * WebProcess/Plugins/JSNPObject.h:
2377         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
2378         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
2379         Remove ExecState parameter.
2380
2381         (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
2382         Remove ExecState parameter.
2383
2384         * WebProcess/Plugins/PluginView.cpp:
2385         (WebKit::PluginView::scriptObject):
2386         Remove ExecState parameter.
2387
2388 2010-07-30  Adam Roben  <aroben@apple.com>
2389
2390         Roll our r64361 and r64363
2391
2392         We can't make these changes until QuartzCore.lib is included in
2393         WebKitSupportLibrary.
2394
2395 2010-07-30  Adam Roben  <aroben@apple.com>
2396
2397         Windows build fix
2398
2399         * win/WebKit2Apple.vsprops: Always link against QuartzCore, since
2400         WebKitSystemInterface requires it.
2401
2402 2010-07-30  Balazs Kelemen  <kb@inf.u-szeged.hu>
2403
2404         Unreviewed build fix.
2405
2406         [Qt] Build fix for recent API changes in WebKit2.
2407
2408         * UIProcess/API/cpp/qt/WKStringQt.cpp:
2409         (WKStringCopyQString):
2410         * UIProcess/API/cpp/qt/WKURLQt.cpp:
2411         (WKURLCopyQUrl):
2412         * UIProcess/API/qt/qwkpage.cpp:
2413         (QWKPage::QWKPage):
2414
2415 2010-07-29  Brady Eidson  <beidson@apple.com>
2416
2417         Reviewed by Sam Weinig.
2418
2419         Setting empty document schemes on the WKContext shouldn't start the WebProcess
2420         <rdar://problem/8253734> and https://bugs.webkit.org/show_bug.cgi?id=43222
2421         
2422         * UIProcess/WebContext.cpp:
2423         (WebKit::WebContext::ensureWebProcess):
2424         (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
2425         * UIProcess/WebContext.h:
2426
2427 2010-07-29  Brady Eidson  <beidson@apple.com>
2428
2429         Reviewed by Sam Weinig.
2430
2431         Make all public facing client setters take const pointers
2432         https://bugs.webkit.org/show_bug.cgi?id=43219
2433
2434         * UIProcess/API/C/WKContext.cpp:
2435         (WKContextSetInjectedBundleClient):
2436         (WKContextSetHistoryClient):
2437         * UIProcess/API/C/WKContext.h:
2438
2439         * UIProcess/API/C/WKPage.cpp:
2440         (WKPageSetPageLoaderClient):
2441         (WKPageSetPagePolicyClient):
2442         (WKPageSetPageUIClient):
2443         * UIProcess/API/C/WKPage.h:
2444
2445         * UIProcess/WebContext.cpp:
2446         (WebKit::WebContext::initializeInjectedBundleClient):
2447         (WebKit::WebContext::initializeHistoryClient):
2448         * UIProcess/WebContext.h:
2449
2450         * UIProcess/WebContextInjectedBundleClient.cpp:
2451         (WebKit::WebContextInjectedBundleClient::initialize):
2452         * UIProcess/WebContextInjectedBundleClient.h:
2453
2454         * UIProcess/WebHistoryClient.cpp:
2455         (WebKit::WebHistoryClient::initialize):
2456         * UIProcess/WebHistoryClient.h:
2457
2458         * UIProcess/WebLoaderClient.cpp:
2459         (WebKit::WebLoaderClient::initialize):
2460         * UIProcess/WebLoaderClient.h:
2461
2462         * UIProcess/WebPageProxy.cpp:
2463         (WebKit::WebPageProxy::initializeLoaderClient):
2464         (WebKit::WebPageProxy::initializePolicyClient):
2465         (WebKit::WebPageProxy::initializeUIClient):
2466         * UIProcess/WebPageProxy.h:
2467
2468         * UIProcess/WebPolicyClient.cpp:
2469         (WebKit::WebPolicyClient::initialize):
2470         * UIProcess/WebPolicyClient.h:
2471
2472         * UIProcess/WebUIClient.cpp:
2473         (WebKit::WebUIClient::initialize):
2474         * UIProcess/WebUIClient.h:
2475
2476 2010-07-29  Anders Carlsson  <andersca@apple.com>
2477
2478         Reviewed by Sam Weinig.
2479
2480         Implement NPN_SetProperty
2481         https://bugs.webkit.org/show_bug.cgi?id=43217
2482
2483         * WebProcess/Plugins/NPJSObject.cpp:
2484         (WebKit::NPJSObject::setProperty):
2485         Convert the NPVariant to a JSValue and set it on the underlying JSObject.
2486
2487         (WebKit::NPJSObject::NP_SetProperty):
2488         Call NPJSObject::setProperty.
2489
2490         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2491         (WebKit::NPN_GetProperty):
2492         Remove unused parameter name.
2493
2494         (WebKit::NPN_SetProperty):
2495         Call the NPClass::setProperty function.
2496
2497 2010-07-29  Anders Carlsson  <andersca@apple.com>
2498
2499         Reviewed by Sam Weinig.
2500
2501         Implement NPN_Enumerate
2502         https://bugs.webkit.org/show_bug.cgi?id=43215
2503
2504         * WebProcess/Plugins/JSNPObject.cpp:
2505         (WebKit::npIdentifierFromIdentifier):
2506         Get the UTF-8 string representation instead of the lossy ASCII representation.
2507         
2508         (WebKit::JSNPObject::getOwnPropertyNames):
2509         Implement by calling the NPClass::enumerate function.
2510
2511         * WebProcess/Plugins/JSNPObject.h:
2512         * WebProcess/Plugins/NPJSObject.cpp:
2513         (WebKit::NPJSObject::enumerate):
2514         Implement by calling JSObject::getPropertyNames.
2515
2516         (WebKit::NPJSObject::npClass):
2517         (WebKit::NPJSObject::NP_Enumerate):
2518         Call NPJSObject::enumerate.
2519
2520         * WebProcess/Plugins/NPJSObject.h:
2521         * WebProcess/Plugins/NPRuntimeUtilities.cpp:
2522         (WebKit::createNPObject):
2523         Fix a comment.
2524
2525         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2526         (WebKit::NPN_Enumerate):
2527         Call the NPClass::enumerate function.
2528
2529 2010-07-29  John Sullivan  <sullivan@apple.com>
2530
2531         <https://bugs.webkit.org/show_bug.cgi?id=43203>
2532         WebBackForwardList::back/ForwardListWithLimit() crashes if passed a limit larger than max int
2533
2534         Reviewed by Sam Weinig.
2535
2536         * UIProcess/WebBackForwardList.cpp:
2537         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
2538         Fixed casting so that a large unsigned won't become a negative int.
2539         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
2540         Ditto.
2541
2542 2010-07-29  Anders Carlsson  <andersca@apple.com>
2543
2544         Reviewed by Sam Weinig.
2545
2546         Implement NPN_Status
2547         https://bugs.webkit.org/show_bug.cgi?id=43205
2548
2549         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2550         (WebKit::NPN_Status):
2551         Convert the message char* to a String and call NetscapePlugin::setStatusbarText.
2552
2553         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2554         (WebKit::NetscapePlugin::setStatusbarText):
2555         Call PluginController::setStatusbarText.
2556     
2557         * WebProcess/Plugins/PluginController.h:
2558         Add setStatusbarText.
2559
2560         * WebProcess/Plugins/PluginView.cpp:
2561         (WebKit::PluginView::setStatusbarText):
2562         Call the Chrome member function.
2563
2564 2010-07-29  Adam Roben  <aroben@apple.com>
2565
2566         Always say "plugins directory" when referring to a directory
2567         containing one or more plugins
2568
2569         Fixes <http://webkit.org/b/43197> WebKit2 often says "plugin
2570         directory" when it means "plugins directory"
2571
2572         Reviewed by John Sullivan.
2573
2574         * UIProcess/API/C/WKContext.cpp:
2575         (_WKContextSetAdditionalPluginsDirectory):
2576         * UIProcess/API/C/WKContextPrivate.h:
2577         Renamed from _WKContextSetAdditionalPluginDirectory.
2578
2579         * UIProcess/Plugins/PluginInfoStore.cpp:
2580         (WebKit::PluginInfoStore::setAdditionalPluginsDirectories): Renamed
2581         from setAdditionalPluginDirectories.
2582         (WebKit::PluginInfoStore::loadPluginsIfNecessary): Updated for rename.
2583
2584         * UIProcess/Plugins/PluginInfoStore.h: Renamed
2585         m_additionalPluginDirectories to m_additionalPluginsDirectories.
2586
2587         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2588         (WebKit::PluginInfoStore::pluginsDirectories):
2589         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
2590         (WebKit::PluginInfoStore::pluginsDirectories):
2591         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2592         (WebKit::PluginInfoStore::pluginsDirectories):
2593         Renamed from pluginDirectories.
2594
2595         * UIProcess/WebContext.cpp:
2596         (WebKit::WebContext::setAdditionalPluginsDirectory):
2597         * UIProcess/WebContext.h:
2598         Renamed from setAdditionalPluginDirectory.
2599
2600 2010-07-29  Adam Roben  <aroben@apple.com>
2601
2602         Always say "directory" when referring to a plugin directory
2603
2604         Fixes <http://webkit.org/b/43195> WebKit2 often says "plugin path"
2605         when it means "plugin directory"
2606
2607         Reviewed by John Sullivan.
2608
2609         * UIProcess/API/C/WKContext.cpp:
2610         (_WKContextSetAdditionalPluginDirectory):
2611         * UIProcess/API/C/WKContextPrivate.h:
2612         Renamed from _WKContextSetAdditionalPluginPath.
2613
2614         * UIProcess/Plugins/PluginInfoStore.cpp:
2615         (WebKit::PluginInfoStore::setAdditionalPluginDirectories): Renamed
2616         from setAdditionalPluginPaths.
2617         (WebKit::PluginInfoStore::loadPluginsIfNecessary): Updated for rename.
2618
2619         * UIProcess/Plugins/PluginInfoStore.h: Renamed m_additionalPluginPaths
2620         to m_additionalPluginDirectories.
2621
2622         * UIProcess/WebContext.cpp:
2623         (WebKit::WebContext::setAdditionalPluginDirectory):
2624         * UIProcess/WebContext.h:
2625         Renamed from setAdditionalPluginPath, and updated for PluginInfoStore
2626         rename.
2627
2628 2010-07-29  Adam Roben  <aroben@apple.com>
2629
2630         Remove PluginInfoStore::mimeTypeFromExtension
2631
2632         WebCore::MIMETypeRegistry already provides a cross-platform interface
2633         for this.
2634
2635         Fixes <http://webkit.org/b/43188>
2636         PluginInfoStore::mimeTypeFromExtension is unnecessary
2637
2638         Reviewed by Nikolas Zimmermann.
2639
2640         * UIProcess/Plugins/PluginInfoStore.cpp:
2641         (WebKit::PluginInfoStore::findPlugin): Changed to use
2642         MIMETypeRegistry.
2643
2644         * UIProcess/Plugins/PluginInfoStore.h:
2645         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2646         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
2647         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2648         Removed mimeTypeFromExtension.
2649
2650 2010-07-28  Sam Weinig  <sam@webkit.org>
2651
2652         Another Windows build fix.
2653
2654         * UIProcess/API/C/WKBase.h:
2655         * win/WebKit2Generated.make:
2656
2657 2010-07-28  Sam Weinig  <sam@webkit.org>
2658
2659         Fix builds.
2660
2661         * UIProcess/API/C/WKAPICast.h:
2662         (WebKit::ProxyingRefPtr::operator APIType):
2663         (toURLRef):
2664         (toCopiedRef):
2665         (toCopiedURLRef):
2666         * UIProcess/win/WebView.h:
2667         (WebKit::WebView::type):
2668
2669 2010-07-28  Sam Weinig  <sam@webkit.org>
2670
2671         Reviewed by Darin Adler.
2672
2673         Patch for https://bugs.webkit.org/show_bug.cgi?id=43163
2674         Add a CF-style base type (WKTypeRef) as a base for polymorphic functions.
2675
2676         - Add first polymorphic function, WKGetTypeID.
2677         - Add functions to each WK type to get their respective TypeIDs.
2678         - Adds WebURL to complement WebString.
2679
2680         * Shared/APIObject.h:
2681         (WebKit::APIObject::):
2682         (WebKit::APIObject::~APIObject):
2683         * Shared/ImmutableArray.h:
2684         (WebKit::ImmutableArray::type):
2685         * Shared/WebString.h:
2686         (WebKit::WebString::type):
2687         * Shared/WebURL.h: Added.
2688         (WebKit::WebURL::create):
2689         (WebKit::WebURL::type):
2690         (WebKit::WebURL::isNull):
2691         (WebKit::WebURL::isEmpty):
2692         (WebKit::WebURL::string):
2693         (WebKit::WebURL::WebURL):
2694         * UIProcess/API/C/WKAPICast.h:
2695         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
2696         (WebKit::ProxyingRefPtr::operator APIType):
2697         (toRef):
2698         (toURLRef):
2699         (toCopiedURLRef):
2700         * UIProcess/API/C/WKArray.cpp:
2701         (WKArrayGetTypeID):
2702         * UIProcess/API/C/WKArray.h:
2703         * UIProcess/API/C/WKBackForwardList.cpp:
2704         (WKBackForwardListGetTypeID):
2705         * UIProcess/API/C/WKBackForwardList.h:
2706         * UIProcess/API/C/WKBackForwardListItem.cpp:
2707         (WKBackForwardListItemGetTypeID):
2708         * UIProcess/API/C/WKBackForwardListItem.h:
2709         * UIProcess/API/C/WKBase.h:
2710         * UIProcess/API/C/WKContext.cpp:
2711         (WKContextGetTypeID):
2712         * UIProcess/API/C/WKContext.h:
2713         * UIProcess/API/C/WKFrame.cpp:
2714         (WKFrameGetTypeID):
2715         * UIProcess/API/C/WKFrame.h:
2716         * UIProcess/API/C/WKFramePolicyListener.cpp:
2717         (WKFramePolicyListenerGetTypeID):
2718         * UIProcess/API/C/WKFramePolicyListener.h:
2719         * UIProcess/API/C/WKNavigationData.cpp:
2720         (WKNavigationDataGetTypeID):
2721         * UIProcess/API/C/WKNavigationData.h:
2722         * UIProcess/API/C/WKPage.cpp:
2723         (WKPageGetTypeID):
2724         * UIProcess/API/C/WKPage.h:
2725         * UIProcess/API/C/WKPageNamespace.cpp:
2726         (WKPageNamespaceGetTypeID):
2727         * UIProcess/API/C/WKPageNamespace.h:
2728         * UIProcess/API/C/WKPreferences.cpp:
2729         (WKPreferencesGetTypeID):
2730         * UIProcess/API/C/WKPreferences.h:
2731         * UIProcess/API/C/WKString.cpp:
2732         (WKStringGetTypeID):
2733         * UIProcess/API/C/WKString.h:
2734         * UIProcess/API/C/WKType.cpp: Added.
2735         (WKGetTypeID):
2736         * UIProcess/API/C/WKType.h: Added.
2737         * UIProcess/API/C/WKURL.cpp:
2738         (WKURLGetTypeID):
2739         * UIProcess/API/C/WKURL.h:
2740         * UIProcess/API/win/WKView.cpp:
2741         (WKViewGetTypeID):
2742         * UIProcess/API/win/WKView.h:
2743         * UIProcess/WebBackForwardList.h:
2744         (WebKit::WebBackForwardList::type):
2745         * UIProcess/WebBackForwardListItem.h:
2746         (WebKit::WebBackForwardListItem::type):
2747         * UIProcess/WebContext.h:
2748         (WebKit::WebContext::type):
2749         * UIProcess/WebFramePolicyListenerProxy.h:
2750         (WebKit::WebFramePolicyListenerProxy::type):
2751         * UIProcess/WebFrameProxy.h:
2752         (WebKit::WebFrameProxy::type):
2753         * UIProcess/WebNavigationData.h:
2754         (WebKit::WebNavigationData::type):
2755         * UIProcess/WebPageNamespace.h:
2756         (WebKit::WebPageNamespace::type):
2757         * UIProcess/WebPageProxy.h:
2758         (WebKit::WebPageProxy::type):
2759         * UIProcess/WebPreferences.h:
2760         (WebKit::WebPreferences::type):
2761         * WebKit2.xcodeproj/project.pbxproj:
2762         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2763         (WKBundleGetTypeID):
2764         * WebProcess/InjectedBundle/API/c/WKBundle.h:
2765         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2766         (WKBundleFrameGetTypeID):
2767         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2768         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2769         (WKBundlePageGetTypeID):
2770         (WKBundlePageSetEditorClient):
2771         (WKBundlePageSetLoaderClient):
2772         (WKBundlePageSetUIClient):
2773         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2774         * WebProcess/WebPage/WebFrame.h:
2775         (WebKit::WebFrame::type):
2776         * WebProcess/WebPage/WebPage.h:
2777         (WebKit::WebPage::type):
2778         * win/WebKit2.vcproj:
2779
2780 2010-07-28  Darin Adler  <darin@apple.com>
2781
2782         Reviewed by Sam Weinig.
2783
2784         WebKitTestRunner needs to support layoutTestController.execCommand
2785         <https://bugs.webkit.org/show_bug.cgi?id=42538>
2786
2787         WebKitTestRunner needs layoutTestController.isCommandEnabled
2788         <https://bugs.webkit.org/show_bug.cgi?id=42671>
2789
2790         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2791         (WKBundlePageExecuteEditingCommand): Added.
2792         (WKBundlePageIsEditingCommandEnabled): Added.
2793         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Ditto.
2794
2795         * WebProcess/WebPage/WebPage.cpp:
2796         (WebKit::WebPage::executeEditingCommand): Added.
2797         (WebKit::WebPage::isEditingCommandEnabled): Added.
2798         * WebProcess/WebPage/WebPage.h: Ditto.
2799
2800 2010-07-28  Anders Carlsson  <andersca@apple.com>
2801
2802         Fix 64-bit build.
2803
2804         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2805         (WebKit::NPN_GetValue):
2806
2807 2010-07-28  Brady Eidson  <beidson@apple.com>
2808
2809         Reviewed by Darin Adler.
2810
2811         First pass at visited link support for WK2
2812         https://bugs.webkit.org/show_bug.cgi?id=43157
2813
2814         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2815         (WebPageProxyMessage::):
2816         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
2817         (WebProcessMessage::):
2818         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
2819         (WebProcessProxyMessage::):
2820
2821         Move HistoryClient support from the page...:
2822         * UIProcess/API/C/WKPage.cpp:
2823         * UIProcess/API/C/WKPage.h:
2824         
2825         ...to the Context
2826         * UIProcess/API/C/WKContext.cpp:
2827         (WKContextSetHistoryClient):
2828         * UIProcess/API/C/WKContext.h:
2829
2830         * UIProcess/WebContext.cpp:
2831         (WebKit::WebContext::initializeHistoryClient):
2832         (WebKit::WebContext::ensureWebProcess): When a new WebProcess is created, set its "should track visited links" mode.
2833         (WebKit::WebContext::didNavigateWithNavigationData):
2834         (WebKit::WebContext::didPerformClientRedirect):
2835         (WebKit::WebContext::didPerformServerRedirect):
2836         (WebKit::WebContext::didUpdateHistoryTitle):
2837         (WebKit::WebContext::populateVisitedLinks):
2838         * UIProcess/WebContext.h:
2839         (WebKit::WebContext::hasValidProcess):
2840
2841         * UIProcess/WebHistoryClient.cpp:
2842         (WebKit::WebHistoryClient::initialize):
2843         (WebKit::WebHistoryClient::didNavigateWithNavigationData):
2844         (WebKit::WebHistoryClient::didPerformClientRedirect):
2845         (WebKit::WebHistoryClient::didPerformServerRedirect):
2846         (WebKit::WebHistoryClient::didUpdateHistoryTitle):
2847         (WebKit::WebHistoryClient::populateVisitedLinks):
2848         * UIProcess/WebHistoryClient.h:
2849         (WebKit::WebHistoryClient::shouldTrackVisitedLinks):
2850
2851         * UIProcess/WebPageProxy.cpp:
2852         (WebKit::WebPageProxy::didReceiveMessage):
2853         * UIProcess/WebPageProxy.h:
2854
2855         * UIProcess/WebProcessProxy.cpp:
2856         (WebKit::WebProcessProxy::didReceiveMessage):
2857         (WebKit::WebProcessProxy::didReceiveSyncMessage):
2858
2859         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2860         (WebKit::WebChromeClient::populateVisitedLinks):
2861
2862         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2863         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
2864         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
2865         (WebKit::WebFrameLoaderClient::setTitle):
2866
2867         * WebProcess/WebProcess.cpp:
2868         (WebKit::WebProcess::didReceiveMessage):
2869
2870 2010-07-28  Anders Carlsson  <andersca@apple.com>
2871
2872         Reviewed by Sam Weinig.
2873
2874         Add JSNPObject::getConstructData
2875         https://bugs.webkit.org/show_bug.cgi?id=43165
2876
2877         * WebProcess/Plugins/JSNPObject.cpp:
2878         (WebKit::JSNPObject::callMethod):
2879         Add a null check for m_npObject.
2880         
2881         (WebKit::JSNPObject::callConstructor):
2882         Call NPClass::construct.
2883
2884         (WebKit::JSNPObject::getConstructData):
2885         Set up the construct data.
2886
2887         (WebKit::JSNPObject::propertyGetter):
2888         convertNPVariantToJSValue now takes a JSGlobalObject as well.
2889         
2890         * WebProcess/Plugins/NPJSObject.cpp:
2891         (WebKit::NPJSObject::invoke):
2892         (WebKit::NPJSObject::invokeDefault):
2893         (WebKit::NPJSObject::construct):
2894         convertNPVariantToJSValue now takes a JSGlobalObject as well.
2895         
2896         * WebProcess/Plugins/NPJSObject.h:
2897         Make isNPJSObject and toNPJSObject public.
2898
2899         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
2900         (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
2901         Convert NPObjects correctly.
2902         
2903         (WebKit::NPRuntimeObjectMap::globalObject):
2904         Get the globalObject from the frame.
2905
2906         (WebKit::NPRuntimeObjectMap::globalExec):
2907         Call globalObject.
2908
2909         * WebProcess/Plugins/NPRuntimeObjectMap.h:
2910
2911 2010-07-28  Anders Carlsson  <andersca@apple.com>
2912
2913         Reviewed by Sam Weinig.
2914
2915         Implement NPN_InvokeDefault and NPN_Construct
2916         https://bugs.webkit.org/show_bug.cgi?id=43160
2917
2918         * WebProcess/Plugins/NPJSObject.cpp:
2919         (WebKit::NPJSObject::invoke):
2920         Just call invoke directly.
2921
2922         (WebKit::NPJSObject::invokeDefault):
2923         Call invoke.
2924
2925         (WebKit::NPJSObject::construct):
2926         Implement this.
2927
2928         (WebKit::NPJSObject::invoke):
2929         Add new invoke overload that takes the function as a JSValue.
2930
2931         (WebKit::NPJSObject::npClass):
2932         Add NP_Construct.
2933
2934         (WebKit::NPJSObject::NP_InvokeDefault):
2935         Call NPJSObject::invokeDefault.
2936
2937         (WebKit::NPJSObject::NP_Construct):
2938         Call NPJSObject::construct.
2939
2940         * WebProcess/Plugins/NPJSObject.h:
2941         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2942         (WebKit::NPN_GetValue):
2943         Handle the Core Animation drawing model and the Carbon event model.
2944
2945         (WebKit::NPN_InvokeDefault):
2946         Call the NPClass::invokeDefault function.
2947
2948         (WebKit::NPN_Construct):
2949         Call the NPClass::construct function.
2950
2951 2010-07-28  Anders Carlsson  <andersca@apple.com>
2952
2953         Reviewed by Sam Weinig.
2954
2955         Implement NPN_Invoke
2956         https://bugs.webkit.org/show_bug.cgi?id=43158
2957
2958         * WebProcess/Plugins/NPJSObject.cpp:
2959         (WebKit::NPJSObject::hasMethod):
2960         Use the free getCallData function.
2961
2962         (WebKit::NPJSObject::invoke):
2963         Get the JavaScript function and call it.
2964
2965         (WebKit::NPJSObject::NP_Invoke):
2966         Call NPJSObject::invoke.
2967
2968         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2969         (WebKit::NPN_Invoke):
2970         Call the NPClass::invoke function.
2971
2972 2010-07-28  Anders Carlsson  <andersca@apple.com>
2973
2974         Reviewed by Sam Weinig.
2975
2976         Implement NPN_HasMethod
2977         https://bugs.webkit.org/show_bug.cgi?id=43155
2978
2979         * WebProcess/Plugins/NPJSObject.cpp:
2980         (WebKit::NPJSObject::hasMethod):
2981         Check if the JSObject has a property with the given name. If it does, check that the value is a function.
2982     
2983         (WebKit::NPJSObject::hasProperty):
2984         Add a JSLock.
2985
2986         (WebKit::NPJSObject::npClass):
2987         Add some stubbed out functions.
2988
2989         (WebKit::NPJSObject::NP_HasMethod):
2990         Call NPJSObject::hasMethod.
2991
2992         (WebKit::NPJSObject::NP_Invoke):
2993         (WebKit::NPJSObject::NP_InvokeDefault):
2994         (WebKit::NPJSObject::NP_SetProperty):
2995         Stub out functions.
2996
2997         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2998         (WebKit::NPN_HasMethod):
2999         Call the NPClass::hasMethod function.
3000
3001 2010-07-28  Brady Eidson  <beidson@apple.com>
3002
3003         Rubberstamped by Sam Weinig.
3004
3005         Make sure new pages are always added to the same PageGroup (for now).
3006
3007         * WebProcess/WebPage/WebPage.cpp:
3008         (WebKit::WebPage::WebPage):
3009
3010 2010-07-28  Sam Weinig  <sam@webkit.org>
3011
3012         Reviewed by Anders Carlsson.
3013
3014         Patch for https://bugs.webkit.org/show_bug.cgi?id=43097
3015         Make all objects in the WebKit2 API inherit from a single base class
3016
3017         - Adds an APIObject base class for all objects which one can get through
3018           the C API to inherit from.
3019         - Adds a WebString class which wraps WebCore::String for now. I am not too fond of
3020           this solution, so we should continue to iterate on it.
3021         - This is a first step toward make a CF-style base type (eg. CFTypeRef) for the C-API.
3022
3023         * Shared/APIObject.h: Added.
3024         (WebKit::APIObject::APIObject):
3025         Base class for API objects.
3026
3027         * Shared/ImmutableArray.h:
3028         Make inherit from APIObject.
3029
3030         * Shared/WebString.h: Added.
3031         (WebKit::WebString::create):
3032         (WebKit::WebString::isNull):
3033         (WebKit::WebString::isEmpty):
3034         (WebKit::WebString::string):
3035         (WebKit::WebString::WebString):
3036         Wraps a WebCore::String so that it can be passed out to the API
3037         and still inherit from APIObject.
3038
3039         * UIProcess/API/C/WKAPICast.h:
3040         (WebKit::WebStringAdaptor::WebStringAdaptor):
3041         (WebKit::WebStringAdaptor::operator WKStringRef):
3042         (WebKit::WebStringAdaptor::operator WKURLRef):
3043         Update conversion methods to deal in terms of WebStrings. Added WebStringAdaptor
3044         to ease passing strings to client functions.
3045
3046         * UIProcess/API/C/WKContext.cpp:
3047         (WKContextCreateWithInjectedBundlePath):
3048         (WKContextPostMessageToInjectedBundle):
3049         (_WKContextSetAdditionalPluginPath):
3050         (_WKContextRegisterURLSchemeAsEmptyDocument): 
3051         Get the WebCore::String from the WebString.
3052
3053         * UIProcess/API/C/WKPage.cpp:
3054         (WKPageLoadURL):
3055         Ditto.
3056
3057         * UIProcess/API/C/WKString.cpp:
3058         (WKStringIsEmpty):
3059         Implement in terms of WebString.
3060
3061         * UIProcess/API/C/WKURL.cpp:
3062         * UIProcess/API/C/cf/WKStringCF.cpp:
3063         (WKStringCreateWithCFString):
3064         (WKStringCopyCFString):
3065         Ditto.
3066     
3067         * UIProcess/API/C/cf/WKURLCF.cpp:
3068         (WKURLCreateWithCFURL):
3069         (WKURLCopyCFURL):
3070         Ditto.
3071
3072         * UIProcess/WebBackForwardList.h:
3073         Make inherit from APIObject.
3074
3075         * UIProcess/WebBackForwardListItem.h:
3076         Ditto.
3077
3078         * UIProcess/WebContext.cpp:
3079         (WebKit::WebContext::didReceiveMessageFromInjectedBundle):
3080         (WebKit::WebContext::postMessageToInjectedBundle):
3081         (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
3082         Use String instead of StringImpl to be consistent.
3083
3084         * UIProcess/WebContext.h:
3085         Make inherit from APIObject.
3086
3087         * UIProcess/WebFramePolicyListenerProxy.h:
3088         Ditto.
3089
3090         * UIProcess/WebFrameProxy.h:
3091         Ditto.
3092
3093         * UIProcess/WebNavigationData.h:
3094         Ditto.
3095
3096         * UIProcess/WebPageNamespace.h:
3097         Ditto.
3098
3099         * UIProcess/WebPageProxy.h:
3100         Ditto.
3101
3102         * UIProcess/WebPreferences.h:
3103         Ditto.
3104
3105         * UIProcess/WebUIClient.cpp:
3106         (WebKit::WebUIClient::runJavaScriptPrompt):
3107         Implement in terms of WebString.
3108
3109         * UIProcess/win/WebView.h:
3110         Make inherit from APIObject.
3111
3112         * WebKit2.xcodeproj/project.pbxproj:
3113         Add new files.
3114
3115         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3116         (WKBundlePostMessage):
3117         Get the WebCore::String from the WebString.
3118
3119         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3120         (WKBundleFramePauseAnimationOnElementWithId):
3121         Ditto.
3122
3123         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3124         (WebKit::InjectedBundle::postMessage):
3125         * WebProcess/InjectedBundle/InjectedBundle.h:
3126         Use String instead of StringImpl to be consistent.
3127
3128         * WebProcess/WebPage/WebFrame.h:
3129         Make inherit from APIObject.
3130
3131         * WebProcess/WebPage/WebPage.h:
3132         Make inherit from APIObject.
3133
3134         * win/WebKit2.vcproj:
3135         Add new files.
3136
3137 2010-07-28  Anders Carlsson  <andersca@apple.com>
3138
3139         Reviewed by Sam Weinig.
3140
3141         Implement JSNPObject::put
3142         https://bugs.webkit.org/show_bug.cgi?id=43149
3143
3144         * WebProcess/Plugins/JSNPObject.cpp:
3145         (WebKit::JSNPObject::getOwnPropertySlot):
3146         Fix a typo.
3147
3148         (WebKit::JSNPObject::getOwnPropertyDescriptor):
3149         Implement this in the same way as it's implemented in RuntimeObject.
3150
3151         (WebKit::JSNPObject::put):
3152         Implement this, call NPClass::setProperty.
3153
3154         * WebProcess/Plugins/JSNPObject.h:
3155
3156 2010-07-28  Anders Carlsson  <andersca@apple.com>
3157
3158         Reviewed by Sam Weinig.
3159
3160         Add support for calling NPObject methods
3161         https://bugs.webkit.org/show_bug.cgi?id=43145
3162
3163         * WebKit2.xcodeproj/project.pbxproj:
3164         Add JSNPMethod.cpp and JSNPMethod.h
3165     
3166         * WebProcess/Plugins/JSNPMethod.cpp: Added.
3167         * WebProcess/Plugins/JSNPMethod.h: Added.
3168         * WebProcess/Plugins/JSNPObject.cpp:
3169         (WebKit::):
3170         Add a ClassInfo static variable for JSNPObject.
3171
3172         (WebKit::JSNPObject::callMethod):
3173         Convert the passed in arguments, call the method and convert the result back.
3174
3175         (WebKit::JSNPObject::getOwnPropertySlot):
3176         Check if the NPObject has a method.
3177
3178         (WebKit::JSNPObject::methodGetter):
3179         Return a new JSNPMethod.
3180
3181         * WebProcess/Plugins/JSNPObject.h:
3182         (WebKit::JSNPObject::classInfo):
3183         Return the s_info.
3184
3185         * WebProcess/Plugins/NPJSObject.cpp:
3186         (WebKit::NPJSObject::getProperty):
3187         Get the property from the JSObject.
3188
3189         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3190         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
3191         Convert the given JSValue to an NPVariant.
3192
3193         * win/WebKit2.vcproj:
3194         Add JSNPMethod.cpp and JSNPMethod.h
3195
3196 2010-07-28  Adam Roben  <aroben@apple.com>
3197
3198         Teach CoreIPC how to handle with a pipe closing during a write
3199
3200         Fixes <http://webkit.org/b/43131> Assertion failure in
3201         Connection::sendOutgoingMessage if the other process exits at just the
3202         wrong time
3203
3204         Reviewed by Darin Adler.
3205
3206         * Platform/CoreIPC/win/ConnectionWin.cpp:
3207         (CoreIPC::Connection::sendOutgoingMessage): If ::WriteFile fails with
3208         ERROR_NO_DATA, the pipe (and thus the connection) has closed.
3209
3210 2010-07-28  Adam Roben  <aroben@apple.com>
3211
3212         Teach CoreIPC the right way to send large messages on Windows
3213
3214         r63776 added support for ::WriteFile failing with ERROR_IO_PENDING,
3215         but it had a major flaw: we didn't ensure that the data being sent
3216         (which is owned by the ArgumentEncoder) stayed around until the write
3217         finished. We'd destroy the data immediately, leading to ::WriteFile
3218         accessing that freed memory later. This seemed to always manifest
3219         itself as a crash in ::WaitForMultipleObjects.
3220
3221         The correct solution (as hinted above) is to make sure that the data
3222         being written is not destroyed until the write completes. When
3223         ::WriteFile fails with ERROR_IO_PENDING, we store the data being sent
3224         in Connection::m_pendingWriteArguments, and don't send any more
3225         messages until that write completes. We use an event in the OVERLAPPED
3226         structure passed to ::WriteFile to detect when the write has completed
3227         (similar to what we do for reads).
3228
3229         Fixes <http://webkit.org/b/42785> <rdar://problem/8218522> Crash in
3230         WebKit2WebProcess in WaitForMultipleObjects beneath
3231         WorkQueue::workQueueThreadBody when running tests that produce a lot
3232         of output
3233
3234         Reviewed by Anders Carlsson.
3235
3236         * Platform/CoreIPC/Connection.cpp:
3237         (CoreIPC::Connection::canSendOutgoingMessages): Added. This calls out
3238         to a platform-specific function to allow each platform to have its own
3239         policy for when messages can and can't be sent.
3240         (CoreIPC::Connection::sendOutgoingMessages): Use the new
3241         canSendOutgoingMessages to determine whether we can send any messages
3242         right now. We now remove one message at a time from m_outgoingMessages
3243         and send it. We stop sending messages when sendOutgoingMessage returns
3244         false.
3245
3246         * Platform/CoreIPC/Connection.h: Added m_pendingWriteArguments and
3247         m_writeState on Windows.
3248         (CoreIPC::Connection::Message::Message): Added this default
3249         constructor.
3250
3251         * Platform/CoreIPC/MessageID.h:
3252         (CoreIPC::MessageID::MessageID): Made the default constructor public
3253         for Message's benefit.
3254
3255         * Platform/CoreIPC/mac/ConnectionMac.cpp:
3256         (CoreIPC::Connection::platformCanSendOutgoingMessages): Added. Always
3257         returns true.
3258         (CoreIPC::Connection::sendOutgoingMessage): Changed to return a
3259         boolean indicating whether more messages can be sent at this time.
3260
3261         * Platform/CoreIPC/qt/ConnectionQt.cpp:
3262         (CoreIPC::Connection::platformCanSendOutgoingMessages): Added. Returns
3263         true if we have a socket.
3264         (CoreIPC::Connection::sendOutgoingMessage): Changed a null-check of
3265         m_socket to an assertion since it should be checked for null in
3266         platformCanSendOutgoingMessages. Changed to return a boolean
3267         indicating whether more messages can be sent at this time.
3268
3269         * Platform/CoreIPC/win/ConnectionWin.cpp:
3270         (CoreIPC::Connection::platformInitialize): Added initialization of
3271         m_writeState.
3272         (CoreIPC::Connection::platformInvalidate): Close m_writeState's event
3273         handle.
3274         (CoreIPC::Connection::writeEventHandler): Added. Checks if the pending
3275         write has completed, cleans up our pending write state, and sends any
3276         remaining messages.
3277         (CoreIPC::Connection::open): Register our write event with the
3278         WorkQueue so that writeEventHandler will be called when the event is
3279         signaled.
3280         (CoreIPC::Connection::platformCanSendOutgoingMessages): Added. We can
3281         only send messages if there isn't a write pending.
3282         (CoreIPC::Connection::sendOutgoingMessage): Changed to return a
3283         boolean indicating whether more messages can be sent at this time. We
3284         now pass m_writeState to ::WriteFile instead of an empty OVERLAPPED
3285         struct so that our write event will be signaled when the write
3286         completes. We also no longer pass a pointer to receive how many bytes
3287         were written, as recommended by MSDN. If ::WriteFile fails with
3288         ERROR_IO_PENDING, we save the ArgumentEncoder for this message and
3289         return false to indicate that no more messages can be sent at this
3290         time.
3291
3292 2010-07-28  Adam Roben  <aroben@apple.com>
3293
3294         Stop leaking Connection::m_readState.hEvent on Windows
3295
3296         Fixes <http://webkit.org/b/43129> CoreIPC::Connection leaks its read
3297         event on Windows
3298
3299         Reviewed by Darin Adler.
3300
3301         * Platform/CoreIPC/win/ConnectionWin.cpp:
3302         (CoreIPC::Connection::platformInvalidate): Close the event handle.
3303
3304 2010-07-26  Steve Block  <steveblock@google.com>
3305
3306        Reviewed by Jeremy Orlow.
3307
3308        Page clients should be passed to Page constructor via structure of pointers
3309        https://bugs.webkit.org/show_bug.cgi?id=42834
3310
3311        * WebKit2/WebProcess/WebPage/WebPage.cpp:
3312        (WebPage::WebPage):
3313
3314 2010-07-28  Andras Becsi  <abecsi@webkit.org>
3315
3316         Unreviewed trivial build fix.
3317
3318         [Qt] Follow the API changes after r64172.
3319
3320         * UIProcess/API/qt/qwkpage.cpp:
3321         (QWKPage::url):
3322         (QWKPage::title):
3323
3324 2010-07-27  Anders Carlsson  <andersca@apple.com>
3325
3326         Fix Windows build.
3327
3328         * WebProcess/Plugins/JSNPObject.cpp:
3329         (WebKit::JSNPObject::propertyGetter):
3330         Remove unreachable code.
3331
3332 2010-07-27  Anders Carlsson  <andersca@apple.com>
3333
3334         Reviewed by Sam Weinig.
3335
3336         Implement JSNPObject::propertyGetter
3337         https://bugs.webkit.org/show_bug.cgi?id=43091
3338
3339         * WebProcess/Plugins/JSNPObject.cpp:
3340         (WebKit::JSNPObject::propertyGetter):
3341         Ask the NPObject for its property.
3342
3343         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3344         (WebKit::NPRuntimeObjectMap::jsNPObjectDestroyed):
3345         Add a stub.
3346
3347         (WebKit::NPRuntimeObjectMap::convertNPVariantToValue):
3348         Implement this for everything except objects.
3349
3350 2010-07-27  Sam Weinig  <sam@webkit.org>
3351
3352         Reviewed by Anders Carlsson.
3353
3354         Patch for https://bugs.webkit.org/show_bug.cgi?id=43087
3355         Clean up handling of strings at the WebKit2 API layer.
3356
3357         - Always use the "copy" rule for functions that return WKStringRefs or WKURLRefs.
3358         - Never return a null WKStringRef or WKURLRef.
3359
3360         * UIProcess/API/C/WKAPICast.h:
3361         (toRef):
3362         (toURLRef):
3363         (toCopiedRef):
3364         (toCopiedURLRef):
3365         * UIProcess/API/C/WKBackForwardListItem.cpp:
3366         (WKBackForwardListItemCopyOriginalURL):
3367         (WKBackForwardListItemCopyURL):
3368         (WKBackForwardListItemCopyTitle):
3369         * UIProcess/API/C/WKBackForwardListItem.h:
3370         * UIProcess/API/C/WKFrame.cpp:
3371         (WKFrameIsMainFrame):
3372         (WKFrameCopyProvisionalURL):
3373         (WKFrameCopyURL):
3374         (WKFrameGetPage):
3375         (WKFrameRetain):
3376         (WKFrameRelease):
3377         * UIProcess/API/C/WKFrame.h:
3378         * UIProcess/API/C/WKNavigationData.cpp:
3379         (WKNavigationDataCopyTitle):
3380         (WKNavigationDataCopyURL):
3381         * UIProcess/API/C/WKNavigationData.h:
3382         * UIProcess/API/C/WKPage.cpp:
3383         (WKPageCopyTitle):
3384         * UIProcess/API/C/WKPage.h:
3385         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3386         (WKBundleFrameCopyURL):
3387         (WKBundleFrameCopyName):
3388         (WKBundleFrameCopyCounterValue):
3389         (WKBundleFrameCopyMarkerText):
3390         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3391         * WebProcess/InjectedBundle/API/c/WKBundleNode.cpp:
3392         (WKBundleNodeCopyNodeName):
3393         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3394         (WKBundlePageCopyRenderTreeExternalRepresentation):
3395
3396 2010-07-27  Adam Roben  <aroben@apple.com>
3397
3398         Fix PageClient ownership in WebPageProxy
3399
3400         WKView now owns the PageClient, similar to how things work on Windows
3401         (where the WebView is the PageClient).
3402
3403         Fixes <http://webkit.org/b/40185> WebPageProxy should keep a weak
3404         reference to the PageClient
3405
3406         Reviewed by Anders Carlsson.
3407
3408         * UIProcess/API/mac/WKView.mm:
3409         (-[WKView initWithFrame:pageNamespaceRef:]): Store the PageClientImpl
3410         on our WKViewData object and pass it to the WebPageProxy.
3411
3412         * UIProcess/WebPageProxy.cpp:
3413         (WebKit::WebPageProxy::setPageClient):
3414         * UIProcess/WebPageProxy.h:
3415         Removed Mac-specific code that put the PageClient in an OwnPtr. We now
3416         store it in a bare pointer just like on Windows.
3417
3418 2010-07-27  Anders Carlsson  <andersca@apple.com>
3419
3420         Reviewed by Sam Weinig.
3421
3422         Add JSNPObject, a JSObject that wraps an NPObject
3423         https://bugs.webkit.org/show_bug.cgi?id=43079
3424
3425         * WebKit2.xcodeproj/project.pbxproj:
3426         Add JSNPObject.cpp and JSNPObject.h
3427         
3428         * WebProcess/Plugins/JSNPObject.cpp: Added.
3429         (WebKit::npIdentifierFromIdentifier):
3430         (WebKit::JSNPObject::JSNPObject):
3431         (WebKit::JSNPObject::~JSNPObject):
3432         (WebKit::JSNPObject::getOwnPropertySlot):
3433         Check if the NPObject has the given property.
3434
3435         (WebKit::JSNPObject::propertyGetter):
3436         (WebKit::JSNPObject::throwInvalidAccessError):
3437         * WebProcess/Plugins/JSNPObject.h: Added.
3438         (WebKit::JSNPObject::createStructure):
3439         * WebProcess/Plugins/NPJSObject.h:
3440         
3441         * win/WebKit2.vcproj:
3442         Add JSNPObject.cpp and JSNPObject.h
3443
3444 2010-07-27  Anders Carlsson  <andersca@apple.com>
3445
3446         Reviewed by Sam Weinig.
3447
3448         Expose interface for returning the plug-in script JSObject
3449         https://bugs.webkit.org/show_bug.cgi?id=43074
3450
3451         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3452         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
3453         Add empty stub.
3454
3455         * WebProcess/Plugins/NPRuntimeObjectMap.h:
3456         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3457         (WebKit::NetscapePlugin::pluginScriptableNPObject):
3458         Ask the plug-in for it's scriptable NPObject.
3459
3460         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3461         * WebProcess/Plugins/Plugin.h:
3462         Add pluginScritableNPObject.
3463
3464         * WebProcess/Plugins/PluginView.cpp:
3465         (WebKit::PluginView::PluginView):
3466         Call PluginViewBase constructor.
3467
3468         (WebKit::PluginView::scriptObject):
3469         Ask the plug-in for its scriptable object and wrap it.
3470
3471         * WebProcess/Plugins/PluginView.h:
3472         PluginView now inherits from PluginViewBase.
3473
3474 2010-07-27  Anders Carlsson  <andersca@apple.com>
3475
3476         Reviewed by Adam Roben.
3477
3478         Move NPJSObject out into separate files
3479         https://bugs.webkit.org/show_bug.cgi?id=43068
3480
3481         * WebKit2.xcodeproj/project.pbxproj:
3482         * WebProcess/Plugins/NPJSObject.cpp: Added.
3483         (WebKit::NPJSObject::create):
3484         (WebKit::NPJSObject::NPJSObject):
3485         (WebKit::NPJSObject::~NPJSObject):
3486         (WebKit::NPJSObject::isNPJSObject):
3487         (WebKit::NPJSObject::initialize):
3488         (WebKit::identifierFromIdentifierRep):
3489         (WebKit::NPJSObject::hasProperty):
3490         (WebKit::NPJSObject::getProperty):
3491         (WebKit::NPJSObject::npClass):
3492         (WebKit::NPJSObject::NP_Allocate):
3493         (WebKit::NPJSObject::NP_Deallocate):
3494         (WebKit::NPJSObject::NP_HasProperty):
3495         (WebKit::NPJSObject::NP_GetProperty):
3496         * WebProcess/Plugins/NPJSObject.h: Added.
3497         (WebKit::NPJSObject::jsObject):
3498         (WebKit::NPJSObject::toNPJSObject):
3499         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3500         (WebKit::NPRuntimeObjectMap::npJSObjectDestroyed):
3501         (WebKit::NPRuntimeObjectMap::globalExec):
3502         * WebProcess/Plugins/NPRuntimeObjectMap.h:
3503         * win/WebKit2.vcproj:
3504
3505 2010-07-27  Anders Carlsson  <andersca@apple.com>
3506
3507         Reviewed by Adam Roben.
3508
3509         Rename NPJSObjectMap to NPRuntimeObjectMap
3510         https://bugs.webkit.org/show_bug.cgi?id=43066
3511
3512         * WebKit2.xcodeproj/project.pbxproj:
3513         * WebProcess/Plugins/NPJSObjectMap.cpp: Removed.
3514         * WebProcess/Plugins/NPJSObjectMap.h: Removed.
3515         * WebProcess/Plugins/NPRuntimeObjectMap.cpp: Added.
3516         (WebKit::NPJSObject::NPJSObject):
3517         (WebKit::NPJSObject::~NPJSObject):
3518         (WebKit::NPJSObject::toNPJSObject):
3519         (WebKit::NPJSObject::create):
3520         (WebKit::NPJSObject::isNPJSObject):
3521         (WebKit::NPJSObject::initialize):
3522         (WebKit::identifierFromIdentifierRep):
3523         (WebKit::NPJSObject::hasProperty):
3524         (WebKit::NPJSObject::getProperty):
3525         (WebKit::NPJSObject::npClass):
3526         (WebKit::NPJSObject::NP_Allocate):
3527         (WebKit::NPJSObject::NP_Deallocate):
3528         (WebKit::NPJSObject::NP_HasProperty):
3529         (WebKit::NPJSObject::NP_GetProperty):
3530         (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
3531         (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
3532         (WebKit::NPRuntimeObjectMap::invalidate):
3533         * WebProcess/Plugins/NPRuntimeObjectMap.h: Added.
3534         * WebProcess/Plugins/PluginView.cpp:
3535         (WebKit::PluginView::PluginView):
3536         (WebKit::PluginView::~PluginView):
3537         (WebKit::PluginView::windowScriptNPObject):
3538         (WebKit::PluginView::pluginElementNPObject):
3539         * WebProcess/Plugins/PluginView.h:
3540         * win/WebKit2.vcproj:
3541
3542 2010-07-27  Adam Roben  <aroben@apple.com>
3543
3544         Make preferences APIs robust against web process crashes
3545
3546         Fixes <http://webkit.org/b/43049> Crash in
3547         WebPageNamespace::preferencesDidChange if preferences are changed
3548         after the web process crashes
3549
3550         Reviewed by Anders Carlsson.
3551
3552         * UIProcess/WebContext.cpp:
3553         (WebKit::WebContext::preferencesDidChange): Bail out if we don't have
3554         a web process. The new preference values will get propogated to the
3555         web process if and when it launches.
3556
3557 2010-07-27  Adam Roben  <aroben@apple.com>
3558
3559         Add a ProcessDidExit callback to the WKPageLoaderClient
3560
3561         Fixes <http://webkit.org/b/43048> UI process needs a way to find out
3562         when the web process crashes
3563
3564         Reviewed by Anders Carlsson.
3565
3566         * UIProcess/API/C/WKPage.h: Added WKPageProcessDidExitCallback, and a
3567         processDidExit member of that type to WKPageLoaderClient.
3568
3569         * UIProcess/WebLoaderClient.cpp:
3570         (WebKit::WebLoaderClient::processDidExit): Added. Calls through to the
3571         WKPageLoaderClient.
3572
3573         * UIProcess/WebLoaderClient.h: Added processDidExit.
3574
3575         * UIProcess/WebPageProxy.cpp:
3576         (WebKit::WebPageProxy::processDidExit): Tell the loader client the
3577         process exited.
3578
3579 2010-07-27  Andras Becsi  <abecsi@webkit.org>
3580
3581         Reviewed by Kenneth Rohde Christiansen.
3582
3583         [Qt] WebEventFactory::createWebMouseEvent should follow WebKit2 API changes
3584         https://bugs.webkit.org/show_bug.cgi?id=43042
3585
3586         * Shared/qt/WebEventFactoryQt.cpp:
3587         (WebKit::WebEventFactory::createWebMouseEvent):
3588         Set deltaX, deltaY and deltaZ arguments.
3589
3590 2010-07-27  Balazs Kelemen  <kb@inf.u-szeged.hu>
3591
3592         Reviewed by Kenneth Rohde Christiansen.
3593
3594         [Qt] WebKit::PageClient implementation needs a dedicated class
3595
3596         https://bugs.webkit.org/show_bug.cgi?id=42974
3597
3598         * UIProcess/API/qt/qwkpage.cpp:
3599         (PageClientImpl::PageClientImpl): Added.
3600         (PageClientImpl::pageDidEnterAcceleratedCompositing): Moved from QWKPagePrivate.
3601         (PageClientImpl::pageDidLeaveAcceleratedCompositing): Ditto.
3602         (PageClientImpl::processDidExit): Ditto.
3603         (PageClientImpl::processDidRevive): Ditto.
3604         (PageClientImpl::setCursor): Ditto.
3605         (PageClientImpl::takeFocus): Ditto.
3606         (PageClientImpl::toolTipChanged): Ditto.
3607         (QWKPagePrivate::QWKPagePrivate): Set a new instance of the PageClientImpl as PageClient rather than 'this'.
3608         * UIProcess/API/qt/qwkpage_p.h: Removed PageClient implementation methods from QWKPagePrivate.
3609
3610 2010-07-26  Darin Adler  <darin@apple.com>
3611
3612         Reviewed by Sam Weinig.
3613
3614         WebKitTestRunner needs to support layoutTestController.counterValueForElementById
3615         https://bugs.webkit.org/show_bug.cgi?id=42537
3616
3617         WebKitTestRunner needs layoutTestController.markerTextForListItem
3618         https://bugs.webkit.org/show_bug.cgi?id=42549
3619
3620         * UIProcess/API/C/WKString.cpp:
3621         (WKStringIsEmpty): Added.
3622         * UIProcess/API/C/WKString.h: Added WKStringIsEmpty.
3623
3624         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3625         (copiedString): Added. Helper for functions that return a
3626         WKStringRef that follows the copy rule.
3627         (WKBundleFrameCopyName): Use copiedString.
3628         (WKBundleFrameCopyCounterValue): Added. Calls counterValue.
3629         (WKBundleFrameCopyMarkerText): Added. Calls markerText.
3630         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
3631         Added WKBundleFrameCopyCounterValue and WKBundleFrameCopyMarkerText.
3632
3633         * WebProcess/WebPage/WebFrame.cpp:
3634         (WebKit::WebFrame::computedStyleIncludingVisitedInfo):
3635         Renamed argument to streamline function a bit.
3636         (WebKit::WebFrame::counterValue): Added.
3637         (WebKit::WebFrame::markerText): Added.
3638         * WebProcess/WebPage/WebFrame.h: Added counterValue and markerText.
3639
3640 2010-07-26  Sam Weinig  <sam@webkit.org>
3641
3642         Reviewed by Anders Carlsson.
3643
3644         Part 2 of https://bugs.webkit.org/show_bug.cgi?id=43013
3645         <rdar://problem/8152434>
3646         Add support for scrolling using the keyboard in WebKit2
3647
3648         Add support for scrolling with the space bar and ensure that we don't scroll
3649         if WebCore is handling the event in another way.
3650
3651         * WebProcess/WebPage/WebPage.cpp:
3652         (WebKit::WebPage::keyEvent):
3653         (WebKit::getScrollMapping):
3654         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
3655         * WebProcess/WebPage/WebPage.h:
3656
3657 2010-07-26  Sam Weinig  <sam@webkit.org>
3658
3659         Reviewed by Anders Carlsson.
3660
3661         Patch for https://bugs.webkit.org/show_bug.cgi?id=43013
3662         Part of <rdar://problem/8152434>
3663         Add support for scrolling using the keyboard in WebKit2
3664
3665         * WebProcess/WebPage/WebPage.cpp:
3666         (WebKit::getScrollMapping):
3667         (WebKit::WebPage::keyEvent):
3668         Scroll the page in response to keyDown.
3669         * WebProcess/WebPage/WebPage.h:
3670         * WebProcess/WebPage/mac/WebPageMac.mm:
3671         Use WindowsKeyboardCodes.h instead of redefining the constants.
3672
3673 2010-07-26  Ada Chan  <adachan@apple.com>
3674
3675         Fix Windows build.
3676
3677         * win/WebKit2Generated.make:
3678
3679 2010-07-26  Anders Carlsson  <andersca@apple.com>
3680
3681         Fix Windows build.
3682
3683         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3684         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
3685         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
3686
3687 2010-07-26  Anders Carlsson  <andersca@apple.com>
3688
3689         Reviewed by Sam Weinig.
3690
3691         Handle mouseenter/mouseleave + focus events
3692         https://bugs.webkit.org/show_bug.cgi?id=42997
3693
3694         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3695         (WebKit::NetscapePlugin::handleMouseEnterEvent):
3696         Call platformHandleMouseEnterEvent.
3697         
3698         (WebKit::NetscapePlugin::handleMouseLeaveEvent):
3699         Call platformHandleMouseExitEvent.
3700
3701         (WebKit::NetscapePlugin::setFocus):
3702         Call platformSetFocus.
3703
3704         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3705         (WebKit::fillInCocoaEventFromMouseEvent):
3706         Factor out code that fills in an NPCocoaEvent from a WebMouseEvent.
3707
3708         (WebKit::initializeMouseEvent):
3709         Call fillInCocoaEventFromMouseEvent.
3710         
3711         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
3712         Send an NPCocoaEventMouseEntered event.
3713     
3714         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
3715         Send an NPCocoaEventMouseExited event.
3716
3717         (WebKit::NetscapePlugin::platformSetFocus):
3718         Send an NPCocoaEventFocusChanged.
3719
3720         * WebProcess/Plugins/Plugin.h:
3721         * WebProcess/Plugins/PluginView.cpp:
3722         (WebKit::PluginView::handleEvent):
3723         Dispatch mouse enter and mouse leave events. Call focusPluginElement on mousedown.
3724
3725         (WebKit::PluginView::focusPluginElement):
3726         Focus the plug-in's containing frame and its element.
3727
3728         (WebKit::PluginView::setFocus):
3729         Call Plugin::setFocus.
3730
3731 2010-07-26  Brady Eidson  <beidson@apple.com>
3732
3733         Reviewed by Sam Weinig.
3734
3735         Add ability for WK2 to register a scheme to always be displayed as an empty document
3736         https://bugs.webkit.org/show_bug.cgi?id=42995
3737
3738         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
3739         (WebProcessMessage::):
3740         
3741         * UIProcess/API/C/WKContext.cpp:
3742         (_WKContextRegisterURLSchemeAsEmptyDocument):
3743         * UIProcess/API/C/WKContextPrivate.h:
3744         
3745         * UIProcess/WebContext.cpp:
3746         (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
3747         * UIProcess/WebContext.h:
3748         
3749         * WebProcess/WebProcess.cpp:
3750         (WebKit::WebProcess::registerURLSchemeAsEmptyDocument):
3751         (WebKit::WebProcess::didReceiveMessage):
3752         * WebProcess/WebProcess.h:
3753
3754 2010-07-26  Anders Carlsson  <andersca@apple.com>
3755
3756         Reviewed by Adam Roben.
3757
3758         Get rid of the dummy plug-in.
3759
3760         * WebKit2.xcodeproj/project.pbxproj:
3761         * WebProcess/Plugins/DummyPlugin.cpp: Removed.
3762         * WebProcess/Plugins/DummyPlugin.h: Removed.
3763         * win/WebKit2.vcproj:
3764
3765 2010-07-26  Sam Weinig  <sam@webkit.org>
3766
3767         Reviewed by Anders Carlsson.
3768
3769         Move some non-APIish functions into private headers.
3770
3771         * WebKit2.xcodeproj/project.pbxproj:
3772         * WebProcess/InjectedBundle/API/c/WKBundle.cpp: