Resizing Cappuccino is very laggy on WebKit since Safari 5.1
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-03-07  Andreas Kling  <akling@apple.com>
2
3         Resizing Cappuccino is very laggy on WebKit since Safari 5.1
4         <http://webkit.org/b/71354>
5         <rdar://problem/10565998>
6
7         Reviewed by Anders Carlsson.
8
9         On Mac, we already cache the window rect through the WindowAndViewFramesChanged
10         message, so simply return that in WebChromeClient::windowRect() instead of
11         sending a synchronous query to the UIProcess.
12
13         If a programmatic resize is requested, we bypass the cache until we've received
14         a new WindowAndViewFramesChanged message. This compromise allows us to return
15         cached rects in the common case, and handles creating a new window and immediately
16         resizing it gracefully.
17
18         Changed WindowAndViewFramesChanged to pass FloatRect/FloatPoint rather than
19         IntRect/IntPoint to match the ChromeClient::windowRect() return type.
20
21         * UIProcess/API/mac/WKView.mm:
22         (-[WKView _updateWindowAndViewFrames]):
23         * UIProcess/WebPageProxy.h:
24         (WebPageProxy):
25         * UIProcess/mac/WebPageProxyMac.mm:
26         (WebKit::WebPageProxy::windowAndViewFramesChanged):
27         * WebProcess/Plugins/PluginView.cpp:
28         (WebKit::PluginView::windowAndViewFramesChanged):
29         * WebProcess/Plugins/PluginView.h:
30         (PluginView):
31         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
32         (WebKit::WebChromeClient::setWindowRect):
33         (WebKit::WebChromeClient::windowRect):
34         * WebProcess/WebPage/WebPage.cpp:
35         (WebKit::WebPage::WebPage):
36         (WebKit::WebPage::sendSetWindowFrame):
37         (WebKit::WebPage::windowAndViewFramesChanged):
38         * WebProcess/WebPage/WebPage.h:
39         (WebPage):
40         (WebKit::WebPage::windowFrameInScreenCoordinates):
41         (WebKit::WebPage::viewFrameInWindowCoordinates):
42         (WebKit::WebPage::hasCachedWindowFrame):
43         (WebKit::WebPage::accessibilityPosition):
44         * WebProcess/WebPage/WebPage.messages.in:
45         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
46         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
47
48 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
49
50         Don't try to create a sandbox extension when path is empty
51         https://bugs.webkit.org/show_bug.cgi?id=111788
52
53         Reviewed by Anders Carlsson.
54
55         * Shared/FileAPI/BlobRegistrationData.cpp:
56         (WebKit::BlobRegistrationData::BlobRegistrationData): Skip File objects with empty
57         paths to avoid logging an error to console.
58
59 2013-03-07  Mark Lam  <mark.lam@apple.com>
60
61         WebPageProxy::exceededDatabaseQuota() needs to be serialized.
62         https://bugs.webkit.org/show_bug.cgi?id=111631.
63
64         Reviewed by Geoffrey Garen.
65
66         Previously, WebPageProxy::exceededDatabaseQuota() is called synchronously
67         with script execution in the WebProcess. Hence, it is never called in a
68         recursive manner.
69
70         In webkit2, we can have multiple WebProcesses concurrently triggering a
71         call to this function. While the function is waiting on feedback from a
72         UI dialog, the wait loop may re-enter the function to service a second
73         request to call this function from another WebProcess. This results in
74         problems where some of the WebProcesses will not get a proper reply, and
75         therefore hangs perpetually waiting for a non-forthcoming reply.
76
77         This changeset changes the function to queue the requests and ensure
78         that we do not recursively callback to the UI client.
79
80         * Platform/CoreIPC/HandleMessage.h:
81         (CoreIPC::callMemberFunction):
82         * UIProcess/WebPageProxy.cpp:
83         (ExceededDatabaseQuotaRecords):
84         (Record):
85         (WebKit::ExceededDatabaseQuotaRecords::areBeingProcessed):
86         (WebKit::ExceededDatabaseQuotaRecords::ExceededDatabaseQuotaRecords):
87         (WebKit::ExceededDatabaseQuotaRecords::~ExceededDatabaseQuotaRecords):
88         (WebKit::ExceededDatabaseQuotaRecords::shared):
89         (WebKit::ExceededDatabaseQuotaRecords::createRecord):
90         (WebKit::ExceededDatabaseQuotaRecords::add):
91         (WebKit::ExceededDatabaseQuotaRecords::next):
92         (WebKit::WebPageProxy::exceededDatabaseQuota):
93         * UIProcess/WebPageProxy.h:
94         * UIProcess/WebPageProxy.messages.in:
95
96 2013-03-07  Jeffrey Pfau  <jpfau@apple.com>
97
98         CFNetwork cache partitioning does not work properly on subdomains
99         https://bugs.webkit.org/show_bug.cgi?id=111772
100
101         Reviewed by David Kilzer.
102
103         Ensure that the CFString is UTF-8 so that WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition will always work.
104
105         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
106         (WebKit::partitionName): Create a UTF-8 CFString explicitly
107
108 2013-03-07  Beth Dakin  <bdakin@apple.com>
109
110         Need API to draw custom overhang area
111         https://bugs.webkit.org/show_bug.cgi?id=111679
112         -and corresponding-
113         <rdar://problem/13291415>
114
115         Reviewed by Simon Fraser.
116
117         The new API is WKBundlePageSetTopOverhangImage() and 
118         WKBundlePageSetBottomOverhangImage(). When the API is called, WebPage will get 
119         GraphicsLayers for the appropriate area from FrameView, and then set the image as 
120         the contents of the layer.
121
122         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
123         (WKBundlePageSetTopOverhangImage):
124         (WKBundlePageSetBottomOverhangImage):
125         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
126         * WebProcess/WebPage/WebPage.h:
127         (WebPage):
128         * WebProcess/WebPage/mac/WebPageMac.mm:
129         (WebKit::WebPage::setTopOverhangImage):
130         (WebKit):
131         (WebKit::WebPage::setBottomOverhangImage):
132
133 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
134
135         Reduce page cache size on Mac
136         https://bugs.webkit.org/show_bug.cgi?id=111795
137
138         Rubber stamped by Geoff Garen
139
140         5 entries is unnecessarily large; research show 3 should suffice.
141         On a low memory warning we should clear this completely.
142
143         * Shared/CacheModel.cpp:
144         (WebKit::calculateCacheSizes):
145             - reduce maximum to 3.
146
147 2013-03-07  Anders Carlsson  <andersca@apple.com>
148
149         Add a didFocusTextField callback to the injected bundle form client
150         https://bugs.webkit.org/show_bug.cgi?id=111771
151
152         Reviewed by Andreas Kling.
153
154         Add a new client callback that's invoked whenever a text input field is focused.
155
156         * Shared/APIClientTraits.cpp:
157         (WebKit):
158         * Shared/APIClientTraits.h:
159         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
160         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
161         (WebKit::InjectedBundlePageFormClient::didFocusTextField):
162         (WebKit):
163         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
164         (InjectedBundlePageFormClient):
165         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
166         (WebKit::WebChromeClient::focusedNodeChanged):
167
168 2013-03-07  Tim Horton  <timothy_horton@apple.com>
169
170         Null-check the page overlay before trying to use it.
171
172         Reviewed by Simon Fraser.
173
174         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
175         (WebKit::TiledCoreAnimationDrawingArea::scroll):
176
177 2013-03-07  Zan Dobersek  <zdobersek@igalia.com>
178
179         [GTK] Limit the supported compilers to GCC >= 4.7 and Clang >= 3.0
180         https://bugs.webkit.org/show_bug.cgi?id=109932
181
182         Reviewed by Martin Robinson.
183
184         * GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags.
185         They are now available by default due to the limited set of supported compilers.
186
187 2013-03-05  Gustavo Noronha Silva  <gns@gnome.org>
188
189         [GTK] Enable translations for WebKit2
190         https://bugs.webkit.org/show_bug.cgi?id=111398
191
192         Reviewed by Martin Robinson.
193
194         * GNUmakefile.am: define PACKAGE_LOCALE_DIR when building WebProcess's main module.
195         * WebProcess/gtk/WebProcessMainGtk.cpp:
196         (WebKit::WebProcessMainGtk): register the i18n domain name, and prefer UTF-8, since
197         we're GTK+; at the moment we're just using the same name as WebKitGTK+, pro: the
198         translation module can be reused, con: you can't have different versions of
199         WebKitGTK+ and WebKit2GTK+ installed, because the module would not be fit for reuse
200         in that case.
201         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
202         (WebKit::childSetupFunction): do not set LC_ALL environment variable explicitly,
203         the child process will already inherit the environment of the parent, which should
204         have all the variables set properly.
205
206 2013-03-06  Alexey Proskuryakov  <ap@apple.com>
207
208         SandboxExtension::createHandle raises an uncaught Objective-C exception if path is empty
209         https://bugs.webkit.org/show_bug.cgi?id=111689
210
211         Reviewed by Filip Pizlo.
212
213         * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::createHandle):
214         Use a function from WebCore platform layer instead of Foundation one equivalent.
215         We already do this elsewhere in this file.
216
217 2013-03-06  Tim Horton  <timothy_horton@apple.com>
218
219         [wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame can't scroll
220         https://bugs.webkit.org/show_bug.cgi?id=111662
221         <rdar://problem/13355808>
222
223         Reviewed by Simon Fraser.
224
225         Instead of setNeedsDisplay()ing the whole page overlay layer every time through
226         TCADA::flushLayers, do it at scroll time instead. Repainting on scroll is
227         necessary to keep things painted in the right place when we scroll (the overlay
228         is fixed to the size of the view), but is quite wasteful in apps that don’t scroll.
229
230         This works with threaded scrolling because overlay installation forces us
231         into main-thread scrolling mode.
232
233         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
234         (WebKit::TiledCoreAnimationDrawingArea::scroll):
235         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
236
237 2013-03-06  Tim Horton  <timothy_horton@apple.com>
238
239         [wk2] Page overlays should use the accelerated drawing setting instead of hardcoding it on
240         https://bugs.webkit.org/show_bug.cgi?id=111654
241         <rdar://problem/13364085>
242
243         Reviewed by Simon Fraser.
244
245         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
246         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
247         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
248
249 2013-03-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
250
251         [EFL][WK2] Enable interactive form validation for email and url input type validation
252         https://bugs.webkit.org/show_bug.cgi?id=111026
253
254         Reviewed by Laszlo Gombos.
255
256         WebKit EFL can check if input value is valid by enabling this feature.
257
258         * UIProcess/API/efl/EwkView.cpp:
259         (EwkView::EwkView):
260
261 2013-03-06  Alexey Proskuryakov  <ap@apple.com>
262
263         [Mac] Synthetic ResourceResponses cannot be sent over IPC without losing most information
264         https://bugs.webkit.org/show_bug.cgi?id=111623
265
266         Reviewed by Brady Eidson.
267
268         * Shared/WebCoreArgumentCoders.cpp:
269         * Shared/WebCoreArgumentCoders.h:
270         (CoreIPC::::encode): Made the decision on whether to serialize WebCore data in
271         ResourceResponse dynamic. If the platform data is out of date, we need both
272         (because some platforms use encodePlatformData() to pass additional information).
273         (CoreIPC::::decode): Decode platform data first, because this overwrites the ResourceResponse.
274
275         * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encodePlatformData): Don't
276         encode NSURLResponse if it's out of date. We may have a bad NSURLResponse with 0
277         status code given to client, but it was almost certainly the same on sending side.
278         WebCore doesn't mutate real responses - it either keeps them as is, or builds
279         entirely synthetic ones.
280
281 2013-03-04  Jer Noble  <jer.noble@apple.com>
282
283         Default mouse cursor behavior should be auto-hide for full screen video with custom controls
284         https://bugs.webkit.org/show_bug.cgi?id=107601
285
286         Reviewed by Beth Dakin.
287
288         Enable the CURSOR_VISIBILITY feature.
289
290         * Configurations/FeatureDefines.xcconfig:
291
292 2013-03-06  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
293
294         [GTK][WK2] Implement WebInspector::localizedStringsURL() to return the file URL of localizedStrings.js
295         https://bugs.webkit.org/show_bug.cgi?id=111448
296
297         Reviewed by Alexey Proskuryakov.
298
299         Implement WebInspector::localizedStringsURL() method to return the
300         file URL of the localizedStrings.js.
301
302         This prevents printing warnings about "Localized string not found" in
303         the console.
304
305         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
306         (WebKit::WebInspector::localizedStringsURL):
307
308 2013-03-06  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
309
310         [EFL][WK2] REGRESSION(r143582): API test EWK2UnitTestBase.ewk_view_contents_size_changed failing
311         https://bugs.webkit.org/show_bug.cgi?id=110608
312
313         Reviewed by Kenneth Rohde Christiansen.
314
315         Test was expecting ContentsSizeChanged signal from ViewClientEfl, but
316         WebView was not calling client callback if useFixedLayout() is true.
317
318         This patch prevent early return if useFixedLayout() is true and call
319         client callback didChangeContentsSize(), which will emit the signal.
320
321         * UIProcess/efl/ViewClientEfl.cpp:
322         (WebKit::ViewClientEfl::didChangeContentsSize):
323         * UIProcess/efl/WebView.cpp:
324         (WebKit::WebView::didChangeContentsSize):
325
326 2013-03-06  Manuel Rego Casasnovas  <rego@igalia.com>
327
328         [WK2][GTK] Fix unit test WebKit2APITests/WebKitWebView/mouse-target
329         https://bugs.webkit.org/show_bug.cgi?id=82866
330
331         Reviewed by Martin Robinson.
332
333         Test was failing because of new media controls needs more space to be
334         painted than just 10x10 pixels. This is similar to r144070.
335
336         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
337         (testWebViewMouseTarget): Modified HTML in order to give more space to the media controls.
338
339 2013-03-06  Tim Horton  <timothy_horton@apple.com>
340
341         [wk2] Page Overlays: Hook up the layer border/repaint counter setting to the overlay layer
342         https://bugs.webkit.org/show_bug.cgi?id=111547
343         <rdar://problem/13355801>
344
345         Reviewed by Simon Fraser.
346
347         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
348         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
349         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
350         Keep the page overlay layer's debug border and repaint counter settings updated.
351
352 2013-03-06  Geoffrey Garen  <ggaren@apple.com>
353
354         Joing the adoptNS/adoptCF/adoptRef club.
355         https://bugs.webkit.org/show_bug.cgi?id=111467
356
357         Reviewed by Darin Adler.
358
359         Responding to review comments by Darin Adler.
360
361         * NetworkProcess/mac/NetworkProcessMac.mm:
362         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
363         * WebProcess/mac/WebProcessMac.mm:
364         (WebKit::WebProcess::platformInitializeWebProcess): Tighten up this code
365         by reducing extraneous local variables.
366
367 2013-03-05  Alexey Proskuryakov  <ap@apple.com>
368
369         Track sandbox extensions for blobs in NetworkProcess
370         https://bugs.webkit.org/show_bug.cgi?id=111484
371
372         Reviewed by Sam Weinig.
373
374         * WebKit2.xcodeproj/project.pbxproj:
375         * NetworkProcess/FileAPI: Added.
376         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: Added.
377         * NetworkProcess/FileAPI/NetworkBlobRegistry.h: Added.
378         Added a registry that wraps normal in-process "BlobRegistryImpl", and also tracks
379         sandbox extensions for blobs. It will also track process connections, so that
380         blobs could be removed when a process crashes.
381
382         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
383         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
384         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
385         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
386         Use NetworkBlobRegistry.
387
388         * NetworkProcess/SchedulableLoader.h:
389         * NetworkProcess/SchedulableLoader.cpp:
390         (WebKit::SchedulableLoader::SchedulableLoader): Add extensions for blobs, both in
391         request URL and in request data.
392         (WebKit::SchedulableLoader::consumeSandboxExtensions): Request may now have multiple
393         extensions.
394         (WebKit::SchedulableLoader::invalidateSandboxExtensions): Ditto.
395
396         * Shared/FileAPI/BlobRegistrationData.cpp: Fixed extension creation - actually
397         store the result.
398
399 2013-03-06  Andras Becsi  <andras.becsi@digia.com>
400
401         [Qt][WK2] Fix the Mac build after r144787
402         https://bugs.webkit.org/show_bug.cgi?id=111569
403
404         Reviewed by Csaba Osztrogonác.
405
406         Use uint_64 explicitly instead of size_t.
407
408         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
409         (CoreIPC::::encode):
410         (CoreIPC::::decode):
411
412 2013-03-05  Kent Tamura  <tkent@chromium.org>
413
414         Rename WebCore/editing/visible_units.* to VisibleUnits.*
415         https://bugs.webkit.org/show_bug.cgi?id=111426
416
417         Reviewed by Alexey Proskuryakov.
418
419         * WebProcess/WebPage/mac/WebPageMac.mm:
420
421 2013-03-06  Zeno Albisser  <zeno@webkit.org>
422
423         DataReference::vector() should be const.
424         https://bugs.webkit.org/show_bug.cgi?id=109928
425
426         Reviewed by Anders Carlsson.
427
428         * Platform/CoreIPC/DataReference.h:
429         (CoreIPC::DataReference::vector):
430
431 2013-03-06  Luiz Agostini  <luiz.agostini@nokia.com>
432
433         Accelerated overflow scrolling for Coordinated Graphics.
434         https://bugs.webkit.org/show_bug.cgi?id=110323
435
436         Reviewed by Noam Rosenthal.
437         Signed off for WebKit2 by Simon Fraser.
438
439         A scroll offset is applied to individual layers on UI process and the
440         web process is notified assynchronously.
441         The new API WKCoordinatedScene may be used to scroll layers in the UI process.
442
443         * CMakeLists.txt:
444
445         Encoding and decoding the new members of CoordinatedGraphicsLayerState.
446
447         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
448         (CoreIPC::::encode):
449         (CoreIPC::::decode):
450
451         Adding acceleratedCompositingForOverflowScrollEnabled to WebPreferencesStore.
452
453         * Shared/WebPreferencesStore.h:
454         * WebProcess/WebPage/WebPage.cpp:
455         (WebKit::WebPage::updatePreferences):
456
457         New API WKCoordinatedScene is used to scroll layers on UI side.
458
459         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
460         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
461         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
462
463         A new message is used to send scroll commit messages to web process.
464
465         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
466         (WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):
467         (WebKit):
468         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
469         (CoordinatedLayerTreeHostProxy):
470         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
471         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
472         (WebKit::CoordinatedLayerTreeHost::detachLayer):
473         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
474         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
475         (WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
476         (WebKit::CoordinatedLayerTreeHost::commitScrollOffset):
477         (WebKit):
478         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
479         (CoordinatedLayerTreeHost):
480         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
481
482 2013-03-06  Huang Dongsung  <luxtella@company100.net>
483
484         [EFL][WK2] Convert from device view size to UI view size only in EwkView.
485         https://bugs.webkit.org/show_bug.cgi?id=110197
486
487         Reviewed by Kenneth Rohde Christiansen.
488
489         Signed off for WebKit2 by Benjamin Poulain.
490
491         Device scale factor is a property of the physical display, so only EwkView
492         should deal with converting device view size to UI (a.k.a Density Independent Pixel)
493         view size. It increases readability because we can regard a view size in
494         other classes (e.g. WebView, PageViewportController, WebPage) except for
495         EwkView as UI size.
496
497         * UIProcess/API/efl/EwkView.cpp:
498         (EwkView::setDeviceScaleFactor):
499         (EwkView::setDeviceSize):
500         (EwkView::size):
501         (EwkView::deviceSize):
502         (EwkView::scheduleUpdateDisplay):
503         (EwkView::createGLSurface):
504         (EwkView::handleEvasObjectCalculate):
505         * UIProcess/API/efl/EwkView.h:
506         (EwkView):
507         * UIProcess/efl/WebView.cpp:
508         (WebKit::WebView::paintToCurrentGLContext):
509         (WebKit::WebView::updateViewportSize):
510
511 2013-03-06  Christophe Dumez  <ch.dumez@sisa.samsung.com>
512
513         [EFL][WK2] Use Vector::reserveInitialCapacity() in WebEventFactory::createWebTouchEvent()
514         https://bugs.webkit.org/show_bug.cgi?id=111530
515
516         Reviewed by Benjamin Poulain.
517
518         In WebEventFactory::createWebTouchEvent(), when constructing the vector of touch points,
519         we already know in advance the total number of touch points. Therefore, we should
520         leverage WTF::Vector::reserveInitialCapacity() and WTF::Vector::uncheckedAppend() to save
521         some capacity checks.
522
523         * Shared/efl/WebEventFactory.cpp:
524         (WebKit::WebEventFactory::createWebTouchEvent):
525
526 2013-03-05  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
527
528         [WK2][EFL] Enable asynchronous spell checking by default
529         https://bugs.webkit.org/show_bug.cgi?id=111295
530
531         Reviewed by Benjamin Poulain.
532
533         Asynchronous spell checking feature is disabled by default for wk2 platforms.
534         It means all requests of spell checking are sent synchronously.
535
536         WebKit-EFL implements requestCheckingOfString method which allows
537         to check spelling asynchronously.
538
539         * UIProcess/API/efl/EwkView.cpp:
540         (EwkView::EwkView):
541
542 2013-03-05  Kondapally Kalyan  <kalyan.kondapally@intel.com>
543
544         [EFL] Ensure right format is used in SnapshotImageGL.
545         https://bugs.webkit.org/show_bug.cgi?id=111333
546
547         Reviewed by Benjamin Poulain.
548
549         GL_BGRA format is not standard for glReadPixels with GLES.
550         This patch ensures that GL_RGBA is used in SnapshotImageGL
551         while using GLES.
552
553         * UIProcess/API/efl/SnapshotImageGL.cpp:
554         (getImageSurfaceFromFrameBuffer):
555
556 2013-03-05  Geoffrey Garen  <ggaren@apple.com>
557
558         Each web process truncates the disk cache to zero on launch
559         https://bugs.webkit.org/show_bug.cgi?id=111467
560
561         Reviewed by Darin Adler.
562
563         Let's not do that.
564
565         * WebProcess/mac/WebProcessMac.mm:
566         (WebKit::WebProcess::platformInitializeWebProcess):
567
568 2013-03-05  Anders Carlsson  <andersca@apple.com>
569
570         Reset the values if there is a quota error
571         https://bugs.webkit.org/show_bug.cgi?id=111500
572
573         Reviewed by Beth Dakin.
574
575         * WebProcess/Storage/StorageAreaProxy.cpp:
576         (WebKit::StorageAreaProxy::didSetItem):
577         (WebKit::StorageAreaProxy::resetValues):
578         (WebKit):
579         * WebProcess/Storage/StorageAreaProxy.h:
580         (StorageAreaProxy):
581
582 2013-03-05  Anders Carlsson  <andersca@apple.com>
583
584         Keep track of pending value changes in StorageAreaProxy
585         https://bugs.webkit.org/show_bug.cgi?id=111496
586
587         Reviewed by Beth Dakin.
588
589         Add a HashCountedSet to keep track of the number of pending value
590         changes for a given key. If we get incoming storage events from other
591         processes while we have pending value changes, ignore the events.
592
593         * WebProcess/Storage/StorageAreaProxy.cpp:
594         (WebKit::StorageAreaProxy::setItem):
595         (WebKit::StorageAreaProxy::didSetItem):
596         (WebKit::StorageAreaProxy::dispatchStorageEvent):
597         (WebKit::StorageAreaProxy::shouldApplyChangesForKey):
598         (WebKit):
599         * WebProcess/Storage/StorageAreaProxy.h:
600         (StorageAreaProxy):
601
602 2013-03-05  Ryuan Choi  <ryuan.choi@samsung.com>
603
604         [EFL] Build break with latest EFL libraries
605         https://bugs.webkit.org/show_bug.cgi?id=111028
606
607         Reviewed by Dirk Pranke.
608
609         * PlatformEfl.cmake: Added ECORE_XXX_INCLUDE_DIRS.
610
611 2013-03-05  Anders Carlsson  <andersca@apple.com>
612
613         Use a named parameter for whether a quota error ocurred or not
614         https://bugs.webkit.org/show_bug.cgi?id=111490
615
616         Reviewed by Beth Dakin.
617
618         This is clearer than setItem returning true on error.
619         Also, actually set the item in the storage map.
620
621         * UIProcess/Storage/StorageManager.cpp:
622         (StorageManager::StorageArea):
623         (WebKit::StorageManager::StorageArea::setItem):
624         (WebKit::StorageManager::setItem):
625
626 2013-03-05  Kiran Muppala  <cmuppala@apple.com>
627
628         Use new assertion API for process suppression on Mac
629         https://bugs.webkit.org/show_bug.cgi?id=111387
630
631         Reviewed by Alexey Proskuryakov.
632
633         * Shared/ChildProcess.h:
634         (WebKit::ChildProcess::processSuppressionEnabled): Rename
635         m_processVisibleAssertion to m_processSuppressionAssertion.
636         * Shared/mac/ChildProcessMac.mm:
637         (WebKit::ChildProcess::setProcessSuppressionEnabled): Ditto. And,
638         replace calls to WKNSProcessInfoProcessAssertionWithTypes() with call to
639         -[NSProcessInfo beginSuspensionOfSystemBehaviors:].
640
641 2013-03-05  Anders Carlsson  <andersca@apple.com>
642
643         Move storageType() to StorageAreaProxy
644         https://bugs.webkit.org/show_bug.cgi?id=111488
645
646         Reviewed by Andreas Kling.
647
648         * WebProcess/Storage/StorageAreaProxy.cpp:
649         (WebKit::StorageAreaProxy::StorageAreaProxy):
650         (WebKit::StorageAreaProxy::storageType):
651         (WebKit::StorageAreaProxy::disabledByPrivateBrowsingInFrame):
652         * WebProcess/Storage/StorageAreaProxy.h:
653         (StorageAreaProxy):
654         * WebProcess/Storage/StorageNamespaceProxy.cpp:
655         * WebProcess/Storage/StorageNamespaceProxy.h:
656
657 2013-03-05  Jeffrey Pfau  <jpfau@apple.com>
658
659         Clear associated cache partitions when deleting origins' cache
660         https://bugs.webkit.org/show_bug.cgi?id=111383
661
662         Reviewed by Maciej Stachowiak.
663
664         Clear the cache partitions associated with the origin being cleared.
665
666         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
667         (WebKit):
668         (WebKit::partitionName):
669         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
670
671 2013-03-05  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
672
673         [WK2][EFL] WebPageProxy::setThemePath() should check that the page is valid
674         https://bugs.webkit.org/show_bug.cgi?id=109917
675
676         Reviewed by Alexey Proskuryakov.
677
678         WebPageProxy::setThemePath() should check that the page is valid before
679         sending IPC message.
680
681         * UIProcess/efl/WebPageProxyEfl.cpp:
682         (WebKit::WebPageProxy::setThemePath):
683
684 2013-03-05  Alexey Proskuryakov  <ap@apple.com>
685
686         <rdar://problem/13269245> Crashes creating WebKit processes in WKSandboxExtensionConsume
687         https://bugs.webkit.org/show_bug.cgi?id=111456
688
689         Reviewed by Anders Carlsson.
690
691         It's too late to be draconian about this condition here, crashing doesn't help
692         diagnose what went wrong when creating a sandbox extension.
693
694         Other SandboxExtension functions already have null checks for WKSandboxExtensionRef,
695         and so should consumePermanently().
696
697         * Shared/mac/SandboxExtensionMac.mm:
698         (WebKit::SandboxExtension::createHandle): For now, added logging when extension
699         creation fails. If that proves insufficiently helpful in practice, we can change
700         to a CRASH() later.
701         (WebKit::SandboxExtension::createHandleForTemporaryFile): Ditto.
702         (WebKit::SandboxExtension::consumePermanently): Gracefully fail if there is no extension
703         to consume.
704
705 2013-03-05  Gwang Yoon Hwang  <ryumiel@company100.net>
706
707         Coordinated Graphics: CoordinatedGraphicsLayer makes CoordinatedGraphicsScene perform via CoordinatedGraphicsState.
708         https://bugs.webkit.org/show_bug.cgi?id=108294
709
710         Reviewed by Anders Carlsson.
711
712         There are two changes in WK2.
713         1. Change CoordinatedLayerTreeHostProxy to use CoordinatedGraphicsState.
714         2. Add encode/decode of CoordinatedGraphicsState in CoordinatedGraphicsArgumentCoders.
715
716         This patch is based on Dongsung Huang, and Noam's work in
717         https://bugs.webkit.org/show_bug.cgi?id=108294
718
719         No new tests, covered by existing tests.
720
721         * Scripts/webkit2/messages.py:
722         (headers_for_type):
723         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
724         (CoreIPC::::encode):
725             Encoding UpdateImageBacking and CreateUpdateAtlas can fail when
726             encoding WebCoordinatedSurface::Handle fails, but we don't
727             recover in the case.
728         (CoreIPC::::decode):
729         (CoreIPC):
730         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
731         (WebCore):
732         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
733         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
734         (WebKit):
735         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
736         (WebCore):
737         (CoordinatedLayerTreeHostProxy):
738         (WebKit::CoordinatedLayerTreeHostProxy::coordinatedGraphicsScene):
739         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
740         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
741         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
742         (WebKit::CoordinatedLayerTreeHost::initializeRootCompositingLayerIfNeeded):
743         (WebKit::CoordinatedLayerTreeHost::syncLayerState):
744         (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded):
745         (WebKit):
746         (WebKit::CoordinatedLayerTreeHost::updateImageBacking):
747         (WebKit::CoordinatedLayerTreeHost::setBackgroundColor):
748         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
749         (CoordinatedLayerTreeHost):
750
751 2013-03-05  Sam Weinig  <sam@webkit.org>
752
753         Follow up to https://bugs.webkit.org/show_bug.cgi?id=111453, forgot to mark the files as Private.
754
755         * WebKit2.xcodeproj/project.pbxproj:
756
757 2013-03-05  Sam Weinig  <sam@webkit.org>
758
759         Elevate accessors of C-SPI API variants to Objective-C SPI
760         https://bugs.webkit.org/show_bug.cgi?id=111453
761         <rdar://problem/13340357>
762
763         Reviewed by Alexey Proskuryakov.
764
765         * Shared/mac/ObjCObjectGraphCoders.mm:
766         * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
767         * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h:
768         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
769         * UIProcess/API/mac/WKBrowsingContextGroupPrivate.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroupInternal.h.
770         * UIProcess/API/mac/WKProcessGroup.mm:
771         * UIProcess/API/mac/WKProcessGroupPrivate.h: Copied from Source/WebKit2/UIProcess/API/mac/WKProcessGroupInternal.h.
772         * UIProcess/API/mac/WKView.mm:
773         * WebKit2.xcodeproj/project.pbxproj:
774         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
775         (-[WKWebProcessPlugInController _bundleRef]):
776         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInPrivate.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKProcessGroupInternal.h.
777         Add access to C-SPI WebKit types as Objective-C SPI.
778
779 2013-03-04  Alexey Proskuryakov  <ap@apple.com>
780
781         Make AsyncFileReader work without ScriptExecutionContext
782         https://bugs.webkit.org/show_bug.cgi?id=111376
783
784         Reviewed by Anders Carlsson.
785
786         * NetworkProcess/NetworkResourceLoader.cpp:
787         * NetworkProcess/NetworkResourceLoader.h:
788         Removed a dummy implementation of createAsyncFileStream, which is no longer needed.
789
790 2013-03-05  Alexey Proskuryakov  <ap@apple.com>
791
792         <rdar://problem/13345116> REGRESSION: Child processes get access to user cache
793         and temporary directories instead of private ones
794
795         Reviewed by Sam Weinig.
796
797         * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::initializeSandbox):
798         Restore the correct order of calls, so sandbox parameters respect WebKit pseudo
799         containers.
800
801 2013-03-05  David Kilzer  <ddkilzer@apple.com>
802
803         BUILD FIX (r144698): Only enable SPEECH_SYNTHESIS for Mac
804         <http://webkit.org/b/106742>
805
806         Fixes the following build failures:
807
808             Undefined symbols for architecture i386:
809               "__ZTVN7WebCore25PlatformSpeechSynthesizerE", referenced from:
810                   __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
811               NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
812               "__ZN7WebCore25PlatformSpeechSynthesizer19initializeVoiceListEv", referenced from:
813                   __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
814             ld: symbol(s) not found for architecture i386
815
816         * Configurations/FeatureDefines.xcconfig:
817         - Only set ENABLE_SPEECH_SYNTHESIS for the macosx platform.
818
819 2013-03-05  Tim Horton  <timothy_horton@apple.com>, Grzegorz Czajkowski  <g.czajkowski@samsung.com>
820
821         [WK2] WTR needs an implementation of setAsynchronousSpellCheckingEnabled
822         https://bugs.webkit.org/show_bug.cgi?id=81042
823
824         Reviewed by Enrica Casucci.
825
826         Expose WK2 setting to enable/disabled asynchronous spell checking.
827         It's used by WebKitTestRunner to reset the setting at the beginning
828         of the test.
829         WebKit2 ports might be interested in this setting if they are going
830         to enable this feature.
831
832         * Shared/WebPreferencesStore.h:
833         * UIProcess/API/C/WKPreferences.cpp:
834         (WKPreferencesSetAsynchronousSpellCheckingEnabled):
835         (WKPreferencesGetAsynchronousSpellCheckingEnabled):
836         * UIProcess/API/C/WKPreferences.h:
837         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
838         (WKBundleSetAsynchronousSpellCheckingEnabled):
839         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
840         * WebProcess/InjectedBundle/InjectedBundle.cpp:
841         (WebKit::InjectedBundle::setAsynchronousSpellCheckingEnabled):
842         * WebProcess/InjectedBundle/InjectedBundle.h:
843         * WebProcess/WebPage/WebPage.cpp:
844         (WebKit::WebPage::updatePreferences):
845
846 2013-03-03  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
847
848         [WK2][EFL] Add requestCheckingOfString implementation.
849         https://bugs.webkit.org/show_bug.cgi?id=108172
850
851         Reviewed by Hajime Morrita.
852
853         Provide implementation of 'requestCheckingOfString' for WK2-EFL.
854         It uses the unified text checker feature.
855
856         * UIProcess/efl/TextCheckerEfl.cpp:
857         (WebKit::TextChecker::requestCheckingOfString):
858
859 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
860
861         Support WebSpeech - Speech Synthesis
862         https://bugs.webkit.org/show_bug.cgi?id=106742
863
864         Reviewed by Simon Fraser.
865
866         Enable speech synthesis for the Mac.
867
868         * Configurations/FeatureDefines.xcconfig:
869
870 2013-03-04  Anders Carlsson  <andersca@apple.com>
871
872         UI process storage areas should hold on to storage maps
873         https://bugs.webkit.org/show_bug.cgi?id=111374
874
875         Reviewed by Beth Dakin.
876
877         Pass the session storage quota size through to the storage area constructor and
878         create a StorageMap with the given quota size.
879
880         * UIProcess/Storage/StorageManager.cpp:
881         (StorageManager::StorageArea):
882         (WebKit::StorageManager::StorageArea::create):
883         (WebKit::StorageManager::StorageArea::StorageArea):
884         (StorageManager::SessionStorageNamespace):
885         (WebKit::StorageManager::SessionStorageNamespace::create):
886         (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
887         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
888         (WebKit::StorageManager::createSessionStorageNamespace):
889         (WebKit::StorageManager::createSessionStorageNamespaceInternal):
890         * UIProcess/Storage/StorageManager.h:
891         (StorageManager):
892         * UIProcess/WebPageProxy.cpp:
893         (WebKit::WebPageProxy::WebPageProxy):
894
895 2013-03-04  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
896
897         Unreviewed build fix after r144675.
898
899         Work around picky/old C++ compilers by separating the '>>' in
900         nested templates with a space.
901
902         * UIProcess/Storage/StorageManager.cpp:
903         (StorageManager::StorageArea):
904
905 2013-03-04  Anders Carlsson  <andersca@apple.com>
906
907         More work on UI side storage
908         https://bugs.webkit.org/show_bug.cgi?id=111370
909
910         Reviewed by Andreas Kling.
911
912         Add a DispatchStorageEvent message and begin hooking it up.
913
914         * UIProcess/Storage/StorageManager.cpp:
915         (StorageManager::StorageArea):
916         (WebKit::StorageManager::StorageArea::setItem):
917         (WebKit):
918         (WebKit::StorageManager::StorageArea::dispatchEvents):
919         (WebKit::StorageManager::setItem):
920         (WebKit::StorageManager::findStorageArea):
921         * UIProcess/Storage/StorageManager.h:
922         (StorageManager):
923         * UIProcess/Storage/StorageManager.messages.in:
924         * WebProcess/Storage/StorageAreaProxy.cpp:
925         (WebKit::StorageAreaProxy::setItem):
926         (WebKit::StorageAreaProxy::dispatchStorageEvent):
927         (WebKit):
928         * WebProcess/Storage/StorageAreaProxy.h:
929         (StorageAreaProxy):
930         * WebProcess/Storage/StorageAreaProxy.messages.in:
931
932 2013-03-04  Jer Noble  <jer.noble@apple.com>
933
934         Unreviewed build fix: wrap references to PluginInfoStore with 
935         guards for platforms which do not enable NETSCAPE_PLUGIN_AP.
936
937         * UIProcess/WebContext.cpp:
938         (WebKit::WebContext::WebContext):
939         (WebKit::WebContext::~WebContext):
940         * UIProcess/WebContext.h:
941
942 2013-03-04  Anders Carlsson  <andersca@apple.com>
943
944         Create and destroy storage areas in the UI process
945         https://bugs.webkit.org/show_bug.cgi?id=111361
946
947         Reviewed by Sam Weinig.
948
949         * UIProcess/Storage/StorageManager.cpp:
950         (StorageManager::StorageArea):
951         Keep track of listener connection and storage area ID pairs.
952         
953         (WebKit::StorageManager::StorageArea::~StorageArea):
954         Assert that we don't have any listeners left.
955
956         (WebKit::StorageManager::StorageArea::addListener):
957         Add the pair to the set of listeners.
958         
959         (WebKit::StorageManager::StorageArea::removeListener):
960         Remove the pair from the set of listeners.
961         
962         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
963         Given an origin, look up or create the storage area.
964
965         (WebKit::StorageManager::createStorageArea):
966         Create the storage area if it doesn't already exist.
967
968         (WebKit::StorageManager::destroyStorageArea):
969         Look up the storage area and destroy it.
970
971         * UIProcess/Storage/StorageManager.h:
972         Add a map of open storage areas.
973
974 2013-03-04  Jer Noble  <jer.noble@apple.com>
975
976         Add API to allow WK2 clients to query the list of installed plug-ins.
977         https://bugs.webkit.org/show_bug.cgi?id=111245
978
979         Reviewed by Alexey Proskuryakov.
980
981         Add API in WKContext, implemented by WebContext, that allows callers to register a callback 
982         retrieve an array containing installed plugin information. This API is exposed through WebContext 
983         because it owns the PluginInfoStore used to fulfill the request.
984
985         Bump the WKContextClient API by 1:
986         * Shared/APIClientTraits.cpp:
987         * Shared/APIClientTraits.h:
988         * UIProcess/API/C/WKContext.h:
989
990         Add a client protocol to PluginInfoStore to notify the client when plugIn information has been
991         successfully loaded:
992         * UIProcess/Plugins/PluginInfoStore.cpp:
993         (WebKit::PluginInfoStore::PluginInfoStore): Initialize m_client to 0.
994         (WebKit::PluginInfoStore::loadPluginsIfNecessary): If the client is present, notify after loading the plugin store.
995         * UIProcess/Plugins/PluginInfoStore.h:
996         (WebKit::PluginInfoStoreClient::~PluginInfoStoreClient): Default destructor.
997         (WebKit::PluginInfoStoreClient::PluginInfoStoreClient): Default constructor.
998         (WebKit::PluginInfoStore::setClient): Simple setter.
999         (WebKit::PluginInfoStore::client): Simple getter.
1000
1001         * UIProcess/WebContext.cpp:
1002         (WebKit::WebContext::WebContext): Set self as the client of PluginInfoStore.
1003         (WebKit::WebContext::~WebContext): Clear the client of PluginInfoStore.
1004         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins): Pass the callback to own client.
1005         * UIProcess/WebContext.h:
1006         * UIProcess/WebContextClient.cpp:
1007         (WebKit::WebContextClient::plugInInformationBecameAvailable): Pass the callback to the registered WK callback, if present.
1008         * UIProcess/WebContextClient.h:
1009
1010 2013-03-04  Tim Horton  <timothy_horton@apple.com>
1011
1012         PDFPlugin: Hook up Services
1013         https://bugs.webkit.org/show_bug.cgi?id=111246
1014         <rdar://problem/13062672>
1015
1016         Reviewed by Alexey Proskuryakov.
1017
1018         Make the Application->Services menu work when the focused selection is a PDFPlugin.
1019
1020         * Shared/EditorState.cpp:
1021         (WebKit::EditorState::encode):
1022         (WebKit::EditorState::decode):
1023         * Shared/EditorState.h:
1024         (WebKit::EditorState::EditorState):
1025         (EditorState):
1026         Add isInPlugin property to EditorState.
1027
1028         * UIProcess/API/mac/WKView.mm:
1029         (-[WKView validRequestorForSendType:returnType:]):
1030         If the selection is currently in a Plugin, we only currently have the ability
1031         to retrieve the selection as a plain-text string, so restrict sendType to NSStringPboardType.
1032
1033         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
1034         * WebProcess/Plugins/Plugin.h:
1035         * WebProcess/Plugins/PluginView.h:
1036         * WebProcess/Plugins/PluginProxy.h:
1037         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1038         Add getStringSelection.
1039
1040         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
1041         Add pdfLayerController:didChangeSelection: delegate method.
1042
1043         * WebProcess/Plugins/PDF/PDFPlugin.h:
1044         (PDFPlugin):
1045         Add getStringSelection and notifySelectionChanged.
1046
1047         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1048         (-[WKPDFLayerControllerDelegate pdfLayerController:didChangeSelection:]):
1049         Forward selection change notifications to our PDFPlugin.
1050
1051         (WebKit::PDFPlugin::notifySelectionChanged):
1052         Forward selection change notifications to our WebPage.
1053
1054         (WebKit::PDFPlugin::getStringSelection):
1055         Retrieve PDFLayerController's selection as a plain text string.
1056         
1057         * WebProcess/Plugins/PluginView.cpp:
1058         (WebKit::PluginView::countFindMatches):
1059         (WebKit::PluginView::findString):
1060         Drive-bys, check for existance and initialization of the plugin before using it.
1061
1062         (WebKit::PluginView::getStringSelection): Added.
1063
1064         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1065         (WebKit::WebEditorClient::respondToChangedSelection):
1066         Use didChangeSelection instead of sending the EditorStateChanged message directly.
1067
1068         * WebProcess/WebPage/WebPage.cpp:
1069         (WebKit::WebPage::editorState):
1070         If a plugin is focused and has a selection, return a EditorState that reflects that.
1071         Since PDFs aren't editable (when editing annotations, the plugin doesn't have focus),
1072         I'm not adding support for the editing-related properties when a plugin has focus.
1073
1074         (WebKit::WebPage::focusedPluginViewForFrame):
1075         (WebKit::WebPage::pluginViewForFrame):
1076         Make these class methods instead of static functions so we can use them from
1077         WebPageMac too, instead of duplicating code there.
1078
1079         (WebKit::WebPage::didChangeSelection): Added.
1080
1081         * WebProcess/WebPage/WebPage.h:
1082         Add didChangeSelection and [focused]PluginViewForFrame.
1083
1084         * WebProcess/WebPage/mac/WebPageMac.mm:
1085         (WebKit::WebPage::getStringSelectionForPasteboard):
1086         Defer to the focused plugin (if it exists) when retrieving the plain-text selection.
1087
1088 2013-03-04  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1089
1090         [WK2][EFL] Add callbacks to the WKViewClient to handle Web Process crash and relaunch
1091         https://bugs.webkit.org/show_bug.cgi?id=109828
1092
1093         Reviewed by Kenneth Rohde Christiansen.
1094
1095         Providing WKViewClient with Web Process crash and Web Process relaunch
1096         callbacks brings better design as WebView should not be aware of
1097         EFL-specific code handling the corresponding events.
1098
1099         The implementation of the mentioned Web Process callbacks was also added.
1100
1101         * UIProcess/API/C/efl/WKView.cpp:
1102         (WKViewSetThemePath):
1103         * UIProcess/API/C/efl/WKView.h:
1104         * UIProcess/efl/ViewClientEfl.cpp:
1105         (WebKit::ViewClientEfl::webProcessCrashed):
1106         (WebKit):
1107         (WebKit::ViewClientEfl::webProcessDidRelaunch):
1108         (WebKit::ViewClientEfl::ViewClientEfl):
1109         * UIProcess/efl/ViewClientEfl.h:
1110         (ViewClientEfl):
1111         * UIProcess/efl/WebView.cpp:
1112         (WebKit::WebView::setThemePath):
1113
1114             Accepts WTF::String instead of WKStringRef as it is
1115             more appropriate for C++ API implementation class.
1116
1117         (WebKit::WebView::processDidCrash):
1118         (WebKit::WebView::didRelaunchProcess):
1119         * UIProcess/efl/WebView.h:
1120         (WebView):
1121         * UIProcess/efl/WebViewClient.cpp:
1122         (WebKit::WebViewClient::webProcessCrashed):
1123         (WebKit):
1124         (WebKit::WebViewClient::webProcessDidRelaunch):
1125         * UIProcess/efl/WebViewClient.h:
1126
1127 2013-03-04  Anders Carlsson  <andersca@apple.com>
1128
1129         Complete the plug-in URL string before sending it to the UI process
1130         https://bugs.webkit.org/show_bug.cgi?id=111355
1131         <rdar://problem/13326713>
1132
1133         Reviewed by Andreas Kling.
1134
1135         If the URL is not absolute, we won't be able to find it by path extension in the plug-in info store.
1136
1137         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1138         (WebKit::WebChromeClient::unavailablePluginButtonClicked):
1139
1140 2013-03-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1141
1142         [GTK] Some WebKit2 GTK+ unit tests are failing in 32 bits bot
1143         https://bugs.webkit.org/show_bug.cgi?id=111346
1144
1145         Reviewed by Martin Robinson.
1146
1147         The problem is the use of a temporary CString object in the macro
1148         g_assert_cmpstr. It's a common mistake because we usually forget
1149         that g_assert_cmpstr is not a function but a macro, that expands
1150         to multiple lines. This patch adds a new macro ASSERT_CMP_CSTRING
1151         with the same implementation that g_assert_cmpstr, but using
1152         CStrings instead of const char*. It fixes all the cases where a
1153         temporary CString was used in g_assert_cmpstr, and uses the new
1154         macro also for the cases where we were caching the CString just
1155         for g_assert_cmpstr.
1156
1157         * UIProcess/API/gtk/tests/TestDownloads.cpp:
1158         (testDownloadRemoteFile):
1159         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
1160         (testInspectorServerPageList):
1161         * UIProcess/API/gtk/tests/TestLoaderClient.cpp:
1162         * UIProcess/API/gtk/tests/TestMain.h:
1163         * UIProcess/API/gtk/tests/TestResources.cpp:
1164         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
1165         (testGetFaviconURI):
1166         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
1167         (assertThatUserAgentIsSentInHeaders):
1168         (testWebKitSettingsUserAgent):
1169
1170 2013-03-04  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1171
1172         Add build flag for FontLoader
1173         https://bugs.webkit.org/show_bug.cgi?id=111289
1174
1175         Reviewed by Benjamin Poulain.
1176
1177         Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default).
1178
1179         * Configurations/FeatureDefines.xcconfig:
1180
1181 2013-03-03  Tim Horton  <timothy_horton@apple.com>
1182
1183         PDFPlugin: Rename delegate method from openWithPreview to openWithNativeApplication
1184         https://bugs.webkit.org/show_bug.cgi?id=111258
1185
1186         Reviewed by Alexey Proskuryakov.
1187
1188         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
1189         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1190         (-[WKPDFLayerControllerDelegate openWithNativeApplication]):
1191         Rename from openWithPreview to openWithNativeApplication to match PDFKit.
1192
1193 2013-03-03  Huang Dongsung  <luxtella@company100.net>
1194
1195         [EFL][QT][WK2] Turn on ApplyDeviceScaleFactorInCompositor always.
1196         https://bugs.webkit.org/show_bug.cgi?id=110298
1197
1198         Reviewed by Kenneth Rohde Christiansen.
1199
1200         Currently, EFL and Qt turn on ApplyDeviceScaleFactorInCompositor when using
1201         fixed layout, but ApplyDeviceScaleFactorInCompositor is not related to fixed
1202         layout. It is confusing that a platform WebView deals with device view size or
1203         DIP view size case by case. So this patch always turns on
1204         ApplyDeviceScaleFactorInCompositor.
1205
1206         In addition, move the code that turns on ScrollingCoordinatorEnabled to
1207         CoordinatedLayerTreeHost.
1208
1209         * UIProcess/API/efl/EwkView.cpp:
1210         (EwkView::setDeviceScaleFactor):
1211             We should make WebPage know new DIP size.
1212         (EwkView::setSize):
1213             When we set ApplyDeviceScaleFactorInCompositor to true, make WebPage
1214             know the DIP size as a view size.
1215         * UIProcess/efl/WebView.cpp:
1216         (WebKit::WebView::updateViewportSize):
1217         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1218         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1219         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1220         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1221         * WebProcess/WebPage/WebPage.cpp:
1222         (WebKit::WebPage::setUseFixedLayout):
1223             WebPage sends the DIP size to Web Process even when we don't use fixed layout.
1224
1225 2013-03-03  Sam Weinig  <sam@webkit.org>
1226
1227         Shared Web Workers have an incorrect visible process name
1228         https://bugs.webkit.org/show_bug.cgi?id=111277
1229
1230         Reviewed by Dan Bernstein.
1231
1232         * SharedWorkerProcess/SharedWorkerProcess.cpp:
1233         (WebKit::SharedWorkerProcess::initializeSharedWorkerProcess):
1234         * SharedWorkerProcess/SharedWorkerProcess.h:
1235         (SharedWorkerProcess):
1236         * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
1237         (WebKit::SharedWorkerProcess::initializeProcessName):
1238         The SharedWorkerProcess is not an internet plug-in!
1239
1240 2013-03-03  Adam Barth  <abarth@webkit.org>
1241
1242         Unreviewed attempted build fix. Adds back some includes removed in
1243         http://trac.webkit.org/changeset/144565.
1244
1245         * Shared/WebRenderLayer.cpp:
1246         * Shared/WebRenderObject.cpp:
1247         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1248         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1249         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1250         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1251         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
1252         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1253         * WebProcess/Plugins/PluginView.cpp:
1254         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1255         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1256         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1257         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1258         * WebProcess/WebPage/mac/WebPageMac.mm:
1259         * WebProcess/WebProcess.cpp:
1260         * WebProcess/soup/WebProcessSoup.cpp:
1261
1262 2013-03-03  Adam Barth  <abarth@webkit.org>
1263
1264         Unreviewed rollout of http://trac.webkit.org/r144530
1265         As described in https://bugs.webkit.org/show_bug.cgi?id=111167 and
1266         https://bugs.webkit.org/show_bug.cgi?id=111035, this patch caused a
1267         large number of ASSERTs in chromium-win.
1268
1269         * NetworkProcess/HostRecord.h:
1270         * NetworkProcess/NetworkResourceLoadScheduler.h:
1271         * NetworkProcess/NetworkResourceLoader.h:
1272         (WebCore):
1273         * Shared/WebRenderLayer.cpp:
1274         * Shared/WebRenderObject.cpp:
1275         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1276         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1277         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1278         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1279         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
1280         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1281         * WebProcess/Plugins/PluginView.cpp:
1282         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1283         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1284         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1285         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1286         * WebProcess/WebPage/mac/WebPageMac.mm:
1287         * WebProcess/WebProcess.cpp:
1288         * WebProcess/soup/WebProcessSoup.cpp:
1289
1290 2013-03-02  Sam Weinig  <sam@webkit.org>
1291
1292         WebKit2 is missing the setShowsURLsInToolTips preference
1293         https://bugs.webkit.org/show_bug.cgi?id=111259
1294         <rdar://problem/12991891>
1295
1296         Reviewed by Maciej Stachowiak.
1297
1298         * Shared/WebPreferencesStore.h:
1299         * UIProcess/API/C/WKPreferences.cpp:
1300         (WKPreferencesSetShowsURLsInToolTipsEnabled):
1301         (WKPreferencesGetShowsURLsInToolTipsEnabled):
1302         * UIProcess/API/C/WKPreferencesPrivate.h:
1303         * WebProcess/WebPage/WebPage.cpp:
1304         (WebKit::WebPage::updatePreferences):
1305         Pipe it through.
1306
1307 2013-03-02  Benjamin Poulain  <bpoulain@apple.com>
1308
1309         Move computedStyleIncludingVisitedInfo from TestRunner to Internals
1310         https://bugs.webkit.org/show_bug.cgi?id=109772
1311
1312         Reviewed by Andreas Kling.
1313
1314         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1315         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1316         * WebProcess/WebPage/WebFrame.cpp:
1317         * WebProcess/WebPage/WebFrame.h:
1318         (WebFrame):
1319
1320 2013-03-01  Kiran Muppala  <cmuppala@apple.com>
1321
1322         Remove call to set task priority of WebKit2 processes on Mac
1323         https://bugs.webkit.org/show_bug.cgi?id=111239
1324
1325         Reviewed by Darin Adler.
1326
1327         Remove call to set task prioirty of WebKit2 processes on Mac as it
1328         is no longer necessary.
1329
1330         * Shared/mac/ChildProcessMac.mm:
1331         (WebKit::ChildProcess::platformInitialize): Remove call to setpriority().
1332
1333 2013-02-28  Alexey Proskuryakov  <ap@apple.com>
1334
1335         Reduce amount of rebuilding when touching networking headers
1336         https://bugs.webkit.org/show_bug.cgi?id=111035
1337
1338         Reviewed by Eric Seidel.
1339
1340         Adding includes that are now necessary because WebCore headers don't have them
1341         any more.
1342
1343         * NetworkProcess/HostRecord.h:
1344         * NetworkProcess/NetworkResourceLoadScheduler.h:
1345         * NetworkProcess/NetworkResourceLoader.h:
1346         * Shared/WebRenderLayer.cpp:
1347         * Shared/WebRenderObject.cpp:
1348         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1349         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1350         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1351         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1352         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
1353         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1354         * WebProcess/Plugins/PluginView.cpp:
1355         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1356         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1357         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1358         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1359         * WebProcess/WebPage/mac/WebPageMac.mm:
1360         * WebProcess/WebProcess.cpp:
1361         * WebProcess/soup/WebProcessSoup.cpp:
1362
1363 2013-02-28  Alexey Proskuryakov  <ap@apple.com>
1364
1365         Make in-memory blobs work in NetworkProcess
1366         https://bugs.webkit.org/show_bug.cgi?id=111132
1367
1368         Reviewed by Sam Weinig.
1369
1370         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1371         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
1372         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
1373         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
1374         * NetworkProcess/NetworkConnectionToWebProcess.h:
1375         Implement BlobRegistry interface by using BlobRegistryImpl (same one as used in
1376         WebProcess in non-PPT mode).
1377
1378         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added three messages
1379         needed for BlobRegistry.
1380
1381         * NetworkProcess/NetworkProcess.cpp:
1382         * NetworkProcess/NetworkProcessPlatformStrategies.cpp: Added.
1383         * NetworkProcess/NetworkProcessPlatformStrategies.h: Added.
1384         Added a mostly empty platform strategy, just for FormData to talk to BlobRegistry.
1385         Perhaps we'll find a way to avoid this WebCore code path in NetworkProcess, because
1386         we obviously know which registry implementation is in use in this process.
1387
1388         * Shared/FileAPI: Added.
1389         * Shared/FileAPI/BlobRegistrationData.cpp: Added.
1390         * Shared/FileAPI/BlobRegistrationData.h: Added.
1391         Added a class for passing BlobData and extension handles over IPC.
1392         This uses a trick with mutable a member to avoid copying decoded BlobStorageData.
1393
1394         * WebKit2.xcodeproj/project.pbxproj:
1395         * WebProcess/FileAPI: Added.
1396         * WebProcess/FileAPI/BlobRegistryProxy.cpp: Added.
1397         * WebProcess/FileAPI/BlobRegistryProxy.h: Added.
1398         A proxy implementation of BlobRegistry that just sends requests over IPC. We only
1399         need async ones.
1400
1401         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1402         (WebKit::WebPlatformStrategies::createBlobRegistry):
1403         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1404         Create an appropriate BlobRegistry.
1405
1406 2013-03-01  Zan Dobersek  <zdobersek@igalia.com>
1407
1408         Uncomment ENABLE_SVG guards to avoid having WebKitPluginProcess link
1409         against libWebCoreSVG.la when SVG is disabled.
1410
1411         Rubber-stamped by Gustavo Noronha.
1412
1413         * GNUmakefile.am:
1414
1415 2013-02-28  Sam Weinig  <sam@webkit.org>
1416
1417         Add SPI for marking a WebView as doing things on behalf of another process
1418         https://bugs.webkit.org/show_bug.cgi?id=111125
1419
1420         Reviewed by Alexey Proskuryakov.
1421
1422         * NetworkProcess/mac/RemoteNetworkingContext.h:
1423         * NetworkProcess/mac/RemoteNetworkingContext.mm:
1424         (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
1425         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1426         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1427         (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
1428         Stub out sourceApplicationAuditData() client function.
1429
1430 2013-03-01  Sheriff Bot  <webkit.review.bot@gmail.com>
1431
1432         Unreviewed, rolling out r144422 and r144424.
1433         http://trac.webkit.org/changeset/144422
1434         http://trac.webkit.org/changeset/144424
1435         https://bugs.webkit.org/show_bug.cgi?id=111167
1436
1437         Caused over 20 tests to fail assertion on Chromium Win port as
1438         ASSERTION FAILED: m_platformRequestUpdated (Requested by
1439         toyoshim on #webkit).
1440
1441         * NetworkProcess/HostRecord.h:
1442         * NetworkProcess/NetworkResourceLoadScheduler.h:
1443         * NetworkProcess/NetworkResourceLoader.h:
1444         (WebCore):
1445         * Shared/WebRenderLayer.cpp:
1446         * Shared/WebRenderObject.cpp:
1447         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1448         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1449         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1450         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1451         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
1452         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1453         * WebProcess/Plugins/PluginView.cpp:
1454         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1455         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1456         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1457         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1458         * WebProcess/WebPage/mac/WebPageMac.mm:
1459         * WebProcess/WebProcess.cpp:
1460         * WebProcess/soup/WebProcessSoup.cpp:
1461
1462 2013-03-01  Andras Becsi  <andras.becsi@digia.com>
1463
1464         [Qt][WK2] Fix failing API tests after r143935
1465         https://bugs.webkit.org/show_bug.cgi?id=111086
1466
1467         Reviewed by Jocelyn Turcotte.
1468
1469         Convert a leftorver resume call to the new resumeAndUpdateContent() call
1470         in PageViewportControllerClientQt so that the notifications about zoom
1471         animation state changes reach the API tests.
1472
1473         * UIProcess/qt/PageViewportControllerClientQt.cpp:
1474         (WebKit::PageViewportControllerClientQt::scaleAnimationStateChanged):
1475
1476 2013-03-01  Grzegorz Czajkowski  <g.czajkowski@samsung.com>, Mariusz Grzegorczyk <mariusz.g@samsung.com>
1477
1478         [WK2] Asynchronous spell checking implementation
1479         https://bugs.webkit.org/show_bug.cgi?id=109577
1480
1481         Reviewed by Enrica Casucci.
1482
1483         Associate the abstract 'WebCore::TextCheckingRequest' object with the unique identifier
1484         on WebProcess side. The request data from the 'TextCheckingRequest' are retrieved and
1485         passed to the UIProcess. The WK2 client (TextChecker{Gtk/Mac/Efl/Qt}.cpp) gets
1486         the 'TextCheckerCompletion' object with the request data and possibility to notify
1487         the WebProcess about the spelling results.
1488         Finally, the WebPage object calls on the proper 'TextCheckingRequest' object
1489         didSuccess/didCancel method to notify the WebCore about the spelling result.
1490
1491         * CMakeLists.txt:
1492         * GNUmakefile.list.am:
1493         Add 'TextCheckerCompletion.{h/cpp}' to the WebKit2 cmake based and
1494         WK2-Gtk+ builds.
1495
1496         * Scripts/webkit2/messages.py:
1497         (headers_for_type):
1498         Add exception for 'TextCheckingRequestData' class to properly find header
1499         file for it.
1500
1501         * Shared/WebCoreArgumentCoders.cpp:
1502         * Shared/WebCoreArgumentCoders.h:
1503         Teach 'ArgumentCoder' how to encode/decode 'TextCheckingRequestData' class.
1504
1505         * Target.pri:
1506         Add 'TextCheckerCompletion.{h/cpp}' to the WK2-Qt build.
1507
1508         * UIProcess/TextChecker.h:
1509         Add 'requestCheckingOfString' method to the TextChecker's interface.
1510
1511         * UIProcess/TextCheckerCompletion.cpp: Added.
1512         (WebKit::TextCheckerCompletion::create):
1513         (WebKit::TextCheckerCompletion::TextCheckerCompletion):
1514
1515         (WebKit::TextCheckerCompletion::spellDocumentTag):
1516         Return the WebPageProxy's spellDocumentTag as the client might be
1517         interested in from which page the request came.
1518
1519         (WebKit::TextCheckerCompletion::textCheckingRequestData):
1520         Allow to retrieve 'TextCheckingRequestData' object.
1521
1522         (WebKit::TextCheckerCompletion::didFinishCheckingText):
1523         (WebKit::TextCheckerCompletion::didCancelCheckingText):
1524         Notify the 'WebPageProxy' object that the given request has been
1525         handled or canceled.
1526
1527         * UIProcess/TextCheckerCompletion.h: Added.
1528         Introduce a new class for WK2 to retrieve the request data and
1529         call didFinishCheckingText/didCancelCheckingText.
1530
1531         * UIProcess/WebPageProxy.cpp:
1532         (WebKit::WebPageProxy::requestCheckingOfString):
1533         Create 'TextCheckerCompletion' object and pass it
1534         to the 'TextChecker::requestCheckingOfString' method.
1535
1536         (WebKit::WebPageProxy::didFinishCheckingText):
1537         (WebKit::WebPageProxy::didCancelCheckingText):
1538         Send the messages to WebProcess that the given request has been
1539         handled or canceled.
1540
1541         * UIProcess/WebPageProxy.h:
1542         (WebPageProxy):
1543         Add public declarations for 'didFinishCheckingText', 'didCancelCheckingText'.
1544         Add private declarations for 'requestCheckingOfString'.
1545         Move the 'spellDocumentTag()' method to to the public section to be
1546         accessible from 'TextCheckerCompletion' class.
1547
1548         * UIProcess/WebPageProxy.messages.in:
1549         A new entry for 'RequestCheckingOfString'.
1550
1551         * UIProcess/efl/TextCheckerEfl.cpp:
1552         (WebKit::TextChecker::requestCheckingOfString):
1553         (WebKit):
1554         * UIProcess/gtk/TextCheckerGtk.cpp:
1555         (WebKit::TextChecker::requestCheckingOfString):
1556         (WebKit):
1557         * UIProcess/mac/TextCheckerMac.mm:
1558         (WebKit::TextChecker::requestCheckingOfString):
1559         (WebKit):
1560         * UIProcess/qt/TextCheckerQt.cpp:
1561         (WebKit::TextChecker::requestCheckingOfString):
1562         (WebKit):
1563         Add dummy implementations for 'requestCheckingOfString'.
1564
1565         * WebKit2.xcodeproj/project.pbxproj:
1566         Add 'TextCheckerCompletion.{h/cpp} to Mac build.
1567
1568         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1569         (WebKit::generateTextCheckingRequestID):
1570         Helper function to generate the unique identifier for the abstract
1571         'TextCheckingRequest' object.
1572
1573         (WebKit::WebEditorClient::requestCheckingOfString):
1574         Associate 'TextCheckingRequest' with the unique identifier and add them
1575         to the map object.
1576         Get the request data and send it to the UIProcess.
1577
1578         * WebProcess/WebPage/WebPage.cpp:
1579         (WebKit::WebPage::addTextCheckingRequest):
1580         Add the identifier and the request to the map object.
1581
1582         (WebKit::WebPage::didFinishCheckingText):
1583         (WebKit::WebPage::didCancelCheckingText):
1584         Call didSucceed/didCancel on the 'TextCheckingRequest' to notify the WebCore
1585         about spellcheking results.
1586         Remove the request from the map object.
1587
1588         * WebProcess/WebPage/WebPage.h:
1589         Add declarations for 'addTextCheckingRequest', 'didFinishCheckingText' and
1590         'didCancelCheckingText.'
1591
1592         * WebProcess/WebPage/WebPage.messages.in:
1593         Add a new entry for DidFinishCheckingText, DidCancelCheckingText.
1594
1595 2013-02-28  Alexey Proskuryakov  <ap@apple.com>
1596
1597         Reduce amount of rebuilding when touching networking headers
1598         https://bugs.webkit.org/show_bug.cgi?id=111035
1599
1600         Reviewed by Eric Seidel.
1601
1602         Adding includes that are now necessary because WebCore headers don't have them
1603         any more.
1604
1605         * NetworkProcess/HostRecord.h:
1606         * NetworkProcess/NetworkResourceLoadScheduler.h:
1607         * NetworkProcess/NetworkResourceLoader.h:
1608         * Shared/WebRenderLayer.cpp:
1609         * Shared/WebRenderObject.cpp:
1610         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1611         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1612         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1613         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1614         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
1615         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1616         * WebProcess/Plugins/PluginView.cpp:
1617         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1618         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1619         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1620         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1621         * WebProcess/WebPage/mac/WebPageMac.mm:
1622         * WebProcess/WebProcess.cpp:
1623         * WebProcess/soup/WebProcessSoup.cpp:
1624
1625 2013-02-28  Seokju Kwon  <seokju.kwon@gmail.com>
1626
1627         [WK2] Refactoring : Fix indentation and braces in WebInspectorClient.h|cpp
1628         https://bugs.webkit.org/show_bug.cgi?id=109925
1629
1630         Reviewed by Benjamin Poulain.
1631
1632         The contents of an outermost namespace block should not be indented.
1633         And One-line control clauses should not use braces.
1634
1635         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1636         (WebKit::WebInspectorClient::closeInspectorFrontend):
1637         * WebProcess/WebCoreSupport/WebInspectorClient.h:
1638         (WebCore):
1639
1640 2013-02-28  Kiran Muppala  <cmuppala@apple.com>
1641
1642         Add a pre-bootstrap message for NetworkProcess XPC service
1643         https://bugs.webkit.org/show_bug.cgi?id=111127
1644
1645         Reviewed by Sam Weinig.
1646
1647         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
1648         (WebKit::XPCServiceEventHandler): Hold on to the pre-bootstrap message.
1649         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
1650         (WebKit::XPCServiceEventHandler): Ditto.
1651         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1652         (WebKit::connectToService): Send a pre-bootstrap message for NetworkProcess
1653         XPC service.
1654
1655 2013-02-28  Conrad Shultz  <conrad_shultz@apple.com>
1656
1657         Need API to control page underlay color
1658         https://bugs.webkit.org/show_bug.cgi?id=110918
1659
1660         Reviewed by Simon Fraser.
1661
1662         * Shared/WebPageCreationParameters.cpp:
1663         (WebKit::WebPageCreationParameters::encode):
1664         Encode underlayColor.
1665         (WebKit::WebPageCreationParameters::decode):
1666         Decode underlayColor.
1667
1668         * Shared/WebPageCreationParameters.h:
1669         (WebPageCreationParameters):
1670         Add underlayColor member.
1671
1672         * UIProcess/API/mac/WKView.mm:
1673         (-[WKView underlayColor]):
1674         Accessor; retrieves the WebCore::Color from the WebPageProxy and converts it to an NSColor.
1675         (-[WKView setUnderlayColor:]):
1676         Mutator; converts the NSColor to a WebCore::Color and passes it to the WebPageProxy.
1677
1678         * UIProcess/API/mac/WKViewPrivate.h:
1679         Add underlayColor @property.
1680
1681         * UIProcess/WebPageProxy.cpp:
1682         (WebKit::WebPageProxy::setUnderlayColor):
1683         Mutator; dispatches SetUnderlayColor to WebPage.
1684         (WebKit::WebPageProxy::creationParameters):
1685         Set the parameters' underlayColor member appropriately.
1686
1687         * UIProcess/WebPageProxy.h:
1688         Declare new member functions and variable.
1689         (WebKit::WebPageProxy::underlayColor):
1690         Accessor.
1691
1692         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1693         (WebKit::WebChromeClient::underlayColor):
1694         Return the associated WebPage's underlayColor.
1695
1696         * WebProcess/WebCoreSupport/WebChromeClient.h:
1697         (WebChromeClient):
1698         Declare underlayColor().
1699
1700         * WebProcess/WebPage/WebPage.cpp:
1701         (WebKit::WebPage::WebPage):
1702         Apply any underlayColor that was supplied as part of the WebPageCreationParameters.
1703
1704         * WebProcess/WebPage/WebPage.h:
1705         Declare new member functions and variable.
1706         (WebKit::WebPage::underlayColor):
1707         Accessor.
1708
1709         * WebProcess/WebPage/WebPage.messages.in:
1710         Add SetUnderlayColor message.
1711
1712 2013-02-28  Anders Carlsson  <andersca@apple.com>
1713
1714         Add the notion of an allowed connection to SessionStorageNamespace
1715         https://bugs.webkit.org/show_bug.cgi?id=111122
1716
1717         Reviewed by Sam Weinig.
1718
1719         Group together each session storage namespace with an allowed connection.
1720         This will help ensure that rouge web processes will not be able to access session storage
1721         from pages in other processes.
1722         
1723         * UIProcess/Storage/StorageManager.cpp:
1724         (StorageManager::SessionStorageNamespace):
1725         (WebKit::StorageManager::SessionStorageNamespace::allowedConnection):
1726         (WebKit::StorageManager::SessionStorageNamespace::create):
1727         (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
1728         (WebKit::StorageManager::SessionStorageNamespace::setAllowedConnection):
1729         Add an m_allowedConnection member variable, as well as setters and getters.
1730
1731         (WebKit::StorageManager::createSessionStorageNamespace):
1732         Take an optional allowed connection. (It can be null if the process has not finished launching).
1733
1734         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
1735         New function to set the allowed connection for a session storage namespace.
1736
1737         (WebKit::StorageManager::createStorageArea):
1738         Add another FIXME.
1739
1740         (WebKit::StorageManager::createSessionStorageNamespaceInternal):
1741         Pass the connection to the SessionStorageNamespace constructor.
1742
1743         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnectionInternal):
1744         Set the allowed connection.
1745
1746         * UIProcess/WebPageProxy.cpp:
1747         (WebKit::WebPageProxy::WebPageProxy):
1748         Pass the connection to createSessionStorageNamespace.
1749
1750         (WebKit::WebPageProxy::connectionWillOpen):
1751         Call setAllowedSessionStorageNamespaceConnection.
1752         
1753         (WebKit::WebPageProxy::connectionWillClose):
1754         Call setAllowedSessionStorageNamespaceConnection with a null connection.
1755
1756         * UIProcess/WebProcessProxy.cpp:
1757         (WebKit::WebProcessProxy::connectionWillOpen):
1758         Call connectionWillOpen on all pages.
1759
1760         (WebKit::WebProcessProxy::connectionWillClose):
1761         Call connectionWillClose on all pages.
1762
1763 2013-02-28  Kiran Muppala  <cmuppala@apple.com>
1764
1765         Add private API to disable WKView window occlusion detection
1766         https://bugs.webkit.org/show_bug.cgi?id=111107
1767
1768         Reviewed by Simon Fraser.
1769
1770         * UIProcess/API/mac/WKView.mm:
1771         (-[WKView _enableWindowOcclusionNotifications]): Check if occlusion
1772         detection is enabled before enabling notifications.
1773         (windowBecameOccluded): Ditto before changing window occlusion state.
1774         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
1775         Initialize occlusion detection enabled flag to "YES".
1776         (-[WKView windowOcclusionDetectionEnabled]):
1777         (-[WKView setWindowOcclusionDetectionEnabled:]):
1778         * UIProcess/API/mac/WKViewPrivate.h:
1779
1780 2013-02-28  Anders Carlsson  <andersca@apple.com>
1781
1782         Add the notion of an allowed connection to SessionStorageNamespace
1783         https://bugs.webkit.org/show_bug.cgi?id=111122
1784
1785         Reviewed by Sam Weinig.
1786
1787         Group together each session storage namespace with an allowed connection.
1788         This will help ensure that rouge web processes will not be able to access session storage
1789         from pages in other processes.
1790         
1791         * UIProcess/Storage/StorageManager.cpp:
1792         (StorageManager::SessionStorageNamespace):
1793         (WebKit::StorageManager::SessionStorageNamespace::allowedConnection):
1794         (WebKit::StorageManager::SessionStorageNamespace::create):
1795         (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
1796         (WebKit::StorageManager::SessionStorageNamespace::setAllowedConnection):
1797         Add an m_allowedConnection member variable, as well as setters and getters.
1798
1799         (WebKit::StorageManager::createSessionStorageNamespace):
1800         Take an optional allowed connection. (It can be null if the process has not finished launching).
1801
1802         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
1803         New function to set the allowed connection for a session storage namespace.
1804
1805         (WebKit::StorageManager::createStorageArea):
1806         Add another FIXME.
1807
1808         (WebKit::StorageManager::createSessionStorageNamespaceInternal):
1809         Pass the connection to the SessionStorageNamespace constructor.
1810
1811         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnectionInternal):
1812         Set the allowed connection.
1813
1814         * UIProcess/WebPageProxy.cpp:
1815         (WebKit::WebPageProxy::WebPageProxy):
1816         Pass the connection to createSessionStorageNamespace.
1817
1818         (WebKit::WebPageProxy::connectionWillOpen):
1819         Call setAllowedSessionStorageNamespaceConnection.
1820         
1821         (WebKit::WebPageProxy::connectionWillClose):
1822         Call setAllowedSessionStorageNamespaceConnection with a null connection.
1823
1824         * UIProcess/WebProcessProxy.cpp:
1825         (WebKit::WebProcessProxy::connectionWillOpen):
1826         Call connectionWillOpen on all pages.
1827
1828         (WebKit::WebProcessProxy::connectionWillClose):
1829         Call connectionWillClose on all pages.
1830
1831 2013-02-28  Anders Carlsson  <andersca@apple.com>
1832
1833         Implement more StorageAreaProxy member functions
1834         https://bugs.webkit.org/show_bug.cgi?id=111103
1835
1836         Reviewed by Sam Weinig.
1837
1838         * Shared/SecurityOriginData.cpp:
1839         (WebKit::SecurityOriginData::securityOrigin):
1840         * Shared/SecurityOriginData.h:
1841         Add helper to create a WebCore::SecurityOrigin from a SecurityOriginData object.
1842
1843         * WebProcess/Storage/StorageAreaProxy.cpp:
1844         (WebKit::StorageAreaProxy::key):
1845         Fill the storage map and call through to StorageMap::key.
1846
1847         (WebKit::StorageAreaProxy::contains):
1848         Fill the storage map and call through to StorageMap::contains.
1849
1850         (WebKit::StorageAreaProxy::memoryBytesUsedByCache):
1851         Return 0; this matches StorageAreaImpl.
1852
1853 2013-02-28  Tim Horton  <timothy_horton@apple.com>
1854
1855         PDFPlugin: PDF orientation isn't respected when printing or print-previewing
1856         https://bugs.webkit.org/show_bug.cgi?id=110925
1857         <rdar://problem/13008621>
1858
1859         Reviewed by Alexey Proskuryakov.
1860
1861         * WebProcess/WebPage/mac/WebPageMac.mm:
1862         (WebKit::drawPDFPage): Teach drawPDFPage about PDFPage's rotation property, and use it
1863         to swap the PDF's cropbox. Painting now matches PDFViewController's historical behavior.
1864
1865 2013-02-28  Sam Weinig  <sam@webkit.org>
1866
1867         Don't install unused XPCServices on Lion
1868         <rdar://problem/13264712>
1869
1870         Rubber-stamped by Anders Carlsson
1871
1872         * Configurations/BaseXPCService.xcconfig:
1873
1874 2013-02-28  David Kilzer  <ddkilzer@apple.com>
1875
1876         BUILD FIX (r144221): SetSmartInsertDeleteEnabled should be wrapped in PLATFORM(MAC)
1877
1878         * WebProcess/WebPage/WebPage.messages.in: Move
1879         SetSmartInsertDeleteEnabled from USE(APPKIT) to PLATFORM(MAC).
1880
1881 2013-02-27  Csaba Osztrogonác  <ossy@webkit.org>
1882
1883         [WK2] One more unreviewed buildfix for EFL, GTK and Qt after r144218.
1884
1885         * CMakeLists.txt:
1886         * GNUmakefile.list.am:
1887         * Target.pri:
1888         * WebProcess/Storage/StorageNamespaceProxy.cpp:
1889         (WebKit::StorageNamespaceProxy::copy):
1890
1891 2013-02-27  Zan Dobersek  <zdobersek@igalia.com>
1892
1893         Unreviewed (speculative) build fixes for EFL, GTK and Qt after r144218.
1894
1895         * CMakeLists.txt:
1896         * DerivedSources.pri:
1897         * GNUmakefile.list.am:
1898         * Target.pri:
1899
1900 2013-02-27  John Bauman  <jbauman@chromium.org>
1901
1902         Plugin in iframe may not display
1903         https://bugs.webkit.org/show_bug.cgi?id=109879
1904
1905         Reviewed by Simon Fraser.
1906
1907         Update geometry when cliprect changes.
1908
1909         * WebProcess/Plugins/PluginView.cpp:
1910         (WebKit::PluginView::clipRectChanged):
1911         * WebProcess/Plugins/PluginView.h:
1912
1913 2013-02-27  Jer Noble  <jer.noble@apple.com>
1914
1915         REGRESSION (48533): Full-frame plugins stopped working (download instead of loading the plugin)
1916         https://bugs.webkit.org/show_bug.cgi?id=111003
1917
1918         Reviewed by Anders Carlsson.
1919
1920         Also query the Page's pluginData when determining whether a given MIME type can be shown.
1921
1922         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1923         (WKBundlePageCanShowMIMEType):
1924         * WebProcess/WebPage/WebPage.cpp:
1925         (WebKit::WebPage::canShowMIMEType):
1926         * WebProcess/WebPage/WebPage.h:
1927
1928 2013-02-27  Manuel Rego Casasnovas  <rego@igalia.com>
1929
1930         Add smartInsertDeleteEnabled setting to WebCore::Page
1931         https://bugs.webkit.org/show_bug.cgi?id=107840
1932
1933         Reviewed by Ryosuke Niwa.
1934
1935         * Shared/WebPageCreationParameters.cpp:
1936         (WebKit::WebPageCreationParameters::encode):
1937         (WebKit::WebPageCreationParameters::decode): Remove code related to
1938         isSmartInsertDeleteEnabled.
1939         * Shared/WebPageCreationParameters.h:
1940         (WebPageCreationParameters): Remove isSmartInsertDeleteEnabled.
1941         * Shared/WebPreferencesStore.h:
1942         (WebKit): Add macro for smartInsertDeleteEnabled setting.
1943         * UIProcess/API/C/WKPreferences.cpp:
1944         (WKPreferencesSetSmartInsertDeleteEnabled):
1945         (WKPreferencesGetSmartInsertDeleteEnabled): Implement methods using the
1946         new setting.
1947         * UIProcess/API/C/WKPreferencesPrivate.h: Add new methods headers.
1948         * UIProcess/WebPageProxy.cpp:
1949         (WebKit::WebPageProxy::initializeWebPage): Set smartInsertDeleteEnabled
1950         setting using m_isSmartInsertDeleteEnabled to keep initial value on Mac.
1951         (WebKit::WebPageProxy::creationParameters): Remove usage of
1952         parameters.isSmartInsertDeleteEnabled.
1953         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1954         (WebKit::WebEditorClient::smartInsertDeleteEnabled): Enable method for
1955         all platforms.
1956         * WebProcess/WebPage/WebPage.cpp:
1957         (WebKit::WebPage::WebPage): Remove m_isSmartInsertDeleteEnabled
1958         initialization.
1959         (WebKit::WebPage::updatePreferences): Set smartInsertDeleteEnabled
1960         setting.
1961         (WebKit::WebPage::isSmartInsertDeleteEnabled): Implement method using
1962         settings.
1963         (WebKit):
1964         (WebKit::WebPage::setSmartInsertDeleteEnabled): Implement method using
1965         settings.
1966         * WebProcess/WebPage/WebPage.h:
1967         (WebPage): Enable methods dealing with smartInsertDeleteEnabled for all
1968         platforms and remove m_isSmartInsertDeleteEnabled as it will be a
1969         setting.
1970
1971
1972 2013-02-27  Anders Carlsson  <andersca@apple.com>
1973
1974         More storage scaffolding
1975         https://bugs.webkit.org/show_bug.cgi?id=110997
1976
1977         Reviewed by Andreas Kling.
1978
1979         * DerivedSources.make:
1980         Add StorageAreaProxy.
1981         
1982         * UIProcess/Storage/StorageManager.cpp:
1983         (WebKit::StorageManager::setItem):
1984         Send back a DidSetItem message.
1985         
1986         * WebKit2.xcodeproj/project.pbxproj:
1987         Add generated files.
1988
1989         * WebProcess/Storage/StorageAreaProxy.cpp:
1990         (WebKit::StorageAreaProxy::StorageAreaProxy):
1991         Add the message receiver.
1992         
1993         (WebKit::StorageAreaProxy::~StorageAreaProxy):
1994         Remove the message receiver.
1995         
1996         (WebKit::StorageAreaProxy::didSetItem):
1997         add stub.
1998
1999         * WebProcess/Storage/StorageAreaProxy.h:
2000         (StorageAreaProxy):
2001         * WebProcess/Storage/StorageAreaProxy.messages.in: Added.
2002
2003 2013-02-27  Sam Weinig  <sam@webkit.org>
2004
2005         REGRESSION: Loading flash switches to discrete graphics, 100 MB on membuster
2006         <rdar://problem/13229828>
2007
2008         Reviewed by Dan Bernstein.
2009
2010         Due the change in CFBundleIdentifier, the WebProcess and PluginProcess were
2011         unnecessarily muxing (they used to be whitelisted by OpenGL) to the discrete
2012         GPU.
2013
2014         * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
2015         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
2016         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
2017         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
2018         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
2019         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
2020         Add NSSupportsAutomaticGraphicsSwitching YES.
2021
2022         * WebKit2.xcodeproj/project.pbxproj:
2023         Re-add the PluginService.32-64.Info.plist plist to the project file.
2024
2025 2013-02-26  Alexey Proskuryakov  <ap@apple.com>
2026
2027         Don't add a body to platform request until necessary
2028         https://bugs.webkit.org/show_bug.cgi?id=110900
2029
2030         Reviewed by Brady Eidson.
2031
2032         * NetworkProcess/NetworkResourceLoader.cpp:
2033         (WebKit::NetworkResourceLoader::willSendRequest): Restore body after IPC. There
2034         is no way for the client to change it.
2035
2036         * Shared/Downloads/mac/DownloadMac.mm:
2037         (WebKit::Download::start):
2038         (WebKit::Download::startWithHandle):
2039         Pass UpdateHTTPBody when passing a request to NSURLConnection.
2040
2041         * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encodePlatformData):
2042         Never serialize the request body. It's slow, and sometimes impossible, so just
2043         keeping things consistent.
2044
2045         * Shared/mac/WebURLRequestMac.mm: (WebKit::WebURLRequest::platformRequest):
2046         Pass DoNotUpdateHTTPBody, as we can't update it outside NetworkProcess.
2047
2048         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2049         (WebKit::CustomProtocolManagerProxy::startLoading): Ditto.
2050
2051         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
2052         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
2053         Restore existing body after a client call..
2054
2055         * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformCanHandleRequest):
2056         Pass DoNotUpdateHTTPBody, as we can't update it outside NetworkProcess.
2057
2058 2013-02-27  Glenn Adams  <glenn@skynav.com>
2059
2060         Add ENABLE_CSS3_TEXT_LINE_BREAK flag.
2061         https://bugs.webkit.org/show_bug.cgi?id=110944
2062
2063         Reviewed by Dean Jackson.
2064
2065         * Configurations/FeatureDefines.xcconfig:
2066
2067 2013-02-27  Michael Brüning  <michael.bruning@digia.com>
2068
2069         [Qt][WK2] Replace use of WebPreferences with use of WKPrefences C API
2070         https://bugs.webkit.org/show_bug.cgi?id=108952
2071
2072         Reviewed by Simon Hausmann.
2073
2074         Signed off for WebKit2 by Benjamin Poulain.
2075
2076         This patch moves the view classes and preferences in the Qt API
2077         to use the C API for accessing and manipulating preferences as
2078         part of the cleanup and move towards using the C API as base for
2079         the Qt WebKit2 API.
2080
2081         Adds the function WebKit::adoptToQString for convenience when
2082         dealing with QString and copied String objects.
2083
2084         Removes the ScrollAnimatorEnabled options from QWebPreferences.
2085
2086         * UIProcess/API/cpp/qt/WKStringQt.cpp:
2087         (WebKit::adoptToQString):
2088         * UIProcess/API/cpp/qt/WKStringQt.h:
2089         (WebKit):
2090         * UIProcess/API/qt/qquickwebview.cpp:
2091         (QQuickWebViewPrivate::initialize):
2092         * UIProcess/API/qt/qwebpreferences.cpp:
2093         (QWebPreferencesPrivate::testAttribute):
2094         (QWebPreferencesPrivate::setAttribute):
2095         (QWebPreferencesPrivate::setFontFamily):
2096         (QWebPreferencesPrivate::fontFamily):
2097         (QWebPreferencesPrivate::setFontSize):
2098         (QWebPreferencesPrivate::fontSize):
2099         * UIProcess/API/qt/qwebpreferences_p.h:
2100         * UIProcess/API/qt/qwebpreferences_p_p.h:
2101
2102 2013-02-26  Anders Carlsson  <andersca@apple.com>
2103
2104         Implement StorageAreaProxy::getItem and StorageAreaProxy::setItem
2105         https://bugs.webkit.org/show_bug.cgi?id=110927
2106
2107         Reviewed by Sam Weinig.
2108
2109         * UIProcess/Storage/StorageManager.cpp:
2110         (WebKit::StorageManager::setItem):
2111         * UIProcess/Storage/StorageManager.h:
2112         Add empty stub.
2113         
2114         * UIProcess/Storage/StorageManager.messages.in:
2115         Add SetItem message.
2116
2117         * WebProcess/Storage/StorageAreaProxy.cpp:
2118         (WebKit::StorageAreaProxy::getItem):
2119         Fill the storage map and get the item from it.
2120
2121         (WebKit::StorageAreaProxy::setItem):
2122         Update the storage map and send a SetItem message to the UI process.
2123
2124 2013-02-26  Anders Carlsson  <andersca@apple.com>
2125
2126         StorageAreaProxy should hold on to a StorageMap and not a HashMap
2127         https://bugs.webkit.org/show_bug.cgi?id=110919
2128
2129         Reviewed by Jessie Berlin.
2130
2131         Create a storage map instead of a hash map.
2132
2133         * WebProcess/Storage/StorageAreaProxy.cpp:
2134         (WebKit::StorageAreaProxy::length):
2135         (WebKit::StorageAreaProxy::loadValuesIfNeeded):
2136         * WebProcess/Storage/StorageAreaProxy.h:
2137         (WebCore):
2138         (StorageAreaProxy):
2139
2140 2013-02-26  Anders Carlsson  <andersca@apple.com>
2141
2142         Fix a copy/paste error in WebLoaderClient::didBlockInsecurePluginVersion
2143         https://bugs.webkit.org/show_bug.cgi?id=110914
2144         <rdar://problem/13297581>
2145
2146         Reviewed by Beth Dakin.
2147
2148         Pass kWKErrorCodeInsecurePlugInVersion to the pluginDidFail callback.
2149
2150         * UIProcess/WebLoaderClient.cpp:
2151         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
2152
2153 2013-02-26  Jer Noble  <jer.noble@apple.com>
2154
2155         Unreviewed build fix; use correct macro for platform name in FeatureDefines.xcconfig.
2156
2157         * Configurations/FeatureDefines.xcconfig:
2158
2159 2013-02-26  Manuel Rego Casasnovas  <rego@igalia.com>
2160
2161         [WK2][GTK] REGRESSION (r143463): unit test failure in WebKit2APITests/TestContextMenu
2162         https://bugs.webkit.org/show_bug.cgi?id=110869
2163
2164         Reviewed by Martin Robinson.
2165
2166         Test was failing because of new media controls needs more space to be
2167         painted than just 10x10 pixels.
2168
2169         * UIProcess/API/gtk/tests/TestContextMenu.cpp:
2170         (testContextMenuDefaultMenu): Modified test in order to give more space
2171         to the media controls.
2172
2173 2013-02-26  Dean Jackson  <dino@apple.com>
2174
2175         Draw intermediate snapshots if possible
2176         https://bugs.webkit.org/show_bug.cgi?id=110811
2177
2178         Reviewed by Simon Fraser.
2179
2180         After http://webkit.org/b/110495 we delayed snapshotting until we've
2181         received a nice image, but this made the page look like it is broken.
2182         We should draw any intermediate snapshots that we find, which might
2183         include content such as progress bars/spinners.
2184
2185         * WebProcess/Plugins/PluginView.cpp:
2186         (WebKit): Reinstate 60 attempts at snapshots before giving up.
2187         (WebKit::PluginView::isAcceleratedCompositingEnabled): We do not
2188         want accelerated compositing enabled when we are trying to capture
2189         snapshots.
2190
2191 2013-02-26  Andras Becsi  <andras.becsi@digia.com>
2192
2193         Remove nonexistent StringPairVector.h from Target.pri after r142839
2194
2195         Unreviewed gardening.
2196
2197         * Target.pri:
2198
2199 2013-02-26  Simon Hausmann  <simon.hausmann@digia.com>
2200
2201         Unreviewed trivial !ENABLE(NETSCAPE_PLUGIN_API) build fix
2202
2203         Add an intermediate pluginName string variable instead of
2204         accessing plugin.info outside the feature #ifdef.
2205
2206         * UIProcess/WebPageProxy.cpp:
2207         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
2208
2209 2013-02-25  Huang Dongsung  <luxtella@company100.net>
2210
2211         Coordinated Graphics: remove redundant update of non compositing layer.
2212         https://bugs.webkit.org/show_bug.cgi?id=110444
2213
2214         Reviewed by Noam Rosenthal.
2215
2216         Currently, we update non compositing layer when the page scrolled. However, it
2217         is not needed, because TiledBackingStore can scroll without tile update.
2218
2219         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2220         (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
2221         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2222         (CoordinatedLayerTreeHost):
2223
2224 2013-02-25  Jer Noble  <jer.noble@apple.com>
2225
2226         REGRESSION(r143981): Crash in WebFrameLoaderClient::dispatchDidStartProvisionalLoad()
2227         https://bugs.webkit.org/show_bug.cgi?id=110848
2228
2229         Reviewed by Ryosuke Niwa.
2230
2231         NULL-check the result of document->documentElement().
2232
2233         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2234         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
2235
2236 2013-02-25  Anders Carlsson  <andersca@apple.com>
2237
2238         Add a new unavailablePluginButtonClicked callback that takes a WKDictionary of plug-in information
2239         https://bugs.webkit.org/show_bug.cgi?id=110821
2240
2241         Reviewed by Beth Dakin.
2242
2243         * UIProcess/API/C/WKPage.cpp:
2244         (WKPageGetPluginInformationPluginspageAttributeURLKey):
2245         (WKPageGetPluginInformationPluginURLKey):
2246         Add two new API key getters.
2247         
2248         * UIProcess/API/C/WKPage.h:
2249         Add a new callback and deprecate the old callback.
2250         
2251         * UIProcess/WebLoaderClient.cpp:
2252         (WebKit::WebLoaderClient::didFailToInitializePlugin):
2253         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
2254         (WebKit::WebLoaderClient::pluginLoadPolicy):
2255         Make the pluginInformationDictionary a static member function of WebPageProxy so it
2256         can be called from WebUIClient as well.
2257         
2258         * UIProcess/WebPageProxy.cpp:
2259         (WebKit::WebPageProxy::getPluginPath):
2260         Pass the bundle version as well.
2261
2262         (WebKit::WebPageProxy::pluginInformationPluginspageAttributeURLKey):
2263         (WebKit::WebPageProxy::pluginInformationPluginURLKey):
2264         Add two new keys.
2265
2266         (WebKit::WebPageProxy::pluginInformationDictionary):
2267         Handle more keys.
2268
2269         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
2270         Get the plug-in bundle identifier and version.
2271
2272         * UIProcess/WebPageProxy.messages.in:
2273         Pass along more information; the frame and page URLs.
2274
2275         * UIProcess/WebUIClient.cpp:
2276         (WebKit::WebUIClient::unavailablePluginButtonClicked):
2277         Call the new callback if it's supported.
2278
2279         * UIProcess/WebUIClient.h:
2280         (WebUIClient):
2281         * UIProcess/mac/WebInspectorProxyMac.mm:
2282         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2283         Update for API changes.
2284
2285         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2286         (WebKit::WebChromeClient::unavailablePluginButtonClicked):
2287         Ensure that the pluginspage attribute is a valid URL.
2288
2289 2013-02-21  Jeffrey Pfau  <jpfau@apple.com>
2290
2291         Optionally partition cache to prevent using cache for tracking
2292         https://bugs.webkit.org/show_bug.cgi?id=110269
2293
2294         Reviewed by Maciej Stachowiak.
2295
2296         Update WKSI bindings and add feature defines.
2297
2298         * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
2299         * WebCoreSupport/WebSystemInterface.mm:
2300         (InitWebCoreSystemInterface):
2301
2302 2013-02-25  Jer Noble  <jer.noble@apple.com>
2303
2304         Normalize ENABLE_ENCRYPTED_MEDIA definitions across all FeatureDefines files.
2305         https://bugs.webkit.org/show_bug.cgi?id=110806
2306
2307         Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090.
2308
2309         Reviewed by Alexey Proskuryakov.
2310
2311         * Configurations/FeatureDefines.xcconfig:
2312
2313 2013-02-25  Jer Noble  <jer.noble@apple.com>
2314
2315         Full screen mode should not exit when application resigns active state.
2316         https://bugs.webkit.org/show_bug.cgi?id=106129
2317
2318         Reviewed by Darin Adler.
2319
2320         Now that full screen windows get their own full screen space, there is no reason to exit full
2321         screen mode when the application resigns active state. Instead, the windowserver will bring the
2322         space containing the newly active application to the foreground. The user can then swipe back
2323         to the full screen space (or use Mission Control) to get back to the full screen window.
2324
2325         * UIProcess/mac/WKFullScreenWindowController.mm:
2326         (-[WKFullScreenWindowController windowDidLoad]): Remove the applicationDidResignActive: notification from WKFullScreenWindowController.
2327
2328 2013-02-25  Jer Noble  <jer.noble@apple.com>
2329
2330         Safari shows empty window and paints webpage in full-screen background
2331         https://bugs.webkit.org/show_bug.cgi?id=103712
2332
2333         Reviewed by Darin Adler.
2334
2335         When canceling full screen mode due to a provisional load, exit normally instead of closing the
2336         full screen window controller. Additionally, to ensure full screen is cancelled when the enclosing
2337         frame around a full screen iframe is navigated, check to see if the navigating document contains
2338         a full screen element, rather than checking whether the document itself is full screen.
2339
2340         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2341         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
2342
2343 2013-02-25  Anders Carlsson  <andersca@apple.com>
2344
2345         Fix build.
2346
2347         * UIProcess/WebPageProxy.cpp:
2348         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
2349
2350 2013-02-25  Anders Carlsson  <andersca@apple.com>
2351
2352         Add a new pluginDidFail callback that takes a WKDictionary of plug-in information
2353         https://bugs.webkit.org/show_bug.cgi?id=110793
2354         <rdar://problem/13265303>
2355
2356         Reviewed by Sam Weinig.
2357
2358         Add a new pluginDidFail callback that takes a WKDictionaryRef and also pass in the
2359         frame and page URLs.
2360
2361         * UIProcess/API/C/WKPage.h:
2362         * UIProcess/WebLoaderClient.cpp:
2363         (WebKit::pluginInformationDictionary):
2364         (WebKit::WebLoaderClient::didFailToInitializePlugin):
2365         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
2366         (WebKit::WebLoaderClient::pluginLoadPolicy):
2367         * UIProcess/WebLoaderClient.h:
2368         * UIProcess/WebPageProxy.cpp:
2369         (WebKit::WebPageProxy::didFailToInitializePlugin):
2370         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
2371         * UIProcess/WebPageProxy.h:
2372         * UIProcess/WebPageProxy.messages.in:
2373         * WebProcess/Plugins/PluginView.cpp:
2374         (WebKit::PluginView::didFailToInitializePlugin):
2375         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2376         (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
2377         * WebProcess/WebPage/WebPage.cpp:
2378         (WebKit::WebPage::createPlugin):
2379
2380 2013-02-25  Tim Horton  <timothy_horton@apple.com>
2381
2382         PDFPlugin: Tab between text annotations
2383         https://bugs.webkit.org/show_bug.cgi?id=106539
2384         <rdar://problem/12751789>
2385
2386         Reviewed by Darin Adler.
2387
2388         Use [PDFLayerController activateNextAnnotation:] to advance focus when the tab key is hit while inside a PDF form.
2389
2390         Also, a drive-by fix to make the lifetime of PDFPluginAnnotationEventListener's m_annotation pointer more explicit.
2391
2392         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add activateNextAnnotation: SPI.
2393         * WebProcess/Plugins/PDF/PDFPlugin.h:
2394         (PDFPlugin): Add focus(Next|Previous)Annotation.
2395         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2396         (WebKit::PDFPlugin::focusNextAnnotation): Ask PDFLayerController to focus the next annotation.
2397         (WebKit::PDFPlugin::focusPreviousAnnotation): Ask PDFLayerController to focus the next annotation.
2398         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h: Drive-by, initialize m_parent to 0.
2399         (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::setAnnotation): Added.
2400         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
2401         (WebKit::PDFPluginAnnotation::attach): Use eventNames() instead of string literals.
2402         (WebKit::PDFPluginAnnotation::~PDFPluginAnnotation): Clear the event listener's reference to its annotation.
2403         (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent): Null-check the event listener's annotation.
2404         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
2405         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotation): Create our PDFPluginTextAnnotationEventListener.
2406         (PDFPluginTextAnnotationEventListener): Added an event listener (for keydown events in form fields).
2407         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::create):
2408         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::setTextAnnotation):
2409         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::PDFPluginTextAnnotationEventListener):
2410         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
2411         (WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation): Unregister our keydown event listener.
2412         (WebKit::PDFPluginTextAnnotation::createAnnotationElement): Register our keydown event listener.
2413         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::handleEvent): Ask PDFPlugin to focus
2414         the next/previous annotation when the tab key is pressed (Shift-Tab goes backwards).
2415
2416 2013-02-25  Alexey Proskuryakov  <ap@apple.com>
2417
2418         <rdar://problem/12976385> Remove rule to silence attempts to create the ~/Library/Caches/com.apple.WebKit2.WebProcessService directory
2419
2420         Reviewed by Anders Carlsson.
2421
2422         * WebProcess/com.apple.WebProcess.sb.in: Remove the obsolete rule. We no longer
2423         have a "WebProcessService".
2424
2425 2013-02-25  Andras Becsi  <andras.becsi@digia.com>
2426
2427         [Qt][WK2] Remove unneeded method didResumeContent from PageViewportController clients
2428         https://bugs.webkit.org/show_bug.cgi?id=110751
2429
2430         Reviewed by Jocelyn Turcotte.
2431
2432         This is a clean-up in the PageViewportController clients that removes leftover
2433         code from previous design that is partially unused and unnecessary, to simplify
2434         the interaction between PageViewportController and clients.
2435
2436         * UIProcess/PageViewportController.cpp:
2437         (WebKit::PageViewportController::resumeContent):
2438         * UIProcess/PageViewportControllerClient.h:
2439         (PageViewportControllerClient):
2440         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
2441         * UIProcess/efl/PageViewportControllerClientEfl.h:
2442         (PageViewportControllerClientEfl):
2443         * UIProcess/qt/PageViewportControllerClientQt.cpp:
2444         (WebKit::PageViewportControllerClientQt::animateContentRectVisible):
2445         (WebKit::PageViewportControllerClientQt::flickMoveEnded):
2446         (WebKit::PageViewportControllerClientQt::resumeAndUpdateContent):
2447         (WebKit::PageViewportControllerClientQt::pinchGestureCancelled):
2448         * UIProcess/qt/PageViewportControllerClientQt.h:
2449         (PageViewportControllerClientQt):
2450
2451 2013-02-25  Andreas Kling  <akling@apple.com>
2452
2453         Reduce amount of code that includes StylePropertySet.h
2454         <http://webkit.org/b/101149>
2455
2456         Reviewed by Antti Koivisto.
2457
2458         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2459
2460 2013-02-24  Andreas Kling  <akling@apple.com>
2461
2462         Reduce include graph of JSDOMBinding.h
2463         <http://webkit.org/b/110709>
2464
2465         Reviewed by Antti Koivisto.
2466
2467         * Shared/WebRenderObject.cpp:
2468         (WebKit::WebRenderObject::WebRenderObject):
2469         * WebProcess/Storage/StorageAreaProxy.cpp:
2470
2471 2013-02-22  Sam Weinig  <sam@webkit.org>
2472
2473         Add temporary work around for 32-bit plugins not working in production builds as XPCServices
2474         https://bugs.webkit.org/show_bug.cgi?id=110680
2475         <rdar://problem/13236883>
2476
2477         Reviewed by Anders Carlsson.
2478
2479         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2480         (WebKit::shouldUseXPC):
2481         Temporarily don't use XPC for plug-ins for Safari while we figure out why the
2482         32-bit XPCService is being built universal.
2483
2484 2013-02-22  Tim Horton  <timothy_horton@apple.com>
2485
2486         [WK2] The root and page overlay layers should be the size of the view, not the content
2487         https://bugs.webkit.org/show_bug.cgi?id=110660
2488         <rdar://problem/13096456>
2489
2490         Reviewed by Simon Fraser.
2491
2492         Use the view size for the size of the root and page overlay layers.
2493         For one, we never update these layers' sizes when the content size changes, causing size mismatches.
2494         In addition, there's no reason an overlay shouldn't be able to draw outside of the bounds of the content.
2495
2496         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2497         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
2498         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
2499
2500 2013-02-22  Anders Carlsson  <andersca@apple.com>
2501
2502         pluginLoadStrategy should take a WKDictionaryRef for extensibility
2503         https://bugs.webkit.org/show_bug.cgi?id=110656
2504         <rdar://problem/13265303>
2505
2506         Reviewed by Jessie Berlin.
2507
2508         Change pluginLoadStrategy to take a WKDictionaryRef instead of a number of parameters;
2509         this lets us add more plug-in information if needed. Also add the page URL and rename documentURL to frameURL.
2510
2511         * UIProcess/API/C/WKPage.cpp:
2512         (WKPageGetPluginInformationBundleIdentifierKey):
2513         (WKPageGetPluginInformationBundleVersionKey):
2514         (WKPageGetPluginInformationDisplayNameKey):
2515         (WKPageGetPluginInformationFrameURLKey):
2516         (WKPageGetPluginInformationMIMETypeKey):
2517         (WKPageGetPluginInformationPageURLKey):
2518         * UIProcess/API/C/WKPage.h:
2519         * UIProcess/WebLoaderClient.cpp:
2520         (WebKit):
2521         (WebKit::WebLoaderClient::pluginLoadPolicy):
2522         * UIProcess/WebLoaderClient.h:
2523         (WebLoaderClient):
2524         * UIProcess/WebPageProxy.cpp:
2525         (WebKit::WebPageProxy::getPluginPath):
2526         (WebKit::WebPageProxy::pluginInformationBundleIdentifierKey):
2527         (WebKit):
2528         (WebKit::WebPageProxy::pluginInformationBundleVersionKey):
2529         (WebKit::WebPageProxy::pluginInformationDisplayNameKey):
2530         (WebKit::WebPageProxy::pluginInformationFrameURLKey):
2531         (WebKit::WebPageProxy::pluginInformationMIMETypeKey):
2532         (WebKit::WebPageProxy::pluginInformationPageURLKey):
2533         * UIProcess/WebPageProxy.h:
2534         (WebPageProxy):
2535         * UIProcess/WebPageProxy.messages.in:
2536         * WebProcess/WebPage/WebPage.cpp:
2537         (WebKit::WebPage::createPlugin):
2538         (WebKit::WebPage::canPluginHandleResponse):
2539
2540 2013-02-22  Anders Carlsson  <andersca@apple.com>
2541
2542         Move pluginLoadPolicy to the page loader client
2543         https://bugs.webkit.org/show_bug.cgi?id=110635
2544         <rdar://problem/13265303>
2545         
2546         Reviewed by Sam Weinig.
2547
2548         Move the pluginLoadPolicy callback to the page loader client where it belongs.
2549
2550         * UIProcess/API/C/WKPage.h:
2551         * UIProcess/WebLoaderClient.cpp:
2552         (WebKit::toWKPluginLoadPolicy):
2553         (WebKit):
2554         (WebKit::toPluginModuleLoadPolicy):
2555         (WebKit::WebLoaderClient::pluginLoadPolicy):
2556         * UIProcess/WebLoaderClient.h:
2557         (WebLoaderClient):
2558         * UIProcess/WebPageProxy.cpp:
2559         (WebKit::WebPageProxy::getPluginPath):
2560         * UIProcess/WebUIClient.cpp:
2561         (WebKit):
2562         * UIProcess/WebUIClient.h:
2563         (WebUIClient):
2564         * UIProcess/mac/WebInspectorProxyMac.mm:
2565         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2566
2567 2013-02-21  Jer Noble  <jer.noble@apple.com>
2568
2569         Two video contollers appear after exiting the fullscreen video when using menubar to exit.
2570         https://bugs.webkit.org/show_bug.cgi?id=110506
2571
2572         Reviewed by Eric Carlson.
2573
2574         When we are notified that the fullscreen window is about to exit fullscreen mode unrequested,
2575         call requestExitFullScreen(), as that will result in Document::webkitExitFullScreen() correctly
2576         tearing down the fullscreen state.
2577
2578         * UIProcess/mac/WKFullScreenWindowController.mm:
2579         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
2580
2581 2013-02-22  Balazs Kelemen  <kbalazs@webkit.org>
2582
2583         Yet another unreviewed buildfix after r143714.
2584
2585         * UIProcess/efl/WebView.cpp:
2586         (WebKit::WebView::paintToCairoSurface):
2587
2588 2013-02-22  Balazs Kelemen  <kbalazs@webkit.org>
2589
2590         Unreviewed preventive buildfix after my last commit.
2591
2592         * UIProcess/API/efl/EwkView.cpp:
2593         * UIProcess/efl/WebView.cpp:
2594
2595 2013-02-22  Balazs Kelemen  <kbalazs@webkit.org>
2596
2597         [CoordGfx] Minor cleanup in CoordinatedGraphicsScene::paintToGraphicsContext
2598         https://bugs.webkit.org/show_bug.cgi?id=109824
2599
2600         Reviewed by Andreas Kling.
2601
2602         Avoid ugly ifdefs by using PlatformGraphicsContext.
2603
2604         * UIProcess/API/efl/EwkView.cpp:
2605         (EwkView::displayTimerFired):
2606
2607 2013-02-22  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2608
2609         [WK2][EFL] Remove declaration of non-existent functions from EwkView
2610         https://bugs.webkit.org/show_bug.cgi?id=110572
2611
2612         Reviewed by Kenneth Rohde Christiansen.
2613
2614         Removed declarations of non-existent EwkView::paintToCurrentGLContext() and
2615         EwkView::paintToCairoSurface(cairo_surface_t*) that were accidentally
2616         left at r143699.
2617
2618         * UIProcess/API/efl/EwkView.h:
2619         (EwkView):
2620
2621 2013-02-22  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2622
2623         [WK2][EFL] Clean up PageViewportControllerClientEfl class
2624         https://bugs.webkit.org/show_bug.cgi?id=110438
2625
2626         Reviewed by Andreas Kling.
2627
2628         Cleaned up PageViewportControllerClientEfl class from unused methods
2629         and class members, eliminated access to WK2 internals from this class.
2630
2631         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
2632         (WebKit::PageViewportControllerClientEfl::didChangeContentsSize):
2633         * UIProcess/efl/PageViewportControllerClientEfl.h:
2634         (WebKit::PageViewportControllerClientEfl::~PageViewportControllerClientEfl):
2635         (PageViewportControllerClientEfl):
2636         * UIProcess/efl/WebView.cpp:
2637         (WebKit::WebView::WebView):
2638         (WebKit::WebView::updateViewportSize):
2639
2640 2013-02-22  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2641
2642         [WK2][EFL][GTK][Qt] Add context menu item tags for C API
2643         https://bugs.webkit.org/show_bug.cgi?id=109815
2644
2645         Reviewed by Anders Carlsson.
2646
2647         This patch adds context menu item tags used by EFL, GTK and Qt ports, defined in
2648         WebCore to WK2 C API.
2649
2650         * Shared/API/c/WKContextMenuItemTypes.h:
2651         * Shared/API/c/WKSharedAPICast.h:
2652         (WebKit::toAPI):
2653         (WebKit::toImpl):
2654
2655 2013-02-22  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2656
2657         [WK2][EFL] Move AC code from EwkView to WebView
2658         https://bugs.webkit.org/show_bug.cgi?id=110216
2659
2660         Reviewed by Anders Carlsson.
2661
2662         Accelerated compositing code is moved from EwkView to WebView.
2663         Added new WKView API to be used from EwkView instead of direct accessing
2664         to coordinated graphics scene.
2665
2666         * UIProcess/API/C/efl/WKView.cpp:
2667         (WKViewSetUserViewportTranslation):
2668         (WKViewUserViewportToContents):
2669         (WKViewPaintToCurrentGLContext):
2670         (WKViewPaintToCairoSurface):
2671         * UIProcess/API/C/efl/WKView.h:
2672
2673             Added WKView API functions.
2674
2675         * UIProcess/API/efl/EwkView.cpp:
2676         (EwkView::EwkView):
2677         (EwkView::displayTimerFired):
2678         (EwkView::feedTouchEvent):
2679         (EwkView::createGLSurface):
2680         (EwkView::handleEvasObjectCalculate):
2681         (EwkView::handleEwkViewMouseWheel):
2682         (EwkView::handleEwkViewMouseDown):
2683         (EwkView::handleEwkViewMouseUp):
2684         (EwkView::handleEwkViewMouseMove):
2685         * UIProcess/API/efl/EwkView.h:
2686         (EwkView):
2687
2688             Using new WKView API.
2689
2690         * UIProcess/efl/WebView.cpp:
2691         (WebKit::WebView::initialize):
2692         (WebKit):
2693         (WebKit::WebView::paintToCurrentGLContext):
2694         (WebKit::WebView::paintToCairoSurface):
2695         (WebKit::WebView::userViewportToContents):
2696         (WebKit::WebView::transformFromScene):
2697         (WebKit::WebView::transformToScene):
2698         (WebKit::WebView::coordinatedGraphicsScene):
2699         (WebKit::WebView::enterAcceleratedCompositingMode):
2700         (WebKit::WebView::exitAcceleratedCompositingMode):
2701         * UIProcess/efl/WebView.h:
2702         (WebCore):
2703         (WebKit::WebView::setUserViewportTranslation):
2704         (WebView):
2705
2706             Added WebView methods to support new WKView API.
2707
2708 2013-02-21  Dima Gorbik  <dgorbik@apple.com>
2709
2710         QuickTime plugin doesn't load when accelerated compositing is disabled
2711         https://bugs.webkit.org/show_bug.cgi?id=110534
2712
2713         Reviewed by Anders Carlsson.
2714
2715         We shouldn't disable accelerated compositing for plugins, because
2716         plugins such as QuickTime rely on this and will try to set other drawing
2717         models that we don't support.
2718
2719         * WebProcess/Plugins/PluginView.cpp:
2720         (WebKit::PluginView::isAcceleratedCompositingEnabled):
2721
2722 2013-02-21  Dean Jackson  <dino@apple.com>
2723
2724         Plug-in snapshotting code always accepts first snapshot
2725         https://bugs.webkit.org/show_bug.cgi?id=110495
2726
2727         Reviewed by Tim Horton.
2728
2729         When we detect a plugin that can be snapshotted we start capturing
2730         images until we find one that we believe isn't blank, or we timeout.
2731         I introduced a regression recently where we swap renderers as
2732         soon as the snapshot arrives, whether or not is is blank.
2733
2734         The fix was to have the embedder (currently only WK2) be the one
2735         who tells the HTMLPlugInElement to start displaying snapshots.
2736
2737         * WebProcess/Plugins/PluginView.cpp:
2738         (WebKit::PluginView::pluginSnapshotTimerFired): When we find a
2739         snapshot that we like, tell the HTMLPlugInElement to move to
2740         the snapshot view.
2741
2742 2013-02-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2743
2744         Unreviewed. Fix make distcheck.
2745
2746         * GNUmakefile.am: Add -DBUILDING_WEBKIT flags to introspection
2747         scanner.
2748         * GNUmakefile.list.am: Add missing header to compilation and
2749         remove one that no longer exists.
2750
2751 2013-02-21  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2752
2753         [WK2][EFL] Move PageViewportController and PageViewportControllerClientEfl out from WebView
2754         https://bugs.webkit.org/show_bug.cgi?id=110345
2755
2756         Reviewed by Andreas Kling.
2757
2758         WebView does not need to know about both PageViewportController and 
2759         PageViewportControllerClientEfl. Considering the fact that PageViewportController
2760         will stop being WK2 internal and will be based on WK2 C API, it 
2761         should be owned by EwkView rather than WebView.
2762
2763         This patch is also a preparation for WKViewClient API extension to cover all
2764         the places where PageViewportController and PageViewportControllerClientEfl
2765         are accessed directly from WebView at the moment.
2766
2767         * UIProcess/API/efl/EwkView.cpp:
2768         (EwkView::EwkView):
2769         * UIProcess/API/efl/EwkView.h:
2770         (WebKit):
2771         (EwkView::pageViewportControllerClient):
2772         (EwkView::pageViewportController):
2773         (EwkView):
2774         * UIProcess/efl/WebView.cpp:
2775         (WebKit::WebView::didCommitLoad):
2776         (WebKit::WebView::updateViewportSize):
2777         (WebKit::WebView::didChangeContentsSize):
2778         (WebKit::WebView::didChangeViewportProperties):
2779         (WebKit::WebView::pageDidRequestScroll):
2780         (WebKit::WebView::didRenderFrame):
2781         (WebKit::WebView::pageTransitionViewportReady):
2782         * UIProcess/efl/WebView.h:
2783         (WebView):
2784
2785 2013-02-20  Tim Horton  <timothy_horton@apple.com>
2786
2787         Provide WKView SPI to defer telling the WebPageProxy and WebProcess about changes in the hosting window
2788         https://bugs.webkit.org/show_bug.cgi?id=110415
2789         <rdar://problem/13095405>
2790
2791         Reviewed by Simon Fraser.
2792
2793         * UIProcess/API/mac/WKView.mm: Add _viewInWindowChangesDeferredCount and _viewInWindowChangeWasDeferred to WKViewData.
2794         (-[WKView viewDidMoveToWindow]): If we're deferring window changes, don't include the ViewIsInWindow flag
2795         when sending viewStateDidChange. Instead, save the fact that we want to do that later aside.
2796         (-[WKView beginDeferringViewInWindowChanges]):
2797         (-[WKView endDeferringViewInWindowChanges]): Straightforward begin/end pair. When we exit the last pair and
2798         have a pending window change, let the WebPageProxy know. WebPageProxy will do the check to ensure that
2799         the in-window state has actually changed.
2800         (-[WKView isDeferringViewInWindowChanges]):
2801         * UIProcess/API/mac/WKViewPrivate.h: 
2802
2803 2013-02-20  Kiran Muppala  <cmuppala@apple.com>
2804
2805         Disable window occlusion notifications for App Store on Mac.
2806         https://bugs.webkit.org/show_bug.cgi?id=110417
2807
2808         Reviewed by Simon Fraser.
2809
2810         Temporary fix to workaround issues with window occlusion notifications
2811         in App Store.
2812
2813         * UIProcess/API/mac/WKView.mm:
2814         (+[WKView _registerWindowOcclusionNotificationHandlers]): Return early
2815         if the main bundle identifier matches that of App Store.
2816
2817 2013-02-20  Mark Rowe  <mrowe@apple.com>
2818
2819         <https://webkit.org/b/110410> Specify the plug-in process / service entitlements via the Xcode configuration.
2820
2821         This is the modern mechanism for applying entitlements to production builds,
2822         and it simplifies the maintenance of entitlements going forward. It also allows
2823         us to fix the new XPC PluginServices to have the same entitlements as PluginProcess.
2824
2825         Reviewed by Alexey Proskuryakov.
2826
2827         * Configurations/Base.xcconfig: Ad-hoc sign all WebKit2 components.
2828         * Configurations/PluginProcess.xcconfig: Specify the entitlements to use.
2829         * Configurations/PluginService.32.xcconfig: Ditto.
2830         * Configurations/PluginService.64.xcconfig: Ditto.
2831         * Configurations/PluginService.Development.xcconfig: Ditto.
2832         * Configurations/PluginService.entitlements: Renamed from Source/WebKit2/PluginProcess/mac/PluginProcess.entitlements.
2833         Move the entitlements in to the Configurations directory to make them easier to find.
2834         * PluginProcess/mac/add-entitlements.sh: Removed. In my testing the dependency issue mentioned
2835         in the script is not an issue with current versions of Xcode. If we see it again we can come
2836         up with a workaround that doesn't involve performing the signing via a script phase.
2837         * WebKit2.xcodeproj/project.pbxproj:
2838
2839 2013-02-20  Mark Rowe  <mrowe@apple.com>
2840
2841         <https://webkit.org/b/110409> Remove duplication between 32- and 64-bit PluginService plists.
2842
2843         Reviewed by Dan Bernstein.
2844
2845         The only difference between the plists was the CFBundleIdentifier. Since the values are the
2846         same as the product name, we can just use the value of the PRODUCT_NAME configuration setting.
2847
2848         * Configurations/PluginService.32.xcconfig:
2849         * Configurations/PluginService.64.xcconfig:
2850         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: Renamed from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist.
2851         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist: Removed.
2852
2853 2013-02-20  Simon Fraser  <simon.fraser@apple.com>
2854
2855         Zoomed, slow-scrolling pages keep recreating tiles when scrolled
2856         https://bugs.webkit.org/show_bug.cgi?id=110379
2857
2858         Reviewed by Tim Horton.
2859
2860         Make the visible rect and exposed rects passed through
2861         the drawing area to the tile cache FloatRects instead of IntRects.
2862
2863         * UIProcess/API/mac/WKView.mm:
2864         (-[WKView setFrameSize:]):
2865         (-[WKView _updateWindowAndViewFrames]):
2866         (-[WKView enableFrameSizeUpdates]):
2867         (-[WKView setMinimumWidthForAutoLayout:]):
2868         * UIProcess/WebPageProxy.h:
2869         * UIProcess/mac/WebPageProxyMac.mm:
2870         (WebKit::WebPageProxy::viewExposedRectChanged):
2871         * WebProcess/WebPage/DrawingArea.h:
2872         (WebKit::DrawingArea::setExposedRect):
2873         * WebProcess/WebPage/WebPage.cpp:
2874         (WebKit::WebPage::viewExposedRectChanged):
2875         * WebProcess/WebPage/WebPage.h:
2876         * WebProcess/WebPage/WebPage.messages.in:
2877         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2878         (TiledCoreAnimationDrawingArea):
2879         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2880         (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
2881
2882 2013-02-20  Dirk Schulze  <krit@webkit.org>
2883
2884         Enable CANVAS_PATH flag
2885         https://bugs.webkit.org/show_bug.cgi?id=108508
2886
2887         Reviewed by Simon Fraser.
2888
2889         Enable CANVAS_PATH flag on trunk.
2890
2891         * Configurations/FeatureDefines.xcconfig:
2892
2893 2013-02-20  Laszlo Gombos  <l.gombos@samsung.com>
2894
2895         Remove unnecessary includes for Platform.h from headers
2896         https://bugs.webkit.org/show_bug.cgi?id=110300
2897
2898         Reviewed by Alexey Proskuryakov.
2899
2900         wtf/Platform.h only need to be included in a few places directly    
2901         as it is included in config.h. Remove the unnecessay duplicate as    
2902         it can be confusing.
2903
2904         * Shared/PrintInfo.h:
2905
2906 2013-02-20  Huang Dongsung  <luxtella@company100.net>
2907
2908         [WK2] Remove m_viewportSize in WebPage.
2909         https://bugs.webkit.org/show_bug.cgi?id=110311
2910
2911         Reviewed by Anders Carlsson.
2912
2913         EFL and Qt use m_viewSize as a contents size while Apple use it as a viewport
2914         size, so EFL and Qt introduced m_viewportSize to make WebPage know a viewport
2915         size.
2916
2917         EFL and Qt use m_viewSize as a contents size because the size of non compositing
2918         layer is contents size, and EFL and Qt mark whole non compositing layer as dirty
2919         using m_viewSize. Bug 110299 (http://webkit.org/b/110299) changes that it is not
2920         necessary to know m_viewSize when marking whole non compositing layer as dirty.
2921         So we can make EFL and Qt use m_viewSize as a viewport size also.
2922
2923         This patch removes m_viewportSize and related methods to increase readability.
2924
2925         * UIProcess/API/qt/raw/qrawwebview.cpp:
2926         (QRawWebView::setSize):
2927         * UIProcess/PageViewportController.cpp:
2928         (WebKit::PageViewportController::didChangeViewportSize):
2929         * UIProcess/WebPageProxy.cpp:
2930         (WebKit):
2931         * UIProcess/WebPageProxy.h:
2932         (WebPageProxy):
2933         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2934         (WebKit::WebChromeClient::pageRect):
2935         (WebKit::WebChromeClient::contentsSizeChanged):
2936         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2937         (WebKit::DrawingAreaImpl::updateBackingStoreState):
2938         * WebProcess/WebPage/WebPage.cpp:
2939         (WebKit::WebPage::setSize):
2940         (WebKit::WebPage::sendViewportAttributesChanged):
2941         * WebProcess/WebPage/WebPage.h:
2942         (WebPage):
2943         * WebProcess/WebPage/WebPage.messages.in:
2944
2945 2013-02-20  Huang Dongsung  <luxtella@company100.net>
2946
2947         [WK2] add setNeedsDisplay in DrawingArea to mark whole layer as dirty.
2948         https://bugs.webkit.org/show_bug.cgi?id=110299
2949
2950         Reviewed by Anders Carlsson.
2951
2952         Currently, we call setNeedsDisplay with the size of WebPage to mark whole
2953         backing store as dirty. However, the size of non compositing layer can be
2954         inconsistent with the size of WebPage. For example, in Coordinated Graphics, the
2955         size of non compositing layer is contents size.
2956
2957         So, WebPage should not assume the size of non compositing layer, and should just
2958         call setNeedsDisplay when marking whole layer as dirty.
2959
2960         In addition, this patch renames from setNeedsDisplay() with a rect argument to
2961         setNeedsDisplayInRect(), which matches to the terms of GraphicsLayer.
2962
2963         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2964         (WebKit::WebChromeClient::invalidateContentsAndRootView):
2965         (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
2966         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2967         (WebKit::WebFrameLoaderClient::restoreViewState):
2968         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2969         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay):
2970         (WebKit):
2971         (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect):
2972         (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
2973         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2974         (CoordinatedLayerTreeHost):
2975         * WebProcess/WebPage/DrawingArea.h:
2976         (DrawingArea):
2977         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2978         (WebKit::DrawingAreaImpl::setNeedsDisplay):
2979         (WebKit):
2980         (WebKit::DrawingAreaImpl::setNeedsDisplayInRect):
2981         (WebKit::DrawingAreaImpl::scroll):
2982         (WebKit::DrawingAreaImpl::forceRepaint):
2983         (WebKit::DrawingAreaImpl::didUninstallPageOverlay):
2984         (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay):
2985         (WebKit::DrawingAreaImpl::resumePainting):
2986         * WebProcess/WebPage/DrawingAreaImpl.h:
2987         (DrawingAreaImpl):
2988         * WebProcess/WebPage/LayerTreeHost.h:
2989         (LayerTreeHost):
2990         * WebProcess/WebPage/WebPage.cpp:
2991         (WebKit::WebPage::setSize):
2992         (WebKit::WebPage::setDrawsBackground):
2993         (WebKit::WebPage::setDrawsTransparentBackground):
2994         (WebKit::WebPage::resumeActiveDOMObjectsAndAnimations):
2995         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2996         (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay):
2997         (WebKit):
2998         (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect):
2999         (WebKit::LayerTreeHostGtk::scrollNonCompositedContents):
3000         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
3001         (LayerTreeHostGtk):
3002         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3003         (LayerTreeHostMac):
3004         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3005         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay):
3006         (WebKit):
3007         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
3008         (WebKit::LayerTreeHostMac::scrollNonCompositedContents):
3009         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3010         (RemoteLayerTreeDrawingArea):
3011         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3012         (WebKit::RemoteLayerTreeDrawingArea::setNeedsDisplay):
3013         (WebKit):
3014         (WebKit::RemoteLayerTreeDrawingArea::setNeedsDisplayInRect):
3015         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3016         (TiledCoreAnimationDrawingArea):
3017         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3018         (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay):
3019         (WebKit):
3020         (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplayInRect):
3021
3022 2013-02-20  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3023
3024         [EFL][WK2] Port EwkPopupMenuItem to the C API
3025         https://bugs.webkit.org/show_bug.cgi?id=108798
3026
3027         Reviewed by Kenneth Rohde Christiansen.
3028
3029         Make use of the new WKPopupItem C API inside EwkPopupMenuItem to remove
3030         dependency on internal WebPopupItem type. Eina shared string members
3031         are now lazily initialized to make the object cheaper to construct.
3032
3033         * UIProcess/API/efl/ewk_popup_menu.cpp:
3034         (EwkPopupMenu::EwkPopupMenu):
3035         * UIProcess/API/efl/ewk_popup_menu_item.cpp:
3036         (EwkPopupMenuItem::EwkPopupMenuItem):
3037         (EwkPopupMenuItem::type):
3038         (EwkPopupMenuItem::textDirection):
3039         (EwkPopupMenuItem::text):
3040         (EwkPopupMenuItem::tooltipText):
3041         (EwkPopupMenuItem::accessibilityText):
3042         (EwkPopupMenuItem::hasTextDirectionOverride):
3043         (EwkPopupMenuItem::isEnabled):
3044         (EwkPopupMenuItem::isLabel):
3045         (EwkPopupMenuItem::isSelected):
3046         * UIProcess/API/efl/ewk_popup_menu_item_private.h:
3047         (EwkPopupMenuItem::create):
3048         (EwkPopupMenuItem):
3049
3050 2013-02-19  Tim Horton  <timothy_horton@apple.com>
3051
3052         Clarify isInWindow vs. isVisible path through to RenderLayerCompositor
3053         https://bugs.webkit.org/show_bug.cgi?id=110261
3054         <rdar://problem/13196122>
3055
3056         Reviewed by Simon Fraser.
3057
3058         * WebProcess/WebPage/WebPage.cpp:
3059         (WebKit::WebPage::setIsInWindow):
3060         Use Page::setIsInWindow in addition to willMoveOffscreen/didMoveOnscreen.
3061
3062 2013-02-19  Conrad Shultz  <conrad_shultz@apple.com>
3063
3064         Allow UI clients to handle vertical wheel events.
3065         https://bugs.webkit.org/show_bug.cgi?id=110006
3066
3067         Reviewed by Tim Horton.
3068
3069         Add API to allow clients to selectively control rubber-banding at vertical page extrema.
3070
3071         * UIProcess/API/C/WKPage.cpp:
3072         (WKPageRubberBandsAtBottom):
3073         Proxy for the corresponding function in WebCore::Page.
3074         (WKPageSetRubberBandsAtBottom):
3075         Ditto.
3076         (WKPageRubberBandsAtTop):
3077         Ditto.
3078         (WKPageSetRubberBandsAtTop):
3079         Ditto.
3080
3081         * UIProcess/API/C/WKPage.h:
3082         Declare new API.
3083
3084         * UIProcess/WebPageProxy.cpp:
3085         (WebKit::WebPageProxy::WebPageProxy):
3086         Initialize new member variables.
3087         (WebKit::WebPageProxy::setRubberBandsAtBottom):
3088         New function; dispatches a matching message to the WebKit::WebPage.
3089         (WebKit::WebPageProxy::setRubberBandsAtTop):
3090         Ditto.
3091
3092         * UIProcess/WebPageProxy.h:
3093         (WebPageProxy):
3094         Declare new API.
3095         (WebKit::WebPageProxy::rubberBandsAtBottom):
3096         New accessor function.
3097         (WebKit::WebPageProxy::rubberBandsAtTop):
3098         Ditto.
3099
3100         * WebProcess/WebPage/WebPage.cpp:
3101         (WebKit::WebPage::setRubberBandsAtBottom):
3102         New function; call the matching function on the associated WebCore::Page.
3103         (WebKit::WebPage::setRubberBandsAtTop):
3104         Ditto.
3105
3106         * WebProcess/WebPage/WebPage.h:
3107         (WebPage):
3108         Declare new rubber-banding API.
3109
3110         * WebProcess/WebPage/WebPage.messages.in:
3111         Declare new rubber-banding API.
3112
3113 2013-02-19  Anders Carlsson  <andersca@apple.com>
3114
3115         StorageAreaProxy should know its quota
3116         https://bugs.webkit.org/show_bug.cgi?id=110268
3117
3118         Reviewed by Sam Weinig.
3119
3120         Begin stubbing out StorageAreaProxy::setItem and add some quota member variables.
3121
3122         * WebProcess/Storage/StorageAreaProxy.cpp:
3123         (WebKit::StorageAreaProxy::StorageAreaProxy):
3124         (WebKit::StorageAreaProxy::setItem):
3125         * WebProcess/Storage/StorageAreaProxy.h:
3126         (StorageAreaProxy):
3127         * WebProcess/Storage/StorageNamespaceProxy.cpp:
3128         (WebKit::StorageNamespaceProxy::createSessionStorageNamespace):
3129         (WebKit::StorageNamespaceProxy::StorageNamespaceProxy):
3130         * WebProcess/Storage/StorageNamespaceProxy.h:
3131         (WebKit::StorageNamespaceProxy::quota):
3132         (StorageNamespaceProxy):
3133
3134 2013-02-19  Alexey Proskuryakov  <ap@apple.com>
3135
3136         <rdar://problem/13239119> NetworkProcess generates timeout spindump logs
3137
3138         Reviewed by Mark Rowe.
3139
3140         Don't keep a window server connection in processes that don't need it, and don't
3141         run an NSApplication run loop.
3142
3143         * Shared/ChildProcess.h:
3144         * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::shutdownWindowServerConnection):
3145         Added a function to shut down connections, and to make sure we don't get one in the future.
3146
3147         * NetworkProcess/mac/NetworkProcessMac.mm:
3148         (WebKit::NetworkProcess::initializeProcessName):
3149         * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm:
3150         (WebKit::OfflineStorageProcess::initializeProcessName):
3151         * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
3152         (WebKit::SharedWorkerProcess::platformInitializeSharedWorkerProcess): Also removed
3153         some unused includes and forward declarations.
3154
3155 2013-02-18  Alexey Proskuryakov  <ap@apple.com>
3156
3157         [WK2] Cannot load documents with blob urls
3158         https://bugs.webkit.org/show_bug.cgi?id=110160
3159
3160         Reviewed by Sam Weinig.
3161
3162         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::canHandleRequest):
3163         Added knowledge about blobs.
3164
3165 2013-02-19  Carlos Garcia Campos  <cgarcia@igalia.com>
3166
3167         [GTK] Move the API to get TLS certificate from WebKitURIResponse to WebKitWebView
3168         https://bugs.webkit.org/show_bug.cgi?id=110190
3169
3170         Reviewed by Anders Carlsson.
3171
3172         Add webkit_web_view_get_tls_info() and remove
3173         webkit_uri_response_get_https_status(). This way I can be sure
3174         that when called after load has been committed the certificate
3175         will be available. It also makes the API easier to use.
3176
3177         * UIProcess/API/gtk/WebKitURIResponse.cpp:
3178         * UIProcess/API/gtk/WebKitURIResponse.h:
3179         * UIProcess/API/gtk/WebKitURIResponsePrivate.h:
3180         * UIProcess/API/gtk/WebKitWebView.cpp:
3181         (webkitWebViewLoadChanged):
3182         (mainResourceResponseChangedCallback):
3183         (webkit_web_view_get_tls_info):
3184         * UIProcess/API/gtk/WebKitWebView.h:
3185         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3186         * UIProcess/API/gtk/tests/TestSSL.cpp:
3187
3188 2013-02-19  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3189
3190         [WK2][EFL] Eliminate access to WK2 C++ internals from ewk_view functions
3191         https://bugs.webkit.org/show_bug.cgi?id=109794
3192
3193         Reviewed by Anders Carlsson.
3194
3195         * UIProcess/API/C/efl/WKView.cpp:
3196         (WKViewSetShowsAsSource):
3197         (WKViewGetShowsAsSource):
3198
3199             Added new WKView API to wrap WebPageProxy::setMainFrameInViewSourceMode()
3200             and WebPageProxy::mainFrameInViewSourceMode() calls.
3201
3202         (WKViewExitFullScreen):
3203
3204             Added new WKView API to wrap WebFullScreenManagerProxy::exitFullScreen()
3205             calls.
3206
3207         * UIProcess/API/C/efl/WKView.h:
3208         * UIProcess/API/efl/EwkView.cpp:
3209         (EwkView::feedTouchEvent):
3210
3211             Added feedTouchEvent() method so that: at first ewk_view_feed_touch_event()
3212             is not invoked from EwkView class, secondly ewk_view_feed_touch_event() does
3213             not access WebPage instance directly.
3214
3215         (EwkView::feedTouchEvents):
3216         * UIProcess/API/efl/EwkView.h:
3217         (EwkView):
3218         * UIProcess/API/efl/ewk_view.cpp:
3219         (ewk_view_feed_touch_event):
3220         (ewk_view_pagination_mode_set):
3221         (ewk_view_pagination_mode_get):
3222         (ewk_view_fullscreen_exit):
3223         (ewkViewPageContentsCallback):
3224         (ewk_view_page_contents_get):
3225         (ewk_view_source_mode_set):
3226         (ewk_view_source_mode_get):
3227
3228             Those are now using exported C API.
3229
3230         * UIProcess/efl/WebView.cpp:
3231         (WebKit::WebView::setShowsAsSource):
3232         (WebKit):
3233         (WebKit::WebView::showsAsSource):
3234         (WebKit::WebView::exitFullScreen):
3235         * UIProcess/efl/WebView.h:
3236         (WebView):
3237
3238             Added WebView methods to support added WKView API.
3239
3240 2013-02-19  Andras Becsi  <andras.becsi@digia.com>
3241
3242         [Qt][WK2] ASSERT(node) hit in WebPage::findZoomableAreaForPoint if no zoomable area found
3243         https://bugs.webkit.org/show_bug.cgi?id=110220
3244
3245         Reviewed by Allan Sandfeld Jensen.
3246
3247         If EventHandler::bestZoomableAreaForTouchPoint was unsuccessfull, eg.
3248         no node was found for a given point, we hit ASSERT(node).
3249         We should only assert for a valid node if a zoomable area was found.
3250
3251         * WebProcess/WebPage/WebPage.cpp:
3252         (WebKit::WebPage::findZoomableAreaForPoint):
3253
3254 2013-02-19  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3255
3256         Regression(r143273): Caused a lot of tests to time out
3257         https://bugs.webkit.org/show_bug.cgi?id=110212
3258
3259         Reviewed by Anders Carlsson.
3260
3261         StorageManager::destroySessionStorageNamespace() and StorageManager::cloneSessionStorageNamespace()
3262         should call their respective "*Internal" equivalent instead of calling themselves. This lead to
3263         a lot of time outs on our build bots.
3264
3265         * UIProcess/Storage/StorageManager.cpp:
3266         (WebKit::StorageManager::destroySessionStorageNamespace):
3267         (WebKit::StorageManager::cloneSessionStorageNamespace):
3268
3269 2013-02-18  Carlos Garcia Campos  <cgarcia@igalia.com>
3270
3271         [GTK] Remove webkit_web_view_get_subresources from WebKit2 GTK+ API
3272         https://bugs.webkit.org/show_bug.cgi?id=110125
3273
3274         Reviewed by Anders Carlsson.
3275
3276         This API is currently implemented caching all resources in the
3277         WebView which causes some problems in documents loading resources
3278         indefinitely. This API was used in WebKit1 mainly to implement
3279         webkit_web_view_save(), but we already have such API in
3280         WebKit2.
3281
3282         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
3283         (didReceiveWebViewMessageFromInjectedBundle):
3284         * UIProcess/API/gtk/WebKitWebView.cpp:
3285         (_WebKitWebViewPrivate):
3286         (webkitWebViewLoadChanged):
3287         * UIProcess/API/gtk/WebKitWebView.h:
3288         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
3289         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3290         * UIProcess/API/gtk/tests/TestResources.cpp:
3291         (testWebViewResources):
3292         (testWebResourceGetData):
3293
3294 2013-02-18  Christophe Dumez  <dchris@gmail.com>
3295
3296         [WK2][EFL] Stop using internal C++ API in ewk_error
3297         https://bugs.webkit.org/show_bug.cgi?id=108796
3298
3299         Reviewed by Benjamin Poulain.
3300
3301         Stop using internal C++ API in ewk_error and use C API instead of avoid
3302         violating API layering.
3303
3304         * UIProcess/API/efl/ewk_error.cpp:
3305         (EwkError::domain):
3306         (EwkError::isCancellation):
3307         (ewk_error_type_get):
3308         * UIProcess/API/efl/ewk_error_private.h:
3309         (EwkError):
3310
3311 2013-02-18  Simon Fraser  <simon.fraser@apple.com>
3312
3313         Clean up the boolean argument to visibleContentRect
3314         https://bugs.webkit.org/show_bug.cgi?id=110167
3315
3316         Reviewed by Simon Fraser.
3317         
3318         Replace the boolean argument to visibleContentRect() with
3319         an enum.
3320
3321         * WebProcess/WebPage/WebFrame.cpp:
3322         (WebKit::WebFrame::visibleContentBounds):
3323         (WebKit::WebFrame::visibleContentBoundsExcludingScrollbars):
3324
3325 2013-02-18  Anders Carlsson  <andersca@apple.com>
3326
3327         Add a DefaultHash for RefPtr<SecurityOrigin>
3328         https://bugs.webkit.org/show_bug.cgi?id=110170
3329
3330         Reviewed by Andreas Kling.
3331
3332         Remove all explicit uses of SecurityOriginHash.
3333
3334         * UIProcess/Storage/StorageManager.cpp:
3335         (StorageManager::SessionStorageNamespace):
3336         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
3337         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
3338         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3339         (WebKit::InjectedBundle::originsWithApplicationCache):
3340         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
3341         Include SecurityOriginHash.h. This fixes a bug where m_originToIDMap used pointer-equality
3342         for looking up security origins.
3343
3344         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
3345         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
3346         This can just take a const reference.
3347
3348         * WebProcess/ResourceCache/WebResourceCacheManager.h:
3349
3350 2013-02-18  Anders Carlsson  <andersca@apple.com>
3351
3352         Begin stubbing out session storage classes
3353         https://bugs.webkit.org/show_bug.cgi?id=110168
3354
3355         Reviewed by Andreas Kling.
3356
3357         * UIProcess/Storage/StorageManager.cpp:
3358         (StorageManager::StorageArea):
3359         (WebKit):
3360         (WebKit::StorageManager::StorageArea::create):
3361         (WebKit::StorageManager::StorageArea::StorageArea):
3362         (WebKit::StorageManager::StorageArea::~StorageArea):
3363         (StorageManager::SessionStorageNamespace):
3364         (WebKit::StorageManager::SessionStorageNamespace::isEmpty):
3365         (WebKit::StorageManager::SessionStorageNamespace::create):
3366         (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
3367         (WebKit::StorageManager::SessionStorageNamespace::~SessionStorageNamespace):
3368         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
3369         (WebKit::StorageManager::createSessionStorageNamespaceInternal):
3370         (WebKit::StorageManager::destroySessionStorageNamespaceInternal):
3371         (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
3372         * UIProcess/Storage/StorageManager.h:
3373         (StorageManager):
3374
3375 2013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3376
3377         [EFL][WK2] Add C API for popup menu and popup item
3378         https://bugs.webkit.org/show_bug.cgi?id=109083
3379
3380         Reviewed by Anders Carlsson.
3381
3382         WK2 EFL delegates display of the popup menu to the browser which causes
3383         us to have a strong interdependency between internal C++ classes
3384         (WebPopupMenuProxyEfl, WebPopupItem) and our EFL API implementation
3385         (EwkView, EwkPopupMenu, EwkPopupMenuItem).
3386
3387         Since we want to remove this interdependency, this patch introduces a
3388         for WebPopupMenuProxyEfl (WKPopupMenuListener) and for WebPopupItem
3389         (WKPopupItem). It also introduces a WKPage client with callbacks for
3390         showPopupMenu and hidePopupMenu.
3391
3392         Note that the popup menu functionality is covered by ewk_popup_menu API
3393         tests and no functionality is lost.
3394
3395         * PlatformEfl.cmake: Add new files to EFL CMake config.
3396         * Shared/API/c/efl/WKBaseEfl.h: Add typedefs for WKPopupItemRef and
3397         WKPopupMenuListenerRef.
3398         * Shared/APIObject.h: Add new TypePopupMenuItem APIObject type for EFL
3399         platform.
3400         * UIProcess/API/C/efl/WKAPICastEfl.h: Add mapping for WKPopupItemRef
3401         and WKPopupMenuListenerRef API types.
3402         (WebKit):
3403         (WebKit::toAPI):
3404         * UIProcess/API/C/efl/WKPageEfl.cpp: Added.
3405         (WKPageSetUIPopupMenuClient): Add new C API to set the UI Popup Menu
3406         client on the page.
3407         * UIProcess/API/C/efl/WKPageEfl.h: Added.
3408         * UIProcess/API/C/efl/WKPopupItem.cpp: Added. Add C API for WebPopupItem.
3409         (WKPopupItemGetType):
3410         (WKPopupItemGetTextDirection):
3411         (WKPopupItemHasTextDirectionOverride):
3412         (WKPopupItemCopyText):
3413         (WKPopupItemCopyToolTipText):
3414         (WKPopupItemCopyAccessibilityText):
3415         (WKPopupItemIsEnabled):
3416         (WKPopupItemIsLabel):
3417         (WKPopupItemIsSelected):
3418         * UIProcess/API/C/efl/WKPopupItem.h: Added.
3419         * UIProcess/API/C/efl/WKPopupMenuListener.cpp: Added. Add C API for
3420         WebPopupMenuListenerEfl (formerly WebPopupMenuProxyEfl) so that the
3421         client can report which popup menu item was selected.
3422         (WKPopupMenuListenerSetSelection):
3423         * UIProcess/API/C/efl/WKPopupMenuListener.h: Added.
3424         * UIProcess/API/efl/EwkView.cpp: Remove dependency on internal C++ types
3425         (WebPopupMenuProxyEfl and WebPopupItem) and use C API types instead.
3426         (EwkView::requestPopupMenu):
3427         * UIProcess/API/efl/EwkView.h:
3428         (WebKit):
3429         (EwkView):
3430         * UIProcess/API/efl/ewk_popup_menu.cpp: Use C API for Popup menu.
3431         (EwkPopupMenu::EwkPopupMenu):
3432         (EwkPopupMenu::setSelectedIndex):
3433         * UIProcess/API/efl/ewk_popup_menu_private.h:
3434         (EwkPopupMenu::create):
3435         (EwkPopupMenu):
3436         * UIProcess/WebPageProxy.cpp: Use WKPageUIPopupMenuClient to show / hide
3437         the popup menu on EFL port instead of asking the WebPopupMenuProxy.
3438         (WebKit::WebPageProxy::close):
3439         (WebKit::WebPageProxy::showPopupMenu):
3440         (WebKit::WebPageProxy::hidePopupMenu):
3441         * UIProcess/WebPageProxy.h: Add new WKPageUIPopupMenuClient member and
3442         corresponding initialization method.
3443         (WebPageProxy):
3444         * UIProcess/WebPopupMenuProxy.h: Disable showPopupMenu / hidePopupMenu
3445         virtual methods on EFL port since we go via WKPageUIPopupMenuClient
3446         for this now.
3447         (WebPopupMenuProxy):
3448         * UIProcess/efl/PageUIClientEfl.cpp:
3449         (WebKit::PageUIClientEfl::PageUIClientEfl): Handle WKPageUIPopupMenuClient
3450         callbacks and call corresponding EwkView methods. Previously, the EwkView
3451         methods were called by the internal WebPageProxyEfl class which is no
3452         longer needed.
3453         (WebKit::PageUIClientEfl::showPopupMenu):
3454         (WebKit):
3455         (WebKit::PageUIClientEfl::hidePopupMenu):
3456         * UIProcess/efl/PageUIClientEfl.h:
3457         (PageUIClientEfl):
3458         * UIProcess/efl/WebPageProxyEfl.cpp:
3459         (WebKit::WebPageProxy::initializeUIPopupMenuClient):
3460         (WebKit):
3461         * UIProcess/efl/WebPopupItemEfl.cpp: Added. Add APIObject wrapper for
3462         WebPopupItem so that we can use it in WKPageUIPopupMenuClient.
3463         (WebKit):
3464         (WebKit::WebPopupItemEfl::WebPopupItemEfl):
3465         (WebKit::WebPopupItemEfl::~WebPopupItemEfl):
3466         * UIProcess/efl/WebPopupItemEfl.h: Added.
3467         (WebKit):
3468         (WebPopupItemEfl):
3469         (WebKit::WebPopupItemEfl::create):
3470         (WebKit::WebPopupItemEfl::data):
3471         (WebKit::WebPopupItemEfl::itemType):
3472         (WebKit::WebPopupItemEfl::text):
3473         (WebKit::WebPopupItemEfl::textDirection):
3474         (WebKit::WebPopupItemEfl::hasTextDirectionOverride):
3475         (WebKit::WebPopupItemEfl::toolTipText):
3476         (WebKit::WebPopupItemEfl::accessibilityText):
3477         (WebKit::WebPopupItemEfl::isEnabled):
3478         (WebKit::WebPopupItemEfl::isLabel):
3479         (WebKit::WebPopupItemEfl::isSelected):
3480         (WebKit::WebPopupItemEfl::type):
3481         * UIProcess/efl/WebPopupMenuListenerEfl.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebPopupMenuProxyEfl.cpp.
3482         Use WebPopupMenuListenerEfl name instead of WebPopupMenuProxyEfl since
3483         it more accurately represents its functionality now.
3484         (WebKit):
3485         (WebKit::WebPopupMenuListenerEfl::WebPopupMenuListenerEfl):
3486         (WebKit::WebPopupMenuListenerEfl::valueChanged):
3487         * UIProcess/efl/WebPopupMenuListenerEfl.h: Renamed from Source/WebKit2/UIProcess/efl/WebPopupMenuProxyEfl.h.
3488         (WebKit):
3489         (WebPopupMenuListenerEfl):
3490         (WebKit::WebPopupMenuListenerEfl::create):
3491         * UIProcess/efl/WebUIPopupMenuClient.cpp: Added.
3492         (WebUIPopupMenuClient::showPopupMenu):
3493         (WebUIPopupMenuClient::hidePopupMenu):
3494         * UIProcess/efl/WebUIPopupMenuClient.h: Added.
3495         (WebKit):
3496         (WebUIPopupMenuClient):
3497         * UIProcess/efl/WebView.cpp:
3498         (WebKit::WebView::createPopupMenuProxy):
3499
3500 2013-02-18  Anders Carlsson  <andersca@apple.com>
3501
3502         Add StorageManager member functions for keeping track of session storage namespaces
3503         https://bugs.webkit.org/show_bug.cgi?id=110163
3504
3505         Reviewed by Andreas Kling.
3506
3507         * UIProcess/Storage/StorageManager.cpp:
3508         (WebKit::StorageManager::createSessionStorageNamespace):
3509         (WebKit):
3510         (WebKit::StorageManager::destroySessionStorageNamespace):
3511         (WebKit::StorageManager::cloneSessionStorageNamespace):
3512         (WebKit::StorageManager::createSessionStorageNamespaceInternal):
3513         (WebKit::StorageManager::destroySessionStorageNamespaceInternal):
3514         (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
3515         * UIProcess/Storage/StorageManager.h:
<