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