[Qt] Add the webkit2 library to LIBS instead of QMAKE_LFLAGS
[WebKit-https.git] / WebKit2 / ChangeLog
1 2010-11-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2
3         Reviewed by Kenneth Rohde Christiansen.
4
5         [Qt] Add the webkit2 library to LIBS instead of QMAKE_LFLAGS
6
7         Otherwise the library order will get messed up and cause
8         missing symbols on Mac OS X.
9
10         * WebKit2.pri:
11         * WebKit2.pro:
12
13 2010-11-02  Daniel Bates  <dbates@rim.com>
14
15         Reviewed by Adam Barth.
16
17         For unnamed frames, window.name returns a generated name
18         https://bugs.webkit.org/show_bug.cgi?id=6751
19
20         Part 1 of 2.
21
22         Substitute FrameTree::uniqueName() for FrameTree::name() in WebKit2.
23
24         * WebProcess/WebPage/WebFrame.cpp:
25         (WebKit::WebFrame::name):
26
27 2010-11-02  Amruth Raj  <amruthraj@motorola.com> and Ravi Kasibhatla  <ravi.kasibhatla@motorola.com>
28
29         Reviewed by Martin Robinson.
30
31         Changes to enable building WebKit2 for Gtk port.
32         (https://bugs.webkit.org/show_bug.cgi?id=37369)
33
34         * Platform/gtk: Added.
35         * Platform/gtk/SharedMemoryGtk.cpp: Added.  Stubbed implementation for GTK port. Yet to implement.
36         (WebKit::SharedMemory::Handle::Handle):
37         (WebKit::SharedMemory::Handle::~Handle):
38         (WebKit::SharedMemory::Handle::encode):
39         (WebKit::SharedMemory::Handle::decode):
40         (WebKit::SharedMemory::create):
41         (WebKit::SharedMemory::~SharedMemory):
42         (WebKit::SharedMemory::createHandle):
43         (WebKit::SharedMemory::systemPageSize):
44         * Shared/gtk: Added.
45         * Shared/gtk/BackingStoreGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
46         (WebKit::BackingStore::createGraphicsContext):
47         (WebKit::BackingStore::paint):
48         * Shared/gtk/PlatformCertificateInfo.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
49         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
50         (WebKit::PlatformCertificateInfo::encode):
51         (WebKit::PlatformCertificateInfo::decode):
52         * Shared/gtk/WebCoreArgumentCodersGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
53         (CoreIPC::encodeResourceRequest):
54         (CoreIPC::decodeResourceRequest):
55         * UIProcess/Plugins/gtk: Added.
56         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: Added.  Stubbed implementation for GTK port. Yet to implement.
57         (WebKit::PluginInfoStore::pluginsDirectories):
58         (WebKit::PluginInfoStore::pluginPathsInDirectory):
59         (WebKit::PluginInfoStore::individualPluginPaths):
60         (WebKit::PluginInfoStore::getPluginInfo):
61         (WebKit::PluginInfoStore::shouldUsePlugin):
62         * WebProcess/InjectedBundle/InjectedBundle.h:
63         * WebProcess/InjectedBundle/gtk: Added.
64         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
65         (WebKit::InjectedBundle::load):
66         (WebKit::InjectedBundle::activateMacFontAscentHack):
67         * WebProcess/Plugins/Netscape/gtk: Added.
68         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Added.  Stubbed implementation for GTK port. Yet to implement.
69         (WebKit::NetscapePlugin::platformPostInitialize):
70         (WebKit::NetscapePlugin::platformDestroy):
71         (WebKit::NetscapePlugin::platformGeometryDidChange):
72         (WebKit::NetscapePlugin::platformPaint):
73         (WebKit::toNP):
74         (WebKit::NetscapePlugin::platformHandleMouseEvent):
75         (WebKit::NetscapePlugin::platformHandleWheelEvent):
76         (WebKit::NetscapePlugin::platformSetFocus):
77         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
78         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
79         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
80         * WebProcess/WebCoreSupport/gtk: Added.
81         * WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
82         (WebFrameNetworkingContext::create):
83         (WebFrameNetworkingContext::WebFrameNetworkingContext):
84
85 2010-11-02  Jing Jin  <jjin@apple.com>
86
87         Reviewed by Alexey Proskuryakov.
88
89         Key down calls are not being sent to the application.
90         https://bugs.webkit.org/show_bug.cgi?id=48867
91
92         * UIProcess/API/mac/WKView.mm:
93         (-[WKView keyDown:]): Call super when ignoring a key down.
94
95 2010-11-02  Anders Carlsson  <andersca@apple.com>
96
97         Reviewed by John Sullivan.
98
99         Add Null and Int32 to NPVariantData
100         https://bugs.webkit.org/show_bug.cgi?id=48887
101
102         * Shared/Plugins/NPRemoteObjectMap.cpp:
103         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
104         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
105         * Shared/Plugins/NPVariantData.cpp:
106         (WebKit::NPVariantData::NPVariantData):
107         (WebKit::NPVariantData::makeNull):
108         (WebKit::NPVariantData::makeInt32):
109         (WebKit::NPVariantData::encode):
110         (WebKit::NPVariantData::decode):
111         * Shared/Plugins/NPVariantData.h:
112         (WebKit::NPVariantData::int32Value):
113
114 2010-11-02  Anders Carlsson  <andersca@apple.com>
115
116         Reviewed by Adam Roben.
117
118         Add support for NP_HasMethod and NP_Invoke
119         https://bugs.webkit.org/show_bug.cgi?id=48882
120
121         * Platform/CoreIPC/HandleMessage.h:
122         (CoreIPC::callMemberFunction):
123         Add new overload.
124
125         * Shared/Plugins/NPObjectMessageReceiver.cpp:
126         (WebKit::NPObjectMessageReceiver::hasMethod):
127         Call hasMethod and return the result.
128
129         (WebKit::NPObjectMessageReceiver::invoke):
130         Convert the arguments, call invoke and return the result.
131
132         (WebKit::NPObjectMessageReceiver::getProperty):
133         Release the converted variant.
134
135         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
136         Add HasMethod and Invoke messages.
137         
138         * Shared/Plugins/NPObjectProxy.cpp:
139         (WebKit::NPObjectProxy::hasMethod):
140         Send the HasMethod message.
141
142         (WebKit::NPObjectProxy::invoke):
143         Send the Invoke message.
144
145         (WebKit::NPObjectProxy::NP_HasMethod):
146         Call hasMethod.
147
148         (WebKit::NPObjectProxy::NP_Invoke):
149         Call invoke.
150
151 2010-11-02  Anders Carlsson  <andersca@apple.com>
152
153         Reviewed by Sam Weinig.
154
155         Implement NP_HasProperty for NPObjectProxy
156         https://bugs.webkit.org/show_bug.cgi?id=48876
157
158         * Shared/Plugins/NPObjectMessageReceiver.cpp:
159         (WebKit::NPObjectMessageReceiver::hasProperty):
160         Call The hasProperty callback function.
161
162         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
163         Add HasProperty message.
164
165         * Shared/Plugins/NPObjectProxy.cpp:
166         (WebKit::NPObjectProxy::hasProperty):
167         Send the HasProperty message.
168
169         (WebKit::NPObjectProxy::NP_HasProperty):
170         Call hasProperty.
171
172
173 2010-11-02  Sam Weinig  <sam@webkit.org>
174
175         Reviewed by Anders Carlsson.
176
177         Add a way to send startup messages on the context which can be posted when a process launches
178         <rdar://problem/8617928>
179         https://bugs.webkit.org/show_bug.cgi?id=48838
180
181         Adds WKContextSetInitializationUserDataForInjectedBundle which sets an
182         APIObject on WebContext to be sent to the InjectedBundle's WKBundleInitialize
183         function each time a process starts up. This can help in cases where
184         the WebProcess dies, and will be helpful in the world where there are
185         multiple WebProcess's per context.
186
187         * Scripts/webkit2/messages.py:
188         * UIProcess/API/C/WKContext.cpp:
189         (WKContextSetInitializationUserDataForInjectedBundle):
190         * UIProcess/API/C/WKContext.h:
191         * UIProcess/WebContext.cpp:
192         (WebKit::WebContext::ensureWebProcess):
193         * UIProcess/WebContext.h:
194         (WebKit::WebContext::setInjectedBundleInitializationUserData):
195         (WebKit::WebContext::injectedBundleInitializationUserData):
196         * WebProcess/InjectedBundle/API/c/WKBundleInitialize.h:
197         * WebProcess/InjectedBundle/InjectedBundle.h:
198         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
199         (WebKit::InjectedBundle::load):
200         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
201         (WebKit::InjectedBundle::load):
202         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
203         (WebKit::InjectedBundle::load):
204         * WebProcess/WebProcess.cpp:
205         (WebKit::WebProcess::initializeWebProcess):
206         * WebProcess/WebProcess.h:
207         * WebProcess/WebProcess.messages.in:
208
209 2010-11-02  Anders Carlsson  <andersca@apple.com>
210
211         Reviewed by Sam Weinig.
212
213         Implement PluginProxy::pluginScriptableNPObject
214         https://bugs.webkit.org/show_bug.cgi?id=48874
215
216         * PluginProcess/PluginControllerProxy.cpp:
217         (WebKit::PluginControllerProxy::getPluginScriptableNPObject):
218         Ask the plug-in for its scriptable NPObject, register it with the map and return its object ID.
219
220         * PluginProcess/PluginControllerProxy.messages.in:
221         Add GetPluginScriptableNPObject message.
222
223         * WebProcess/Plugins/PluginProxy.cpp:
224         (WebKit::PluginProxy::pluginScriptableNPObject):
225         Send the GetPluginScriptableNPObject message.
226
227 2010-11-02  Anders Carlsson  <andersca@apple.com>
228
229         Reviewed by Dan Bernstein.
230
231         Add strings to NPVariantData
232         https://bugs.webkit.org/show_bug.cgi?id=48871
233
234         * Shared/Plugins/NPRemoteObjectMap.cpp:
235         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
236         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
237         * Shared/Plugins/NPVariantData.cpp:
238         (WebKit::NPVariantData::makeString):
239         (WebKit::NPVariantData::encode):
240         (WebKit::NPVariantData::decode):
241         * Shared/Plugins/NPVariantData.h:
242         (WebKit::NPVariantData::stringValue):
243
244 2010-11-02  Anders Carlsson  <andersca@apple.com>
245
246         Reviewed by Dan Bernstein.
247
248         Add convenience functions for allocating NPAPI memory
249         https://bugs.webkit.org/show_bug.cgi?id=48870
250
251         Add npnMemAlloc, npnMemFree and createNPString functions and 
252         npnMemNew, npnMemNewArray function templates.
253
254         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
255         (WebKit::JSNPObject::getOwnPropertyNames):
256         Use npnMemFree.
257
258         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
259         (WebKit::NPJSObject::enumerate):
260         Use npnMemNewArray.
261
262         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
263         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
264         Use createNPString.
265
266         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
267         (WebKit::npnMemAlloc):
268         Call malloc.
269
270         (WebKit::npnMemFree):
271         Call free.
272
273         (WebKit::createNPString):
274         Allocate the characters for a new NPString.
275
276         (WebKit::createNPObject):
277         Call npnMemNew.
278
279         (WebKit::deallocateNPObject):
280         Call npnMemFree.
281
282         (WebKit::releaseNPVariantValue):
283         Call npnMemFree.
284
285         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
286         (WebKit::npnMemNew):
287         (WebKit::npnMemNewArray):
288         Add new functions.
289
290         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
291         (WebKit::NPN_MemAlloc):
292         Call npnMemAlloc.
293
294         (WebKit::NPN_MemFree):
295         Call npnMemFree.
296
297         (WebKit::NPN_UTF8FromIdentifier):
298         Call npnMemNewArray.
299
300         (WebKit::copyCString):
301         Call npnMemNewArray. Correctly initialize the "len" out parameter.
302
303 2010-11-02  Jessie Berlin  <jberlin@apple.com>
304
305         Windows build fix. Unreviewed.
306
307         * win/WebKit2Generated.make:
308         Add WKInspector.h so that it is copied over to the WebKitBuild directory.
309
310 2010-11-02  Anders Carlsson  <andersca@apple.com>
311
312         Reviewed by Adam Roben.
313
314         Add some support for remote and local NPObjects to NPRemoteObjectMap
315         https://bugs.webkit.org/show_bug.cgi?id=48864
316
317         * Shared/Plugins/NPRemoteObjectMap.cpp:
318         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
319         If the NPVariant contains an NPObject that isn't an NPObjectProxy, register it
320         and return its ID.
321
322         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
323         If the NPVariantData contains a remote object, create an NPObjectProxy and return it.
324
325         * Shared/Plugins/NPVariantData.cpp:
326         (WebKit::NPVariantData::NPVariantData):
327         Initialize m_localNPObjectIDValue and m_remoteNPObjectIDValue.
328
329         (WebKit::NPVariantData::makeLocalNPObjectID):
330         Create an NPVariantData that contains a local NPObject ID.
331
332         (WebKit::NPVariantData::encode):
333         Handle local and remote NPObject IDs.
334
335         (WebKit::NPVariantData::decode):
336         Decode local and remote NPObject IDs and "swap them" so an encoded remote NPObject ID is
337         decoded as a local NPObjectID (and vice versa).
338
339         * Shared/Plugins/NPVariantData.h:
340         (WebKit::NPVariantData::localNPObjectIDValue):
341         (WebKit::NPVariantData::remoteNPObjectIDValue):
342
343 2010-11-02  Anders Carlsson  <andersca@apple.com>
344
345         Attempt to fix a GCC release only warning.
346
347         * Shared/Plugins/NPVariantData.cpp:
348         (WebKit::NPVariantData::NPVariantData):
349
350 2010-11-02  Anders Carlsson  <andersca@apple.com>
351
352         Reviewed by John Sullivan.
353
354         Invalidate the NPRemoteObjectMap
355         https://bugs.webkit.org/show_bug.cgi?id=48856
356
357         * Shared/Plugins/NPObjectMessageReceiver.cpp:
358         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
359         Remove FIXME. The NPRemoteObjectMap always outlives the NPObjectMessageReceiver.
360
361         * Shared/Plugins/NPObjectProxy.cpp:
362         (WebKit::NPObjectProxy::~NPObjectProxy):
363         Call npObjectProxyDestroyed here.
364
365         (WebKit::NPObjectProxy::invalidate):
366         Null out m_npRemoteObjectMap.
367
368         * Shared/Plugins/NPRemoteObjectMap.cpp:
369         (WebKit::NPRemoteObjectMap::~NPRemoteObjectMap):
370         Add assertions.
371
372         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
373         Keep track of the NPObjectProxy by adding it to the m_npObjectProxies set.
374
375         (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed):
376         Remove the NPObjectProxy from the m_npObjectProxies set.
377
378         (WebKit::NPRemoteObjectMap::invalidate):
379         Delete all NPObjectMessageReceivers. Iterate over all NPObjectProxy objects and invalidate them.
380
381 2010-11-02  Mike Thole  <mthole@apple.com>
382
383         Reviewed by Anders Carlsson.
384
385         WebProcessManager informed about crashes too late (pages may have already tried to load a new URL)
386         https://bugs.webkit.org/show_bug.cgi?id=48853
387
388         This also fixes: <rdar://problem/8610451> Webkit2: Crash in WebKit!WebKit::WebProcessProxy::sendMessage opening google.com page
389
390         * UIProcess/WebProcessProxy.cpp:
391         (WebKit::WebProcessProxy::~WebProcessProxy):
392         Removed invalid assertion that is hit when the WebProcess dies unexpectedly.
393         (WebKit::WebProcessProxy::didClose):
394         Reordered so that the individual pages are informed that the processDidCrash() after the shared
395         WebProcessManager has been. This allows the pages to properly trigger a new process to be launched.
396
397 2010-11-02  Enrica Casucci  <enrica@apple.com>
398
399         Reviewed by Alexey Proskuryakov.
400
401         WebKit2: Repeated cmd-key presses lead to unusable UI state
402         https://bugs.webkit.org/show_bug.cgi?id=48811
403         <rdar://problem/8611924>
404
405         Given the asynchronous nature of every interaction with the WebProcess,
406         we could re-send a keyDown event to AppKit that maps to an
407         action that is currently disabled and therefore will not trigger an action
408         but a call to the keyDown method of the NSView. We need to detect this
409         situation to avoid an infinite loop.
410
411         * UIProcess/API/mac/WKView.mm:
412         (-[WKView performKeyEquivalent:]): Delay the release of the last processed event
413         to the moment we receive another event.
414         (-[WKView keyDown:]): Added early return in case the event is one we have re-sent.
415
416 2010-11-02  Anders Carlsson  <andersca@apple.com>
417
418         Reviewed by John Sullivan.
419
420         Handle boolean values in NPVariant and NPVariantData
421         https://bugs.webkit.org/show_bug.cgi?id=48852
422
423         * Shared/Plugins/NPRemoteObjectMap.cpp:
424         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
425         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
426         * Shared/Plugins/NPVariantData.cpp:
427         (WebKit::NPVariantData::makeBool):
428         (WebKit::NPVariantData::encode):
429         (WebKit::NPVariantData::decode):
430         * Shared/Plugins/NPVariantData.h:
431         (WebKit::NPVariantData::boolValue):
432
433 2010-11-02  Anders Carlsson  <andersca@apple.com>
434
435         Reviewed by John Sullivan.
436
437         Assertion hit in WebProcessProxy::~WebProcessProxy()
438         https://bugs.webkit.org/show_bug.cgi?id=48849
439         <rdar://problem/8617676>
440
441         It is perfectly valid for the page map to contain pages if the web process proxy
442         goes away, this can happen if the process crashes for example.
443
444         * UIProcess/WebProcessProxy.cpp:
445         (WebKit::WebProcessProxy::~WebProcessProxy):
446         Remove the assertion.
447
448 2010-11-02  Christian Sejersen  <christian.webkit@gmail.com>
449
450         Reviewed by Andreas Kling.
451
452         The previous patch only took into account arm targets. This one
453         now checks whether the build is done inside Scratchbox.
454         https://bugs.webkit.org/show_bug.cgi?id=47895
455
456         * DerivedSources.pro:
457
458 2010-11-02  Anders Carlsson  <andersca@apple.com>
459
460         Reviewed by Adam Roben.
461
462         More NPRuntime work
463         https://bugs.webkit.org/show_bug.cgi?id=48847
464
465         * PluginProcess/WebProcessConnection.cpp:
466         (WebKit::WebProcessConnection::~WebProcessConnection):
467         Add assertions.
468
469         (WebKit::WebProcessConnection::removePluginControllerProxy):
470         If we have no more plug-in controller proxies, invalidate the remote object map.
471
472         * Shared/Plugins/NPIdentifierData.cpp:
473         (WebKit::NPIdentifierData::createNPIdentifier):
474         Create an NPIdentifier from the given NPIdentifierData.
475
476         * Shared/Plugins/NPObjectMessageReceiver.cpp:
477         (WebKit::NPObjectMessageReceiver::create):
478         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
479         This now takes the NPRemoteObjectMap as well as the npObjectID of the object.
480
481         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
482         Unregister the object.
483
484         (WebKit::NPObjectMessageReceiver::deallocate):
485         Delete the object.
486
487         (WebKit::NPObjectMessageReceiver::getProperty):
488         Ask the NPObject for the property and convert it back to an NPVariantData.
489
490         * Shared/Plugins/NPObjectProxy.cpp:
491         (WebKit::NPObjectProxy::~NPObjectProxy):
492         Send a Deallocate message to the corresponding message receiver on the other side.
493
494         (WebKit::NPObjectProxy::getProperty):
495         Convert the NPVariantData back to an NPVariant and return it.
496
497         * Shared/Plugins/NPRemoteObjectMap.cpp:
498         (WebKit::NPRemoteObjectMap::registerNPObject):
499         Pass the NPRemoteObjectMap and the npObjectID to NPObjectMessageReceiver::create.
500
501         (WebKit::NPRemoteObjectMap::unregisterNPObject):
502         Remove the given object from the map of registered objects.
503
504         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
505         Given an NPVariant, create an NPVariantData. Only supports void and double types right now.
506
507         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
508         Given an NPVariantData, create an NPVariant. Only supports void and double types right now.
509
510         (WebKit::NPRemoteObjectMap::invalidate):
511         Add stub.
512
513         * Shared/Plugins/NPVariantData.cpp:
514         (WebKit::NPVariantData::NPVariantData):
515         Set the type to void by default.
516
517         (WebKit::NPVariantData::makeVoid):
518         Return a void NPVariantData.
519
520         (WebKit::NPVariantData::makeDouble):
521         Return an NPVariantData that contains a double value.
522
523         (WebKit::NPVariantData::encode):
524         Encode the NPVariantData.
525
526         (WebKit::NPVariantData::decode):
527         Decode the NPVariantData.
528
529         * Shared/Plugins/NPVariantData.h:
530         (WebKit::NPVariantData::type):
531         Return the type of the NPVariantData.
532
533         (WebKit::NPVariantData::doubleValue):
534         Return the double value of the NPVariantData.
535         
536         * UIProcess/WebProcessProxy.cpp:
537         (WebKit::WebProcessProxy::didClose):
538         Use nullptr instead of 0.
539
540         * WebProcess/Plugins/PluginProcessConnection.cpp:
541         (WebKit::PluginProcessConnection::~PluginProcessConnection):
542         Assert that the connection and the remote object map are both null.
543
544         (WebKit::PluginProcessConnection::removePluginProxy):
545         If this was the last plug-in proxy, invalidate the remote object map.
546
547         * WebProcess/WebProcess.cpp:
548         (WebKit::WebProcess::shutdown):
549         Use nullptr instead of 0.
550
551 2010-11-02  Balazs Kelemen  <kbalazs@webkit.org>
552
553         Unreviewed Qt buildfix.
554
555         * DerivedSources.pro: Add WebInspector to the list of
556         message recievers.
557
558 2010-11-02  Balazs Kelemen  <kbalazs@webkit.org>
559
560         Reviewed by Andreas Kling.
561
562         [Qt][WK2] SharedMemory is broken
563         https://bugs.webkit.org/show_bug.cgi?id=48520
564
565         Implement SharedMemory with QSharedMemory to correctly handle
566         ownership and to avoid extra allocation for page size requests.
567         * Platform/SharedMemory.h:
568         * Platform/qt/SharedMemoryQt.cpp:
569         (WebKit::SharedMemory::Handle::Handle):
570         (WebKit::SharedMemory::Handle::isNull):
571         (WebKit::SharedMemory::Handle::encode):
572         (WebKit::SharedMemory::Handle::decode):
573         (WebKit::createUniqueKey):
574         (WebKit::SharedMemory::create):
575         (WebKit::accessMode):
576         (WebKit::SharedMemory::~SharedMemory):
577         (WebKit::SharedMemory::createHandle):
578
579 2010-11-02  Timothy Hatcher  <timothy@apple.com>
580
581         Add WKInspector public APIs.
582
583         https://webkit.org/b/48718
584
585         Reviewed by Pavel Feldman.
586
587         * DerivedSources.make: Added WebInspector to MESSAGE_RECEIVERS section.
588         * UIProcess/API/C/WKInspector.cpp:
589         (WKInspectorIsVisible): Added.
590         (WKInspectorShow): Added.
591         (WKInspectorClose): Added.
592         (WKInspectorShowConsole): Added.
593         (WKInspectorIsAttached): Added.
594         (WKInspectorAttach): Added.
595         (WKInspectorDetach): Added.
596         (WKInspectorIsDebuggingJavaScript): Added.
597         (WKInspectorToggleJavaScriptDebugging): Added.
598         (WKInspectorIsProfilingJavaScript): Added.
599         (WKInspectorToggleJavaScriptProfiling): Added.
600         (WKInspectorIsProfilingPage): Added.
601         (WKInspectorTogglePageProfiling): Added.
602         * UIProcess/API/C/WKInspector.h: Added new functions.
603         * UIProcess/WebInspectorProxy.cpp:
604         (WebKit::WebInspectorProxy::WebInspectorProxy): Initialize new booleans.
605         (WebKit::WebInspectorProxy::invalidate): Reset new booleans.
606         (WebKit::WebInspectorProxy::show): Added.
607         (WebKit::WebInspectorProxy::close): Added.
608         (WebKit::WebInspectorProxy::showConsole): Added.
609         (WebKit::WebInspectorProxy::attach): Added.
610         (WebKit::WebInspectorProxy::detach): Added.
611         (WebKit::WebInspectorProxy::toggleJavaScriptDebugging): Added.
612         (WebKit::WebInspectorProxy::toggleJavaScriptProfiling): Added.
613         (WebKit::WebInspectorProxy::togglePageProfiling): Added.
614         * UIProcess/WebInspectorProxy.h:
615         (WebKit::WebInspectorProxy::isVisible): Added.
616         (WebKit::WebInspectorProxy::isAttached): Added.
617         (WebKit::WebInspectorProxy::isDebuggingJavaScript): Added.
618         (WebKit::WebInspectorProxy::isProfilingJavaScript): Added.
619         (WebKit::WebInspectorProxy::isProfilingPage): Added.
620         * UIProcess/WebPageProxy.cpp:
621         (WebKit::WebPageProxy::close): Invalidate the WebInspectorProxy.
622         (WebKit::WebPageProxy::inspector): Return 0 if closed or invalid.
623         * WebKit2.pro: Added new files.
624         * WebKit2.xcodeproj/project.pbxproj: Added new Files.
625         * WebProcess/WebPage/WebInspector.cpp:
626         (WebKit::WebInspector::show): Added.
627         (WebKit::WebInspector::close): Added.
628         (WebKit::WebInspector::showConsole): Added.
629         (WebKit::WebInspector::startJavaScriptDebugging): Added.
630         (WebKit::WebInspector::stopJavaScriptDebugging): Added.
631         (WebKit::WebInspector::startJavaScriptProfiling): Added.
632         (WebKit::WebInspector::stopJavaScriptProfiling): Added.
633         (WebKit::WebInspector::startPageProfiling): Added.
634         (WebKit::WebInspector::stopPageProfiling): Added.
635         * WebProcess/WebPage/WebInspector.h:
636         (WebKit::WebInspector::page): Added.
637         * WebProcess/WebPage/WebInspector.messages.in: Added.
638         * WebProcess/WebPage/WebPage.cpp:
639         (WebKit::WebPage::close): Destroy the WebInspector.
640         (WebKit::WebPage::inspector): Return 0 if closed.
641         (WebKit::WebPage::didReceiveMessage): Send the message to the WebInspector
642         if the message class is MessageClassWebInspector.
643         * win/WebKit2.vcproj: Added new files.
644
645 2010-11-02  Timothy Hatcher  <timothy@apple.com>
646
647         Make WebInspectorFrontendClient inherit from InspectorFrontendClientLocal.
648
649         We can do this since the Web Inspector WebPage will share the same process
650         with the inspected WebPage.
651
652         https://webkit.org/b/48652
653
654         Reviewed by Pavel Feldman.
655
656         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
657         (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
658         Call the InspectorFrontendClientLocal constructor.
659         (WebKit::WebInspectorFrontendClient::attachWindow): Added.
660         (WebKit::WebInspectorFrontendClient::detachWindow): Added.
661         (WebKit::WebInspectorFrontendClient::setAttachedWindowHeight): Added.
662         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
663
664 2010-11-01  Juha Savolainen  <juha.savolainen@weego.fi>
665
666         Reviewed by Kenneth Rohde Christiansen.
667
668         Initial implementation of QWKHistoryItem.
669         https://bugs.webkit.org/show_bug.cgi?id=48620
670
671         The QWkHistoryItem represents one item in the history of QWKPage.
672
673         * UIProcess/API/qt/qwkhistory.cpp:
674         (QWKHistoryItemPrivate::QWKHistoryItemPrivate):
675         (QWKHistoryItem::QWKHistoryItem):
676         (QWKHistoryItem::~QWKHistoryItem):
677         (QWKHistoryItem::title): The page title
678         (QWKHistoryItem::url): The URL of the page.
679         (QWKHistoryItem::originalUrl): The URL used to access the page.
680         * UIProcess/API/qt/qwkhistory.h:
681         * UIProcess/API/qt/qwkhistory_p.h:
682         * WebKit2.pro: Added WKBackForwardListItem.h and WKBackForwardListItem.cpp
683
684 2010-11-01  Anders Carlsson  <andersca@apple.com>
685
686         Reviewed by Oliver Hunt.
687
688         Make NPRemoteObjectMap a ref counted object
689         https://bugs.webkit.org/show_bug.cgi?id=48808
690
691         * PluginProcess/PluginControllerProxy.cpp:
692         (WebKit::PluginControllerProxy::windowScriptNPObject):
693         * PluginProcess/WebProcessConnection.cpp:
694         (WebKit::WebProcessConnection::WebProcessConnection):
695         (WebKit::WebProcessConnection::didReceiveSyncMessage):
696         * PluginProcess/WebProcessConnection.h:
697         (WebKit::WebProcessConnection::npRemoteObjectMap):
698         * Shared/Plugins/NPRemoteObjectMap.cpp:
699         (WebKit::NPRemoteObjectMap::create):
700         (WebKit::NPRemoteObjectMap::~NPRemoteObjectMap):
701         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
702         * Shared/Plugins/NPRemoteObjectMap.h:
703         * WebProcess/Plugins/PluginProcessConnection.cpp:
704         (WebKit::PluginProcessConnection::PluginProcessConnection):
705         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
706         * WebProcess/Plugins/PluginProcessConnection.h:
707         (WebKit::PluginProcessConnection::npRemoteObjectMap):
708         * WebProcess/Plugins/PluginProxy.cpp:
709         (WebKit::PluginProxy::getWindowScriptNPObject):
710
711 2010-11-01  Anders Carlsson  <andersca@apple.com>
712
713         Reviewed by John Sullivan.
714
715         Respond to NP_GetProperty by sending a GetProperty message
716         https://bugs.webkit.org/show_bug.cgi?id=48797
717
718         * Platform/CoreIPC/HandleMessage.h:
719         (CoreIPC::callMemberFunction):
720         Add new sync message overload.
721
722         * PluginProcess/WebProcessConnection.cpp:
723         (WebKit::WebProcessConnection::didReceiveSyncMessage):
724         If the message class is MessageClassNPObjectMessageReceiver, pass it to the NPRemoteObjectMap.
725
726         * Shared/Plugins/NPIdentifierData.cpp:
727         * Shared/Plugins/NPIdentifierData.h:
728         Add NPIdentifierData, a CoreIPC representation of an NPIdentifier.
729
730         * Shared/Plugins/NPObjectMessageReceiver.cpp:
731         (WebKit::NPObjectMessageReceiver::getProperty):
732         Add stub.
733
734         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
735         Add GetProperty.
736
737         * Shared/Plugins/NPObjectProxy.cpp:
738         (WebKit::NPObjectProxy::create):
739         (WebKit::NPObjectProxy::NPObjectProxy):
740         (WebKit::NPObjectProxy::initialize):
741         NPObjectProxy now takes an NPRemoteObjectMap in its create function.
742
743         (WebKit::NPObjectProxy::getProperty):
744         Send a GetProperty message.
745
746         (WebKit::NPObjectProxy::NP_GetProperty):
747         Call getProperty.
748
749         * Shared/Plugins/NPRemoteObjectMap.cpp:
750         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
751         Pass the NPRemoteObjectMap.
752
753         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
754         Find the right message receiver and dispatch the message to it.
755
756         * Shared/Plugins/NPVariantData.cpp:
757         * Shared/Plugins/NPVariantData.h:
758         Add NPVariantData, which will be a CoreIPC representation of an NPVariant.
759         
760         * WebKit2.xcodeproj/project.pbxproj:
761         Add new files.
762
763         * WebProcess/Plugins/PluginProcessConnection.cpp:
764         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
765         If the message class is MessageClassNPObjectMessageReceiver, pass it to the NPRemoteObjectMap.
766
767 2010-11-01  Anders Carlsson  <andersca@apple.com>
768
769         Reviewed by Sam Weinig.
770
771         Add ArgumentCoder specialization for WTF::CString
772         https://bugs.webkit.org/show_bug.cgi?id=48796
773
774         * Platform/CoreIPC/ArgumentCoders.h:
775
776 2010-11-01  Anders Carlsson  <andersca@apple.com>
777
778         Fix build.
779
780         * WebKit2.xcodeproj/project.pbxproj:
781
782 2010-11-01  Anders Carlsson  <andersca@apple.com>
783
784         Reviewed by Adam Roben.
785
786         Add NPObjectMessageReceiver.messages.in
787         https://bugs.webkit.org/show_bug.cgi?id=48782
788
789         * DerivedSources.make:
790         Add NPObjectMessageReceiver.
791
792         * Platform/CoreIPC/MessageID.h:
793         Add MessageClassNPObjectMessageReceiver message class.
794
795         * Shared/Plugins/NPObjectMessageReceiver.cpp:
796         (WebKit::NPObjectMessageReceiver::deallocate):
797         Add stubbed out deallocate member function.
798
799         * Shared/Plugins/NPObjectMessageReceiver.messages.in: Added.
800
801         * WebKit2.xcodeproj/project.pbxproj:
802         Add NPObjectMessageReceiver.messages.in.
803
804 2010-11-01  Anders Carlsson  <andersca@apple.com>
805
806         Reviewed by Adam Roben.
807
808         Start stubbing out NPClass functions in NPObjectProxy
809         https://bugs.webkit.org/show_bug.cgi?id=48778
810
811         * PluginProcess/PluginControllerProxy.cpp:
812         (WebKit::PluginControllerProxy::windowScriptNPObject):
813         getOrCreateNPObjectProxy is now createNPObjectProxy.
814
815         * Shared/Plugins/NPObjectProxy.cpp:
816         (WebKit::NPObjectProxy::create):
817         Allocate and initialize an NPObjectProxy object.
818
819         (WebKit::NPObjectProxy::NPObjectProxy):
820         Initialize m_npObjectID to 0.
821
822         (WebKit::NPObjectProxy::isNPObjectProxy):
823         Check the class.
824
825         (WebKit::NPObjectProxy::initialize):
826         Set m_npObjectID.
827
828         (WebKit::NPObjectProxy::npClass):
829         Return the NPClass with all functions filled in.
830
831         (WebKit::NPObjectProxy::NP_Allocate):
832         Create a new NPObjectProxy object.
833
834         (WebKit::NPObjectProxy::NP_Deallocate):
835         Deallocate the NPObjectProxy object.
836
837         (WebKit::NPObjectProxy::NP_HasMethod):
838         (WebKit::NPObjectProxy::NP_Invoke):
839         (WebKit::NPObjectProxy::NP_InvokeDefault):
840         (WebKit::NPObjectProxy::NP_HasProperty):
841         (WebKit::NPObjectProxy::NP_GetProperty):
842         (WebKit::NPObjectProxy::NP_SetProperty):
843         (WebKit::NPObjectProxy::NP_RemoveProperty):
844         (WebKit::NPObjectProxy::NP_Enumerate):
845         (WebKit::NPObjectProxy::NP_Construct):
846         Add stubs.
847
848         * Shared/Plugins/NPRemoteObjectMap.cpp:
849         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
850         * Shared/Plugins/NPRemoteObjectMap.h:
851         Rename getOrCreateNPObjectProxy to createNPObjectProxy.
852
853         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
854         (WebKit::NPJSObject::NP_Allocate):
855         Remove unused parameter.
856
857 2010-11-01  Anders Carlsson  <andersca@apple.com>
858
859         Reviewed by Adam Roben.
860
861         Both the WebProcessConnection and PluginProcessConnection should have NPRemoteObjectMaps
862         https://bugs.webkit.org/show_bug.cgi?id=48775
863
864         * PluginProcess/PluginControllerProxy.cpp:
865         (WebKit::PluginControllerProxy::windowScriptNPObject):
866         Ask for an NPObjectProxy for the window script NPObject.
867
868         * PluginProcess/WebProcessConnection.cpp:
869         (WebKit::WebProcessConnection::WebProcessConnection):
870         Initialize m_npRemoteObjectMap.
871
872         * Shared/Plugins/NPObjectMessageReceiver.cpp:
873         (WebKit::NPObjectMessageReceiver::create):
874         Add a create member function that takes an NPObject.
875
876         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
877         Retain the NPObject.
878
879         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
880         Release the NPObject.
881
882         * Shared/Plugins/NPRemoteObjectMap.cpp:
883         (WebKit::generateNPObjectID):
884         Generate a unique 64-bit NPObject ID.
885
886         (WebKit::NPRemoteObjectMap::getOrCreateNPObjectProxy):
887         Add stub.
888
889         (WebKit::NPRemoteObjectMap::registerNPObject):
890         Create a NPObjectMessageReceiver and add it to the map.
891
892         * WebKit2.xcodeproj/project.pbxproj:
893         Set the correct target for NPRuntime related files.
894
895         * WebProcess/Plugins/PluginProcessConnection.cpp:
896         (WebKit::PluginProcessConnection::PluginProcessConnection):
897         Initialize m_npRemoteObjectMap
898
899         * WebProcess/Plugins/PluginProxy.cpp:
900         (WebKit::PluginProxy::getWindowScriptNPObject):
901         Ask the real plug-in controller for the window script NPObject and register it.
902
903 2010-11-01  John Sullivan  <sullivan@apple.com>
904
905         Reviewed by Anders Carlsson.
906
907         https://bugs.webkit.org/show_bug.cgi?id=48774
908         minimFontSize preference needs to be exposed in WebKit2
909
910         * UIProcess/WebPreferences.cpp:
911         (WebKit::WebPreferences::setMinimumFontSize):
912         New function, parallel to existing functions for other preferences.
913         (WebKit::WebPreferences::minimumFontSize):
914         Ditto.
915
916         * UIProcess/WebPreferences.h:
917         Declared new function.
918
919         * UIProcess/API/C/WKPreferences.cpp:
920         (WKPreferencesSetMinimumFontSize):
921         New UI process wrapper for new function.
922         (WKPreferencesGetMinimumFontSize):
923         Ditto.
924
925         * UIProcess/API/C/WKPreferences.h:
926         Declared new functions.
927
928 2010-11-01  Anders Carlsson  <andersca@apple.com>
929
930         Reviewed by John Sullivan.
931
932         Tear down the related WebProcessProxy when a WebContext is deallocated
933         https://bugs.webkit.org/show_bug.cgi?id=48769
934
935         * UIProcess/WebContext.cpp:
936         (WebKit::WebContext::~WebContext):
937         Call WebProcessManager::contextWasDestroyed.
938
939         (WebKit::WebContext::didNavigateWithNavigationData):
940         (WebKit::WebContext::didPerformClientRedirect):
941         (WebKit::WebContext::didPerformServerRedirect):
942         (WebKit::WebContext::didUpdateHistoryTitle):
943         It is valid for a frame to have a null page here, if the frame has outlived
944         its page.
945
946         * UIProcess/WebProcessManager.cpp:
947         (WebKit::WebProcessManager::contextWasDestroyed):
948         Remove the context from the map.
949
950         * UIProcess/WebProcessProxy.cpp:
951         (WebKit::WebProcessProxy::~WebProcessProxy):
952         It's OK for the connection to be non-null here if the process goes away because
953         the context has been deallocated.
954
955 2010-11-01  Brady Eidson  <beidson@apple.com>
956
957         Windows build fix.
958
959         * UIProcess/win/WebView.cpp:
960
961 2010-11-01  Brady Eidson  <beidson@apple.com>
962
963         Reviewed by Anders Carlsson.
964
965         <rdar://problem/7660547> and https://bugs.webkit.org/show_bug.cgi?id=48699
966         Context menu support for WebKit 2.
967
968         * WebKit2.pro:
969         * WebKit2.xcodeproj/project.pbxproj:
970         * win/WebKit2.vcproj:
971
972         * Shared/WebContextMenuItem.cpp: Added.
973         (WebKit::WebContextMenuItem::WebContextMenuItem):
974         (WebKit::WebContextMenuItem::encode):
975         (WebKit::WebContextMenuItem::decode):
976         (WebKit::kitItems):
977         * Shared/WebContextMenuItem.h: Added.
978
979         * UIProcess/API/mac/PageClientImpl.h:
980         * UIProcess/API/mac/PageClientImpl.mm:
981         (WebKit::PageClientImpl::createContextMenuProxy):
982         * UIProcess/API/qt/qwkpage.cpp:
983         (QWKPagePrivate::createContextMenuProxy): Stub to keep the build working.
984         * UIProcess/API/qt/qwkpage_p.h:
985         * UIProcess/PageClient.h:
986
987         * UIProcess/WebContextMenuProxy.cpp: Added.
988         (WebKit::WebContextMenuProxy::~WebContextMenuProxy):
989         (WebKit::WebContextMenuProxy::WebContextMenuProxy):
990         * UIProcess/WebContextMenuProxy.h: Added.
991
992         * UIProcess/WebPageProxy.cpp:
993         (WebKit::WebPageProxy::showContextMenu): Shows the menu after receiving the message from the WebProcess.
994         (WebKit::WebPageProxy::contextMenuItemSelected): Sends info about the selected menu item to the WebProcess
995         * UIProcess/WebPageProxy.h:
996         * UIProcess/WebPageProxy.messages.in:
997
998         * UIProcess/mac/WebContextMenuProxyMac.h: Added.
999         (WebKit::WebContextMenuProxyMac::create):
1000         * UIProcess/mac/WebContextMenuProxyMac.mm: Added.
1001         (+[WebMenuTarget sharedMenuTarget]):
1002         (-[WebMenuTarget WebKit::]):
1003         (-[WebMenuTarget setMenuProxy:WebKit::]):
1004         (-[WebMenuTarget forwardContextMenuAction:]):
1005         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
1006         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
1007         (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
1008         (WebKit::populateNSMenu):
1009         (WebKit::nsMenuItemVector):
1010         (WebKit::WebContextMenuProxyMac::populate):
1011         (WebKit::WebContextMenuProxyMac::showContextMenu):
1012         (WebKit::WebContextMenuProxyMac::hideContextMenu):
1013
1014         * UIProcess/win/WebView.cpp:
1015         (WebKit::WebView::createContextMenuProxy): Stub for now.
1016         * UIProcess/win/WebView.h:
1017
1018         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1019         (WebKit::WebChromeClient::showContextMenu):
1020         * WebProcess/WebCoreSupport/WebChromeClient.h:
1021
1022         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1023         (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Return the WebCore-provided default
1024           menu for now. Embedding app customization will come later (see bug 48720)
1025
1026         * WebProcess/WebPage/WebContextMenu.cpp: Added.
1027         (WebKit::WebContextMenu::WebContextMenu):
1028         (WebKit::WebContextMenu::~WebContextMenu):
1029         (WebKit::WebContextMenu::show):
1030         (WebKit::WebContextMenu::itemSelected):
1031         * WebProcess/WebPage/WebContextMenu.h: Added.
1032         (WebKit::WebContextMenu::create):
1033
1034         * WebProcess/WebPage/WebPage.cpp:
1035         (WebKit::WebPage::contextMenu):
1036         (WebKit::handleMouseEvent): Pass right mouse presses along to WebCore as both a mouse event and context menu event, 
1037           the same way WebKit1 does.
1038         (WebKit::WebPage::didSelectItemFromActiveContextMenu):
1039         * WebProcess/WebPage/WebPage.h:
1040         * WebProcess/WebPage/WebPage.messages.in:
1041
1042 2010-11-01  Adam Roben  <aroben@apple.com>
1043
1044         Cancel main resource loads after we hand them off to the media engine
1045
1046         This is the WebKit2 equivalent of r51104. Clearly this code should be
1047         moved to a cross-platform location someday.
1048
1049         Fixes <http://webkit.org/b/48561> <rdar://problem/8606679> Assertion
1050         failure in DocumentLoader::commitData when loading a media document in
1051         WebKit2
1052
1053         Reviewed by Eric Carlson.
1054
1055         * WebProcess/WebCoreSupport/WebErrors.h: Added pluginWillHandleLoadError.
1056
1057         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1058         (WebFrameLoaderClient::committedLoad): Cancel the main resource load
1059         after handing off the load to the media engine. This code originally
1060         came from -[WebHTMLRepresentation receivedData:withDataSource:].
1061         (WebKit::WebFrameLoaderClient::pluginWillHandleLoadError): Call through to WebErrors.
1062         (WebKit::WebFrameLoaderClient::shouldFallBack): Implemented. We fall
1063         back for all errors except when the load was cancelled or we handed it
1064         off to the media engine or a plugin.
1065
1066         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1067         (WebKit::pluginWillHandleLoadError): Implemented.
1068
1069         * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
1070         (WebKit::pluginWillHandleLoadError): Stubbed out.
1071
1072         * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
1073         (WebKit::pluginWillHandleLoadError): Implemented.
1074
1075 2010-11-01  Andreas Kling  <kling@webkit.org>
1076
1077         Reviewed by Kenneth Rohde Christiansen.
1078
1079         [Qt][WK2] Cleanup viewportAttributesForSize API
1080
1081         Change QSize argument to a const QSize&.
1082
1083         * UIProcess/API/qt/qwkpage.cpp:
1084         (QWKPage::viewportAttributesForSize):
1085         * UIProcess/API/qt/qwkpage.h:
1086
1087 2010-10-31  Darin Adler  <darin@apple.com>
1088
1089         Reviewed by Dan Bernstein.
1090
1091         Visited links not populated correctly in new web processes after the first
1092         https://bugs.webkit.org/show_bug.cgi?id=48735
1093         rdar://problem/8442177
1094
1095         * UIProcess/VisitedLinkProvider.cpp:
1096         (WebKit::VisitedLinkProvider::VisitedLinkProvider): Initialize
1097         m_webProcessHasVisitedLinkState.
1098         (WebKit::VisitedLinkProvider::processDidFinishLaunching): Renamed
1099         from populateVisitedLinksIfNeeded. Set m_webProcessHasVisitedLinkState
1100         to false, since this is a new process, and also start the timer
1101         so the visited links messages will be sent.
1102         (WebKit::VisitedLinkProvider::processDidClose): Renamed from
1103         stopVisitedLinksTimer.
1104         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
1105         Added logic so we send SetVisitedLinkTable and
1106         AllVisitedLinkStateChanged once to each new process and to set
1107         m_webProcessHasVisitedLinkState to true once that is done.
1108
1109         * UIProcess/VisitedLinkProvider.h: Updated for above changes.
1110
1111         * UIProcess/WebContext.cpp:
1112         (WebKit::WebContext::processDidFinishLaunching): Called
1113         VisitedLinkProvider function under its new name. Also used
1114         ASSERT_UNUSED rather than ASSERT since the argument is used
1115         only for the assertion.
1116         (WebKit::WebContext::processDidClose): Ditto.
1117
1118 2010-10-30  Andreas Kling  <kling@webkit.org>
1119
1120         Reviewed by Kenneth Rohde Christiansen.
1121
1122         [Qt][WK2] Crash in drawUpdateChunkIntoBackingStore
1123         https://bugs.webkit.org/show_bug.cgi?id=48707
1124
1125         UpdateChunk images have to be created using the QImage constructor
1126         that takes a bytesPerLine (stride) value, or the data length won't
1127         match UpdateChunk::size().
1128
1129         * Shared/qt/UpdateChunk.cpp:
1130         (WebKit::UpdateChunk::createImage):
1131
1132 2010-10-29  Daniel Bates  <dbates@rim.com>
1133
1134         No review, rolling out 70971.
1135         http://trac.webkit.org/changeset/70971
1136         https://bugs.webkit.org/show_bug.cgi?id=6751
1137
1138         Rolling out changeset 70971 <http://trac.webkit.org/changeset/70971> since
1139         it caused layout test failures on all bots. In particular, the
1140         child count in a generated frame name differs after this patch. We need
1141         to look into this further.
1142
1143         * WebProcess/WebPage/WebFrame.cpp:
1144         (WebKit::WebFrame::name):
1145
1146 2010-10-29  Daniel Bates  <dbates@rim.com>
1147
1148         Reviewed by Adam Barth.
1149
1150         For unnamed frames, window.name returns a generated name
1151         https://bugs.webkit.org/show_bug.cgi?id=6751
1152
1153         Modified WebKit2 to use FrameTree::uniqueName().
1154
1155         * WebProcess/WebPage/WebFrame.cpp:
1156         (WebKit::WebFrame::name):
1157
1158 2010-10-29  Sam Weinig  <weinig@apple.com>
1159
1160         Reviewed by Simon Fraser.
1161
1162         Implement WebProcess::platformSetCacheModel for windows
1163         <rdar://problem/8605796>
1164         https://bugs.webkit.org/show_bug.cgi?id=48703
1165
1166         * WebProcess/win/WebProcessWin.cpp:
1167         (WebKit::memorySize):
1168         (WebKit::volumeFreeSize):
1169         (WebKit::WebProcess::platformSetCacheModel):
1170         Add implemenation based on the version in WebKit/win/WebView.cpp.
1171
1172 2010-10-29  Andreas Kling  <kling@webkit.org>
1173
1174         Reviewed by Anders Carlsson.
1175
1176         WK2: Unbreak compilation of WebPlatformTouchPoint::decode()
1177
1178         * Shared/WebPlatformTouchPoint.cpp:
1179         (WebKit::WebPlatformTouchPoint::decode):
1180
1181 2010-10-29  Darin Adler  <darin@apple.com>
1182
1183         Reviewed by Sam Weinig.
1184
1185         More back/forward refactoring
1186
1187         * WebKit2.pro: Removed WebBackForwardControllerClient.cpp and .h.
1188         * WebKit2.xcodeproj/project.pbxproj: Ditto.
1189
1190         * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp: Removed.
1191         * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h: Removed.
1192
1193         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
1194         (WebKit::InjectedBundleBackForwardList::itemAtIndex): Use backForward.
1195         (WebKit::InjectedBundleBackForwardList::backListCount): Ditto.
1196         (WebKit::InjectedBundleBackForwardList::forwardListCount): Ditto.
1197         (WebKit::InjectedBundleBackForwardList::clear): Ditto.
1198
1199         * WebProcess/WebPage/WebBackForwardListProxy.h: Added newly-needed include.
1200
1201         * WebProcess/WebPage/WebPage.cpp:
1202         (WebKit::WebPage::WebPage): Set up backForwardClient.
1203
1204 2010-10-29  Adam Roben  <aroben@apple.com>
1205
1206         Stop using encode/decodeBytes for WebEvent subclasses
1207
1208         The use of encode/decodeBytes was making these classes sensitive to
1209         differences in padding on different architectures (e.g., 32-bit vs.
1210         64-bit). By encoding each data member explicitly we remove this
1211         sensitivity, allowing these classes to be passed between processes
1212         with different padding.
1213
1214         Fixes <http://webkit.org/b/48552> <rdar://problem/8606571> Mouse
1215         events never reach Flash in WebKit2 on Mac (asserts in Debug builds)
1216
1217         Reviewed by Anders Carlsson.
1218
1219         * Platform/CoreIPC/Arguments.h:
1220         (CoreIPC::Arguments8::Arguments8):
1221         (CoreIPC::Arguments8::encode):
1222         (CoreIPC::Arguments8::decode):
1223         (CoreIPC::In):
1224         (CoreIPC::Out):
1225         Added Arguments8, the biggest Arguments yet.
1226
1227         * Shared/WebEvent.cpp:
1228         (WebKit::WebEvent::encode):
1229         (WebKit::WebEvent::decode):
1230         * Shared/WebKeyboardEvent.cpp:
1231         (WebKit::WebKeyboardEvent::encode):
1232         (WebKit::WebKeyboardEvent::decode):
1233         * Shared/WebMouseEvent.cpp:
1234         (WebKit::WebMouseEvent::encode):
1235         (WebKit::WebMouseEvent::decode):
1236         * Shared/WebPlatformTouchPoint.cpp:
1237         (WebKit::WebPlatformTouchPoint::encode):
1238         (WebKit::WebPlatformTouchPoint::decode):
1239         * Shared/WebTouchEvent.cpp:
1240         (WebKit::WebTouchEvent::encode):
1241         (WebKit::WebTouchEvent::decode):
1242         * Shared/WebWheelEvent.cpp:
1243         (WebKit::WebWheelEvent::encode):
1244         (WebKit::WebWheelEvent::decode):
1245         Changed all encode/decode function to use CoreIPC::In/Out to
1246         encode/decode data members individually.
1247
1248 2010-10-29  Adam Roben  <aroben@apple.com>
1249
1250         Use only CoreIPC-sanctioned types in WebEvent subclasses
1251
1252         Fixes <http://webkit.org//48694> WebEvent subclasses should not use
1253         architecture-dependent types
1254
1255         Reviewed by Anders Carlsson.
1256
1257         * Shared/WebEvent.h:
1258         (WebKit::WebEvent::type):
1259         (WebKit::WebMouseEvent::button):
1260         (WebKit::WebMouseEvent::clickCount):
1261         (WebKit::WebWheelEvent::granularity):
1262         (WebKit::WebPlatformTouchPoint::id):
1263         (WebKit::WebPlatformTouchPoint::state):
1264         Replaced enums, ints, and unsigneds with uint32_ts, int32_ts, and
1265         uint32_ts, respectively.
1266
1267 2010-10-29  Anders Carlsson  <andersca@apple.com>
1268
1269         Reviewed by Adam Roben.
1270
1271         Generate a DelayedReply struct for sync messages marked delayed
1272         https://bugs.webkit.org/show_bug.cgi?id=48696
1273
1274         * Scripts/webkit2/messages.py:
1275         If we encounter a sync message marked delayed, generate a DelayedReply struct with a send member funciton
1276         that can be used for sending the reply.
1277
1278         * Scripts/webkit2/messages_unittest.py:
1279         Update expected results.
1280
1281 2010-10-29  Anders Carlsson  <andersca@apple.com>
1282
1283         Reviewed by Adam Roben.
1284
1285         Use WebPage::send in a couple of more places.
1286
1287         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1288         (WebKit::WebChromeClient::setWindowRect):
1289         (WebKit::WebChromeClient::takeFocus):
1290         (WebKit::WebChromeClient::setToolbarsVisible):
1291         (WebKit::WebChromeClient::setStatusbarVisible):
1292         (WebKit::WebChromeClient::setMenubarVisible):
1293         (WebKit::WebChromeClient::setResizable):
1294         (WebKit::WebChromeClient::setStatusbarText):
1295         (WebKit::WebChromeClient::contentsSizeChanged):
1296         (WebKit::WebChromeClient::mouseDidMoveOverElement):
1297         (WebKit::WebChromeClient::setToolTip):
1298         (WebKit::WebChromeClient::setCursor):
1299         (WebKit::WebChromeClient::dispatchViewportDataDidChange):
1300         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1301         (WebKit::WebEditorClient::registerCommandForUndo):
1302         (WebKit::WebEditorClient::clearUndoRedoOperations):
1303         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1304         (WebKit::WebFrameLoaderClient::detachedFromParent2):
1305         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
1306         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
1307         (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
1308         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1309         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
1310         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
1311         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
1312         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
1313         (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
1314         (WebKit::WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
1315         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
1316         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1317         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1318         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
1319         (WebKit::WebFrameLoaderClient::postProgressStartedNotification):
1320         (WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
1321         (WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
1322         (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
1323         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
1324         (WebKit::WebFrameLoaderClient::dispatchDidBecomeFrameset):
1325         * WebProcess/WebPage/FindController.cpp:
1326         (WebKit::FindController::findString):
1327         (WebKit::FindController::hideFindIndicator):
1328         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1329         (WebKit::WebBackForwardListProxy::addItem):
1330         (WebKit::WebBackForwardListProxy::goToItem):
1331         (WebKit::WebBackForwardListProxy::clear):
1332         * WebProcess/WebPage/WebFrame.cpp:
1333         (WebKit::WebFrame::createMainFrame):
1334         (WebKit::WebFrame::createSubframe):
1335         * WebProcess/WebPage/WebPage.cpp:
1336         (WebKit::WebPage::sendClose):
1337         (WebKit::WebPage::pageDidScroll):
1338         (WebKit::WebPage::mouseEvent):
1339         (WebKit::WebPage::wheelEvent):
1340         (WebKit::WebPage::keyEvent):
1341         (WebKit::WebPage::validateMenuItem):
1342         (WebKit::WebPage::touchEvent):
1343         (WebKit::WebPage::show):
1344         (WebKit::WebPage::runJavaScriptInMainFrame):
1345         (WebKit::WebPage::getRenderTreeExternalRepresentation):
1346         (WebKit::WebPage::getSourceForFrame):
1347
1348 2010-10-29  Anders Carlsson  <andersca@apple.com>
1349
1350         Reviewed by Adam Roben.
1351
1352         Add a MessageSender class template
1353         https://bugs.webkit.org/show_bug.cgi?id=48683
1354
1355         * Platform/CoreIPC/MessageSender.h: Added.
1356         (CoreIPC::MessageSender::send):
1357         Add send overloads for simple message sending.
1358
1359         * WebKit2.pro:
1360         * WebKit2.xcodeproj/project.pbxproj:
1361         Add MessageSender.h
1362
1363         * WebProcess/WebPage/FindController.cpp:
1364         (WebKit::FindController::countStringMatches):
1365         (WebKit::FindController::findString):
1366         (WebKit::FindController::updateFindIndicator):
1367         Call send on the web page.
1368
1369         * WebProcess/WebPage/WebPage.cpp:
1370         (WebKit::WebPage::connection):
1371         Add connection(), used by the MessageSender.
1372         
1373         * WebProcess/WebPage/WebPage.h:
1374         (WebKit::WebPage::destinationID):
1375         Add destinationID(), used by the MessageSender.
1376
1377         * win/WebKit2.vcproj:
1378         Add MessageSender.h
1379
1380 2010-10-29  Adam Roben  <aroben@apple.com>
1381
1382         Remove redundant data members from WebTouchEvent
1383
1384         WebEvent already stores the Type and timestamp.
1385
1386         Fixes <http://webkit.org/b/48671> WebTouchEvent duplicates data from
1387         WebEvent
1388
1389         Reviewed by Anders Carlsson.
1390
1391         * Shared/WebEvent.h:
1392         * Shared/WebTouchEvent.cpp:
1393         (WebKit::WebTouchEvent::WebTouchEvent):
1394         Removed m_type and m_timestamp (which was never even getting
1395         initialized!).
1396
1397 2010-10-29  Anders Carlsson  <andersca@apple.com>
1398
1399         Reviewed by Adam Roben.
1400
1401         Add the plug-in proxy to the map before sending the CreatePlugin message
1402         https://bugs.webkit.org/show_bug.cgi?id=48678
1403
1404         * WebProcess/Plugins/PluginProxy.cpp:
1405         (WebKit::PluginProxy::initialize):
1406
1407 2010-10-29  Anders Carlsson  <andersca@apple.com>
1408
1409         Reviewed by Adam Roben.
1410
1411         Add GetWindowScriptNPObject message
1412         https://bugs.webkit.org/show_bug.cgi?id=48670
1413
1414         * PluginProcess/PluginControllerProxy.cpp:
1415         (WebKit::PluginControllerProxy::windowScriptNPObject):
1416         Send the GetWindowScriptNPObject message.
1417
1418         * WebProcess/Plugins/PluginProxy.cpp:
1419         (WebKit::PluginProxy::getWindowScriptNPObject):
1420         Add stub.
1421
1422         * WebProcess/Plugins/PluginProxy.messages.in:
1423         Add GetWindowScriptNPObject message.
1424
1425 2010-10-29  Anders Carlsson  <andersca@apple.com>
1426
1427         Reviewed by Dan Bernstein.
1428
1429         Change the Connection::sendSync timeout parameter to have the NoTimeout argument as a default
1430         argument and update all the call sites.
1431
1432         * Platform/CoreIPC/Connection.h:
1433         * PluginProcess/PluginControllerProxy.cpp:
1434         (WebKit::PluginControllerProxy::proxiesForURL):
1435         (WebKit::PluginControllerProxy::cookiesForURL):
1436         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1437         (WebKit::InjectedBundle::postSynchronousMessage):
1438         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1439         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1440         * WebProcess/Plugins/PluginProxy.cpp:
1441         (WebKit::PluginProxy::initialize):
1442         (WebKit::PluginProxy::destroy):
1443         (WebKit::PluginProxy::paint):
1444         (WebKit::PluginProxy::handleMouseEvent):
1445         (WebKit::PluginProxy::handleWheelEvent):
1446         (WebKit::PluginProxy::handleMouseEnterEvent):
1447         (WebKit::PluginProxy::handleMouseLeaveEvent):
1448         (WebKit::PluginProxy::handleKeyboardEvent):
1449         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1450         (WebKit::WebChromeClient::windowRect):
1451         (WebKit::WebChromeClient::createWindow):
1452         (WebKit::WebChromeClient::toolbarsVisible):
1453         (WebKit::WebChromeClient::statusbarVisible):
1454         (WebKit::WebChromeClient::menubarVisible):
1455         (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
1456         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1457         (WebKit::WebChromeClient::runJavaScriptAlert):
1458         (WebKit::WebChromeClient::runJavaScriptConfirm):
1459         (WebKit::WebChromeClient::runJavaScriptPrompt):
1460         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1461         (WebKit::WebPlatformStrategies::populatePluginCache):
1462         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1463         (WebKit::WebBackForwardListProxy::itemAtIndex):
1464         (WebKit::WebBackForwardListProxy::backListCount):
1465         (WebKit::WebBackForwardListProxy::forwardListCount):
1466         * WebProcess/WebPage/WebPage.cpp:
1467         (WebKit::WebPage::createPlugin):
1468         (WebKit::WebPage::changeAcceleratedCompositingMode):
1469         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1470         (WebKit::LayerBackedDrawingArea::attachCompositingContext):
1471         * WebProcess/WebPage/mac/WebPageMac.mm:
1472         (WebKit::WebPage::interceptEditingKeyboardEvent):
1473
1474 2010-10-29  John Sullivan  <sullivan@apple.com>
1475
1476         Reviewed by Anders Carlsson.
1477
1478         https://bugs.webkit.org/show_bug.cgi?id=48666
1479         WebKit2 should provide counterpart getter to WKBundleNodeHandleSetHTMLInputElementAutofilled
1480
1481         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1482         (WKBundleNodeHandleGetHTMLInputElementAutofilled):
1483         New function, calls through to InjectedBundleNodeHandle.
1484
1485         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1486         Declared new function.
1487
1488         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1489         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
1490         New function, calls through to HTMLInputElement.
1491
1492         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1493         Declared new function.
1494
1495 2010-10-29  Jessie Berlin  <jberlin@apple.com>
1496
1497         Reviewed by Anders Carlsson.
1498
1499         ASSERTION FAILURE in WebProcessProxy::frameDestroyed when a Page is closed before it can send
1500         the DidCreateMainFrame messsage to the UIProcess.
1501         https://bugs.webkit.org/show_bug.cgi?id=48654
1502
1503         WebProcessProxy::frameDestroyed was asserting that the frameID it was called with was
1504         registered in WebProcessProxy::frameCreated (which is called when the WebPageProxy is
1505         created). However, in the case where we close the page before it's had the chance to send
1506         the DidCreateMainFrame message back to the UI process, the UI Process will get the
1507         DidDestroyFrame message because it's sent directly to the WebProcessProxy and doesn't go
1508         through WebPageProxy.
1509
1510         Remove the assert because it is invalid in this case.
1511
1512         * UIProcess/WebProcessProxy.cpp:
1513         (WebKit::WebProcessProxy::frameDestroyed):
1514
1515 2010-10-29  Adam Roben  <aroben@apple.com>
1516
1517         Build fix when Carbon plugins are disabled
1518
1519         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1520         (WebKit::NetscapePlugin::platformHandleMouseEvent):
1521
1522 2010-10-29  Adam Roben  <aroben@apple.com>
1523
1524         Move NPRuntime-related files into WebProcess/Plugins/Netscape
1525
1526         Fixes <http://webkit.org/b/48645>.
1527
1528         Reviewed by Anders Carlsson.
1529
1530         * WebKit2.pro:
1531         * WebKit2.xcodeproj/project.pbxproj:
1532         * win/WebKit2.vcproj:
1533         Updated the files' paths.
1534
1535         * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Renamed from WebKit2/WebProcess/Plugins/JSNPMethod.cpp.
1536         * WebProcess/Plugins/Netscape/JSNPMethod.h: Renamed from WebKit2/WebProcess/Plugins/JSNPMethod.h.
1537         * WebProcess/Plugins/Netscape/JSNPObject.cpp: Renamed from WebKit2/WebProcess/Plugins/JSNPObject.cpp.
1538         * WebProcess/Plugins/Netscape/JSNPObject.h: Renamed from WebKit2/WebProcess/Plugins/JSNPObject.h.
1539         * WebProcess/Plugins/Netscape/NPJSObject.cpp: Renamed from WebKit2/WebProcess/Plugins/NPJSObject.cpp.
1540         * WebProcess/Plugins/Netscape/NPJSObject.h: Renamed from WebKit2/WebProcess/Plugins/NPJSObject.h.
1541         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.cpp.
1542         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.h.
1543         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeUtilities.cpp.
1544         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeUtilities.h.
1545
1546 2010-10-29  Alexey Proskuryakov  <ap@apple.com>
1547
1548         Reviewed by Darin Adler.
1549
1550         https://bugs.webkit.org/show_bug.cgi?id=48576
1551         Let WebKit2 client know when a frame is a frameset
1552
1553         * UIProcess/WebFrameProxy.cpp:
1554         (WebKit::WebFrameProxy::WebFrameProxy):
1555         * UIProcess/WebFrameProxy.h:
1556         (WebKit::WebFrameProxy::setIsFrameSet):
1557         (WebKit::WebFrameProxy::isFrameSet):
1558         Remember whether the frame is currently a frameset.
1559
1560         * UIProcess/API/C/WKFrame.cpp: (WKFrameIsFrameSet):
1561         * UIProcess/API/C/WKFrame.h:
1562         Added client API.
1563
1564         * UIProcess/WebPageProxy.cpp:
1565         (WebKit::WebPageProxy::didCommitLoadForFrame):
1566         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
1567         * UIProcess/WebPageProxy.h:
1568         * UIProcess/WebPageProxy.messages.in:
1569         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1570         (WebKit::WebFrameLoaderClient::dispatchDidBecomeFrameset):
1571         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1572         Pass notification from web process to UI process.
1573
1574 2010-10-28  Adam Roben  <aroben@apple.com>
1575
1576         Use IntPoint/FloatSize in WebEvent subclasses
1577
1578         This is nicer than passing around pairs of ints/floats.
1579
1580         Fixes <http://webkit.org/b/48611>.
1581
1582         Reviewed by Anders Carlsson.
1583
1584         * Shared/WebEvent.h:
1585         * Shared/WebMouseEvent.cpp:
1586         * Shared/WebPlatformTouchPoint.cpp:
1587         * Shared/WebWheelEvent.cpp:
1588         Changed all x/y pairs to either use IntPoint or FloatSize, as
1589         appropriate.
1590
1591         * Shared/WebEventConversion.cpp:
1592         * Shared/mac/WebEventFactory.mm:
1593         * Shared/qt/WebEventFactoryQt.cpp:
1594         * Shared/win/WebEventFactory.cpp:
1595         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1596         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1597         Updated for WebEvent changes.
1598
1599 2010-10-29  Adam Roben  <aroben@apple.com>
1600
1601         Touch WebKit2Prefix.h to fix incremental builds on Windows
1602
1603         * WebKit2Prefix.h:
1604
1605 2010-10-28  Adam Roben  <aroben@apple.com>
1606
1607         Remove unnecessary #includes from WebEvent.h
1608
1609         Fixes <http://webkit.org/b/48609> WebEvent.h #includes things it
1610         doesn't need
1611
1612         Reviewed by Sam Weinig.
1613
1614         * Scripts/webkit2/messages.py:
1615         (MessageReceiver.iterparameters): Merged iterreplyparameters into this
1616         function. All callers to iterparameters are really interested in the
1617         reply parameters, too. This will cause us to, e.g., add
1618         forward-declarations for types used in sync replies.
1619         (headers_for_type): Added a special case for WebCore::KeypressCommand.
1620
1621         * Scripts/webkit2/messages_unittest.py: Added a test to cover the
1622         failing case that inspired the above changes.
1623
1624         * Shared/WebEvent.h: Replaced #includes with forward-declarations.
1625
1626         * Shared/API/c/WKSharedAPICast.h:
1627         * Shared/NativeWebKeyboardEvent.h:
1628         * Shared/WebEvent.cpp:
1629         * Shared/WebKeyboardEvent.cpp:
1630         * Shared/WebMouseEvent.cpp:
1631         * Shared/WebPlatformTouchPoint.cpp:
1632         * Shared/WebTouchEvent.cpp:
1633         * Shared/WebWheelEvent.cpp:
1634         * Shared/qt/WebEventFactoryQt.cpp:
1635         * Shared/win/WebEventFactory.cpp:
1636         * UIProcess/API/qt/qwkpage.cpp:
1637         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1638         * UIProcess/WebUIClient.cpp:
1639         * UIProcess/WebUIClient.h:
1640         * UIProcess/win/WebView.cpp:
1641         * WebProcess/WebPage/FindController.cpp:
1642         * WebProcess/WebPage/mac/WebPageMac.mm:
1643         Added now-needed #includes and declarations.
1644
1645 2010-10-29  Csaba Osztrogonác  <ossy@webkit.org>
1646
1647         Reviewed by Adam Roben and David Kilzer.
1648
1649         Fix and cleanup of build systems
1650         https://bugs.webkit.org/show_bug.cgi?id=48342
1651
1652         * Configurations/FeatureDefines.xcconfig: Remove unnecessary ENABLE_SANDBOX and add missing features.
1653
1654 2010-10-28  Dan Bernstein  <mitz@apple.com>
1655
1656         LLVM compiler build fix
1657
1658         * WebProcess/Downloads/mac/DownloadMac.mm:
1659         (-[WKDownloadAsDelegate download:didReceiveResponse:]): Removed a stray semicolon.
1660
1661 2010-10-28  Adam Roben  <aroben@apple.com>
1662
1663         Move some function definitions from WebEvent.h into new .cpp files
1664
1665         Someday maybe we'll split the classes into their own header files,
1666         too.
1667
1668         Fixes <http://webkit.org/b/48604>.
1669
1670         Reviewed by Anders Carlsson.
1671
1672         * Shared/WebEvent.h: Moved code from here...
1673
1674         * Shared/WebEvent.cpp: Added.
1675         * Shared/WebKeyboardEvent.cpp: Added.
1676         * Shared/WebMouseEvent.cpp: Added.
1677         * Shared/WebPlatformTouchPoint.cpp: Added.
1678         * Shared/WebTouchEvent.cpp: Added.
1679         * Shared/WebWheelEvent.cpp: Added.
1680         ...to here. Also changed WebTouchEvent::touchPoints not to copy the
1681         Vector.
1682
1683         * WebKit2.pro:
1684         * WebKit2.xcodeproj/project.pbxproj:
1685         * win/WebKit2.vcproj:
1686         Added the new files.
1687
1688 2010-10-28  Anders Carlsson  <andersca@apple.com>
1689
1690         Reviewed by Adam Roben.
1691
1692         Connection::sendSyncMessage needs to dispatch incoming sync messages
1693         https://bugs.webkit.org/show_bug.cgi?id=48606
1694
1695         * Platform/CoreIPC/Connection.cpp:
1696         (CoreIPC::Connection::sendSyncMessage):
1697         Protect the connection when waiting for a reply. Schedule for any remaining incoming sync messages
1698         to be sent once the bottom-most waitForSyncReply calls returns.
1699
1700         (CoreIPC::Connection::waitForSyncReply):
1701         Make sure to dispatch any incoming sync messages.
1702
1703         (CoreIPC::Connection::processIncomingMessage):
1704         If the incoming message is a sync message and we're waiting for a sync reply, add the message to the
1705         queue of "sync messages received while waiting for sync reply" and wake up the client thread.
1706
1707         * Platform/CoreIPC/Connection.h:
1708
1709 2010-10-28  Anders Carlsson  <andersca@apple.com>
1710
1711         Reviewed by Adam Roben.
1712
1713         Move code to dispatch a sync message out into a separate function
1714         https://bugs.webkit.org/show_bug.cgi?id=48605
1715
1716         * Platform/CoreIPC/Connection.cpp:
1717         (CoreIPC::Connection::dispatchSyncMessage):
1718         Factor code out from dispatchMessage. Handle receiving a message with an invalid reply ID.
1719
1720         (CoreIPC::Connection::dispatchMessages):
1721         Call dispatchSyncMessage.
1722
1723         * Platform/CoreIPC/Connection.h:
1724
1725 2010-10-28  Anders Carlsson  <andersca@apple.com>
1726
1727         Reviewed by Darin Adler.
1728
1729         Add NPObjectMessageReceiver class.
1730         https://bugs.webkit.org/show_bug.cgi?id=48599
1731
1732         * Shared/Plugins/NPObjectMessageReceiver.cpp: Added.
1733         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
1734         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
1735         * Shared/Plugins/NPObjectMessageReceiver.h: Added.
1736         * WebKit2.xcodeproj/project.pbxproj:
1737
1738 2010-10-28  Anders Carlsson  <andersca@apple.com>
1739
1740         Reviewed by Sam Weinig.
1741
1742         Add NPObjectProxy class
1743         https://bugs.webkit.org/show_bug.cgi?id=48558
1744
1745         * Shared/Plugins/NPObjectProxy.cpp: Added.
1746         (WebKit::NPObjectProxy::NPObjectProxy):
1747         (WebKit::NPObjectProxy::~NPObjectProxy):
1748         * Shared/Plugins/NPObjectProxy.h: Added.
1749         * WebKit2.xcodeproj/project.pbxproj:
1750
1751 2010-10-28  Anders Carlsson  <andersca@apple.com>
1752
1753         Reviewed by Sam Weinig.
1754
1755         Add NPRemoteObjectMap class
1756         https://bugs.webkit.org/show_bug.cgi?id=48553
1757
1758         * Shared/Plugins/NPRemoteObjectMap.cpp: Added.
1759         (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
1760         * Shared/Plugins/NPRemoteObjectMap.h: Added.
1761         * WebKit2.xcodeproj/project.pbxproj:
1762
1763 2010-10-28  Sam Weinig  <sam@webkit.org>
1764
1765         Reviewed by Anders Carlsson.
1766
1767         WKURLRefs should be allowed to be null
1768         <rdar://problem/8575621>
1769         https://bugs.webkit.org/show_bug.cgi?id=48535
1770
1771         * Shared/API/c/WKSharedAPICast.h:
1772         (WebKit::toURLRef):
1773         (WebKit::toCopiedURLAPI):
1774         Turn a null WTF::String into a null WKURLRef.
1775
1776 2010-10-28  Sam Weinig  <sam@webkit.org>
1777
1778         Reviewed by Anders Carlsson.
1779
1780         Add WebKit2 API for window feature getter/setters
1781         <rdar://problem/8590373>
1782         https://bugs.webkit.org/show_bug.cgi?id=48496
1783
1784         * UIProcess/API/C/WKPage.h:
1785         * UIProcess/WebPageProxy.cpp:
1786         (WebKit::WebPageProxy::setToolbarsAreVisible):
1787         (WebKit::WebPageProxy::getToolbarsAreVisible):
1788         (WebKit::WebPageProxy::setMenuBarIsVisible):
1789         (WebKit::WebPageProxy::getMenuBarIsVisible):
1790         (WebKit::WebPageProxy::setStatusBarIsVisible):
1791         (WebKit::WebPageProxy::getStatusBarIsVisible):
1792         (WebKit::WebPageProxy::setIsResizable):
1793         (WebKit::WebPageProxy::getIsResizable):
1794         * UIProcess/WebPageProxy.h:
1795         * UIProcess/WebPageProxy.messages.in:
1796         * UIProcess/WebUIClient.cpp:
1797         (WebKit::WebUIClient::toolbarsAreVisible):
1798         (WebKit::WebUIClient::setToolbarsAreVisible):
1799         (WebKit::WebUIClient::menuBarIsVisible):
1800         (WebKit::WebUIClient::setMenuBarIsVisible):
1801         (WebKit::WebUIClient::statusBarIsVisible):
1802         (WebKit::WebUIClient::setStatusBarIsVisible):
1803         (WebKit::WebUIClient::isResizable):
1804         (WebKit::WebUIClient::setIsResizable):
1805         * UIProcess/WebUIClient.h:
1806         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1807         (WebKit::WebChromeClient::setToolbarsVisible):
1808         (WebKit::WebChromeClient::toolbarsVisible):
1809         (WebKit::WebChromeClient::setStatusbarVisible):
1810         (WebKit::WebChromeClient::statusbarVisible):
1811         (WebKit::WebChromeClient::setMenubarVisible):
1812         (WebKit::WebChromeClient::menubarVisible):
1813         (WebKit::WebChromeClient::setResizable):
1814         Plumb through the calls.
1815
1816 2010-10-28  Dan Bernstein  <mitz@apple.com>
1817
1818         Build fix.
1819
1820         * win/WebKit2Common.vsprops:
1821
1822 2010-10-28  Dan Bernstein  <mitz@apple.com>
1823
1824         Reviewed by Adam Roben.
1825
1826         No longer soft-link zlib
1827         https://bugs.webkit.org/show_bug.cgi?id=48004
1828
1829         * win/WebKit2Common.vsprops: Added zlib.lib to AdditionalDependencies.
1830
1831 2010-10-28  Adam Roben  <aroben@apple.com>
1832
1833         Make PluginView retain its HTMLPlugInElement
1834
1835         This matches WebKit/mac's WebBaseNetscapePluginView. WebCore didn't do
1836         this, but had a very different mechanism for implementing NPRuntime
1837         that didn't require it.
1838
1839         Fixes <http://webkit.org/b/46672> <rdar://problem/8484208> Crash
1840         (preceded by assertion) in Node::document when running
1841         plugins/document-open.html in WebKit2 on Windows
1842
1843         Reviewed by Anders Carlsson.
1844
1845         * WebProcess/Plugins/PluginView.cpp:
1846         (WebKit::PluginView::create): Moved here from the header file so that
1847         clients of the header file won't have to pull in HTMLPlugInElement.h.
1848         Changed to take a PassRefPtr<HTMLPlugInElement>.
1849         (WebKit::PluginView::PluginView): Changed to take a
1850         PassRefPtr<HTMLPlugInElement> and to use m_pluginElement later (because
1851         the parameter to the function will be nulled-out after assigning into
1852         m_pluginElement).
1853         (WebKit::PluginView::pluginElementNPObject): Updated for change to m_pluginElement.
1854
1855         * WebProcess/Plugins/PluginView.h: Made m_pluginElement a RefPtr.
1856
1857 2010-10-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1858
1859         Reviewed by Andreas Kling.
1860
1861         Make Qt viewportAttributesForSize not assert on (0, 0) size
1862         https://bugs.webkit.org/show_bug.cgi?id=48524
1863
1864         We now return an invalid (isValid() == false) ViewportAttributes
1865         instance when the supplied size is (0, 0).
1866
1867         * UIProcess/API/qt/qwkpage.cpp:
1868         (QWKPage::viewportAttributesForSize):
1869
1870 2010-10-28  Balazs Kelemen  <kbalazs@webkit.org>
1871
1872         Reviewed by Andreas Kling.
1873
1874         [Qt][WK2] SharedMemory should be released by the receiving process
1875         https://bugs.webkit.org/show_bug.cgi?id=48520
1876
1877         * Platform/qt/SharedMemoryQt.cpp:
1878         (WebKit::SharedMemory::~SharedMemory):
1879         (WebKit::SharedMemory::createHandle):
1880
1881 2010-10-28  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
1882
1883          Reviewed by Kenneth Rohde Christiansen.
1884
1885          [Qt] Web process cannot be debugged if it crashes in initialization
1886          https://bugs.webkit.org/show_bug.cgi?id=47399
1887
1888          Wait 3 seconds for the debugger on debug mode if
1889          WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH environment variable is set.
1890
1891          The debugging can be initiated for example in following way:
1892           export WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH=1
1893           ./MiniBrowser & while [ -z `pidof QtWebProcess` ]; do sleep 1; done; \
1894            gdb --pid=`pidof QtWebProcess`
1895
1896          * WebProcess/qt/WebProcessMainQt.cpp:
1897          (WebKit::WebProcessMainQt):
1898
1899 2010-10-28  Mark Rowe  <mrowe@apple.com>
1900
1901         32-bit build fix.
1902
1903         Qualify references to Rect to avoid ambiguity between WebCore::Rect and Carbon's Rect.
1904
1905         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1906         (WebKit::NetscapePlugin::platformPostInitialize):
1907         (WebKit::NetscapePlugin::windowFrameChanged):
1908
1909 2010-10-28  Ivan Krstić  <ike@apple.com>
1910
1911         Reviewed by Mark Rowe.
1912
1913         Remove unused experimental proxied panel interface.
1914         <rdar://problem/7237059>
1915
1916         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1917         (InitWebCoreSystemInterface):
1918
1919 2010-10-27  Mark Rowe  <mrowe@apple.com>
1920
1921         Build fix.
1922
1923         * UIProcess/API/mac/PageClientImpl.mm: Reference the file using the correct case.
1924
1925 2010-10-27  Anders Carlsson  <andersca@apple.com>
1926
1927         Reviewed by Sam Weinig.
1928
1929         Find indicators do not bounce
1930         https://bugs.webkit.org/show_bug.cgi?id=48490
1931         <rdar://problem/8564276>
1932
1933         * UIProcess/API/mac/FindIndicatorWindow.h:
1934         * UIProcess/API/mac/FindIndicatorWindow.mm:
1935         (-[WebFindIndicatorWindowAnimation _initWithFindIndicatorWindow:WebKit::animationDuration:animationProgressCallback:WebKit::FindIndicatorWindow::animationDidEndCallback:WebKit::FindIndicatorWindow::]):
1936         Add an animationDuration parameter.
1937         
1938         (WebKit::FindIndicatorWindow::FindIndicatorWindow):
1939         Initialize m_bounceAnimationContext.
1940
1941         (WebKit::FindIndicatorWindow::setFindIndicator):
1942         Create a bounce animation and start it.
1943
1944         (WebKit::FindIndicatorWindow::closeWindow):
1945         Stop the bounce animation and destroy the bounce animation context.
1946
1947         (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
1948         pass the fade out duration.
1949
1950         (WebKit::FindIndicatorWindow::bounceAnimationCallback):
1951         Set the bounce animation progress.
1952
1953         (WebKit::FindIndicatorWindow::bounceAnimationDidEnd):
1954         Destroy the bounce animation context.
1955
1956 2010-10-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1957
1958         Reviewed by Andreas Kling.
1959
1960         Remove the reference to the pageNamespace in the QWKPagePrivate.
1961         Access it through the WebPageProxy instead which holds a strong
1962         ref to it.
1963
1964         * UIProcess/API/qt/qwkpage.cpp:
1965         (QWKPagePrivate::QWKPagePrivate):
1966         (QWKPage::preferences):
1967         * UIProcess/API/qt/qwkpage_p.h:
1968
1969 2010-10-27  Enrica Casucci  <enrica@apple.com>
1970
1971         Reviewed by Alexey Proskuryakov.
1972
1973         Support Appkit key bindings and custom key bindings in WebKit2
1974         https://bugs.webkit.org/show_bug.cgi?id=48271
1975         <rdar://problem/7660723>
1976         
1977         We need to support AppKit key bindings and custom key bindings in WebKit2.
1978         Every keyboard event is first sent to the WebProcess and we inform AppKit that
1979         we don't need further processing. When the event is processed by the WebProcess and no handler consumes it,
1980         we send a synchronous message back to the UI process to let AppKit perform the key bindings.
1981         This operation can result in one or more editing commands to execute or a noop.
1982         The WebProcess then replies back to the UI process to inform whether further processing is required, in
1983         which case the event is sent back to the application to be mapped.
1984         There is a potential for a race condition: in case the WebProcess is very slow to process the key events, the UI
1985         process could be in a completely different state when the event is being resent (for example it might not have the
1986         keyboard focus anymore) and the command could be lost. We should look out for user experience impact.
1987
1988         * Scripts/webkit2/messages.py: Added header file in the generated file.
1989         * Shared/WebCoreArgumentCoders.h: Added encoder/decoder for KeypressCommand.
1990         * UIProcess/API/mac/PageClientImpl.h:
1991         * UIProcess/API/mac/PageClientImpl.mm:
1992         (WebKit::PageClientImpl::interceptKeyEvent): Pass-through call to WKView.
1993         (WebKit::PageClientImpl::didNotHandleKeyEvent): Added logic to resend the event to the application.
1994         * UIProcess/API/mac/WKView.mm:
1995         (-[WKView validateUserInterfaceItem:]): Changed the default return value to YES, otherwise no menu shortcut is performed.
1996         (-[WKView doCommandBySelector:]): Added.
1997         (-[WKView insertText:]): Added.
1998         (-[WKView _handleStyleKeyEquivalent:]): Added to handle command-B and command-I.
1999         (-[WKView performKeyEquivalent:]): Added to intercept key binding sequences.
2000         (-[WKView _setEventBeingResent:]):
2001         (-[WKView _interceptKeyEvent:]):
2002         * UIProcess/API/mac/WKViewInternal.h:
2003         * UIProcess/PageClient.h:
2004         * UIProcess/WebPageProxy.cpp:
2005         (WebKit::WebPageProxy::interpretKeyEvent):
2006         * UIProcess/WebPageProxy.h:
2007         * UIProcess/WebPageProxy.messages.in:
2008         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2009         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2010         (WebKit::WebEditorClient::handleKeyboardEvent):
2011         (WebKit::WebEditorClient::handleInputMethodKeydown):
2012         * WebProcess/WebPage/WebPage.cpp:
2013         * WebProcess/WebPage/WebPage.h:
2014         * WebProcess/WebPage/mac/WebPageMac.mm: Moved handleKeyboardEvent and handleInputMethodKeydown
2015         to the Mac specific implementation.
2016         (WebKit::WebPage::interceptEditingKeyboardEvent): Added.
2017
2018 2010-10-27  Brian Weinstein  <bweinstein@apple.com>
2019
2020         More Windows build fixage. Copy another new header into WebKitOutputDir.
2021
2022         * win/WebKit2Generated.make:
2023
2024 2010-10-27  Brian Weinstein  <bweinstein@apple.com>
2025
2026         Windows build fix. Copy a new header into WebKitOutputDir.
2027
2028         * win/WebKit2Generated.make:
2029
2030 2010-10-26  Darin Adler  <darin@apple.com>
2031
2032         Reviewed by Sam Weinig.
2033
2034         WebKitTestRunner needs to support layoutTestController.dumpBackForwardList
2035         https://bugs.webkit.org/show_bug.cgi?id=42322
2036         rdar://problem/8193631
2037
2038         WebKitTestRunner needs to support layoutTestController.clearBackForwardList
2039         https://bugs.webkit.org/show_bug.cgi?id=42333
2040         rdar://problem/8193643
2041
2042         * Shared/API/c/WKBase.h: Added WKBundleBackForwardListRef and
2043         WKBundleBackForwardListItemRef.
2044
2045         * Shared/API/c/WKURL.cpp:
2046         (WKURLCopyString): Added.
2047         * Shared/API/c/WKURL.h: Added WKURLCopyString.
2048
2049         * Shared/API/c/cf/WKURLCF.h: Fixed incorrect argument name.
2050
2051         * Shared/APIObject.h: Added TypeBundleBackForwardList and
2052         TypeBundleBackForwardListItem.
2053
2054         * Shared/ImmutableArray.h: Marked destructor virtual explicitly.
2055         * Shared/ImmutableDictionary.h: Ditto.
2056         * UIProcess/WebBackForwardListItem.h: Ditto.
2057         * UIProcess/WebContext.h: Ditto.
2058         * UIProcess/WebFrameProxy.h: Ditto.
2059         * UIProcess/WebNavigationData.h: Ditto.
2060         * UIProcess/WebPageNamespace.h: Ditto.
2061         * UIProcess/WebPreferences.h: Ditto.
2062         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h: Ditto.
2063         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
2064         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h: Ditto.
2065
2066         * UIProcess/WebBackForwardList.cpp: Removed unneeded backListWithLimit
2067         and forwardListWithLimit functions.
2068         (WebKit::WebBackForwardList::clear): Added.
2069         * UIProcess/WebBackForwardList.h: Marked destructor virtual explicitly.
2070         Added clear, removed backListWithLimit and forwardListWithLimit functions.
2071
2072         * UIProcess/WebPageProxy.cpp: Removed unneeded backForwardBackItem,
2073         backForwardCurrentItem, and backForwardForwardItem functions.
2074         (WebKit::WebPageProxy::backForwardClear): Added.
2075         * UIProcess/WebPageProxy.h: Ditto.
2076         * UIProcess/WebPageProxy.messages.in: Ditto.
2077
2078         * WebKit2.pro: Added new files.
2079         * WebKit2.xcodeproj/project.pbxproj: Ditto.
2080         * win/WebKit2.vcproj: Ditto.
2081
2082         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: Added
2083         WKBundleBackForwardListRef and WKBundleBackForwardListItemRef.
2084
2085         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
2086         Started with a copy of from WebKit2/UIProcess/API/C/WKBackForwardList.cpp.
2087         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.h:
2088         Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardList.h.
2089
2090         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
2091         Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardListItem.cpp.
2092         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
2093         Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardListItem.h.
2094
2095         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2096         (WKBundlePageGetBackForwardList): Added.
2097         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Ditto.
2098
2099
2100         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
2101         Started with a copy of WebKit2/UIProcess/WebBackForwardList.cpp.
2102         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
2103         Started with a copy of WebKit2/UIProcess/WebBackForwardList.h.
2104
2105         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
2106         Started with a copy of WebKit2/UIProcess/WebBackForwardListItem.cpp.
2107         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
2108         Started with a copy of WebKit2/UIProcess/WebBackForwardListItem.h.
2109
2110         * WebProcess/WebPage/WebBackForwardListProxy.cpp: Removed
2111         many unneeded functions.
2112         (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
2113         Removed unneeded initialization of m_closed.
2114         (WebKit::WebBackForwardListProxy::addItem): Added a check for
2115         the case of a capacity of 0.
2116         (WebKit::WebBackForwardListProxy::goToItem): Added a check for
2117         when the proxy outlives its page.
2118         (WebKit::WebBackForwardListProxy::itemAtIndex): Ditto.
2119         (WebKit::WebBackForwardListProxy::backListCount): Ditto.
2120         (WebKit::WebBackForwardListProxy::forwardListCount): Ditto.
2121         (WebKit::WebBackForwardListProxy::close): Removed unneeded code
2122         setting m_closed.
2123         (WebKit::WebBackForwardListProxy::isActive): Added.
2124         (WebKit::WebBackForwardListProxy::clear): Added.
2125
2126         * WebProcess/WebPage/WebBackForwardListProxy.h: Added clear,
2127         isActive, and detach functions. Removed many other unneeded
2128         function and data members.
2129
2130         * WebProcess/WebPage/WebPage.cpp:
2131         (WebKit::WebPage::~WebPage): Added call to detach on the
2132         back/forward list.
2133         (WebKit::WebPage::backForwardList): Added.
2134         * WebProcess/WebPage/WebPage.h: Added backForwardList function
2135         and m_backForwardList data member.
2136
2137 2010-10-27  Beth Dakin  <bdakin@apple.com>
2138
2139         Reviewed by Darin Adler.
2140
2141         Fix for https://bugs.webkit.org/show_bug.cgi?id=48385 Add WebKit 
2142         SPI to scale a WebView
2143         -and corresponding-
2144         <rdar://problem/8107667>
2145
2146         This patch adds SPI to Mac WebKit that scales the page by the given 
2147         scale factor.
2148
2149         Implement scaleWebView(), which tells WebCore::Frame to scale, and 
2150         viewScaleFactor() which returns the current scale factor.
2151         * Shared/API/c/WKSharedAPICast.h:
2152         * UIProcess/API/C/WKPage.cpp:
2153         (WKPageScaleWebView):
2154         (WKPageGetViewScaleFactor):
2155         * UIProcess/API/C/WKPage.h:
2156         * UIProcess/WebPageProxy.cpp:
2157         (WebKit::WebPageProxy::WebPageProxy):
2158         (WebKit::WebPageProxy::scaleWebView):
2159         * UIProcess/WebPageProxy.h:
2160         (WebKit::WebPageProxy::viewScaleFactor):
2161         * WebProcess/WebPage/WebPage.cpp:
2162         (WebKit::WebPage::scaleWebView):
2163         (WebKit::WebPage::viewScaleFactor):
2164         * WebProcess/WebPage/WebPage.h:
2165         * WebProcess/WebPage/WebPage.messages.in:
2166
2167 2010-10-27  Jessie Berlin  <jberlin@apple.com>
2168
2169         Reviewed by Sam Weinig.
2170
2171         Fix the WebKit2 API tests.
2172         https://bugs.webkit.org/show_bug.cgi?id=48461
2173
2174         The API tests were failing because the tests expect to be able to send messages before the
2175         WebProcess finishes launching.
2176
2177         Instead of dispatching the pending messages in processDidFinishLaunching, dispatch them in
2178         ensureWebProcess but do not make messages pending if the process is launching.
2179
2180         * UIProcess/WebContext.cpp:
2181         (WebKit::WebContext::processDidFinishLaunching):
2182         Move dispatching the pending messages back from here ...
2183         (WebKit::WebContext::ensureWebProcess):
2184         ... to here.
2185         (WebKit::WebContext::postMessageToInjectedBundle):
2186         Check whether the process can send messages in order to determine if a message needs to be
2187         sent later.
2188
2189         * UIProcess/WebProcessProxy.h:
2190         (WebKit::WebProcessProxy::canSendMessage):
2191         The WebProcessProxy can send a message if it is valid or if it is launching.
2192
2193 2010-10-27  Anders Carlsson  <andersca@apple.com>
2194
2195         Reviewed by Sam Weinig.
2196
2197         More work on downloads
2198         https://bugs.webkit.org/show_bug.cgi?id=48480
2199
2200         * WebProcess/Downloads/Download.cpp:
2201         (WebKit::Download::~Download):
2202         Call platformInvalidate().
2203
2204         (WebKit::Download::didBegin):
2205         (WebKit::Download::didReceiveData):
2206         (WebKit::Download::didFinish):
2207         Add empty stubs.
2208
2209         * WebProcess/Downloads/DownloadManager.cpp:
2210         (WebKit::DownloadManager::startDownload):
2211         Create a Download object and insert it into the m_downloads map.
2212
2213         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2214         (WebKit::Download::platformInvalidate):
2215         Add empty stub.
2216         
2217         * WebProcess/Downloads/mac/DownloadMac.mm:
2218         (WebKit::Download::platformInvalidate):
2219         Tell the WKDownloadAsDelegate object that we're being invalidated.
2220
2221         (-[WKDownloadAsDelegate downloadDidBegin:]):
2222         Call Download::didBegin.
2223
2224         (-[WKDownloadAsDelegate download:didReceiveDataOfLength:]):
2225         Call Download::didReceiveData.
2226
2227         (-[WKDownloadAsDelegate downloadDidFinish:]):
2228         Call Download::didFinish.
2229
2230         * WebProcess/Downloads/qt/DownloadQt.cpp:
2231         (WebKit::Download::platformInvalidate):
2232         Add empty stub.
2233
2234 2010-10-27  Anders Carlsson  <andersca@apple.com>
2235
2236         Reviewed by Sam Weinig.
2237
2238         WebPageProxy::isValid should return false if the page has been explicitly closed
2239         https://bugs.webkit.org/show_bug.cgi?id=48458
2240
2241         * UIProcess/WebPageProxy.cpp:
2242         (WebKit::WebPageProxy::WebPageProxy):
2243         (WebKit::WebPageProxy::isValid):
2244         (WebKit::WebPageProxy::relaunch):
2245         (WebKit::WebPageProxy::close):
2246         (WebKit::WebPageProxy::processDidCrash):
2247         * UIProcess/WebPageProxy.h:
2248         (WebKit::WebPageProxy::isClosed):
2249
2250 2010-10-27  Anders Carlsson  <andersca@apple.com>
2251
2252         Reviewed by Adam Roben.
2253
2254         Begin stubbing out the Download class
2255         https://bugs.webkit.org/show_bug.cgi?id=48447
2256
2257         * WebKit2.pro:
2258         * WebKit2.xcodeproj/project.pbxproj:
2259         Add new files.
2260         
2261         * WebKit2Prefix.h:
2262         Include WebCore/EmptyProtocolDefinitions.h
2263         
2264         * WebProcess/Downloads/Download.cpp: Added.
2265         * WebProcess/Downloads/Download.h: Added.
2266
2267         * WebProcess/Downloads/DownloadManager.cpp:
2268         (WebKit::DownloadManager::startDownload):
2269         Create a Download object and start it.
2270
2271         * WebProcess/Downloads/mac/DownloadMac.mm: Added.
2272         (WebKit::Download::start):
2273         Create an NSURLDownload.
2274     
2275         * WebProcess/WebPage/WebFrame.cpp:
2276         (WebKit::WebFrame::startDownload):
2277         Ask the download manager to start downloading.
2278
2279         * win/WebKit2.vcproj:
2280         * win/WebKit2Common.vsprops:
2281         Add new files.
2282
2283 2010-10-27  Adam Roben  <aroben@apple.com>
2284
2285         Don't allow setting NetscapePlugin::m_isWindowed after NPP_New has
2286         completed
2287
2288         In Firefox, Chrome, and WebKit1 trying to set this value after NPP_New
2289         does not actually affect whether the plugin is windowed.
2290
2291         Fixes <http://webkit.org/b/46673> <rdar://problem/8484211> Assertion
2292         failure in NetscapePlugin::platformDestroy when running
2293         plugins/mouse-events.html in WebKit2 on Windows
2294
2295         Reviewed by Anders Carlsson.
2296
2297         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2298         (WebKit::NetscapePlugin::setIsWindowed): Moved here from the header.
2299         Bail out if m_isStarted is true, indicating that NPP_New has already
2300         finished.
2301
2302         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Removed the
2303         implementation of setIsWindowed.
2304
2305 2010-10-27  Timothy Hatcher  <timothy@apple.com>
2306
2307         Add API for enabling the developer extras (Web Inspector).
2308
2309         http://webkit.org/b/48439
2310
2311         Reviewed by John Sullivan.
2312
2313         * Shared/WebPreferencesStore.cpp:
2314         (WebKit::WebPreferencesStore::WebPreferencesStore):
2315         (WebKit::WebPreferencesStore::encode):
2316         (WebKit::WebPreferencesStore::decode):
2317         * Shared/WebPreferencesStore.h:
2318         * UIProcess/API/C/WKPreferences.cpp:
2319         (WKPreferencesSetDeveloperExtrasEnabled):
2320         (WKPreferencesGetDeveloperExtrasEnabled):
2321         * UIProcess/API/C/WKPreferences.h:
2322         * UIProcess/WebPreferences.cpp:
2323         (WebKit::WebPreferences::setDeveloperExtrasEnabled):
2324         (WebKit::WebPreferences::developerExtrasEnabled):
2325         * UIProcess/WebPreferences.h:
2326         * WebProcess/WebPage/WebPage.cpp:
2327         (WebKit::WebPage::updatePreferences):
2328
2329 2010-10-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2330
2331         Reviewed by Anders Carlsson.
2332
2333         Move contentsSizeChange from the UIClient into the PageClient and
2334         and make it a private Qt-only API in the process.
2335
2336         Make WKPageContentsSizeChangedCallback be a private API
2337         https://bugs.webkit.org/show_bug.cgi?id=48409
2338
2339         * UIProcess/API/C/WKPage.h:
2340         * UIProcess/API/qt/qwkpage.cpp:
2341         (QWKPagePrivate::didChangeContentsSize):
2342         (QWKPage::QWKPage):
2343         * UIProcess/API/qt/qwkpage_p.h:
2344         * UIProcess/PageClient.h:
2345         * UIProcess/WebPageProxy.cpp:
2346         (WebKit::WebPageProxy::didChangeContentsSize):
2347         * UIProcess/WebPageProxy.h:
2348         * UIProcess/WebPageProxy.messages.in:
2349         * UIProcess/WebUIClient.cpp:
2350         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2351         (WebKit::WebChromeClient::contentsSizeChanged):
2352
2353 2010-10-26  Brian Weinstein  <bweinstein@apple.com>
2354
2355         Reviewed by Adam Roben.
2356
2357         WebKit2 shouldn't try to send an empty user agent
2358         https://bugs.webkit.org/show_bug.cgi?id=48397
2359         
2360         Change the check of the custom user agent to an empty check instead of a null check. When the client application
2361         sets a custom user agent and then resets it, the custom user agent is set to an empty string. If all we do
2362         is check for a null string, then we will think we have a custom user agent (which is empty) and send an empty
2363         user agent.
2364
2365         * WebProcess/WebPage/WebPage.cpp:
2366         (WebKit::WebPage::userAgent):
2367
2368 2010-10-27  Adam Roben  <aroben@apple.com>
2369
2370         Don't call NPP_GetValue if the plugin didn't provide an implementation
2371
2372         Fixes <http://webkit.org/b/48433> Crash in
2373         NetscapePlugin::shouldLoadSrcURL when using Shockwave Director 10.3 in
2374         WebKit2 on Windows
2375
2376         Reviewed by Eric Carlson.
2377
2378         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2379         (WebKit::NetscapePlugin::NPP_GetValue): Null-check the getvalue pointer
2380         before using it to call NPP_GetValue.
2381
2382 2010-10-27  Balazs Kelemen  <kbalazs@webkit.org>
2383
2384         Reviewed by Andreas Kling.
2385
2386         [Qt] Assert due to multiple initialization of WebPlatformStrategies
2387         https://bugs.webkit.org/show_bug.cgi?id=48327
2388
2389         We are using the LocalizationStrategy in the UI process
2390         so the previous attempt to fix this (http://trac.webkit.org/changeset/70620)
2391         was wrong.
2392         * UIProcess/API/qt/qwkpage.cpp:
2393         (initializePlatformStrategiesIfNeeded):
2394         Call WebPlatformStrategies::initialize exactly once.
2395         (QWKPagePrivate::QWKPagePrivate):
2396
2397 2010-10-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
2398
2399         Reviewed by Andreas Kling.
2400
2401         [Qt] WebKit2 UI process crashes if web process crashes
2402         https://bugs.webkit.org/show_bug.cgi?id=48400
2403
2404         Check the success of socket write operations.
2405         Avoids crashing the UI process if web process has crashed.
2406         Qt socket code segfaults when write is called for a socket
2407         that has had an error.
2408
2409         * Platform/CoreIPC/qt/ConnectionQt.cpp:
2410         (CoreIPC::Connection::platformInvalidate):
2411         Reset m_socket after deletion.
2412
2413         (CoreIPC::Connection::sendOutgoingMessage):
2414         Check error status of write operations and
2415         invalidate socket if writes fail.
2416
2417 2010-10-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
2418
2419         Reviewed by Andreas Kling.
2420
2421         [Qt] Type mismatch while serializing/deserializing message id size
2422         https://bugs.webkit.org/show_bug.cgi?id=48401
2423
2424         Use correct types when reading data from connection buffer.
2425
2426         The message id is written as uint32_t, thus the buffer size should be
2427         calculated based on sizeof(uint32_t) and not sizeof(MessageID).
2428
2429         * Platform/CoreIPC/qt/ConnectionQt.cpp:
2430         (CoreIPC::Connection::readyReadHandler):
2431
2432 2010-10-27  Zalan Bujtas  <zbujtas@gmail.com>
2433
2434         Reviewed by Kenneth Rohde Christiansen.
2435
2436         Multiple WebPlatformStrategy initialization triggers assert in WebCore/PlatformStrategies. 
2437         Remove the code for now, as it is not used at all.
2438         https://bugs.webkit.org/show_bug.cgi?id=48327
2439
2440         * UIProcess/API/qt/qwkpage.cpp:
2441         (QWKPagePrivate::QWKPagePrivate):
2442
2443 2010-10-26  Brent Fulgham  <bfulgham@webkit.org>
2444
2445         Unreviewed build fix.
2446
2447         * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
2448         (WebKit::cancelledError): Conditionalize use of CFNetwork calls
2449         and includes.
2450
2451 2010-10-26  Alexey Proskuryakov  <ap@apple.com>
2452
2453         Build fix.
2454
2455         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Modified original file, not its framework
2456         copy this time.
2457
2458 2010-10-26  Anders Carlsson  <andersca@apple.com>
2459
2460         Reviewed by Sam Weinig.
2461
2462         Add DownloadManager class
2463         https://bugs.webkit.org/show_bug.cgi?id=48388
2464
2465         * WebKit2.pro:
2466         * WebKit2.xcodeproj/project.pbxproj:
2467         Add new files.
2468
2469         * WebProcess/Downloads/DownloadManager.cpp: Added.
2470         (WebKit::DownloadManager::shared):
2471         (WebKit::DownloadManager::DownloadManager):
2472         * WebProcess/Downloads/DownloadManager.h: Added.
2473
2474         * win/WebKit2.vcproj:
2475         * win/WebKit2Common.vsprops:
2476         Add new files.
2477
2478 2010-10-26  Anders Carlsson  <andersca@apple.com>
2479
2480         Reviewed by Sam Weinig.
2481
2482         Pass a downloadID to the web process whenever a download is requested
2483         https://bugs.webkit.org/show_bug.cgi?id=48380
2484
2485         * UIProcess/WebContext.cpp:
2486         (WebKit::WebContext::generateDownloadID):
2487         Generate a unique download ID.
2488
2489         * UIProcess/WebPageProxy.cpp:
2490         (WebKit::WebPageProxy::receivedPolicyDecision):
2491         Pass along a download ID if needed.
2492
2493         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2494         (WebKit::WebFrameLoaderClient::startDownload):
2495         Call the web frame member function.
2496
2497         * WebProcess/WebPage/WebFrame.cpp:
2498         (WebKit::WebFrame::WebFrame):
2499         Initialize m_policyDownloadID.
2500
2501         (WebKit::WebFrame::invalidatePolicyListener):
2502         Reset m_policyDownloadID.
2503
2504         (WebKit::WebFrame::didReceivePolicyDecision):
2505         Set m_policyDownloadID.
2506
2507         (WebKit::WebFrame::startDownload):
2508         Assert that m_policyDownloadID is not zero.
2509
2510         * WebProcess/WebPage/WebPage.cpp:
2511         (WebKit::WebPage::didReceivePolicyDecision):
2512         Pass along the download ID.
2513
2514         * WebProcess/WebPage/WebPage.messages.in:
2515         Add the download ID.
2516
2517 2010-10-26  Alexey Proskuryakov  <ap@apple.com>
2518
2519         Reviewed by Sam Weinig.
2520
2521         https://bugs.webkit.org/show_bug.cgi?id=48375
2522         <rdar://problem/8392724> Need delegate calls in PageLoaderClient to indicate if we have
2523         loaded insecure content
2524
2525         Added the delegate. Just like the bundle version, it misses WebOrigin parameter that Mac
2526         delegate call used to have. It doesn't seem necessary for clients.
2527
2528         * UIProcess/API/C/WKPage.h:
2529         * UIProcess/API/qt/qwkpage.cpp:
2530         (QWKPage::QWKPage):
2531         * UIProcess/WebLoaderClient.cpp:
2532         (WebKit::WebLoaderClient::didDisplayInsecureContentForFrame):
2533         (WebKit::WebLoaderClient::didRunInsecureContentForFrame):
2534         * UIProcess/WebLoaderClient.h:
2535         * UIProcess/WebPageProxy.cpp:
2536         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
2537         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
2538         * UIProcess/WebPageProxy.h:
2539         * UIProcess/WebPageProxy.messages.in:
2540         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2541         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2542         (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
2543         (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
2544         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2545         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2546         (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
2547         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
2548
2549 2010-10-26  Jenn Braithwaite  <jennb@chromium.org>
2550
2551         Reviewed by Dmitry Titov.
2552
2553         Resource tracking failure when trying to move a frame between documents
2554         https://bugs.webkit.org/show_bug.cgi?id=44713
2555
2556         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2557         (WebKit::WebFrameLoaderClient::transferLoadingResourceFromPage):
2558         Empty method.
2559         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2560
2561 2010-10-26  Jessie Berlin  <jberlin@apple.com>
2562
2563         Reviewed by Darin Adler.
2564
2565         Post any pending messages to the Injected Bundle in WebContext::processDidFinishLaunching
2566         instead of in WebContext::ensureWebProcess.
2567         https://bugs.webkit.org/show_bug.cgi?id=48367
2568
2569         Send pending injected bundle messages after the process finished launching instead of of
2570         directly after creating it.
2571
2572         * UIProcess/WebContext.cpp:
2573         (WebKit::WebContext::ensureWebProcess):
2574         Move the logic to dispatch pending injected bundle messages from here ...
2575         (WebKit::WebContext::processDidFinishLaunching):
2576         ... to here.
2577         Also use a reference instead of a pointer when sending the pending messages.
2578
2579 2010-10-26  Anders Carlsson  <andersca@apple.com>
2580
2581         Reviewed by Sam Weinig.
2582
2583         pageDidScroll callback should be on the UI process client rather than (or in addition to) the web process client
2584         https://bugs.webkit.org/show_bug.cgi?id=48366
2585
2586         * UIProcess/API/qt/qwkpage.cpp:
2587         (QWKPage::QWKPage):
2588         Add zero initializer.
2589
2590         * UIProcess/WebPageProxy.cpp:
2591         (WebKit::WebPageProxy::pageDidScroll):
2592         Call the pageDidScroll client function.
2593
2594         * UIProcess/WebPageProxy.messages.in:
2595         Add PageDidScroll message.
2596
2597         * WebProcess/WebPage/WebPage.cpp:
2598         (WebKit::WebPage::pageDidScroll):
2599         Send the PageDidScroll message.
2600
2601 2010-10-26  Brian Weinstein  <bweinstein@apple.com>
2602
2603         Reviewed by Darin Adler.
2604
2605         Need a way to retrieve custom user agent from a WKPage
2606         https://bugs.webkit.org/show_bug.cgi?id=48360
2607         <rdar://problem/8466537>
2608         
2609         Add an exported function on WKPage to get the page's custom user agent.
2610
2611         * UIProcess/API/C/WKPage.cpp:
2612         (WKPageCopyCustomUserAgent): Exported function that returns the custom user
2613             agent.
2614         * UIProcess/API/C/WKPage.h:
2615         * UIProcess/WebPageProxy.cpp:
2616         (WebKit::WebPageProxy::close): Clear the custom user agent string.
2617         (WebKit::WebPageProxy::processDidCrash): Ditto.
2618         (WebKit::WebPageProxy::setCustomUserAgent): Add a new early return if we're setting
2619             the custom user agent to what it was before, and set the custom user agent member
2620             variable.
2621         * UIProcess/WebPageProxy.h:
2622         (WebKit::WebPageProxy::customUserAgent): Returns the custom user agent.
2623
2624 2010-10-26  Simon Fraser  <simon.fraser@apple.com>
2625
2626         Reviewed by Sam Weinig.
2627
2628         Support layoutTestController.layerTreeAsText in WebKitTestRunner
2629         https://bugs.webkit.org/show_bug.cgi?id=42145
2630         
2631         Expose layerTreeAsText() as private API so that 
2632         WebKitTestRunner can use it.
2633
2634         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2635         (WKBundleFrameCopyLayerTreeAsText):
2636         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2637         * WebProcess/WebPage/WebFrame.cpp:
2638         (WebKit::WebFrame::numberOfActiveAnimations):
2639         (WebKit::WebFrame::layerTreeAsText):
2640         (WebKit::WebFrame::pendingUnloadCount):
2641         * WebProcess/WebPage/WebFrame.h:
2642
2643 2010-10-26  Anders Carlsson  <andersca@apple.com>
2644
2645         Reviewed by Sam Weinig.
2646
2647         Enable the plug-in process on Mac
2648         https://bugs.webkit.org/show_bug.cgi?id=48350
2649
2650         * WebKit2Prefix.h:
2651         Flip the switch and enable the plug-in process on Mac.
2652
2653         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2654         (WebKit::NetscapePlugin::platformDestroy):
2655         Fix a bogus assert.
2656
2657 2010-10-26  Zoltan Horvath  <zoltan@webkit.org>
2658
2659         Reviewed by Kenneth Rohde Christiansen.
2660
2661         [Qt] Implement SharedMemory for WebKit2
2662         https://bugs.webkit.org/show_bug.cgi?id=47345
2663
2664         Implement unimplemented functions in SharedMemoryQt.cpp.
2665         Rename MappedMemory.h to MappedMemoryPool.h, move MappedMemoryPool.{h|cpp} from
2666         Shared/qt to Platform/qt. Modify affected lines of WebKit2.pro.
2667         Move MappedMemory implementation into MappedMemoryPool. Remove unnecessary 
2668         methods of MappedMemoryPool.
2669
2670         * Platform/SharedMemory.h: Add a handle member for Qt.
2671         * Platform/qt/MappedMemoryPool.cpp: Copied from WebKit2/Shared/qt/MappedMemoryPool.cpp.
2672         (WebKit::MappedMemoryPool::searchForMappedMemory):
2673         (WebKit::MappedMemoryPool::mapMemory):
2674         (WebKit::MappedMemoryPool::mapFile):
2675         * Platform/qt/MappedMemoryPool.h: Copied from WebKit2/Shared/qt/MappedMemory.h.
2676         (WebKit::MappedMemoryPool::MappedMemory::mapSize):
2677         (WebKit::MappedMemoryPool::MappedMemory::markUsed):
2678         (WebKit::MappedMemoryPool::MappedMemory::markFree):
2679         (WebKit::MappedMemoryPool::MappedMemory::isFree):
2680         (WebKit::MappedMemoryPool::MappedMemory::data):
2681         (WebKit::MappedMemoryPool::MappedMemoryPool):
2682         Move MappedMemory implementation into MappedMemoryPool.
2683         * Platform/qt/SharedMemoryQt.cpp:
2684         (WebKit::SharedMemory::Handle::Handle): Implement.
2685         (WebKit::SharedMemory::Handle::~Handle):
2686         (WebKit::SharedMemory::Handle::isNull): Implement.
2687         (WebKit::SharedMemory::Handle::encode): Implement.
2688         (WebKit::SharedMemory::Handle::decode): Implement.
2689         (WebKit::SharedMemory::create): Implement.
2690         (WebKit::mapProtection): Added.
2691         (WebKit::SharedMemory::~SharedMemory): Implement.
2692         (WebKit::SharedMemory::createHandle): Implement.
2693         (WebKit::SharedMemory::systemPageSize): Implement.
2694         * Shared/qt/MappedMemory.h: Removed.
2695         * Shared/qt/MappedMemoryPool.cpp: Removed.
2696         * Shared/qt/UpdateChunk.cpp:
2697         (WebKit::UpdateChunk::UpdateChunk):
2698         (WebKit::UpdateChunk::decode):
2699         Modify to use MappedMemoryPool.
2700         * Shared/qt/UpdateChunk.h:
2701         * WebKit2.pro:
2702         Modify affected lines.
2703
2704 2010-10-25  Anders Carlsson  <andersca@apple.com>
2705
2706         Reviewed by Sam Weinig.
2707
2708         WebKit2 callbacks for findString() and countMatchesForString() should report whether the match count was exceeded
2709         https://bugs.webkit.org/show_bug.cgi?id=48285
2710         <rdar://problem/8576318>
2711
2712         * UIProcess/API/C/WKPage.h:
2713         Add a kWKMoreThanMaximumMatchCount constant.
2714
2715         * WebProcess/WebPage/FindController.cpp:
2716         (WebKit::FindController::findString):
2717         If we get back more matches than allowed, send kWKMoreThanMaximumMatchCount as the match constant.
2718
2719 2010-10-25  Dan Bernstein  <mitz@apple.com>
2720
2721         Non-Carbon build fix.
2722
2723         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2724         (WebKit::NetscapePlugin::windowFrameChanged):
2725
2726 2010-10-25  Timothy Hatcher  <timothy@apple.com>
2727
2728         Stub out WebInspector objects and WKInspectorRef API.
2729
2730         https://webkit.org/b/48265
2731
2732         Reviewed by Anders Carlsson.
2733
2734         * Platform/CoreIPC/MessageID.h: Added MessageClassWebInspector and MessageClassWebInspectorProxy.
2735         * Shared/API/c/WKBase.h: Added WKInspectorRef.
2736         * Shared/APIObject.h: Added TypeInspector.
2737         * UIProcess/API/C/WKAPICast.h: Added WKInspectorRef to WebInspectorProxy mapping.
2738         * UIProcess/API/C/WKInspector.cpp: Added.
2739         (WKInspectorGetTypeID):
2740         (WKInspectorGetPage):
2741         * UIProcess/API/C/WKInspector.h: Added.
2742         * UIProcess/API/C/WKPage.cpp:
2743         (WKPageGetInspector): Added.
2744         * UIProcess/API/C/WKPage.h:
2745         * UIProcess/WebInspectorProxy.cpp: Added.
2746         (WebKit::WebInspectorProxy::WebInspectorProxy):
2747         (WebKit::WebInspectorProxy::~WebInspectorProxy):
2748         (WebKit::WebInspectorProxy::invalidate):
2749         * UIProcess/WebInspectorProxy.h:
2750         (WebKit::WebInspectorProxy::create):
2751         (WebKit::WebInspectorProxy::page):
2752         (WebKit::WebInspectorProxy::type):
2753         * UIProcess/WebPageProxy.cpp:
2754         (WebKit::WebPageProxy::inspector): Lazily create the WebInspectorProxy.
2755         * UIProcess/WebPageProxy.h:
2756         * WebKit2.pro: Added new files.
2757         * WebKit2.xcodeproj/project.pbxproj: Added new files.
2758         * WebProcess/WebPage/WebInspector.cpp: Added.
2759         (WebKit::WebInspector::WebInspector):
2760         * WebProcess/WebPage/WebInspector.h: Added.
2761         * WebProcess/WebPage/WebPage.cpp:
2762         (WebKit::WebPage::inspector): Lazily create the WebInspector.
2763         * WebProcess/WebPage/WebPage.h:
2764         * win/WebKit2.vcproj: Added new files.
2765
2766 2010-10-25  Anders Carlsson  <andersca@apple.com>
2767
2768         Reviewed by Dan Bernstein.
2769
2770         Update the fake Carbon window when the window frame changes
2771         https://bugs.webkit.org/show_bug.cgi?id=48273
2772
2773         * UIProcess/API/mac/WKView.mm:
2774         (screenForWindow):
2775         (-[WKView _updateWindowFrame]):
2776         Pass the window frame in Carbon coordinates.
2777
2778         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2779         (WebKit::NetscapePlugin::windowFrameChanged):
2780         Update the window bounds.
2781
2782         * WebProcess/Plugins/PluginView.cpp:
2783         (WebKit::PluginView::setWindowFrame):
2784         Call the plug-in.
2785
2786         (WebKit::PluginView::platformLayer):
2787         Fix a crash when WebCore asked for the layer before it was initialized.
2788
2789 2010-10-25  Oliver Hunt  <oliver@apple.com>
2790
2791         Reviewed by Gavin Barraclough.
2792
2793         Remove exec and globalData arguments from jsNumber
2794         https://bugs.webkit.org/show_bug.cgi?id=48270
2795
2796         Mechanical removal of exec parameter to jsNumber
2797
2798         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
2799         (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
2800
2801 2010-10-25  Anders Carlsson  <andersca@apple.com>
2802
2803         Reviewed by Darin Adler.
2804
2805         Replace matchCountDidChange with didFindString/didFailToFindString
2806         https://bugs.webkit.org/show_bug.cgi?id=48262
2807         <rdar://problem/8568928>
2808
2809         * UIProcess/API/C/WKPage.h:
2810         * UIProcess/WebFindClient.cpp:
2811         (WebKit::WebFindClient::didFindString):
2812         (WebKit::WebFindClient::didFailToFindString):
2813         * UIProcess/WebFindClient.h:
2814         * UIProcess/WebPageProxy.cpp:
2815         (WebKit::WebPageProxy::didFindString):
2816         (WebKit::WebPageProxy::didFailToFindString):
2817         * UIProcess/WebPageProxy.h:
2818         * UIProcess/WebPageProxy.messages.in:
2819         * WebProcess/WebPage/FindController.cpp:
2820         (WebKit::FindController::findString):
2821
2822 2010-10-25  Anders Carlsson  <andersca@apple.com>
2823
2824         Reviewed by Adam Roben.
2825
2826         Add a pageDidScroll BundleUIClient callback
2827         https://bugs.webkit.org/show_bug.cgi?id=48260
2828         <rdar://problem/8531159>
2829
2830         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2831         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2832         (WebKit::InjectedBundlePageUIClient::pageDidScroll):
2833         Call the pageDidScroll callback.
2834
2835         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2836         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2837         (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
2838         (WebKit::WebChromeClient::scroll):
2839         Call pageDidScroll.
2840
2841         * WebProcess/WebPage/WebPage.cpp:
2842         (WebKit::WebPage::pageDidScroll):
2843         Hide the find banner UI and call the BundleUIClient pageDidScroll callback.
2844
2845 2010-10-25  Brian Weinstein  <bweinstein@apple.com>
2846
2847         Reviewed by Adam Roben.
2848
2849         Control + Mousewheel shouldn't be handled in WebKit2
2850         https://bugs.webkit.org/show_bug.cgi?id=48253
2851         
2852         Don't handle a wheel event if Control is pressed, pass the message back to DefWindowProc.
2853
2854         * UIProcess/win/WebView.cpp:
2855         (WebKit::WebView::onWheelEvent):
2856
2857 2010-10-25  Sam Weinig  <sam@webkit.org>
2858
2859         Reviewed by Dan Bernstein.
2860
2861         cancelledError for WebKit2 on windows should use kCFErrorDomainCFNetwork instead of webKitErrorDomain
2862         https://bugs.webkit.org/show_bug.cgi?id=48254
2863
2864         * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
2865         (WebKit::cancelledError): Use kCFErrorDomainCFNetwork instead of webKitErrorDomain and switch over
2866         to using kCFURLErrorCancelled instead of a hard coded constant.
2867
2868 2010-10-25  Sam Weinig  <sam@webkit.org>
2869
2870         Reviewed by Anders Carlsson.
2871
2872         Need WebKit2 API to figure out if a frame can provide source
2873         <rdar://problem/8424632>
2874         https://bugs.webkit.org/show_bug.cgi?id=48252
2875
2876         * UIProcess/API/C/WKFrame.cpp:
2877         (WKFrameCanProvideSource):
2878         * UIProcess/API/C/WKFrame.h:
2879         * UIProcess/WebFrameProxy.cpp:
2880         (WebKit::WebFrameProxy::canProvideSource):
2881         * UIProcess/WebFrameProxy.h:
2882         Add API to figure out if a frame can provide source based on its
2883         MIME type.
2884
2885 2010-10-25  Anders Carlsson  <andersca@apple.com>
2886
2887         Reviewed by Dan Bernstein.
2888
2889         Java applets don't display on the page
2890         https://bugs.webkit.org/show_bug.cgi?id=48251
2891         <rdar://problem/8483759>
2892
2893         Add WKPreferencesSetJavaEnabled and initialize it to true by default, matching old WebKit.
2894
2895         * Shared/WebPreferencesStore.cpp:
2896         (WebKit::WebPreferencesStore::WebPreferencesStore):
2897         Initialize javaEnabled.
2898
2899         (WebKit::WebPreferencesStore::encode):
2900         Encode javaEnabled.
2901
2902         (WebKit::WebPreferencesStore::decode):
2903         Decode javaEnabled.
2904
2905         * Shared/WebPreferencesStore.h:
2906         Add javaEnabled.
2907
2908         * UIProcess/API/C/WKPreferences.cpp:
2909         (WKPReferencesSetJavaEnabled):
2910         (WKPReferencesGetJavaEnabled):
2911         Call the WebPreferences functions.
2912
2913         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2914         (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
2915         Just call createPlugin.
2916
2917         * WebProcess/WebPage/WebPage.cpp:
2918         (WebKit::WebPage::updatePreferences):
2919         Call Settings::setJavaEnabled.
2920
2921 2010-10-25  Patrick Gansterer  <paroga@webkit.org>
2922
2923         Reviewed by David Kilzer.
2924
2925         Replace _countof with WTF_ARRAY_LENGTH
2926         https://bugs.webkit.org/show_bug.cgi?id=48229
2927
2928         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
2929         (WebKit::ProcessLauncher::launchProcess):
2930         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2931         (WebKit::safariPluginsDirectory):
2932         (WebKit::addMozillaPluginDirectories):
2933         (WebKit::addWindowsMediaPlayerPluginDirectory):
2934         (WebKit::addAdobeAcrobatPluginDirectory):
2935         (WebKit::addMacromediaPluginDirectories):
2936         (WebKit::addPluginPathsFromRegistry):
2937         * WebProcess/WebPage/win/WebPageWin.cpp:
2938         (WebKit::WebPage::interpretKeyEvent):
2939
2940 2010-10-25  Adam Roben  <aroben@apple.com>
2941
2942         Stop copying .messages.in files into WebKit2's framework bundle
2943
2944         Fixes <http://webkit.org/b/48232> Several .messages.in files end up in
2945         WebKit2's framework bundle
2946
2947         Reviewed by Dan Bernstein.
2948
2949         * WebKit2.xcodeproj/project.pbxproj:
2950
2951 2010-10-25  Andras Becsi  <abecsi@webkit.org>
2952
2953         Reviewed by Csaba Osztrogonác.
2954
2955         [Qt] Fix the WebKit2 build after sheriffbot messed up the rollout patch.
2956         https://bugs.webkit.org/show_bug.cgi?id=48238
2957
2958         * Shared/qt/MappedMemory.h: Renamed from WebKit2/Platform/qt/MappedMemoryPool.h.
2959         (WebKit::MappedMemory::mapSize):
2960         (WebKit::MappedMemory::markUsed):
2961         (WebKit::MappedMemory::markFree):
2962         (WebKit::MappedMemory::isFree):
2963         (WebKit::MappedMemory::data):
2964
2965 2010-10-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2966
2967         Unreviewed, rolling out r70450.
2968         http://trac.webkit.org/changeset/70450
2969         https://bugs.webkit.org/show_bug.cgi?id=48238
2970
2971         Causes WTR to crash on tests which use SharedMemory.
2972         (Requested by bbandix on #webkit).
2973
2974         * Platform/SharedMemory.h:
2975         * Platform/qt/MappedMemoryPool.cpp: Removed.
2976         * Platform/qt/SharedMemoryQt.cpp:
2977         (WebKit::SharedMemory::Handle::Handle):
2978         (WebKit::SharedMemory::Handle::~Handle):
2979         (WebKit::SharedMemory::Handle::encode):
2980         (WebKit::SharedMemory::Handle::decode):
2981         (WebKit::SharedMemory::create):
2982         (WebKit::SharedMemory::~SharedMemory):
2983         (WebKit::SharedMemory::createHandle):
2984         (WebKit::SharedMemory::systemPageSize):
2985         * Shared/qt/MappedMemory.h: Renamed from WebKit2/Platform/qt/MappedMemoryPool.h.
2986         (WebKit::MappedMemory::mapSize):
2987         (WebKit::MappedMemory::markUsed):
2988         (WebKit::MappedMemory::markFree):
2989         (WebKit::MappedMemory::isFree):
2990         (WebKit::MappedMemory::data):
2991         * Shared/qt/MappedMemoryPool.cpp: Added.
2992         (WebKit::MappedMemoryPool::MappedMemoryPool):
2993         (WebKit::MappedMemoryPool::instance):
2994         (WebKit::MappedMemoryPool::size):
2995         (WebKit::MappedMemoryPool::at):
2996         (WebKit::MappedMemoryPool::append):
2997         (WebKit::MappedMemoryPool::cleanUp):
2998         * Shared/qt/UpdateChunk.cpp:
2999         (WebKit::mapMemory):
3000         (WebKit::mapFile):
3001         (WebKit::UpdateChunk::UpdateChunk):
3002         (WebKit::UpdateChunk::decode):
3003         * Shared/qt/UpdateChunk.h:
3004         * WebKit2.pro:
3005
3006 2010-10-25  Zoltan Horvath  <zoltan@webkit.org>
3007
3008         Reviewed by Kenneth Rohde Christiansen.
3009
3010         [Qt] Implement SharedMemory for WebKit2
3011         https://bugs.webkit.org/show_bug.cgi?id=47345
3012
3013         Implement unimplemented functions in SharedMemoryQt.cpp.
3014         Rename MappedMemory.h to MappedMemoryPool.h, move MappedMemoryPool.{h|cpp} from
3015         Shared/qt to Platform/qt. Modify affected lines of WebKit2.pro.
3016         Move MappedMemory implementation into MappedMemoryPool. Remove unnecessary 
3017         methods of MappedMemoryPool.
3018
3019         * Platform/SharedMemory.h: Add a handle member for Qt.
3020         * Platform/qt/MappedMemoryPool.cpp: Copied from WebKit2/Shared/qt/MappedMemoryPool.cpp.
3021         (WebKit::MappedMemoryPool::searchForMappedMemory):
3022         (WebKit::MappedMemoryPool::mapMemory):
3023         (WebKit::MappedMemoryPool::mapFile):
3024         * Platform/qt/MappedMemoryPool.h: Copied from WebKit2/Shared/qt/MappedMemory.h.
3025         (WebKit::MappedMemoryPool::MappedMemory::mapSize):
3026         (WebKit::MappedMemoryPool::MappedMemory::markUsed):
3027         (WebKit::MappedMemoryPool::MappedMemory::markFree):
3028         (WebKit::MappedMemoryPool::MappedMemory::isFree):
3029         (WebKit::MappedMemoryPool::MappedMemory::data):
3030         (WebKit::MappedMemoryPool::MappedMemoryPool):
3031         Move MappedMemory implementation into MappedMemoryPool.
3032         * Platform/qt/SharedMemoryQt.cpp:
3033         (WebKit::SharedMemory::Handle::Handle): Implement.
3034         (WebKit::SharedMemory::Handle::~Handle):
3035         (WebKit::SharedMemory::Handle::isNull): Implement.
3036         (WebKit::SharedMemory::Handle::encode): Implement.
3037         (WebKit::SharedMemory::Handle::decode): Implement.
3038         (WebKit::SharedMemory::create): Implement.
3039         (WebKit::mapProtection): Added.
3040         (WebKit::SharedMemory::~SharedMemory): Implement.
3041         (WebKit::SharedMemory::createHandle): Implement.
3042         (WebKit::SharedMemory::systemPageSize): Implement.
3043         * Shared/qt/MappedMemory.h: Removed.
3044         * Shared/qt/MappedMemoryPool.cpp: Removed.
3045         * Shared/qt/UpdateChunk.cpp:
3046         (WebKit::UpdateChunk::UpdateChunk):
3047         (WebKit::UpdateChunk::decode):
3048         Modify to use MappedMemoryPool.
3049         * Shared/qt/UpdateChunk.h:
3050         * WebKit2.pro:
3051         Modify affected lines.
3052
3053 2010-10-24  Sam Weinig  <sam@webkit.org>
3054
3055         Reviewed by Dan Bernstein.
3056
3057         Need a way to determine the screen rect for a form control in WebKit2
3058         <rdar://problem/8530670>
3059         https://bugs.webkit.org/show_bug.cgi?id=48216
3060
3061         * Shared/API/c/WKSharedAPICast.h:
3062         (WebKit::toAPI):
3063         Add conversion from IntRect to WKRect.
3064
3065         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3066         (WKBundleNodeHandleGetElementBounds):
3067         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
3068         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3069         (WebKit::InjectedBundleNodeHandle::elementBounds):
3070         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3071         Add SPI to get the rect in window space. The client can then convert this to screen
3072         space if they wish to.
3073
3074 2010-10-23  Xan Lopez  <xlopez@igalia.com>
3075
3076         Reviewed by Sam Weinig.
3077
3078         Unify globalData APIs
3079         https://bugs.webkit.org/show_bug.cgi?id=47969
3080
3081         Adapt code to JSGlobalObject::globalData returning a reference
3082         instead of a pointer.
3083
3084         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3085         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
3086         (WebKit::NPRuntimeObjectMap::evaluate):
3087
3088 2010-10-23  Alexey Proskuryakov  <ap@apple.com>
3089
3090         Reviewed by Anders Carlsson.
3091
3092         https://bugs.webkit.org/show_bug.cgi?id=48083
3093         <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
3094
3095         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
3096         Initialize the new method.
3097
3098 2010-10-21  Timothy Hatcher  <timothy@apple.com>
3099
3100         Stub out WebInspectorFrontendClient.
3101
3102         https://bugs.webkit.org/show_bug.cgi?id=48091
3103
3104         Reviewed by Adam Roben.
3105
3106         * WebKit2.pro: Added WebInspectorFrontendClient.{cpp,h}.
3107         * WebKit2.xcodeproj/project.pbxproj: Added WebInspectorFrontendClient.{cpp,h}.
3108         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: Added.
3109         (WebKit::WebInspectorFrontendClient::windowObjectCleared): Added.
3110         (WebKit::WebInspectorFrontendClient::frontendLoaded): Added.
3111         (WebKit::WebInspectorFrontendClient::moveWindowBy): Added.
3112         (WebKit::WebInspectorFrontendClient::localizedStringsURL): Added.
3113         (WebKit::WebInspectorFrontendClient::hiddenPanels): Added.
3114         (WebKit::WebInspectorFrontendClient::bringToFront): Added.
3115         (WebKit::WebInspectorFrontendClient::closeWindow): Added.
3116         (WebKit::WebInspectorFrontendClient::disconnectFromBackend): Added.
3117         (WebKit::WebInspectorFrontendClient::requestAttachWindow): Added.
3118         (WebKit::WebInspectorFrontendClient::requestDetachWindow): Added.
3119         (WebKit::WebInspectorFrontendClient::changeAttachedWindowHeight): Added.
3120         (WebKit::WebInspectorFrontendClient::inspectedURLChanged): Added.
3121         (WebKit::WebInspectorFrontendClient::sendMessageToBackend): Added.
3122         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: Added.
3123         (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient): Added.
3124         * win/WebKit2.vcproj: Added WebInspectorFrontendClient.{cpp,h}.
3125
3126 2010-10-21  Timothy Hatcher  <timothy@apple.com>
3127
3128         Remove stale stubs that are not longer part of InspectorClient.
3129
3130         https://bugs.webkit.org/show_bug.cgi?id=48090
3131
3132         Reviewed by Adam Roben.
3133
3134         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3135         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3136
3137 2010-10-22  Andy Estes  <aestes@apple.com>
3138
3139         Reviewed by Adam Roben and Sam Weinig.
3140
3141         WebKit shouldn't load a plug-in based on file extension if a MIME type
3142         is specified.
3143         https://bugs.webkit.org/show_bug.cgi?id=48046
3144
3145         The fix landed in r70332 only covered the Mac port. Implement this fix
3146         for WebKit2 as well.
3147
3148         * UIProcess/Plugins/PluginInfoStore.cpp:
3149         (WebKit::PluginInfoStore::findPlugin):
3150
3151 2010-10-22  Anders Carlsson  <andersca@apple.com>
3152
3153         Fix clang++ build.
3154
3155         * Scripts/webkit2/messages.py:
3156
3157 2010-10-22  Anders Carlsson  <andersca@apple.com>
3158
3159         Fix build.
3160
3161         * UIProcess/API/qt/qwkpage_p.h:
3162         (QWKPagePrivate::didRelaunchProcess):
3163         * UIProcess/win/WebView.cpp:
3164         (WebKit::WebView::didRelaunchProcess):
3165         * UIProcess/win/WebView.h:
3166         * WebKit2.xcodeproj/project.pbxproj:
3167
3168 2010-10-22  Anders Carlsson  <andersca@apple.com>
3169
3170         Reviewed by Sam Weinig.
3171
3172         WebContext::ensureWebProcess shouldn't send multiple InitializeWebProcess messages.
3173         https://bugs.webkit.org/show_bug.cgi?id=48158
3174         <rdar://problem/8512572>
3175
3176         If the web process was launching when another call to ensureWebProcess is sent, we
3177         would end up sending another InitializeWebProcess message to it which would result
3178         in assertions firing. Fix this by only checking for m_process, and not requiring a process
3179         to be valid (which it won't be until it's finished launching).
3180         
3181         * UIProcess/WebContext.cpp:
3182         (WebKit::WebContext::ensureWebProcess):
3183
3184 2010-10-22  Anders Carlsson  <andersca@apple.com>
3185
3186         Reviewed by Sam Weinig.
3187
3188         Rename revive to relaunch everywhere.
3189
3190         * UIProcess/API/mac/PageClientImpl.h:
3191         * UIProcess/API/mac/PageClientImpl.mm:
3192         (WebKit::PageClientImpl::didRelaunchProcess):
3193         * UIProcess/API/mac/WKView.mm:
3194         (-[WKView _didRelaunchProcess]):
3195         * UIProcess/API/mac/WKViewInternal.h:
3196         * UIProcess/PageClient.h:
3197         * UIProcess/WebContext.cpp:
3198         (WebKit::WebContext::relaunchProcessIfNecessary):
3199         * UIProcess/WebContext.h:
3200         * UIProcess/WebPageNamespace.h:
3201         * UIProcess/WebPageProxy.cpp:
3202         (WebKit::WebPageProxy::relaunch):
3203         (WebKit::WebPageProxy::initializeWebPage):
3204         (WebKit::WebPageProxy::loadURL):
3205         (WebKit::WebPageProxy::loadURLRequest):
3206         * UIProcess/WebPageProxy.h:
3207
3208 2010-10-22  Anders Carlsson  <andersca@apple.com>
3209
3210         Reviewed by Adam Roben.
3211
3212         Fix assert when a NetscapePluginModule loses its last NetscapePlugin.
3213         https://bugs.webkit.org/show_bug.cgi?id=48155
3214
3215         (The assert in question is ASSERT(pluginModuleIndex != notFound) in 
3216         NetscapePluginModule::shutdown()).
3217
3218         * WebProcess/Plugins/Netscape/NetscapePluginModule.cpp:
3219         (WebKit::NetscapePluginModule::pluginCreated):
3220         If we didn't have any live plug-ins, load the plug-in module.
3221
3222         (WebKit::NetscapePluginModule::pluginDestroyed):
3223         If this was the last plug-in, unload the plug-in module.
3224
3225         (WebKit::NetscapePluginModule::shutdown):
3226         Set m_isInitialized to false.
3227
3228         (WebKit::NetscapePluginModule::load):
3229         Don't do anything if the plug-in module has already been initialized.
3230
3231         (WebKit::NetscapePluginModule::unload):
3232         Assert that we're not initialized.
3233
3234         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3235         (WebKit::NetscapePlugin::platformPostInitialize):
3236         Assert that we successfully created the window.
3237
3238 2010-10-22  Jessie Berlin  <jberlin@apple.com>
3239
3240         Reviewed by Anders Carlsson.
3241
3242         Crash in Connection::isValid when called in response to
3243         VisitedLinksProvider::pendingVisitedLinksTimerFired after WebProcessProxy::didClose was
3244         already called.
3245         https://bugs.webkit.org/show_bug.cgi?id=48153
3246
3247         * UIProcess/VisitedLinkProvider.cpp:
3248         (WebKit::VisitedLinkProvider::stopVisitedLinksTimer):
3249         * UIProcess/VisitedLinkProvider.h:
3250
3251         * UIProcess/WebContext.cpp:
3252         (WebKit::WebContext::processDidClose):
3253         Stop the pendingVisitedLinksTimer and null out the process.
3254         * UIProcess/WebContext.h:
3255
3256         * UIProcess/WebProcessProxy.cpp:
3257         (WebKit::WebProcessProxy::didClose):
3258         Tell the WebContext that the WebProcess did close.
3259
3260 2010-10-22  Sam Weinig  <sam@webkit.org>
3261
3262         Fix Qt build.
3263
3264         * UIProcess/API/qt/ClientImpl.h:
3265
3266 2010-10-22  Sam Weinig  <sam@webkit.org>
3267
3268         Reviewed by Anders Carlsson.
3269
3270         WebKit2 needs to pass the current event modifier flags when requesting a new window
3271         https://bugs.webkit.org/show_bug.cgi?id=48140
3272
3273         In addition to passing modifier flags from the now passed NavigationAction, also pass
3274         the WindowFeatures to the UIProcess.
3275
3276         * Platform/CoreIPC/HandleMessage.h:
3277         (CoreIPC::callMemberFunction):
3278         * Shared/WebCoreArgumentCoders.h:
3279         * Shared/WebEvent.h:
3280         (WebKit::WebEvent::modifiers):
3281         * UIProcess/API/C/WKPage.h:
3282         * UIProcess/WebPageProxy.cpp:
3283         (WebKit::WebPageProxy::createNewPage):
3284         * UIProcess/WebPageProxy.h:
3285         * UIProcess/WebPageProxy.messages.in:
3286         * UIProcess/WebUIClient.cpp:
3287         (WebKit::WebUIClient::createNewPage):
3288         * UIProcess/WebUIClient.h:
3289         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3290         (WebKit::WebChromeClient::createWindow):
3291         * WebProcess/WebCoreSupport/WebChromeClient.h:
3292         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3293         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
3294         (WebKit::modifiersForNavigationAction):
3295         (WebKit::mouseButtonForNavigationAction):
3296         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3297
3298 2010-10-22  Anders Carlsson  <andersca@apple.com>
3299
3300         Reviewed by Sam Weinig.
3301
3302         Rename processDidExit to processDidCrash
3303         https://bugs.webkit.org/show_bug.cgi?id=48146
3304
3305         * UIProcess/API/C/WKPage.h:
3306         * UIProcess/API/mac/PageClientImpl.h:
3307         * UIProcess/API/mac/PageClientImpl.mm:
3308         (WebKit::PageClientImpl::processDidCrash):
3309         * UIProcess/API/mac/WKView.mm:
3310         (-[WKView _processDidCrash]):
3311         * UIProcess/API/mac/WKViewInternal.h:
3312         * UIProcess/API/qt/qwkpage.cpp:
3313         (QWKPage::QWKPage):
3314         * UIProcess/API/qt/qwkpage_p.h:
3315         (QWKPagePrivate::processDidCrash):
3316         * UIProcess/PageClient.h:
3317         * UIProcess/WebLoaderClient.cpp:
3318         (WebKit::WebLoaderClient::processDidBecomeUnresponsive):
3319         (WebKit::WebLoaderClient::processDidBecomeResponsive):
3320         (WebKit::WebLoaderClient::processDidCrash):
3321         * UIProcess/WebLoaderClient.h:
3322         * UIProcess/WebPageProxy.cpp:
3323         (WebKit::WebPageProxy::processDidBecomeUnresponsive):
3324         (WebKit::WebPageProxy::processDidBecomeResponsive):
3325         (WebKit::WebPageProxy::processDidCrash):
3326         * UIProcess/WebPageProxy.h:
3327         * UIProcess/WebProcessProxy.cpp:
3328         (WebKit::WebProcessProxy::didClose):
3329         * UIProcess/win/WebView.cpp:
3330         (WebKit::WebView::processDidCrash):
3331         * UIProcess/win/WebView.h:
3332
3333 2010-10-22  Dan Bernstein  <mitz@apple.com>
3334
3335         Reviewed by Sam Weinig.
3336
3337         Corrected target dependencies.
3338
3339         * WebKit2.xcodeproj/project.pbxproj: Made WebKit2 depend on DerivedSources and removed
3340         the explicit dependency of All on DerivedSources and WebKit2, since WebProcess depends on
3341         them.
3342
3343 2010-10-20  Jon Honeycutt  <jhoneycutt@apple.com>
3344
3345         <rdar://problem/8423766> Cursor does not become "busy" when a page is
3346         loading with WebKit2
3347
3348         Reviewed by Sam Weinig.
3349
3350         * UIProcess/API/C/win/WKViewPrivate.cpp: Added.
3351         (WKViewSetOverrideCursor):
3352         Call the WebView's setOverrideCursor().
3353
3354         * UIProcess/API/C/win/WKViewPrivate.h: Added.
3355         Declare WKViewSetOVerrideCursor().
3356
3357         * UIProcess/win/WebView.cpp:
3358         (WebKit::WebView::WebView):
3359         Initialize new member vars to 0.
3360         (WebKit::WebView::updateNativeCursor):
3361         If there is an override cursor, and the last cursor set from the web
3362         process was the arrow cursor, use the override cursor. Otherwise, use
3363         the cursor from the web process.
3364         (WebKit::WebView::setCursor):
3365         Record the web process's cursor, and call updateNativeCursor().
3366         (WebKit::WebView::setOverrideCursor):
3367         Record the override cursor, and call updateNativeCursor().
3368
3369         * UIProcess/win/WebView.h:
3370         Declare setOverrideCursor() and updateNativeCursor(). Add members to
3371         hold the last cursor set from the web process and the override cursor.
3372
3373         * win/WebKit2.vcproj:
3374         Add new files to project.
3375
3376         * win/WebKit2Generated.make:
3377         Copy WKViewPrivate.h with other headers.
3378
3379 2010-10-21  Anders Carlsson  <andersca@apple.com>
3380
3381         Reviewed by Adam Roben.
3382
3383         Crash evaluating JavaScript string that throws an exception
3384         https://bugs.webkit.org/show_bug.cgi?id=48092
3385         <rdar://problem/8487657>
3386
3387         * UIProcess/WebProcessProxy.cpp:
3388         (WebKit::WebProcessProxy::sendMessage):
3389         m_connection can be null here; just return false if that is the case.
3390     
3391         * WebProcess/WebPage/WebPage.cpp:
3392         (WebKit::WebPage::runJavaScriptInMainFrame):
3393         If the JSValue returned is null we just send along a null string.
3394
3395 2010-10-21  Adam Roben  <aroben@apple.com>
3396
3397         Invalidate the plugin's HWND when NPN_InvalidateRect is called
3398
3399         Fixes <http://webkit.org/b/48086> <rdar://problem/8482944> Silverlight
3400         doesn't repaint in WebKit2
3401
3402         Reviewed by Anders Carlsson.
3403
3404         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3405         (WebKit::NetscapePlugin::invalidate): Call platformInvalidate before
3406         invalidating via the PluginController.
3407
3408         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added platformInvalidate.
3409
3410         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3411         (WebKit::NetscapePlugin::platformInvalidate):
3412         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
3413         (WebKit::NetscapePlugin::platformInvalidate):
3414         Stubbed out.
3415
3416         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3417         (WebKit::NetscapePlugin::platformInvalidate): If the plugin is
3418         windowed, invalidate its HWND via ::InvalidateRect.
3419
3420 2010-10-21  Anders Carlsson  <andersca@apple.com>
3421
3422         Reviewed by John Sullivan.
3423
3424         Find indicator does not draw found text in WebKit2 when page is not scrolled to top
3425         <rdar://problem/8562647>
3426         https://bugs.webkit.org/show_bug.cgi?id=48089
3427
3428         We always want the selection rectangle in "WebCore window coordinates" which is the same
3429         as WKView coordinates in WebKit2.
3430
3431         * WebProcess/WebPage/FindController.cpp:
3432         (WebKit::FindController::updateFindIndicator):
3433
3434 2010-10-21  Anders Carlsson  <andersca@apple.com>
3435
3436         Reviewed by David Hyatt.
3437
3438         Always clear the selection when the find string isn't found
3439         https://bugs.webkit.org/show_bug.cgi?id=48087
3440         <rdar://problem/8564640>
3441
3442         * WebProcess/WebPage/FindController.cpp:
3443         (WebKit::FindController::findString):
3444
3445 2010-10-21  Alexey Proskuryakov  <ap@apple.com>
3446
3447         Reviewed by John Sullivan.
3448
3449         https://bugs.webkit.org/show_bug.cgi?id=48083
3450         <rdar://problem/8489082> Need WebKit2 API for private browsing
3451
3452         This just adds glue code for passing the preference from embedder to WebCore. The aspects of
3453         private browsing that WebCore is responsible for do work, but cookies are not handled yet.
3454
3455         * Shared/WebPreferencesStore.cpp:
3456         (WebKit::WebPreferencesStore::WebPreferencesStore):
3457         (WebKit::WebPreferencesStore::encode):
3458         (WebKit::WebPreferencesStore::decode):
3459         * Shared/WebPreferencesStore.h:
3460         * UIProcess/API/C/WKPreferences.cpp:
3461         (WKPreferencesSetPrivateBrowsingEnabled):
3462         (WKPreferencesGetPrivateBrowsingEnabled):
3463         * UIProcess/API/C/WKPreferences.h:
3464         * UIProcess/WebPreferences.cpp:
3465         (WebKit::WebPreferences::setPrivateBrowsingEnabled):
3466         (WebKit::WebPreferences::privateBrowsingEnabled):
3467         * UIProcess/WebPreferences.h:
3468         * WebProcess/WebPage/WebPage.cpp:
3469         (WebKit::WebPage::updatePreferences):
3470         Do what it takes to pass a single boolean from WebKit2 to WebCore. And we aren't even syncing
3471         the preference to user defaults yet.
3472
3473 2010-10-20  Adam Roben  <aroben@apple.com>
3474
3475         Ask the UI client to close the page when the WKView receives a WM_CLOSE
3476         message
3477
3478         Fixes <http://webkit.org/b/48044> <rdar://problem/8488446> Pressing
3479         Ctrl+W when viewing a full-page PDF destroys the WKView but doesn't
3480         close its parent window
3481
3482         Reviewed by Jon Honeycutt.
3483
3484         * UIProcess/win/WebView.cpp:
3485         (WebKit::WebView::wndProc): Call through to WebPageProxy::tryClose when
3486         we receive a WM_CLOSE message, rather than passing the message along to
3487         ::DefWindowProcW. tryClose will end up asking the UI client to close
3488         the page, while ::DefWindowProcW would destroy us synchronously without
3489         notifying the UI client at all. One case where we'll get sent a
3490         WM_CLOSE message is when the user presses Ctrl+W when using the Adobe
3491         Reader plugin to view a PDF.
3492
3493 2010-10-20  Adam Roben  <aroben@apple.com>
3494
3495         Remove confusing and redundant "host window" terminology from WKView on
3496         Windows
3497
3498         WKView's "host window" is really just its HWND's parent window. The
3499         terminology has been updated to reflect this. The unnecessary
3500         WKViewGetHostWindow function has been removed, as it was a synonym for
3501         ::GetParent(WKViewGetWindow(view)).
3502
3503         Fixes <http://webkit.org/b/48039> WKView's "host window" API is
3504         confusing
3505
3506         Reviewed by Sam Weinig.
3507
3508         * UIProcess/API/C/win/WKView.cpp:
3509         (WKViewCreate):
3510         (WKViewSetParentWindow):
3511         * UIProcess/API/C/win/WKView.h:
3512         Replaced "host window" with "parent window". Removed
3513         WKViewGetHostWindow.
3514
3515         * UIProcess/win/WebView.cpp:
3516         (WebKit::WebView::WebView):
3517         (WebKit::WebView::setParentWindow):
3518         (WebKit::WebView::windowAncestryDidChange):
3519         (WebKit::WebView::close):
3520         * UIProcess/win/WebView.h:
3521         (WebKit::WebView::create):
3522         Replaced "host window" with "parent window". Removed m_hostWindow and
3523         hostWindow().
3524
3525 2010-10-21  Sam Weinig  <sam@webkit.org>
3526
3527         Reviewed by Adam Roben.
3528
3529         Null frame passed when running alert from UserScript run at document start
3530         <rdar://problem/8573809>
3531         https://bugs.webkit.org/show_bug.cgi?id=48036
3532
3533         Don't initialize a Frame until after we have notified the UIProcess of its creation.
3534         This is necessary since arbitrary actions can happen during the call to Frame::init()
3535         such as the running of UserScripts.
3536
3537         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3538         (WebKit::WebFrameLoaderClient::createFrame):
3539         * WebProcess/WebPage/WebFrame.cpp:
3540         (WebKit::WebFrame::createMainFrame):
3541         (WebKit::WebFrame::createSubframe):
3542         (WebKit::WebFrame::create):
3543         (WebKit::WebFrame::WebFrame):
3544         (WebKit::WebFrame::init):
3545         * WebProcess/WebPage/WebFrame.h:
3546         * WebProcess/WebPage/WebPage.cpp:
3547         (WebKit::WebPage::WebPage):
3548
3549 2010-10-21  Balazs Kelemen  <kbalazs@webkit.org>
3550
3551         Reviewed by Andreas Kling.
3552
3553         [Qt] PluginInfoStore does not set up mime types for plugins
3554         https://bugs.webkit.org/show_bug.cgi?id=48063
3555
3556         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
3557         (WebKit::PluginInfoStore::getPluginInfo): Store the mime types
3558         that are supported by the plugin into the plugin argument.
3559
3560 2010-10-21  Juha Savolainen  <juha.savolainen@weego.fi>
3561
3562         Reviewed by Kenneth Rohde Christiansen.
3563
3564         This is initial implementation of QWKHistory. The QWKHistory class represents the history of a QWKPage.
3565         https://bugs.webkit.org/show_bug.cgi?id=47716
3566
3567         Each QWKPage instance contains a history of a visited pages that can be accessed by QWKHistory::history().
3568         The QWKPagePrivate class creates QWKHistory in constructor.
3569
3570         * UIProcess/API/qt/qwkhistory.cpp: Added.
3571         (QWKHistoryPrivate::QWKHistoryPrivate):
3572         (QWKHistoryPrivate::createHistory): Creates history object.
3573         (QWKHistoryPrivate::~QWKHistoryPrivate):
3574         (QWKHistory::QWKHistory):
3575         (QWKHistory::~QWKHistory):
3576         (QWKHistory::backListCount): Gets items count in back.
3577         (QWKHistory::forwardListCount): Gets items count in forward.
3578         (QWKHistory::count): Gets items count.
3579         * UIProcess/API/qt/qwkhistory.h: Added.
3580         * UIProcess/API/qt/qwkhistory_p.h: Added.
3581         * UIProcess/API/qt/qwkpage.cpp:
3582         (QWKPagePrivate::QWKPagePrivate):
3583         (QWKPagePrivate::~QWKPagePrivate):
3584         (QWKPage::history): Returns history object.
3585         * UIProcess/API/qt/qwkpage.h:
3586         * UIProcess/API/qt/qwkpage_p.h: Added history member variable.
3587         * WebKit2.pro: Added WKBackForwardList.h, WKBackForwardList.cpp and new files.
3588
3589 2010-10-14  Adam Roben  <aroben@apple.com>
3590
3591         Don't require the plugin to always use the same NPP struct we gave it
3592         in NPP_New
3593
3594         Neither WebCore, nor WebKit/mac, nor Firefox requires this, and
3595         Shockwave (at least) seems to use a different NPP struct that contains
3596         the same ndata member. So we shouldn't enforce it, either.
3597
3598         Fixes <http://webkit.org/b/47690> <rdar://problem/8553020> Assertion
3599         failure in NetscapePlugin::fromNPP when using Shockwave in WebKit2
3600
3601         Reviewed by John Sullivan.
3602
3603         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3604         (WebKit::NetscapePlugin::fromNPP): Removed the bogus assertion.
3605
3606 2010-10-20  Anders Carlsson  <andersca@apple.com>
3607
3608         Fix clang++ build.
3609
3610         * UIProcess/API/C/WKNativeEvent.h:
3611
3612 2010-10-20  Eric Carlson  <eric.carlson@apple.com>
3613
3614         Reviewed by Simon Fraser.
3615
3616         Crash closing page with <video> element
3617         https://bugs.webkit.org/show_bug.cgi?id=47960
3618         <rdar://problem/8573297>
3619
3620         I couldn't think of a good way to make a layout test for this because the
3621         crash isn't triggered by closing an iframe.
3622
3623         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3624         (WebKit::WebChromeClient::scheduleCompositingLayerSync): NULL check drawingArea().
3625
3626 2010-10-20  Anders Carlsson  <andersca@apple.com>
3627
3628         Reviewed by Darin Adler.
3629
3630         Out of process plug-ins are never asked to initially paint
3631         https://bugs.webkit.org/show_bug.cgi?id=47993
3632         <rdar://problem/8570342>
3633
3634         * Platform/CoreIPC/HandleMessage.h:
3635         (CoreIPC::callMemberFunction):
3636         Add new callMemberFunction overload.
3637
3638         * PluginProcess/PluginControllerProxy.cpp:
3639         (WebKit::PluginControllerProxy::paintEntirePlugin):
3640         Set the dirty rect to be the entire plug-in rect and then paint the plug-in.
3641
3642         * PluginProcess/PluginControllerProxy.messages.in:
3643         Add PaintEntirePlugin message.
3644
3645         * WebProcess/Plugins/PluginProxy.cpp:
3646         (WebKit::PluginProxy::PluginProxy):
3647         Initialize m_pluginBackingStoreContainsValidData to false.
3648
3649         (WebKit::PluginProxy::paint):
3650         If m_pluginBackingStoreContainsValidData is false, synchronously ask the plug-in to paint,
3651         then blit the plug-in backing store into our own backing store.
3652
3653         (WebKit::PluginProxy::geometryDidChange):