[GTK] Enable introspection always for developer builds
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-04-22  Martin Robinson  <mrobinson@igalia.com>
2
3         [GTK] Enable introspection always for developer builds
4         https://bugs.webkit.org/show_bug.cgi?id=114983
5
6         Reviewed by Gustavo Noronha Silva.
7
8         * GNUmakefile.am: Make warnings during gir scanning cause the build to fail. Eliminate
9         warnings about deprecated API that the g-ir-scanner uses when generating
10         the scanner program. Use --quiet.
11
12 2013-04-22  Anders Carlsson  <andersca@apple.com>
13
14         Make it easier to extend NetworkResourceLoadParameters
15         https://bugs.webkit.org/show_bug.cgi?id=114992
16
17         Reviewed by Sam Weinig.
18
19         Turn NetworkResourceLoadParameters into a struct which matches all our other parameter classes in WebKit2. Fill in the struct manually
20         instead of having a constructor with 9 parameters.
21
22         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
23         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
24         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
25         * NetworkProcess/SchedulableLoader.cpp:
26         (WebKit::SchedulableLoader::SchedulableLoader):
27         * Shared/Network/NetworkResourceLoadParameters.cpp:
28         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
29         (WebKit::NetworkResourceLoadParameters::encode):
30         (WebKit::NetworkResourceLoadParameters::decode):
31         * Shared/Network/NetworkResourceLoadParameters.h:
32         (NetworkResourceLoadParameters):
33         * WebProcess/Network/WebResourceLoadScheduler.cpp:
34         (WebKit::WebResourceLoadScheduler::scheduleLoad):
35         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
36         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
37
38 2013-04-22  Tim Horton  <timothy_horton@apple.com>
39
40         PDFPlugin: Support unlocking encrypted PDFs
41         https://bugs.webkit.org/show_bug.cgi?id=114938
42         <rdar://problem/12872888>
43
44         Reviewed by Alexey Proskuryakov and Oliver Hunt.
45
46         If we try to load an encrypted PDF, we need to provide a sane mechanism
47         through which the user can provide the password. Add a slightly-below-center
48         password field to match PDFKit's normal behavior.
49
50         * WebKit2.xcodeproj/project.pbxproj: Add PDFPluginPasswordField.{h,mm}
51         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add attemptToUnlockWithPassword:
52         * WebProcess/Plugins/PDF/PDFPlugin.h:
53         Add createPasswordEntryForm, attemptToUnlockPDF, m_passwordField.
54         * WebProcess/Plugins/PDF/PDFPlugin.mm:
55         (annotationStyle): Make #annotationContainer a flexbox that centers its contents.
56         This won't affect the normal absolutely-positioned form fields, but the inline
57         password field will be centered vertically and horizontally.
58
59         (WebKit::PDFPlugin::pdfDocumentDidLoad):
60         If the document is locked when loaded, create a password field.
61
62         (WebKit::PDFPlugin::createPasswordEntryForm):
63         Create a PDFPluginPasswordField and attach it to the document.
64
65         (WebKit::PDFPlugin::attemptToUnlockPDF):
66         Try to unlock the PDF with the given password. If this succeeds, remove
67         the password field and relayout the scroll view.
68
69         (WebKit::PDFPlugin::calculateSizes):
70         Make the document 0x0 if it is locked, preventing scrolling.
71
72         (WebKit::PDFPlugin::handleMouseEvent):
73         Don't pass mouse events to PDFLayerController while it is locked,
74         as it has no useful events to provide, and will try to present a
75         dialog asking for the password if we let a click through.
76
77         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
78         (WebKit::PDFPluginAnnotation::eventListener): Added.
79         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
80         (WebKit::PDFPluginAnnotation::handleEvent):
81         Move event-handling code here from PDFPluginAnnotationEventListener::handleEvent
82         so that subclasses can override this instead of having to have their own
83         event listeners (this is also why we now expose eventListener()).
84
85         (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent):
86         Forward the event to our owning PDFPluginAnnotation.
87
88         * WebProcess/Plugins/PDF/PDFPluginPasswordField.h: Added.
89         (WebKit::PDFPluginPasswordField::PDFPluginPasswordField):
90         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm: Added.
91         (WebKit::PDFPluginPasswordField::create):
92         (WebKit::PDFPluginPasswordField::~PDFPluginPasswordField):
93         Unregister for keyup.
94
95         (WebKit::PDFPluginPasswordField::createAnnotationElement):
96         Register for keyup, and set our element's class to "password".
97
98         (WebKit::PDFPluginPasswordField::updateGeometry):
99         Added. Override updateGeometry and do nothing, as the password field
100         has a geometry defined by CSS instead of by the PDF content.
101
102         (WebKit::PDFPluginPasswordField::handleEvent):
103         If the enter/return key is pressed, attempt to unlock the PDF. Also,
104         we do not call either of our superclass' implementations of handleEvent,
105         because blurring the password field should not destroy it, and tabbing
106         between fields has no relevance when there can only be one field.
107
108         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
109         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener):
110         Removed. We now share our superclass' event listener.
111
112         (WebKit::PDFPluginTextAnnotation::textAnnotation): Const.
113         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
114         (WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation):
115         PDFPluginTextAnnotation no longer has its own event listener,
116         so there's nothing left to clear here. Just make sure to unregister
117         our event from PDFPluginAnnotation's shared event listener!
118
119         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
120         Ensure that we can create a PDFPluginTextAnnotation with a null annotation.
121
122         (WebKit::PDFPluginTextAnnotation::commit): Use value().
123         (WebKit::PDFPluginTextAnnotation::value):
124         Factor retrieving the value of the form control out of commit().
125
126         (WebKit::PDFPluginTextAnnotation::handleEvent):
127         Call up to PDFPluginAnnotation's handler so that defocus destroys the annotation.
128
129 2013-04-22  Anders Carlsson  <andersca@apple.com>
130
131         Slow/beachballing when using the find bar on a page with plug-ins
132         https://bugs.webkit.org/show_bug.cgi?id=114990
133         <rdar://problem/12832313>
134
135         Reviewed by Tim Horton.
136
137         * WebProcess/Plugins/PluginView.cpp:
138         (WebKit::PluginView::notifyWidget):
139         Call shouldCreateTransientPaintingSnapshot().
140
141         (WebKit::PluginView::shouldCreateTransientPaintingSnapshot):
142         Don't create a painting snapshot if we're asked to paint the find indicator.
143
144         * WebProcess/Plugins/PluginView.h:
145         Add new member function.
146
147 2013-04-22  Alexey Proskuryakov  <ap@apple.com>
148
149         <rdar://problem/13334446> [Mac] Tweak sandbox profiles.
150
151         Reviewed by Sam Weinig.
152
153         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
154         * WebProcess/com.apple.WebProcess.sb.in:
155
156 2013-04-22  Anders Carlsson  <andersca@apple.com>
157
158         Don't kill our XPC services in response to memory pressure
159         https://bugs.webkit.org/show_bug.cgi?id=114985
160         <rdar://problem/13229217>
161
162         Reviewed by Mark Rowe.
163
164         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
165         (WebKit::XPCServiceInitializer):
166         Call xpc_transaction_begin() so we'll never be killed by the kernel when there's memory pressure;
167         we prefer to manage our own lifetime thank you very much!
168
169         * Shared/mac/ChildProcessMac.mm:
170         (WebKit::ChildProcess::platformInitialize):
171         Remove call to disable sudden termination.
172
173 2013-04-22  Alexey Proskuryakov  <ap@apple.com>
174
175         <rdar://problem/13681842> [Mac] Tweak WebProcess sandbox profile to use
176         system-graphics function when available.
177
178         Reviewed by Sam Weinig.
179
180         * WebProcess/com.apple.WebProcess.sb.in:
181
182 2013-04-22  Zan Dobersek  <zdobersek@igalia.com>
183
184         [GTK] Set up libPlatform.la
185         https://bugs.webkit.org/show_bug.cgi?id=114168
186
187         Reviewed by Martin Robinson.
188
189         * GNUmakefile.am: Add the new libPlatform.la library to the libwebkitgtk library. Link the WebKitPluginProcess
190         executable against libPlatform.la as well.
191
192 2013-04-22  Sam Weinig  <sam@webkit.org>
193
194         Hard code plug-in sandbox profile lookup directories and move
195         the profiles to WebKit2.
196
197         Reviewed by Anders Carlsson.
198
199         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
200         (WebKit::PluginProcessMainDelegate::getExtraInitializationData):
201         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
202         (WebKit::PluginServiceInitializerDelegate::getExtraInitializationData):
203         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
204         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
205         Stop passing the sandbox-profile-directory-path to the plug-in process.
206
207         * PluginProcess/mac/PluginProcessMac.mm:
208         (WebKit::loadSandboxProfileForDirectory):
209         (WebKit::loadSandboxProfile):
210         (WebKit::PluginProcess::initializeSandbox):
211         Hard code the plug-in sandbox profile lookup to only look in the WebKit2 bundle
212         and /System/Library/Sandbox/Profiles/.
213
214         * Resources/PlugInSandboxProfiles: Added.
215         Add profiles.
216
217         * WebKit2.xcodeproj/project.pbxproj:
218         Copy the profiles to the bundle.
219
220 2013-04-15  Jer Noble  <jer.noble@apple.com>
221
222         Refactor creation of the full screen window into an (overridable) method.
223         https://bugs.webkit.org/show_bug.cgi?id=110369
224
225         Reviewed by Eric Carlson.
226
227         Add a new WKView method -(NSWindow)createFullScreenWindow which can be overridden
228         by subclasses to provide custom full screen windows to the WKFullScreenWindowController.
229
230         * UIProcess/API/mac/WKView.mm:
231         (-[WKView fullScreenWindowController]):
232         (-[WKView createFullScreenWindow]):
233         * UIProcess/API/mac/WKViewPrivate.h:
234         * UIProcess/mac/WKFullScreenWindowController.mm:
235         (-[WKFullScreenWindowController initWithWindow:]):
236
237 2013-04-22  Carlos Garcia Campos  <cgarcia@igalia.com>
238
239         [GTK] Add webkit_web_context_set_disk_cache_directory to WebKit2 GTK+ API
240         https://bugs.webkit.org/show_bug.cgi?id=111848
241
242         Reviewed by Anders Carlsson.
243
244         This allow applications to set a custom directory for the disk
245         cache.
246
247         * UIProcess/API/gtk/WebKitWebContext.cpp:
248         (webkit_web_context_set_disk_cache_directory):
249         * UIProcess/API/gtk/WebKitWebContext.h:
250         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
251         * UIProcess/API/gtk/tests/TestMain.cpp:
252         (removeNonEmptyDirectory):
253         (main): Use a different temporary disk cache directory for every
254         test.
255
256 2013-04-22  Carlos Garcia Campos  <cgarcia@igalia.com>
257
258         [SOUP] Soup disk cache should respect the diskCacheDirectory from the process initial parameters
259         https://bugs.webkit.org/show_bug.cgi?id=111845
260
261         Reviewed by Anders Carlsson.
262
263         Move the cache initialization to platformInitializeWebProcess() to
264         create the cache using the directory received from the UI
265         process. This allows to add public API to set a different disk
266         cache directory from the UI process.
267
268         * UIProcess/efl/WebContextEfl.cpp:
269         (WebKit::WebContext::platformDefaultDiskCacheDirectory): Return
270         default disk cache directory.
271         * UIProcess/gtk/WebContextGtk.cpp:
272         (WebKit::WebContext::platformDefaultDiskCacheDirectory): Ditto.
273         * WebProcess/efl/WebProcessMainEfl.cpp:
274         (WebKit::WebProcessMainEfl): Remove soup cache initialization.
275         * WebProcess/gtk/WebProcessMainGtk.cpp:
276         (WebKit::WebProcessMainGtk): Ditto.
277         * WebProcess/soup/WebProcessSoup.cpp:
278         (WebKit::WebProcess::platformInitializeWebProcess): Initialize
279         soup cache.
280
281 2013-04-22  Krzysztof Wolanski  <k.wolanski@samsung.com>:
282
283         [WK2] Fix build warning when GESTURE_EVENTS is ON.
284         https://bugs.webkit.org/show_bug.cgi?id=114812
285
286         Reviewed by Andreas Kling.
287
288         Handle GestureSingleTap in the event type switch.
289
290         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
291         (WebKit::NetscapePlugin::platformHandleMouseEvent):
292
293 2013-04-21  Carlos Garcia Campos  <cgarcia@igalia.com>
294
295         [WebKit2] Plugins without a MIME Type fail to load
296         https://bugs.webkit.org/show_bug.cgi?id=112834
297
298         Reviewed by Benjamin Poulain.
299
300         The problem is that when the plugin is created and the MIME Type
301         is empty, since the MIME Type guessed in the UI process using the
302         plugin extension is not passed to the WebProcess, when the plugin
303         is instantiated, the value of NPMIMEType parameter passed to
304         NPP_New is NULL, and NPERR_INVALID_INSTANCE_ERROR is returned.
305         GetPluginPath message has been renamed to FindPlugin, since it
306         doesn't only return the path but also the new MIME Type and load
307         policy.
308
309         * UIProcess/WebPageProxy.cpp:
310         (WebKit::WebPageProxy::findPlugin): Receive an output newMIMEType
311         parameter that is passed to PluginModuleInfo::findPlugin() so that
312         in case of guessing the MIME Type, the new one is passed back to
313         the WebProcess.
314         * UIProcess/WebPageProxy.h:
315         (WebPageProxy):
316         * UIProcess/WebPageProxy.messages.in:
317         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
318         (WebKit::WebFrameLoaderClient::createPlugin): Pass the MIME Type
319         from the parameters to WebPage::createPlugin.
320         (WebKit::WebFrameLoaderClient::recreatePlugin): Pass a newMIMEType
321         parameter to WebPage::createPlugin.
322         * WebProcess/WebPage/WebPage.cpp:
323         (WebKit::WebPage::createPlugin): Add newMIMEType out parameter and
324         pass it to the FindPlugin message.
325         (WebKit::WebPage::canPluginHandleResponse): Pass newMIMEType to
326         FindPlugin message.
327         * WebProcess/WebPage/WebPage.h:
328         (WebPage):
329
330 2013-04-21  Carlos Garcia Campos  <cgarcia@igalia.com>
331
332         Widget should not depend on AXObjectCache
333         https://bugs.webkit.org/show_bug.cgi?id=114514
334
335         Reviewed by Chris Fleizach.
336
337         Update to API changes.
338
339         * WebProcess/Plugins/PDF/PDFPlugin.mm:
340         (WebKit::PDFPlugin::createScrollbar):
341         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
342         (WebKit::SimplePDFPlugin::createScrollbar):
343         (WebKit::SimplePDFPlugin::destroyScrollbar):
344
345 2013-04-20  Manuel Rego Casasnovas  <rego@igalia.com>
346
347         [GTK] Fix unit test webkit2/WebKitFindController/hide
348         https://bugs.webkit.org/show_bug.cgi?id=89810
349
350         Reviewed by Carlos Garcia Campos.
351
352         The test had some hacks in order to compare a page with highlighted
353         results after using the find command with the original page. Now it uses
354         the snapshots API that allows to make the test simpler and more
355         reliable.
356
357         * UIProcess/API/gtk/tests/TestMain.h:
358         (Test::cairoSurfacesEqual): Moved helper function to compare two cairo
359         surfaces from TestWebKitWebView.
360         (Test):
361         * UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
362         (testFindControllerHide): Modify test to use snapshots.
363         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
364         (testWebViewSnapshot): Move basic snapshop methods to WebViewTest to
365         share them with TestWebKitFindController test.
366         * UIProcess/API/gtk/tests/WebViewTest.cpp:
367         (WebViewTest::WebViewTest): Initialize cairo surface.
368         (WebViewTest::~WebViewTest): Destroy cairo surface.
369         (onSnapshotReady): Callback to set the cairo surface when the snapshot
370         is ready.
371         (WebViewTest::getSnapshotAndWaitUntilReady): Method that takes a
372         snapshot and returns the cairo surface when it is ready.
373         * UIProcess/API/gtk/tests/WebViewTest.h: Add new method headers and
374         attribute for the cairo surface.
375
376 2013-04-19  Jer Noble  <jer.noble@apple.com>
377
378         Unreviewed, revert r148782. It was not reviewed by a WebKit2 owner.
379
380         * PluginProcess/mac/PluginProcessShim.mm:
381         * Shared/mac/CookieStorageShim.cpp: Removed.
382         * Shared/mac/CookieStorageShim.h: Removed.
383         * Shared/mac/CookieStorageShimLibrary.cpp: Removed.
384         * Shared/mac/CookieStorageShimLibrary.h: Removed.
385         * Shared/mac/DYLDInterpose.h: Removed.
386         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
387         (WebKit::addDYLDEnvironmentAdditions):
388         * WebKit2.xcodeproj/project.pbxproj:
389         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
390         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
391         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
392         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
393         (WebContentServiceInitializer):
394         * WebProcess/WebProcess.cpp:
395         (WebKit::WebProcess::initializeWebProcess):
396         * WebProcess/mac/SecItemShimLibrary.mm:
397         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
398         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
399
400
401 2013-04-19  Jer Noble  <jer.noble@apple.com>
402
403         WWDC session videos don’t play at developer.apple.com
404         https://bugs.webkit.org/show_bug.cgi?id=114858
405
406         Reviewed by Eric Carlson.
407
408         AVFoundation uses CFNetwork to store and retrieve cookies from the global store.
409         However, in the case where network access happens in the NetworkProcess, session
410         cookies are stored in-memory, and are not accessable in the WebProcess. Until such
411         a time as AVFoundation can provide an API which would allow us to provide cookies
412         for a specific request, we will interpose the CFNetwork method which they use to
413         retrieve the cookie string from the cookie store for their pending request.
414
415         Duplicate the previous SecItemShim target to a new, WebProcessShim target. This
416         target includes the SecItemShim functionality, but will add a new shim for cookie
417         retrieval:
418         * Shared/mac/CookieStorageShimLibrary.h: Added
419         (CookieStorageShimCallbacks):
420         * Shared/mac/CookieStorageShimLibrary.cpp: Added.
421         (WebKit::ShimProtector::ShimProtector): A simple stack-based counter class.
422         (WebKit::ShimProtector::~ShimProtector):
423         (WebKit::ShimProtector::count):
424         (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL): Interpose
425             the CFNetwork call, and pass to the registered callback.
426         (WebKit::WebKitCookieStorageShimInitialize): Register the callbacks.
427
428         Add a helper singleton class which will talk to the shim through the 
429         registered callbacks:
430         * Shared/mac/CookieStorageShim.h: Added
431         (WebKit::CookieStorageShim::CookieStorageShim):
432         * Shared/mac/CookieStorageShim.cpp: Added.
433         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Pass the request
434             over to the NetworkProcess.
435         (WebKit::CookieStorageShim::shared): Simple singleton.
436         (WebKit::CookieStorageShim::initialize): Call the library initializer.
437
438         Initialize the shim only when the WebProcess is delegating network loading
439         to the NetworkProcess:
440         * WebProcess/WebProcess.cpp:
441         (WebKit::WebProcess::initializeWebProcess):
442
443         Rename the WebProcess's shim from SecItemShim -> WebProcessShim:
444         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
445         (WebKit::addDYLDEnvironmentAdditions):
446         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
447         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
448         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
449         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
450         (WebContentServiceInitializer):
451
452         As the DYLD_INTERPOSE macro is used in multiple files now, put it in its
453         own header:
454         * Shared/mac/DYLDInterpose.h: Added.
455         * PluginProcess/mac/PluginProcessShim.mm:
456         * WebProcess/mac/SecItemShimLibrary.mm:
457
458         Add new files to the project:
459         * WebKit2.xcodeproj/project.pbxproj:
460
461 2013-04-19  Brady Eidson  <beidson@apple.com>
462
463         Add JoinExistingSession to the WebContext XPC.
464         <rdar://problem/13541540> and https://bugs.webkit.org/show_bug.cgi?id=114882
465
466         Reviewed by Sam Weinig.
467
468         This fixes <keygen> and maybe other things.
469
470         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
471         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
472
473 2013-04-19  Martin Robinson  <mrobinson@igalia.com>
474
475         [GTK] JSCore.gir.in has a few problems
476         https://bugs.webkit.org/show_bug.cgi?id=114710
477
478         Reviewed by Philippe Normand.
479
480         * GNUmakefile.am: Updated to reflect new location of JavaScriptCore gir file. Share the
481         same autotools data task as the WebKit1 and JavaScriptCore gir installations.
482
483 2013-04-19  Noam Rosenthal  <noam@webkit.org>
484
485         [Texmap] Implementation for pattern compositing
486         https://bugs.webkit.org/show_bug.cgi?id=109588
487
488         Reviewed by Allan Sandfeld Jensen.
489
490         Serialize the two new properties from CoordinatedGraphicsLayer to CoordinatedGraphicsScene.
491
492         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
493         (CoreIPC::::encode):
494         (CoreIPC::::decode):
495             Encode/decode the new tiling properties.
496
497         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
498         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
499             Enable pattern compositing for coordinated graphics.
500             This is needed since we don't want to enable pattern compositing for
501             WebKit1 yet.
502
503 2013-04-18  Tim Horton  <timothy_horton@apple.com>
504
505         PDFPlugin: Update PDFLayerController's scale factors earlier
506         https://bugs.webkit.org/show_bug.cgi?id=114843
507
508         Reviewed by Simon Fraser.
509
510         Inform PDFLayerController of the initial page/device scale factors so that
511         it renders at the correct scale the first time, instead of first rendering
512         at 1x and then flashing to 2x (on 2x devices).
513
514         * WebProcess/Plugins/PDF/PDFPlugin.mm:
515         (WebKit::PDFPlugin::pdfDocumentDidLoad):
516
517 2013-04-18  Tim Horton  <timothy_horton@apple.com>
518
519         PDFPlugin: Hook up the search-in-Spotlight menu item
520         https://bugs.webkit.org/show_bug.cgi?id=114837
521         <rdar://problem/13583591>
522
523         Reviewed by Mark Rowe.
524
525         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
526         Add performSpotlightSearch: delegate callback.
527
528         * WebProcess/Plugins/PDF/PDFPlugin.h:
529         (WebKit::PDFPlugin::performSpotlightSearch):
530         Add performSpotlightSearch() PDFPlugin method.
531
532         * WebProcess/Plugins/PDF/PDFPlugin.mm:
533         (-[WKPDFLayerControllerDelegate performSpotlightSearch:]): Hand the search string to PDFPlugin.
534         (WebKit::PDFPlugin::performSpotlightSearch): Hand the search string to WebPageProxy.
535
536 2013-04-18  Anders Carlsson  <andersca@apple.com>
537
538         Dispatch local storage events
539         https://bugs.webkit.org/show_bug.cgi?id=114838
540
541         Reviewed by Beth Dakin.
542
543         * UIProcess/Storage/StorageManager.cpp:
544         (WebKit::StorageManager::StorageArea::dispatchEvents):
545         Pass 0 as the storage area ID if the event originally comes from another process.
546
547         * WebProcess/Storage/StorageAreaMap.cpp:
548         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
549         Gather all the frames for which we want to dispatch events.
550
551 2013-04-18  Anders Carlsson  <andersca@apple.com>
552
553         Use the page group id from the UI process as the local storage namespace ID
554         https://bugs.webkit.org/show_bug.cgi?id=114836
555
556         Reviewed by Beth Dakin.
557
558         The WebCore PageGroup identifier is different across processes, so use the one given to us by the UI process.
559
560         * WebProcess/Storage/StorageNamespaceImpl.cpp:
561         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
562         * WebProcess/WebPage/WebPageGroupProxy.h:
563         (WebKit::WebPageGroupProxy::corePageGroup):
564         * WebProcess/WebProcess.cpp:
565         (WebKit::WebProcess::webPageGroup):
566         * WebProcess/WebProcess.h:
567
568 2013-04-18  Tim Horton  <timothy_horton@apple.com>
569
570         Add a synchronous version of WKView endDeferringViewInWindowChanges
571         https://bugs.webkit.org/show_bug.cgi?id=114780
572         <rdar://problem/12821901>
573
574         Reviewed by Simon Fraser.
575
576         Add new WKView SPI, endDeferringViewInWindowChangesSync, which synchronously
577         (though with a 250 ms timeout) does the work required to reparent a WKView
578         without flashing white.
579
580         * UIProcess/API/mac/WKView.mm:
581         (-[WKView beginDeferringViewInWindowChanges]):
582         (-[WKView endDeferringViewInWindowChanges]):
583         Make begin/endDeferringViewInWindowChanges not allow nested deferrals,
584         as we don't need them, and they complicate synchronous-end a lot.
585
586         (-[WKView endDeferringViewInWindowChangesSync]):
587         Add a sync version of endDeferringViewInWindowChanges which waits
588         for DidUpdateInWindowState.
589
590         (-[WKView isDeferringViewInWindowChanges]):
591
592         * UIProcess/API/mac/WKViewPrivate.h: Add endDeferringViewInWindowChangesSync.
593
594         * UIProcess/WebPageProxy.cpp:
595         (WebKit::WebPageProxy::waitForDidUpdateInWindowState):
596         Add waitForDidUpdateInWindowState(), which blocks for
597         250ms or until the WebProcess reparents all of its layers and spins
598         the runloop once, to prevent flashing when parenting a WKView.
599         If we've already timed out waiting for the WebProcess, don't block, as
600         it's probably quite busy and is likely to time out again.
601
602         * UIProcess/WebPageProxy.h:
603         (WebKit::WebPageProxy::isInWindow): Added.
604         (WebKit::WebPageProxy::waitForDidUpdateInWindowState): Added.
605         (WebKit::WebPageProxy::didUpdateInWindowState): Added.
606
607         * UIProcess/WebPageProxy.messages.in: Add DidUpdateInWindowState()
608
609         * WebProcess/WebPage/WebPage.cpp:
610         (WebKit::WebPage::didUpdateInWindowStateTimerFired): Send DidUpdateInWindowState to WebPageProxy.
611         (WebKit::WebPage::setIsInWindow): When setIsInWindow completes, TileController
612         tiles have been reparented, and the TiledCoreAnimationDrawingArea has
613         reconnected the layer tree to the context, start a 0-delay runloop timer
614         to allow painting and layer flushing to finish; when the timer fires,
615         we'll send the UIProcess a DidUpdateInWindowState so it can stop blocking.
616
617         * WebProcess/WebPage/WebPage.h:
618         (WebPage): Add didUpdateInWindowStateTimerFired and m_sendDidUpdateInWindowStateTimer.
619
620 2013-04-18  Anders Carlsson  <andersca@apple.com>
621
622         StorageManager should keep track of local storage namespaces
623         https://bugs.webkit.org/show_bug.cgi?id=114831
624
625         Reviewed by Beth Dakin.
626
627         * UIProcess/Storage/StorageManager.cpp:
628         (StorageManager::StorageArea):
629         Add the local storage namespace, and security origin as member variables.
630
631         (StorageManager::LocalStorageNamespace):
632         New class that represents a local storage namespace.
633
634         (WebKit::StorageManager::StorageArea::~StorageArea):
635         If this storage area belongs to a local storage namespace, notify it that we've been destroyed.
636
637         (WebKit::StorageManager::StorageArea::clone):
638         Assert that we don't have a local storage namespace.
639
640         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
641         If we already have a storage area for the given security origin, return it. Otherwise, create a new storage area.
642         Note that LocalStorageNamespace does not hold strong references to its StorageArea objects; they are being kept alive
643         by a mapping inside the StorageManager.
644
645         (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
646         Remove the storage area from the map. If there are no more areas, remove the namespace from the manager.
647
648         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
649         StorageArea::create now takes the security origin.
650
651         (WebKit::StorageManager::createLocalStorageMap):
652         Get (or create) the right local storage namespace and then create a storage area.
653
654 2013-04-17  Geoffrey Garen  <ggaren@apple.com>
655
656         Renamed JSGlobalData to VM
657         https://bugs.webkit.org/show_bug.cgi?id=114777
658
659         Reviewed by Phil Pizlo.
660
661         * Shared/linux/WebMemorySamplerLinux.cpp:
662         (WebKit::WebMemorySampler::sampleWebKit):
663         * Shared/mac/WebMemorySampler.mac.mm:
664         (WebKit::WebMemorySampler::sampleWebKit):
665         * WebProcess/InjectedBundle/InjectedBundle.cpp:
666         (WebKit::InjectedBundle::javaScriptObjectsCount):
667         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
668         (WebKit::JSNPMethod::finishCreation):
669         * WebProcess/Plugins/Netscape/JSNPMethod.h:
670         (WebKit::JSNPMethod::create):
671         (JSNPMethod):
672         (WebKit::JSNPMethod::createStructure):
673         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
674         (WebKit::JSNPObject::JSNPObject):
675         (WebKit::JSNPObject::finishCreation):
676         (WebKit::JSNPObject::callMethod):
677         (WebKit::JSNPObject::callObject):
678         (WebKit::JSNPObject::callConstructor):
679         (WebKit::JSNPObject::put):
680         (WebKit::JSNPObject::deleteProperty):
681         (WebKit::JSNPObject::getOwnPropertyNames):
682         (WebKit::JSNPObject::propertyGetter):
683         * WebProcess/Plugins/Netscape/JSNPObject.h:
684         (WebKit::JSNPObject::create):
685         (WebKit::JSNPObject::createStructure):
686         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
687         (WebKit::NPJSObject::create):
688         (WebKit::NPJSObject::initialize):
689         * WebProcess/Plugins/Netscape/NPJSObject.h:
690         (JSC):
691         (NPJSObject):
692         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
693         (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
694         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
695         (WebKit::NPRuntimeObjectMap::evaluate):
696         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
697         (JSC):
698         (NPRuntimeObjectMap):
699         * WebProcess/Plugins/PluginView.cpp:
700         (WebKit::PluginView::windowScriptNPObject):
701         (WebKit::PluginView::pluginElementNPObject):
702         * WebProcess/WebPage/WebPage.cpp:
703         (WebKit::WebPage::runJavaScriptInMainFrame):
704         * WebProcess/WebProcess.cpp:
705         (WebKit::WebProcess::getWebCoreStatistics):
706
707 2013-04-18  Anders Carlsson  <andersca@apple.com>
708
709         Differentiate between creating local storage maps and session storage maps
710         https://bugs.webkit.org/show_bug.cgi?id=114823
711
712         Reviewed by Beth Dakin.
713
714         * UIProcess/Storage/StorageManager.cpp:
715         (WebKit::StorageManager::createLocalStorageMap):
716         (WebKit::StorageManager::createSessionStorageMap):
717         * UIProcess/Storage/StorageManager.h:
718         * UIProcess/Storage/StorageManager.messages.in:
719         * WebProcess/Storage/StorageAreaMap.cpp:
720         (WebKit::StorageAreaMap::StorageAreaMap):
721
722 2013-04-18  Anders Carlsson  <andersca@apple.com>
723
724         StorageAreaMaps should not assume that a zero storage namespace ID is used for local storage
725         https://bugs.webkit.org/show_bug.cgi?id=114822
726
727         Reviewed by Beth Dakin.
728
729         Store the storage type directly in the storage area map.
730
731         * WebProcess/Storage/StorageAreaMap.cpp:
732         (WebKit::StorageAreaMap::StorageAreaMap):
733         * WebProcess/Storage/StorageAreaMap.h:
734         (WebKit::StorageAreaMap::storageType):
735
736 2013-04-18  Anders Carlsson  <andersca@apple.com>
737
738         Begin fleshing out UI side local storage
739         https://bugs.webkit.org/show_bug.cgi?id=114820
740
741         Reviewed by Beth Dakin.
742
743         * WebProcess/Storage/StorageNamespaceImpl.cpp:
744         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
745         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
746         (WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
747         (WebKit::StorageNamespaceImpl::~StorageNamespaceImpl):
748         * WebProcess/Storage/StorageNamespaceImpl.h:
749         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
750         (WebKit::WebPlatformStrategies::localStorageNamespace):
751
752 2013-04-18  Sam Weinig  <sam@webkit.org>
753
754         Fix spelling I thought I had fixed.
755
756         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
757         (-[WKBrowsingContextGroup initWithIdentifier:]):
758
759 2013-04-18  Sam Weinig  <sam@webkit.org>
760
761         WebKit should not write WKPreferences to app user defaults when using the ObjC API
762         <rdar://problem/13593578>
763         https://bugs.webkit.org/show_bug.cgi?id=114821
764
765         Reviewed by Anders Carlsson.
766
767         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
768         (-[WKBrowsingContextGroup initWithIdentifier:]):
769         Use a identifier-less preferences for the ObjC-API. I think we will probably want this
770         to be the default for the C-API at some point as well, but Safari currently uses this
771         behavior.
772
773 2013-04-17  Anders Carlsson  <andersca@apple.com>
774
775         Change storage factory functions to take a PageGroup and Page respectively
776         https://bugs.webkit.org/show_bug.cgi?id=114776
777
778         Reviewed by Beth Dakin.
779
780         Update for WebCore changes.
781
782         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
783         (WebKit::WebPlatformStrategies::localStorageNamespace):
784         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
785         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
786         (WebPlatformStrategies):
787
788 2013-04-18  Timothy Hatcher  <timothy@apple.com>
789
790         Remove an ASSERT that is causing flakeyness in Debug builds.
791
792         https://webkit.org/b/113020
793
794         Reviewed by Jessie Berlin.
795
796         * UIProcess/WebInspectorProxy.cpp:
797         (WebKit::WebInspectorProxy::open): Removed ASSERT(m_createdInspectorPage).
798
799 2013-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
800
801         [GTK] Add WebKitWebPage::send-request signal to WebKit2 GTK+ API
802         https://bugs.webkit.org/show_bug.cgi?id=83681
803
804         Reviewed by Anders Carlsson.
805
806         Add WebKitWebPage::send-request signal emitted in willSendRequest
807         callback to allow web process extensions to modify requests before
808         they are sent or cancel the resource load.
809         This patch makes WebKitURIRequest and WebKitURIResponse objects
810         shareable between UI process and web extensions APIs. Since both
811         APIs force single header includes, the WebKitDefines.h header has
812         been split moving the forward declarations specific to the UI
813         process API to a new file WebKitForwardDeclarations.h. This way we
814         can also  share the WebKitDefines.h header and remove the
815         WebKitWebExtensionDefines.h header used in the web extensions API.
816
817         * GNUmakefile.list.am: Add new files to compilation.
818         * UIProcess/API/gtk/WebKitContextMenu.h: Include WebKitForward.h.
819         * UIProcess/API/gtk/WebKitContextMenuItem.h: Ditto.
820         * UIProcess/API/gtk/WebKitDefines.h: Remove forward declarations.
821         * UIProcess/API/gtk/WebKitDownload.h: Include WebKitForward.h.
822         * UIProcess/API/gtk/WebKitFindController.h: Ditto.
823         * UIProcess/API/gtk/WebKitForwardDeclarations.h: Added. Contains
824         the forward declarations moved from WebKitDefines.h.
825         * UIProcess/API/gtk/WebKitPrintOperation.h: Include WebKitForward.h.
826         * UIProcess/API/gtk/WebKitURIRequest.cpp:
827         (webkitURIRequestSetProperty): Use webkit_uri_request_set_uri() to
828         set the new URI.
829         (webkit_uri_request_class_init): Make URI property construct
830         instead of construct-only, since it can be updated once
831         constructed. It should never be NULL, so set default value to
832         about:blank instad of NULL.
833         (webkit_uri_request_set_uri): New public method to set the URI of
834         the WebKitURIRequest.
835         * UIProcess/API/gtk/WebKitURIRequest.h: Allow to include this file
836         from webkit-web-extension.h.
837         * UIProcess/API/gtk/WebKitURIResponse.h: Ditto.
838         * UIProcess/API/gtk/WebKitURISchemeRequest.h: Include
839         WebKitForward.h.
840         * UIProcess/API/gtk/WebKitWebView.h: Ditto.
841         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add
842         webkit_uri_request_set_uri.
843         * UIProcess/API/gtk/tests/TestResources.cpp:
844         (testWebResourceSendRequest):
845         (serverCallback):
846         (beforeAll):
847         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
848         (sendRequestCallback):
849         (pageCreatedCallback):
850         * UIProcess/API/gtk/webkit2marshal.list:
851         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h: Include
852         WebKitDefines.h instead of WebKitWebExtensionDefines.h.
853         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
854         (willSendRequestForFrame): Emit WebKitWebPage::send-request and
855         return early if the load is cancelled.
856         (webkit_web_page_class_init): Add WebKitWebPage::send-request
857         signal.
858         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: Include
859         WebKitDefines.h instead of WebKitWebExtensionDefines.h.
860         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
861
862 2013-04-18  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
863
864         [WK2] CoordinatedGraphicsLayerState is a struct, not a class
865         https://bugs.webkit.org/show_bug.cgi?id=108855
866
867         Reviewed by Andreas Kling.
868
869         Fixes the forward declaration which takes CoordinatedGraphicsLayerState
870         as a class.
871
872         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
873         (WebCore):
874
875 2013-04-18  Krzysztof Wolanski  <k.wolanski@samsung.com>:
876
877         [EFL][WK2] Change inadequate return value in method setDone().
878         https://bugs.webkit.org/show_bug.cgi?id=114806
879
880         Reviewed by Andreas Kling.
881
882         Fix possible warning in EFL port: no return statement in function returning non-void.
883         Change return value from bool to void in method setDone().
884
885         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
886         (EWK2UnitTest::CallbackDataTimer::setDone):
887
888 2013-04-18  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
889
890         [WK2][EFL] Text Checker's settings refactor
891         https://bugs.webkit.org/show_bug.cgi?id=111713
892
893         Reviewed by Andreas Kling.
894
895         Use WK2's TextCheckerState object as the store for the text checker settings.
896         It's shared between the client (Ewk API part) and WebProcess (read only).
897         Thanks to it, we don't have to keep any additional structure with
898         the settings on ewk side.
899
900         In the consistency with WKTextChecker C API, move the Ewk's text checker settings APIs
901         to the ewk_text_checker.h/cpp. They're not connected to Ewk_View/Ewk_Settings object to
902         keep them in ewk_setting.h/cpp.
903
904         Introduce a new class to implement WKTextCheckerClient callbacks to call spelling
905         methods through WK2 C API.
906         The main purpose of this change is to detach text checker initialization from ewk_context.
907
908         * PlatformEfl.cmake:
909         Add a new files to the build.
910
911         * UIProcess/API/efl/ewk_context.cpp:
912         (EwkContext::EwkContext):
913         Detach the text checker initialization from context.
914         There might be more than default context.
915         There is one text checker object per application.
916
917         * UIProcess/API/efl/ewk_settings.cpp:
918         * UIProcess/API/efl/ewk_settings.h:
919         Remove the text checker settings.
920
921         * UIProcess/API/efl/ewk_text_checker.cpp:
922         Add the text checker settings to the ewk_text_checker.h/cpp
923
924         (convertLanguagesToEinaList):
925         Add helper function to convert Vector's values to Eina_List.
926
927         (clientCallbacks):
928         Add the client callback responsible for the continuous spell checking
929         setting change to the struct.
930
931         (ewk_text_checker_continuous_spell_checking_enabled_set):
932         Do not call the client's callback responsible for the setting
933         change unless WebKit changes the setting (trough the context
934         'Check Spelling While Typing' option).
935
936         * UIProcess/API/efl/ewk_text_checker.h:
937         Adjust APIs name to the ewk_text_checker syntax.
938         Update the documentation according to the changes.
939
940         * UIProcess/API/efl/ewk_text_checker_private.h:
941         (ClientCallbacks):
942         Move ClientCallbacks structure to TextCheckerClientEfl.
943         The client callbacks (Ewk API) have to be accessible in WKTextCheckerClient callbacks
944         to choose what implementation will be used - the client's (if definied) or Enchant impl.
945
946         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
947         Update the unit tests according to the APIs change.
948         Update the test responsible for the notification about the setting change
949         according to changes in 'ewk_text_checker_continuous_spell_checking_enabled_set'.
950
951         * UIProcess/efl/TextCheckerClientEfl.cpp: Added.
952         Implement WKTextCheckerClient callbacks.
953
954         (TextCheckerClientEfl::TextCheckerClientEfl):
955         (TextCheckerClientEfl::instance):
956         Allow to get and create TextCheckerClientEfl object.
957
958         (TextCheckerClientEfl::isContinuousSpellCheckingEnabled):
959         Get the setting value based on WK2 C API.
960
961         (TextCheckerClientEfl::ensureSpellCheckingLanguage):
962         Load the default languages if user didn't specify any.
963
964         (TextCheckerClientEfl::updateSpellCheckingLanguages):
965         (TextCheckerClientEfl::languagesUpdateTimerFired):
966         (TextCheckerClientEfl::availableSpellCheckingLanguages):
967         (TextCheckerClientEfl::loadedSpellCheckingLanguages):
968         (TextCheckerClientEfl::availableSpellCheckingLanguages):
969         (TextCheckerClientEfl::loadedSpellCheckingLanguages):
970         Provide support for languages.
971
972         (TextCheckerClientEfl::spellCheckingSettingChangeTimerFired):
973         (TextCheckerClientEfl::callContinuousSpellCheckingChangeCallbackAsync):
974         Notify the client about the setting change.
975
976         (TextCheckerClientEfl::isContinuousSpellCheckingEnabledCallback):
977         (TextCheckerClientEfl::setContinuousSpellCheckingEnabledCallback):
978         (TextCheckerClientEfl::uniqueSpellDocumentTagCallback):
979         (TextCheckerClientEfl::closeSpellDocumentWithTagCallback):
980         (TextCheckerClientEfl::checkSpellingOfStringCallback):
981         (TextCheckerClientEfl::guessesForWordCallback):
982         (TextCheckerClientEfl::learnWordCallback):
983         (TextCheckerClientEfl::ignoreWordCallback):
984         WKTextCheckerClient callbacks implementation.
985
986         * UIProcess/efl/TextCheckerClientEfl.h: Added.
987         (TextCheckerClientEfl):
988         (TextCheckerClientEfl::clientCallbacks):
989         Return the client callbacks to be used in ewk_text_checker.cpp.
990
991         * UIProcess/efl/TextCheckerEfl.cpp:
992         (WebKit::TextChecker::state):
993         Initialize the TextCheckerState's members to false.
994
995         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
996         Set the default language if user didn't specify any.
997         Notify the client about the setting change.
998         This method is called when context menu 'Check Spelling While Typing'
999         option has been toggled.
1000
1001         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
1002         Set the default language if user didn't specify any.
1003         Called by WKTextChecker's API.
1004
1005 2013-04-18  Manuel Rego Casasnovas  <rego@igalia.com>
1006
1007         [GTK][WK2] Add WebKitWebPage::webkit_web_page_get_uri to WebKit2 GTK+ API
1008         https://bugs.webkit.org/show_bug.cgi?id=111288
1009
1010         Reviewed by Anders Carlsson.
1011
1012         Add new property URI to WebKitWebPage providing a method
1013         webkit_web_page_get_uri to get it and the signal "notify::uri" to
1014         monitor changes in the URI.
1015
1016         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include new method in
1017         GTK+ doc.
1018         * UIProcess/API/gtk/tests/TestLoaderClient.cpp:
1019         (testWebPageURI):
1020         (beforeAll):
1021         (afterAll): Add test to check that WebKitWebPage URI matches with
1022         WebKitWebView value. The tests is listening for changes in WebKitWebPage
1023         URI via D-Bus and checks that value is the same than WebKitWebView URI.
1024         It also checks that the order of the URIs in a redirection is right.
1025         When the test finishes the signals are disconnected properly.
1026         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1027         (uriChangedCallback):
1028         (pageCreatedCallback): Add new D-Bus signal "URIChanged" connected to
1029         "notify::uri" signal of WebKitWebPage.
1030         * UIProcess/API/gtk/tests/WebKitTestBus.cpp:
1031         (WebKitTestBus::getOrCreateConnection): Rename method connection() to
1032         getOrCreateConnection().
1033         (WebKitTestBus::createProxy): Use the new method name.
1034         * UIProcess/API/gtk/tests/WebKitTestBus.h:
1035         (WebKitTestBus::connection): Add public getter for m_connection.
1036         (WebKitTestBus): Add private method header getOrCreateConnection().
1037         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1038         (_WebKitWebPagePrivate): Add new URI attribute.
1039         (webkitWebPageSetURI): Method to set the URI and emit the "notify:uri"
1040         signal if it has changed.
1041         (didStartProvisionalLoadForFrame): At this point it use the unreachable
1042         URL from provisional document loader if any. Otherwise, it uses the URL
1043         from provisional document loader.
1044         (didReceiveServerRedirectForProvisionalLoadForFrame): In the case of
1045         redirections it works like for didStartProvisionalLoadForFrame getting
1046         the unreachable URL if any.
1047         (didSameDocumentNavigationForFrame): In this case it gets the URL from
1048         the document loader.
1049         (webkitWebPageGetProperty): Add code related to URI property.
1050         (webkit_web_page_class_init): Add bits related to URI property.
1051         (webkitWebPageCreate): Implement callbacks to monitor URI changes.
1052         (webkit_web_page_get_uri): Return URI attribute.
1053         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: Add new method
1054         header.
1055
1056 2013-04-18  Xan Lopez  <xan@igalia.com>
1057
1058         [GTK] When the WebProcess crashes, a signal should be emitted
1059         https://bugs.webkit.org/show_bug.cgi?id=105180
1060
1061         Emit a "web-process-crashed" signal when the WebProcess crashes. This
1062         is useful, for example, to show an error page in a web browser
1063         like Chrome does.
1064
1065         Reviewed Carlos Garcia Campos.
1066
1067         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1068         (processDidCrash):
1069         (attachLoaderClientToView):
1070         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
1071         * UIProcess/API/gtk/WebKitWebView.cpp:
1072         (webkit_web_view_class_init):
1073         (webkitWebViewWebProcessCrashed):
1074         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
1075         (testWebExtensionGetTitle):
1076         (webProcessCrashedCallback):
1077         (testWebKitWebViewProcessCrashed):
1078         (beforeAll):
1079         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1080         (methodCallCallback):
1081
1082 2013-04-18  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1083
1084         [EFL][WK2] Add tooltip API to the WKView client
1085         https://bugs.webkit.org/show_bug.cgi?id=111563
1086
1087         Reviewed by Andreas Kling.
1088
1089         Add tooltip to the barebone Tizen C API, and implement
1090         the method so that the EFL API keeps working.
1091
1092         * UIProcess/API/C/efl/WKView.h:
1093         * UIProcess/efl/ViewClientEfl.cpp:
1094         (WebKit::ViewClientEfl::didChangeTooltip):
1095         (WebKit):
1096         (WebKit::ViewClientEfl::ViewClientEfl):
1097         * UIProcess/efl/ViewClientEfl.h:
1098         (ViewClientEfl):
1099         * UIProcess/efl/WebView.cpp:
1100         (WebKit::WebView::toolTipChanged):
1101         * UIProcess/efl/WebViewClient.cpp:
1102         (WebKit::WebViewClient::didChangeTooltip):
1103         (WebKit):
1104         * UIProcess/efl/WebViewClient.h:
1105
1106 2013-04-17  Joone Hur  <joone.hur@intel.com>
1107
1108         [EFL][AC] m_pendingSurfaceResize needs to be guarded by USE(ACCELERATED_COMPOSITING)
1109         https://bugs.webkit.org/show_bug.cgi?id=114770
1110
1111         AC related code is guarded by USE(ACCELERATED_COMPOSITING) in order to build 
1112         WebKitEfl with no-tiled-backing-store(r147792), but m_pendingSurfaceResize is 
1113         not included. This patch allows m_pendingSurfaceResize to be guarded by 
1114         USE(ACCELERATED_COMPOSITING). 
1115
1116         Reviewed by Simon Fraser.
1117
1118         * UIProcess/API/efl/EwkView.cpp:
1119         (EwkView::EwkView):
1120         (EwkView::displayTimerFired):
1121         (EwkView::handleEvasObjectCalculate):
1122         * UIProcess/API/efl/EwkView.h:
1123         (EwkView):
1124
1125 2013-04-17  Anders Carlsson  <andersca@apple.com>
1126
1127         The storage manager should know the local storage directory
1128         https://bugs.webkit.org/show_bug.cgi?id=114765
1129
1130         Reviewed by Beth Dakin.
1131
1132         * UIProcess/Storage/StorageManager.cpp:
1133         (WebKit::StorageManager::create):
1134         (WebKit::StorageManager::setLocalStorageDirectory):
1135         (WebKit::StorageManager::setLocalStorageDirectoryInternal):
1136         * UIProcess/Storage/StorageManager.h:
1137         * UIProcess/WebContext.cpp:
1138         (WebKit::WebContext::WebContext):
1139         (WebKit::WebContext::setLocalStorageDirectory):
1140         * UIProcess/WebContext.h:
1141
1142 2013-04-17  Joone Hur  <joone.hur@intel.com>
1143
1144         [EFL][AC] MiniBrowser starts with a black empty view before painting a web page
1145         https://bugs.webkit.org/show_bug.cgi?id=103745
1146
1147         Reviewed by Kenneth Rohde Christiansen.
1148
1149         Evas paints empty evas objects before rendering a web page, so it shows 
1150         a black empty view for a moment. This patch prevents from painting the empty 
1151         evas objects until a GL surface is ready for rendering.  
1152
1153         * UIProcess/API/efl/EwkView.cpp:
1154         (showEvasObjectsIfNeeded):
1155         (EwkView::displayTimerFired):
1156         (EwkView::handleEvasObjectShow):
1157
1158 2013-04-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1159
1160         [GTK] Add webkit_web_page_get_id() to WebKit2 GTK+ API
1161         https://bugs.webkit.org/show_bug.cgi?id=111938
1162
1163         Reviewed by Anders Carlsson.
1164
1165         Add API to the web extensions API to get the identifier of a web
1166         page.
1167
1168         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
1169         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1170         (methodCallCallback): Check the page ID matches the one returned
1171         by webkit_web_page_get_id().
1172         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1173         (webkit_web_page_get_id):
1174         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
1175
1176 2013-04-16  Anders Carlsson  <andersca@apple.com>
1177
1178         Clone storage namespaces for window.open
1179         https://bugs.webkit.org/show_bug.cgi?id=114703
1180
1181         Reviewed by Sam Weinig.
1182
1183         * UIProcess/Storage/StorageManager.cpp:
1184         (WebKit::StorageManager::StorageArea::clone):
1185         New helper function for cloning a storage area.
1186
1187         (WebKit::StorageManager::StorageArea::setItem):
1188         Correctly handle the copy-on-write feature of StorageMap if it has multiple storage areas pointing to it.
1189
1190         (WebKit::StorageManager::StorageArea::removeItem):
1191         Ditto.
1192
1193         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
1194         Add cloned storage areas.
1195
1196         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1197         (WebKit::StorageNamespaceImpl::copy):
1198         Create a new session storage namespace for the new page.
1199
1200 2013-04-16  Beth Dakin  <bdakin@apple.com>
1201
1202         Need a new layout milestone to notify bundle clients when the header has been 
1203         flushed
1204         https://bugs.webkit.org/show_bug.cgi?id=114706
1205         -and corresponding-
1206         <rdar://problem/13657284>
1207
1208         Reviewed by Simon Fraser.
1209
1210         Make this new LayoutMilestone private at the API layer. 
1211         * Shared/API/c/WKPageLoadTypes.h:
1212         * Shared/API/c/WKPageLoadTypesPrivate.h: Added.
1213
1214         Handle the new milestone.
1215         * Shared/API/c/WKSharedAPICast.h:
1216         (WebKit::toWKLayoutMilestones):
1217         (WebKit::toLayoutMilestones):
1218
1219         New file to make the milestone private.
1220         * WebKit2.xcodeproj/project.pbxproj:
1221
1222         Add or remove the DidFirstFlushForHeaderLayer millstone based on whether we just 
1223         added or removed a header.
1224         * WebProcess/WebPage/mac/WebPageMac.mm:
1225         (WebKit::WebPage::setHeaderLayerWithHeight):
1226
1227 2013-04-16  Ryosuke Niwa  <rniwa@webkit.org>
1228
1229         Another EFL build fix.
1230
1231         * WebProcess/WebPage/efl/WebPageEfl.cpp:
1232
1233 2013-04-15  Sam Weinig  <sam@webkit.org>
1234
1235         Remove more #includes from Frame.h
1236         https://bugs.webkit.org/show_bug.cgi?id=114642
1237
1238         Reviewed by Anders Carlsson.
1239
1240         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
1241         * WebProcess/Plugins/PluginView.cpp:
1242         * WebProcess/WebPage/WebFrame.cpp:
1243         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1244         * WebProcess/WebPage/mac/WebPageMac.mm:
1245         * WebProcess/WebPage/qt/WebPageQt.cpp:
1246
1247 2013-04-16  Timothy Hatcher  <timothy@apple.com>
1248
1249         Make resizing the docked Web Inspector stay in sync with the inspected view.
1250
1251         https://webkit.org/b/114682
1252
1253         Reviewed by Joseph Pecoraro.
1254
1255         * UIProcess/mac/WebInspectorProxyMac.mm:
1256         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1257         Disable screen updates to make sure the layers for both views resize in sync.
1258
1259 2013-04-15  Anders Carlsson  <andersca@apple.com>
1260
1261         Remove unneeded headers from ScriptExecutionContext.h
1262         https://bugs.webkit.org/show_bug.cgi?id=114631
1263
1264         Reviewed by Alexey Proskuryakov.
1265
1266         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1267         * WebProcess/WebPage/PageOverlay.cpp:
1268
1269 2013-04-16  Maciej Stachowiak  <mjs@apple.com>
1270
1271         Remove even yet still more traces of v8
1272         https://bugs.webkit.org/show_bug.cgi?id=114693
1273
1274         Reviewed by Anders Carlsson.
1275
1276         * Scripts/generate-forwarding-headers.pl: Remove v8 from list of platforms.
1277
1278 2013-04-16  Alexey Proskuryakov  <ap@apple.com>
1279
1280         Remove unused AlternativeTextClient::dismissDictationAlternativeUI
1281         https://bugs.webkit.org/show_bug.cgi?id=114598
1282
1283         Reviewed by Ryosuke Niwa.
1284
1285         * UIProcess/API/mac/PageClientImpl.h:
1286         * UIProcess/API/mac/PageClientImpl.mm:
1287         (WebKit::PageClientImpl::dictationAlternatives):
1288         * UIProcess/PageClient.h:
1289         * UIProcess/WebPageProxy.cpp:
1290         * UIProcess/WebPageProxy.h:
1291         * UIProcess/WebPageProxy.messages.in:
1292         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
1293         * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
1294
1295 2013-04-16  Claudio Saavedra  <csaavedra@igalia.com>
1296
1297         [GTK][WK2] Add API to retrieve a snapshot from a webview
1298         https://bugs.webkit.org/show_bug.cgi?id=98270
1299
1300         Reviewed by Anders Carlsson.
1301
1302         This adds the GTK+ API necessary to retrieve a snapshot from a
1303         webview asynchronously. The API uses the injected bundle
1304         internally to get the snapshot from the WebProcess.
1305
1306         * UIProcess/API/gtk/WebKitError.cpp:
1307         (webkit_snapshot_error_quark): Add snapshot API related error
1308         quark.
1309         * UIProcess/API/gtk/WebKitError.h: Add snapshot error handling.
1310         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
1311         (didReceiveWebViewMessageFromInjectedBundle): Handle the new
1312         "DidGetSnapshot" message.
1313         * UIProcess/API/gtk/WebKitPrivate.h: Add SnapshotRegion enum.
1314         * UIProcess/API/gtk/WebKitWebView.cpp:
1315         (_WebKitWebViewPrivate): Add a map for the snapshot results.
1316         (GetSnapshotAsyncData):
1317         (webKitWebViewDidReceiveSnapshot):
1318         (webKitSnapshotRegionToSnapshotRegion): Helper method for casting
1319         the region option enumeration.
1320         (generateSnapshotCallbackID): Method to generate unique callback
1321         ids.
1322         (webkit_web_view_get_snapshot):
1323         (webkit_web_view_get_snapshot_finish): New snapshotting API.
1324         * UIProcess/API/gtk/WebKitWebView.h: Ditto.
1325         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Add the private method
1326         to handle a received snapshot.
1327         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API
1328         bits.
1329         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1330         (cairoSurfacesEqual): Add helper to compare cairo_surface_t
1331         structs.
1332         (testWebViewSnapshot): New test.
1333         (beforeAll): Add the new test.
1334         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1335         (WebViewTest::selectAll): Add method to help test snapshots
1336         including selection.
1337         * UIProcess/API/gtk/tests/WebViewTest.h: Ditto
1338         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
1339         (didReceiveMessageToPage): Ditto.
1340         (webkitWebExtensionCreate): Register method above.
1341         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1342         (webkitWebPageDidReceiveMessage): Add this method. It
1343         handles the new message "GetSnapshot".
1344         * WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h:
1345         Add method above.
1346
1347 2013-04-16  Timothy Hatcher  <timothy@apple.com>
1348
1349         Create full rects for the inspector and inspected views when
1350         adjusting to an inspected view frame change. 
1351
1352         This ensures switching dock sides restores the inspected view
1353         and inspector to fill the parent's bounds.
1354
1355         https://webkit.org/b/114666
1356         rdar://problem/13660796
1357
1358         Reviewed by Joseph Pecoraro.
1359
1360         * UIProcess/mac/WebInspectorProxyMac.mm:
1361         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1362
1363 2013-04-16  Balazs Kelemen  <kbalazs@webkit.org>
1364
1365         Initialize logging channels for web processes
1366         https://bugs.webkit.org/show_bug.cgi?id=114621
1367
1368         Reviewed by Sam Weinig.
1369
1370         Use InitializeWebKit2 for initializing the web and plugin processes.
1371         It handles initializing the logging channels and it's better to have
1372         shared core for this. For the plugin process now we always create
1373         a RunLoop object which is not necessary with the -scanPlugin argument
1374         but it shouldn't be a problem.
1375
1376         * PluginProcess/qt/PluginProcessMainQt.cpp:
1377         (WebKit::PluginProcessMain):
1378         * PluginProcess/unix/PluginProcessMainUnix.cpp:
1379         (WebKit::PluginProcessMainUnix):
1380         * WebProcess/efl/WebProcessMainEfl.cpp:
1381         (WebKit::WebProcessMainEfl):
1382         * WebProcess/gtk/WebProcessMainGtk.cpp:
1383         (WebKit::WebProcessMainGtk):
1384         * WebProcess/qt/WebProcessMainQt.cpp:
1385         (WebKit::WebProcessMainQt):
1386
1387 2013-04-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1388
1389         [EFL][WK2] Add an API for getting context menu item's parent menu
1390         https://bugs.webkit.org/show_bug.cgi?id=107510
1391
1392         Reviewed by Kenneth Rohde Christiansen.
1393
1394         Added parent menu support and API for Ewk_Context_Menu_Item, to
1395         allow selecting context menus using Elementary widgets.
1396         Context menu unit test updated with new function. 
1397
1398         * UIProcess/API/efl/ewk_context_menu.cpp:
1399         (EwkContextMenu::EwkContextMenu):
1400         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1401         (EwkContextMenuItem::EwkContextMenuItem):
1402         (ewk_context_menu_item_parent_menu_get):
1403         * UIProcess/API/efl/ewk_context_menu_item.h:
1404         * UIProcess/API/efl/ewk_context_menu_item_private.h:
1405         (EwkContextMenuItem::create):
1406         (EwkContextMenuItem::parentMenu):
1407         (EwkContextMenuItem::setParentMenu):
1408         (EwkContextMenuItem):
1409         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
1410         (showContextMenu):
1411
1412 2013-04-16  Andreas Kling  <akling@apple.com>
1413
1414         Fix release builds with !LOG_DISABLED.
1415
1416         * Platform/mac/Logging.mac.mm:
1417
1418 2013-04-16  Manuel Rego Casasnovas  <rego@igalia.com>
1419
1420         [GTK][EFL] Remove deprecated libsoup API usage
1421         https://bugs.webkit.org/show_bug.cgi?id=104894
1422
1423         Reviewed by Philippe Normand.
1424
1425         Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include
1426         libsoup/soup.h.
1427
1428         * WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h:
1429         * WebProcess/efl/WebProcessMainEfl.cpp:
1430         * WebProcess/gtk/WebProcessMainGtk.cpp:
1431         * WebProcess/soup/WebKitSoupRequestGeneric.h:
1432         * WebProcess/soup/WebProcessSoup.cpp:
1433         * WebProcess/soup/WebSoupRequestManager.cpp:
1434         (WebKit::WebSoupRequestManager::registerURIScheme): Remove requester and
1435         use method soup_session_add_feature_by_type().
1436
1437 2013-04-15  Dean Jackson  <dino@apple.com>
1438
1439         Plugins that resize might need to be snapshotted.
1440         https://bugs.webkit.org/show_bug.cgi?id=102157
1441         <rdar://problem/12696259>
1442
1443         Reviewed by Tim Horton.
1444
1445         Allow a running plugin to be snapshotted. All this
1446         means is that we start the snapshot timer again.
1447
1448         * WebProcess/Plugins/PluginView.cpp:
1449         (WebKit::PluginView::beginSnapshottingRunningPlugin): Restart
1450             the timer.
1451         * WebProcess/Plugins/PluginView.h: Virtual method declaration.
1452
1453 2013-04-15  Seokju Kwon  <seokju.kwon@gmail.com>
1454
1455         [EFL][WK2] build fix after r148434
1456         https://bugs.webkit.org/show_bug.cgi?id=114647
1457
1458         Reviewed by Benjamin Poulain.
1459
1460         * UIProcess/API/efl/EwkView.cpp:
1461         (EwkView::showContextMenu):
1462
1463 2013-04-15  Jer Noble  <jer.noble@apple.com>
1464
1465         After switching to another space and back, video races to catch up with audio
1466         https://bugs.webkit.org/show_bug.cgi?id=114634
1467
1468         Reviewed by Tim Horton.
1469
1470         In Mountain Lion and previous, report that a view is "not visible" when its window
1471         is not in the active space. This causes us to notify AVFoundation that its CAImageQueues
1472         will not be serviced and results in not having the "catch up" behavior when returning
1473         to the browser's space.
1474
1475         * UIProcess/API/mac/PageClientImpl.mm:
1476         (WebKit::PageClientImpl::isViewVisible):
1477
1478 2013-04-15  Seulgi Kim  <seulgikim@company100.net>
1479
1480         Schedule rendering at regular interval (60fps)
1481         https://bugs.webkit.org/show_bug.cgi?id=114617
1482
1483         Reviewed by Martin Robinson.
1484
1485         Schedule rendering reguarly regardless of the time taken to render a
1486         frame. Otherwise, next flush delayed by the amount of the rendering
1487         time.
1488
1489         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1490         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
1491         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
1492         (WebKit::LayerTreeHostGtk::flushAndRenderLayers):
1493         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1494
1495 2013-04-15  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1496
1497         [EFL][WK2] Use C API in ewk_context_menu
1498         https://bugs.webkit.org/show_bug.cgi?id=109698
1499
1500         Reviewed by Andreas Kling.
1501
1502         EFL port unlike others does not handle context menus inside WebKit but exposes an API:
1503         ewk_context_menu and ewk_context_menu_item, and leaves context menu to application.
1504         Currently EFL port's context menu API uses internal C++ classes, while it should use WK2 C API,
1505         to avoid violating layering.
1506         This patch changes EFL context menu API to use only WK2 C API.
1507
1508         * UIProcess/API/efl/EwkView.cpp:
1509         (EwkView::showContextMenu):
1510         * UIProcess/API/efl/EwkView.h:
1511         (WebKit):
1512         (EwkView):
1513         * UIProcess/API/efl/ewk_context_menu.cpp:
1514         (EwkContextMenu::EwkContextMenu):
1515         (EwkContextMenu::contextMenuItemSelected):
1516         (ewk_context_menu_item_select):
1517         (getWKTagFromEwkAction):
1518         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1519         (EwkContextMenuItem::EwkContextMenuItem):
1520         (getEwkActionFromWKTag):
1521         * UIProcess/API/efl/ewk_context_menu_item.h:
1522         * UIProcess/API/efl/ewk_context_menu_item_private.h:
1523         (EwkContextMenuItem::create):
1524         (EwkContextMenuItem):
1525         * UIProcess/API/efl/ewk_context_menu_private.h:
1526         (EwkContextMenu::create):
1527         (EwkContextMenu):
1528         * UIProcess/efl/ContextMenuClientEfl.cpp:
1529         (showContextMenu):
1530         (hideContextMenu):
1531         (ContextMenuClientEfl::ContextMenuClientEfl):
1532         * UIProcess/efl/ContextMenuClientEfl.h:
1533         (WebKit::ContextMenuClientEfl::view):
1534         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
1535         (WebKit::WebContextMenuProxyEfl::showContextMenu):
1536         (WebKit::WebContextMenuProxyEfl::hideContextMenu):
1537         * UIProcess/efl/WebContextMenuProxyEfl.h:
1538         (WebContextMenuProxyEfl):
1539
1540 2013-04-15  Balazs Kelemen  <kbalazs@webkit.org>
1541
1542         [CoordGfx] Background color should not be part of GraphicsLayerState
1543         https://bugs.webkit.org/show_bug.cgi?id=113785
1544
1545         Reviewed by Andreas Kling.
1546
1547         Page background is independent from layer state, send it to the UI
1548         as soon as possible.
1549
1550         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1551         (CoreIPC::::encode):
1552         (CoreIPC::::decode):
1553         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1554         (WebKit::CoordinatedLayerTreeHost::setBackgroundColor):
1555
1556 2013-04-15  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1557
1558         [WK2] Add new callbacks and a function for WebKit2 context menu API
1559         https://bugs.webkit.org/show_bug.cgi?id=111552
1560
1561         Reviewed by Anders Carlsson.
1562
1563         Add contextMenuHide and contextMenuShow callbacks to WKPageContextMenuClient
1564         and WKPageContextMenuSelected API so context menus can be handled outside
1565         WebKit. API version of this client was bumped so older client version still
1566          can be used
1567
1568         * Shared/APIClientTraits.cpp:
1569         (WebKit):
1570         * Shared/APIClientTraits.h:
1571         * UIProcess/API/C/WKPage.cpp:
1572         (WKPageSelectContextMenuItem):
1573         * UIProcess/API/C/WKPage.h:
1574         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
1575         (attachContextMenuClientToView):
1576         * UIProcess/WebPageContextMenuClient.cpp:
1577         (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
1578         (WebKit::WebPageContextMenuClient::showContextMenu):
1579         (WebKit):
1580         (WebKit::WebPageContextMenuClient::hideContextMenu):
1581         * UIProcess/WebPageContextMenuClient.h:
1582         (WebPageContextMenuClient):
1583         * UIProcess/WebPageProxy.cpp:
1584         (WebKit::WebPageProxy::internalShowContextMenu):
1585         * UIProcess/efl/ContextMenuClientEfl.cpp:
1586         (ContextMenuClientEfl::ContextMenuClientEfl):
1587
1588 2013-04-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1589
1590         [EFL][WK2] Regression(r148274): Broke rendering in the browser
1591         https://bugs.webkit.org/show_bug.cgi?id=114593
1592
1593         Reviewed by Anders Carlsson.
1594
1595         r148274 added a new "didChangeViewportAttributes" callback to
1596         WKView but did not hook it up in ViewClientEfl. This patch
1597         fixes this and makes rendering work again in the browser.
1598
1599         * UIProcess/efl/ViewClientEfl.cpp:
1600         (WebKit::ViewClientEfl::ViewClientEfl):
1601
1602 2013-04-14  Andreas Kling  <akling@apple.com>
1603
1604         Move CSSOM classes to using MutableStylePropertySet over StylePropertySet.
1605         <http://webkit.org/b/114581>
1606
1607         Reviewed by Anders Carlsson.
1608
1609         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1610         (WebKit::WebEditorClient::shouldApplyStyle):
1611
1612 2013-04-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1613
1614         Unreviewed build fix for WebKit2 EFL after r148373 due to missing
1615         header includes.
1616
1617         * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp:
1618         * UIProcess/efl/InputMethodContextEfl.cpp:
1619
1620 2013-04-13  Sam Weinig  <sam@webkit.org>
1621
1622         Add ObjC API for setting initialization data for the WKWebProcessPlugIn
1623         https://bugs.webkit.org/show_bug.cgi?id=103846
1624
1625         Reviewed by Darin Adler.
1626
1627         * UIProcess/API/mac/WKProcessGroup.h:
1628         Adds a new optional processGroupWillCreateConnectionToWebProcessPlugIn: method for the WKProcessGroupDelegate protocol,
1629         which allows the user to pass (via an autoreleased return value) initialization data to the web process plugin.
1630
1631         * UIProcess/API/mac/WKProcessGroup.mm:
1632         (getInjectedBundleInitializationUserData):
1633         (setUpInectedBundleClient):
1634         (-[WKProcessGroup initWithInjectedBundleURL:]):
1635         (-[WKProcessGroup dealloc]):
1636         Use the existing WKContextInjectedBundleClient infrastructure to pass the initialization data to the bundle
1637         via the new ObjCObjectGraph APIObject.
1638
1639         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
1640         Adds webProcessPlugIn:initializeWithObject: to the WKWebProcessPlugIn protocol, replacing webProcessPlugInInitialize:.
1641
1642         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
1643         (WebKit::InjectedBundle::load):
1644         Pass the initialization data to the web process plugin.
1645
1646 2013-04-13  Sam Weinig  <sam@webkit.org>
1647
1648         Attempt Build Fix.
1649
1650         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1651
1652 2013-04-12  Sam Weinig  <sam@webkit.org>
1653
1654         Make Frame's ScriptController an OwnPtr and remove the #include
1655         https://bugs.webkit.org/show_bug.cgi?id=114105
1656
1657         Reviewed by Dean Jackson.
1658
1659         * Shared/WebHitTestResult.cpp:
1660         * Shared/WebHitTestResult.h:
1661         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
1662         * UIProcess/WebContext.h:
1663         * UIProcess/WebPageProxy.h:
1664         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1665         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
1666         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1667         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1668         * WebProcess/Plugins/PDF/PDFPlugin.h:
1669         * WebProcess/Plugins/PluginView.cpp:
1670         * WebProcess/Storage/StorageAreaImpl.cpp:
1671         * WebProcess/Storage/StorageAreaMap.cpp:
1672         * WebProcess/WebPage/WebFrame.cpp:
1673         * WebProcess/WebPage/WebPage.cpp:
1674
1675 2013-04-13  Zan Dobersek  <zdobersek@igalia.com>
1676
1677         Unreviewed GTK build fix after r148311.
1678
1679         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1680         (resizeWebKitWebViewBaseFromAllocation): Passing IntSize() as the scroll offset
1681         argument to the DrawingAreaProxy::setSize method.
1682
1683 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
1684
1685         Add private interface to WKView to asynchronously update the drawing area size
1686         https://bugs.webkit.org/show_bug.cgi?id=114549
1687
1688         Reviewed by Simon Fraser.
1689
1690         This will allow a client using the WKView to resize the contents without blocking waiting for the web process to repaint.
1691
1692         * UIProcess/API/mac/WKView.mm:
1693         (-[WKView _setDrawingAreaSize:]):
1694             - if the new size of teh drawing area does not match the frame size, position it according to the contentAnchor.
1695         (-[WKView updateLayer]):
1696             - Don't let a subsequent frame size change block on a prior async resize.
1697         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
1698             - resize the drawing area asynchronously, even if frame size udpates are disabled.
1699         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
1700             - wait for asynchronous updates to complete.
1701
1702         * UIProcess/API/mac/WKViewPrivate.h:
1703             - declare new methods.
1704
1705         * UIProcess/DrawingAreaProxy.cpp:
1706         (WebKit):
1707         * UIProcess/DrawingAreaProxy.h:
1708         (DrawingAreaProxy):
1709         (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
1710         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1711         (TiledCoreAnimationDrawingAreaProxy):
1712         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1713         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
1714             - pass timeout for waitForPossibleGeometryUpdate as a parameter.
1715
1716 2013-04-12  Jessie Berlin  <jberlin@apple.com>
1717
1718         32-bit build fix.
1719
1720         * UIProcess/API/mac/WKView.mm:
1721         (-[WKView setFrameSize:]):
1722
1723 2013-04-12  Jeffrey Pfau  <jpfau@apple.com>
1724
1725         Query directly for cache partition names
1726         https://bugs.webkit.org/show_bug.cgi?id=114538
1727
1728         Reviewed by David Kilzer.
1729
1730         Call back into WebKitSystemInterface to ask it for the cache
1731         partition names instead of trying to figure them out.
1732
1733         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1734         (WebKit::WebResourceCacheManager::getCacheOrigins):
1735         (WebKit):
1736         (WebKit::WebResourceCacheManager::returnCacheOrigins):
1737         * WebProcess/ResourceCache/WebResourceCacheManager.h:
1738         (WebResourceCacheManager):
1739         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
1740         (WebKit::WebResourceCacheManager::cfURLCacheHostNames):
1741         (WebKit):
1742         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
1743
1744 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
1745
1746         Build fix - too soon!
1747
1748         * UIProcess/API/mac/WKViewPrivate.h:
1749
1750 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
1751
1752         Build fix - too soon!
1753
1754         * UIProcess/API/mac/WKView.mm:
1755         (-[WKView setFrameSize:]):
1756
1757 2013-04-12  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1758
1759         [WK2] WebPageProxy loadURL() won't work when called just after terminateProcess()
1760         https://bugs.webkit.org/show_bug.cgi?id=110743
1761
1762         Reviewed by Benjamin Poulain.
1763
1764         A call to loadURL() just after terminating WebProcess will fail thanks to
1765         WebPageProxy being in an undefined state since it is in the middle of its own
1766         cleanup after process termination.
1767
1768         To properly fix this, not only WebPageProxy cleanup should be made
1769         at WebProcess termination request, but also WebProcessProxy needs
1770         to only return to its caller after terminating the process and
1771         closing connections. Otherwise, WebPageProxy can even be able to
1772         detect that WebProcess is no longer running, but a call to respawn
1773         the process will fail.
1774
1775         To fix these issues, this patch moves the cleanup code to a shared private function
1776         that is used for both the cases i.e. user termination and real crash. WebProcess
1777         shutdown is done using a new method that ensures that all cleanup was done before
1778         returning.
1779
1780         A last change introduced in this patch is that for user requested termination,
1781         clients are no longer notified of a crash (since it is not a crash).
1782
1783         * UIProcess/WebPageProxy.cpp:
1784         (WebKit::WebPageProxy::terminateProcess):
1785         (WebKit::WebPageProxy::processDidCrash):
1786         (WebKit):
1787         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1788         * UIProcess/WebPageProxy.h:
1789         (WebPageProxy):
1790         * UIProcess/WebProcessProxy.cpp:
1791         (WebKit::WebProcessProxy::userRequestedTerminate):
1792         (WebKit):
1793         * UIProcess/WebProcessProxy.h:
1794         (WebProcessProxy):
1795
1796 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
1797
1798         Add contentAnchor to WKView
1799         http://bugs.webkit.org/show_bug.cgi?id=114469
1800         
1801         Currently if you call setFrameSize: while frame size updates are disabled, or if the geometry
1802         update times out, then the previously rendered page content will be rendered anchored to the
1803         top left corner of the frame.
1804
1805         This is appropriate if the frame is being resized from the bottom right corner. In order to
1806         achieve a more desirable appearance if the frame is being resized from another corner we
1807         should allow the corner at which the content anchors to be specified.
1808
1809         Reviewed by Simon Fraser.
1810
1811         * UIProcess/API/mac/WKView.mm:
1812         (-[WKView setFrameSize:]):
1813             - If the content anchor has been set, then updating the frame size moves the origin within the layer.
1814         (-[WKView _setDrawingAreaSize:]):
1815             - Instruct the drawing area to paint at the correct position within the layer.
1816         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
1817             - If the root layer is cleared this implicitly resets any origin position we had set within it.
1818         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
1819             - initialize new data members.
1820         (-[WKView setContentAnchor:]):
1821         (-[WKView contentAnchor]):
1822             - Accessor implementation for @property contentAnchor.
1823
1824         * UIProcess/API/mac/WKViewPrivate.h:
1825         (NS_ENUM):
1826             - Added WKContentAnchor enum type, and @property contentAnchor.
1827
1828         * UIProcess/DrawingAreaProxy.cpp:
1829         (WebKit::DrawingAreaProxy::setSize):
1830             - Don't suppress geometry updates where the layer poistion has changed.
1831
1832         * UIProcess/DrawingAreaProxy.h:
1833         (DrawingAreaProxy):
1834             - Added m_layerPosition, layerPosition argument to setSize
1835
1836         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1837         (TiledCoreAnimationDrawingAreaProxy):
1838             - Added m_lastSentLayerPosition
1839
1840         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1841         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
1842             - Don't suppress geometry updates where the layer poistion has changed.
1843
1844         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
1845             - Pass layer position in UpdateGeometry message.
1846
1847         * WebProcess/WebPage/DrawingArea.h:
1848         (WebKit::DrawingArea::updateGeometry):
1849             - Added layerPosition argument to updateGeometry
1850
1851         * WebProcess/WebPage/DrawingArea.messages.in:
1852             - Added layerPosition argument to updateGeometry
1853
1854         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1855         (TiledCoreAnimationDrawingArea):
1856             - Added layerPosition argument to updateGeometry
1857
1858         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1859         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
1860             - Added layerPosition argument to updateGeometry
1861
1862 2013-04-12  Commit Queue  <rniwa@webkit.org>
1863
1864         Unreviewed, rolling out r148296 and r148297.
1865         http://trac.webkit.org/changeset/148296
1866         http://trac.webkit.org/changeset/148297
1867         https://bugs.webkit.org/show_bug.cgi?id=114536
1868
1869         Needs more thought (Requested by ap on #webkit).
1870
1871         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1872
1873 2013-04-12  Tim Horton  <timothy_horton@apple.com>
1874
1875         REGRESSION (r138858): GIFs don't start playing when they come out of background tabs
1876         https://bugs.webkit.org/show_bug.cgi?id=108864
1877         <rdar://problem/13140489>
1878
1879         Reviewed by Antti Koivisto.
1880
1881         Don't repaint the world when animations resume; instead, FrameView
1882         will cause all animated images to repaint. This line also had no effect for
1883         TiledCoreAnimationDrawingArea, which does not implement setNeedsDisplay.
1884
1885         * WebProcess/WebPage/WebPage.cpp:
1886         (WebKit::WebPage::resumeActiveDOMObjectsAndAnimations):
1887
1888 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
1889
1890         <rdar://problem/13334446> [Mac] Tweak sandbox profile.
1891
1892         Apply a post-landing review comment.
1893
1894         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1895
1896 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
1897
1898         <rdar://problem/13334446> [Mac] Tweak sandbox profile.
1899
1900         Reviewed by Jessie Berlin.
1901
1902         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1903
1904 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1905
1906         [GTK] Split GtkAuthenticationDialog in two widgets
1907         https://bugs.webkit.org/show_bug.cgi?id=103644
1908
1909         Reviewed by Xan Lopez.
1910
1911         * GNUmakefile.list.am: Add new files to compilation.
1912         * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp: Removed.
1913         * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h: Removed.
1914         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: Added.
1915         (webkitAuthenticationDialogAuthenticate): Use the
1916         AuthenticationChallengeProxy to authenticate and destroy the dialog.
1917         (okButtonClicked): Call webkitAuthenticationDialogAuthenticate()
1918         with the credential.
1919         (cancelButtonClicked): Call
1920         webkitAuthenticationDialogAuthenticate() with a NULL credential to
1921         continue without credential.
1922         (webkitAuthenticationDialogInitialize): Build the UI.
1923         (webkitAuthenticationDialogDraw): Draw a background.
1924         (webkitAuthenticationDialogMap): Grab default button.
1925         (webkitAuthenticationDialogConstructed): Create a GtkStyleContext
1926         with the GtkWindow path to draw the widget background like a real
1927         dialog.
1928         (webkit_authentication_dialog_class_init):
1929         (webkitAuthenticationDialogNew): Create a new
1930         WebKitAuthenticationDialog widget.
1931         * UIProcess/API/gtk/WebKitAuthenticationDialog.h: Added.
1932         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1933         * UIProcess/API/gtk/WebKitWebView.cpp:
1934         (webkitWebViewHandleAuthenticationChallenge): Create a
1935         WebKitAuthenticationDialog widget and pass add it to the
1936         container.
1937         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1938         (_WebKitWebViewBasePrivate): Updated to use the widget directly.
1939         (webkitWebViewChildIsInternalWidget): Ditto.
1940         (webkitWebViewBaseAddAuthenticationDialog): Ditto.
1941         (webkitWebViewBaseCancelAuthenticationDialog): Ditto.
1942         (webkitWebViewBaseContainerRemove): Ditto.
1943         (webkitWebViewBaseContainerForall): Ditto.
1944         (resizeWebKitWebViewBaseFromAllocation): Ditto.
1945         (webkitWebViewBaseFocus): Ditto.
1946         (webkitWebViewBaseDestroy): Destroy the auth widget is present.
1947         (webkit_web_view_base_class_init): Add implementation for
1948         GtkWidgetClass::destroy.
1949         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1950
1951 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1952
1953         [GTK] Web Process crash when the UI process finishes too early
1954         https://bugs.webkit.org/show_bug.cgi?id=112729
1955
1956         Reviewed by Anders Carlsson.
1957
1958         The problem is when creating the GSocket in the WorkQeue for the
1959         socket descriptor. GLib considers a programmer error to create a
1960         GSocket providing an invalid socket and finishes the process with
1961         g_error(). We are actually providing a valid socket when creating
1962         the GSocket, but it can be invalidated by the worker thread while
1963         the GSocket is being created. This is because
1964         registerEventSourceHandler is called from the main thread and
1965         unregisterEventSourceHandler can be called from the worker
1966         thread. We are currently registering two event handlers, one to
1967         read data from the socket and another one to close the CoreIPC
1968         connection when the socket connection is broken. Every event
1969         source registered uses its own GSocket (even if the file
1970         descriptor is actually the same), so that when the UI process
1971         finishes too early, the first event handler can be executed in the
1972         worker thread, closing the socket descriptor, while the main
1973         thread is creating the GSocket for the second one.
1974         We don't really need to use a separate event handler to monitor
1975         the connection, because GSocket always notifies when condition is
1976         G_IO_HUP and G_IO_ERR even if they haven't been explicitly set in
1977         g_socket_create_source(). We can register socket event sources
1978         differently, providing also a function to be called when the
1979         connection is closed, using a single socket and the same even source.
1980
1981         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
1982         (CoreIPC::Connection::platformInvalidate):
1983         (CoreIPC::Connection::open): Register a single socket event
1984         handler providing also a function to be called when the connection
1985         is closed.
1986         * Platform/WorkQueue.h:
1987         (WorkQueue):
1988         * Platform/gtk/WorkQueueGtk.cpp: The EventSource class has been
1989         split, moving everyting specific to socket event source to a
1990         derived class SocketEventSource.
1991         (WorkQueue::EventSource::EventSource):
1992         (WorkQueue::EventSource::performWork):
1993         (WorkQueue::EventSource::performWorkOnce):
1994         (WorkQueue::EventSource::performWorkOnTermination):
1995         (WorkQueue::EventSource::deleteEventSource):
1996         (WorkQueue::EventSource):
1997         (WorkQueue::SocketEventSource):
1998         (WorkQueue::SocketEventSource::SocketEventSource):
1999         (WorkQueue::SocketEventSource::cancel):
2000         (WorkQueue::SocketEventSource::didClose):
2001         (WorkQueue::SocketEventSource::checkCondition):
2002         (WorkQueue::SocketEventSource::eventCallback):
2003         (WorkQueue::registerSocketEventHandler):
2004         (WorkQueue::unregisterSocketEventHandler):
2005         (WorkQueue::dispatchOnSource):
2006
2007 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
2008
2009         <rdar://problem/13126204> [Mac] Tweak sandbox profile.
2010
2011         Reviewed by Anders Carlsson.
2012
2013         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2014         * WebProcess/com.apple.WebProcess.sb.in:
2015
2016 2013-04-12  Manuel Rego Casasnovas  <rego@igalia.com>
2017
2018         [GTK][WK2] Add document-loaded signal to WebKitWebPage
2019         https://bugs.webkit.org/show_bug.cgi?id=110614
2020
2021         Reviewed by Carlos Garcia Campos.
2022
2023         Add a new signal document-loaded to WebKitWebPage that will be emitted
2024         when the DOM document has been loaded for the main frame.
2025
2026         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
2027         (documentLoadedCallback):
2028         (testDocumentLoadedSignal):
2029         (beforeAll): Add test for document-loaded signal.
2030         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
2031         (documentLoadedCallback):
2032         (pageCreatedCallback):
2033         (methodCallCallback): Add new D-Bus signal DocumentLoaded in order to
2034         test document-loaded signal.
2035         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2036         (webkit_web_page_class_init):
2037         (webkitWebPageCreate): Add document-loaded signal and emit it when
2038         didFinishDocumentLoadForFrame is called.
2039
2040 2013-04-12  Hanyee Kim  <choco@company100.net>
2041
2042         [GTK] Webkit fails to build webkit2gtk-tests-resources.gresource.
2043         https://bugs.webkit.org/show_bug.cgi?id=114485
2044
2045         Reviewed by Martin Robinson.
2046
2047         Generating webkit2gtk-tests-resources.gresource can be failed due to
2048         the non-existing target directory.
2049         We need to make target directory before generating it.
2050
2051         * UIProcess/API/gtk/tests/GNUmakefile.am:
2052
2053 2013-04-12  Andreas Kling  <akling@apple.com>
2054
2055         REGRESSION(r145869): Right-click on SWF contents displays the context menu at the wrong place.
2056         <http://webkit.org/b/113836>
2057         <rdar://problem/13587624>
2058
2059         Reviewed by Anders "Wesley Crusher" Carlsson.
2060
2061         Mac plugins expect flipped-Y screen coordinates, while DOM APIs speak in unflipped coordinates,
2062         and we were mixing them up in the window frame caching optimization.
2063
2064         Solve this by having the UIProcess send both flipped and unflipped window frames to the WebProcess.
2065         The flipped frame is passed on to plugins, and the unflipped frame is used for window.screenX/Y etc.
2066
2067         * UIProcess/API/mac/WKView.mm:
2068         (-[WKView _updateWindowAndViewFrames]):
2069
2070             No need to retrieve the window frame here as WebPageProxy::windowAndViewFramesChanged() will
2071             always override it anyway.
2072
2073         * UIProcess/mac/WebPageProxyMac.mm:
2074         (WebKit::WebPageProxy::windowAndViewFramesChanged):
2075         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2076         (WebKit::WebChromeClient::windowRect):
2077         * WebProcess/WebPage/WebPage.cpp:
2078         (WebKit::WebPage::windowAndViewFramesChanged):
2079         * WebProcess/WebPage/WebPage.h:
2080         (WebKit::WebPage::windowFrameInUnflippedScreenCoordinates):
2081         * WebProcess/WebPage/WebPage.messages.in:
2082
2083 2013-04-12  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2084
2085         [WK2][EFL] WebView: Add callbacks to the WKViewClient to handle page viewport update
2086         https://bugs.webkit.org/show_bug.cgi?id=110463
2087
2088         Reviewed by Anders Carlsson.
2089
2090         * UIProcess/efl/ViewClientEfl.h:
2091         (ViewClientEfl):
2092         * UIProcess/efl/WebView.cpp:
2093         (WebKit::WebView::didChangeViewportProperties):
2094         * UIProcess/efl/WebViewClient.cpp:
2095         (WebKit::WebViewClient::didChangeViewportAttributes):
2096         (WebKit):
2097         * UIProcess/efl/WebViewClient.h:
2098
2099             Added didChangeViewportAttributes callback to the WKViewClient to
2100             handle page viewport updates.
2101
2102         * CMakeLists.txt:
2103         * Shared/API/c/WKBase.h:
2104         * Shared/APIObject.h:
2105         * UIProcess/API/C/WKAPICast.h:
2106         (WebKit):
2107         * UIProcess/API/C/WKViewportAttributes.cpp: Added.
2108         (WKViewportAttributesGetTypeID):
2109         * UIProcess/API/C/WKViewportAttributes.h: Added.
2110         * UIProcess/API/C/efl/WKView.h:
2111         * UIProcess/WebViewportAttributes.cpp: Added.
2112         (WebKit):
2113         (WebKit::WebViewportAttributes::WebViewportAttributes):
2114         (WebKit::WebViewportAttributes::~WebViewportAttributes):
2115         * UIProcess/WebViewportAttributes.h: Added.
2116         (WebKit):
2117         (WebViewportAttributes):
2118         (WebKit::WebViewportAttributes::create):
2119         (WebKit::WebViewportAttributes::originalAttributes):
2120         (WebKit::WebViewportAttributes::type):
2121
2122             Added WKViewportAttributesRef - WK2 C API object that is wrapping 
2123             WebCore::ViewportAttributes structure and is passed in didChangeViewportAttributes
2124             WKViewClient callback.
2125
2126         * UIProcess/efl/ViewClientEfl.cpp:
2127         (WebKit::ViewClientEfl::didChangeViewportAttributes):
2128         (WebKit):
2129
2130             Added implementaion of didChangeViewportAttributes WKViewClient 
2131             callback so that existing EFL WK2 funtionality is kept.
2132
2133
2134 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2135
2136         [GTK] The style of visited links doesn't change in WebKit2
2137         https://bugs.webkit.org/show_bug.cgi?id=112175
2138
2139         Reviewed by Benjamin Poulain.
2140
2141         The problem is that visited links were not tracked by the web
2142         process. There's a web process initial parameter to set whether
2143         web process should track visited links or not and it's disabled by
2144         default.
2145
2146         * UIProcess/gtk/WebContextGtk.cpp:
2147         (WebKit::WebContext::platformInitializeWebProcess): Always set
2148         shouldTrackVisitedLinks to true.
2149
2150 2013-04-11  Tim Horton  <timothy_horton@apple.com>
2151
2152         REGRESSION (r146956): ASSERTion failure: WebKit::WebProcess::pageWillLeaveWindow
2153         https://bugs.webkit.org/show_bug.cgi?id=114481
2154         <rdar://problem/13534784>
2155
2156         Reviewed by Simon Fraser.
2157
2158         Inform the WebProcess of WebPages which are already in a window when created.
2159
2160         * WebProcess/WebPage/WebPage.cpp:
2161         (WebKit::WebPage::WebPage):
2162
2163 2013-04-11  Anders Carlsson  <andersca@apple.com>
2164
2165         Add support for clearing storage areas
2166         https://bugs.webkit.org/show_bug.cgi?id=114479
2167
2168         Reviewed by Beth Dakin.
2169
2170         * UIProcess/Storage/StorageManager.cpp:
2171         (WebKit::StorageManager::StorageArea::StorageArea):
2172         Store the quota size so we can recreate the underlying StorageMap when clearing.
2173         
2174         (WebKit::StorageManager::StorageArea::clear):
2175         Create a new storage map and dispatch events.
2176
2177         (WebKit::StorageManager::clear):
2178         Find the right storage area and call clear.
2179
2180         * UIProcess/Storage/StorageManager.messages.in:
2181         Add Clear message.
2182
2183         * WebProcess/Storage/StorageAreaImpl.cpp:
2184         (WebKit::StorageAreaImpl::clear):
2185         Call the storage map.
2186
2187         * WebProcess/Storage/StorageAreaMap.cpp:
2188         (WebKit::StorageAreaMap::clear):
2189         Reset the cached values and send a clear message.
2190
2191         (WebKit::StorageAreaMap::resetValues):
2192         New helper function.
2193
2194         (WebKit::StorageAreaMap::didClear):
2195         New stub.
2196
2197         * WebProcess/Storage/StorageAreaMap.messages.in:
2198         Add DidClear message.
2199
2200 2013-04-11  Beth Dakin  <bdakin@apple.com>
2201
2202         WebKit should set the header and footer layers' contentsScale when the device 
2203         scale factor changes
2204         https://bugs.webkit.org/show_bug.cgi?id=114471
2205         -and corresponding-
2206         <rdar://problem/13621288>
2207
2208         Reviewed by Simon Fraser.
2209
2210         Update the header and footer contentsScale when the device scale factor has 
2211         changed.
2212
2213         * WebProcess/WebPage/WebPage.cpp:
2214         (WebKit::WebPage::setDeviceScaleFactor):
2215         * WebProcess/WebPage/WebPage.h:
2216         * WebProcess/WebPage/mac/WebPageMac.mm:
2217         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
2218
2219 2013-04-11  Anders Carlsson  <andersca@apple.com>
2220
2221         Implement removing storage area items
2222         https://bugs.webkit.org/show_bug.cgi?id=114472
2223
2224         Reviewed by Beth Dakin.
2225
2226         * UIProcess/Storage/StorageManager.cpp:
2227         (StorageManager::StorageArea):
2228         (WebKit::StorageManager::StorageArea::setItem):
2229         Rename connection to sourceConnection.
2230
2231         (WebKit::StorageManager::StorageArea::removeItem):
2232         Remove the item from the map and dispatch events if needed.
2233
2234         (WebKit::StorageManager::removeItem):
2235         Find the right storage area, remove the item and send back a DidRemoveItem message.
2236
2237         * UIProcess/Storage/StorageManager.messages.in:
2238         Add RemoveItem message.
2239
2240         * WebProcess/Storage/StorageAreaImpl.cpp:
2241         (WebKit::StorageAreaImpl::removeItem):
2242         Call StorageAreaMap::removeItem.
2243
2244         * WebProcess/Storage/StorageAreaMap.cpp:
2245         (WebKit::StorageAreaMap::removeItem):
2246         Send a RemoveItem message to the storage manager.
2247         
2248         (WebKit::StorageAreaMap::didRemoveItem):
2249         Add empty stub.
2250
2251         * WebProcess/Storage/StorageAreaMap.messages.in:
2252         Add DidRemoveItem message.
2253
2254 2013-04-11  Tim Horton  <timothy_horton@apple.com>
2255
2256         InjectedBundleNodeHandle::imageForRect doesn't respect device scale factor or highlighting option
2257         https://bugs.webkit.org/show_bug.cgi?id=114466
2258         <rdar://problem/13508513>
2259
2260         Reviewed by Simon Fraser.
2261
2262         Respect the device scale factor when creating the snapshot image.
2263         Clear the snapshot image before drawing into it.
2264         Respect SnapshotOptionsExcludeSelectionHighlighting.
2265
2266         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2267         (WebKit::imageForRect):
2268
2269 2013-04-11  Commit Queue  <rniwa@webkit.org>
2270
2271         Unreviewed, rolling out r148034, r148052, r148097, and
2272         r148194.
2273         http://trac.webkit.org/changeset/148034
2274         http://trac.webkit.org/changeset/148052
2275         http://trac.webkit.org/changeset/148097
2276         http://trac.webkit.org/changeset/148194
2277         https://bugs.webkit.org/show_bug.cgi?id=114463
2278
2279         broke mutiresolution favicons, among other things (Requested
2280         by thorton on #webkit).
2281
2282         * UIProcess/WebIconDatabase.cpp:
2283         (WebKit::WebIconDatabase::setIconDataForIconURL):
2284         * UIProcess/WebIconDatabase.h:
2285         (WebIconDatabase):
2286         * UIProcess/WebIconDatabase.messages.in:
2287         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
2288         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
2289         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2290         (WebKit::PDFPlugin::destroy):
2291
2292 2013-04-11  Anders Carlsson  <andersca@apple.com>
2293
2294         Implement StorageManager::getValues
2295         https://bugs.webkit.org/show_bug.cgi?id=114461
2296
2297         Reviewed by Beth Dakin.
2298
2299         * UIProcess/Storage/StorageManager.cpp:
2300         (WebKit::StorageManager::StorageArea::items):
2301         (WebKit::StorageManager::getValues):
2302         Return the items from the right storage area.
2303
2304 2013-04-11  Anders Carlsson  <andersca@apple.com>
2305
2306         Clean up related storage areas when a connection is destroyed
2307         https://bugs.webkit.org/show_bug.cgi?id=114459
2308
2309         Reviewed by Beth Dakin.
2310
2311         * UIProcess/Storage/StorageManager.cpp:
2312         (WebKit::StorageManager::processWillCloseConnection):
2313         Dispatch invalidateConnectionInternal on the work queue.
2314         
2315         (WebKit::StorageManager::createStorageMap):
2316         (WebKit::StorageManager::destroyStorageMap):
2317         Rename m_storageAreas to m_storageAreasByConnection.
2318
2319         (WebKit::StorageManager::invalidateConnectionInternal):
2320         Go over all known storage areas and remove this connection as a listener.
2321
2322         (WebKit::StorageManager::findStorageArea):
2323         Rename m_storageAreas to m_storageAreasByConnection.
2324
2325         * UIProcess/Storage/StorageManager.h:
2326         Rename m_storageAreas to m_storageAreasByConnection.
2327
2328 2013-04-11  Anders Carlsson  <andersca@apple.com>
2329
2330         Make StorageAreaMap dispatch session storage events
2331         https://bugs.webkit.org/show_bug.cgi?id=114454
2332
2333         Reviewed by Beth Dakin.
2334
2335         * WebProcess/Storage/StorageAreaMap.cpp:
2336         (WebKit::StorageAreaMap::dispatchStorageEvent):
2337         Depending on the storage area type, call dispatchSessionStorageEvent or dispatchLocalStorageEvent.
2338
2339         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
2340         Enumerate all the frames in our page and dispatch the event to the relevant ones.
2341
2342         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
2343         Add empty stub for now.
2344
2345 2013-04-11  Anders Carlsson  <andersca@apple.com>
2346
2347         Implement more logic in StorageAreaMap
2348         https://bugs.webkit.org/show_bug.cgi?id=114451
2349
2350         Reviewed by Alexey Proskuryakov.
2351
2352         * Platform/CoreIPC/HandleMessage.h:
2353         (CoreIPC::callMemberFunction):
2354         Add new overload.
2355
2356         * UIProcess/Storage/StorageManager.cpp:
2357         (WebKit::StorageManager::StorageArea::addListener):
2358         (WebKit::StorageManager::StorageArea::removeListener):
2359         These take storage map IDs.
2360
2361         (WebKit::StorageManager::StorageArea::setItem):
2362         Rename storageAreaID to sourceStorageAreaID.
2363
2364         (WebKit::StorageManager::StorageArea::dispatchEvents):
2365         Remove the code that would not dispatch to the source connection, there may still be storage areas interested in those events.
2366
2367         (WebKit::StorageManager::setItem):
2368         This now takes the source storage area ID.
2369
2370         (WebKit::StorageManager::findStorageArea):
2371         This takes a storage map ID.
2372
2373         * UIProcess/Storage/StorageManager.messages.in:
2374         SetItem now takes the source storage area ID as well.
2375
2376         * WebProcess/Storage/StorageAreaImpl.cpp:
2377         (WebKit::StorageAreaImpl::setItem):
2378         Pass the source frame to StorageAreaMap::setItem.
2379
2380         * WebProcess/Storage/StorageAreaMap.cpp:
2381         (WebKit::StorageAreaMap::StorageAreaMap):
2382         Send CreateStorageMap and add the object as a message receiver.
2383
2384         (WebKit::StorageAreaMap::~StorageAreaMap):
2385         Send DestroyStorageMap and remove the object as a message receiver.
2386
2387         (WebKit::StorageAreaMap::length):
2388         (WebKit::StorageAreaMap::key):
2389         (WebKit::StorageAreaMap::item):
2390         (WebKit::StorageAreaMap::contains):
2391         Load values and forward calls to the storage map.
2392
2393         (WebKit::StorageAreaMap::setItem):
2394         This now takes the source frame as well. Update the local storage map and send a SetItem message.
2395         
2396         (WebKit::StorageAreaMap::loadValuesIfNeeded):
2397         Get the values from the storage manager.
2398
2399         (WebKit::StorageAreaMap::dispatchStorageEvent):
2400         This now takes the source storage area ID.
2401
2402         * WebProcess/Storage/StorageAreaMap.messages.in:
2403         DispatchStorageEvent now takes the source storage area ID.
2404
2405 2013-04-10  Brady Eidson  <beidson@apple.com>
2406
2407         Web/Plugin process deadlock initializing async plugins.
2408         <rdar://problem/13525232> and https://bugs.webkit.org/show_bug.cgi?id=114217
2409
2410         Rubberstamped by Anders Carlsson.
2411
2412         Rollout r147953 and r147968 as we identified other causes for this.
2413
2414         * PluginProcess/WebProcessConnection.cpp:
2415         (WebKit::WebProcessConnection::createPluginAsynchronously):
2416         * WebProcess/Plugins/PluginProxy.messages.in:
2417
2418 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
2419
2420         Remove some ResourceHandle.h includes
2421         https://bugs.webkit.org/show_bug.cgi?id=114416
2422
2423         Reviewed by Ryosuke Niwa.
2424
2425         * WebProcess/Network/NetworkProcessConnection.cpp: Added an include that is now
2426         necessary.
2427
2428 2013-04-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2429
2430         [Qt] EventHandler should handle Space and BackSpace 
2431         https://bugs.webkit.org/show_bug.cgi?id=114428
2432
2433         Reviewed by Jocelyn Turcotte.
2434
2435         Remove our own handling of space and backspace.
2436
2437         * WebProcess/WebPage/qt/WebPageQt.cpp:
2438         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
2439
2440 2013-04-11  Csaba Osztrogonác  <ossy@webkit.org>
2441
2442         Unreviewed Qt buildfixes after r148147, r148148 and r148154.
2443
2444         * DerivedSources.pri:
2445         * Target.pri:
2446
2447 2013-04-10  Zan Dobersek  <zdobersek@igalia.com>
2448
2449         Unreviewed GTK build fix, fixing the WebKit2 build.
2450
2451         * GNUmakefile.list.am:
2452
2453 2013-04-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2454
2455         [WK2] Build warning in didReceiveMessage() generated by messages.py
2456         https://bugs.webkit.org/show_bug.cgi?id=112513
2457
2458         Reviewed by Anders Carlsson.
2459
2460         Legacy receiver makes -Wunused-parameter build warnings. This patch is to fix them.
2461
2462         * Scripts/webkit2/messages.py:
2463         (generate_message_handler):
2464
2465 2013-04-10  Jaehun Lim  <ljaehun.lim@samsung.com>
2466
2467         [CMAKE] Build fix after StorageArea refactoring
2468         https://bugs.webkit.org/show_bug.cgi?id=114398
2469
2470         Unreviewed build fix.
2471
2472         Change StorageAreaImpl.messages.in with StorageAreaMap.messages.in.
2473         Add StorageAreaMap.cpp in CMakeLists.txt.
2474
2475         * CMakeLists.txt:
2476
2477 2013-04-10  Anders Carlsson  <andersca@apple.com>
2478
2479         Make StorageAreaImpl a wrapper around StorageAreaMap
2480         https://bugs.webkit.org/show_bug.cgi?id=114404
2481
2482         Reviewed by Oliver Hunt.
2483
2484         Prepare for moving all the code that deals with local storage values to StorageAreaMap,
2485         and make StorageAreaImpl a dumb wrapper that simply calls through to the map.
2486
2487         * WebProcess/Storage/StorageAreaImpl.cpp:
2488         (WebKit::StorageAreaImpl::create):
2489         (WebKit::StorageAreaImpl::StorageAreaImpl):
2490         (WebKit::StorageAreaImpl::~StorageAreaImpl):
2491         (WebKit::StorageAreaImpl::storageType):
2492         (WebKit::StorageAreaImpl::length):
2493         (WebKit::StorageAreaImpl::key):
2494         (WebKit::StorageAreaImpl::getItem):
2495         (WebKit::StorageAreaImpl::setItem):
2496         (WebKit::StorageAreaImpl::contains):
2497         * WebProcess/Storage/StorageAreaImpl.h:
2498         (WebKit::StorageAreaImpl::storageAreaID):
2499         * WebProcess/Storage/StorageAreaMap.cpp:
2500         (WebKit::generateStorageMapID):
2501         (WebKit::StorageAreaMap::create):
2502         (WebKit::StorageAreaMap::StorageAreaMap):
2503         (WebKit::StorageAreaMap::storageType):
2504         (WebKit::StorageAreaMap::length):
2505         (WebKit::StorageAreaMap::key):
2506         (WebKit::StorageAreaMap::item):
2507         (WebKit::StorageAreaMap::setItem):
2508         (WebKit::StorageAreaMap::contains):
2509         (WebKit::StorageAreaMap::didSetItem):
2510         (WebKit::StorageAreaMap::dispatchStorageEvent):
2511         * WebProcess/Storage/StorageAreaMap.h:
2512         * WebProcess/Storage/StorageNamespaceImpl.cpp:
2513         (WebKit::StorageNamespaceImpl::storageArea):
2514         * WebProcess/Storage/StorageNamespaceImpl.h:
2515         (StorageNamespaceImpl):
2516
2517 2013-04-10  Anders Carlsson  <andersca@apple.com>
2518
2519         Rename StorageManager messages to refer to the StorageMap instead of the StorageArea
2520         https://bugs.webkit.org/show_bug.cgi?id=114401
2521
2522         Reviewed by Ryosuke Niwa.
2523
2524         * UIProcess/Storage/StorageManager.cpp:
2525         (WebKit::StorageManager::createStorageMap):
2526         (WebKit::StorageManager::destroyStorageMap):
2527         (WebKit::StorageManager::setItem):
2528         * UIProcess/Storage/StorageManager.h:
2529         * UIProcess/Storage/StorageManager.messages.in:
2530         * WebProcess/Storage/StorageAreaImpl.cpp:
2531         (WebKit::StorageAreaImpl::StorageAreaImpl):
2532         (WebKit::StorageAreaImpl::~StorageAreaImpl):
2533
2534 2013-04-10  Benjamin Poulain  <bpoulain@apple.com>
2535
2536         Mass remove all the empty directories
2537
2538         Rubberstamped by Ryosuke Niwa.
2539
2540         * Platform/CoreIPC/gtk: Removed.
2541         * Platform/CoreIPC/qt: Removed.
2542         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32: Removed.
2543         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64: Removed.
2544         * PluginProcess/gtk: Removed.
2545         * Shared/API/c/win: Removed.
2546         * Shared/Plugins/Netscape/win: Removed.
2547         * Shared/cg/win: Removed.
2548         * Shared/win: Removed.
2549         * UIProcess/API/C/win: Removed.
2550         * UIProcess/API/gtk/webkit: Removed.
2551         * UIProcess/Launcher/win: Removed.
2552         * UIProcess/Plugins/gtk: Removed.
2553         * UIProcess/Plugins/win: Removed.
2554         * UIProcess/texmap: Removed.
2555         * UIProcess/win: Removed.
2556         * WebProcess/Authentication/mac: Removed.
2557         * WebProcess/Cookies/efl: Removed.
2558         * WebProcess/Cookies/gtk: Removed.
2559         * WebProcess/Downloads/cf/win: Removed.
2560         * WebProcess/Downloads/cfnet: Removed.
2561         * WebProcess/Downloads/curl: Removed.
2562         * WebProcess/Downloads/efl: Removed.
2563         * WebProcess/Downloads/gtk: Removed.
2564         * WebProcess/Downloads/mac: Removed.
2565         * WebProcess/Downloads/qt: Removed.
2566         * WebProcess/Downloads/soup: Removed.
2567         * WebProcess/FullScreen/gtk: Removed.
2568         * WebProcess/FullScreen/mac: Removed.
2569         * WebProcess/FullScreen/qt: Removed.
2570         * WebProcess/FullScreen/win: Removed.
2571         * WebProcess/InjectedBundle/API/c/win: Removed.
2572         * WebProcess/InjectedBundle/win: Removed.
2573         * WebProcess/KeyValueStorage: Removed.
2574         * WebProcess/Network/CustomProtocols/mac: Removed.
2575         * WebProcess/Plugins/Netscape/gtk: Removed.
2576         * WebProcess/Plugins/Netscape/win: Removed.
2577         * WebProcess/WebCoreSupport/win: Removed.
2578         * WebProcess/WebPage/LayerTreeCoordinator: Removed.
2579         * WebProcess/WebPage/ca/mac: Removed.
2580         * WebProcess/WebPage/ca/win: Removed.
2581         * WebProcess/WebPage/win: Removed.
2582         * WebProcess/win: Removed.
2583         * qt/Resources: Removed.
2584
2585 2013-04-10  Jaehun Lim  <ljaehun.lim@samsung.com>
2586
2587         [CMAKE] Build fix after r148147, r148148
2588         https://bugs.webkit.org/show_bug.cgi?id=114395
2589
2590         Unreviewed build fix.
2591
2592         Use StorageAreaImpl, StorageNamespaceImpl instead of StorageAreaProxy, StorageNamespaceProxy.
2593
2594         * CMakeLists.txt:
2595
2596 2013-04-10  Anders Carlsson  <andersca@apple.com>
2597
2598         Add a stubbed out StorageAreaMap class
2599         https://bugs.webkit.org/show_bug.cgi?id=114392
2600
2601         Reviewed by Andreas Kling.
2602
2603         The intention is that StorageAreaMap is going to take over responsibility for storing the storage values in the
2604         web process, as well as dispatching events. A StorageAreaMap will be shared between multiple StorageAreaImpl objects,
2605         for example if multiple frames with the same origin use local storage.
2606
2607         * DerivedSources.make:
2608         * UIProcess/Storage/StorageManager.cpp:
2609         (WebKit::StorageManager::StorageArea::dispatchEvents):
2610         (WebKit::StorageManager::setItem):
2611         * WebKit2.xcodeproj/project.pbxproj:
2612         * WebProcess/Storage/StorageAreaImpl.cpp:
2613         (WebKit::StorageAreaImpl::StorageAreaImpl):
2614         (WebKit::StorageAreaImpl::~StorageAreaImpl):
2615         * WebProcess/Storage/StorageAreaMap.cpp: Added.
2616         (WebKit):
2617         (WebKit::StorageAreaMap::create):
2618         (WebKit::StorageAreaMap::StorageAreaMap):
2619         (WebKit::StorageAreaMap::~StorageAreaMap):
2620         (WebKit::StorageAreaMap::didSetItem):
2621         (WebKit::StorageAreaMap::dispatchStorageEvent):
2622         * WebProcess/Storage/StorageAreaMap.h: Added.
2623         (WebKit):
2624         (StorageAreaMap):
2625         * WebProcess/Storage/StorageAreaMap.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaImpl.messages.in.
2626
2627 2013-04-10  Anders Carlsson  <andersca@apple.com>
2628
2629         Rename StorageAreaProxy to StorageAreaImpl.
2630
2631         Rubber-stamped by Beth Dakin.
2632
2633         * DerivedSources.make:
2634         * UIProcess/Storage/StorageManager.cpp:
2635         (WebKit::StorageManager::StorageArea::dispatchEvents):
2636         (WebKit::StorageManager::setItem):
2637         * WebKit2.xcodeproj/project.pbxproj:
2638         * WebProcess/Storage/StorageAreaImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.cpp.
2639         * WebProcess/Storage/StorageAreaImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.h.
2640         * WebProcess/Storage/StorageAreaImpl.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.messages.in.
2641         * WebProcess/Storage/StorageNamespaceImpl.cpp:
2642         (WebKit::StorageNamespaceImpl::storageArea):
2643         * WebProcess/Storage/StorageNamespaceImpl.h:
2644         (WebKit):
2645         (StorageNamespaceImpl):
2646
2647 2013-04-10  Anders Carlsson  <andersca@apple.com>
2648
2649         Rename StorageNamespaceProxy to StorageNamespaceImpl.
2650
2651         Rubber-stamped by Beth Dakin.
2652
2653         * WebKit2.xcodeproj/project.pbxproj:
2654         * WebProcess/Storage/StorageAreaProxy.cpp:
2655         (WebKit::StorageAreaProxy::create):
2656         (WebKit::StorageAreaProxy::StorageAreaProxy):
2657         * WebProcess/Storage/StorageAreaProxy.h:
2658         (StorageAreaProxy):
2659         * WebProcess/Storage/StorageNamespaceImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.cpp.
2660         * WebProcess/Storage/StorageNamespaceImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.h.
2661         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2662         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
2663
2664 2013-04-10  Tim Horton  <timothy_horton@apple.com>
2665
2666         [wk2] Un-pollute TCADA methods with "PageOverlayLayerMap::iterator end"
2667         https://bugs.webkit.org/show_bug.cgi?id=114387
2668
2669         Reviewed by Simon Fraser.
2670
2671         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2672         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
2673         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
2674         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2675         (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
2676         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
2677         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
2678         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2679
2680 2013-04-10  Tim Horton  <timothy_horton@apple.com>
2681
2682         [wk2] REGRESSION: Find highlight does not update when the view is resized
2683         https://bugs.webkit.org/show_bug.cgi?id=114382
2684         <rdar://problem/13599797>
2685
2686         Reviewed by Simon Fraser.
2687
2688         Invalidate the page overlays from TiledCoreAnimationDrawingArea::updateGeometry.
2689         This will have no effect if the page overlay hasn't previously asked to be painted
2690         (as drawsContent will remain false on the layer).
2691
2692         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2693         (TiledCoreAnimationDrawingArea): Add invalidateAllPageOverlays.
2694         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2695         (WebKit::TiledCoreAnimationDrawingArea::invalidateAllPageOverlays): Factor this out of didChangeScrollOffsetForAnyFrame.
2696         (WebKit::TiledCoreAnimationDrawingArea::didChangeScrollOffsetForAnyFrame): Call invalidateAllPageOverlays.
2697         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Call invalidateAllPageOverlays.
2698
2699 2013-04-10  Beth Dakin  <bdakin@apple.com>
2700
2701         FindBanner matches are offset when the WKView has a header or footer
2702         https://bugs.webkit.org/show_bug.cgi?id=114314
2703         -and corresponding-
2704         <rdar://problem/13522434>
2705
2706         Reviewed by Simon Fraser.
2707
2708         When calculating the matching rects, also adjust to the scroll offset that is  
2709         relative to the Document.
2710         * WebProcess/WebPage/FindController.cpp:
2711         (WebKit::FindController::rectsForTextMatches):
2712
2713 2013-04-10  Tobias Mueller  <tobiasmue@gnome.org>
2714
2715         Fixed build failure in Plugin.h: FloatPoint was not in namespace WebCore
2716
2717         make[1]: *** Waiting for unfinished jobs....
2718         In file included from Source/WebKit2/PluginProcess/PluginCreationParameters.h:31:0,
2719                          from Source/WebKit2/PluginProcess/PluginCreationParameters.cpp:27:
2720         ./Source/WebKit2/WebProcess/Plugins/Plugin.h:268:58: error: 'FloatPoint' in namespace 'WebCore' does not name a type
2721         ./Source/WebKit2/WebProcess/Plugins/Plugin.h:268:77: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
2722         cc1plus: warning: unrecognized command line option "-Wno-c++11-extensions" [enabled by default]
2723         make[1]: *** [Source/WebKit2/PluginProcess/libwebkit2gtk_3_0_la-PluginCreationParameters.lo] Error 1
2724
2725         It now passes that make target.
2726
2727         https://bugs.webkit.org/show_bug.cgi?id=111862
2728
2729         Reviewed by Darin Adler.
2730
2731         * WebProcess/Plugins/Plugin.h:
2732         (WebCore): Added FloatPoint to the WebCore namespace
2733
2734 2013-04-08  Anders Carlsson  <andersca@apple.com>
2735
2736         Remove unneeded headers from FrameLoader.h
2737         https://bugs.webkit.org/show_bug.cgi?id=114223
2738
2739         Reviewed by Geoffrey Garen.
2740
2741         Include HistoryController.h from WebCore.
2742
2743         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
2744         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2745         * WebProcess/WebPage/WebPage.cpp:
2746
2747 2013-04-09  Geoffrey Garen  <ggaren@apple.com>
2748
2749         Removed bitrotted TimeoutChecker code
2750         https://bugs.webkit.org/show_bug.cgi?id=114336
2751
2752         Reviewed by Alexey Proskuryakov.
2753
2754         This mechanism hasn't worked for a while.
2755
2756         MarkL is working on a new version of this feature with a distinct
2757         implementation.
2758
2759         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2760         (WebKit::NPJSObject::construct):
2761         (WebKit::NPJSObject::invoke):
2762         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2763         (WebKit::NPRuntimeObjectMap::evaluate):
2764
2765 2013-04-09  Mark Rowe  <mrowe@apple.com>
2766
2767         <rdar://problem/13617144> WKNavigationData needs to expose the destination of the navigation
2768
2769         Introduce WKNavigationDataCopyNavigationDestinationURL to access the destination of the navigation.
2770
2771         Reviewed by Dan Bernstein.
2772
2773         * UIProcess/API/C/WKNavigationData.cpp:
2774         (WKNavigationDataCopyURL): Add a note about returning the URL from the original request for sake of
2775         backwards-compatibility.
2776         (WKNavigationDataCopyNavigationDestinationURL): Return the URL from our underlying WebNavigationDataStore.
2777         * UIProcess/API/C/WKNavigationData.h:
2778         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2779         (WebKit::WebFrameLoaderClient::updateGlobalHistory): Store the current URL in to the WebNavigationDataStore
2780         object. WKNavigationData can retrieve the value that we were previously storing here via the originalRequest.
2781
2782 2013-04-09  Mark Rowe  <mrowe@apple.com>
2783
2784         <rdar://problem/13617104> WKPageCopySessionState needs to provide more context to the filter callback
2785
2786         Introduce a new value type for WKPageSessionStateFilterCallback that represents the passing
2787         of whole WKBackForwardListItemRefs to the filter callback. This allows clients to consider
2788         more than the original URL of the item when filtering entries from the session state.
2789
2790         Reviewed by Darin Adler.
2791
2792         * UIProcess/API/C/WKPage.cpp:
2793         (WKPageGetSessionBackForwardListItemValueType): Return a static string representing our new value type.
2794         * UIProcess/API/C/WKPage.h:
2795         * UIProcess/cf/WebBackForwardListCF.cpp:
2796         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Call the filter function with each of the
2797         possible value types in turn, respecting the first false value, if any, that is returned.
2798
2799 2013-04-10  Anton Obzhirov  <a.obzhirov@samsung.com>
2800
2801         [GTK] Add support for Page Visibility
2802         https://bugs.webkit.org/show_bug.cgi?id=97324
2803
2804         Reviewed by Sam Weinig.
2805
2806         Added new unittest to test page visibility using GTK Widget visibility API.
2807
2808         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2809         (testWebViewPageVisibility):
2810         (beforeAll):
2811         * UIProcess/API/gtk/tests/WebViewTest.cpp:
2812         (WebViewTest::showInWindow):
2813         * UIProcess/API/gtk/tests/WebViewTest.h:
2814
2815 2013-04-10  Zan Dobersek  <zdobersek@igalia.com>
2816
2817         REGRESSION (r146518): WebKit2APITests/TestInspector is failing
2818         https://bugs.webkit.org/show_bug.cgi?id=113281
2819
2820         Reviewed by Darin Adler.
2821
2822         Changes to the WebInspectorProxy opening processing in r146518 caused the change in how the GTK-specific
2823         WebInspectorProxy code operates, specifically the 'bring-to-front' signal is not emitted anymore when opening the
2824         inspector due to the WebInspectorProxy::bringToFront method now only bringing the inspector window to front if it exists
2825         and opening it (and thus unable to bring it to front) otherwise.
2826
2827         Closing of the inspector through the didClose method is now done immediately after sending the WebInspector::Close()
2828         message to the WebProcess rather than waiting for the WebProcess to communicate back the order of closing. Due to this
2829         the relevant code in the test cases had to be changed to not run the loop but rather just check that the closing was
2830         successful.
2831
2832         (InspectorTest::InspectorTest): Remove the initialization of the now redundant m_quitOnBringToFront member variable.
2833         (InspectorTest::bringToFront): Quit the loop without checking the removed member variable.
2834         (InspectorTest::closed): Do not quit the loop as it is not run anymore.
2835         (InspectorTest::showIdle): A helper method that asynchronously calls the webkit_web_inspector_show method, removing some
2836         unnecessary complexity about under what exact circumstances to quit the loop in open-window/bring-to-front callbacks.
2837         (InspectorTest::show): Replaces the showAndWaitUntilFinished method, adding an idle invocation of the showIdle helper
2838         method and running the loop.
2839         (InspectorTest::close): Formerly closeAndWaitUntilClosed, now does not run the loop anymore as there's no need for it.
2840         (testInspectorDefault): Only the window opening event is now expected upon showing the inspector for the first time.
2841         Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of
2842         InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished.
2843         (CustomInspectorTest::destroyWindow): Formerly destroyWindowAndWaitUntilClosed, the closing is not asynchronous anymore
2844         so the loop is not run.
2845         (testInspectorManualAttachDetach): Only the window opening event is now expected upon showing the inspector for the first time.
2846         Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of
2847         InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished.
2848         (testInspectorCustomContainerDestroyed): Adjusting callsites to use InspectorTest::show and CustomInspectorTest::destroyWindow
2849         instead of InspectorTest::showAndWaitUntilFinished and CustomInspectorTest::destroyWindowAndWaitUntilClosed.
2850         * UIProcess/WebInspectorProxy.cpp:
2851         (WebKit::WebInspectorProxy::show): When showing a connected WebInspectorProxy, call the bringToFront method which will
2852         open the inspector if it's not yet visible or bring it to the front otherwise. 
2853
2854 2013-04-10  Zan Dobersek  <zandobersek@gmail.com>
2855
2856         [GTK][WK2] Implement WebInspectorProxy::platformInspectedWindowWidth
2857         https://bugs.webkit.org/show_bug.cgi?id=113498
2858
2859         Reviewed by Martin Robinson.
2860
2861         The method was introduced in r147004.
2862
2863         * UIProcess/API/gtk/tests/TestInspector.cpp: Specify the gMinimumAttachedInspectorWidth variable, reflecting the value
2864         of WebInspectorProxy::minimumAttachedWidth. Use it as the width to which the inspected view should be resized in
2865         InspectorTest::resizeViewAndAttach.
2866         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
2867         (WebKit::WebInspectorProxy::platformInspectedWindowHeight): Use the gtk_widget_get_allocated_height method to return the
2868         widget height.
2869         (WebKit::WebInspectorProxy::platformInspectedWindowWidth): Newly implemented, similarly uses the
2870         gtk_widget_get_allocated_width method to return the widget width.
2871
2872 2013-04-09  Antoine Quint  <graouts@apple.com>
2873
2874         WKFrameIsDisplayingMarkupDocument should return true for Web Archives
2875         https://bugs.webkit.org/show_bug.cgi?id=114291
2876
2877         Reviewed by Dean Jackson.
2878
2879         Also return true for the Web Archive MIME type since a Web Archive
2880         is displaying a markup document by nature.
2881
2882         * UIProcess/WebFrameProxy.cpp:
2883         (WebKit::WebFrameProxy::isDisplayingMarkupDocument):
2884
2885 2013-04-09  Anders Carlsson  <andersca@apple.com>
2886
2887         REGRESSION (r147454): Youtube annotation links to new window broken
2888         https://bugs.webkit.org/show_bug.cgi?id=114242
2889         <rdar://problem/13609940>
2890
2891         Reviewed by Beth Dakin.
2892
2893         Set the current user gesture to "DefinitelyProcessingNewUserGesture" if popups are allowed.
2894
2895         * WebProcess/Plugins/PluginView.cpp:
2896         (WebKit::PluginView::performFrameLoadURLRequest):
2897
2898 2013-04-09  Anders Carlsson  <andersca@apple.com>
2899
2900         If we fail to decode a message name, pass the message length as the name
2901         https://bugs.webkit.org/show_bug.cgi?id=114305
2902         <rdar://problem/13605703>
2903
2904         Reviewed by Sam Weinig.
2905
2906         * Platform/CoreIPC/ArgumentDecoder.h:
2907         (CoreIPC::ArgumentDecoder::length):
2908         * Platform/CoreIPC/Connection.cpp:
2909         (CoreIPC::Connection::processIncomingMessage):
2910
2911 2013-04-08  Dean Jackson  <dino@apple.com>
2912
2913         Don't create another plugin process for restarted plugins
2914         https://bugs.webkit.org/show_bug.cgi?id=114233
2915
2916         Reviewed by Geoff Garen.
2917
2918         A snapshotting plugin starts in a separate process from
2919         regular plugins. This can be a little confusing to users
2920         because they might see two plugin processes. We can set
2921         the minimum life and timeout on the snapshotting process
2922         to much smaller values, since the process doesn't need
2923         to live that long. This will reduce some potential
2924         confusion. Also, since there is another plugin process
2925         running real plugins, it should be paged in if it needs
2926         to restart.
2927
2928         There was, however, a bug in the process management. A
2929         restarted plugin received a special PluginProcess::Type,
2930         so that it could cross fade into the page nicely. This
2931         caused it to start a *third* plugin process. Instead
2932         mark a restarted flag directly on the PluginProxy and
2933         revert back to two process types.
2934
2935         * PluginProcess/PluginProcess.h: Remove TypeRestartedProcess.
2936
2937         * UIProcess/Plugins/PluginProcessProxy.cpp: Add two new
2938             timeout values for snapshotting processes.
2939         (WebKit::PluginProcessProxy::didFinishLaunching): Chose which
2940             of the timeout pairs to use.
2941
2942         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
2943         (WebKit::PluginProxy::pluginLayer): Don't look at the process type, instead
2944             look at the process flag to see if we are restarted.
2945         * WebProcess/Plugins/PluginProxy.cpp:
2946         (WebKit::PluginProxy::create): Copy the new flag into constructor.
2947         (WebKit::PluginProxy::PluginProxy): Remember the flag.
2948         * WebProcess/Plugins/PluginProxy.h: Add a new m_restartedProcess flag.
2949
2950         * WebProcess/WebPage/WebPage.cpp:
2951         (WebKit::WebPage::createPlugin): When we are creating the proxy, separate
2952             the concept of snapshotting and restarting.
2953
2954 2013-04-09  Tim Horton  <timothy_horton@apple.com>
2955
2956         [wk2] IconDatabase images should be decoded in the WebProcess
2957         https://bugs.webkit.org/show_bug.cgi?id=112524
2958         <rdar://problem/10133914>
2959
2960         Reviewed by Oliver Hunt.
2961
2962         In the interests of keeping decoding of data coming in from the greater Internet
2963         in the WebProcess, move decoding of favicons from the UIProcess to the WebProcess.
2964
2965         * UIProcess/WebIconDatabase.cpp:
2966         (WebKit::WebIconDatabase::setIconBitmapForIconURL):
2967         Receive a ShareableBitmap handle from the WebProcess instead of a DataReference.
2968         Use the new setIconBitmapForIconURL IconDatabase method.
2969
2970         * UIProcess/WebIconDatabase.h:
2971         (WebIconDatabase):
2972         Rename setIconDataForIconURL to setIconBitmapForIconURL.
2973
2974         * UIProcess/WebIconDatabase.messages.in: Ditto.
2975
2976         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
2977         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
2978         In the WebProcess, decode the incoming icon and draw it into a ShareableBitmap.
2979
2980 2013-04-09  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2981
2982         [EFL] Declare TEST_THEME_DIR in a single place.
2983         https://bugs.webkit.org/show_bug.cgi?id=114285
2984
2985         Reviewed by Anders Carlsson.
2986
2987         * PlatformEfl.cmake: Remove definition of `TEST_THEME_DIR', which is
2988         now defined in OptionsEfl.cmake.
2989
2990 2013-04-09  Rafael Brandao  <rafael.lobo@openbossa.org>
2991
2992         [CoordinatedGraphics] serviceScriptedAnimations expects time in seconds
2993         https://bugs.webkit.org/show_bug.cgi?id=112582
2994
2995         Reviewed by Andreas Kling.
2996
2997         We've been exposing different time unit for requestAnimationFrame because
2998         of wrong conversion before serviceScriptedAnimations function calls.
2999         Fixed it to use seconds instead of milliseconds.
3000
3001         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3002         (WebKit::CoordinatedLayerTreeHost::syncDisplayState): Remove unnecessary conversion.
3003
3004 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
3005
3006         [Qt][WK2] Remove obsolete QtWebPageFindClient forward declaration from qquickwebview_p.h.
3007         https://bugs.webkit.org/show_bug.cgi?id=114284
3008
3009         Reviewed by Andreas Kling.
3010
3011         The class QtWebPageFindClient was removed in r142073 when the functionality
3012         was folded into QQuickWebViewPrivate.
3013
3014         * UIProcess/API/qt/qquickwebview_p.h:
3015         (WebKit):
3016
3017 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
3018
3019         Fix GTK WebKit2 build after r148005.
3020         https://bugs.webkit.org/show_bug.cgi?id=114270
3021
3022         Reviewed by Andreas Kling.
3023
3024         Fix GTK build break that went through the buildbot undetected.
3025
3026         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
3027         (webkit_file_chooser_request_get_selected_files):
3028
3029 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
3030
3031         [Qt][WK2] Remove direct references to WebPageProxy from QQuickWebPage.
3032         https://bugs.webkit.org/show_bug.cgi?id=112850
3033
3034         Reviewed by Andreas Kling.
3035
3036         Removes direct references to WebPageProxy from QQuickWebPage and prepares the
3037         class for the move to QRawWebView. The access to the device scale factor and
3038         CoordinatedGraphicsScene is provided through QQuickWebViewPrivate, and therefore
3039         accessors to these properties are temporarily added. Eventually, this access will
3040         be provided through QRawWebView when the move is complete.
3041
3042         This also moves the pointer to QtWebPageEventHandler from QQuickWebPagePrivate
3043         to QQuickWebViewPrivate as it is mainly used from there.
3044
3045         * UIProcess/API/qt/qquickwebpage.cpp:
3046         (QQuickWebPagePrivate::QQuickWebPagePrivate):
3047         (QQuickWebPagePrivate::paint):
3048         (QQuickWebPage::updatePaintNode):
3049         * UIProcess/API/qt/qquickwebpage_p.h:
3050         * UIProcess/API/qt/qquickwebpage_p_p.h:
3051         (QQuickWebPagePrivate):
3052         * UIProcess/API/qt/qquickwebview.cpp:
3053         (QQuickWebViewPrivate::initialize):
3054         (QQuickWebViewPrivate::handleMouseEvent):
3055         (QQuickWebViewPrivate::processDidCrash):
3056         (QQuickWebViewPrivate::coordinatedGraphicsScene):
3057         (QQuickWebViewPrivate::deviceScaleFactor):
3058         (QQuickWebViewPrivate::setIntrinsicDeviceScaleFactor):
3059         (QQuickWebViewFlickablePrivate::onComponentComplete):
3060         (QQuickWebView::keyPressEvent):
3061         (QQuickWebView::keyReleaseEvent):
3062         (QQuickWebView::inputMethodEvent):
3063         (QQuickWebView::focusInEvent):
3064         (QQuickWebView::itemChange):
3065         (QQuickWebView::touchEvent):
3066         (QQuickWebView::wheelEvent):
3067         (QQuickWebView::hoverEnterEvent):
3068         (QQuickWebView::hoverMoveEvent):
3069         (QQuickWebView::hoverLeaveEvent):
3070         (QQuickWebView::dragMoveEvent):
3071         (QQuickWebView::dragEnterEvent):
3072         (QQuickWebView::dragLeaveEvent):
3073         (QQuickWebView::dropEvent):
3074         * UIProcess/API/qt/qquickwebview_p_p.h:
3075         (WebCore):
3076         (WebKit):
3077         (QQuickWebViewPrivate):
3078
3079 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
3080
3081         [Qt][WK2] Use C API to enable Navigator Qt Object.
3082         https://bugs.webkit.org/show_bug.cgi?id=112810
3083
3084         Reviewed by Andreas Kling.
3085
3086         Replace the direct reference to the WebPageProxy with use of
3087         C API.
3088
3089         * UIProcess/API/qt/qquickwebview.cpp:
3090         (QQuickWebViewPrivate::setNavigatorQtObjectEnabled):
3091
3092 2013-04-09  Michael Brüning  <michael.bruning@digia.com>
3093
3094         [WK2] Add C API to copy selected files from WebOpenPanelParameters.
3095         https://bugs.webkit.org/show_bug.cgi?id=112339
3096
3097         Reviewed by Andreas Kling.
3098
3099         Replaces the existing WebOpenPanelParameters::selectedFileNames() method
3100         to return a copy of the selected file names and exposes it through the
3101         C API. This is done in order to reduce the direct use of WebKit2 internal
3102         classes. The implementation is very similar to the one in 
3103         WebOpenPanelParameters::acceptMIMETypes().
3104
3105         This also updates the GTK port, which is the other user of selectedFileNames.
3106
3107         * Shared/WebOpenPanelParameters.cpp:
3108         (WebKit::WebOpenPanelParameters::selectedFileNames):
3109         (WebKit):
3110         * Shared/WebOpenPanelParameters.h:
3111         (WebOpenPanelParameters):
3112         * UIProcess/API/C/WKOpenPanelParameters.cpp:
3113         (WKOpenPanelParametersCopySelectedFileNames):
3114         * UIProcess/API/C/WKOpenPanelParameters.h:
3115         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
3116         (webkit_file_chooser_request_get_selected_files):
3117         * UIProcess/qt/QtWebPageUIClient.cpp:
3118         (WebKit::QtWebPageUIClient::runOpenPanel):
3119
3120 2013-04-09  Jinwoo Song  <jinwoo7.song@samsung.com>
3121
3122         [WK2] Remove build warnings for unused parameters
3123         https://bugs.webkit.org/show_bug.cgi?id=114234
3124
3125         Reviewed by Andreas Kling.
3126
3127         Fix build warnings -Wunused-parameter.
3128
3129         * UIProcess/Storage/StorageManager.cpp:
3130         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
3131         * UIProcess/WebContext.cpp:
3132         (WebKit::WebContext::requestNetworkingStatistics):
3133         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
3134         * WebProcess/Storage/StorageAreaProxy.cpp:
3135         (WebKit::StorageAreaProxy::removeItem):
3136         (WebKit::StorageAreaProxy::clear):
3137         (WebKit::StorageAreaProxy::dispatchSessionStorageEvent):
3138         (WebKit::StorageAreaProxy::dispatchLocalStorageEvent):
3139         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3140         (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay):
3141         * WebProcess/WebPage/WebPage.cpp:
3142         (WebKit::WebPage::didFinishLoad):
3143         * WebProcess/WebProcess.cpp:
3144         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
3145
3146 2013-04-09  Thiago Marcos P. Santos  <thiago.santos@intel.com>
3147
3148         [WK2] Drop WebProcess capabilities on Linux using seccomp filters
3149         https://bugs.webkit.org/show_bug.cgi?id=89875
3150
3151         Reviewed by Maciej Stachowiak.
3152
3153         Introduce the foundations of the SeccompFilter-based sandbox. The
3154         hardening of the WebProcess (and potentially PluginProcess, etc)
3155         works by a combination of the two things:
3156
3157         - Blocking syscalls that are not used, reducing the size of the attack
3158         surface.
3159         - Trapping sensitive syscalls and delegating the execution of these
3160         syscalls to a separated trusted process subject to a set of policies.
3161
3162         The initial implementation traps the open()-family of syscalls on WebKit
3163         EFL's and Qt's WebProcess, but it could be easily used by any Linux port,
3164         since the code is suppose to be Linux-compliant. The list of syscalls handled
3165         by the broker process should definitely grow as we mature the
3166         implementation. Other syscalls needs to be handled to get this sandbox
3167         fully functional, like unlink(), mkdir(), etc.
3168
3169         The broker process should be initialized as early as possible on the
3170         sandboxed process main() function, because it only does a fork(), which
3171         is cheap on Linux. That also aims to minimize the resident memory footprint
3172         of the broker process.
3173
3174         Opening of files for upload and saving downloads is not supported yet,
3175         since it should be handled to the UIProcess in a similar fashion as
3176         the Mac port does.
3177
3178         * PlatformEfl.cmake:
3179         * Shared/linux/SeccompFilters/OpenSyscall.cpp: Added.
3180         (WebKit):
3181         (WebKit::OpenSyscall::createFromOpenatContext):
3182         (WebKit::OpenSyscall::createFromCreatContext):
3183         (WebKit::OpenSyscall::OpenSyscall):
3184         (WebKit::OpenSyscall::setResult):
3185         (WebKit::OpenSyscall::execute):
3186         (WebKit::OpenSyscall::encode):
3187         (WebKit::OpenSyscall::decode):
3188         (WebKit::OpenSyscallResult::OpenSyscallResult):
3189         (WebKit::OpenSyscallResult::~OpenSyscallResult):
3190         (WebKit::OpenSyscallResult::encode):
3191         (WebKit::OpenSyscallResult::decode):
3192         * Shared/linux/SeccompFilters/OpenSyscall.h: Added.
3193         (CoreIPC):
3194         (WebKit):
3195         (OpenSyscall):
3196         (WebKit::OpenSyscall::setPath):
3197         (WebKit::OpenSyscall::setFlags):
3198         (WebKit::OpenSyscall::setMode):
3199         (OpenSyscallResult):
3200         (WebKit::OpenSyscallResult::fd):
3201         (WebKit::OpenSyscallResult::errorNumber):
3202         * Shared/linux/SeccompFilters/SeccompBroker.cpp: Added.
3203         (WebKit):
3204         (SeccompBrokerClient):
3205         (WebKit::sendMessage):
3206         (WebKit::receiveMessage):
3207         (WebKit::SIGSYSHandler):
3208         (WebKit::registerSIGSYSHandler):
3209         (WebKit::SeccompBrokerClient::shared):
3210         (WebKit::SeccompBrokerClient::SeccompBrokerClient):
3211         (WebKit::SeccompBrokerClient::~SeccompBrokerClient):
3212         (WebKit::SeccompBrokerClient::dispatch):
3213         (WebKit::SeccompBrokerClient::handleIfOpeningOnlineCPUCount):
3214         (WebKit::SeccompBroker::launchProcess):
3215         (WebKit::SeccompBroker::initialize):
3216         (WebKit::SeccompBroker::runLoop):
3217         * Shared/linux/SeccompFilters/SeccompBroker.h: Added.
3218         (WebKit):
3219         (SeccompBroker):
3220         (WebKit::SeccompBroker::setSyscallPolicy):
3221         (WebKit::SeccompBroker::SeccompBroker):
3222         * Shared/linux/SeccompFilters/SeccompFilters.cpp: Added.
3223         (WebKit):
3224         (WebKit::SeccompFilters::SeccompFilters):
3225         (WebKit::SeccompFilters::~SeccompFilters):
3226         (WebKit::SeccompFilters::addRule):
3227         (WebKit::SeccompFilters::initialize):
3228         * Shared/linux/SeccompFilters/SeccompFilters.h: Added.
3229         (WebKit):
3230         (SeccompFilters):
3231         (WebKit::SeccompFilters::context):
3232         (WebKit::SeccompFilters::platformInitialize):
3233         * Shared/linux/SeccompFilters/SigactionSyscall.cpp: Added.
3234         (WebKit):
3235         (WebKit::SigactionSyscall::createFromContext):
3236         * Shared/linux/SeccompFilters/SigactionSyscall.h: Added.
3237         (WebKit):
3238         (SigactionSyscall):
3239         * Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp: Added.
3240         (WebKit):
3241         (WebKit::SigprocmaskSyscall::createFromContext):
3242         * Shared/linux/SeccompFilters/SigprocmaskSyscall.h: Added.
3243         (WebKit):
3244         (SigprocmaskSyscall):
3245         * Shared/linux/SeccompFilters/Syscall.cpp: Added.
3246         (WebKit):
3247         (WebKit::Syscall::createFromContext):
3248         (WebKit::Syscall::createFromDecoder):
3249         (WebKit::Syscall::Syscall):
3250         (WebKit::SyscallResult::createFromDecoder):
3251         (WebKit::SyscallResult::SyscallResult):
3252         * Shared/linux/SeccompFilters/Syscall.h: Added.
3253         (CoreIPC):
3254         (WebKit):
3255         (Syscall):
3256         (WebKit::Syscall::~Syscall):
3257         (WebKit::Syscall::type):
3258         (WebKit::Syscall::setContext):
3259         (WebKit::Syscall::context):
3260         (SyscallResult):
3261         (WebKit::SyscallResult::~SyscallResult):
3262         (WebKit::SyscallResult::type):
3263         * Shared/linux/SeccompFilters/SyscallPolicy.cpp: Added.
3264         (WebKit):
3265         (WebKit::removeTrailingSlash):
3266         (WebKit::SyscallPolicy::hasPermissionForPath):
3267         (WebKit::SyscallPolicy::addFilePermission):
3268         (WebKit::SyscallPolicy::addDirectoryPermission):
3269         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
3270         * Shared/linux/SeccompFilters/SyscallPolicy.h: Added.
3271         (WebKit):
3272         (SyscallPolicy):
3273         * Target.pri:
3274         * WebKit2.pri:
3275         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: Added.
3276         (WebKit):
3277         (WebKit::SeccompFiltersWebProcessEfl::SeccompFiltersWebProcessEfl):
3278         (WebKit::SeccompFiltersWebProcessEfl::platformInitialize):
3279         * WebProcess/efl/SeccompFiltersWebProcessEfl.h: Added.
3280         (WebKit):
3281         (SeccompFiltersWebProcessEfl):
3282         * WebProcess/qt/SeccompFiltersWebProcessQt.cpp: Added.
3283         (WebKit):
3284         (WebKit::SeccompFiltersWebProcessQt::SeccompFiltersWebProcessQt):
3285         (WebKit::SeccompFiltersWebProcessQt::platformInitialize):
3286         * WebProcess/qt/SeccompFiltersWebProcessQt.h: Added.
3287         (WebKit):
3288         (SeccompFiltersWebProcessQt):
3289         * WebProcess/qt/WebProcessQt.cpp:
3290         (WebKit::WebProcess::platformInitializeWebProcess):
3291         * WebProcess/soup/WebProcessSoup.cpp:
3292         (WebKit::WebProcess::platformInitializeWebProcess):
3293
3294 2013-04-08  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3295
3296         [WK2][EFL] Mark not implemented methods in TextCheckerEfl.
3297         https://bugs.webkit.org/show_bug.cgi?id=112261
3298
3299         Reviewed by Anders Carlsson.
3300
3301         There's no need to call client's methods in TextCheckerEfl.cpp if they are not
3302         implemented. Mark them as not implemented until we provide proper implementation.
3303
3304         * UIProcess/efl/TextCheckerEfl.cpp:
3305         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
3306         (WebKit::TextChecker::setGrammarCheckingEnabled):
3307         (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
3308         (WebKit::TextChecker::checkGrammarOfString):
3309         (WebKit::TextChecker::spellingUIIsShowing):
3310         (WebKit::TextChecker::toggleSpellingUIIsShowing):
3311         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
3312         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
3313
3314 2013-04-08  Benjamin Poulain  <benjamin@webkit.org>
3315
3316         Remove HTML Notification
3317         https://bugs.webkit.org/show_bug.cgi?id=114231
3318
3319         Reviewed by Ryosuke Niwa.
3320
3321         * Configurations/FeatureDefines.xcconfig:
3322
3323 2013-04-08  Tim Horton  <timothy_horton@apple.com>
3324
3325         Don't run primary plugin detection if plugin snapshotting is off
3326         https://bugs.webkit.org/show_bug.cgi?id=114222
3327         <rdar://problem/13603988>
3328
3329         Reviewed by Dean Jackson.
3330
3331         * WebProcess/WebPage/WebPage.cpp:
3332         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
3333
3334 2013-04-08  Patrick Gansterer  <paroga@webkit.org>
3335
3336         [WIN] Remove WebKit2 source code
3337         https://bugs.webkit.org/show_bug.cgi?id=114096
3338
3339         Reviewed by Anders Carlsson.
3340
3341         Remove conditional includes for the windows platform.
3342
3343         * Shared/API/c/WKBase.h:
3344         * UIProcess/API/C/WKAPICast.h:
3345
3346 2013-04-08  Geoffrey Garen  <ggaren@apple.com>
3347
3348         Stop #include-ing all of JavaScriptCore in every DOM-related file
3349         https://bugs.webkit.org/show_bug.cgi?id=114220
3350
3351         Reviewed by Sam Weinig.
3352
3353         * Shared/WebCoreArgumentCoders.cpp:
3354         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
3355
3356 2013-04-08  Brady Eidson  <beidson@apple.com>
3357
3358         Web/Plugin process deadlock initializing async plugins.
3359         <rdar://problem/13525232> and https://bugs.webkit.org/show_bug.cgi?id=114217
3360
3361         Reviewed by Anders Carlsson.
3362
3363        The "Async initialization complete" messages probably don't have to be synchronous.
3364
3365         * PluginProcess/WebProcessConnection.cpp:
3366         (WebKit::WebProcessConnection::createPluginAsynchronously): Notify of initialization success/failure asynchronously.
3367         * WebProcess/Plugins/PluginProxy.messages.in: 
3368
3369 2013-04-08  Anders Carlsson  <andersca@apple.com>
3370
3371         Add an async version of ResourceHandle::didReceiveResponse
3372         https://bugs.webkit.org/show_bug.cgi?id=114215
3373
3374         Reviewed by Sam Weinig.
3375
3376         * NetworkProcess/NetworkResourceLoader.cpp:
3377         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
3378         Send the message and then call continueDidReceiveResponse.
3379
3380 2013-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3381
3382         [GTK] Build Platform as a separate static library
3383         https://bugs.webkit.org/show_bug.cgi?id=114164
3384
3385         Reviewed by Martin Robinson.
3386
3387         This way we reduce a bit the amount of files compiled twice
3388         because of the plugin process.
3389
3390         * GNUmakefile.am:
3391         * GNUmakefile.list.am:
3392         * Platform/gtk/WorkQueueGtk.cpp: Remove unused header.
3393         * Platform/unix/SharedMemoryUnix.cpp: Ditto.
3394
3395 2013-04-08  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3396
3397         [WK2][EFL] WebView: Add callbacks to the WKViewClient to remove direct access to page viewport controller
3398         https://bugs.webkit.org/show_bug.cgi?id=110741
3399
3400         Reviewed by Anders Carlsson.
3401
3402         Provided WKViewClient with didRequestScroll, didRenderFrame and didCompletePageTransition
3403         callbacks so that direct access from WebView to page viewport controller is avoided.
3404
3405         Implementation of callbacks is also added to keep the current EFL WK2 functionality.
3406
3407         * UIProcess/API/C/efl/WKView.h:
3408         * UIProcess/efl/PageLoadClientEfl.cpp:
3409         (WebKit::PageLoadClientEfl::didCommitLoadForFrame):
3410
3411             Moved here code from deleted WebView::didCommitLoad.
3412
3413         * UIProcess/efl/ViewClientEfl.cpp:
3414         (WebKit::ViewClientEfl::didChangeContentsPosition):
3415         (WebKit):
3416         (WebKit::ViewClientEfl::didRenderFrame):
3417         (WebKit::ViewClientEfl::didCompletePageTransition):
3418         (WebKit::ViewClientEfl::ViewClientEfl):
3419         * UIProcess/efl/ViewClientEfl.h:
3420         (ViewClientEfl):
3421         * UIProcess/efl/WebView.cpp:
3422         (WebKit::WebView::pageDidRequestScroll):
3423         (WebKit::WebView::didRenderFrame):
3424         (WebKit::WebView::pageTransitionViewportReady):
3425         * UIProcess/efl/WebViewClient.cpp:
3426         (WebKit::WebViewClient::didChangeContentsPosition):
3427         (WebKit):
3428         (WebKit::WebViewClient::didRenderFrame):
3429         (WebKit::WebViewClient::didCompletePageTransition):
3430         * UIProcess/efl/WebViewClient.h:
3431         (WebCore):
3432
3433 2013-04-08  Andras Becsi  <andras.becsi@digia.com>
3434
3435         [Qt][WK2] WebView's interactive property is not fully respected
3436         https://bugs.webkit.org/show_bug.cgi?id=113066
3437
3438         Reviewed by Jocelyn Turcotte.
3439
3440         WK2 sign-off by Benjamin Poulain.
3441
3442         The QML WebView inherits the "interactive" property from Flickable
3443         which is true by default, and disables the interaction with the
3444         Flickable if set to false.
3445         Resulting from the design of the WebView panning and flicking is
3446         disabled by Flickable but to be consistent we also need to disable
3447         double-tap gestures and pinch gestures since they would trigger
3448         scale and position changes.
3449
3450         * UIProcess/qt/PageViewportControllerClientQt.cpp:
3451         (WebKit::PageViewportControllerClientQt::pinchGestureStarted):
3452         (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate):
3453         (WebKit::PageViewportControllerClientQt::pinchGestureEnded):
3454         * UIProcess/qt/QtWebPageEventHandler.cpp:
3455         (WebKit::QtWebPageEventHandler::handleDoubleTapEvent):
3456
3457 2013-04-07  David Kilzer  <ddkilzer@apple.com>
3458
3459         Remove the rest of SVG_DOM_OBJC_BINDINGS
3460         <http://webkit.org/b/114112>
3461
3462         Reviewed by Geoffrey Garen.
3463
3464         * Configurations/FeatureDefines.xcconfig:
3465         - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro.
3466
3467 2013-04-06  Geoffrey Garen  <ggaren@apple.com>
3468
3469         Try to fix the WebKit2 build.
3470
3471         * NetworkProcess/NetworkResourceLoader.cpp:
3472         (WebKit):
3473         * NetworkProcess/NetworkResourceLoader.h:
3474         (NetworkResourceLoader): Removed a defunct function.
3475
3476 2013-04-05  Ed Bartosh  <bartosh@gmail.com>
3477
3478         [WK2] --no-tiled-backing-store build fails because FloatPoint is not declared
3479         https://bugs.webkit.org/show_bug.cgi?id=113618
3480
3481         Reviewed by Simon Fraser.
3482
3483         * WebProcess/Plugins/Plugin.h: Forward declared FloatPoint
3484
3485 2013-04-05  Geoffrey Garen  <ggaren@apple.com>
3486
3487         Made USE(JSC) unconditional
3488         https://bugs.webkit.org/show_bug.cgi?id=114058
3489
3490         Reviewed by Anders Carlsson.
3491
3492         * Shared/linux/WebMemorySamplerLinux.cpp:
3493         (WebKit::WebMemorySampler::sampleWebKit):
3494