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