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