21b7665ec512b84293a813673e24e85156a89242
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2011-05-16  David Kilzer  <ddkilzer@apple.com>
2
3         <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
4         <rdar://problem/9446430>
5
6         Reviewed by Mark Rowe.
7
8         * Configurations/Base.xcconfig: Fixed typo.
9
10 2011-05-16  Anders Carlsson  <andersca@apple.com>
11
12         Reviewed by Dan Bernstein.
13
14         If the root compositing layer changes while we're about to exit compositing mode, make sure to enter compositing mode
15         https://bugs.webkit.org/show_bug.cgi?id=60905
16         <rdar://problem/9365574>
17
18         * WebProcess/WebPage/DrawingAreaImpl.cpp:
19         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
20         If we have a layer tree host, but haven't yet sent a EnterAcceleratedCompositingMode message (this can happen
21         when quickly going in and out of compositing mode), make sure to schedule a notification when the layer tree host
22         does it next flush. This will end up sending the EnterAcceleratedCompositingMode message.
23
24 2011-05-13  Jer Noble  <jer.noble@apple.com>
25
26         Reviewed by Simon Fraser.
27
28         Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens)
29         https://bugs.webkit.org/show_bug.cgi?id=60826
30
31         Emit a notification when moving a CALayer from the WebProcess's main
32         layer host to a new context.  This allows listeners to invalidate their
33         layers which may not support moving between different CAContexts (as is
34         the case with QTMovieLayer).  In order to allow listeners to determine if they
35         are affected, the notification will pass the root CALayer in a userInfo
36         dictionary.
37
38         In WebFullScreenManagerMac, move from storing a pointer to a non-refcounted
39         class (GraphicsLayer) to a retainable class (PlatformLayer).
40
41         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
42         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
43         (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): No need to initialize
44             m_fullScreenRootLayer now that it is a RetainPtr<>.
45         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Emit a notification
46             after either creating or destroying the full screen layer host.
47         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
48         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
49
50 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
51
52         Rubber-stamped by Csaba Osztrogonác.
53
54         [Qt][Wk2][Symbian] Fix build after r86560
55         https://bugs.webkit.org/show_bug.cgi?id=60887
56
57         Temporarily fix Symbian build by re-enabling compilation
58         of Qt/Gtk common code (as was the case for Symbian before r55875).
59         This is a stop gap until the pure Symbian Core IPC and process launching bits land in Bug 55875
60         As of this revision, only the native SharedMemory implementation is in trunk.
61
62         * Platform/CoreIPC/Attachment.h: Compile Qt/Gtk common code for Qt-Symbian too
63         * Platform/CoreIPC/Connection.h: ditto
64         * Platform/SharedMemory.h:       ditto
65         * Platform/qt/SharedMemorySymbian.cpp: stub implementations of attachment handling
66         (WebKit::SharedMemory::Handle::releaseToAttachment):
67         (WebKit::SharedMemory::Handle::adoptFromAttachment):
68
69 2011-05-16  Jon Lee  <jonlee@apple.com>
70
71         Reviewed by Simon Fraser.
72
73         Can't horizontally scroll iframes and overflow because wheel events are always accepted
74         https://bugs.webkit.org/show_bug.cgi?id=60779
75
76         We keep track of the number of horizontal scrollbars and mouse wheel event handlers in the
77         UI process as a means of determining whether horizontal scroll events will be handled
78         by the web process.
79
80         * UIProcess/WebPageProxy.cpp:
81         (WebKit::WebPageProxy::willHandleHorizontalScrollEvents): Return true if there is at least
82         one wheel event handler
83         * UIProcess/WebPageProxy.h: Add new variable to cache the count
84         (WebKit::WebPageProxy::numWheelEventHandlersChanged): Sets the count
85
86         The rest just provides all the connections.
87         * UIProcess/API/C/WKPage.cpp:
88         (WKPageWillHandleHorizontalScrollEvents):
89         * UIProcess/API/C/WKPage.h:
90         * UIProcess/WebPageProxy.messages.in:
91         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
92         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
93         (WebKit::InjectedBundlePageUIClient::shouldRubberBandInDirection):
94         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
95         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
96         (WebKit::WebChromeClient::shouldRubberBandInDirection): Forward to injected bundle UI client
97         (WebKit::WebChromeClient::updateCountWheelEventHandlers): Updates the web page proxy
98         * WebProcess/WebCoreSupport/WebChromeClient.h:
99
100 2011-05-16  Anders Carlsson  <andersca@apple.com>
101
102         Reviewed by Oliver Hunt.
103
104         Silverlight: Selection via keyboard selects the entire plugin instead of the contents of a TextBox
105         https://bugs.webkit.org/show_bug.cgi?id=60898
106         <rdar://problem/9309903>
107
108         Special-case Command-A and always return true, indicating that the plug-in handled the event.
109         This matches WebKit1.
110
111         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
112         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
113
114 2011-05-16  Anders Carlsson  <andersca@apple.com>
115
116         Reviewed by Oliver Hunt.
117
118         Short-circuit NPRuntime calls made by Flash during plug-in instantiation
119         https://bugs.webkit.org/show_bug.cgi?id=60894
120         <rdar://problem/8804681>
121
122         During plug-in instantiation, Flash makes a couple of NPRuntime calls to get the
123         URL of the current document as well as the URL of the toplevel document. This leads to
124         a bunch of IPC traffic that slows down instantiation.
125
126         Since we know what calls Flash is making and what results are expected, we can handle the
127         NPRuntime calls directly in the plug-in process and avoid extra IPC overhead.
128
129         * PluginProcess/PluginControllerProxy.cpp:
130         (WebKit::PluginControllerProxy::PluginControllerProxy):
131         Initialize m_pluginCreationParameters.
132
133         (WebKit::PluginControllerProxy::initialize):
134         Set m_pluginCreationParameters to point to the creation parameters right before
135         calling Plugin::initialize and restore it back afterwards.
136
137         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
138         If the plug-in calling NPN_Invoke has the CanShortCircuitSomeNPRuntimeCallsDuringInitialization
139         quirk, and we're being initialized, check for the __flash_getWindowLocation and
140         __flash_getTopLocation function calls and return the correct values.
141
142         (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
143         Check if the script string has the definitions of __flash_getWindowLocation or __flash_getTopLocation
144         and just ignore them. Note that ignoring them has the effect of not adding them to the window object,
145         which could in theory be a backwards compatibility problem if web pages were to assume that these
146         functions existed on a page with plug-ins. In practice this is probably not a problem, especially since
147         these functions are only used on Mac WebKit.
148
149         * PluginProcess/PluginControllerProxy.h:
150         (WebKit::PluginControllerProxy::inInitialize):
151         Add helper function.
152
153         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
154         (WebKit::NetscapePluginModule::determineQuirks):
155         Add the CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk for Flash on Mac.
156
157         * Shared/Plugins/PluginQuirks.h:
158         Add Mac specific CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk.
159
160 2011-05-16  Anders Carlsson  <andersca@apple.com>
161
162         Reviewed by Adam Roben.
163
164         Add a returnValue parameter to tryToShortCircuitInvoke
165         https://bugs.webkit.org/show_bug.cgi?id=60891
166
167         tryToShortCircuitInvoke needs to be able to indicate that an invoke
168         call failed. Add a returnValue parameter and have the real return value
169         indicate whether tryToShortCircuitInvoke did short-circuit the invoke or not.
170
171         * PluginProcess/PluginControllerProxy.cpp:
172         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
173         * PluginProcess/PluginControllerProxy.h:
174         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
175         (WebKit::NPN_Invoke):
176         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
177         (WebKit::NetscapePlugin::tryToShortCircuitInvoke):
178         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
179         * WebProcess/Plugins/PluginController.h:
180         * WebProcess/Plugins/PluginView.cpp:
181         (WebKit::PluginView::tryToShortCircuitInvoke):
182         * WebProcess/Plugins/PluginView.h:
183
184 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
185
186         Reviewed by Csaba Osztrogonác.
187
188         [Qt][Wk2][Symbian] Fix build after r86560
189         https://bugs.webkit.org/show_bug.cgi?id=60887
190
191         * Platform/CoreIPC/ArgumentDecoder.cpp:
192         (CoreIPC::ArgumentDecoder::~ArgumentDecoder): guard Unix and Gtk code with USE(UNIX_DOMAIN_SOCKETS)
193         * Platform/CoreIPC/ArgumentEncoder.cpp:
194         (CoreIPC::ArgumentEncoder::~ArgumentEncoder): ditto
195
196 2011-05-16  Anders Carlsson  <andersca@apple.com>
197
198         Reviewed by Adam Roben.
199
200         Add the ability for a plug-in controller to short-circuit calls to NPN_Invoke
201         https://bugs.webkit.org/show_bug.cgi?id=60886
202
203         Make it possible for a plug-in controller to intercept calls to NPN_Invoke, which
204         will be useful for avoiding sync IPC messages during instantiation.
205
206         * PluginProcess/PluginControllerProxy.cpp:
207         (WebKit::PluginControllerProxy::evaluate):
208         Call tryToShortCircuitEvaluate. If it returns true, we don't need to call back to
209         the web process to ask it to evaluate the script string.
210
211         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
212         (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
213         Always return false for now.
214
215         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
216         (WebKit::NPN_Invoke):
217         Get the plug-in and call tryToShortCircuitInvoke.
218
219         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
220         (WebKit::NetscapePlugin::tryToShortCircuitInvoke):
221         Call the plug-in controller.
222
223         * WebProcess/Plugins/PluginView.cpp:
224         (WebKit::PluginView::tryToShortCircuitInvoke):
225         Always return false here, since there's no need to short-circuit calls
226         for plug-ins that live in the web process.
227
228 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
229
230         Reviewed by Laszlo Gombos.
231
232         [Qt][WK2][Symbian] Shared memory implementation for Symbian
233         https://bugs.webkit.org/show_bug.cgi?id=55875
234
235         Use global chunks for sharing data between processes.
236         This is an initial implementation. An outstanding issue
237         is the correct way to close() the chunk in the SharedMemory d'tor
238         without triggering a delete by the kernel when the ref-count
239         temporarily goes to zero.
240
241         * Platform/SharedMemory.h: platform specific handle and chunk name
242         * Platform/qt/SharedMemorySymbian.cpp: Added. Native Symbian OS implementation
243         using RChunk.CreateGlobal() for named chunks. The chunk name is serialized
244         and sent over the IPC channel and opened by the remote process using
245         RChunk.OpenGlobal().
246
247         (WebKit::SharedMemory::Handle::Handle):
248         (WebKit::SharedMemory::Handle::~Handle):
249         (WebKit::SharedMemory::Handle::isNull):
250         (WebKit::SharedMemory::Handle::encode):
251         (WebKit::SharedMemory::Handle::decode):
252         (WebKit::SharedMemory::create):
253         (WebKit::SharedMemory::~SharedMemory):
254         (WebKit::SharedMemory::createHandle):
255         (WebKit::SharedMemory::systemPageSize):
256         * Platform/unix/SharedMemoryUnix.cpp: Exclude Qt-Symbian using HAVE(UNIX_DOMAIN_SOCKETS)
257         * WebKit2.pro: Add SharedMemorySymbian.cpp
258
259 2011-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
260
261         Unreviewed. Fix WebKit2 GTK build after r86489.
262
263         * GNUmakefile.am: Add PluginProcess/PluginCreationParameters.cpp
264         and PluginProcess/PluginCreationParameters.h to compilation.
265
266 2011-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
267
268         Reviewed by Martin Robinson.
269
270         [GTK] Enable building GTK port with ENABLE_PLUGIN_PROCESS=1
271         https://bugs.webkit.org/show_bug.cgi?id=58223
272
273         * GNUmakefile.am: Add new files to compilation.
274         * PluginProcess/gtk/PluginControllerProxyGtk.cpp: Added.
275         (WebKit::PluginControllerProxy::platformInitialize):
276         (WebKit::PluginControllerProxy::platformDestroy):
277         (WebKit::PluginControllerProxy::platformGeometryDidChange):
278         * PluginProcess/gtk/PluginProcessGtk.cpp: Added.
279         (WebKit::PluginProcess::platformInitialize):
280         * UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp: Added.
281         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
282         * WebProcess/Plugins/Netscape/gtk/PluginProxyGtk.cpp: Added.
283         (WebKit::PluginProxy::needsBackingStore):
284
285 2011-05-16  Adam Barth  <abarth@webkit.org>
286
287         Attempt to fix the Qt build.  (Strict PassOwnPtr fix.)
288
289         * Shared/qt/ShareableBitmapQt.cpp:
290         (WebKit::ShareableBitmap::createGraphicsContext):
291
292 2011-05-15  Michael Saboff  <msaboff@apple.com>
293
294         Reviewed by Geoffrey Garen.
295
296         Suboptimal lifetime of BackingStore objects in DrawingAreaProxyImpl
297         https://bugs.webkit.org/show_bug.cgi?id=60864
298
299         Implemented reuse of BackingStore's in 
300         DrawingAreaProxyImpl::didUpdateBackingStoreState when the size needed
301         matches the size of the existing BackingStore.
302         Also reduced the discardBackingStoreTimer from 5 to 2 seconds.
303         These changes reduces memory usage up to 10MB on memory tests.
304
305         * UIProcess/DrawingAreaProxyImpl.cpp:
306         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
307         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
308
309 2011-05-15  Anders Carlsson  <andersca@apple.com>
310
311         Reviewed by Maciej Stachowiak.
312
313         Pass the window NPObject identifier in the plug-in creation parameters
314         https://bugs.webkit.org/show_bug.cgi?id=60865
315
316         This avoids a synchronous call when the plug-in wants to get the NPObject that
317         corresponds to the window.
318
319         * PluginProcess/PluginControllerProxy.cpp:
320         (WebKit::PluginControllerProxy::initialize):
321         Change this to take the PluginCreationParameters. Initialize the window NPObject.
322
323         (WebKit::PluginControllerProxy::windowScriptNPObject):
324         Just return the window NPObject; it's already been initialized.
325
326         * PluginProcess/PluginControllerProxy.h:
327         * PluginProcess/PluginCreationParameters.cpp:
328         (WebKit::PluginCreationParameters::PluginCreationParameters):
329         (WebKit::PluginCreationParameters::encode):
330         (WebKit::PluginCreationParameters::decode):
331         * PluginProcess/PluginCreationParameters.h:
332         Add the window NPObject ID.
333
334         * PluginProcess/WebProcessConnection.cpp:
335         (WebKit::WebProcessConnection::createPlugin):
336         Pass the creation parameters to PluginControllerProxy::initialize.
337
338         * WebProcess/Plugins/PluginProxy.cpp:
339         (WebKit::PluginProxy::initialize):
340         Initialize the window NPObject ID.
341
342         * WebProcess/Plugins/PluginProxy.messages.in:
343         Remove the GetWindowScriptNPObject message.
344
345 2011-05-15  Anders Carlsson  <andersca@apple.com>
346
347         Reviewed by Geoffrey Garen.
348
349         Pass the document URL and toplevel document URL when creating a plug-in
350         https://bugs.webkit.org/show_bug.cgi?id=60863
351
352         This is the first of a series of patches intended to reduce the IPC traffic
353         during plug-in instantiation.
354
355         * WebProcess/Plugins/Plugin.cpp:
356         (WebKit::Plugin::Parameters::encode):
357         Encode the URLs.
358
359         (WebKit::Plugin::Parameters::decode):
360         Decode the URLs.
361
362         * WebProcess/Plugins/Plugin.h:
363         Add the document and toplevel document URLs.
364
365         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
366         (WebKit::WebFrameLoaderClient::createPlugin):
367         Initialize the document and toplevel document URLs.
368
369 2011-05-13  Oliver Hunt  <oliver@apple.com>
370
371         Reviewed by Geoffrey Garen.
372
373         Make GC validation more aggressive
374         https://bugs.webkit.org/show_bug.cgi?id=60802
375
376         Add GC_VALIDATION calls to all the JSNPObject methods.
377
378         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
379         (WebKit::JSNPObject::invalidate):
380         (WebKit::JSNPObject::callMethod):
381         (WebKit::JSNPObject::callObject):
382         (WebKit::JSNPObject::callConstructor):
383         (WebKit::JSNPObject::getCallData):
384         (WebKit::JSNPObject::getConstructData):
385         (WebKit::JSNPObject::getOwnPropertySlot):
386         (WebKit::JSNPObject::getOwnPropertyDescriptor):
387         (WebKit::JSNPObject::put):
388         (WebKit::JSNPObject::getOwnPropertyNames):
389         (WebKit::JSNPObject::propertyGetter):
390         (WebKit::JSNPObject::methodGetter):
391
392 2011-05-13  Oliver Hunt  <oliver@apple.com>
393
394         Reviewed by Geoffrey Garen.
395
396         Make GC validation more aggressive
397         https://bugs.webkit.org/show_bug.cgi?id=60802
398
399         Add GC_VALIDATION calls to all the JSNPObject methods.
400
401         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
402         (WebKit::JSNPObject::invalidate):
403         (WebKit::JSNPObject::callMethod):
404         (WebKit::JSNPObject::callObject):
405         (WebKit::JSNPObject::callConstructor):
406         (WebKit::JSNPObject::getCallData):
407         (WebKit::JSNPObject::getConstructData):
408         (WebKit::JSNPObject::getOwnPropertySlot):
409         (WebKit::JSNPObject::getOwnPropertyDescriptor):
410         (WebKit::JSNPObject::put):
411         (WebKit::JSNPObject::getOwnPropertyNames):
412         (WebKit::JSNPObject::propertyGetter):
413         (WebKit::JSNPObject::methodGetter):
414
415 2011-05-14  Alexey Proskuryakov  <ap@apple.com>
416
417         Reviewed by Sam Weinig.
418
419         WebKit2: Smart cut&paste is broken
420         https://bugs.webkit.org/show_bug.cgi?id=60840
421         <rdar://problem/9439927>
422
423         * UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::isSmartInsertDeleteEnabled):
424         Match WK1 - this default defaults to YES if not present.
425
426 2011-05-14  Dan Bernstein  <mitz@apple.com>
427
428         Reviewed by Alice Liu.
429
430         WKView does not draw after forced repaint before the first update
431         https://bugs.webkit.org/show_bug.cgi?id=60845
432
433         * UIProcess/DrawingAreaProxy.h:
434         (WebKit::DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint): Added.
435         * UIProcess/DrawingAreaProxyImpl.cpp:
436         (WebKit::DrawingAreaProxyImpl::waitForBackingStoreUpdateOnNextPaint): Set m_hasReceivedFirstUpdate
437         to true, ensuring that paint() will wait for an update if needed.
438         * UIProcess/DrawingAreaProxyImpl.h:
439         * UIProcess/WebPageProxy.cpp:
440         (WebKit::WebPageProxy::forceRepaint): Call DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint().
441
442 2011-05-14  Anders Carlsson  <andersca@apple.com>
443
444         Reviewed by Sam Weinig.
445
446         Document the WantsMozillaUserAgent quirk and make it Windows specific
447         https://bugs.webkit.org/show_bug.cgi?id=60843
448
449         * Shared/Plugins/PluginQuirks.h:
450         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
451         (WebKit::NetscapePlugin::userAgent):
452
453 2011-05-14  Anders Carlsson  <andersca@apple.com>
454
455         Reviewed by Sam Weinig.
456
457         Consolidate plug-in creation parameters to a single struct
458         https://bugs.webkit.org/show_bug.cgi?id=60839
459
460         * PluginProcess/PluginControllerProxy.cpp:
461         (WebKit::PluginControllerProxy::create):
462         (WebKit::PluginControllerProxy::PluginControllerProxy):
463         * PluginProcess/PluginControllerProxy.h:
464         * PluginProcess/PluginCreationParameters.cpp: Added.
465         (WebKit::PluginCreationParameters::PluginCreationParameters):
466         (WebKit::PluginCreationParameters::encode):
467         (WebKit::PluginCreationParameters::decode):
468         * PluginProcess/PluginCreationParameters.h: Added.
469         * PluginProcess/WebProcessConnection.cpp:
470         (WebKit::WebProcessConnection::createPlugin):
471         * PluginProcess/WebProcessConnection.h:
472         * PluginProcess/WebProcessConnection.messages.in:
473         * Scripts/webkit2/messages.py:
474         * WebKit2.xcodeproj/project.pbxproj:
475         * WebProcess/Plugins/PluginProxy.cpp:
476         (WebKit::PluginProxy::initialize):
477
478 2011-05-14  Anders Carlsson  <andersca@apple.com>
479
480         Reviewed by Kevin Decker.
481
482         NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
483         https://bugs.webkit.org/show_bug.cgi?id=60823
484         <rdar://problem/9430386>
485
486         If a plug-in stream fails to load before it's been started, we won't destroy the stream.
487
488         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
489         (WebKit::NetscapePluginStream::stop):
490         Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream.
491
492         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
493         Pass the request URL to NPP_URLNotify, matching other browsers.
494
495 2011-05-14  Jer Noble  <jer.noble@apple.com>
496
497         Reviewed by Simon Fraser.
498
499         Flashing window frame and graphical glitches after exiting full screen mode.
500         https://bugs.webkit.org/show_bug.cgi?id=60825
501
502         A layer-backed WebView throws an exception when moved from a layer-backed parent view
503         to a non-layer-backed one, so make the WebView a child of the content view, instead of
504         the animation view.  There is an unrelated fix in beganExitFullScreen, which was calling
505         finishedExitFullScreenAnimation: instead of finishedEnterFullScreenAnimation: when 
506         notifications come out of order.
507
508         * UIProcess/mac/WKFullScreenWindowController.mm:
509         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Add the _webView
510             to the full screen window's content view, instead of the _animationView.
511         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Call 
512             finishedEnterFullScreenAnimation: instead of finishedExitFullScreenAnimation:.
513         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Add the
514             _layerHostingView to the contentView, instead of the animationView.
515
516 2011-05-14  Csaba Osztrogonác  <ossy@webkit.org>
517
518         Unreviewed, rolling out r86469 and r86471, because they made hundreds tests crash on Qt.
519
520         Make GC validation more aggressive
521         https://bugs.webkit.org/show_bug.cgi?id=60802
522
523         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
524         (WebKit::JSNPObject::invalidate):
525         (WebKit::JSNPObject::callMethod):
526         (WebKit::JSNPObject::callObject):
527         (WebKit::JSNPObject::callConstructor):
528         (WebKit::JSNPObject::getCallData):
529         (WebKit::JSNPObject::getConstructData):
530         (WebKit::JSNPObject::getOwnPropertySlot):
531         (WebKit::JSNPObject::getOwnPropertyDescriptor):
532         (WebKit::JSNPObject::put):
533         (WebKit::JSNPObject::getOwnPropertyNames):
534         (WebKit::JSNPObject::propertyGetter):
535         (WebKit::JSNPObject::methodGetter):
536
537 2011-05-14  Sheriff Bot  <webkit.review.bot@gmail.com>
538
539         Unreviewed, rolling out r86476.
540         http://trac.webkit.org/changeset/86476
541         https://bugs.webkit.org/show_bug.cgi?id=60832
542
543         It made plugins/get-url-notify-with-url-that-fails-to-
544         load.html crash on GTK (Requested by Ossy on #webkit).
545
546         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
547         (WebKit::NetscapePluginStream::stop):
548         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
549
550 2011-05-13  Enrica Casucci  <enrica@apple.com>
551
552         Reviewed by Darin Adler and Brian Weinstein.
553
554         REGRESSION (WK2): Can't drag and drop a link or image from Safari to Desktop
555         https://bugs.webkit.org/show_bug.cgi?id=60819
556         <rdar://problem/9370689>
557
558         To support drag-and-drop to the desktop and other windows applications,
559         we need to support the fileDescriptor and fileContentZero clipboard formats.
560         This patch adds the support for serializing these types across the process boundary.
561
562         * Platform/CoreIPC/Arguments.h: Added support for messages with 10 arguments.
563         (CoreIPC::Arguments10::Arguments10):
564         (CoreIPC::Arguments10::encode):
565         (CoreIPC::Arguments10::decode):
566         (CoreIPC::In):
567         (CoreIPC::Out):
568         * Platform/CoreIPC/HandleMessage.h:
569         (CoreIPC::callMemberFunction): Added support for memebers with 10 arguments.
570         * UIProcess/WebPageProxy.cpp:
571         (WebKit::WebPageProxy::startDragDrop):
572         * UIProcess/WebPageProxy.h:
573         * UIProcess/WebPageProxy.messages.in:
574         * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp:
575         (WebKit::WebDragClient::startDrag):
576
577 2011-05-13  Anders Carlsson  <andersca@apple.com>
578
579         Reviewed by Sam Weinig.
580
581         NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
582         https://bugs.webkit.org/show_bug.cgi?id=60823
583         <rdar://problem/9430386>
584
585         If a plug-in stream fails to load before it's been started, we won't destroy the stream.
586
587         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
588         (WebKit::NetscapePluginStream::stop):
589         Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream.
590
591         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
592         Pass the request URL to NPP_URLNotify, matching other browsers.
593
594 2011-05-13  Michael Saboff  <msaboff@apple.com>
595
596         Reviewed by Geoffrey Garen.
597
598         Backing store may not get discarded due to stopped timer
599         https://bugs.webkit.org/show_bug.cgi?id=60816
600
601         Changed the backing store timer to restart if it has been stopped.
602         The evaluation is done when the view's state is changed.
603         This change appears to be worth ~3MB (one backing store worth)
604         during memory tests.
605
606         * UIProcess/DrawingAreaProxyImpl.cpp:
607         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
608         * UIProcess/WebPageProxy.cpp:
609         (WebKit::WebPageProxy::viewStateDidChange):
610
611 2011-05-13  Oliver Hunt  <oliver@apple.com>
612
613         Reviewed by Geoffrey Garen.
614
615         Make GC validation more aggressive
616         https://bugs.webkit.org/show_bug.cgi?id=60802
617
618         Add GC_VALIDATION calls to all the JSNPObject methods.
619
620         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
621         (WebKit::JSNPObject::invalidate):
622         (WebKit::JSNPObject::callMethod):
623         (WebKit::JSNPObject::callObject):
624         (WebKit::JSNPObject::callConstructor):
625         (WebKit::JSNPObject::getCallData):
626         (WebKit::JSNPObject::getConstructData):
627         (WebKit::JSNPObject::getOwnPropertySlot):
628         (WebKit::JSNPObject::getOwnPropertyDescriptor):
629         (WebKit::JSNPObject::put):
630         (WebKit::JSNPObject::getOwnPropertyNames):
631         (WebKit::JSNPObject::propertyGetter):
632         (WebKit::JSNPObject::methodGetter):
633
634 2011-05-13  Anders Carlsson  <andersca@apple.com>
635
636         Reviewed by Sam Weinig.
637
638         NPN_GetURL with a javascript: URL doesn't send back the result in the stream
639         https://bugs.webkit.org/show_bug.cgi?id=60810
640
641         In NetscapePluginStream::sendJavaScriptStream, we were incorrectly passing the result URL
642         to the stream, instead of the result. Also, store the request URL in the NetscapePluginStream object
643         to avoid sending it over the wire.
644
645         * PluginProcess/PluginControllerProxy.cpp:
646         (WebKit::PluginControllerProxy::didEvaluateJavaScript):
647         * PluginProcess/PluginControllerProxy.h:
648         * PluginProcess/PluginControllerProxy.messages.in:
649         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
650         (WebKit::NetscapePlugin::loadURL):
651         (WebKit::NetscapePlugin::didEvaluateJavaScript):
652         (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
653         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
654         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
655         (WebKit::NetscapePluginStream::NetscapePluginStream):
656         (WebKit::NetscapePluginStream::sendJavaScriptStream):
657         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
658         (WebKit::NetscapePluginStream::create):
659         * WebProcess/Plugins/Plugin.h:
660         * WebProcess/Plugins/PluginProxy.cpp:
661         (WebKit::PluginProxy::didEvaluateJavaScript):
662         * WebProcess/Plugins/PluginProxy.h:
663         * WebProcess/Plugins/PluginView.cpp:
664         (WebKit::PluginView::performJavaScriptURLRequest):
665
666 2011-05-13  Jeff Miller  <jeffm@apple.com>
667
668         Reviewed by Darin Adler.
669
670         Make some page() member functions const
671         https://bugs.webkit.org/show_bug.cgi?id=60794
672
673         * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Make page() const.
674         * UIProcess/WebFrameProxy.h:
675         (WebKit::WebFrameProxy::page): Make page() const.
676         * UIProcess/WebInspectorProxy.h:
677         (WebKit::WebInspectorProxy::page): Make page() const.
678         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp:
679         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
680         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
681         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
682         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
683         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
684         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
685         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
686
687 2011-05-13  Adam Roben  <aroben@apple.com>
688
689         Load plugins in the order they're found
690
691         Fixes <http://webkit.org/b/60788> <rdar://problem/9435787> REGRESSION (r69790): WebKit2
692         doesn't prefer plugins in the additional plugins directory
693
694         Reviewed by Anders Carlsson.
695
696         * UIProcess/Plugins/PluginInfoStore.cpp:
697         (WebKit::addFromVector):
698         Changed to use a ListHashSet instead of a HashSet to store the plugin paths.
699
700 2011-05-13  Sam Weinig  <sam@webkit.org>
701
702         Reviewed by Anders Carlsson.
703
704         Prune #includes from FrameView.h (Part 2)
705         https://bugs.webkit.org/show_bug.cgi?id=60748
706
707         - Update files that were depending on FrameView.h #including Frame.h or
708           Page.h.
709
710         * WebProcess/Plugins/PluginView.cpp:
711         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
712         * WebProcess/WebPage/WebContextMenu.cpp:
713         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
714
715 2011-05-13  Martin Robinson  <mrobinson@igalia.com>
716
717         Reviewed by Eric Seidel.
718
719         [GTK] Share the GTK+ key binding code between WebKit1 and WebKit2
720         https://bugs.webkit.org/show_bug.cgi?id=59765
721
722         Use the new KeyBindingTranslator class from WebCore/platform/gtk. With this utility
723         class we can now share the code with WebKit2.
724
725         * UIProcess/API/gtk/PageClientImpl.cpp:
726         (WebKit::PageClientImpl::PageClientImpl): No longer need to initialize keybinding code.
727         (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Use the new utility class.
728         * UIProcess/API/gtk/PageClientImpl.h: Remove unnecessary members. Add utility class member.
729
730 2011-05-12  Pratik Solanki  <psolanki@apple.com>
731
732         Reviewed by Antti Koivisto.
733
734         Part of WebCore should use CFNetwork-based loader on Mac
735         https://bugs.webkit.org/show_bug.cgi?id=51836
736
737         Use CFRunLoop when using CFNetwork.
738
739         * WebProcess/WebPage/mac/WebPageMac.mm:
740         (WebKit::WebPage::platformInitialize):
741
742 2011-05-12  Sam Weinig  <sam@webkit.org>
743
744         Reviewed by Gavin Barraclough.
745
746         WebProcess sandbox denies file:/// accesses after you navigate to a nonexistent file
747         <rdar://problem/9427752>
748         https://bugs.webkit.org/show_bug.cgi?id=60745
749
750         * WebProcess/WebPage/WebPage.cpp:
751         (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
752         Don't attempt to re-use a non-existent committed sandbox extension. This can
753         happen when the previous load was file: url, but did not require an extension,
754         such as an error page.
755
756 2011-05-12  Jia Pu  <jpu@apple.com>
757
758         Reviewed by Darin Adler.
759
760         Regression caused by changeset 86281
761         https://bugs.webkit.org/show_bug.cgi?id=60712
762         <rdar://problem/9427970>
763
764         Removed the condition variable. [NSSpellChecker dismissCorrectionIndicatorForView:] is blocking.
765         So handleAcceptedReplacement() triggered by dismissInternal() will return before dismissInternal()
766         returns. So we don't need to use the condition to coordinate between these two function. In fact,
767         all callbacks are delivered on main thread. We don't really need any locking here.
768
769         Since now we don't have distinction between dismiss() and dismissSoon(). dismissSoon() has
770         been removed.
771
772         * UIProcess/API/mac/PageClientImpl.mm:
773         (WebKit::PageClientImpl::dismissCorrectionPanelSoon):
774         * UIProcess/mac/CorrectionPanel.h:
775         * UIProcess/mac/CorrectionPanel.mm:
776         (WebKit::CorrectionPanel::CorrectionPanel):
777         (WebKit::CorrectionPanel::show):
778         (WebKit::CorrectionPanel::dismiss):
779         (WebKit::CorrectionPanel::dismissInternal):
780         (WebKit::CorrectionPanel::handleAcceptedReplacement):
781
782 2011-05-12  Brian Weinstein  <bweinstein@apple.com>
783
784         Reviewed by Adam Roben.
785
786         WebKit2: Implement plugin quirk for Mozilla user agent for older Flash
787         https://bugs.webkit.org/show_bug.cgi?id=60726
788         <rdar://problem/8470824>
789         
790         Implement the quirk for versions of Flash before v10 that only request windowless plugins
791         if we use a Mozilla user agent.
792
793         * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
794         (WebKit::NetscapePluginModule::determineQuirks): If we have a plugin that handles the
795             "application/x-shockwave-flash" MIME type with a version less than 10, tell it to use
796             the Mozilla user agent.
797         * Shared/Plugins/PluginQuirks.h:
798         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
799         (WebKit::NetscapePlugin::userAgent): Add an early return if the plugin uses the Mozilla user
800             agent.
801         * win/WebKit2.vcproj: Add PluginQuirks.h.
802
803 2011-05-12  Anders Carlsson  <andersca@apple.com>
804
805         Reviewed by Simon Fraser.
806
807         PluginView::invalidateRect doesn't work for transformed plug-ins
808         https://bugs.webkit.org/show_bug.cgi?id=60727
809         <rdar://problem/9331244>
810
811         Ask the RenderObject to repaint the plug-in instead of using invalidateContentsAndWindow.
812         This matches what we do in WebKit1.
813
814         * WebProcess/Plugins/PluginView.cpp:
815         (WebKit::PluginView::invalidateRect):
816
817 2011-05-12  Jessie Berlin  <jberlin@apple.com>
818
819         Reviewed by Darin Adler.
820
821         [Windows WebKit2] Use cookies set in WebKit1
822         https://bugs.webkit.org/show_bug.cgi?id=60274
823
824         Properly handle the case where there is no serialized default storage session by not trying
825         to encode or decode 0, while still making sure to decode any valid storage session.
826
827         * Shared/WebProcessCreationParameters.cpp:
828         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
829         (WebKit::WebProcessCreationParameters::encode):
830         Only encode the storage session if there is one to encode.
831         (WebKit::WebProcessCreationParameters::decode):
832         Only decode the storage session there is one to decode.
833         * Shared/WebProcessCreationParameters.h:
834
835 2011-05-11  Brian Weinstein  <bweinstein@apple.com>
836
837         Reviewed by Anders Carlsson.
838
839         After relaunching an unresponsive web process, web page stops responding to mouse movement
840         https://bugs.webkit.org/show_bug.cgi?id=60669
841         <rdar://problem/9409934>
842
843         * UIProcess/WebPageProxy.cpp:
844         (WebKit::WebPageProxy::processDidCrash): Set m_processingMouseMoveEvent to false when the WebProcess
845             crashes.
846
847 2011-05-10  Tony Gentilcore  <tonyg@chromium.org>
848
849         Reviewed by Darin Adler.
850
851         Perform some forward declarations suggested by include-what-you-use
852         https://bugs.webkit.org/show_bug.cgi?id=60545
853
854         * WebProcess/WebPage/mac/WebPageMac.mm:
855
856 2011-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
857
858         Reviewed by Martin Robinson.
859
860         Fix the build with ENABLE_PLUGIN_PROCESS
861         https://bugs.webkit.org/show_bug.cgi?id=60628
862
863         * WebProcess/Plugins/PluginProxy.cpp:
864         (WebKit::PluginProxy::initialize): Move the call to
865         pluginController->isAcceleratedCompositingEnabled() to a #ifdef block.
866         * WebProcess/Plugins/PluginProxy.h: Add include for <WebCore/IntRect.h>.
867
868 2011-05-11  Damian Kaleta  <dkaleta@apple.com>
869
870         Reviewed by Brady Eidson.
871
872         Need a new API that will try to restore the scrollbars' position, when navigating in the back/forward history
873         https://bugs.webkit.org/show_bug.cgi?id=60674
874
875         * UIProcess/API/C/WKPage.cpp:
876         (WKPageTryRestoreScrollPosition):
877         * UIProcess/API/C/WKPage.h:
878         * UIProcess/WebPageProxy.cpp:
879         (WebKit::WebPageProxy::tryRestoreScrollPosition):
880         * UIProcess/WebPageProxy.h:
881         * WebProcess/WebPage/WebPage.cpp:
882         (WebKit::WebPage::tryRestoreScrollPosition):
883         * WebProcess/WebPage/WebPage.h:
884         * WebProcess/WebPage/WebPage.messages.in:
885
886 2011-05-11  Sam Weinig  <sam@webkit.org>
887
888         Reviewed by Gavin Barraclough.
889
890         WebKit2 doesn't build on Mac with strict PassOwnPtr
891         https://bugs.webkit.org/show_bug.cgi?id=60655
892
893         * Platform/CoreIPC/HandleMessage.h:
894         (CoreIPC::handleMessageDelayed):
895         Add explicit adoptPtr to indicate that the constructor is taking ownership.
896
897 2011-05-11  Jessie Berlin  <jberlin@apple.com>
898
899         Reviewed by Steve Falkenburg.
900
901         [Windows WebKit2] Use cookies set in WebKit1
902         https://bugs.webkit.org/show_bug.cgi?id=60274
903
904         Share the default storage session between the UI and Web Processes.
905
906         * Shared/WebProcessCreationParameters.cpp:
907         (WebKit::WebProcessCreationParameters::encode):
908         Only encode the session parameter if it is valid.
909         (WebKit::WebProcessCreationParameters::decode):
910         Don't try to decode a null session data. 
911         * Shared/WebProcessCreationParameters.h:
912         Add a parameter for a serialized default storage session, used only on Windows.
913
914         * Shared/win/WebCoreArgumentCodersWin.cpp:
915         (CoreIPC::decodeResourceRequest):
916         Make sure to set the current storage session on any requests used by the Web
917         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
918         doing anything with the Web Process's default storage session.
919
920         * UIProcess/win/WebContextWin.cpp:
921         (WebKit::WebContext::platformInitializeWebProcess):
922         Serialize the default storage session in the UI Process and add it to the
923         WebProcessCreationParameters.
924
925         * WebProcess/WebPage/win/WebPageWin.cpp:
926         (WebKit::cachedResponseForURL):
927         Use the cache associated with the current storage session and make sure the request has the
928         current storage session set on it before doing anything with it.
929
930         * WebProcess/win/WebProcessWin.cpp:
931         (WebKit::WebProcess::platformSetCacheModel):
932         Use the default storage session.
933         (WebKit::WebProcess::platformClearResourceCaches):
934         Ditto.
935         (WebKit::WebProcess::platformInitializeWebProcess):
936         Deserialize the default storage session passed in by the UI Process and hand it to the
937         ResourceHandle.
938
939 2011-05-11  Jia Pu  <jpu@apple.com>
940
941         Reviewed by Darin Adler.
942
943         CorrectionPanel sometimes hangs in dismissSoon().
944         https://bugs.webkit.org/show_bug.cgi?id=60599
945         <rdar://problem/9313628>
946
947         Make sure dismissSoon() won't wait indefinitely if handleAcceptedReplacement() sets m_resultForSynchronousDismissal
948         to nil. Added a designated variable m_isDismissing, instead of piggy-backing m_resultForSynchronousDismissal,
949         for condition checking.
950
951         * UIProcess/mac/CorrectionPanel.h:
952         * UIProcess/mac/CorrectionPanel.mm:
953         (WebKit::CorrectionPanel::CorrectionPanel):
954         (WebKit::CorrectionPanel::show):
955         (WebKit::CorrectionPanel::dismissSoon):
956         (WebKit::CorrectionPanel::dismissInternal):
957         (WebKit::CorrectionPanel::handleAcceptedReplacement):
958
959 2011-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
960
961         Unreviewed, rolling out r86255.
962         http://trac.webkit.org/changeset/86255
963         https://bugs.webkit.org/show_bug.cgi?id=60660
964
965         REGRESSION (r86255): Lots of tests crashing in
966         CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
967         (WebKit2 Tests) (Requested by aroben on #webkit).
968
969         * Shared/WebProcessCreationParameters.cpp:
970         (WebKit::WebProcessCreationParameters::encode):
971         (WebKit::WebProcessCreationParameters::decode):
972         * Shared/WebProcessCreationParameters.h:
973         * Shared/win/WebCoreArgumentCodersWin.cpp:
974         (CoreIPC::decodeResourceRequest):
975         * UIProcess/win/WebContextWin.cpp:
976         (WebKit::WebContext::platformInitializeWebProcess):
977         * WebProcess/WebPage/win/WebPageWin.cpp:
978         (WebKit::cachedResponseForURL):
979         * WebProcess/win/WebProcessWin.cpp:
980         (WebKit::WebProcess::platformSetCacheModel):
981         (WebKit::WebProcess::platformClearResourceCaches):
982         (WebKit::WebProcess::platformInitializeWebProcess):
983
984 2011-05-11  Adam Roben  <aroben@apple.com>
985
986         Don't notify the plugin when a targeted javascript: URL request completes
987
988         This matches Mozilla and WebKit1.
989
990         Fixes <http://webkit.org/b/60568> <rdar://problem/8610657> REGRESSION (WebKit2): Flash
991         plugin doesn't appear on a hanes.com page
992
993         Test: plugins/get-targeted-javascript-url.html
994
995         Reviewed by Anders Carlsson.
996
997         * WebProcess/Plugins/PluginView.cpp:
998         (WebKit::PluginView::performJavaScriptURLRequest): Don't call back to the plugin if the
999         request had a target.
1000
1001 2011-05-11  Jessie Berlin  <jberlin@apple.com>
1002
1003         Reviewed by Steve Falkenburg.
1004
1005         [Windows WebKit2] Use cookies set in WebKit1
1006         https://bugs.webkit.org/show_bug.cgi?id=60274
1007
1008         Share the default storage session between the UI and Web Processes.
1009
1010         * Shared/WebProcessCreationParameters.cpp:
1011         (WebKit::WebProcessCreationParameters::encode):
1012         (WebKit::WebProcessCreationParameters::decode):
1013         * Shared/WebProcessCreationParameters.h:
1014         Add a parameter for a serialized default storage session, used only on Windows.
1015
1016         * Shared/win/WebCoreArgumentCodersWin.cpp:
1017         (CoreIPC::decodeResourceRequest):
1018         Make sure to set the current storage session on any requests used by the Web
1019         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
1020         doing anything with the Web Process's default storage session.
1021
1022         * UIProcess/win/WebContextWin.cpp:
1023         (WebKit::WebContext::platformInitializeWebProcess):
1024         Serialize the default storage session in the UI Process and add it to the
1025         WebProcessCreationParameters.
1026
1027         * WebProcess/WebPage/win/WebPageWin.cpp:
1028         (WebKit::cachedResponseForURL):
1029         Use the cache associated with the current storage session and make sure the request has the
1030         current storage session set on it before doing anything with it.
1031
1032         * WebProcess/win/WebProcessWin.cpp:
1033         (WebKit::WebProcess::platformSetCacheModel):
1034         Use the default storage session.
1035         (WebKit::WebProcess::platformClearResourceCaches):
1036         Ditto.
1037         (WebKit::WebProcess::platformInitializeWebProcess):
1038         Deserialize the default storage session passed in by the UI Process and hand it to the
1039         ResourceHandle.
1040
1041 2011-05-11  Sam Weinig  <sam@webkit.org>
1042
1043         Reviewed by Adam Roben.
1044
1045         WebKit2 should tell app that is unresponsive in more cases
1046         <rdar://problem/9110151>
1047         https://bugs.webkit.org/show_bug.cgi?id=60608
1048
1049         * UIProcess/DrawingAreaProxyImpl.cpp:
1050         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
1051         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
1052         Invoke the responsiveness time when forcing a backing store update
1053         to catch the cases of activating tabs, resizing the window, etc.
1054
1055 2011-05-11  Martin Robinson  <mrobinson@igalia.com>
1056
1057         Try to fix the WinCairo build.
1058
1059         * Shared/ShareableBitmap.h: Correctly include RefPtrCairo here and
1060         guard it with USE(CAIRO) instead of PLATFORM(CAIRO).
1061
1062 2011-05-11  John Sullivan  <sullivan@apple.com>
1063
1064         Reviewed by Darin Adler.
1065
1066         <https://bugs.webkit.org/show_bug.cgi?id=60631>
1067         <rdar://problem/9420520>
1068         
1069         WebKit2 doesn't clear the pendingAPIRequestURL on in-page anchor navigation [60631]
1070
1071         * UIProcess/WebPageProxy.cpp:
1072         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
1073         Call clearPendingAPIRequestURL().
1074
1075 2011-05-11  Adam Roben  <aroben@apple.com>
1076
1077         Turn on strict PassOwnPtr on Windows
1078
1079         Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
1080
1081         Reviewed by Adam Barth.
1082
1083         * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp:
1084         (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Use nullptr instead of 0.
1085
1086 2011-05-11  Jessie Berlin  <jberlin@apple.com>
1087
1088         Reviewed by Darin Adler.
1089
1090         [WebKit2] exceededDatabaseQuota function on WKPageUIClient needs to provide information
1091         about the usage for both the origin overall and the database in question.
1092         https://bugs.webkit.org/show_bug.cgi?id=60573
1093
1094         Add the currentOriginUsage parameter.
1095
1096         * Platform/CoreIPC/HandleMessage.h:
1097         (CoreIPC::callMemberFunction):
1098         * UIProcess/API/C/WKPage.h:
1099         * UIProcess/WebPageProxy.cpp:
1100         (WebKit::WebPageProxy::exceededDatabaseQuota):
1101         * UIProcess/WebPageProxy.h:
1102         * UIProcess/WebPageProxy.messages.in:
1103         * UIProcess/WebUIClient.cpp:
1104         (WebKit::WebUIClient::exceededDatabaseQuota):
1105         * UIProcess/WebUIClient.h:
1106         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1107         (WebKit::WebChromeClient::exceededDatabaseQuota):
1108
1109 2011-05-10  Oliver Hunt  <oliver@apple.com>
1110
1111         Reviewed by Geoffrey Garen.
1112
1113         Assertion failure in JSC::Structure::typeInfo when reloading weather.com video page
1114         https://bugs.webkit.org/show_bug.cgi?id=60580
1115
1116         The plugin object map was incorrect trying to implement a weak map itself using
1117         destructors.  Switch to a WeakGCMap and the problem is fixed.
1118
1119         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1120         (WebKit::JSNPObject::~JSNPObject):
1121         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1122         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
1123         (WebKit::NPRuntimeObjectMap::invalidate):
1124         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1125
1126 2011-05-10  Sam Weinig  <sam@webkit.org>
1127
1128         Reviewed by Dan Bernstein.
1129
1130         Yet more quarantine related sandbox denial when downloading files
1131         <rdar://problem/9397494>
1132
1133         * WebProcess/com.apple.WebProcess.sb:
1134
1135 2011-05-10  Sam Weinig  <sam@webkit.org>
1136
1137         Reviewed by Anders Carlsson.
1138
1139         WebKit2: Coalesced wheel events should be saved to hand back to the client on unhandled return
1140         https://bugs.webkit.org/show_bug.cgi?id=60584
1141
1142         * UIProcess/WebPageProxy.cpp:
1143         (WebKit::WebPageProxy::handleWheelEvent):
1144         (WebKit::canCoalesce):
1145         (WebKit::coalesce):
1146         (WebKit::coalescedWheelEvent):
1147         (WebKit::WebPageProxy::didReceiveEvent):
1148         (WebKit::WebPageProxy::processDidCrash):
1149         Reworks coalescing/merging code to happen on didReceiveEvent rather than in
1150         handleWheelEvent. This means we now store the pending events in a queue, and
1151         pull them out when we can.
1152
1153         * UIProcess/WebPageProxy.h:
1154         Change single event containers to contain all pending/merged/coalesced events
1155         and remove unused flag.
1156
1157 2011-05-09  Jeremy Noble  <jer.noble@apple.com>
1158
1159         Reviewed by Darin Adler.
1160
1161         WebKit2: Cancelling full screen before animation completes leads to full screen window staying up.
1162         https://bugs.webkit.org/show_bug.cgi?id=60531
1163
1164         Remove the (unused) _isAnimating ivar and replace it with two ivars: _isEnteringFullScreen and 
1165         _isExitingFullScreen.  These will ensure each is only called once per full screen request, and
1166         that if one exit/enter request interrupts another, that the required functions are called in 
1167         order.
1168
1169         * UIProcess/mac/WKFullScreenWindowController.h:
1170         * UIProcess/mac/WKFullScreenWindowController.mm:
1171         (-[WKFullScreenWindowController enterFullScreen:]): Removed _isAnimating.
1172         (-[WKFullScreenWindowController exitFullScreen]): Ditto.
1173         (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Gate on _isEnteringFullScreen. Check _isExitingFullScreen
1174             and call [self finishedExitFullScreenAnimation:] if necessary.
1175         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Gate on _isEnteringFullScreen.
1176         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Gate on _isExitingFullScreen. Check _isEnteringFullScreen
1177             and call [self finishedEnterFullScreenAnimation:] if necessary.
1178         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Gate on _isExitingFullScreen.
1179
1180 2011-05-10  Beth Dakin  <bdakin@apple.com>
1181
1182         Reviewed by Darin Adler.
1183
1184         https://bugs.webkit.org/show_bug.cgi?id=60582
1185         Crash switching overlay/non-overlay scrollbar preference still possible
1186         -and corresponding-
1187         <rdar://problem/9323983>
1188
1189         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1190         (InitWebCoreSystemInterface):
1191
1192 2011-05-10  Jeff Miller  <jeffm@apple.com>
1193
1194         Reviewed by Anders Carlsson.
1195
1196         WebKit2: Windows clients need to know if the page overlay is installed
1197         https://bugs.webkit.org/show_bug.cgi?id=60562
1198         <rdar://problem/8940164>
1199         
1200         Until we move all the UI for find on page into WebKit on Windows (specifically, drawing the find bouncy),
1201         WebKit clients need to know whether WebKit is drawing the page overlay or not.  Keep track of this in
1202         the WebPageProxy in the UI process and provide a WebKit2 API to retrieve this information.
1203
1204         * UIProcess/API/C/win/WKView.cpp:
1205         (WKViewIsPageOverlayInstalled): Added.
1206         * UIProcess/API/C/win/WKView.h: Added WKViewIsPageOverlayInstalled().
1207         
1208         * UIProcess/PageClient.h: Added didInstallOrUninstallPageOverlay().
1209         * UIProcess/WebPageProxy.h: Added didInstallOrUninstallPageOverlay().
1210         * UIProcess/WebPageProxy.messages.in: Added DidInstallOrUninstallPageOverlay.
1211         * UIProcess/win/WebPageProxyWin.cpp:
1212         (WebKit::WebPageProxy::didInstallOrUninstallPageOverlay): Added.
1213         
1214         * UIProcess/win/WebView.cpp:
1215         (WebKit::WebView::WebView): Initialize m_pageOverlayInstalled.
1216         (WebKit::WebView::didInstallOrUninstallPageOverlay): Added.
1217         * UIProcess/win/WebView.h: Added didInstallOrUninstallPageOverlay() and m_pageOverlayInstalled.
1218         (WebKit::WebView::pageOverlayInstalled): Added.
1219         
1220         * WebProcess/WebPage/WebPage.cpp:
1221         (WebKit::WebPage::installPageOverlay): Send message to UI process to tell it the page overlay is installed.
1222         (WebKit::WebPage::uninstallPageOverlay): Send message to UI process to tell it the page overlay is uninstalled.
1223
1224 2011-05-10  Anders Carlsson  <andersca@apple.com>
1225
1226         Reviewed by Adam Roben.
1227
1228         Remove incorrect ASSERTs from CoreIPC::Connection::processIncomingSyncReply
1229         https://bugs.webkit.org/show_bug.cgi?id=60567
1230         <rdar://problem/9377845>
1231
1232         It is possible to receive an incoming sync reply that is for a request we don't know about.
1233         This could happen if the sync message send timed out for example.
1234
1235         * Platform/CoreIPC/Connection.cpp:
1236         (CoreIPC::Connection::processIncomingSyncReply):
1237
1238 2011-05-05  Brent Fulgham  <bfulgham@webkit.org> and Martin Robinson  <mrobinson@igalia.com>
1239
1240         Reviewed by Anders Carlsson.
1241
1242         [Cairo][WebKit2] Add an implementation of ShareableBitmap for Cairo
1243         https://bugs.webkit.org/show_bug.cgi?id=60293
1244
1245         * GNUmakefile.am: Remove ShareableBitmapGtk in favor of ShareableBitmapCairo.
1246         * Shared/ShareableBitmap.h: Added a couple Cairo-specific declarations.
1247         * Shared/cairo/ShareableBitmapCairo.cpp:
1248         (WebKit::ShareableBitmap::createGraphicsContext): Added.
1249         (WebKit::ShareableBitmap::paint): Added.
1250         (WebKit::ShareableBitmap::createCairoSurface): Added.
1251         (WebKit::ShareableBitmap::releaseSurfaceData): Added.
1252
1253 2011-05-10  Anders Carlsson  <andersca@apple.com>
1254
1255         Reviewed by Sam Weinig.
1256
1257         Extra sign in required to view video on MobileMe Gallery album
1258         https://bugs.webkit.org/show_bug.cgi?id=60560
1259
1260         Implement NPN_GetAuthenticationInfo.
1261
1262         * PluginProcess/PluginControllerProxy.cpp:
1263         (WebKit::PluginControllerProxy::getAuthenticationInfo):
1264         Send a GetAuthenticationInfo message to the web process.
1265
1266         * PluginProcess/PluginControllerProxy.h:
1267         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1268         (WebKit::initializeProtectionSpace):
1269         Initialize a WebCore::ProtectionSpace object from NPAPI parameters.
1270
1271         (WebKit::NPN_GetAuthenticationInfo):
1272         Make a ProtectionSpace object and then call NetscapePlugin::getAuthenticationInfo. 
1273         Finally, copy the username/password and pass them back to the plug-in.
1274
1275         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1276         (WebKit::NetscapePlugin::getAuthenticationInfo):
1277         Call the plug-in controller.
1278
1279         * WebProcess/Plugins/PluginController.h:
1280         Add getAuthenticationInfo pure virtual member function.
1281
1282         * WebProcess/Plugins/PluginProxy.cpp:
1283         (WebKit::PluginProxy::getAuthenticationInfo):
1284         Call the real plug-in controller's getAuthenticationInfo member function.
1285
1286         * WebProcess/Plugins/PluginProxy.messages.in:
1287         Add GetAuthenticationInfo message.
1288
1289         * WebProcess/Plugins/PluginView.cpp:
1290         (WebKit::PluginView::getAuthenticationInfo):
1291         Try to get the authentication info from the credential storage. Failing that,
1292         get it from the persistent credential storage.
1293
1294 2011-05-10  Adam Roben  <aroben@apple.com>
1295
1296         Use FontSmoothingLevelWindows by default on Windows
1297
1298         Fixes <http://webkit.org/b/60557> REGRESSION (r86077): Web Inspector uses CG font rendering
1299         in WebKit2 on Windows
1300
1301         Reviewed by Darin Adler.
1302
1303         * Shared/WebPreferencesStore.h: Added and deployed a new DEFAULT_WEBKIT_FONT_SMOOTHING_LEVEL
1304         macro to let Windows have a different default font smoothing level from other platforms.
1305
1306         * UIProcess/API/C/WKPreferencesPrivate.h: Updated the comment about the default font
1307         smoothing level.
1308
1309 2011-05-06  Tony Gentilcore  <tonyg@chromium.org>
1310
1311         Reviewed by Darin Adler.
1312
1313         Fix some unnecessary includes in headers
1314         https://bugs.webkit.org/show_bug.cgi?id=60388
1315
1316         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1317
1318 2011-05-09  Jeremy Noble  <jer.noble@apple.com>
1319
1320         Reviewed by Darin Adler.
1321
1322         Command-~/Exposé to another window while <video> is in full screen, breaks Safari, eventually leading to crash
1323         https://bugs.webkit.org/show_bug.cgi?id=60496
1324
1325         When animating into and out of full screen, order out and back in the original webView window,
1326         disabling animations when necessary. The beganExitFullScreenAnimation method was targeting the wrong window,
1327         as the webView is hosted in the full screen window when we ask for it's parent window.
1328
1329         * UIProcess/mac/WKFullScreenWindowController.mm:
1330         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
1331         (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
1332
1333 2011-05-09  Dan Bernstein  <mitz@apple.com>
1334
1335         Reviewed by Darin Adler.
1336
1337         A WKView with plug-ins paints white when first moved into a window
1338         https://bugs.webkit.org/show_bug.cgi?id=60511
1339
1340         The UI process’s wait for DidUpdateBackingStoreState would always time out because the Web process
1341         was blocked on a synchronous message the UI process trying to get the connections for plug-ins in
1342         the view. This is avoided by deferring the call to Page::setCanStartMedia().
1343
1344         * WebProcess/WebPage/WebPage.cpp:
1345         (WebKit::WebPage::WebPage): Initialize the new m_setCanStartMediaTimer.
1346         (WebKit::WebPage::setCanStartMediaTimerFired): Added. Calls setCanStartMedia(true) when the timer
1347         fires.
1348         (WebKit::WebPage::setIsInWindow): When going out of a window, stop the timer. When going into a
1349         window, start it.
1350         * WebProcess/WebPage/WebPage.h:
1351
1352 2011-05-09  Anders Carlsson  <andersca@apple.com>
1353
1354         Reviewed by Dan Bernstein.
1355
1356         Crash when sending a sync message to a crashed web process
1357         https://bugs.webkit.org/show_bug.cgi?id=60514
1358         <rdar://problem/9281270>
1359
1360         Change WebProcessProxy::sendSync to return false if there's no connection.
1361
1362         Audit all WebProcessProxy::sendSync call sites to initialize reply parameters.
1363
1364         * UIProcess/WebPageProxy.cpp:
1365         (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange):
1366         (WebKit::WebPageProxy::getSelectedText):
1367         (WebKit::WebPageProxy::gestureWillBegin):
1368         * UIProcess/WebProcessProxy.h:
1369         (WebKit::WebProcessProxy::sendSync):
1370         * UIProcess/mac/WebPageProxyMac.mm:
1371         (WebKit::WebPageProxy::insertText):
1372         (WebKit::WebPageProxy::getMarkedRange):
1373         (WebKit::WebPageProxy::getSelectedRange):
1374         (WebKit::WebPageProxy::characterIndexForPoint):
1375         (WebKit::WebPageProxy::executeKeypressCommands):
1376         (WebKit::WebPageProxy::writeSelectionToPasteboard):
1377         (WebKit::WebPageProxy::readSelectionFromPasteboard):
1378
1379 2011-05-09  Anders Carlsson  <andersca@apple.com>
1380
1381         Reviewed by Sam Weinig.
1382
1383         Create a plug-in's MIME types preferences plist if it doesn't exist.
1384         https://bugs.webkit.org/show_bug.cgi?id=57204
1385         <rdar://problem/9195048>
1386
1387         Spawn a plug-in process and let it create the plist. For now, we'll do this on the
1388         main thread since it's a rare one-time computation and we have an API function,
1389         WKFrameCanShowMIMEType, which would have to block anyway.
1390
1391         * PluginProcess/mac/PluginProcessMainMac.mm:
1392         (WebKit::PluginProcessMain):
1393         If -createPluginMIMETypesPreferences is one of the command line argument keys,
1394         the plug-in path will be the argument value. Call NetscapePluginModule::createPluginMIMETypesPreferences
1395         to create the preferences file and then exit.
1396
1397         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1398         (WebKit::contentsOfPropertyListAtURL):
1399         Move code to read a property list out into a helper function.
1400
1401         (WebKit::getMIMETypesFromPluginBundle):
1402         If there's no property list file, try to create one.
1403
1404         (WebKit::NetscapePluginModule::createPluginMIMETypesPreferences):
1405         Load the plug-in, find the BP_CreatePluginMIMETypesPreferences and call it.
1406
1407         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1408         (WebKit::PluginProcessProxy::createPropertyListFile):
1409         Spawn a plug-in process and pass the -createPluginMIMETypesPreferences flag to it and then wait
1410         for it to exit.
1411
1412 2011-05-09  Anders Carlsson  <andersca@apple.com>
1413
1414         Reviewed by Sam Weinig.
1415
1416         Move EnvironmentVariables out into its own .cpp file
1417         https://bugs.webkit.org/show_bug.cgi?id=60507
1418
1419         * UIProcess/Launcher/mac/EnvironmentVariables.cpp: Added.
1420         (WebKit::EnvironmentVariables::EnvironmentVariables):
1421         (WebKit::EnvironmentVariables::~EnvironmentVariables):
1422         (WebKit::EnvironmentVariables::set):
1423         (WebKit::EnvironmentVariables::get):
1424         (WebKit::EnvironmentVariables::appendValue):
1425         (WebKit::EnvironmentVariables::valueIfVariableHasName):
1426         (WebKit::EnvironmentVariables::createStringForVariable):
1427         (WebKit::EnvironmentVariables::copyEnvironmentVariables):
1428         * UIProcess/Launcher/mac/EnvironmentVariables.h: Added.
1429         (WebKit::EnvironmentVariables::environmentPointer):
1430         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1431         * WebKit2.xcodeproj/project.pbxproj:
1432
1433 2011-05-09  Adam Roben  <aroben@apple.com>
1434
1435         Always set the font rendering mode based on preference values
1436
1437         WebPage::platformInitialize and WebPage::platformPreferencesDidChange were fighting over the
1438         font rendering mode. The platformInitialize code predates preference-based font rendering
1439         mode support, and is now redundant and incorrect.
1440
1441         Fixes <http://webkit.org/b/60494> WebKit2 uses GDI text instead of CG text when
1442         FontSmoothing preference is set to kWKFontSmoothingLevelNoSubpixelAntiAliasing in a .plist
1443         on disk
1444
1445         Reviewed by Sam Weinig.
1446
1447         * WebProcess/WebPage/win/WebPageWin.cpp:
1448         (WebKit::WebPage::platformInitialize): Removed code to set the font rendering mode.
1449         platformPreferencesDidChange will take care of this for us.
1450
1451 2011-05-09  Anders Carlsson  <andersca@apple.com>
1452
1453         Reviewed by John Sullivan.
1454
1455         Clean up NetscapePluginModule::getPluginInfo
1456         https://bugs.webkit.org/show_bug.cgi?id=60486
1457
1458         Make all 'get' functions take a PluginInfoStore::Plugin reference, since getPluginInfoFromPropertyLists
1459         is going to need it to know the path and plug-in architecture.
1460
1461         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1462         (WebKit::getPluginArchitecture):
1463         (WebKit::getPluginInfoFromPropertyLists):
1464         (WebKit::getPluginInfoFromCarbonResources):
1465         (WebKit::NetscapePluginModule::getPluginInfo):
1466
1467 2011-05-09  Dan Bernstein  <mitz@apple.com>
1468
1469         Reviewed by Darin Adler.
1470
1471         <rdar://problem/9005982> REGRESSION (r85780): Flash of white when a WKView with composited content moves on-screen
1472         https://bugs.webkit.org/show_bug.cgi?id=60488
1473
1474         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1475         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Update m_compositingAccordingToProxyMessages,
1476         since the DidUpdateBackingStoreState message also changes the compositing state in the proxy.
1477
1478 2011-05-09  Benjamin Poulain  <benjamin.poulain@nokia.com>
1479
1480         Reviewed by Andreas Kling.
1481
1482         Build fix for WebKit 2 on Qt
1483
1484         Qt treats warnings as errors so it does not build with unused variables. This patch removed two unused variable in WebKit 2.
1485
1486         * UIProcess/TiledDrawingAreaProxy.cpp:
1487         (WebKit::TiledDrawingAreaProxy::createTiles):
1488         * WebProcess/Plugins/PluginView.cpp:
1489         (WebKit::PluginView::~PluginView):
1490
1491 2011-05-07  Dan Bernstein  <mitz@apple.com>
1492
1493         Reviewed by Timothy Hatcher.
1494
1495         <rdar://problem/9365358> REGRESSION (WebKit2): When clicking in the page, Find overlay fades out instead of disappearing immediately
1496
1497         * WebProcess/WebPage/FindController.cpp:
1498         (WebKit::FindController::hideFindUI): Do not fade out the overlay.
1499
1500 2011-05-07  Dan Bernstein  <mitz@apple.com>
1501
1502         Avoid copying a header file into the WebKit2 framework wrapper.
1503
1504         * WebKit2.xcodeproj/project.pbxproj: Corrected the target membership of HTTPCookieAcceptPolicy.h.
1505
1506 2011-05-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1507
1508         Unreviewed, rolling out r86016.
1509         http://trac.webkit.org/changeset/86016
1510         https://bugs.webkit.org/show_bug.cgi?id=60445
1511
1512         caused crashes on the WK2 Windows bots (Requested by
1513         jessieberlin on #webkit).
1514
1515         * Shared/WebProcessCreationParameters.cpp:
1516         (WebKit::WebProcessCreationParameters::encode):
1517         (WebKit::WebProcessCreationParameters::decode):
1518         * Shared/WebProcessCreationParameters.h:
1519         * Shared/win/WebCoreArgumentCodersWin.cpp:
1520         (CoreIPC::decodeResourceRequest):
1521         * UIProcess/win/WebContextWin.cpp:
1522         (WebKit::WebContext::platformInitializeWebProcess):
1523         * WebProcess/WebPage/win/WebPageWin.cpp:
1524         (WebKit::cachedResponseForURL):
1525         * WebProcess/win/WebProcessWin.cpp:
1526         (WebKit::WebProcess::platformSetCacheModel):
1527         (WebKit::WebProcess::platformClearResourceCaches):
1528         (WebKit::WebProcess::platformInitializeWebProcess):
1529
1530 2011-05-07  Jessie Berlin  <jberlin@apple.com>
1531
1532         Reviewed by Steve Falkenburg.
1533
1534         [Windows WebKit2] Use cookies set in WebKit1
1535         https://bugs.webkit.org/show_bug.cgi?id=60274
1536
1537         Share the default storage session between the UI and Web Processes.
1538
1539         * Shared/WebProcessCreationParameters.cpp:
1540         (WebKit::WebProcessCreationParameters::encode):
1541         (WebKit::WebProcessCreationParameters::decode):
1542         * Shared/WebProcessCreationParameters.h:
1543         Add a parameter for a serialized default storage session, used only on Windows.
1544
1545         * Shared/win/WebCoreArgumentCodersWin.cpp:
1546         (CoreIPC::decodeResourceRequest):
1547         Make sure to set the current storage session on any requests used by the Web
1548         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
1549         doing anything with the Web Process's default storage session.
1550
1551         * UIProcess/win/WebContextWin.cpp:
1552         (WebKit::WebContext::platformInitializeWebProcess):
1553         Serialize the default storage session in the UI Process and add it to the
1554         WebProcessCreationParameters.
1555
1556         * WebProcess/WebPage/win/WebPageWin.cpp:
1557         (WebKit::cachedResponseForURL):
1558         Use the cache associated with the current storage session and make sure the request has the
1559         current storage session set on it before doing anything with it.
1560
1561         * WebProcess/win/WebProcessWin.cpp:
1562         (WebKit::WebProcess::platformSetCacheModel):
1563         Use the default storage session.
1564         (WebKit::WebProcess::platformClearResourceCaches):
1565         Ditto.
1566         (WebKit::WebProcess::platformInitializeWebProcess):
1567         Deserialize the default storage session passed in by the UI Process and hand it to the
1568         ResourceHandle.
1569
1570 2011-05-07  Keith Kyzivat  <keith.kyzivat@nokia.com>
1571
1572         Reviewed by Adam Roben.
1573
1574         [Qt] Webkit2 PLUGIN_ARCHITECTURE(UNSUPPORTED) configuration broken by r85961
1575         https://bugs.webkit.org/show_bug.cgi?id=60420
1576
1577         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
1578         (WebKit::NetscapePlugin::platformVisibilityDidChange):
1579
1580 2011-05-06  Martin Robinson  <mrobinson@igalia.com>
1581
1582         Reviewed by Xan Lopez.
1583
1584         [GTK] [WebKit2] WebView::windowToScreen needs an implementation
1585         https://bugs.webkit.org/show_bug.cgi?id=55960
1586
1587         Add an implementation of PageClient::windowToScreen for GTK+ WebKit2 using
1588         the newly abstracted widget to screen coordinate translation code in WebCore.
1589
1590         * UIProcess/API/gtk/PageClientImpl.cpp:
1591         (WebKit::PageClientImpl::windowToScreen): Added implementation.
1592
1593 2011-05-06  Anders Carlsson  <andersca@apple.com>
1594
1595         Reviewed by Dan Bernstein.
1596
1597         Simplify the PluginInfoStore interface
1598         https://bugs.webkit.org/show_bug.cgi?id=60406
1599
1600         Just expose a single API for getting a list of plug-ins from the info store,
1601         PluginInfoStore::plugins and remove PluginInfoStore::getPlugins and PluginInfoStore::getPluginPaths.
1602
1603         Also, change the WebContext::pluginInfoStore() getter to return a reference.
1604
1605         * UIProcess/Plugins/PluginInfoStore.cpp:
1606         (WebKit::PluginInfoStore::plugins):
1607         * UIProcess/Plugins/PluginInfoStore.h:
1608         * UIProcess/Plugins/PluginProcessManager.cpp:
1609         (WebKit::PluginProcessManager::getPluginProcessConnection):
1610         * UIProcess/Plugins/PluginProcessManager.h:
1611         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1612         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState):
1613         (WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState):
1614         (WebKit::WebPluginSiteDataManager::getSitesWithData):
1615         (WebKit::WebPluginSiteDataManager::clearSiteData):
1616         * UIProcess/WebContext.cpp:
1617         (WebKit::WebContext::getPlugins):
1618         (WebKit::WebContext::getPluginPath):
1619         * UIProcess/WebContext.h:
1620         (WebKit::WebContext::pluginInfoStore):
1621         * UIProcess/WebPageProxy.cpp:
1622         (WebKit::WebPageProxy::canShowMIMEType):
1623
1624 2011-05-06  Anders Carlsson  <andersca@apple.com>
1625
1626         Windows build fix.
1627
1628         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
1629         (WebKit::PluginInfoStore::shouldUsePlugin):
1630
1631 2011-05-06  Anders Carlsson  <andersca@apple.com>
1632
1633         Reviewed by Dan Bernstein.
1634
1635         Make more PluginInfoStore member functions static
1636         https://bugs.webkit.org/show_bug.cgi?id=60401
1637
1638         This is a first step towards making PluginInfoStore thread safe.
1639
1640         * UIProcess/Plugins/PluginInfoStore.cpp:
1641         (WebKit::PluginInfoStore::loadPluginsIfNecessary):
1642         (WebKit::PluginInfoStore::loadPlugin):
1643         * UIProcess/Plugins/PluginInfoStore.h:
1644         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1645         (WebKit::PluginInfoStore::shouldUsePlugin):
1646         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
1647         (WebKit::PluginInfoStore::shouldUsePlugin):
1648         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
1649         (WebKit::PluginInfoStore::shouldUsePlugin):
1650
1651 2011-05-06  Adam Roben  <aroben@apple.com>
1652
1653         Mac build fix
1654
1655         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Added a
1656         missing #import.
1657
1658 2011-05-06  Adam Roben  <aroben@apple.com>
1659
1660         Show/hide windowed plugins according to the plugin element's visibility CSS property
1661
1662         Fixes <http://webkit.org/b/60285> <rdar://problem/9152400> REGRESSION (WebKit2): A white
1663         rectangle covers up important UI elements when composing a new message at mail.yahoo.com
1664         with BrowserPlus! plug-in installed
1665
1666         Reviewed by Anders Carlsson.
1667
1668         * PluginProcess/PluginControllerProxy.cpp:
1669         (WebKit::PluginControllerProxy::isPluginVisible):
1670         * PluginProcess/PluginControllerProxy.h:
1671         Stubbed out.
1672
1673         * Shared/win/WindowGeometry.cpp:
1674         (WebKit::WindowGeometry::WindowGeometry):
1675         (WebKit::WindowGeometry::encode):
1676         (WebKit::WindowGeometry::decode):
1677         * Shared/win/WindowGeometry.h:
1678         Added visible member.
1679
1680         * UIProcess/win/WebView.cpp:
1681         (WebKit::WebView::updateChildWindowGeometries): Show or hide the window as specified in the
1682         geometry.
1683
1684         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1685         (WebKit::NetscapePlugin::visibilityDidChange):
1686         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1687         Added. Calls through to platform-specific code.
1688
1689         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1690         (WebKit::NetscapePlugin::platformVisibilityDidChange):
1691         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1692         (WebKit::NetscapePlugin::platformVisibilityDidChange):
1693         Stubbed out.
1694
1695         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1696         (WebKit::NetscapePlugin::platformGeometryDidChange): Moved most logic from here to
1697         scheduleWindowedGeometryUpdate.
1698         (WebKit::NetscapePlugin::platformVisibilityDidChange): Added. Calls through to
1699         scheduleWindowedGeometryUpdate.
1700         (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): Added. Code came from
1701         platformGeometryDidChange. Now also records whether the plugin element is visible.
1702
1703         * WebProcess/Plugins/Plugin.h: Added visibilityDidChange.
1704
1705         * WebProcess/Plugins/PluginController.h: Added isPluginVisible.
1706
1707         * WebProcess/Plugins/PluginProxy.cpp:
1708         (WebKit::PluginProxy::visibilityDidChange):
1709         * WebProcess/Plugins/PluginProxy.h:
1710         Stubbed out.
1711
1712         * WebProcess/Plugins/PluginView.cpp:
1713         (WebKit::PluginView::show):
1714         (WebKit::PluginView::hide):
1715         Added. These Widget overrides were based on WebCore's PluginView class.
1716
1717         (WebKit::PluginView::viewVisibilityDidChange): Added. Similar to viewGeometryDidChange.
1718         Calls down to the plugin if it's been initialized.
1719         (WebKit::PluginView::isPluginVisible): Added. Just calls up to the Widget base class.
1720
1721         * WebProcess/Plugins/PluginView.h: Updated for PluginController changes.
1722
1723 2011-05-06  Adam Roben  <aroben@apple.com>
1724
1725         Add a WindowGeometry struct for use in the ScheduleChildWindowGeometryUpdate message
1726
1727         This will make it easier to add more info to this message in the future (like whether the
1728         window is visible).
1729
1730         Fixes <http://webkit.org/b/60374> Adding parameters to ScheduleChildWindowGeometryUpdate
1731         message is tedious
1732
1733         Reviewed by Anders Carlsson.
1734
1735         * Scripts/webkit2/messages.py:
1736         (struct_or_class): Added WindowGeometry to the list of structs.
1737
1738         * Shared/win/WindowGeometry.cpp: Added.
1739         * Shared/win/WindowGeometry.h: Added.
1740
1741         * win/WebKit2.vcproj: Added new files.
1742
1743         * UIProcess/PageClient.h:
1744         * UIProcess/WebPageProxy.h:
1745         * UIProcess/WebPageProxy.messages.in:
1746         * UIProcess/win/WebPageProxyWin.cpp:
1747         (WebKit::WebPageProxy::scheduleChildWindowGeometryUpdate):
1748         * UIProcess/win/WebView.cpp:
1749         (WebKit::WebView::scheduleChildWindowGeometryUpdate):
1750         (WebKit::WebView::updateChildWindowGeometries):
1751         * UIProcess/win/WebView.h:
1752         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1753         (WebKit::NetscapePlugin::platformGeometryDidChange):
1754         * WebProcess/Plugins/PluginController.h:
1755         * WebProcess/Plugins/PluginView.cpp:
1756         (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate):
1757         * WebProcess/Plugins/PluginView.h:
1758         * WebProcess/WebPage/WebPage.h:
1759         * WebProcess/WebPage/win/WebPageWin.cpp:
1760         (WebKit::WebPage::scheduleChildWindowGeometryUpdate):
1761         Changed to use WindowGeometry.
1762
1763 2011-05-06  David Kilzer  <ddkilzer@apple.com>
1764
1765         Remove unused GCC_ENABLE_FIX_AND_CONTINUE and ZERO_LINK settings
1766
1767         Reviewed by Jon Honeycutt.
1768
1769         This fixes an Xcode 4 warning about using obsolete settings.
1770
1771         * WebKit2.xcodeproj/project.pbxproj: Removed
1772         GCC_ENABLE_FIX_AND_CONTINUE and ZERO_LINK settings.
1773
1774 2011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1775
1776         Reviewed by Martin Robinson.
1777
1778         [GTK] Implement NetscapePlugin::platformPaint for GTK platform
1779         https://bugs.webkit.org/show_bug.cgi?id=60368
1780
1781         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1782         (WebKit::NetscapePlugin::platformPaint):
1783
1784 2011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1785
1786         Reviewed by Martin Robinson.
1787
1788         Share PluginInfoStore implementation between Qt and GTK ports
1789         https://bugs.webkit.org/show_bug.cgi?id=60366
1790
1791         * GNUmakefile.am:
1792         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: Removed.
1793         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: Renamed from Source/WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp.
1794         (WebKit::PluginInfoStore::pluginsDirectories):
1795         (WebKit::PluginInfoStore::pluginPathsInDirectory):
1796         (WebKit::PluginInfoStore::individualPluginPaths):
1797         (WebKit::PluginInfoStore::getPluginInfo):
1798         (WebKit::PluginInfoStore::shouldUsePlugin):
1799         * WebKit2.pro:
1800
1801 2011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1802
1803         Unreviewed. Fix WebKit2 GTK build after r85860.
1804
1805         * UIProcess/API/gtk/PageClientImpl.h: Fix typo.
1806
1807 2011-05-05  Philippe Normand  <pnormand@igalia.com>
1808
1809         Reviewed by Dimitri Glazkov.
1810
1811         Implement LayoutTestController::pseudoShadowId()
1812         https://bugs.webkit.org/show_bug.cgi?id=60034
1813
1814         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1815         (WKBundleNodeHandleShadowPseudoId):
1816         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1817         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1818         (WebKit::InjectedBundleNodeHandle::elementRemoveShadowRoot):
1819         (WebKit::InjectedBundleNodeHandle::elementShadowPseudoId):
1820         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1821
1822 2011-05-05  Sam Weinig  <sam@webkit.org>
1823
1824         Reviewed by Anders Carlsson.
1825
1826         REGRESSION (r85689): Unresponsive timer firing when closing background tabs
1827         <rdar://problem/9385988>
1828         https://bugs.webkit.org/show_bug.cgi?id=60325
1829
1830         When calling WKPageTryClose(), if the page close succeeded, the notification to stop
1831         the responsiveness timer would be dropped because the page was closed by the time it
1832         got to the UIProcess.
1833
1834         * UIProcess/WebPageProxy.cpp:
1835         (WebKit::WebPageProxy::closePage):
1836         * UIProcess/WebPageProxy.h:
1837         * UIProcess/WebPageProxy.messages.in:
1838         Add parameter to closePage stipulating whether or not to stop the responsiveness timer.
1839
1840         * WebProcess/WebPage/WebPage.cpp:
1841         (WebKit::WebPage::tryClose):
1842         (WebKit::WebPage::sendClose):
1843         Instead of sending a StopResponsivenessTimer message after sending the ClosePage message,
1844         add a bit to the ClosePage message.
1845
1846 2011-05-05  Dan Bernstein  <mitz@apple.com>
1847
1848         Reviewed by Simon Fraser.
1849
1850         WebKit2 part of <rdar://problem/9155590> Broken animation in iAd producer
1851
1852         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1853         (InitWebCoreSystemInterface): Initialize wkExecutableWasLinkedOnOrBeforeSnowLeopard.
1854
1855 2011-05-05  Keith Kyzivat  <keith.kyzivat@nokia.com>
1856
1857         Reviewed by Laszlo Gombos.
1858
1859         [Qt] [WK2] Add method to disable plugins under WK2
1860         https://bugs.webkit.org/show_bug.cgi?id=57796
1861
1862         * config.h: Allow PLUGIN_ARCHITECTURE_UNSUPPORTED to be defined on build command line
1863
1864 2011-05-05  Anders Carlsson  <andersca@apple.com>
1865
1866         Reviewed by Sam Weinig.
1867
1868         When an underlay surface is active, paint normal web contents in a transparency layer
1869         https://bugs.webkit.org/show_bug.cgi?id=60296
1870
1871         In order for the page contents to correctly blend with the underlay, the page contents
1872         needs to be painted in a transparency layer.
1873
1874         * WebProcess/WebPage/WebPage.cpp:
1875         (WebKit::WebPage::drawRect):
1876
1877 2011-05-05  Brian Weinstein  <bweinstein@apple.com>
1878
1879         Reviewed by Timothy Hatcher.
1880
1881         WebKit2: Docking Web Inspector doesn't respect maximum inspector size
1882         https://bugs.webkit.org/show_bug.cgi?id=60294
1883         <rdar://problem/9388518>
1884         
1885         Before we place the inspector and the inspected views, make sure that we have constrained the height
1886         of the docked inspector. Putting the code here covers both when the inspector is initially attached 
1887         and when a window with the docked inspector is resized.
1888
1889         * UIProcess/mac/WebInspectorProxyMac.mm:
1890         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Constrain the height before laying out the views.
1891         * UIProcess/win/WebInspectorProxyWin.cpp:
1892         (WebKit::WebInspectorProxy::onWebViewWindowPosChangingEvent): Ditto.
1893
1894 2011-05-05  Chang Shu  <cshu@webkit.org>
1895
1896         Reviewed by Andreas Kling.
1897
1898         [Qt][WK2] Support PageGroup in QGraphicsWKView/QWKPage constructors
1899         https://bugs.webkit.org/show_bug.cgi?id=59638
1900
1901         Added private constructors for class QGraphicsWKView and QWKPage to support
1902         WKPageGroupRef.
1903
1904         * UIProcess/API/qt/qgraphicswkview.cpp:
1905         (QGraphicsWKView::QGraphicsWKView):
1906         (QGraphicsWKView::~QGraphicsWKView):
1907         (QGraphicsWKView::init):
1908         * UIProcess/API/qt/qgraphicswkview.h:
1909         * UIProcess/API/qt/qwkpage.cpp:
1910         (QWKPagePrivate::QWKPagePrivate):
1911         (QWKPage::QWKPage):
1912         (QWKPage::~QWKPage):
1913         (QWKPage::init):
1914         * UIProcess/API/qt/qwkpage.h:
1915         * UIProcess/API/qt/qwkpage_p.h:
1916
1917 2011-05-05  Brent Fulgham  <bfulgham@webkit.org>
1918
1919         [WinCairo] Unreviewed build fix.
1920
1921         * WebProcess/WebPage/win/WebPageWin.cpp:
1922         (WebKit::WebPage::cachedResponseDataForURL): Stub out
1923         implementation for cURL networking case.
1924
1925 2011-05-05  Jeff Miller  <jeffm@apple.com>
1926
1927         Reviewed by Darin Adler.
1928
1929         Add didNotHandleWheelEvent callback to WKPageUIClient
1930         https://bugs.webkit.org/show_bug.cgi?id=60203
1931         
1932         Remove Windows-specific WebPageProxy::wheelEventNotHandled() member function and use
1933         didNotHandleWheelEvent callback in WKPageUIClient instead.  It turns out that just
1934         resending the wheel event to the parent window doesn't provide the client with enough context
1935         to know that WebKit has already attempted to handle the event.
1936
1937         * UIProcess/API/C/WKPage.h: Added WKPageDidNotHandleWheelEventCallback typedef and didNotHandleWheelEvent to WKPageUIClient.
1938
1939         * UIProcess/API/gtk/PageClientImpl.cpp:
1940         (WebKit::PageClientImpl::didNotHandleWheelEvent): Added, but not implemented.
1941         * UIProcess/API/gtk/PageClientImpl.h: Added didNotHandleWheelEvent().
1942         * UIProcess/API/qt/qwkpage.cpp:
1943         (QWKPage::QWKPage):Stubbed out didNotHandleWheelEvent callback.
1944
1945         * UIProcess/WebPageProxy.cpp:
1946         (WebKit::WebPageProxy::didReceiveEvent): Call didNotHandleWheelEvent in WKPageUIClient if wheel event is not handled.
1947         * UIProcess/WebPageProxy.h: Removed wheelEventNotHandled().
1948         
1949         * UIProcess/WebUIClient.cpp:
1950         (WebKit::WebUIClient::implementsDidNotHandleWheelEvent): Added.
1951         (WebKit::WebUIClient::didNotHandleWheelEvent): Added.
1952         * UIProcess/WebUIClient.h: Added implementsDidNotHandleWheelEvent() and didNotHandleWheelEvent().
1953
1954         * UIProcess/win/WebPageProxyWin.cpp: Removed wheelEventNotHandled().
1955
1956 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1957
1958         Reviewed by Martin Robinson.
1959
1960         [GTK] Return correct GTK version for NPNVToolkit
1961         https://bugs.webkit.org/show_bug.cgi?id=60275
1962
1963         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1964         (WebKit::NPN_GetValue): Return always 2 for NPNVToolkit in GTK
1965         platform.
1966
1967 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1968
1969         Reviewed by Martin Robinson.
1970
1971         [GTK] Make native events code more consistent
1972         https://bugs.webkit.org/show_bug.cgi?id=60258
1973
1974         Make all other native events code follow the current keyboard
1975         events approach: use a GOwnPtr for the native event, and use
1976         const GdkEvent* in the API. We need to implement the copy
1977         constructors for native events to copy the gdk events with
1978         gdk_event_copy().
1979
1980         * Shared/NativeWebMouseEvent.h:
1981         (WebKit::NativeWebMouseEvent::nativeEvent):
1982         * Shared/NativeWebWheelEvent.h:
1983         (WebKit::NativeWebWheelEvent::nativeEvent):
1984         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
1985         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1986         * Shared/gtk/NativeWebMouseEventGtk.cpp:
1987         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
1988         * Shared/gtk/NativeWebWheelEventGtk.cpp:
1989         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
1990         * Shared/gtk/WebEventFactory.cpp:
1991         (WebKit::buttonForEvent):
1992         (WebKit::WebEventFactory::createWebMouseEvent):
1993         (WebKit::WebEventFactory::createWebWheelEvent):
1994         (WebKit::WebEventFactory::createWebKeyboardEvent):
1995         * Shared/gtk/WebEventFactory.h:
1996         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1997         (webkitWebViewBaseScrollEvent):
1998
1999 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2000
2001         Reviewed by Martin Robinson.
2002
2003         [GTK] Module::load() should return true when g_module_open() returns a valid pointer
2004         https://bugs.webkit.org/show_bug.cgi?id=60261
2005
2006         * Platform/gtk/ModuleGtk.cpp:
2007         (WebKit::Module::load):
2008
2009 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2010
2011         Unreviewed. Fix WebKit2 GTK build after r85808.
2012
2013         * Shared/NativeWebWheelEvent.h:
2014         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2015         (webkitWebViewBaseScrollEvent):
2016
2017 2011-05-04  Cris Neckar  <cdn@chromium.org>
2018
2019         Reviewed by Adam Barth.
2020
2021         Expose WebView directly through ChromeClient.
2022         https://bugs.webkit.org/show_bug.cgi?id=49902
2023
2024         * WebProcess/WebCoreSupport/WebChromeClient.h:
2025         (WebKit::WebChromeClient::webView):
2026
2027 2011-05-04  Jeff Miller  <jeffm@apple.com>
2028
2029         Reviewed by Darin Adler.
2030
2031         Send unhandled wheel events to parent window on Windows
2032         https://bugs.webkit.org/show_bug.cgi?id=60220
2033
2034         Keep track of wheel events using NativeWebWheelEvent instead of WebWheelEvent in WebPageProxy
2035         so we can send the native event to the parent window if WebKit doesn't handle it.
2036
2037         * UIProcess/API/mac/WKView.mm: Use NativeWebWheelEvent instead of WebWheelEvent.
2038
2039         * UIProcess/API/qt/qwkpage.cpp:
2040         (QWKPagePrivate::wheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent.
2041
2042         * UIProcess/WebPageProxy.cpp:
2043         (WebKit::WebPageProxy::WebPageProxy): Removed initialization of obsolete m_processingWheelEvent member variable.
2044         (WebKit::coalesceWheelEvents): Use NativeWebWheelEvent instead of WebWheelEvent and add a note that this won't work if we ever enable MERGE_WHEEL_EVENTS. 
2045         (WebKit::WebPageProxy::handleWheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent, keep track of the current event in m_currentlyProcessedWheelEvent.
2046         (WebKit::WebPageProxy::didReceiveEvent): Call wheelEventNotHandled() on Windows if wheel event is not handled.
2047         (WebKit::WebPageProxy::processDidCrash): Clear out m_currentlyProcessedWheelEvent.
2048         * UIProcess/WebPageProxy.h: Change handleWheelEvent() to take a NativeWebWheelEvent, added wheelEventNotHandled() on Windows, remove m_processingWheelEvent, add m_currentlyProcessedWheelEvent.
2049
2050         * UIProcess/win/WebPageProxyWin.cpp:
2051         (WebKit::WebPageProxy::wheelEventNotHandled): Added.
2052         
2053         * UIProcess/win/WebView.cpp:
2054         (WebKit::WebView::onWheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent.
2055
2056 2011-05-04  Anders Carlsson  <andersca@apple.com>
2057
2058         Reviewed by Darin Adler.
2059
2060         Add bundle API for making a page paint as the background of another page
2061         https://bugs.webkit.org/show_bug.cgi?id=60227
2062
2063         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2064         (WKBundlePageSetUnderlayPage):
2065         Call WebPage::setUnderlayPage.
2066
2067         * WebProcess/WebPage/WebPage.cpp:
2068         (WebKit::WebPage::close):
2069         Null out the underlay page.
2070
2071         (WebKit::WebPage::layoutIfNeeded):
2072         Layout the underlay page if necessary.
2073
2074         (WebKit::WebPage::drawRect):
2075         Draw the underlay page.
2076
2077 2011-05-04  Siddharth Mathur  <siddharth.mathur@nokia.com>
2078
2079         Reviewed by Laszlo Gombos.
2080
2081         [Qt][Wk2][Symbian] Capabilities for Qt MiniBrowser and QtWebProcess on Symbian
2082         https://bugs.webkit.org/show_bug.cgi?id=59462
2083
2084         * WebProcess.pro: Add Symbian OS capabilities to web process executable. Also enable
2085         data paging flag and prevent application's icon from showing up in the application grid. 
2086
2087 2011-05-04  Adam Roben  <aroben@apple.com>
2088
2089         Clip and reposition windowed plugins when the UI process paints
2090
2091         This ensures that their geometry updates in sync with the rest of the page.
2092
2093         Most of this patch is just plumbing the scheduleWindowedPluginGeometryUpdate and
2094         scheduleChildWindowGeometryUpdate calls through from NetscapePlugin all the way over to
2095         WebView. I've tried to call out the other parts below.
2096
2097         Fixes <http://webkit.org/b/60210> <rdar://problem/8483441> REGRESSION (WebKit2): Windowed
2098         plugins don't scroll at the same speed as the rest of the page
2099
2100         Reviewed by Darin Adler and Anders Carlsson.
2101
2102         * UIProcess/PageClient.h:
2103         * UIProcess/WebPageProxy.h:
2104         * UIProcess/WebPageProxy.messages.in:
2105         * UIProcess/win/WebPageProxyWin.cpp:
2106         (WebKit::WebPageProxy::scheduleChildWindowGeometryUpdate):
2107         Added plumbing.
2108
2109         * UIProcess/win/WebView.cpp:
2110         (WebKit::WebView::onPaintEvent): Update child windows before painting so that they will stay
2111         in sync with the rest of the page.
2112         (WebKit::WebView::scheduleChildWindowGeometryUpdate): Add this update information to the
2113         set of geometries to update on the next paint.
2114         (WebKit::setWindowRegion): Moved this helper function here from NetscapePluginWin.cpp.
2115         (WebKit::WebView::updateChildWindowGeometries): Update the size, position, and clip rects of
2116         all the child windows with scheduled geometry updates.
2117
2118         * UIProcess/win/WebView.h: Added new members to track and update child window geometries.
2119
2120         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2121         (WebKit::NetscapePlugin::platformPostInitialize): Don't show the window immediately. Let the
2122         UI process take care of it.
2123         (WebKit::NetscapePlugin::platformGeometryDidChange): Don't update the window's position or
2124         clip rect. Let the UI process take care of it.
2125
2126         * WebProcess/Plugins/PluginController.h:
2127         * WebProcess/Plugins/PluginView.cpp:
2128         (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate):
2129         * WebProcess/Plugins/PluginView.h:
2130         * WebProcess/WebPage/WebPage.h:
2131         * WebProcess/WebPage/win/WebPageWin.cpp:
2132         (WebKit::WebPage::scheduleChildWindowGeometryUpdate):
2133         Added plumbing.
2134
2135 2011-05-04  Anders Carlsson  <andersca@apple.com>
2136
2137         Reviewed by Adam Roben.
2138
2139         WKView on Windows has no equivalent of Mac's -[WKView setDraws[Transparent]Background:]
2140         https://bugs.webkit.org/show_bug.cgi?id=52009
2141         <rdar://problem/8829746>
2142
2143         Add and implement WKViewSetDrawsTransparentBackground on windows.
2144
2145         * UIProcess/API/C/win/WKView.cpp:
2146         (WKViewSetDrawsTransparentBackground):
2147         (WKViewDrawsTransparentBackground):
2148         Call through to the WebPageProxy object.
2149
2150         * UIProcess/API/C/win/WKView.h:
2151         * UIProcess/win/WebView.cpp:
2152         (WebKit::drawPageBackground):
2153         Don't fill the rect with white if WebPageProxy::drawsBackground() or 
2154         WebPageProxy::drawsTransparentBackground() returns false. Because of limitations in Win32,
2155         both drawsBackground and drawsTransparentBackground are pretty much equivalent.
2156
2157         (WebKit::WebView::paint):
2158         Pass the WebPageProxy object to drawPageBackground.
2159
2160 2011-05-04  Tao Bai  <michaelbai@chromium.org>
2161
2162         Reviewed by David Kilzer.
2163
2164         Populate touch-icon url to FrameLoaderClient
2165         https://bugs.webkit.org/show_bug.cgi?id=59143
2166
2167         Respected the change of FrameLoaderClient.
2168         Added WebIconURL and WebIconType responding the new IconURL and IconType.
2169         Supported to get the multiple icon urls.
2170
2171         * Configurations/FeatureDefines.xcconfig:
2172         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2173         (WebKit::WebFrameLoaderClient::dispatchDidChangeIcons):
2174         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2175
2176 2011-05-04  Anders Carlsson  <andersca@apple.com>
2177
2178         Reviewed by Dan Bernstein.
2179
2180         Can't save a link from "Save Linked File to Download" popup menu
2181         https://bugs.webkit.org/show_bug.cgi?id=60190
2182         <rdar://problem/9367927>
2183
2184         Make sure that suggestedFilenameForResourceWithURL and resourceDataForFrame both look
2185         in the cache if the resource can't be found in the current web page. This matches WebKit1.
2186
2187         * WebProcess/WebPage/WebFrame.cpp:
2188         (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
2189         Call WebPage::cachedSuggestedFilenameForURL if we can't find a resource in the page.
2190
2191         * WebProcess/WebPage/WebPage.cpp:
2192         (WebKit::resourceDataForFrame):
2193         Move code out from getResourceDataFromFrame.
2194
2195         (WebKit::WebPage::getResourceDataFromFrame):
2196         Call resourceDataForFrame first and then cachedResponseDataForURL.
2197
2198         * WebProcess/WebPage/WebPage.h:
2199         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2200         (WebKit::WebPage::platformHasLocalDataForURL):
2201         (WebKit::WebPage::cachedResponseMIMETypeForURL):
2202         (WebKit::WebPage::platformCanHandleRequest):
2203         (WebKit::WebPage::cachedSuggestedFilenameForURL):
2204         (WebKit::WebPage::cachedResponseDataForURL):
2205         Add stubs.
2206
2207         * WebProcess/WebPage/mac/WebPageMac.mm:
2208         (WebKit::cachedResponseForURL):
2209         Add helper function.
2210
2211         (WebKit::WebPage::cachedSuggestedFilenameForURL):
2212         (WebKit::WebPage::cachedResponseMIMETypeForURL):
2213         (WebKit::WebPage::cachedResponseDataForURL):
2214         Call helper function.
2215
2216         * WebProcess/WebPage/qt/WebPageQt.cpp:
2217         (WebKit::WebPage::platformHasLocalDataForURL):
2218         (WebKit::WebPage::cachedResponseMIMETypeForURL):
2219         (WebKit::WebPage::platformCanHandleRequest):
2220         (WebKit::WebPage::cachedSuggestedFilenameForURL):
2221         (WebKit::WebPage::cachedResponseDataForURL):
2222         Add stubs.
2223         
2224         * WebProcess/WebPage/win/WebPageWin.cpp:
2225         (WebKit::cachedResponseForURL):
2226         Add helper function.
2227
2228         (WebKit::WebPage::platformHasLocalDataForURL):
2229         (WebKit::WebPage::cachedResponseMIMETypeForURL):
2230         (WebKit::WebPage::cachedSuggestedFilenameForURL):
2231         (WebKit::WebPage::cachedResponseDataForURL):
2232         Call helper function.
2233
2234 2011-05-04  Simon Fraser  <simon.fraser@apple.com>
2235
2236         Reviewed by Anders Carlsson.
2237
2238         WebKit2 flashes if entering and exiting compositing rapidly
2239         https://bugs.webkit.org/show_bug.cgi?id=60198
2240         
2241         If a page enters then immediately leaves compositing mode, the
2242         DrawingAreaImpl would send a message to the UI process that it
2243         had entered compositing even after all the layers had been torn
2244         down. Fix this by never sending the 'enter' message if we're
2245         waiting for the 'exit' timer to fire.
2246         
2247         Also fix an assertion in the UI process caused by sending mismatched
2248         'enter' and 'leave' messages by keeping track of which messages
2249         we've sent.
2250
2251         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2252         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2253         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
2254         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2255         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon):
2256         * WebProcess/WebPage/DrawingAreaImpl.h:
2257         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModePending):
2258
2259 2011-05-04  Jeff Miller  <jeffm@apple.com>
2260
2261         Fix typo in svn property in r85756.
2262
2263         * Shared/mac/NativeWebWheelEventMac.mm: Added property svn:eol-style. Removed property snv:eol-style.
2264
2265 2011-05-04  Jeff Miller  <jeffm@apple.com>
2266
2267         Reviewed by Darin Adler.
2268
2269         Add NativeWebWheelEvent class
2270         https://bugs.webkit.org/show_bug.cgi?id=60182
2271         
2272         This will be needed soon when we start notifying the UI process that a mouse wheel event wasn't handled by WebKit.
2273
2274         * GNUmakefile.am: Added NativeWebWheelEventGtk.cpp and NativeWebWheelEvent.h.
2275         * Shared/NativeWebWheelEvent.h: Added.
2276         (WebKit::NativeWebWheelEvent::nativeEvent): Added.
2277         * Shared/gtk/NativeWebWheelEventGtk.cpp: Added.
2278         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
2279         * Shared/mac/NativeWebWheelEventMac.mm: Added.
2280         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
2281         * Shared/qt/NativeWebWheelEventQt.cpp: Added.
2282         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
2283         * Shared/win/NativeWebWheelEventWin.cpp: Added.
2284         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):Added.
2285         * WebKit2.pro: Added NativeWebWheelEventQt.cpp and NativeWebWheelEvent.h.
2286         * WebKit2.xcodeproj/project.pbxproj: Added NativeWebWheelEventMac.mm and NativeWebWheelEvent.h.
2287         * win/WebKit2.vcproj: Added NativeWebWheelEventWin.cpp and NativeWebWheelEvent.h.
2288
2289 2011-05-04  Siddharth Mathur  <siddharth.mathur@nokia.com>
2290
2291         Reviewed by Anders Carlsson.
2292
2293         ArgumentDecoder should use aligned memory for its internal copy of data
2294         https://bugs.webkit.org/show_bug.cgi?id=59960 
2295
2296         Since we check for memory alignment when unpacking primitive types from the buffer,
2297         insure alignment of the base address.
2298         As uint64_t is the largest type we use in Argument encoder/decoder, use 8 byte alignment. 
2299
2300         * Platform/CoreIPC/ArgumentDecoder.cpp:
2301         (CoreIPC::ArgumentDecoder::~ArgumentDecoder): free m_alignedBase
2302         (CoreIPC::roundUpToAlignment): move this up in the source file
2303         (CoreIPC::ArgumentDecoder::initialize): m_buffer is now guaranteed sizeof(uint64_t) aligned
2304         * Platform/CoreIPC/ArgumentDecoder.h: add m_alignedBase member which needs to be freed in d'tor
2305
2306 2011-05-04  Adam Roben  <aroben@apple.com>
2307
2308         Make ShareableBitmap::makeCGImageCopy use a copy-on-write copy on Windows when possible
2309
2310         Fixes <http://webkit.org/b/57269> <rdar://problem/9198788> REGRESSION (r82151): Every WKView
2311         paint now makes an extra copy of the painted bits
2312
2313         Reviewed by Anders Carlsson.
2314
2315         * Platform/SharedMemory.h:
2316         * Platform/win/SharedMemoryWin.cpp:
2317         (WebKit::SharedMemory::createCopyOnWriteCopy):
2318         Added this new function. Creates a copy-on-write copy of the first |size| bytes of the
2319         original SharedMemory.
2320
2321         * Shared/ShareableBitmap.h: Added createCGImage helper function.
2322
2323         * Shared/cg/ShareableBitmapCG.cpp:
2324         (WebKit::ShareableBitmap::makeCGImageCopy): Don't compile this version of this function on
2325         Windows; we'll provide our own implementation since CGBitmapContextCreateImage isn't smart
2326         enough to make a copy-on-write copy on Windows.
2327         (WebKit::ShareableBitmap::makeCGImage): Moved some code from here...
2328         (WebKit::ShareableBitmap::createCGImage): ...to this new function.
2329
2330         * Shared/cg/win/ShareableBitmapCGWin.cpp: Added.
2331         (WebKit::derefSharedMemory): This function is called when the CGDataProvider is finalized.
2332         All we have to do is deref the SharedMemory that was backing the CGDataProvider.
2333         (WebKit::ShareableBitmap::makeCGImageCopy): Create a copy-on-write copy of the image data
2334         when possible. We use the copy-on-write copy to back this ShareableBitmap from here on out,
2335         and use the original SharedMemory to back the CGImage. This should prevent future
2336         modifications to the ShareableBitmap from affecting the CGImage. If we can't make a
2337         copy-on-write copy, we fall back to just copying the data normally.
2338
2339         * win/WebKit2.vcproj: Added ShareableBitmapCGWin.cpp.
2340
2341 2011-05-04  Adam Roben  <aroben@apple.com>
2342
2343         Let transparent windowless plugins draw into a graphics context with an alpha channel
2344
2345         Fixes <http://webkit.org/b/57647> <rdar://problem/9168462> Flash plugins with
2346         wmode=transparent have black (instead of transparent) background in WebKit2 on Windows
2347
2348         I had trouble writing a test case for this, so I split that task out into
2349         <http://webkit.org/b/60169>.
2350
2351         Reviewed by Sam Weinig.
2352
2353         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2354         (WebKit::NetscapePlugin::platformPaint): Give the graphics context an alpha channel if this
2355         is a transparent windowless plugin.
2356
2357 2011-05-03  Adam Roben  <aroben@apple.com>
2358
2359         Remove WebPageProxy::setDrawingArea
2360
2361         It is unused. It also does a useless equality comparison between OwnPtrs; if they are equal,
2362         we've already lost.
2363
2364         Reviewed by Anders Carlsson and Antti Koivisto.
2365
2366         * UIProcess/WebPageProxy.cpp:
2367         * UIProcess/WebPageProxy.h:
2368         Removed setDrawingArea.
2369
2370         (WebKit::WebPageProxy::drawingArea):
2371         (WebKit::WebPageProxy::backForwardList):
2372         Made these functions const while I was at it.
2373
2374 2011-05-03  Pratik Solanki  <psolanki@apple.com>
2375
2376         Reviewed by Antti Koivisto.
2377
2378         Part of WebCore should use CFNetwork-based loader on Mac
2379         https://bugs.webkit.org/show_bug.cgi?id=51836
2380
2381         Merge the conflicting definitions of WebCore::privateBrowsingCookieStorage() into one.
2382
2383         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
2384         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
2385
2386 2011-05-02  Jer Noble  <jer.noble@apple.com>
2387
2388         Reviewed by Adam Roben.
2389
2390         Implement FULLSCREEN_API on Windows, Part 3: WebKit2
2391         https://bugs.webkit.org/show_bug.cgi?id=59845
2392
2393         Implement a similar full screen mode to WebKit; Re-use the same
2394         full screen window class used in WebKit in the new WebFullScreenController.
2395         No animations (yet), so many of the stubs remain unimplemented.
2396
2397         * UIProcess/win/WebView.cpp:
2398         (WebKit::WebView::onKeyEvent): Handle VK_ESCAPE and cancel full screen
2399             mode if caught.
2400         (WebKit::WebView::fullScreenController): Lazily instantiate m_fullScreenController.
2401         (WebKit::WebView::fullScreenClientWindow): Added accessor.
2402         (WebKit::WebView::fullScreenClientParentWindow): Ditto.
2403         (WebKit::WebView::fullScreenClientSetParentWindow): Ditto.
2404         (WebKit::WebView::fullScreenClientWillEnterFullScreen): Pass through to WebFullScreenManagerProxy.
2405         (WebKit::WebView::fullScreenClientDidEnterFullScreen): Ditto.
2406         (WebKit::WebView::fullScreenClientWillExitFullScreen): Ditto.
2407         (WebKit::WebView::fullScreenClientDidExitFullScreen): Ditto.
2408         * UIProcess/win/WebView.h:
2409         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
2410         (WebKit::WebFullScreenManagerProxy::enterFullScreen): Pass through to 
2411             WebFullScreenController.
2412         (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto.
2413         * UIProcess/win/WebView.cpp:
2414         (WebKit::WebView::WebView):
2415         (WebKit::WebView::onKeyEvent): Handle the escape key and exit
2416            full screen mode when detected.
2417         (WebKit::WebView::fullScreenWindowController): Added.
2418         * UIProcess/win/WebView.h:
2419         * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp:
2420         (WebKit::WebFullScreenManagerWin::~WebFullScreenManagerWin):
2421         (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Host the root
2422             full screen layer if it gets detached.
2423         * WebProcess/FullScreen/win/WebFullScreenManagerWin.h:
2424         * win/WebKit2.vcproj:
2425
2426 2011-05-03  Brady Eidson  <beidson@apple.com>
2427
2428         Reviewed by Sam Weinig.
2429
2430         https://bugs.webkit.org/show_bug.cgi?id=60087 and <rdar://problem/9373182>
2431         WK2 Icon Database should provide access to all image representations in the icon.
2432
2433         Expose a CFArrayRef of CGImageRefs as API for CG platforms:
2434         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
2435         (WKIconDatabaseTryCopyCGImageArrayForURL):
2436         * UIProcess/API/C/cg/WKIconDatabaseCG.h:
2437
2438 2011-05-03  Sam Weinig  <sam@webkit.org>
2439
2440         Reviewed by Dan Bernstein.
2441
2442         WebKit2 should treat API calls that start/stop loads as user gestures for responsiveness timer
2443         https://bugs.webkit.org/show_bug.cgi?id=60083
2444
2445         * UIProcess/WebPageProxy.cpp:
2446         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
2447         (WebKit::WebPageProxy::tryClose):
2448         (WebKit::WebPageProxy::loadURL):
2449         (WebKit::WebPageProxy::loadURLRequest):
2450         (WebKit::WebPageProxy::loadHTMLString):
2451         (WebKit::WebPageProxy::loadAlternateHTMLString):
2452         (WebKit::WebPageProxy::loadPlainTextString):
2453         (WebKit::WebPageProxy::stopLoading):
2454         (WebKit::WebPageProxy::reload):
2455         (WebKit::WebPageProxy::goForward):
2456         (WebKit::WebPageProxy::goBack):
2457         (WebKit::WebPageProxy::goToBackForwardItem):
2458         Start responsiveness timer for load start/stop and close.
2459
2460         * WebProcess/WebPage/WebPage.cpp:
2461         (WebKit::SendStopResponsivenessTimer::SendStopResponsivenessTimer):
2462         (WebKit::SendStopResponsivenessTimer::~SendStopResponsivenessTimer):
2463         Add simple RAII class to ensure the StopResponsivenessTimer is called.
2464
2465         (WebKit::WebPage::tryClose):
2466         (WebKit::WebPage::loadURLRequest):
2467         (WebKit::WebPage::loadData):
2468         (WebKit::WebPage::stopLoading):
2469         (WebKit::WebPage::reload):
2470         (WebKit::WebPage::goForward):
2471         (WebKit::WebPage::goBack):
2472         (WebKit::WebPage::goToBackForwardItem):
2473         Sends a message back to the UIProcess to indicate the WebProcess
2474         is still responsive.
2475
2476 2011-05-03  Darin Adler  <darin@apple.com>
2477
2478         Reviewed by Sam Weinig.
2479
2480         <rdar://problem/9250444> Enter key doesn't work in a web text field (but Return key does)
2481
2482         No test at this time because the WebKit2 eventSender doesn't use this code path.
2483
2484         * Shared/mac/WebEventFactory.mm:
2485         (WebKit::WebEventFactory::createWebKeyboardEvent): Copied the code to special-case certain
2486         keys from the corresponding Mac WebKit1 code path.
2487
2488 2011-05-03  Jeff Miller  <jeffm@apple.com>
2489
2490         Reviewed by Darin Adler.
2491
2492         Unreachable URL is lost when canceling load of a new page
2493         https://bugs.webkit.org/show_bug.cgi?id=60057
2494         <rdar://problem/9049135>
2495         
2496         When setting the unreachable URL in the WebFrameProxy, keep track of any previous unreachable URL
2497         so we can restore it if the page load fails.
2498
2499         * UIProcess/WebFrameProxy.cpp:
2500         (WebKit::WebFrameProxy::didFailProvisionalLoad): Restore m_unreachableURL to previous value.
2501         (WebKit::WebFrameProxy::setUnreachableURL): Keep track of previous unreachable URL in m_lastUnreachableURL.
2502         * UIProcess/WebFrameProxy.h: Moved setUnreachableURL() implementation to .cpp file, added m_lastUnreachableURL.
2503
2504 2011-05-03  Adam Roben  <aroben@apple.com>
2505
2506         Fix most strict PassOwnPtr violations on Windows
2507
2508         Fixes <http://webkit.org/b/60025> Windows should (almost) build with strict PassOwnPtr
2509         enabled
2510
2511         Reviewed by Anders Carlsson.
2512
2513         * Platform/CoreIPC/win/ConnectionWin.cpp:
2514         (CoreIPC::Connection::writeEventHandler): Use nullptr.
2515
2516 2011-05-03  Julien Chaffraix  <jchaffraix@codeaurora.org>
2517
2518         Reviewed by Dimitri Glazkov.
2519
2520         Element:shadowRoot & Element::ensureShadowRoot should return ShadowRoot*
2521         https://bugs.webkit.org/show_bug.cgi?id=58703
2522
2523         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Added #include for ShadowRoot.h.
2524
2525 2011-05-03  Sam Weinig  <sam@webkit.org>
2526
2527         Reviewed by Anders Carlsson.
2528
2529         More quarantine related sandbox denial when downloading files
2530         <rdar://problem/9362626>
2531
2532         * WebProcess/com.apple.WebProcess.sb:
2533
2534 2011-05-02  Adam Roben  <aroben@apple.com>
2535
2536         Take advantage of implicit conversion from nullptr_t to PassOwnPtr
2537
2538         Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
2539         doesn't work, but should
2540
2541         Reviewed by Adam Barth.
2542
2543         * Platform/CoreIPC/Connection.cpp:
2544         * UIProcess/qt/WebContextMenuProxyQt.cpp:
2545         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2546         * WebProcess/WebPage/DrawingArea.cpp:
2547
2548 2011-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2549
2550         Reviewed by Eric Seidel.
2551
2552         [GTK] Build webkit1 even when webkit2 is enabled
2553         https://bugs.webkit.org/show_bug.cgi?id=59695
2554
2555         * GNUmakefile.am:
2556
2557 2011-05-02  Yael Aharon  <yael.aharon@nokia.com>
2558
2559         Reviewed by Andreas Kling.
2560
2561         [Qt] White screen displays when using MiniBrowser with DrawingAreaImpl
2562         https://bugs.webkit.org/show_bug.cgi?id=60003
2563
2564         When using DrawingAreaImpl, we need to properly pass the viewSize to the WebPage.
2565         Otherwise, the dirty rect will always be empty and we will not draw.
2566
2567         * UIProcess/API/qt/qwkpage.cpp:
2568         (QWKPagePrivate::viewSize):
2569
2570 2011-05-02  Anders Carlsson  <andersca@apple.com>
2571
2572         Fix crash that was introduced in r85515.
2573
2574         * Platform/CoreIPC/Connection.cpp:
2575         (CoreIPC::Connection::dispatchSyncMessage):
2576         If didReceiveSyncMessage returns ManualReply, the client took ownership of the reply
2577         encoder so we must leak it to avoid a double-free.
2578
2579 2011-05-02  Anders Carlsson  <andersca@apple.com>
2580
2581         Reviewed by Sam Weinig.
2582
2583         The web process locks up when the plug-in process crashes
2584         https://bugs.webkit.org/show_bug.cgi?id=59999
2585         <rdar://problem/8889303>
2586
2587         Add a hash map from plug-in paths to CoreIPC connections to PluginProcessConnectionManager.
2588         Add PluginProcessConnectionManager::pluginProcessCrashed and make it look up the corresponding
2589         CoreIPC connection and call postConnectionDidCloseOnConnectionWorkQueue on it.
2590
2591         * Platform/CoreIPC/Connection.cpp:
2592         (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
2593         * Platform/CoreIPC/Connection.h:
2594         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2595         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2596         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
2597         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
2598         * WebProcess/Plugins/PluginProcessConnectionManager.h:
2599         * WebProcess/WebProcess.cpp:
2600         (WebKit::WebProcess::pluginProcessCrashed):
2601
2602 2011-05-02  Anders Carlsson  <andersca@apple.com>
2603
2604         Try to fix Windows build.
2605
2606         * Scripts/webkit2/messages.py:
2607         * Scripts/webkit2/messages_unittest.py:
2608
2609 2011-05-02  Anders Carlsson  <andersca@apple.com>
2610
2611         Reviewed by Oliver Hunt.
2612
2613         Dispatch the PluginProcessCrashed on the connection work queue
2614         https://bugs.webkit.org/show_bug.cgi?id=59996
2615
2616         * WebProcess/WebProcess.cpp:
2617         (WebKit::WebProcess::initialize):
2618         Add the web process as a queue client.
2619
2620         (WebKit::WebProcess::terminate):
2621         Remove the web process as a queue client.
2622
2623         (WebKit::WebProcess::willProcessMessageOnClientRunLoop):
2624         Try calling willProcessWebProcessMessageOnClientRunLoop.
2625
2626         * WebProcess/WebProcess.messages.in:
2627         Add the DispatchOnConnectionQueue attribute to PluginProcessCrashed.
2628
2629 2011-05-02  Anders Carlsson  <andersca@apple.com>
2630
2631         Reviewed by Sam Weinig.
2632
2633         Send a PluginProcessCrashed message to all web processes when a plug-in crashes
2634         https://bugs.webkit.org/show_bug.cgi?id=59994
2635
2636         * UIProcess/Plugins/PluginProcessProxy.cpp:
2637         (WebKit::PluginProcessProxy::didClose):
2638         Iterate over all contexts and send PluginProcessCrashed to all web processes in each context.
2639
2640         (WebKit::PluginProcessProxy::didFinishLaunching):
2641         Call setShouldCloseConnectionOnMachExceptions on the CoreIPC connection.
2642
2643         * WebProcess/WebProcess.cpp:
2644         (WebKit::WebProcess::pluginProcessCrashed):
2645         Add empty stub.
2646
2647         * WebProcess/WebProcess.messages.in:
2648         Add message.
2649
2650 2011-05-02  Anders Carlsson  <andersca@apple.com>
2651
2652         Reviewed by Simon Fraser.
2653
2654         Plug-in not completely repainted after a crash
2655         https://bugs.webkit.org/show_bug.cgi?id=59991
2656
2657         Call Widget::invalidate().
2658
2659         * WebProcess/Plugins/PluginView.cpp:
2660         (WebKit::PluginView::pluginProcessCrashed):
2661
2662 2011-05-02  Anders Carlsson  <andersca@apple.com>
2663
2664         Reviewed by Dan Bernstein.
2665
2666         Make PluginProcessConnectionManager a member of WebProcess
2667         https://bugs.webkit.org/show_bug.cgi?id=59989
2668
2669         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2670         * WebProcess/Plugins/PluginProcessConnectionManager.h:
2671         * WebProcess/Plugins/PluginProxy.cpp:
2672         (WebKit::PluginProxy::initialize):
2673         * WebProcess/WebProcess.h:
2674         (WebKit::WebProcess::pluginProcessConnectionManager):
2675
2676 2011-05-02  Mark Rowe  <mrowe@apple.com>
2677
2678         Reviewed by Brady Eidson.
2679
2680         <rdar://problem/9371289> WebKit2 can persist an invalid current back/forward item index when URLs are filtered from back/forward list
2681
2682         * UIProcess/cf/WebBackForwardListCF.cpp:
2683         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): We need to update the current index to account for filtered items
2684         for all items before the current item in the array.
2685
2686 2011-05-02  Anders Carlsson  <andersca@apple.com>
2687
2688         Reviewed by Adam Roben.
2689
2690         Handle DispatchOnConnectionQueue for asynchronous messages
2691         https://bugs.webkit.org/show_bug.cgi?id=59959
2692
2693         If any asynchronous messages have the DispatchOnConnectionQueue attribute, 
2694         create a new willProcess{Receiver}MessageOnClientRunLoop.
2695
2696         * Scripts/webkit2/messages.py:
2697         - Fix a regex bug where we would only parse attributes on synchronous messages.
2698         - Collect messages with the dispatch_on_connection_queue flag set. We only handle
2699           asynchronous messages currently; sync message support will be added when/if the
2700           need arises.
2701
2702         * Scripts/webkit2/messages_unittest.py:
2703         Update test.
2704
2705 2011-05-02  Adam Barth  <abarth@webkit.org>
2706
2707         Reviewed by David Levin.
2708
2709         PLATFORM(MAC) should (almost!) build with strict PassOwnPtr
2710         https://bugs.webkit.org/show_bug.cgi?id=59924
2711
2712         * Platform/CoreIPC/Connection.cpp:
2713         (CoreIPC::Connection::sendSyncMessage):
2714         (CoreIPC::Connection::waitForSyncReply):
2715         (CoreIPC::Connection::dispatchSyncMessage):
2716         * Platform/CoreIPC/Connection.h:
2717         (CoreIPC::Connection::Message::releaseArguments):
2718             - The memory management for this class is very strange.  I wrote a
2719               large comment.  Hopefully a kind soul will come by and fix it.
2720         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2721         (WebKit::NetscapePluginModule::unload):
2722         * UIProcess/API/mac/WKView.mm:
2723         (-[WKView _setFindIndicator:fadeOut:]):
2724         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
2725         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
2726         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2727         (WebKit::toStringVector):
2728         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2729         (WebKit::NetscapePluginStream::stop):
2730         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2731         (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
2732         * WebProcess/WebPage/DrawingArea.cpp:
2733         (WebKit::DrawingArea::create):
2734
2735 2011-04-29  Chris Marrin  <cmarrin@apple.com>
2736
2737         Reviewed by Simon Fraser.
2738
2739         Pages with accelerated compositing do not redraw unless scrolled
2740         https://bugs.webkit.org/show_bug.cgi?id=59851
2741
2742         Added a setNeedDisplay on the non-composited content layer after
2743         the size is changed so it paints the full size of the layer. Called
2744         only for the areas newly exposed, if any.
2745
2746         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
2747         (WebKit::LayerTreeHostCA::sizeDidChange):
2748
2749 2011-05-02  Anders Carlsson  <andersca@apple.com>
2750
2751         Reviewed by Adam Roben.
2752
2753         Need a way to handle CoreIPC messages on the connection work queue
2754         https://bugs.webkit.org/show_bug.cgi?id=59954
2755
2756         Add a Connection::QueueClient abstract class. This class has a single pure virtual
2757         member function, willProcessMessageOnClientRunLoop which should return true if the message 
2758         should be forwarded to the next Connection::QueueClient in the list or Connection::Client's 
2759         run loop for processing and false otherwise. Users of Connection can use addQueueClient to
2760         add clients and all messages will be dispatched  to the queue clients first.
2761
2762         * Platform/CoreIPC/Connection.cpp:
2763         (CoreIPC::Connection::addQueueClient):
2764         (CoreIPC::Connection::removeQueueClient):
2765         (CoreIPC::Connection::processIncomingMessage):
2766         * Platform/CoreIPC/Connection.h:
2767         (CoreIPC::Connection::QueueClient::~QueueClient):
2768
2769 2011-05-02  Jeff Miller  <jeffm@apple.com>
2770
2771         Reviewed by Adam Roben.
2772
2773         WebKit2 thinks the web process is unresponsive when a plugin displays a context menu
2774         https://bugs.webkit.org/show_bug.cgi?id=59124
2775         <rdar://problem/9318600>
2776         
2777         This is the Windows version of <https://bugs.webkit.org/show_bug.cgi?id=58943>.
2778
2779         Since we have no control over how long a plugin will take to handle an event, we need
2780         to tell the UI process to stop its responsive timer when we're about to send an event
2781         to the plugin. The downside of doing this is that if the plugin does become unresponsive,
2782         the user won't know this immediately until they click on the web page again.  At that point,
2783         if the web process is unresponsive because of a hung plugin, the responsiveness timer will fire.
2784         
2785         We're only doing this on Windows currently when running plugins in the web process (Anders fixed
2786         bug 58943 in a different way when running plugins in a separate plugin process on the Mac).
2787
2788         * PluginProcess/PluginControllerProxy.cpp:
2789         (WebKit::PluginControllerProxy::willSendEventToPlugin): Added, not used when running plugins in a separate process.
2790         * PluginProcess/PluginControllerProxy.h: Added willSendEventToPlugin().
2791
2792         * UIProcess/WebPageProxy.cpp:
2793         (WebKit::WebPageProxy::stopResponsivenessTimer): Added.
2794         * UIProcess/WebPageProxy.h: Added stopResponsivenessTimer().
2795         * UIProcess/WebPageProxy.messages.in: Added StopResponsivenessTimer message.
2796
2797         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2798         (WebKit::NetscapePlugin::platformPaint): Tell our controller when we're about to send an event to the plugin.
2799         (WebKit::NetscapePlugin::platformHandleMouseEvent): Ditto.
2800         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): Ditto.
2801         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): Ditto.
2802
2803         * WebProcess/Plugins/PluginController.h: Added willSendEventToPlugin().
2804         * WebProcess/Plugins/PluginView.cpp:
2805         (WebKit::PluginView::willSendEventToPlugin): Added, tell the UI process to stop its responsiveness timer.
2806         * WebProcess/Plugins/PluginView.h: Added willSendEventToPlugin().
2807
2808 2011-04-29  Steve Falkenburg  <sfalken@apple.com>
2809
2810         Reviewed by Maciej Stachowiak.
2811
2812         Plug-in failed to initialize message should be called when Java fails to initialize
2813         https://bugs.webkit.org/show_bug.cgi?id=59856
2814         
2815         To match the WebKit1 behavior, WebKit2 should dispatch the plug-in failed
2816         to initialize message when we can't instantiate the Java plug-in.
2817
2818         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2819         (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
2820
2821 2011-05-02  Sam Weinig  <sam@webkit.org>
2822
2823         Reviewed by Adam Barth.
2824
2825         Prune some #includes from DOMWindow.h
2826         https://bugs.webkit.org/show_bug.cgi?id=59907
2827
2828         * WebProcess/WebPage/WebFrame.cpp:
2829         Add now missing SecurityOrigin.h #include.
2830
2831 2011-04-29  Brian Weinstein  <bweinstein@apple.com>
2832
2833         Reviewed by Dan Bernstein.
2834
2835         WebKit2: Crash closing tab with docked Web Inspector
2836         https://bugs.webkit.org/show_bug.cgi?id=59914
2837         <rdar://problem/9359672>
2838         
2839         When a tab is closed with a docked inspector, invalidate called platformClose, which
2840         didn't do the tear down that is needed, but is called when we close the web inspector explcitly.
2841         One part of tear down we weren't doing is removing ourselves as a WindowMessageBrodcaster listener
2842         on the inspected web view, and this can cause crashes.
2843         
2844         This patch also renames platformClose to platformDidClose, to be clearer about when the function
2845         is called.
2846
2847         * UIProcess/WebInspectorProxy.cpp:
2848         (WebKit::WebInspectorProxy::invalidate): Call didClose instead of platformClose.
2849         (WebKit::WebInspectorProxy::didClose): Call platformDidClose instead of platformClose.
2850         * UIProcess/WebInspectorProxy.h:
2851         * UIProcess/mac/WebInspectorProxyMac.mm:
2852         (WebKit::WebInspectorProxy::platformDidClose): Renamed from platformClose.
2853         * UIProcess/win/WebInspectorProxyWin.cpp:
2854         (WebKit::WebInspectorProxy::platformDidClose): Ditto.
2855         * UIProcess/gtk/WebInspectorGtk.cpp:
2856         (WebKit::WebInspectorProxy::platformDidClose): Ditto.
2857         * UIProcess/qt/WebInspectorProxyQt.cpp:
2858         (WebKit::WebInspectorProxy::platformDidClose): Ditto.
2859
2860 2011-05-01  Sam Weinig  <sam@webkit.org>
2861
2862         Reviewed by Anders Carlsson.
2863
2864         Prune some unnecessary #includes
2865         https://bugs.webkit.org/show_bug.cgi?id=59895
2866
2867         Start getting rid of unnecessary #includes and forward declares.
2868
2869         * WebProcess/Plugins/PluginView.cpp:
2870         * WebProcess/WebPage/WebPage.cpp:
2871
2872 2011-05-01  Patrick Gansterer  <paroga@webkit.org>
2873
2874         [WIN] Unreviewed buildfix after r85434.
2875
2876         * UIProcess/WebPageProxy.cpp:
2877         (WebKit::WebPageProxy::startDragDrop):
2878         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
2879         (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
2880         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
2881         * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp:
2882         (WebKit::WebDragClient::startDrag):
2883         * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp:
2884         (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
2885
2886 2011-05-01  Anders Carlsson  <andersca@apple.com>
2887
2888         Reviewed by Sam Weinig.
2889
2890         Can't open document from skydrive.com in Microsoft Word
2891         https://bugs.webkit.org/show_bug.cgi?id=59891
2892         <rdar://problem/9354285>
2893
2894         Add the AllowHalfBakedQuickDrawSupport quirk for the SharePoint plug-in.
2895
2896         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2897         (WebKit::NetscapePluginModule::determineQuirks):
2898
2899 2011-05-01  Anders Carlsson  <andersca@apple.com>
2900
2901         Reviewed by Sam Weinig.
2902
2903         Don't try to create a backing store for a 0x0 plug-in
2904         https://bugs.webkit.org/show_bug.cgi?id=59887
2905
2906         * WebProcess/Plugins/PluginProxy.cpp:
2907         (WebKit::PluginProxy::geometryDidChange):
2908
2909 2011-05-01  Anders Carlsson  <andersca@apple.com>
2910
2911         Reviewed by Kevin Decker.
2912
2913         Sandbox violation by WebProcess for DownloadAssessment.plist
2914         https://bugs.webkit.org/show_bug.cgi?id=59879
2915         <rdar://problem/9326041>
2916
2917         * WebProcess/com.apple.WebProcess.sb:
2918         Allow reading ~/Library/Preferences/com.apple.DownloadAssessment.plist
2919
2920 2011-05-01  Ivan Krstić  <ike@apple.com>
2921
2922         Reviewed by Maciej Stachowiak.
2923
2924         Remove unnecessary keychain and CoreAudio debris from WebProcess sandbox
2925         https://bugs.webkit.org/show_bug.cgi?id=59873
2926
2927         These rules have been obsoleted by <rdar://problem/9301520> and
2928         <rdar://problem/9181468>.
2929
2930         * WebProcess/com.apple.WebProcess.sb:
2931
2932 2011-05-01  Ivan Krstić  <ike@apple.com>
2933
2934         Reviewed by Maciej Stachowiak.
2935
2936         Simplify WebProcess sandbox with homedir-relative path filters.
2937         https://bugs.webkit.org/show_bug.cgi?id=59872
2938
2939         * WebProcess/com.apple.WebProcess.sb:
2940
2941 2011-05-01  Ivan Krstić  <ike@apple.com>
2942
2943         Reviewed by Maciej Stachowiak.
2944
2945         On-demand VPN support for sandboxed WebProcess.
2946         <rdar://problem/8994181>
2947
2948         * WebProcess/com.apple.WebProcess.sb:
2949
2950 2011-04-30  Ivan Krstić  <ike@apple.com>
2951
2952         Reviewed by Sam Weinig.
2953
2954         Reindent WebProcess sandbox to standard scheme style
2955         https://bugs.webkit.org/show_bug.cgi?id=59870
2956
2957         * WebProcess/com.apple.WebProcess.sb:
2958
2959 2011-04-28  Jer Noble  <jer.noble@apple.com>
2960
2961         Reviewed by Jon Honeycutt.
2962
2963         Implement FULLSCREEN_API on Windows, Part 1: Stubs
2964         https://bugs.webkit.org/show_bug.cgi?id=59778
2965
2966         Add Windows specific stubs for WebKit2 full screen APIs.
2967
2968         * UIProcess/win/WebFullScreenManagerProxyWin.cpp: Added.
2969         (WebKit::WebFullScreenManagerProxy::enterFullScreen): Added stub.
2970         (WebKit::WebFullScreenManagerProxy::exitFullScreen): Added stub.
2971         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Added stub.
2972         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Added stub.
2973         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Added stub.
2974         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Added stub.
2975         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Added stub.
2976         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Added stub.
2977         (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Added stub.
2978         * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp: Added.
2979         (WebKit::WebFullScreenManager::create): Added. Returns a WebFullScreenManagerWin.
2980         (WebKit::WebFullScreenManagerWin::create): Added.
2981         (WebKit::WebFullScreenManagerWin::WebFullScreenManagerWin): Added.
2982         (WebKit::WebFullScreenManagerWin::~WebFullScreenManagerWin): Added.
2983         (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Added stub.
2984         (WebKit::WebFullScreenManagerWin::beginEnterFullScreenAnimation): Added stub.
2985         (WebKit::WebFullScreenManagerWin::beginExitFullScreenAnimation): Added stub.
2986         * WebProcess/FullScreen/win/WebFullScreenManagerWin.h: Added.
2987         * win/WebKit2.vcproj: Added new classes.
2988
2989 2011-04-29  Alexey Proskuryakov  <ap@apple.com>
2990
2991         Reviewed by Simon Fraser and Dan Bernstein.
2992
2993         WebKit2: WebPluginTypeEnabled key is ignored when enumerating plug-ins
2994         https://bugs.webkit.org/show_bug.cgi?id=59852
2995         <rdar://problem/9314011>
2996
2997         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2998         (WebKit::getPluginInfoFromPropertyLists): Do what WebKit1 does (but in CF dialect). And yes,
2999         I've seen plists with both numbers and booleans used .
3000
3001 2011-04-29  Beth Dakin  <bdakin@apple.com>
3002
3003         Reviewed by Simon Fraser.
3004
3005         https://bugs.webkit.org/show_bug.cgi?id=59846
3006         Scrolling causes rounded bottom window corners to become square
3007         <rdar://problem/9234239>
3008
3009         Keep track of the m_windowBottomCornerIntersectionRect in WKView. 
3010         Invalidate the rect before scrolling. And if the rect is non-zero during a 
3011         display, mask the corners, then set the rect to zero so that only displays that 
3012         happen right after a scroll bother to do this.
3013         * UIProcess/API/mac/PageClientImpl.mm:
3014         (WebKit::PageClientImpl::scrollView):
3015         * UIProcess/API/mac/WKView.mm:
3016         (-[WKView displayIfNeeded]):
3017         (-[WKView _cacheWindowBottomCornerRect]):
3018         * UIProcess/API/mac/WKViewInternal.h:
3019
3020 2011-04-29  Jia Pu  <jpu@apple.com>
3021
3022         Reviewed by Sam Weinig.
3023
3024         [Mac] Scrolling WK2 window should dismiss autocorrection panel.
3025         https://bugs.webkit.org/show_bug.cgi?id=59809
3026         <rdar://problem/9317410>
3027
3028         * UIProcess/WebPageProxy.cpp:
3029         (WebKit::WebPageProxy::pageDidScroll): Dimiss autocorrection panel in this function.
3030
3031 2011-04-29  Alexey Proskuryakov  <ap@apple.com>
3032
3033         Reviewed by Dan Bernstein.
3034
3035         WebKit2: Typing with Input methods still enters Roman characters in Safari search field frequently
3036         https://bugs.webkit.org/show_bug.cgi?id=59829
3037         <rdar://problem/9336907>
3038
3039         This patch regresses behavior somewhat in that inline input isn't discarded when something
3040         happens in an inactive window. This doesn't work well in shipping Safari either.
3041
3042         * UIProcess/API/mac/WKView.mm:
3043         (-[WKView _notifyInputContextAboutDiscardedComposition]): Added a method that calls
3044         -discardMarkedText with a safety check.
3045         (-[WKView setMarkedText:selectedRange:replacementRange:]): Use it.
3046         (-[WKView _updateTextInputStateIncludingSecureInputState:]): Use it.
3047         (-[WKView _resetTextInputState]): Use it.
3048
3049 2011-04-29  Chris Fleizach  <cfleizach@apple.com>
3050
3051         Reviewed by Beth Dakin.
3052
3053         AX: Remote accessibility should build on snow leopard
3054         https://bugs.webkit.org/show_bug.cgi?id=59767
3055
3056         * UIProcess/API/mac/WKView.mm:
3057         (-[WKView _updateRemoteAccessibilityRegistration:]):
3058         (-[WKView viewDidMoveToWindow]):
3059         (-[WKView _setAccessibilityWebProcessToken:]):
3060         * WebProcess/WebPage/mac/WebPageMac.mm:
3061         (WebKit::WebPage::platformInitialize):
3062         (WebKit::WebPage::registerUIProcessAccessibilityTokens):
3063         * WebProcess/mac/WebProcessMainMac.mm:
3064         (WebKit::WebProcessMain):
3065
3066 2011-04-29  Sam Weinig  <sam@webkit.org>
3067
3068         Reviewed by Dan Bernstein.
3069
3070         Add protection for shared memory failing to allocate
3071         <rdar://problem/9125287>
3072         https://bugs.webkit.org/show_bug.cgi?id=59842
3073
3074         * Platform/mac/SharedMemoryMac.cpp:
3075         (WebKit::SharedMemory::create):
3076         Add logging in shared memory failure cases.
3077
3078         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3079         (WebKit::DrawingAreaImpl::display):
3080         Guard against ShareableBitmap failing to create a shared memory
3081         backing.
3082
3083 2011-04-28  Stephanie Lewis  <slewis@apple.com>
3084
3085         Reviewed by Darin Adler.
3086
3087         https://bugs.webkit.org/show_bug.cgi?id=59776
3088         <rdar://problem/9287113> REGRESSION: Safari cold/warm launch time 15% to 2x regression
3089         On the first draw the WebProcess is just going to send us blank bits anyway so don't 
3090         pause waiting for the update.  Continue drawing a blank window until the WebProcess
3091         sends us the update.
3092
3093         * UIProcess/DrawingAreaProxyImpl.cpp:
3094         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
3095         (WebKit::DrawingAreaProxyImpl::paint):
3096         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
3097         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
3098         * UIProcess/DrawingAreaProxyImpl.h:
3099
3100 2011-04-29  Jon Lee  <jonlee@apple.com>
3101
3102         Reviewed by mitzpettel.
3103
3104         REGRESSION (WebKit2): (Mac) Selection is gone after switching tabs (59721)
3105         <rdar://problem/9327332>
3106         https://bugs.webkit.org/show_bug.cgi?id=59721
3107
3108         When resigning first responder status, check to see if we need to maintain an inactive
3109         selection in the web view. If we don't, we clear the selection.
3110
3111         This also reverts the change made in 83814, since that was a different attempt to solve this same issue.
3112
3113         * UIProcess/API/C/WKPage.cpp:
3114         (WKPageSetMaintainsInactiveSelection): Export setMaintainsInactiveSelection()
3115         * UIProcess/API/C/WKPage.h:
3116         * UIProcess/API/mac/WKView.mm:
3117         (-[WKView resignFirstResponder]): Check and see if we need to maintain the selection in the view prior to resigning.
3118         If not, we clear the selection
3119         * UIProcess/WebPageProxy.cpp:
3120         (WebKit::WebPageProxy::clearSelection): Send message across process boundary
3121         (WebKit::WebPageProxy::setMaintainsInactiveSelection): Sets variable
3122         * UIProcess/WebPageProxy.h: New member variable to keep track of whether we need to maintain the current selection
3123         (WebKit::WebPageProxy::maintainsInactiveSelection): Returns variable
3124         * WebProcess/WebPage/WebPage.cpp:
3125         (WebKit::WebPage::setFocused): Reverting code to just set the focused bit instead of also clearing the selection
3126         (WebKit::WebPage::clearSelection):
3127         * WebProcess/WebPage/WebPage.h:
3128         * WebProcess/WebPage/WebPage.messages.in: add new ClearSelection() message
3129
3130 2011-04-29  Anders Carlsson  <andersca@apple.com>
3131
3132         Reviewed by Darin Adler.
3133
3134         Application cache doesn't work due to a sandbox violation
3135         https://bugs.webkit.org/show_bug.cgi?id=59818
3136         <rdar://problem/9346971>
3137
3138         Add a sandbox extension for the application cache directory.
3139
3140         * Shared/WebProcessCreationParameters.cpp:
3141         (WebKit::WebProcessCreationParameters::encode):
3142         (WebKit::WebProcessCreationParameters::decode):
3143         Encode and decode the sandbox extension handle.
3144
3145         * Shared/WebProcessCreationParameters.h:
3146         Add a applicationCacheDirectoryExtensionHandle member.
3147
3148         * UIProcess/WebContext.cpp:
3149         (WebKit::WebContext::ensureWebProcess):
3150         If we have a non-empty application cache directory, create a sandbox extension
3151         and pass it to the creation parameters.
3152
3153         * WebProcess/WebProcess.cpp:
3154         (WebKit::WebProcess::initializeWebProcess):
3155         Create and consume a sandbox extension.
3156
3157         * WebProcess/WebProcess.h:
3158         Add an m_applicationCachePathExtension member variable.
3159
3160 2011-04-29  Dean Jackson  <dino@apple.com>
3161
3162         Reviewed by Simon Fraser.
3163
3164         Add ENABLE macro for WebKitAnimation
3165         https://bugs.webkit.org/show_bug.cgi?id=59729
3166
3167         Add new feature to toggle WebKit Animation API.
3168
3169         * Configurations/FeatureDefines.xcconfig:
3170
3171 2011-04-29  Anders Carlsson  <andersca@apple.com>
3172
3173         Reviewed by Brian Weinstein.
3174
3175         Crash when closing a tab that is unresponsive
3176         https://bugs.webkit.org/show_bug.cgi?id=59810
3177         <rdar://problem/9329133>
3178
3179         Back out r84643 - there was no rationale for this change, and it's causing crashes.
3180
3181         * UIProcess/WebPageProxy.cpp:
3182         (WebKit::WebPageProxy::close):
3183         (WebKit::WebPageProxy::processDidCrash):
3184
3185 2011-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3186
3187         Reviewed by Martin Robinson.
3188
3189         [GTK] Rename page as pageProxy in WebKitWebViewBase
3190         https://bugs.webkit.org/show_bug.cgi?id=59790
3191
3192         To avoid consufion between page client and page proxy. Also rename
3193         some methods to webkitWebViewBase* for consistency.
3194
3195         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3196         (webkitWebViewBaseFinalize):
3197         (webkitWebViewBaseExpose):
3198         (webkitWebViewBaseDraw):
3199         (webkitWebViewBaseSizeAllocate):
3200         (webkitWebViewBaseFocusInEvent):
3201         (webkitWebViewBaseFocusOutEvent):
3202         (webkitWebViewBaseKeyPressEvent):
3203         (webkitWebViewBaseKeyReleaseEvent):
3204         (webkitWebViewBaseButtonPressEvent):
3205         (webkitWebViewBaseButtonReleaseEvent):
3206         (webkitWebViewBaseScrollEvent):
3207         (webkitWebViewBaseMotionNotifyEvent):
3208         (webkit_web_view_base_class_init):
3209         (webkitWebViewBaseCreate):
3210         (webkitWebViewBaseGetPage):
3211
3212 2011-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3213
3214         Unreviewed. Fix a crash after r85214.
3215
3216         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3217         (webkit_web_view_base_init): Add line to create the page client
3218         instance, removed by mistake in r85214.
3219
3220 2011-04-28  David Levin  <levin@chromium.org>
3221
3222         Reviewed by Adam Barth.
3223
3224         Remove IMAGE_RESIZER related code.
3225         https://bugs.webkit.org/show_bug.cgi?id=59735
3226
3227         * Configurations/FeatureDefines.xcconfig:
3228
3229 2011-04-28  Sam Weinig  <sam@webkit.org>
3230
3231         Reviewed by Gavin Barraclough.
3232
3233         Original patch by Austin Jennings.
3234
3235         <rdar://problem/9350288>
3236         Update sandbox profile for extension changes
3237
3238         * WebProcess/com.apple.WebProcess.sb:
3239
3240 2011-04-28  Anders Carlsson  <andersca@apple.com>
3241
3242         Reviewed by Darin Adler.
3243
3244         Right-clicking on a Flash movie in an iframe shows the browser context menu
3245         https://bugs.webkit.org/show_bug.cgi?id=59760
3246         <rdar://problem/9340541>
3247
3248         Move context menu event handling out into a separate function. Make sure to call
3249         EventHandler::sendContextMenuEvent on the event handler belonging to the frame of the
3250         node that was clicked, and not the main frame.
3251
3252         * WebProcess/WebPage/WebPage.cpp:
3253         (WebKit::handleContextMenuEvent):
3254         (WebKit::handleMouseEvent):
3255
3256 2011-04-28  Adam Barth  <abarth@webkit.org>
3257
3258         Reviewed by Eric Seidel.
3259
3260         Remove WML
3261         https://bugs.webkit.org/show_bug.cgi?id=59678
3262
3263         Remove WML-related code in WebKit2.
3264
3265         * Configurations/FeatureDefines.xcconfig:
3266         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3267         * WebProcess/WebPage/WebBackForwardListProxy.h:
3268
3269 2011-04-28  Alexey Proskuryakov  <ap@apple.com>
3270
3271         Reviewed by Anders Carlsson.
3272
3273         WebKit2: Frequent crashes in acceptsFirstMouse
3274         https://bugs.webkit.org/show_bug.cgi?id=59746
3275         <rdar://problem/9281270>
3276
3277         The crash occurred when connection was null (and it can become null at any time).
3278
3279         Added checks for the proxy being valid in all sync calls that lacked such.
3280         WebPageProxy::isValid() is not the same as WebProcessProxy::isValid(), but existing checks
3281         looked at the former, so I used that.
3282
3283         * UIProcess/WebPageProxy.cpp:
3284         (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange):
3285         (WebKit::WebPageProxy::getSelectedText):
3286         (WebKit::WebPageProxy::gestureWillBegin):
3287         (WebKit::WebPageProxy::createSnapshotOfVisibleContent):
3288         * UIProcess/mac/WebPageProxyMac.mm:
3289         (WebKit::WebPageProxy::setComposition):
3290         (WebKit::WebPageProxy::confirmComposition):
3291         (WebKit::WebPageProxy::confirmCompositionWithoutDisturbingSelection):
3292         (WebKit::WebPageProxy::insertText):
3293         (WebKit::WebPageProxy::getMarkedRange):
3294         (WebKit::WebPageProxy::getSelectedRange):
3295         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
3296         (WebKit::WebPageProxy::characterIndexForPoint):
3297         (WebKit::WebPageProxy::firstRectForCharacterRange):
3298         (WebKit::WebPageProxy::executeKeypressCommands):
3299         (WebKit::WebPageProxy::writeSelectionToPasteboard):
3300         (WebKit::WebPageProxy::readSelectionFromPasteboard):
3301         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
3302         (WebKit::WebPageProxy::acceptsFirstMouse):
3303
3304 2011-04-27  Brian Weinstein  <bweinstein@apple.com>
3305
3306         Reviewed by Timothy Hatcher.
3307
3308         Mac side of: WebKit2: Support docked mode for Web Inspector
3309         https://bugs.webkit.org/show_bug.cgi?id=59134
3310         <rdar://problem/8739005>
3311
3312         Implement docking of the Web Inspector on Mac. This matches the Windows (WK1 and WK2) closely,
3313         where the inspector and the inspected view are siblings.
3314
3315         * UIProcess/API/C/mac: Added.
3316         * UIProcess/API/C/mac/WKInspectorMac.h: Added.
3317         * UIProcess/API/mac/PageClientImpl.h:
3318         (WebKit::PageClientImpl::wkView): Returns the WKView.
3319         * UIProcess/PageClient.h:
3320         * UIProcess/WebInspectorProxy.h: The inspected view is now a WebInspectorWKView, so we can override tag.
3321         * UIProcess/WebPageProxy.h: Added a getter for the WKView.
3322
3323         * UIProcess/mac/WebInspectorProxyMac.mm:
3324         (-[WebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Calls through to WebInspectorProxy::inspectedViewFrameDidChange.
3325         (-[WebInspectorWKView tag]): Returns a constant defined in WKInspectorMac.h.
3326         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create a WebInspectorWKView instead of a WKView.
3327         (WebKit::WebInspectorProxy::platformClose): Removed a FIXME that isn't needed anymore (we always detach before closing).
3328         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Place our inspector and the inspected view next to each other, assuming the
3329             bottom of the inspector is at the Y origin.
3330         (WebKit::WebInspectorProxy::platformAttach): Listen for changes to the inspected view's frame, and move the inspectorView from the
3331             detached inspector window to the superview of the inspected view (to make the inspector and inspected view siblings).
3332         (WebKit::WebInspectorProxy::platformDetach): Stop listening for changes to the inspected view's frame, and move the inspectorView
3333             back to the detached inspector window. We also resize the inspected view to take up the space the inspector took up before
3334             (assuming the bottom of the inspector was at the Y origin).
3335         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Resize the inspector's view, and call inspectedViewFrameDidChange (which
3336             syncs the inspector and the inspected view), and call setNeedsDisplay on both views.
3337         * UIProcess/mac/WebPageProxyMac.mm:
3338         (WebKit::WebPageProxy::wkView):
3339         
3340         * WebKit2.xcodeproj/project.pbxproj: Add a new file.
3341
3342 2011-04-28  Jessie Berlin  <jberlin@apple.com>
3343
3344         Reviewed by Darin Adler.
3345
3346         Crash under WKPageCreateSnapshotOfVisibleContent if there is no response from the Web Process
3347         in the allotted time.
3348         https://bugs.webkit.org/show_bug.cgi?id=59738
3349
3350         If the handle is null, don't try to create a ShareableBitmap and then a WebImage out of it.
3351
3352         * UIProcess/WebPageProxy.cpp:
3353         (WebKit::WebPageProxy::createSnapshotOfVisibleContent):
3354
3355 2011-04-28  Xan Lopez  <xlopez@igalia.com>
3356
3357         Reviewed by Martin Robinson.
3358
3359         [Gtk] Split JSC and WebCore builds
3360         https://bugs.webkit.org/show_bug.cgi?id=19428
3361
3362         Build JavaScriptCore as a libtool shared library instead of a
3363         private convenience library.
3364
3365         * GNUmakefile.am: adapt to new name for javascriptcore target.
3366
3367 2011-04-28  Brady Eidson  <beidson@apple.com>
3368
3369         Reviewed by Sam Weinig.
3370
3371         <rdar://problem/8773946> and https://bugs.webkit.org/show_bug.cgi?id=59614
3372         Client certificate authentication in WebKit2
3373
3374         Project-file stuff:
3375         * WebKit2.xcodeproj/project.pbxproj:
3376
3377         Allow WKCredentials to store certificates:
3378         * UIProcess/Authentication/WebCredential.cpp:
3379         (WebKit::WebCredential::WebCredential):
3380         (WebKit::WebCredential::certificateInfo):
3381         * UIProcess/Authentication/WebCredential.h:
3382         (WebKit::WebCredential::create):
3383         * UIProcess/API/C/WKCredential.cpp:
3384         (WKCredentialCreateWithCertificateInfo):
3385         * UIProcess/API/C/WKCredential.h:
3386
3387         Pass the certificate info over the wire to the WebProcess:
3388         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
3389         (WebKit::AuthenticationChallengeProxy::useCredential): 
3390
3391         Change the WebProcess to prefer certificate info over basic credentials when responding to a challenge:
3392         * WebProcess/Authentication/AuthenticationManager.cpp:
3393         (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge): Stub for platforms other than Mac,
3394           as only Mac can currently respond to challenges with certificates.
3395         (WebKit::AuthenticationManager::useCredentialForChallenge):
3396         * WebProcess/Authentication/AuthenticationManager.h:
3397         * WebProcess/Authentication/AuthenticationManager.messages.in:
3398         * WebProcess/Authentication/mac: Added.
3399         * WebProcess/Authentication/mac/AuthenticationManager.mac.mm: Added.
3400         (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge): Recreate the identity and certificate
3401           chain and respond to the challenge with it.
3402
3403         Add a newly required #include:
3404         * UIProcess/API/C/WKAuthenticationChallenge.cpp:
3405         * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
3406
3407 2011-04-28  Martin Robinson  <mrobinson@igalia.com>
3408
3409         Reviewed by Xan Lopez.
3410
3411         [GTK] Click counting logic should be shared between WebKit1 and WebKit2
3412         https://bugs.webkit.org/show_bug.cgi?id=59715
3413
3414         Use the GtkClickCounter instead of doing click counting manually. This means that
3415         the code will now be shared between WebKit1 and WebKit2.
3416
3417         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3418         (webkit_web_view_base_init): Remove private member initialization.
3419         (webViewButtonPressEvent): Call into GtkClickCounter.
3420
3421 2011-04-28  Martin Robinson  <mrobinson@igalia.com>
3422
3423         Build fix after r85197.
3424
3425         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3426         (webViewExpose): Use cr.get() here.
3427         (webViewDraw): Small clean up.
3428
3429 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3430
3431         Reviewed by Sam Weinig.
3432
3433         [GTK] Remove WKURLCreateWithURL()
3434         https://bugs.webkit.org/show_bug.cgi?id=59691
3435
3436         The name is a bit confusing and there's already
3437         WKURLCreateWithUTF8CString() in the C API.
3438
3439         * UIProcess/API/C/gtk/WKView.cpp:
3440         * UIProcess/API/C/gtk/WKView.h:
3441
3442 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3443
3444         Reviewed by Martin Robinson.
3445
3446         [GTK] Make WebKitWebViewBase public in the API
3447         https://bugs.webkit.org/show_bug.cgi?id=59689
3448
3449         Add WebKitWebViewBasePrivate.h and move WebKitWebViewBase inernal
3450         methods to it. Rename get_type() method, since it's part of the
3451         public API and should follow gtk coding style.
3452
3453         * GNUmakefile.am: Add WebKitWebViewBasePrivate.h.
3454         * UIProcess/API/C/gtk/WKView.cpp: Use WebKitWebViewBasePrivate.h.
3455         * UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
3456         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3457         (webkitWebViewBaseFinalize):
3458         (webkit_web_view_base_init):
3459         (webViewSizeAllocate):
3460         (webViewFocusInEvent):
3461         (webViewFocusOutEvent):
3462         (webViewKeyPressEvent):
3463         (webViewKeyReleaseEvent):
3464         (webkit_web_view_base_class_init):
3465         * UIProcess/API/gtk/WebKitWebViewBase.h:
3466         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Copied from Source/WebKit2/UIProcess/API/C/gtk/WKView.cpp.
3467         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Use WebKitWebViewBasePrivate.h.
3468
3469 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3470
3471         Reviewed by Martin Robinson.
3472
3473         [GTK] Move WebView to UIProcess/API/gtk
3474         https://bugs.webkit.org/show_bug.cgi?id=59686
3475
3476         And rename it as PageClientImpl, since it's a page client
3477         implementation, not a web view.
3478
3479         * GNUmakefile.am:
3480         * UIProcess/API/C/gtk/WKView.cpp:
3481         * UIProcess/API/gtk/PageClientImpl.cpp: Renamed from Source/WebKit2/UIProcess/gtk/WebView.cpp.
3482         (WebKit::backspaceCallback):
3483         (WebKit::selectAllCallback):
3484         (WebKit::cutClipboardCallback):
3485         (WebKit::copyClipboardCallback):
3486         (WebKit::pasteClipboardCallback):
3487         (WebKit::toggleOverwriteCallback):
3488         (WebKit::popupMenuCallback):
3489         (WebKit::showHelpCallback):
3490         (WebKit::deleteFromCursorCallback):
3491         (WebKit::moveCursorCallback):
3492         (WebKit::PageClientImpl::PageClientImpl):
3493         (WebKit::PageClientImpl::~PageClientImpl):
3494         (WebKit::PageClientImpl::getEditorCommandsForKeyEvent):
3495         (WebKit::PageClientImpl::createDrawingAreaProxy):
3496         (WebKit::PageClientImpl::setViewNeedsDisplay):
3497         (WebKit::PageClientImpl::displayView):
3498         (WebKit::PageClientImpl::scrollView):
3499         (WebKit::PageClientImpl::viewSize):
3500         (WebKit::PageClientImpl::isViewWindowActive):
3501         (WebKit::PageClientImpl::isViewFocused):
3502         (WebKit::PageClientImpl::isViewVisible):
3503         (WebKit::PageClientImpl::isViewInWindow):
3504         (WebKit::PageClientImpl::PageClientImpl::processDidCrash):
3505         (WebKit::PageClientImpl::didRelaunchProcess):
3506         (WebKit::PageClientImpl::takeFocus):
3507         (WebKit::PageClientImpl::toolTipChanged):
3508         (WebKit::PageClientImpl::setCursor):
3509         (WebKit::PageClientImpl::setViewportArguments):
3510         (WebKit::PageClientImpl::registerEditCommand):
3511         (WebKit::PageClientImpl::clearAllEditCommands):
3512         (WebKit::PageClientImpl::canUndoRedo):
3513         (WebKit::PageClientImpl::executeUndoRedo):
3514         (WebKit::PageClientImpl::convertToDeviceSpace):
3515         (WebKit::PageClientImpl::convertToUserSpace):
3516         (WebKit::PageClientImpl::windowToScreen):
3517         (WebKit::PageClientImpl::doneWithKeyEvent):
3518         (WebKit::PageClientImpl::didNotHandleKeyEvent):
3519         (WebKit::PageClientImpl::createPopupMenuProxy):
3520         (WebKit::PageClientImpl::createContextMenuProxy):
3521         (WebKit::PageClientImpl::setFindIndicator):
3522         (WebKit::PageClientImpl::pageDidEnterAcceleratedCompositing):
3523         (WebKit::PageClientImpl::pageDidLeaveAcceleratedCompositing):
3524         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
3525         (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
3526         (WebKit::PageClientImpl::customRepresentationZoomFactor):
3527         (WebKit::PageClientImpl::setCustomRepresentationZoomFactor):
3528         (WebKit::PageClientImpl::pageClosed):
3529         (WebKit::PageClientImpl::didChangeScrollbarsForMainFrame):
3530         (WebKit::PageClientImpl::flashBackingStoreUpdates):
3531         (WebKit::PageClientImpl::findStringInCustomRepresentation):
3532         (WebKit::PageClientImpl::countStringMatchesInCustomRepresentation):
3533         * UIProcess/API/gtk/PageClientImpl.h: Renamed from Source/WebKit2/UIProcess/gtk/WebView.h.
3534         (WebKit::PageClientImpl::create):
3535         (WebKit::PageClientImpl::addPendingEditorCommand):
3536         (WebKit::PageClientImpl::userSpaceScaleFactor):
3537         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3538         (webkitWebViewBaseInit):
3539         (webkitWebViewBaseCreate):
3540         * UIProcess/API/gtk/WebKitWebViewBase.h:
3541         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp:
3542
3543 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3544
3545         Reviewed by Martin Robinson.
3546
3547         [GTK] Use the WebPage object in WebKitWebViewBase
3548         https://bugs.webkit.org/show_bug.cgi?id=59683
3549
3550         It simplifies the implementation of the event callbacks. Remove
3551         also all the methods from the page client that are no longer
3552         needed.
3553
3554         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3555         (webkitWebViewBaseInit):
3556         (webViewExpose):
3557         (webViewDraw):
3558         (webViewSizeAllocate):
3559         (webViewFocusInEvent):
3560         (webViewFocusOutEvent):
3561         (webViewKeyPressEvent):
3562         (webViewKeyReleaseEvent):
3563         (webViewButtonPressEvent):
3564         (webViewButtonReleaseEvent):
3565         (webViewScrollEvent):
3566         (webViewMotionNotifyEvent):
3567         * UIProcess/API/gtk/WebKitWebViewBase.h:
3568         * UIProcess/gtk/WebView.cpp:
3569         (WebKit::WebView::WebView):
3570         (WebKit::WebView::createDrawingAreaProxy):
3571         * UIProcess/gtk/WebView.h:
3572
3573 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3574
3575         Reviewed by Martin Robinson.
3576
3577         [GTK] Create the page client in the view widget
3578         https://bugs.webkit.org/show_bug.cgi?id=59679
3579
3580         * UIProcess/API/C/gtk/WKView.cpp:
3581         (WKViewCreate): Simply create a new view widget and return it.
3582         (WKViewGetPage): Use webkitWebViewBaseGetPage().
3583         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3584         (webkitWebViewBaseFinalize): Use finalize instead of dispose to
3585         make sure it's called only once, and release the private struct too.
3586         (webkitWebViewBaseInit): Create the page client.
3587         (webkitWebViewBaseClassInit): Don't use GObject private data structure.
3588         (webkitWebViewBaseCreate): New method to create a
3589         WebKitWebViewBase for a given context and page group.
3590         (webkitWebViewBaseGetWebViewInstance):
3591         (webkitWebViewBaseGetPage):
3592         * UIProcess/API/gtk/WebKitWebViewBase.h:
3593         * UIProcess/gtk/WebView.cpp:
3594         (WebKit::WebView::page): Get the page from the view widget.
3595         (WebKit::WebView::handleFocusInEvent): Ditto.
3596         (WebKit::WebView::handleFocusOutEvent): Ditto.
3597         (WebKit::WebView::WebView): Page client is now created with a view widget.
3598         (WebKit::WebView::paint): Get the page from the view widget.
3599         (WebKit::WebView::setSize): Ditto.
3600         (WebKit::WebView::handleKeyboardEvent): Ditto.
3601         (WebKit::WebView::handleMouseEvent): Ditto.
3602         (WebKit::WebView::handleWheelEvent): Ditto.
3603         (WebKit::WebView::close): Ditto.
3604         (WebKit::WebView::createDrawingAreaProxy): Ditto.
3605         * UIProcess/gtk/WebView.h:
3606         (WebKit::WebView::create): The page client will be created as
3607         private by the view widget, so it doesn't need to be ref counted,
3608         use PassOwnPtr instead of PassRefPtr.
3609
3610 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3611
3612         Reviewed by Martin Robinson.
3613
3614         [GTK] PlatformWebView should be the view widget
3615         https://bugs.webkit.org/show_bug.cgi?id=59676
3616
3617         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3618         (webkitWebViewBaseGetPage): Return the page of the view.
3619         * UIProcess/API/gtk/WebKitWebViewBase.h:
3620         * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Map PlatformWebView
3621         to WebKitWebViewBase instead of the page client.
3622         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp:
3623         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Use the view widget
3624         directly.
3625         (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore): Ditto.
3626         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): Ditto.
3627         * UIProcess/gtk/WebView.cpp:
3628         (WebKit::WebView::createDrawingAreaProxy): Pass the view widget to
3629         the DrawingAreaProxy constructor instead of the page client.
3630         * UIProcess/gtk/WebView.h: Remove getWebViewWindow() which is no
3631         longer needed.
3632
3633 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3634
3635         Reviewed by Martin Robinson.
3636
3637         [GTK] WKView should be a GtkWidget
3638         https://bugs.webkit.org/show_bug.cgi?id=59603
3639
3640         * UIProcess/API/C/gtk/WKAPICastGtk.h: Map WKViewRef to
3641         WebKitWebViewBase instead of WebView.
3642         * UIProcess/API/C/gtk/WKView.h: Remove WKViewGetWindow().
3643         * UIProcess/API/C/gtk/WKView.cpp:
3644         (WKViewCreate): Return the view instead of the page client.
3645         (WKViewGetPage): Use WebKitWebViewBase API to get the page client
3646         containing the page.
3647
3648 2011-04-27  Sam Weinig  <sam@webkit.org>
3649
3650         Reviewed by Adam Roben.
3651
3652         WebKit2 needs to notify the client when a plugin fails to initialize
3653         https://bugs.webkit.org/show_bug.cgi?id=59657
3654
3655         Add didFailToInitializePlugin client function and call it when a plugin
3656         fails to initialize.
3657
3658         * UIProcess/API/C/WKPage.h:
3659         * UIProcess/API/qt/qwkpage.cpp:
3660         (QWKPage::QWKPage):
3661         * UIProcess/WebLoaderClient.cpp:
3662         (WebKit::WebLoaderClient::didFailToInitializePlugin):
3663         * UIProcess/WebLoaderClient.h:
3664         * UIProcess/WebPageProxy.cpp:
3665         (WebKit::WebPageProxy::didFailToInitializePlugin):
3666         * UIProcess/WebPageProxy.h:
3667         * UIProcess/WebPageProxy.messages.in:
3668         * WebProcess/Plugins/PluginView.cpp:
3669         (WebKit::PluginView::initializePlugin):
3670
3671 2011-04-27  Pratik Solanki  <psolanki@apple.com>
3672
3673         Reviewed by Antti Koivisto.
3674
3675         Part of WebCore should use CFNetwork-based loader on Mac
3676         https://bugs.webkit.org/show_bug.cgi?id=51836
3677
3678         Add PLATFORM(WIN) ifdef around shouldCacheResponse.
3679
3680         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3681         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3682
3683 2011-04-27  Anders Carlsson  <andersca@apple.com>
3684
3685         Reviewed by Dan Bernstein.
3686
3687         Hang if a sync message handler invalidates the connection
3688         https://bugs.webkit.org/show_bug.cgi?id=59627
3689
3690         If dispatching incoming messages while waiting for the sync reply caused the connection to be invalidated,
3691         we need to return early or we'll wait forever.
3692
3693         * Platform/CoreIPC/Connection.cpp:
3694         (CoreIPC::Connection::waitForSyncReply):
3695
3696 2011-04-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3697
3698         Reviewed by Martin Robinson.
3699
3700         [GTK] Move WebViewWidget to UIProcess/API/gtk
3701         https://bugs.webkit.org/show_bug.cgi?id=59594
3702
3703         API files should be under the API directory. This view widget will
3704         be used by both C and gtk high level API, so it has been renamed
3705         to WebKitWebViewBase.
3706
3707         * GNUmakefile.am:
3708         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Renamed from Source/WebKit2/UIProcess/gtk/WebViewWidget.cpp.
3709         (webkitWebViewBaseRealize):
3710         (webkitWebViewBaseContainerAdd):
3711         (webkitWebViewBaseDispose):
3712         (webkitWebViewBaseInit):
3713         (webViewExpose):
3714         (webViewDraw):
3715         (webViewSizeAllocate):
3716         (webViewFocusInEvent):
3717         (webViewFocusOutEvent):
3718         (webViewKeyPressEvent):
3719         (webViewKeyReleaseEvent):
3720         (getEventTime):
3721         (webViewButtonPressEvent):
3722         (webViewButtonReleaseEvent):
3723         (webViewScrollEvent):
3724         (webViewMotionNotifyEvent):
3725         (webkitWebViewBaseClassInit):
3726         (webkitWebViewBaseGetType):
3727         (webkitWebViewBaseGetWebViewInstance):
3728         (webkitWebViewBaseSetWebViewInstance):
3729         (webkitWebViewBaseGetIMContext):
3730         * UIProcess/API/gtk/WebKitWebViewBase.h: Renamed from Source/WebKit2/UIProcess/gtk/WebViewWidget.h.
3731         * UIProcess/gtk/WebView.cpp:
3732         (WebKit::WebView::WebView):
3733
3734 2011-04-26  Chang Shu  <cshu@webkit.org>
3735
3736         Reviewed by Laszlo Gombos.
3737
3738         WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
3739         https://bugs.webkit.org/show_bug.cgi?id=42544
3740
3741         Also implemented removeOriginAccessWhitelistEntry and resetOriginAccessWhitelists.
3742
3743         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3744         (WKBundleAddOriginAccessWhitelistEntry):
3745         (WKBundleRemoveOriginAccessWhitelistEntry):
3746         (WKBundleResetOriginAccessWhitelists):
3747         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3748         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3749         (WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
3750         (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
3751         (WebKit::InjectedBundle::resetOriginAccessWhitelists):
3752         * WebProcess/InjectedBundle/InjectedBundle.h:
3753
3754 2011-04-26  Dan Bernstein  <mitz@apple.com>
3755
3756         Build fix.
3757
3758         * Configurations/CompilerVersion.xcconfig:
3759
3760 2011-04-26  Anders Carlsson  <andersca@apple.com>
3761
3762         Fix 32-bit clang build.
3763
3764         * PluginProcess/mac/PluginProcessMac.mm:
3765         (WebKit::windowCoversAnyScreen):
3766         * UIProcess/API/mac/WKTextInputWindowController.mm:
3767         (-[WKTextInputPanel init]):
3768         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
3769         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
3770         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3771         (WebKit::flipScreenYCoordinate):
3772         (WebKit::computeFakeWindowBoundsRect):
3773         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
3774         (-[AccessibilityWebPageObject accessibilityHitTest:]):
3775
3776 2011-04-26  Sam Weinig  <sam@webkit.org>
3777
3778         Reviewed by David Hyatt.
3779
3780         Remove Datagrid from the tree
3781         https://bugs.webkit.org/show_bug.cgi?id=59543
3782
3783         * Configurations/FeatureDefines.xcconfig:
3784         Remove feature.
3785
3786 2011-04-26  Chang Shu  <cshu@webkit.org>
3787
3788         Reviewed by Laszlo Gombos.
3789
3790         WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
3791         https://bugs.webkit.org/show_bug.cgi?id=57572
3792
3793         Remove the unnecessary code that updates preference.
3794
3795         * Shared/WebPreferencesStore.cpp:
3796         (WebKit::WebPreferencesStore::decode):
3797         * Shared/WebPreferencesStore.h:
3798         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3799         (WKBundleSetAllowUniversalAccessFromFileURLs):
3800         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3801         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3802         (WebKit::InjectedBundle::setAllowUniversalAccessFromFileURLs):
3803         (WebKit::InjectedBundle::setAllowFileAccessFromFileURLs):
3804         * WebProcess/InjectedBundle/InjectedBundle.h:
3805
3806 2011-04-26  Brian Weinstein  <bweinstein@apple.com>
3807
3808         Reviewed by Steve Falkenburg.
3809
3810         WebKit2: Docked Inspector doesn't behave well if inspected web view isn't at 0,0
3811         https://bugs.webkit.org/show_bug.cgi?id=59554
3812         <rdar://problem/9341188>
3813         
3814         Use GetWindowRect and ScreenToClient to properly place our inspector and inspected
3815         web views instead of using GetClientRect. We need to correctly handle the case where
3816         the inspected web view isn't at 0, 0.
3817
3818         * UIProcess/win/WebInspectorProxyWin.cpp:
3819         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
3820
3821 2011-04-26  Dan Bernstein  <mitz@apple.com>
3822
3823         Reviewed by Mark Rowe.
3824
3825         Choose the compiler based on the Xcode version for Snow Leopard debug builds.
3826
3827         * Configurations/Base.xcconfig:
3828         * Configurations/CompilerVersion.xcconfig: Added.
3829
3830 2011-04-26  Balazs Kelemen  <kbalazs@webkit.org>
3831
3832         Unreviewed build fix.
3833
3834         * Platform/Region.cpp: Need to include stdio.h for printf
3835         (at least in my Qt-Linux environment).
3836
3837 2011-04-26  Mihai Parparita  <mihaip@chromium.org>
3838
3839         Reviewed by Adam Barth.
3840
3841         Turn off make built-in implicit rules for derived sources makefile
3842         https://bugs.webkit.org/show_bug.cgi?id=59418
3843
3844         We don't use any of make's built-in implicit rules, turning them off
3845         speeds up parsing of the makefile.
3846
3847         * WebKit2.xcodeproj/project.pbxproj:
3848
3849 2011-04-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3850
3851         Unreviewed. Fix WebKit2 GTK build after r84785.
3852
3853         * UIProcess/gtk/WebInspectorGtk.cpp:
3854         (WebKit::WebInspectorProxy::platformAttach):
3855         (WebKit::WebInspectorProxy::platformDetach):
3856         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
3857
3858 2011-04-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3859
3860         Unreviewed. Fix WebKit2 GTK build after r84886
3861
3862         * Platform/gtk/RunLoopGtk.cpp: Include WorkItem.h
3863
3864 2011-04-25  Adam Barth  <abarth@webkit.org>
3865
3866         Reviewed by David Levin.
3867
3868         WebKit2 should play nice with strict OwnPtrs
3869         https://bugs.webkit.org/show_bug.cgi?id=59426
3870
3871         * Platform/CoreIPC/Connection.cpp:
3872         (CoreIPC::Connection::waitForMessage):
3873             - Lack of OwnPtr in HashMap is sad face.  This code becomes very
3874               pretty if we could use OwnPtr in HashMap...
3875         * Platform/RunLoop.cpp:
3876         (RunLoop::performWork):
3877         (RunLoop::scheduleWork):
3878         * Platform/RunLoop.h:
3879         * Platform/mac/WorkQueueMac.cpp:
3880         (WorkQueue::executeWorkItem):
3881         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3882         (WebKit::NetscapePluginStream::deliverData):
3883
3884 2011-04-25  Brian Weinstein  <bweinstein@apple.com>
3885
3886         Reviewed by Adam Roben.
3887
3888         WebKit2: Should be able to inspect Web Inspector in Debug Builds
3889         https://bugs.webkit.org/show_bug.cgi?id=59378
3890
3891         * UIProcess/WebInspectorProxy.cpp:
3892         (WebKit::createInspectorPageGroup): Creates an inspector page group and enables
3893             developer extras in a debug build.
3894         (WebKit::WebInspectorProxy::inspectorPageGroup): Calls createInspectorPageGroup.
3895
3896 2011-04-25  Brian Weinstein  <bweinstein@apple.com>
3897
3898         Reviewed by Timothy Hatcher.
3899
3900         WebKit2: Web Inspector's style sidebar fails to display when inspecting element
3901         https://bugs.webkit.org/show_bug.cgi?id=58071
3902         <rdar://problem/9243093>
3903         
3904         When creating our WebKit2 inspector views, we were creating them on both Mac and Windows
3905         with the empty rect for their initial size. Before we sized them correctly, the inspector
3906         was calling window.innerWidth on them, which returned 0, making the sidebar take up 0 pixels.
3907
3908         * UIProcess/mac/WebInspectorProxyMac.mm:
3909         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create the window with the initial window width
3910             and height.
3911         * UIProcess/win/WebInspectorProxyWin.cpp:
3912         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Ditto.
3913
3914 2011-04-25  Brian Weinstein  <bweinstein@apple.com>
3915
3916         Reviewed by Adam Roben.
3917
3918         Windows part of - WebKit2: Support docked mode for Web Inspector
3919         https://bugs.webkit.org/show_bug.cgi?id=59134
3920         <rdar://problem/8739005>
3921         
3922         Implement attaching and detaching of the Web Inspector on Windows,
3923         and also support setAttachedWindowHeight when the user changes the height
3924         of the docked inspector.
3925         
3926         This patch doesn't remember whether the user prefers attached or detached, and
3927         doesn't remember the user's preferred docked height, but that will be a separate
3928         bug.
3929         
3930         * UIProcess/WebInspectorProxy.cpp:
3931         (WebKit::WebInspectorProxy::attach): Set the attached flag and call platform-specific code.
3932         (WebKit::WebInspectorProxy::detach): Ditto.
3933         (WebKit::WebInspectorProxy::setAttachedWindowHeight): Call platform-specific code.
3934         (WebKit::WebInspectorProxy::didClose): Set m_isVisible before calling platformClose. platformClose
3935             calls detach if the inspector was docked, and detach needs to know whether or not the window is
3936             visible.
3937         * UIProcess/WebInspectorProxy.h:
3938         * UIProcess/WebInspectorProxy.messages.in: Add new messages.
3939         * UIProcess/WebPageProxy.h:
3940         (WebKit::WebPageProxy::pageClient): Add a getter for the page client.
3941         * UIProcess/win/WebInspectorProxyWin.cpp:
3942         (WebKit::WebInspectorProxy::windowReceivedMessage): Relay WM_WINDOWPOSCHANGING messages from the inspected
3943             web view to the WebInspectorProxy.
3944         (WebKit::WebInspectorProxy::onWebViewWindowPosChangingEvent): Resize the inspected web view to behave well
3945             with the docked inspector.
3946         (WebKit::WebInspectorProxy::platformClose): If we are attached, detach before destroying.
3947         (WebKit::WebInspectorProxy::platformAttach): Set the inspector's host window to be the inspected web view's parent
3948             window, so the inspected web view and the inspector are siblings.
3949         (WebKit::WebInspectorProxy::platformDetach): Set the inspector's host window to be the standalone inspector window.
3950         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Size the views.
3951         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3952         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3953         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3954         (WebKit::WebInspectorFrontendClient::attachWindow): Call WebInspector::attach.
3955         (WebKit::WebInspectorFrontendClient::closeWindow): Add a call to the InspectorController to disconnect the inspector frontend
3956             from the inspector backend. Without this line, when we close the attached inspector, it won't re-open, because the
3957             inspector controller still thinks there is a frontend. This matches WebKit1's behavior, although it seems like this is
3958             something WebCore should handle.
3959         (WebKit::WebInspectorFrontendClient::detachWindow): Call WebInspector::detach.
3960         (WebKit::WebInspectorFrontendClient::setAttachedWindowHeight): Call WebInspector::setAttachedWindowHeight.
3961         * UIProcess/DrawingAreaProxyImpl.cpp:
3962         (WebKit::DrawingAreaImpl::sendUpdateBackingStoreState): Add an early return if the WebPageProxy's viewSize is empty. 
3963             This can be needed if the inspector takes up the whole view, and it is useful to prevent a possible synchronous message
3964             from the UIProcess -> WebProcess to update a backing store that isn't visible in the first place.
3965         * WebProcess/WebPage/WebInspector.cpp:
3966         (WebKit::WebInspector::attach): Send a message to the UIProcess.
3967         (WebKit::WebInspector::detach): Ditto.
3968         (WebKit::WebInspector::setAttachedWindowHeight): Ditto.
3969         * WebProcess/WebPage/WebInspector.h: Remove some dead code.
3970
3971 2011-04-25  Brian Weinstein  <bweinstein@apple.com>
3972
3973         Reviewed by Alice Liu.
3974
3975         WebKit2: Web Inspector: Support highlighting page elements
3976         https://bugs.webkit.org/show_bug.cgi?id=59263
3977         <rdar://problem/8767659>
3978
3979         Support highlighting of page elements for the inspector in WebKit2 by
3980         having the WebInspectorClient be a PageOverlay Client and be responsible
3981         for calling InspectorController::drawNodeHighlight.
3982
3983         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3984         (WebKit::WebInspectorClient::highlight): Create our overlay if it hasn't been created,
3985             or call setNeedsDisplay if it has.
3986         (WebKit::WebInspectorClient::hideHighlight): Uninstall the page overlay if it exists.
3987         (WebKit::WebInspectorClient::pageOverlayDestroyed):
3988         (WebKit::WebInspectorClient::willMoveToWebPage): If it's being destroyed (moving to a null
3989             WebPage), clear the member variable.
3990         (WebKit::WebInspectorClient::didMoveToWebPage):
3991         (WebKit::WebInspectorClient::drawRect): Call InspectorController::drawNodeHighlight.
3992         (WebKit::WebInspectorClient::mouseEvent):
3993         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3994         (WebKit::WebInspectorClient::WebInspectorClient): Add a new member variable.
3995
3996 2011-04-25  Jon Lee  <jonlee@apple.com>
3997
3998         Reviewed by Maciej Stachowiak.
3999
4000         Overlay scroller hard to see on pages with dark background (59183)
4001         https://bugs.webkit.org/show_bug.cgi?id=59183
4002         <rdar://problem/8975367>
4003
4004         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
4005         (InitWebCoreSystemInterface): adding method to allow changing style
4006         * WebProcess/WebPage/WebFrame.cpp:
4007         (WebKit::WebFrame::getDocumentBackgroundColor): refactoring to use common code for retrieving background color
4008
4009 2011-04-24  Dan Bernstein  <mitz@apple.com>
4010
4011         Reviewed by Maciej Stachowiak.
4012
4013         <rdar://problem/9329741> Reproducible crash in WebChromeClient::invalidateContentsAndWindow() on simonscat.com
4014         https://bugs.webkit.org/show_bug.cgi?id=59299
4015
4016         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
4017         (WebKit::WebChromeClient::invalidateContentsAndWindow): Null-check the document.
4018         (WebKit::WebChromeClient::invalidateContentsForSlowScroll): Ditto.
4019
4020 2011-04-23  Sheriff Bot  <webkit.review.bot@gmail.com>
4021
4022         Unreviewed, rolling out r84740.
4023         http://trac.webkit.org/changeset/84740
4024         https://bugs.webkit.org/show_bug.cgi?id=59290
4025
4026         change breaks apple internal builds and is incorrect
4027         (Requested by smfr on #webkit).
4028
4029         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
4030         (InitWebCoreSystemInterface):
4031
4032 2011-04-22  Jon Lee  <jonlee@apple.com>
4033
4034         Reviewed by Beth Dakin.
4035
4036         Overlay scroller hard to see on pages with dark background (59183)
4037         https://bugs.webkit.org/show_bug.cgi?id=59183
4038         <rdar://problem/8975367>
4039         
4040         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
4041         (InitWebCoreSystemInterface): adding method to allow changing style
4042
4043 2011-04-22  Brian Weinstein  <bweinstein@apple.com>
4044
4045         Reviewed by Sam Weinig.
4046
4047         WebKit2: Stop responsiveness timer before calling runOpenPanel
4048         https://bugs.webkit.org/show_bug.cgi?id=59268
4049         <rdar://problem/9327944>
4050
4051         * UIProcess/WebPageProxy.cpp:
4052         (WebKit::WebPageProxy::runOpenPanel): Stop the timer before calling WebUIClient::runOpenPanel,
4053             because runOpenPanel can spin a nested run loop.
4054
4055 2011-04-22  Chang Shu  <cshu@webkit.org>
4056
4057         Reviewed by Kenneth Rohde Christiansen.
4058
4059         WebKitTestRunner needs layoutTestController.setFrameFlatteningEnabled
4060         https://bugs.webkit.org/show_bug.cgi?id=42536
4061
4062         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
4063         (WKBundleSetFrameFlatteningEnabled):
4064         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
4065         * WebProcess/InjectedBundle/InjectedBundle.cpp:
4066         (WebKit::InjectedBundle::setFrameFlatteningEnabled):
4067         * WebProcess/InjectedBundle/InjectedBundle.h:
4068
4069 2011-04-22  Alejandro G. Castro  <alex@igalia.com> and Martin Robinson  <mrobinson@igalia.com>
4070
4071         Reviewed by Xan Lopez.
4072
4073         [GTK] Use the libWebCore.a convenience library when compiling WebKit2
4074         https://bugs.webkit.org/show_bug.cgi?id=59258
4075
4076         * GNUmakefile.am: Remove the libWebKit2 convenience library and use the
4077         libWebCore convenience library when compiling WebKit2. Not only does this
4078         maintain the CPPFLAGS isolation, it prevents double-compilation of WebCore
4079         in some cases.
4080
4081 2011-04-19  Jer Noble  <jer.noble@apple.com>
4082
4083         Reviewed by Daniel Bates.
4084
4085         Full Screen from within an <iframe> does not cause <iframe> to resize.
4086         https://bugs.webkit.org/show_bug.cgi?id=58638
4087
4088         Tests: fullscreen/full-screen-frameset-allowed.html
4089                fullscreen/full-screen-frameset-not-allowed.html
4090
4091         * UIProcess/mac/WKFullScreenWindowController.mm:
4092         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Cancel the background animation
4093             if the full screen animation finishes first.
4094         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
4095         (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): m_fullScreenRootLayer was uninitialized.
4096
4097 2011-04-22  Sam Weinig  <sam@webkit.org>
4098
4099         Reviewed by Brian Weinstein.
4100
4101         WebKit2: Implement JavaScript unresponsiveness callback
4102         https://bugs.webkit.org/show_bug.cgi?id=59248
4103
4104         Add support for suspending JavaScript in response to a callback.
4105
4106         * UIProcess/API/C/WKPage.h:
4107         * UIProcess/API/qt/qwkpage.cpp:
4108         (QWKPage::QWKPage):
4109         * UIProcess/WebPageProxy.cpp:
4110         (WebKit::WebPageProxy::shouldInterruptJavaScript):
4111         * UIProcess/WebPageProxy.h:
4112         * UIProcess/WebPageProxy.messages.in:
4113         * UIProcess/WebUIClient.cpp:
4114         (WebKit::WebUIClient::shouldInterruptJavaScript):
4115         * UIProcess/WebUIClient.h:
4116         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
4117         (WebKit::WebChromeClient::shouldInterruptJavaScript):
4118
4119 2011-04-22  Dan Bernstein  <mitz@apple.com>
4120
4121         Reviewed by Sam Weinig.
4122
4123         Paint the bounding rect of the dirty region instead of individual rectangles when the region
4124         covers at least 3/4 of its bounds.
4125
4126         * WebProcess/WebPage/DrawingAreaImpl.cpp:
4127         (WebKit::shouldPaintBoundsRect): Use floating point math so that the logic that was supposed to
4128         achieve this actually works.
4129
4130 2011-04-22  Jer Noble  <jer.noble@apple.com>
4131
4132         Reviewed by Maciej Stachowiak.
4133
4134         Crash at WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation + 79
4135         https://bugs.webkit.org/show_bug.cgi?id=59225
4136
4137         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
4138         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Guard against 
4139             m_fullScreenRootLayer being NULL.
4140         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
4141
4142 2011-04-22  Jer Noble  <jer.noble@apple.com>
4143
4144         Reviewed by Maciej Stachowiak.
4145
4146         Allow MediaPlayerPrivateAVFoundation to be disabled via a preference.
4147         https://bugs.webkit.org/show_bug.cgi?id=59179
4148
4149         Add API to allow the WebCore Settings preference to be called from the UIProcess.
4150
4151         * Shared/WebPreferencesStore.h: Added new preference definition macro.
4152         * UIProcess/API/C/WKPreferences.cpp:
4153         (WKPreferencesSetAVFoundationEnabled): Added.
4154         (WKPreferencesGetAVFoundationEnabled): Added.
4155         * UIProcess/API/C/WKPreferences.h:
4156         * WebProcess/WebPage/WebPage.cpp:
4157         (WebKit::WebPage::updatePreferences): Pass new preference along to WebCore
4158             Settings.
4159
4160 2011-04-22  Brian Weinstein  <bweinstein@apple.com>
4161
4162         Reviewed by Sam Weinig.
4163
4164         WebKit2: Stop Responsiveness Timer when WebPageProxy closes or WebProcess crashes
4165         https://bugs.webkit.org/show_bug.cgi?id=59210
4166
4167         * UIProcess/WebPageProxy.cpp:
4168         (WebKit::WebPageProxy::close): Stop the responsiveness timer.
4169         (WebKit::WebPageProxy::processDidCrash): Ditto.
4170
4171 2011-04-21  Adam Roben  <aroben@apple.com>
4172
4173         Give windowless plugins' context menus an owner window in the same thread as the plugin
4174
4175         In some cases, plugins pass the WKView's HWND to the ::TrackPopupMenu API. ::TrackPopupMenu
4176         fails in this case because the WKView's HWND is owned by another process/thread. We work
4177         around this by hooking the ::TrackPopupMenu API and providing our own window that's in the
4178         same thread as the plugin instead.
4179
4180         I couldn't figure out how to write a test for this. :-(
4181
4182         Fixes <http://webkit.org/b/51063> <rdar://problem/8769281> REGRESSION (WebKit2): No context
4183         menu appears when right-clicking on windowless Flash plugin
4184
4185         Reviewed by Brian Weinstein, and looked at suspiciously by Jeff Miller.
4186
4187         * Platform/Module.h: Added installIATHook on Windows.
4188
4189         * Platform/win/ModuleWin.cpp:
4190         (WebKit::overwriteReadOnlyMemory): New helper function. Basically a wrapper around memcpy,
4191         but uses ::VirtualProtect to allow writing to otherwise-read-only memory.
4192         (WebKit::findFunctionPointerAddress): New helper function. The first overload iterates over
4193         the imported modules and functions looking for the given one. If found, returns the address
4194         of the function pointer that is used when calling that function. The second overload calls
4195         the first, first passing it an enumerator for the image's imported modules, then passing it
4196         an iterator for the image's delay-loaded modules.
4197         (WebKit::Module::installIATHook): Added. Finds the address of the function pointer that's
4198         used when code in this module calls the given function, then overwrites the function pointer
4199         with the passed-in one. Future calls to the given function made by&