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