[CMAKE][WK2]Move CoordinatedGraphics related files out of WebKit2/CMakeLists.txt
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-03-18  Ryuan Choi  <ryuan.choi@samsung.com>
2
3         [CMAKE][WK2]Move CoordinatedGraphics related files out of WebKit2/CMakeLists.txt
4         https://bugs.webkit.org/show_bug.cgi?id=130390
5
6         Reviewed by Martin Robinson.
7
8         Now, only EFL port use CoordinatedGraphics among CMake based ports.
9
10         * CMakeLists.txt:
11         * PlatformEfl.cmake:
12         * PlatformGTK.cmake: Removed CoordinatedGraphics related files.
13
14 2014-03-18  Carlos Garcia Campos  <cgarcia@igalia.com>
15
16         [GTK] Race condition when the socket event source is cancelled
17         https://bugs.webkit.org/show_bug.cgi?id=130395
18
19         Reviewed by Martin Robinson.
20
21         In some cases when the socket event source is cancelled the socket
22         event source callback is called with the condition of the previous
23         poll instead of 0. This can happen sometimes when the source is
24         cancelled from the socket event source callback. Once the socket
25         event source is cancelled, it's dispatched by glib without
26         polling, so the condition is never reset again and the callback is
27         called again and again with the previous condition. When the
28         condition is G_IO_IN, the source is re-scheduled entering into an
29         infinite loop. We should always check if the source has been
30         cancelled at the beginning of the callback to destroy the source
31         instead of relying on the condition being 0.
32
33         * Platform/gtk/WorkQueueGtk.cpp:
34         (WorkQueue::SocketEventSource::isCancelled):
35         (WorkQueue::SocketEventSource::eventCallback):
36
37 2014-03-18  Csaba Osztrogonác  <ossy@webkit.org>
38
39         [GTK] URTFB after r165789. Stub function added.
40
41         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
42         (WebKit::InjectedBundle::setBundleParameter):
43
44 2014-03-17  Jaehun Lim  <ljaehun.lim@samsung.com>
45
46         Unreviewed, EFL build fix after r165789
47
48         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
49         (WebKit::InjectedBundle::setBundleParameter): Implemented.
50
51 2014-03-17  Jae Hyun Park  <jaepark@webkit.org>
52
53         [GTK] Build fix for debug build
54
55         Unreviewed.
56
57         finalizedListItem was actually used in ASSERT.  So, use ASSERT_UNUSED
58         instead of ASSERT.
59
60         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
61         (webkitBackForwardListItemFinalized):
62
63 2014-03-17  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
64
65         [WK2] Getting rid of compilation warnings
66         https://bugs.webkit.org/show_bug.cgi?id=130348
67
68         Reviewed by Benjamin Poulain.
69
70         * UIProcess/API/APIHistoryClient.h:
71         (API::HistoryClient::didPerformClientRedirect):
72         (API::HistoryClient::didPerformServerRedirect):
73         (API::HistoryClient::didUpdateHistoryTitle):
74         * UIProcess/API/APILoaderClient.h:
75         (API::LoaderClient::didStartProvisionalLoadForFrame):
76         (API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
77         (API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
78         (API::LoaderClient::didCommitLoadForFrame):
79         (API::LoaderClient::didFinishLoadForFrame):
80         (API::LoaderClient::didFailLoadWithErrorForFrame):
81         (API::LoaderClient::didChangeBackForwardList):
82         * UIProcess/API/APIPolicyClient.h:
83         (API::PolicyClient::decidePolicyForNavigationAction):
84         (API::PolicyClient::decidePolicyForNewWindowAction):
85         (API::PolicyClient::decidePolicyForResponse):
86         (API::PolicyClient::unableToImplementPolicy):
87         * UIProcess/API/APIUIClient.h:
88         (API::UIClient::exceededDatabaseQuota):
89         (API::UIClient::saveDataToFileInDownloadsFolder):
90         * UIProcess/API/C/WKPage.cpp:
91         (WKPageSetPageLoaderClient):
92         * UIProcess/APISession.cpp:
93         (API::generateID):
94         * WebProcess/Plugins/PluginView.cpp:
95         (WebKit::PluginView::viewStateDidChange):
96
97 2014-03-17  Anders Carlsson  <andersca@apple.com>
98
99         Update the bundle parameters dictionary and send out KVO notifications
100         https://bugs.webkit.org/show_bug.cgi?id=130379
101         <rdar://problem/16213914>
102
103         Reviewed by Dan Bernstein.
104
105         * UIProcess/API/Cocoa/WKProcessPool.mm:
106         (-[WKProcessPool _setObject:forBundleParameter:]):
107         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
108         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
109         (-[WKWebProcessBundleParameters setParameter:forKey:]):
110         * WebProcess/InjectedBundle/InjectedBundle.h:
111         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
112         (WebKit::InjectedBundle::setBundleParameter):
113         * WebProcess/WebProcess.cpp:
114         (WebKit::WebProcess::setInjectedBundleParameter):
115         * WebProcess/WebProcess.h:
116         * WebProcess/WebProcess.messages.in:
117
118 2014-03-17  Tim Horton  <timothy_horton@apple.com>
119
120         Address some style nits.
121
122         * UIProcess/API/Cocoa/_WKThumbnailViewInternal.h:
123
124 2014-03-17  Simon Fraser  <simon.fraser@apple.com>
125
126         Address some style nits.
127
128         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
129
130 2014-03-17  Simon Fraser  <simon.fraser@apple.com>
131
132         Add transparent window support back into MiniBrowser
133         https://bugs.webkit.org/show_bug.cgi?id=130363
134
135         Reviewed by Anders Carlsson.
136         
137         Expose SPI for transparent window support.
138
139         * UIProcess/API/Cocoa/WKWebView.mm:
140         (-[WKWebView _drawsTransparentBackground]):
141         (-[WKWebView _setDrawsTransparentBackground:]):
142         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
143
144 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
145
146         Undo some accidental Gtk changes from http://trac.webkit.org/changeset/165759
147
148         * UIProcess/WebPageProxy.cpp:
149         * WebProcess/WebPage/WebPage.messages.in:
150
151 2014-03-17  Csaba Osztrogonác  <ossy@webkit.org>
152
153         [WK2] URTBF after r165755 for non Apple platforms, stub functions added.
154
155         * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
156         (WebKit::InjectedBundle::platformInitialize):
157         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
158         (WebKit::InjectedBundle::platformInitialize):
159
160 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
161
162         Move convertToRange() helper to cross-platform WebPage.cpp
163         https://bugs.webkit.org/show_bug.cgi?id=130365
164
165         Reviewed by Tim Horton.
166
167         Also renamed it to rangeFromEditingLocationAndLength().
168
169         * WebProcess/WebPage/WebPage.cpp:
170         (WebKit::WebPage::rangeFromEditingLocationAndLength):
171         * WebProcess/WebPage/WebPage.h:
172         * WebProcess/WebPage/ios/WebPageIOS.mm:
173         (WebKit::WebPage::insertText):
174         * WebProcess/WebPage/mac/WebPageMac.mm:
175         (WebKit::WebPage::setComposition):
176         (WebKit::WebPage::insertText):
177         (WebKit::WebPage::insertDictatedText):
178         (WebKit::WebPage::getAttributedSubstringFromRange):
179         (WebKit::WebPage::characterIndexForPoint):
180         (WebKit::WebPage::firstRectForCharacterRange):
181
182 2014-03-17  Anders Carlsson  <andersca@apple.com>
183
184         Follow-up fix.
185
186         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
187
188 2014-03-17  Enrica Casucci  <enrica@apple.com>
189
190         WK2: support data detectors driven action sheet..
191         https://bugs.webkit.org/show_bug.cgi?id=130362
192         <rdar://problem/16319711>
193
194         Reviewed by Benjamin Poulain.
195
196         * UIProcess/ios/WKActionSheetAssistant.mm:
197         (-[WKActionSheetAssistant showDataDetectorsSheet]):
198
199 2014-03-17  Anders Carlsson  <andersca@apple.com>
200
201         Fix 32-bit OS X build.
202
203         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
204         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
205         * WebProcess/InjectedBundle/InjectedBundle.h:
206         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
207         (WebKit::InjectedBundle::platformInitialize):
208
209 2014-03-17  Jae Hyun Park  <jaepark@webkit.org>
210
211         [GTK][CMake] Fix WebKit2 unused parameter warnings
212         https://bugs.webkit.org/show_bug.cgi?id=130316
213
214         Reviewed by Martin Robinson.
215
216         * Platform/gtk/WorkQueueGtk.cpp: Fix unused parameter warnings.
217         * UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
218         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
219         * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Ditto.
220         * UIProcess/API/gtk/WebKitContextMenuItem.cpp: Ditto.
221         * UIProcess/API/gtk/WebKitDownloadClient.cpp: Ditto.
222         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Ditto.
223         * UIProcess/API/gtk/WebKitFindController.cpp: Ditto.
224         * UIProcess/API/gtk/WebKitFormClient.cpp: Ditto.
225         * UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Ditto.
226         * UIProcess/API/gtk/WebKitLoaderClient.cpp: Ditto.
227         * UIProcess/API/gtk/WebKitPlugin.cpp: Ditto.
228         * UIProcess/API/gtk/WebKitPolicyClient.cpp: Ditto.
229         * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Ditto.
230         * UIProcess/API/gtk/WebKitTextChecker.cpp: Ditto.
231         * UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
232         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Ditto.
233         * UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
234         * UIProcess/API/gtk/WebKitWebInspector.cpp: Ditto.
235         * UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
236         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
237         * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Ditto.
238         * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Ditto.
239         * UIProcess/gtk/TextCheckerGtk.cpp: Ditto.
240         * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Ditto.
241         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
242         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Ditto.
243         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Ditto.
244         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Ditto.
245         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Ditto.
246         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Ditto.
247
248 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
249
250         [Mac] Standardize on start/length in text input IPC methods
251         https://bugs.webkit.org/show_bug.cgi?id=130359
252
253         Reviewed by Anders Carlsson.
254
255         Some IPC methods used start/length, and others use start/end. This was confusing.
256
257         While here, changed WebPageMac.mm to not use NSMakeRange where we don't need it
258         (I want to move this code to WebPage.cpp, where it could be shared with iOS and
259         other platforms, as it doesn't depend on Foundation much).
260
261         * UIProcess/API/mac/WKView.mm:
262         (-[WKView insertText:replacementRange:]):
263         (-[WKView setMarkedText:selectedRange:replacementRange:]):
264         (-[WKView attributedSubstringForProposedRange:actualRange:]):
265         * UIProcess/WebPageProxy.cpp:
266         (WebKit::WebPageProxy::internalShowContextMenu):
267         * UIProcess/WebPageProxy.h:
268         * UIProcess/ios/WebPageProxyIOS.mm:
269         (WebKit::WebPageProxy::setComposition):
270         (WebKit::WebPageProxy::insertText):
271         * UIProcess/mac/WebPageProxyMac.mm:
272         (WebKit::WebPageProxy::setComposition):
273         (WebKit::WebPageProxy::insertText):
274         (WebKit::WebPageProxy::insertDictatedText):
275         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
276         * WebProcess/WebPage/WebPage.cpp:
277         (WebKit::WebPage::setComposition):
278         * WebProcess/WebPage/WebPage.h:
279         * WebProcess/WebPage/WebPage.messages.in:
280         * WebProcess/WebPage/ios/WebPageIOS.mm:
281         (WebKit::WebPage::setComposition):
282         (WebKit::WebPage::insertText):
283         * WebProcess/WebPage/mac/WebPageMac.mm:
284         (WebKit::WebPage::setComposition):
285         (WebKit::WebPage::insertText):
286         (WebKit::WebPage::insertDictatedText):
287         (WebKit::WebPage::getAttributedSubstringFromRange):
288         (WebKit::convertToRange):
289         (WebKit::WebPage::firstRectForCharacterRange):
290
291 2014-03-17  Tim Horton  <timothy_horton@apple.com>
292
293         Rename WKThumbnailView to _WKThumbnailView
294         https://bugs.webkit.org/show_bug.cgi?id=130361
295
296         Reviewed by Anders Carlsson.
297
298         * UIProcess/API/Cocoa/_WKThumbnailView.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.h.
299         * UIProcess/API/Cocoa/_WKThumbnailView.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.mm.
300         (-[_WKThumbnailView initWithFrame:fromWKView:]):
301         (-[_WKThumbnailView _viewWasUnparented]):
302         (-[_WKThumbnailView _viewWasParented]):
303         (-[_WKThumbnailView _requestSnapshotIfNeeded]):
304         (-[_WKThumbnailView _didTakeSnapshot:]):
305         (-[_WKThumbnailView viewDidMoveToWindow]):
306         (-[_WKThumbnailView setScale:]):
307         (-[_WKThumbnailView setUsesSnapshot:]):
308         (-[_WKThumbnailView _setThumbnailLayer:]):
309         (-[_WKThumbnailView _thumbnailLayer]):
310         * UIProcess/API/Cocoa/_WKThumbnailViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailViewInternal.h.
311         * UIProcess/API/mac/WKView.mm:
312         (-[WKView _setThumbnailView:]):
313         (-[WKView _thumbnailView]):
314         (-[WKView _updateThumbnailViewLayer]):
315         * UIProcess/API/mac/WKViewInternal.h:
316         * UIProcess/mac/PageClientImpl.mm:
317         * WebKit2.xcodeproj/project.pbxproj:
318
319 2014-03-17  Anders Carlsson  <andersca@apple.com>
320
321         Add SPI for getting bundle parameters from the injected bundle
322         https://bugs.webkit.org/show_bug.cgi?id=130355
323
324         Reviewed by Dan Bernstein.
325
326         * UIProcess/mac/WebContextMac.mm:
327         (WebKit::WebContext::platformInitializeWebProcess):
328         * WebKit2.xcodeproj/project.pbxproj:
329         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
330         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
331         (-[WKWebProcessBundleParameters initWithDictionary:]):
332         (-[WKWebProcessBundleParameters valueForKey:]):
333         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
334         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
335         (-[WKWebProcessPlugInController parameters]):
336         * WebProcess/InjectedBundle/InjectedBundle.cpp:
337         (WebKit::InjectedBundle::InjectedBundle):
338         * WebProcess/InjectedBundle/InjectedBundle.h:
339         (WebKit::InjectedBundle::create):
340         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
341         (WebKit::InjectedBundle::bundleParameters):
342         (WebKit::InjectedBundle::platformInitialize):
343         * WebProcess/WebProcess.cpp:
344         (WebKit::WebProcess::initializeWebProcess):
345
346 2014-03-17  Brent Fulgham  <bfulgham@apple.com>
347
348         Provide preference to enable additional AVFoundation options
349         https://bugs.webkit.org/show_bug.cgi?id=130275
350
351         Reviewed by Eric Carlson.
352
353         * Shared/WebPreferencesStore.h: Added new preference.
354         * UIProcess/API/C/WKPreferences.cpp:
355         (WKPreferencesSetEnableInheritURIQueryComponent): Added.
356         (WKPreferencesGetEnableInheritURIQueryComponent): Added.
357         * UIProcess/API/C/WKPreferencesPrivate.h:
358         * WebProcess/WebPage/WebPage.cpp:
359         (WebKit::WebPage::updatePreferences): Handle new preference.
360
361 2014-03-17  Alexey Proskuryakov  <ap@apple.com>
362
363         [Mac] getAttributedSubstringFromRange arguments are incorrectly named
364         https://bugs.webkit.org/show_bug.cgi?id=130349
365
366         Reviewed by Tim Horton.
367
368         There is a mess of start/end and start/length pairs in IPC. One day we'll fix them
369         all, but now, let's at least name them correctly.
370
371         No behavior change.
372
373         * UIProcess/WebPageProxy.h:
374         * UIProcess/mac/WebPageProxyMac.mm:
375         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
376         * WebProcess/WebPage/WebPage.h:
377         * WebProcess/WebPage/WebPage.messages.in:
378         * WebProcess/WebPage/mac/WebPageMac.mm:
379         (WebKit::WebPage::getAttributedSubstringFromRange):
380
381 2014-03-17  Tim Horton  <timothy_horton@apple.com>
382
383         WKThumbnailView should support snapshots
384         https://bugs.webkit.org/show_bug.cgi?id=130335
385         <rdar://problem/16255139>
386
387         Reviewed by Simon Fraser.
388
389         Add a mode where WKThumbnailView takes a software snapshot of the web content,
390         replacing the live layer tree with said snapshot once it returns from the
391         web process. This may improve animation performance in cases where the
392         layer tree would otherwise be very complex.
393
394         * UIProcess/API/Cocoa/WKThumbnailView.h:
395         Add a property, usesSnapshot, which determines whether the thumbnail view
396         should use the live layer tree or a snapshot of the content.
397
398         * UIProcess/API/Cocoa/WKThumbnailView.mm:
399         (-[WKThumbnailView initWithFrame:fromWKView:]):
400         (-[WKThumbnailView _viewWasUnparented]):
401         Clear the snapshot when unparented.
402
403         (-[WKThumbnailView _viewWasParented]):
404         Take a snapshot of the web content when parented, if needed.
405
406         (-[WKThumbnailView _requestSnapshotIfNeeded]):
407         If we're using snapshots, and haven't already dispatched an async snapshot request,
408         and don't already have a snapshot, request a snapshot from the web process.
409
410         When it returns, use it as the contents of the WKThumbnailView layer, and
411         unparent the live layer tree.
412
413         (-[WKThumbnailView setScale:]):
414         (-[WKThumbnailView setUsesSnapshot:]):
415         (-[WKThumbnailView _setThumbnailLayer:]):
416         (-[WKThumbnailView _thumbnailLayer]):
417         * UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
418
419         * UIProcess/API/mac/WKView.mm:
420         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
421         (-[WKView _acceleratedCompositingModeRootLayer]):
422         WKView should always keep track of the current root layer, instead of totally
423         handing control over to WKThumbnailView when it is used.
424
425         (-[WKView _setThumbnailView:]):
426         (-[WKView _updateThumbnailViewLayer]):
427         (-[WKView _reparentLayerTreeInThumbnailView]):
428         If needed (either we're not using snapshots, or still waiting for the snapshot to be painted),
429         push the WKView's live layer tree into the thumbnail view.
430
431         * UIProcess/API/mac/WKViewInternal.h:
432         * UIProcess/WebPageProxy.cpp:
433         (WebKit::WebPageProxy::internalShowContextMenu):
434         * UIProcess/WebPageProxy.h:
435         * WebProcess/WebPage/WebPage.h:
436         * WebProcess/WebPage/WebPage.messages.in:
437         * WebProcess/WebPage/WebPage.cpp:
438         (WebKit::WebPage::takeThumbnailSnapshot):
439         Add a message that asynchronously returns a snapshot that respects the
440         current thumbnail scale and position.
441
442         (WebKit::WebPage::scaledSnapshotWithOptions):
443         Use some nullptr.
444
445         * WebProcess/WebPage/DrawingArea.cpp:
446         (WebKit::DrawingArea::transform):
447         * WebProcess/WebPage/DrawingArea.h:
448         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
449         Add a getter for the DrawingArea's transform.
450         Rename it to rootLayerTransform.
451
452 2014-03-17  Zan Dobersek  <zdobersek@igalia.com>
453
454         Use RunLoop objects through references instead of pointers
455         https://bugs.webkit.org/show_bug.cgi?id=130313
456
457         Reviewed by Andreas Kling.
458
459         Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
460         return RunLoop reference instead of a pointer.
461
462         * DatabaseProcess/DatabaseProcess.cpp:
463         (WebKit::DatabaseProcess::didClose):
464         (WebKit::DatabaseProcess::didReceiveInvalidMessage):
465         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
466         (WebKit::UniqueIDBDatabase::postMainThreadTask):
467         * NetworkProcess/NetworkProcess.cpp:
468         (WebKit::NetworkProcess::didClose):
469         (WebKit::NetworkProcess::didReceiveInvalidMessage):
470         * NetworkProcess/NetworkResourceLoader.cpp:
471         (WebKit::NetworkResourceLoader::continueWillSendRequest):
472         * Platform/IPC/Connection.cpp:
473         (IPC::Connection::SyncMessageState::getOrCreate):
474         (IPC::Connection::SyncMessageState::SyncMessageState):
475         (IPC::Connection::SyncMessageState::~SyncMessageState):
476         (IPC::Connection::SyncMessageState::processIncomingMessage):
477         (IPC::Connection::SyncMessageState::dispatchMessages):
478         (IPC::Connection::createServerConnection):
479         (IPC::Connection::createClientConnection):
480         (IPC::Connection::Connection):
481         (IPC::Connection::addWorkQueueMessageReceiver):
482         (IPC::Connection::removeWorkQueueMessageReceiver):
483         (IPC::Connection::sendSyncMessage):
484         (IPC::Connection::sendSyncMessageFromSecondaryThread):
485         (IPC::Connection::waitForSyncReply):
486         (IPC::Connection::processIncomingMessage):
487         (IPC::Connection::connectionDidClose):
488         (IPC::Connection::dispatchDidReceiveInvalidMessage):
489         (IPC::Connection::enqueueIncomingMessage):
490         (IPC::Connection::wakeUpRunLoop):
491         * Platform/IPC/Connection.h:
492         * Platform/IPC/mac/ConnectionMac.cpp:
493         (IPC::Connection::receiveSourceEventHandler):
494         * Shared/ChildProcess.cpp:
495         (WebKit::ChildProcess::stopRunLoop):
496         * Shared/Plugins/NPObjectProxy.cpp:
497         (WebKit::NPObjectProxy::NP_Deallocate):
498         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
499         (WebKit::ProcessLauncher::launchProcess):
500         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
501         (WebKit::ProcessLauncher::launchProcess):
502         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
503         (WebKit::connectToService):
504         (WebKit::tryPreexistingProcess):
505         (WebKit::createProcess):
506         * UIProcess/Storage/StorageManager.cpp:
507         (WebKit::StorageManager::getOrigins):
508         (WebKit::StorageManager::getStorageDetailsByOrigin):
509         * UIProcess/Storage/StorageManager.h:
510         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
511         (WebKit::NetscapePlugin::pluginThreadAsyncCall):
512         * WebProcess/Plugins/PluginView.cpp:
513         (WebKit::PluginView::unprotectPluginFromDestruction):
514         * WebProcess/WebPage/EventDispatcher.cpp:
515         (WebKit::EventDispatcher::wheelEvent):
516         * WebProcess/WebPage/ViewUpdateDispatcher.cpp:
517         (WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
518         * WebProcess/WebPage/WebPage.cpp:
519         (WebKit::WebPage::close):
520
521 2014-03-17  Giovanni Campagna  <gcampagna@src.gnome.org>
522
523         [GTK] Don't busy loop when the socket is full
524         https://bugs.webkit.org/show_bug.cgi?id=129802
525
526         Reviewed by Carlos Garcia Campos.
527
528         When the socket is full and we see EAGAIN or EWOULDBLOCK
529         (because the socket is non blocking), don't busy loop by
530         tring to write again, instead poll() until the socket
531         becomes writable.
532
533         * Platform/IPC/unix/ConnectionUnix.cpp:
534         (IPC::Connection::sendOutgoingMessage):
535
536 2014-03-17  Martin Robinson  <mrobinson@igalia.com>
537
538         [GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
539         https://bugs.webkit.org/show_bug.cgi?id=130155
540
541         Reviewed by Philippe Normand.
542
543         * PlatformGTK.cmake: Add GTK_UNIX_PRINT flags to the build.
544
545 2014-03-17  Ryuan Choi  <ryuan.choi@samsung.com>
546
547         [EFL][WK2] Restore cursor when moving mouse into webview
548         https://bugs.webkit.org/show_bug.cgi?id=130182
549
550         Reviewed by Gyuyoung Kim.
551
552         We changed mouse cursor when the type of cursor is changed.
553         But once mouse is moved out of webview, ewebkit will not know whether cursor
554         is changed or not.
555
556         So, this patch added a logic to restore the last applied type of cursor when
557         mouse is moved into webview again.
558
559         * UIProcess/API/efl/EwkView.cpp:
560         (EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
561         Call updateCursor to restore the last applied type of cursor.
562         (EwkView::EwkView):
563         (EwkView::updateCursor): Extracted from setCursor.
564         (EwkView::setCursor):
565         (EwkView::handleEvasObjectAdd):
566         * UIProcess/API/efl/EwkView.h:
567
568 2014-03-16  Ryuan Choi  <ryuan.choi@samsung.com>
569
570         [EFL][WK2] Add ewk_application_cache_manager APIs
571         https://bugs.webkit.org/show_bug.cgi?id=102853
572
573         Reviewed by Gyuyoung Kim.
574
575         Implemented application cache manager to get list of origins which stores
576         application cache and remove specified origin or all.
577
578         * PlatformEfl.cmake: Added newly added files.
579         * UIProcess/API/efl/ewk_application_cache_manager.cpp: Added.
580         (EwkApplicationCacheManager::EwkApplicationCacheManager):
581         (EwkApplicationCacheManager::~EwkApplicationCacheManager):
582         (Get_Origins_Data::Get_Origins_Data):
583         (getApplicationCacheOriginsCallback):
584         (ewk_application_cache_manager_origins_get):
585         (ewk_application_cache_origins_free):
586         (ewk_application_cache_manager_delete_all):
587         (ewk_application_cache_manager_delete):
588         * UIProcess/API/efl/ewk_application_cache_manager.h: Added.
589         * UIProcess/API/efl/ewk_application_cache_manager_private.h: Added.
590         (EwkApplicationCacheManager::impl):
591         * UIProcess/API/efl/ewk_context.cpp:
592         (EwkContext::applicationCacheManager):
593         (ewk_context_application_cache_manager_get):
594         * UIProcess/API/efl/ewk_context.h:
595         * UIProcess/API/efl/ewk_context_private.h:
596         * UIProcess/API/efl/ewk_security_origin_private.h:
597         (EwkSecurityOrigin::wkSecurityOrigin):
598         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
599         (EWK2UnitTestServer::port):
600         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h:
601         * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
602         Added to test application_cache_manager.
603         (serverCallback):
604         (getOriginsCallback):
605         (timerCallback):
606         (TEST_F):
607         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
608         Added test case to test getter of application_cache_manager.
609         (TEST_F):
610
611 2014-03-16  Zan Dobersek  <zdobersek@igalia.com>
612
613         Move GTK WebKit2 code to std::unique_ptr
614         https://bugs.webkit.org/show_bug.cgi?id=129672
615
616         Reviewed by Anders Carlsson.
617
618         Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.
619
620         * Shared/Downloads/Download.h:
621         * Shared/Downloads/soup/DownloadSoup.cpp:
622         (WebKit::Download::start):
623         (WebKit::Download::startWithHandle):
624         (WebKit::Download::platformInvalidate):
625         * UIProcess/API/gtk/PageClientImpl.cpp:
626         * UIProcess/API/gtk/PageClientImpl.h:
627         * UIProcess/API/gtk/WebKitContextMenuItem.cpp:
628         (webkitContextMenuItemCreate):
629         (webkitContextMenuItemCreateForGtkItem):
630         (webkit_context_menu_item_new):
631         (webkit_context_menu_item_new_from_stock_action):
632         (webkit_context_menu_item_new_from_stock_action_with_label):
633         (webkit_context_menu_item_new_with_submenu):
634         (webkit_context_menu_item_new_separator):
635         * UIProcess/API/gtk/WebKitTextChecker.h:
636         * UIProcess/API/gtk/WebKitWebContext.cpp:
637         (createDefaultWebContext):
638         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
639         (webkitWebViewBaseConstructed):
640         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
641         (WebKit::WebPrintOperationGtk::print):
642         * WebProcess/gtk/WebGtkExtensionManager.cpp:
643         (WebKit::WebGtkExtensionManager::initialize):
644         * WebProcess/soup/WebKitSoupRequestInputStream.cpp:
645         (webkitSoupRequestInputStreamPendingReadAsyncComplete):
646         (webkitSoupRequestInputStreamReadAsync):
647         * WebProcess/soup/WebSoupRequestManager.cpp:
648         (WebKit::WebSoupRequestManager::send):
649         * WebProcess/soup/WebSoupRequestManager.h:
650
651 2014-03-16  Brian Burg  <bburg@apple.com>
652
653         Web Inspector: vended backend commands file should be generated as part of the build
654         https://bugs.webkit.org/show_bug.cgi?id=130110
655
656         Reviewed by Timothy Hatcher.
657
658         * PlatformGTK.cmake: Copy over generated inspector backend commands files.
659
660 2014-03-16  Darin Adler  <darin@apple.com>
661
662         Try to fix 32-bit Mac build.
663
664         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Add missing include.
665
666 2014-03-16  Philippe Normand  <pnormand@igalia.com>
667
668         Unreviewed, GTK build fix after r165692.
669
670         * UIProcess/gtk/TextCheckerGtk.cpp:
671         (WebKit::TextChecker::checkSpellingOfString):
672         (WebKit::TextChecker::checkGrammarOfString):
673
674 2014-03-15  Darin Adler  <darin@apple.com>
675
676         Remove all uses of deprecatedCharacters from WebKit2
677         https://bugs.webkit.org/show_bug.cgi?id=130197
678
679         Reviewed by Andreas Kling.
680
681         * Shared/APIString.h: Rewrote getCharacters to use StringView,
682         substring, and getCharactersWithUpconvert. Added an 8-bit case
683         to getUTF8CString.
684
685         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
686         (WebKit::writeByte): Added.
687         (WebKit::writeCharacter): Added.
688         (WebKit::writeLine): Added. Uses operator[] instead of characters16 to get
689         the UTF-16 characters out of the string.
690         (WebKit::NetscapePluginModule::scanPlugin): Replaced code that writes out
691         text to stdout with much simpler version using the functions above.
692
693         * UIProcess/TextChecker.h: Changed text arguments to use StringView instead
694         of UChar/int pairs.
695
696         * UIProcess/WebPageProxy.cpp:
697         (WebKit::WebPageProxy::internalShowContextMenu): Updated to pass StringView.
698
699         * UIProcess/efl/TextCheckerEfl.cpp:
700         (WebKit::nextWordOffset): Changed function to use StringView and unsigned.
701         (WebKit::TextChecker::checkTextOfParagraph): Changed to use StringView and
702         substring.
703         (WebKit::TextChecker::checkSpellingOfString): Ditto.
704         (WebKit::TextChecker::checkGrammarOfString): Ditto.
705         (WebKit::TextChecker::requestCheckingOfString): Pass in a StringView, so no
706         need to call deprecatedCharacters.
707
708         * UIProcess/ios/TextCheckerIOS.mm:
709         (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView.
710         (WebKit::TextChecker::checkSpellingOfString): Ditto.
711         (WebKit::TextChecker::checkGrammarOfString): Ditto.
712
713         * UIProcess/mac/TextCheckerMac.mm:
714         (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView and
715         use StringView::createNSStringWithoutCopying.
716         (WebKit::TextChecker::checkSpellingOfString): CHanged to take StringView.
717         (WebKit::TextChecker::checkGrammarOfString): Ditto.
718
719         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
720         (WebKit::convertStringToKeyCodes): Changed to take StringView and use
721         upconvertedCharacters instead of deprecatedCharacters. Also use move instead
722         of swap.
723         (WebKit::NetscapePlugin::sendComplexTextInput): Updated to new style for loop.
724
725         * WebProcess/WebPage/EncoderAdapter.cpp:
726         (WebKit::EncoderAdapter::encodeString): Use StringView::upconvertedCharacters
727         instead of String::deprecatedCharacters.
728
729 2014-03-15  David Kilzer  <ddkilzer@apple.com>
730
731         [iOS] Define SYSTEM_VERSION_PREFIX consistently
732         <http://webkit.org/b/130293>
733         <rdar://problem/15926359>
734
735         Reviewed by Dan Bernstein.
736
737         * Configurations/Version.xcconfig:
738         (SYSTEM_VERSION_PREFIX): Sync with
739         Source/WebKit/mac/Version.xcconfig.
740
741 2014-03-14  Alexey Proskuryakov  <ap@apple.com>
742
743         [Mac] Sync extended attribute related rules with AppSandbox profile
744         https://bugs.webkit.org/show_bug.cgi?id=130263
745         <rdar://problem/16318965>
746
747         Reviewed by Sam Weinig.
748
749         Update the fix to use a different syntax in some OS versions.
750
751         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
752         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
753         * WebProcess/com.apple.WebProcess.sb.in:
754
755 2014-03-14  Ryosuke Niwa  <rniwa@webkit.org>
756
757         Revert erroneous changes made to UIProcess/API/Cocoa in r165676.
758
759         * UIProcess/API/Cocoa/WKBackForwardList.h:
760         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h.
761         * UIProcess/API/Cocoa/WKNavigation.h:
762         * UIProcess/API/Cocoa/WKNavigationAction.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h.
763         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
764         (NS_ENUM):
765         * UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h.
766         * UIProcess/API/Cocoa/WKNavigationTrigger.h: Removed.
767         * UIProcess/API/Cocoa/WKWebView.h:
768
769 2014-03-14  Mark Rowe  <mrowe@apple.com>
770
771         Fix the production build.
772
773         Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
774         be at the expected relative path when working from installed source.
775
776         * Configurations/Base.xcconfig:
777
778 2014-03-14  Maciej Stachowiak  <mjs@apple.com>
779
780         Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
781         https://bugs.webkit.org/show_bug.cgi?id=130276
782         <rdar://problem/16266927>
783         
784         Reviewed by Simon Fraser.
785
786         * Shared/AsyncRequest.cpp:
787         * Shared/AsyncRequest.h:
788         * Shared/ContextMenuContextData.cpp:
789         * Shared/ContextMenuContextData.h:
790         * Shared/Databases/DatabaseProcessCreationParameters.h:
791         * Shared/Databases/IndexedDB/IDBUtilities.cpp:
792         * Shared/Databases/IndexedDB/IDBUtilities.h:
793         * Shared/mac/RemoteLayerBackingStore.h:
794         * Shared/mac/RemoteLayerBackingStore.mm:
795         * UIProcess/API/Cocoa/WKBackForwardList.h:
796         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Removed.
797         * UIProcess/API/Cocoa/WKNavigation.h:
798         * UIProcess/API/Cocoa/WKNavigationAction.h: Removed.
799         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
800         * UIProcess/API/Cocoa/WKNavigationResponse.h: Removed.
801         * UIProcess/API/Cocoa/WKNavigationTrigger.h: Added.
802         (NS_ENUM):
803         * UIProcess/API/Cocoa/WKWebView.h:
804         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
805         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
806         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
807         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
808         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
809         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
810         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
811         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
812         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
813         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
814         * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
815         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
816         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
817         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
818         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
819         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
820         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
821         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
822         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
823         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
824
825 2014-03-14  Simon Fraser  <simon.fraser@apple.com>
826
827         [iOS WK2] background-attachment: fixed renders oddly, moves around
828         https://bugs.webkit.org/show_bug.cgi?id=130277
829         <rdar://problem/16332883>
830
831         Reviewed by Tim Horton.
832         
833         Actually send scrolling and counter-scrolling layers to the UI process!
834
835         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
836         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
837         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
838
839 2014-03-14  Anders Carlsson  <andersca@apple.com>
840
841         Try to fix the iOS build.
842
843         * UIProcess/mac/WebContextMac.mm:
844
845 2014-03-14  Anders Carlsson  <andersca@apple.com>
846
847         Begin work on the bundle parameter API
848         https://bugs.webkit.org/show_bug.cgi?id=130267
849
850         Reviewed by Dan Bernstein.
851
852         * Shared/WebProcessCreationParameters.cpp:
853         (WebKit::WebProcessCreationParameters::encode):
854         (WebKit::WebProcessCreationParameters::decode):
855         * Shared/WebProcessCreationParameters.h:
856         * UIProcess/API/Cocoa/WKProcessPool.mm:
857         (-[WKProcessPool _objectForBundleParameter:]):
858         (-[WKProcessPool _setObject:forBundleParameter:]):
859         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
860         * UIProcess/WebContext.h:
861         (WebKit::WebContext::bundleParameters):
862         * UIProcess/mac/WebContextMac.mm:
863         (WebKit::WebContext::ensureBundleParameters):
864         (WebKit::WebContext::platformInitializeWebProcess):
865
866 2014-03-14  Alexey Proskuryakov  <ap@apple.com>
867
868         [Mac] Sync extended attribute related rules with AppSandbox profile
869         https://bugs.webkit.org/show_bug.cgi?id=130263
870         <rdar://problem/16318965>
871
872         Reviewed by Sam Weinig.
873
874         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
875         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
876         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
877         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
878         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
879         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
880         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
881         * WebProcess/com.apple.WebProcess.sb.in:
882
883 2014-03-14  Simon Fraser  <simon.fraser@apple.com>
884
885         [iOS WK2] Improve behavior of fixed elments on zooming
886         https://bugs.webkit.org/show_bug.cgi?id=130253
887
888         Reviewed by Beth Dakin.
889
890         Correctly reposition right- and bottom-relative position:fixed
891         elements on zooming in WK2 iOS by telling the scrolling tree
892         about zoom-related viewport changes.
893
894         * Shared/mac/RemoteLayerTreeTransaction.h:
895         (WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged):
896         Drive-by cleanup; typedef the flags field to an unsigned, to avoid ugly casting.
897         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
898         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Pass out a flag to say
899         if the update contained a new fixed or sticky layer.
900         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
901         (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
902         Call into the new ScrolingTree::viewportChangedViaDelegatedScrolling().
903         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
904         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: If we got a new fixed
905         or sticky layer, set fixedOrStickyLayerChanged to true.
906         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto.
907         * UIProcess/ios/WKContentView.mm:
908         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
909         Remember both the old zoomScale and the filteredScale, since the fixed position rect
910         should be computed using the unfiltered scale.
911         Some FloatRect -> CGRect changes.
912         Now call viewportChangedViaDelegatedScrolling() on the scrolling coordinator.
913         (-[WKContentView fixedPositionRectFromExposedRect:scale:]): Call the
914         FrameView function to compute the iOS fixed position rect.
915         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
916         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): If the update
917         got a new fixed or sticky layer, run the scrolling tree logic to make sure
918         it gets into the right place.
919         * UIProcess/mac/RemoteLayerTreeHost.mm:
920         (WebKit::RemoteLayerTreeHost::updateLayerTree): If we logged here,
921         we'd log twice if the tiled scrolling indicator was enabled, so 
922         hoisted the logging out into the caller.
923
924 2014-03-14  Landry Breuil  <landry@openbsd.org>
925
926         Use the correct type in webkitSoupRequestInputStreamNew()'s declaration.
927         Nhttps://bugs.webkit.org/show_bug.cgi?id=129974
928
929         Reviewed by Andreas Kling.
930
931         * WebProcess/soup/WebKitSoupRequestInputStream.h:
932
933 2014-03-14  Anders Carlsson  <andersca@apple.com>
934
935         Fix crash when resizing the visited link table
936         https://bugs.webkit.org/show_bug.cgi?id=130257
937         <rdar://problem/16328177>
938
939         Reviewed by Dan Bernstein.
940
941         We're iterating over the old table, so use currentTableSize in the loop termination condition.
942
943         * UIProcess/VisitedLinkProvider.cpp:
944         (WebKit::VisitedLinkProvider::resizeTable):
945
946 2014-03-14  Dan Bernstein  <mitz@apple.com>
947
948         [Cocoa] Expose a way to set the cookie accept policy
949         https://bugs.webkit.org/show_bug.cgi?id=130251
950
951         Reviewed by Anders Carlsson.
952
953         * UIProcess/API/Cocoa/WKProcessPool.mm:
954         (toHTTPCookieAcceptPolicy): Added a helper function that maps from NSHTTPCookieAcceptPolicy
955         values to WebKit::HTTPCookieAcceptPolicy values.
956         (-[WKProcessPool _setCookieAcceptPolicy:]): Added. Calls
957         WebCookieManagerProxy::setHTTPCookieAcceptPolicy. 
958         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared new method.
959
960 2014-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>
961
962         [GTK] WebKit2WebExtension GIR can't be used in vala
963         https://bugs.webkit.org/show_bug.cgi?id=127179
964
965         Reviewed by Martin Robinson.
966
967         Do not include all WebKit2 gir symbols from WebKit2WebExtension gir
968         file.
969
970         * GNUmakefile.am:
971         * PlatformGTK.cmake:
972
973 2014-03-14  Csaba Osztrogonác  <ossy@webkit.org>
974
975         [CMake] URTBF after r165619.
976
977         * CMakeLists.txt: Add new files.
978
979 2014-03-14  Anders Carlsson  <andersca@apple.com>
980
981         Remove WebContext::addVisitedLink
982         https://bugs.webkit.org/show_bug.cgi?id=130242
983
984         Reviewed by Dan Bernstein.
985
986         Fold the function into WKContextAddVisitedLink instead.
987
988         * UIProcess/API/C/WKContext.cpp:
989         (WKContextAddVisitedLink):
990         * UIProcess/WebContext.cpp:
991         * UIProcess/WebContext.h:
992         (WebKit::WebContext::visitedLinkProvider):
993
994 2014-03-13  Anders Carlsson  <andersca@apple.com>
995
996         Move visited link handling to VisitedLinkTableController and VisitedLinkProvider
997         https://bugs.webkit.org/show_bug.cgi?id=130223
998         <rdar://problem/16315792>
999
1000         Reviewed by Dan Bernstein.
1001
1002         * DerivedSources.make:
1003         Generate messages for VisitedLinkProvider and VisitedLinkTableController.
1004         
1005         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1006         (-[WKWebViewConfiguration copyWithZone:]):
1007         Set the visited link provider.
1008
1009         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
1010         Add addVisitedLinkWithURL: method.
1011
1012         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
1013         (-[_WKVisitedLinkProvider addVisitedLinkWithURL:]):
1014         Compute a link hash from the absolute URL string and pass it to the underlying VisitedLinkProvider object.
1015
1016         * UIProcess/VisitedLinkProvider.cpp:
1017         (WebKit::VisitedLinkProvider::addProcess):
1018         Add the process to the m_processes HashCountedSet. If it's the first time we're adding the process, 
1019         add the VisitedLinkProvider object as a message receiver and send the visited link table to the process.
1020
1021         (WebKit::VisitedLinkProvider::removeProcess):
1022         Remove the process from the m_processes HashCountedSet. If we're removing the last reference to the process,
1023         remove ourselves as a  message receiver.
1024
1025         (WebKit::VisitedLinkProvider::addVisitedLinkHash):
1026         Rename this from addVisitedLink to better indicate what it's doing.
1027
1028         (WebKit::tableSizeForKeyCount):
1029         Update for constant rename.
1030
1031         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
1032         Compute the new pending visited links table size. If it's bigger than our current table, resize the table
1033         by calling resizeTable. Otherwise, simply try to add the pending hashes to our shared hash table. If successful,
1034         add the link hash to the addedVisitedLinks table and eventually send it to all processes associated with the visited link provider.
1035
1036         (WebKit::VisitedLinkProvider::resizeTable):
1037         Create a new shared memory segment, Set it as the table backing store and add all visited links from the old table. Finally,
1038         add our pending visited link hashes and send the new table memory to all processes associated with the visited link provider.
1039
1040         (WebKit::VisitedLinkProvider::sendTable):
1041         Helper function that creates a shared memory handle and sends it to a given web process.
1042
1043         * UIProcess/VisitedLinkProvider.h:
1044         Add new members.
1045
1046         * UIProcess/VisitedLinkProvider.messages.in:
1047         Add messages.
1048
1049         * UIProcess/WebContext.cpp:
1050         (WebKit::WebContext::processDidFinishLaunching):
1051         (WebKit::WebContext::disconnectProcess):
1052         The WebContext no longer needs to inform the visited link provider about the processes coming and going, that's already handled
1053         by the WebPageProxy objects.
1054
1055         (WebKit::WebContext::addVisitedLink):
1056         Call addVisitedLinkHash on the visited link provider.
1057
1058         * UIProcess/WebContext.h:
1059         * UIProcess/WebContext.messages.in:
1060         Remove a message that is now implemented by the visited link provider.
1061
1062         * WebKit2.xcodeproj/project.pbxproj:
1063         Add new files.
1064
1065         * WebProcess/WebPage/VisitedLinkTableController.cpp:
1066         (WebKit::VisitedLinkTableController::VisitedLinkTableController):
1067         Add the table controller as a message receiver.
1068
1069         (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
1070         Remove the table controller as a message receiver.
1071
1072         (WebKit::VisitedLinkTableController::isLinkVisited):
1073         Check if the link is visited according to the visited link table.
1074
1075         (WebKit::VisitedLinkTableController::addVisitedLink):
1076         Send the link hash to the UI process if it's not already visited.
1077
1078         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
1079         Set the backing store memory and invalidate all styles.
1080
1081         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
1082         Invalidate the styles for the given links.
1083
1084         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
1085         Invalidate the styles for all links.
1086
1087         * WebProcess/WebPage/VisitedLinkTableController.h:
1088         Add new members.
1089
1090         * WebProcess/WebPage/VisitedLinkTableController.messages.in:
1091         Add new messages.
1092
1093         * WebProcess/WebProcess.cpp:
1094         Remove unused functions; these are handled by VisitedLinkTableController now.
1095
1096         * WebProcess/WebProcess.h:
1097         (WebKit::WebProcess::shouldTrackVisitedLinks):
1098         Add getter.
1099
1100         * WebProcess/WebProcess.messages.in:
1101         Remove messages.
1102
1103 2014-03-12  Sergio Villar Senin  <svillar@igalia.com>
1104
1105         Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL
1106         https://bugs.webkit.org/show_bug.cgi?id=129612
1107
1108         Reviewed by Darin Adler.
1109
1110         For new code use static NeverDestroyed<T> instead.
1111
1112         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
1113         (WebKit::getIndexStatement):
1114         (WebKit::getObjectStoreStatement):
1115         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
1116         (WebKit::SeccompBrokerClient::shared):
1117         * UIProcess/InspectorServer/WebInspectorServer.cpp:
1118         (WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest):
1119
1120 2014-03-14  Dan Bernstein  <mitz@apple.com>
1121
1122         <rdar://problem/16319722> [Cocoa] WKHistoryDelegate is being called for subframes
1123         https://bugs.webkit.org/show_bug.cgi?id=130228
1124
1125         Reviewed by Mark Rowe.
1126
1127         * UIProcess/Cocoa/HistoryClient.mm:
1128         (WebKit::HistoryClient::didNavigateWithNavigationData): Bail out if the frame is not the
1129         main frame.
1130         (WebKit::HistoryClient::didPerformClientRedirect): Ditto.
1131         (WebKit::HistoryClient::didPerformServerRedirect): Ditto.
1132         (WebKit::HistoryClient::didUpdateHistoryTitle): Ditto.
1133
1134 2014-03-13  Jinwoo Jeong  <jw00.jeong@samsung.com>
1135
1136         Refactor Vibration algorithm to use only one timer.
1137         https://bugs.webkit.org/show_bug.cgi?id=130059
1138
1139         Reviewed by Darin Adler.
1140
1141         This patch adds a vibration unit test regression after r161257.
1142         It consists of two short term requests to check
1143         that Vibration could work properly by sequential requests.
1144
1145         Indeed this patch tightens condition of existing tests.
1146
1147         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
1148         (TEST_F):
1149
1150 2014-03-13  Paul Hankes Drielsma  <phd@apple.com>
1151
1152         Add SPI to set a custom user agent on WKWebView
1153         https://bugs.webkit.org/show_bug.cgi?id=130164
1154
1155         Reviewed by Dan Bernstein.
1156
1157         * UIProcess/API/Cocoa/WKWebView.mm:
1158         (-[WKWebView _customUserAgent]):
1159         (-[WKWebView _setCustomUserAgent:]):
1160         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1161
1162 2014-03-13  Paul Hankes Drielsma  <phd@apple.com>
1163
1164         Add SPI to run javascript in main frame on WKWebView
1165         https://bugs.webkit.org/show_bug.cgi?id=130047
1166
1167         Reviewed by Anders Carlsson.
1168
1169         * UIProcess/API/Cocoa/WKWebView.mm:
1170         (-[WKWebView _runJavaScriptInMainFrame:]):
1171
1172 2014-03-13  Benjamin Poulain  <bpoulain@apple.com>
1173
1174         The viewport code should not depend on WebKitSystemInterface
1175         https://bugs.webkit.org/show_bug.cgi?id=130218
1176
1177         Reviewed by Tim Horton.
1178
1179         Get the viewport size from the UIProcess when creating a new WebProcess.
1180         From there, the value is stored in WebPage and used whenever we need to update
1181         the viewport parameters.
1182
1183         * Shared/WebPageCreationParameters.cpp:
1184         (WebKit::WebPageCreationParameters::encode):
1185         (WebKit::WebPageCreationParameters::decode):
1186         * Shared/WebPageCreationParameters.h:
1187         * UIProcess/WebPageProxy.cpp:
1188         (WebKit::WebPageProxy::internalShowContextMenu):
1189         * UIProcess/WebPageProxy.h:
1190         * UIProcess/ios/WebPageProxyIOS.mm:
1191         (WebKit::WebPageProxy::viewportScreenSize):
1192         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1193         (WebKit::WebChromeClient::viewportScreenSize):
1194         * WebProcess/WebCoreSupport/WebChromeClient.h:
1195         * WebProcess/WebPage/WebPage.cpp:
1196         (WebKit::WebPage::WebPage):
1197         * WebProcess/WebPage/WebPage.h:
1198         * WebProcess/WebPage/ios/WebPageIOS.mm:
1199         (WebKit::WebPage::viewportScreenSize):
1200
1201 2014-03-13  Beth Dakin  <bdakin@apple.com>
1202
1203         Do not show extended background during a pinch gesture on iOS
1204         https://bugs.webkit.org/show_bug.cgi?id=130152
1205         -and corresponding-
1206         <rdar://problem/16303819>
1207
1208         Reviewed by Simon Fraser.
1209
1210         This patch refactors the backgroundColor-setting logic into its own method so that 
1211         it can be called from both _didCommitLayerTree and scrollViewDidZoom.
1212
1213         Only set the UIScrollView’s background color when the zoomScale is greater than or 
1214         equal to the minimumZoomScale. Also do not set it during the zoom bounce 
1215         animation. Otherwise, clear the background color by setting it to nil.
1216         * UIProcess/API/Cocoa/WKWebView.mm:
1217         (-[WKWebView updateScrollViewBackground]):
1218         (-[WKWebView _didCommitLayerTree:WebKit::]):
1219         (-[WKWebView scrollViewDidZoom:]):
1220
1221 2014-03-13  Enrica Casucci  <enrica@apple.com>
1222
1223         [iOS WebKit2] block selection should avoid large blocks.
1224         https://bugs.webkit.org/show_bug.cgi?id=130208
1225         <rdar://problem/16251785>
1226
1227         Reviewed by Benjamin Poulain.
1228
1229         When creating a block selection, we should discard blocks that
1230         are larger than most of the visible portion of the document.
1231         This prevents the accidental selection the entire document, which
1232         is fairly common when tapping over empty areas.
1233
1234         * Shared/InteractionInformationAtPosition.cpp:
1235         (WebKit::InteractionInformationAtPosition::encode):
1236         (WebKit::InteractionInformationAtPosition::decode):
1237         * Shared/InteractionInformationAtPosition.h: Removed selectionRects that was not really needed and
1238         added isSelectable to indicate whether the selection can start.
1239         (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
1240         * UIProcess/ios/WKContentViewInteraction.mm:
1241         (-[WKContentView hasSelectablePositionAtPoint:]): Now uses isSelectable.
1242         * WebProcess/WebPage/ios/WebPageIOS.mm:
1243         (WebKit::WebPage::getPositionInformation): Takes into account the userSelect property
1244         to figure out if the element can be selected and discards blocks that are
1245         larger than 97% of the visible area of the document.
1246
1247 2014-03-13  Anders Carlsson  <andersca@apple.com>
1248
1249         Rename WKVisitedLinkProvider to _WKVisitedLinkProvider and make it private
1250         https://bugs.webkit.org/show_bug.cgi?id=130207
1251
1252         Reviewed by Dan Bernstein.
1253
1254         * UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Removed.
1255         * UIProcess/API/Cocoa/WKWebView.mm:
1256         (-[WKWebView initWithFrame:configuration:]):
1257         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1258         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1259         (-[WKWebViewConfiguration _visitedLinkProvider]):
1260         (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
1261         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
1262         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.h.
1263         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.mm.
1264         (-[_WKVisitedLinkProvider init]):
1265         * UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h.
1266         * WebKit2.xcodeproj/project.pbxproj:
1267
1268 2014-03-13  Anders Carlsson  <andersca@apple.com>
1269
1270         Remove a commented out member function
1271         https://bugs.webkit.org/show_bug.cgi?id=130204
1272
1273         Reviewed by Tim Horton.
1274
1275         * Shared/ChildProcessProxy.h:
1276         (WebKit::ChildProcessProxy::canSendMessage):
1277
1278 2014-03-13  Enrica Casucci  <enrica@apple.com>
1279
1280         [iOS WebKit2] Crash on iPad when displaying a select element with options.
1281         https://bugs.webkit.org/show_bug.cgi?id=130200
1282         <rdar://problem/16316187>
1283
1284         Reviewed by Simon Fraser.
1285
1286         _singleSelectionIndex should be initialized to NSNotFound for multiSelect elements.
1287
1288         * UIProcess/ios/forms/WKFormSelectPopover.mm:
1289         (-[WKSelectTableViewController initWithView:hasGroups:]):
1290
1291 2014-03-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1292
1293         [GTK] Close the connection when we fail to read from the socket for any unhandled error
1294         https://bugs.webkit.org/show_bug.cgi?id=130191
1295
1296         Reviewed by Martin Robinson.
1297
1298         We currently show an error message, but we should close the
1299         connection avoid entering an infinite loop. Also provide more
1300         information in the error message to help when debugging the issue.
1301
1302         * Platform/IPC/unix/ConnectionUnix.cpp:
1303         (IPC::Connection::readyReadHandler):
1304
1305 2014-03-13  Radu Stavila  <stavila@adobe.com>
1306
1307         Webkit not building on XCode 5.1 due to garbage collection no longer being supported
1308         https://bugs.webkit.org/show_bug.cgi?id=130087
1309
1310         Reviewed by Mark Rowe.
1311
1312         Disable garbage collection on macosx when not using internal SDK.
1313
1314         * Configurations/Base.xcconfig:
1315
1316 2014-03-10  Darin Adler  <darin@apple.com>
1317
1318         Avoid copy-prone idiom "for (auto item : collection)"
1319         https://bugs.webkit.org/show_bug.cgi?id=129990
1320
1321         Reviewed by Geoffrey Garen.
1322
1323         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1324         (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Use auto&.
1325
1326         * Shared/mac/RemoteLayerTreeTransaction.mm:
1327         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Use auto&
1328         even though the type is a scalar. This does no harm and makes it easier
1329         to spot uses that trigger unnecessary copying with grep.
1330         (WebKit::RemoteLayerTreeTransaction::decode): Ditto.
1331         (WebKit::dumpChangedLayers): Ditto.
1332         * UIProcess/mac/RemoteLayerTreeHost.mm:
1333         (WebKit::RemoteLayerTreeHost::updateLayerTree): Ditto.
1334         * WebProcess/WebProcess.cpp:
1335         (WebKit::WebProcess::visitedLinkStateChanged): Ditto.
1336
1337 2014-03-12  Brian Burg  <bburg@apple.com>
1338
1339         Web Inspector: Remove unused callId parameter from evaluateInWebInspector
1340         https://bugs.webkit.org/show_bug.cgi?id=129744
1341
1342         Reviewed by Timothy Hatcher.
1343
1344         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
1345         (WKBundleInspectorEvaluateScriptForTest):
1346         * WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
1347         * WebProcess/WebPage/WebInspector.cpp:
1348         (WebKit::WebInspector::evaluateScriptForTest):
1349         * WebProcess/WebPage/WebInspector.h:
1350
1351 2014-03-13  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
1352
1353         Fix the !ENABLE(SQL_DATABASE) build
1354         https://bugs.webkit.org/show_bug.cgi?id=130130
1355
1356         Reviewed by Csaba Osztrogonác.
1357
1358         Add missing #ifdef guard to typedef.
1359
1360         * UIProcess/API/C/WKDatabaseManager.cpp:
1361
1362 2014-03-12  Dean Jackson  <dino@apple.com>
1363
1364         [WebGL] WebKit1 + WebKit2 iOS clients should check load policy
1365         https://bugs.webkit.org/show_bug.cgi?id=130162
1366
1367         Reviewed by Simon Fraser.
1368
1369         Implement webGLPolicyForURL() methods for iOS.
1370
1371         * Configurations/WebContent-iOS.entitlements: Add the MobileAsset asset type.
1372         * Configurations/WebKit2.xcconfig: Add MobileAsset to iOS link list.
1373         * WebProcess/WebPage/WebPage.cpp: Exclude iOS.
1374         * WebProcess/WebPage/ios/WebPageIOS.mm:
1375         (WebKit::WebPage::webGLPolicyForURL): Call into WKSI.
1376         (WebKit::WebPage::resolveWebGLPolicyForURL):
1377
1378 2014-03-12  Joseph Pecoraro  <pecoraro@apple.com>
1379
1380         Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
1381         https://bugs.webkit.org/show_bug.cgi?id=130118
1382
1383         Reviewed by Timothy Hatcher.
1384
1385         * Configurations/FeatureDefines.xcconfig:
1386
1387 2014-03-12  Enrica Casucci  <enrica@apple.com>
1388
1389         [iOS WebKit2] Crash when trying to select inside a video element with longpress..
1390         https://bugs.webkit.org/show_bug.cgi?id=130095
1391         <rdar://problem/16294534>
1392
1393         Reviewed by Benjamin Poulain.
1394
1395         We only need to set the assisted node for nodes that will receive an
1396         input peripheral (keyboard, picker, popover, etc.).
1397
1398         * WebProcess/WebPage/ios/WebPageIOS.mm:
1399         (WebKit::WebPage::rangeForWebSelectionAtPosition):
1400         (WebKit::WebPage::elementDidFocus):
1401
1402 2014-03-12  Simon Fraser  <simon.fraser@apple.com>
1403
1404         Have the scrolling tree track the viewport size, not the viewport rect
1405         https://bugs.webkit.org/show_bug.cgi?id=130141
1406
1407         Reviewed by Beth Dakin.
1408
1409         The scrolling tree only needs to know the size of the viewport, not its
1410         origin, since the origin is deduced from the updated scroll position.
1411
1412         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1413         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
1414         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
1415
1416 2014-03-12  Commit Queue  <commit-queue@webkit.org>
1417
1418         Unreviewed, rolling out r165481.
1419         https://bugs.webkit.org/show_bug.cgi?id=130151
1420
1421         That didn't go well. (Requested by kling on #webkit).
1422
1423         Reverted changeset:
1424
1425         https://bugs.webkit.org/show_bug.cgi?id=130140
1426         http://trac.webkit.org/changeset/165481
1427
1428 2014-03-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1429
1430         [GTK] Runtime error when page is closed while print operation is in progress
1431         https://bugs.webkit.org/show_bug.cgi?id=129869
1432
1433         Reviewed by Anders Carlsson.
1434
1435         Sometimes when the page is closed right after printing the web
1436         process aborts with the runtime message "pure virtual method
1437         called terminate called without an active exception".
1438         This happens because the page is closed when the pages have been
1439         printed, but print job is still ongoing sending the data to the
1440         printer. When print job finishes, we try to notify the UI process
1441         sending the print callback message using WebPage::send(), but the
1442         web page object has been destroyed. The virtual method it complains
1443         about is probably MessageSender::messageSenderDestinationID() used
1444         by send(). Since our print operation is always asynchronous, we
1445         need a way to notify the web page when the print operation has
1446         actually finished to clean it up, but also notify the print
1447         operation when the page has been closed to not try to notify the
1448         UI process in that case.
1449
1450         * WebProcess/WebPage/WebPage.cpp:
1451         (WebKit::WebPage::close): Call disconnectFromPage to notify the
1452         print operation in case there's an ongoing print job.
1453         (WebKit::WebPage::endPrinting): Do not cleanup the print operation
1454         here, since the print opertation might not have finished yet.
1455         (WebKit::WebPage::didFinishPrintOperation): Send
1456         PrintFinishedCallback message to the Ui process and cleanup the
1457         print operation.
1458         * WebProcess/WebPage/WebPage.h:
1459         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1460         (WebKit::WebPrintOperationGtk::disconnectFromPage): Set m_webPage
1461         to nullptr.
1462         (WebKit::WebPrintOperationGtk::printDone): Call
1463         didFinishPrintOperation() is the web page hasn't been closed.
1464         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
1465
1466 2014-03-12  Andreas Kling  <akling@apple.com>
1467
1468         BundlePageDiagnosticLoggingClient leaks every string passing through it.
1469         <https://webkit.org/b/130140>
1470         <rdar://problem/15416838>
1471
1472         Use toAPI() instead of toCopiedAPI() so the receiving end doesn't need
1473         to worry about adopting the WKStringRef.
1474
1475         Reviewed by Anders Carlsson.
1476
1477         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
1478         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
1479
1480 2014-03-12  Tim Horton  <timothy_horton@apple.com>
1481
1482         Hook up image controls for WebKit1
1483         https://bugs.webkit.org/show_bug.cgi?id=130062
1484         <rdar://problem/15964809>
1485
1486         Reviewed by Brady Eidson.
1487
1488         * Shared/ContextMenuContextData.cpp:
1489         (WebKit::ContextMenuContextData::ContextMenuContextData):
1490
1491 2014-03-11  Alexey Proskuryakov  <ap@apple.com>
1492
1493         REGRESSION (r165356): [Mac] Multi-part key bindings don't work
1494         https://bugs.webkit.org/show_bug.cgi?id=130100
1495
1496         Reviewed by Darin Adler.
1497
1498         Restore the previous behavior, where we only interpreted keydowns (including those
1499         coming through performKeyEquivalent).
1500
1501         In the future, we might send all events to input methods, but not to key bindings.
1502
1503         * UIProcess/API/mac/WKView.mm:
1504         (-[WKView keyUp:]):
1505         (-[WKView flagsChanged:]):
1506
1507 2014-03-11  Beth Dakin  <bdakin@apple.com>
1508
1509         _pageExtendedBackgroundColor should not be exposed on WKWebView
1510         https://bugs.webkit.org/show_bug.cgi?id=130093
1511
1512         Reviewed by Simon Fraser.
1513
1514         Added comment indicating that _pageExtendedBackgroundColor is deprecated.
1515         * UIProcess/API/Cocoa/WKViewPrivate.h:
1516
1517         _pageExtendedBackgroundColor now returns nil, but the conversation functionality 
1518         is maintained with a convenience method pageExtendedBackgroundColor.
1519         * UIProcess/API/Cocoa/WKWebView.mm:
1520         (-[WKWebView pageExtendedBackgroundColor]):
1521         (-[WKWebView _didCommitLayerTree:WebKit::]):
1522         (-[WKWebView _pageExtendedBackgroundColor]):
1523
1524         Added comment indicating that _pageExtendedBackgroundColor is deprecated.
1525         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1526
1527         Return nil.
1528         * UIProcess/API/ios/WKViewIOS.mm:
1529         (-[WKView _pageExtendedBackgroundColor]):
1530
1531 2014-03-11  Jae Hyun Park  <jaepark@webkit.org>
1532
1533         [GTK][CMake] Add HARFBUZZ_INCLUDE_DIRS to WebKit and WebKit2
1534         https://bugs.webkit.org/show_bug.cgi?id=130070
1535
1536         Reviewed by Martin Robinson.
1537
1538         * PlatformGTK.cmake:
1539
1540 2014-03-10  Dan Bernstein  <mitz@apple.com>
1541
1542         [Cocoa] Expose WebPageProxy::close
1543         https://bugs.webkit.org/show_bug.cgi?id=130068
1544
1545         Reviewed by Adele Peterson.
1546
1547         * UIProcess/API/Cocoa/WKWebView.mm:
1548         (-[WKWebView _close]):
1549         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1550
1551 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
1552
1553         [iOS][WebKit 2] Wire the unobscured rect in the WebProcess
1554         https://bugs.webkit.org/show_bug.cgi?id=130058
1555
1556         Reviewed by Simon Fraser.
1557
1558         * WebProcess/WebPage/ios/WebPageIOS.mm:
1559         (WebKit::WebPage::updateVisibleContentRects):
1560
1561 2014-03-10  Simon Fraser  <simon.fraser@apple.com>
1562
1563         Fix three leaks
1564         https://bugs.webkit.org/show_bug.cgi?id=130048
1565
1566         Reviewed by Anders Carlsson.
1567
1568         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1569         (decodeObject): Code is simpler and less leaky without the RetainPtr.
1570         * UIProcess/API/Cocoa/WKNavigationAction.mm: Fix _originalURL leak
1571         by making it a RetainPtr and implementing the getter and setter.
1572         (-[WKNavigationAction _setOriginalURL:]):
1573         (-[WKNavigationAction _originalURL]):
1574
1575 2014-03-10  Beth Dakin  <bdakin@apple.com>
1576
1577         Set background color of WK2's UIScrollView to the pageExtendedBackgroundColor
1578         https://bugs.webkit.org/show_bug.cgi?id=129919
1579
1580         Reviewed by Benjamin Poulain.
1581
1582         Make the pageExtendedBackgroundColor part of a RemoteLayerTreeTransaction.
1583         * Shared/mac/RemoteLayerTreeTransaction.h:
1584         (WebKit::RemoteLayerTreeTransaction::pageExtendedBackgroundColor):
1585         (WebKit::RemoteLayerTreeTransaction::setPageExtendedBackgroundColor):
1586         * Shared/mac/RemoteLayerTreeTransaction.mm:
1587         (WebKit::RemoteLayerTreeTransaction::encode):
1588         (WebKit::RemoteLayerTreeTransaction::decode):
1589
1590         Set the background color of the UIScrollView based on the 
1591         pageExtendedBackgroundColor.
1592         * UIProcess/API/Cocoa/WKWebView.mm:
1593         (-[WKWebView _didCommitLayerTree:WebKit::]):
1594
1595         For the sake of PLATFORM(MAC), continue to support the fact that this color can be 
1596         set via a message from the WebProcess or the new RemoteLayerTreeTransaction.
1597         * UIProcess/WebPageProxy.h:
1598
1599         Cache the pageExtendedBackgroundColor as provided by the 
1600         RemoteLayerTreeTransaction.
1601         * UIProcess/ios/WebPageProxyIOS.mm:
1602         (WebKit::WebPageProxy::didCommitLayerTree):
1603
1604         It’s not necessary to do anything here in non-Mac platforms anymore.
1605         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1606         (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
1607
1608         Include the pageExtendedBackgroundColor in the RemoteLayerTreeTransaction.
1609         * WebProcess/WebPage/WebPage.cpp:
1610         (WebKit::WebPage::willCommitLayerTree):
1611
1612 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
1613
1614         Generalize unobscured rect to all ports
1615         https://bugs.webkit.org/show_bug.cgi?id=130036
1616
1617         Reviewed by Simon Fraser.
1618
1619         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
1620         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
1621         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
1622         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1623         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
1624
1625 2014-03-10  Dan Bernstein  <mitz@apple.com>
1626
1627         <rdar://problem/16278716> [Cocoa] Allow setting a custom group identifier on a WKWebView
1628         https://bugs.webkit.org/show_bug.cgi?id=130033
1629
1630         Reviewed by Tim Horton.
1631
1632         * UIProcess/API/Cocoa/WKWebView.mm:
1633         (-[WKWebView initWithFrame:configuration:]): Create a page group with the group identifier
1634         from the configuration, if it’s non-empty.
1635         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1636         (-[WKWebViewConfiguration _groupIdentifier]): Added this accessor.
1637         (-[WKWebViewConfiguration _setGroupIdentifier:]): Ditto.
1638         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared _groupIdentifier property.
1639
1640 2014-03-10  Enrica Casucci  <enrica@apple.com>
1641
1642         WebKit2: Crash in WebPage::getPositionInformation.
1643         https://bugs.webkit.org/show_bug.cgi?id=129936
1644         <rdar://problem/16264550>
1645  
1646         Reviewed by Eric Carlson.
1647  
1648         Missing null check on the node renderer in one code path.
1649         If the page body is smaller than the document, hit testing
1650         will return HTMLHtmlElement that has no renderer.
1651
1652         * WebProcess/WebPage/ios/WebPageIOS.mm:
1653         (WebKit::WebPage::getPositionInformation):
1654
1655 2014-03-10  Martin Robinson  <mrobinson@igalia.com>
1656
1657         [GTK] [CMake] Clean up library linking
1658         https://bugs.webkit.org/show_bug.cgi?id=129782
1659
1660         Reviewed by Philippe Normand.
1661
1662         * PlatformGTK.cmake: Use the new macro.
1663
1664 2014-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1665
1666         [GTK] The web process can finish while a print operation is still ongoing
1667         https://bugs.webkit.org/show_bug.cgi?id=129871
1668
1669         Reviewed by Martin Robinson.
1670
1671         This can happen when the last page is closed while the print job
1672         is sending data to the printer.
1673
1674         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Disable web
1675         process termination when the print job is sending data to the
1676         printer and enable it again when job finishes.
1677
1678 2014-03-09  Jeong Yong-uk  <yong@company100.com>
1679
1680         Update comment in NetworkResourceLoader
1681         https://bugs.webkit.org/show_bug.cgi?id=129997
1682
1683         Reviewed by Andreas Kling.
1684
1685         NetworkResourceLoader::resourceHandleStopped() has been renamed to
1686         NetworkResourceLoader::cleanup() but the comment is not updated.
1687
1688         * NetworkProcess/NetworkResourceLoader.cpp:
1689         (WebKit::NetworkResourceLoader::start):
1690
1691 2014-03-09  Alexey Proskuryakov  <ap@apple.com>
1692
1693         iOS build fix.
1694
1695         * WebProcess/WebPage/ios/WebPageIOS.mm: Include WebCore/KeyboardEvent.h.
1696
1697 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
1698
1699         [Mac] Don't perform a round-trip through WebProcess before interpreting key events
1700         https://bugs.webkit.org/show_bug.cgi?id=129812
1701
1702         Reviewed by Darin Adler.
1703
1704         * Shared/NativeWebKeyboardEvent.h:
1705         * Shared/WebEvent.h:
1706         (WebKit::WebKeyboardEvent::handledByInputMethod):
1707         (WebKit::WebKeyboardEvent::commands):
1708         * Shared/WebEventConversion.cpp:
1709         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
1710         * Shared/WebKeyboardEvent.cpp:
1711         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
1712         (WebKit::WebKeyboardEvent::~WebKeyboardEvent):
1713         (WebKit::WebKeyboardEvent::encode):
1714         (WebKit::WebKeyboardEvent::decode):
1715         * Shared/mac/NativeWebKeyboardEventMac.mm:
1716         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1717         * Shared/mac/WebEventFactory.h:
1718         * Shared/mac/WebEventFactory.mm:
1719         (WebKit::WebEventFactory::createWebKeyboardEvent):
1720         Keyboard events now carry results of interpretation with them.
1721         Ideally, mouse events should also have a handledByInputMethod member, because IMs
1722         can handle events, but that can wait until we have actual bugs caused by not diabling
1723         default processing for these.
1724
1725         * UIProcess/API/mac/WKView.mm:
1726         (-[WKView becomeFirstResponder]): Updated for new NativeWebKeyboardEvent contructor
1727         signature. We don't interpret the event in this code path.
1728         (-[WKView doCommandBySelector:]): Added logging.
1729         (-[WKView performKeyEquivalent:]): Reimplemented Esc and Cmd+period handling to avoid
1730         infinite loops and re-entrancy. These two work in a unique way in AppKit.
1731         Interpret key event before sending it down to WebProcess.
1732         (-[WKView keyUp:]): Interpret key event before sending it down to WebProcess.
1733         We need to tell IMs about the event, but key binding processing is moot, all commands
1734         are executed on keydown.
1735         (-[WKView keyDown:]): Interpret the event.
1736         (-[WKView flagsChanged:]): Ditto.
1737         (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]): Added an assertion in
1738         consumedByIM code path.
1739         (-[WKView _executeSavedCommandBySelector:]): Added logging.
1740
1741         * UIProcess/PageClient.h:
1742         * UIProcess/ios/PageClientImplIOS.h:
1743         * UIProcess/ios/PageClientImplIOS.mm:
1744         * UIProcess/mac/PageClientImpl.h:
1745         * UIProcess/mac/PageClientImpl.mm:
1746         * UIProcess/WebPageProxy.h:
1747         * UIProcess/WebPageProxy.messages.in:
1748         * UIProcess/ios/WebPageProxyIOS.mm:
1749         * UIProcess/mac/WebPageProxyMac.mm:
1750         Removed interpretQueuedKeyEvent/interpretKeyEvent, WebProcess no longer asks UIProcess to do this.
1751
1752         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
1753         (WebKit::WebEditorClient::handleKeyboardEvent):
1754         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1755         (WebKit::WebEditorClient::handleKeyboardEvent):
1756         (WebKit::WebEditorClient::handleInputMethodKeydown):
1757         WebPage::handleEditingKeyboardEvent is now one function instead of two with a boolean
1758         switch between two behaviors.
1759
1760         * WebProcess/WebPage/WebPage.cpp:(WebKit::WebPage::WebPage):
1761         * WebProcess/WebPage/WebPage.h:
1762         Removed m_keyboardEventBeingInterpreted, as we no longer send the event for interpretation.
1763         This means that we sometimes have to pass a null event down to WebCore, but I wasn't
1764         able to find any behavior differences from us doing so.
1765
1766         * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent):
1767         Added a FIXME.
1768
1769         * WebProcess/WebPage/mac/WebPageMac.mm:
1770         (WebKit::WebPage::executeKeypressCommandsInternal): When we don't have an event,
1771         use current frame as a target, just like input method messages do.
1772         (WebKit::WebPage::handleEditingKeyboardEvent): This function no longer saves commands,
1773         it only interprets them.
1774         Added a check for Esc, as we don't want to handle it in keydown event handler.
1775         (WebKit::WebPage::insertText): Pass 0 instead of m_keyboardEventBeingInterpreted.
1776         (WebKit::WebPage::insertDictatedText): Ditto.
1777         (WebKit::WebPage::executeKeypressCommands): Ditto.
1778
1779 2014-03-09  Zalan Bujtas  <zalan@apple.com>
1780
1781         Subpixel rendering: Pass FloatSize boxsize to transform animations to support device pixel sizing.
1782         https://bugs.webkit.org/show_bug.cgi?id=129985
1783
1784         Reviewed by Simon Fraser.
1785
1786         This is in preparation to stop passing integral positioned boxes to transform animations.
1787
1788         No change in behavior.
1789
1790         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1791
1792 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
1793
1794         [iOS Wk2] Can't scroll after going back to page in page cache
1795         https://bugs.webkit.org/show_bug.cgi?id=129989
1796         <rdar://problem/16217588>
1797
1798         Reviewed by Dan Bernstein.
1799
1800         iOS has a special FrameLoader::forceLayoutWithoutRecalculatingStyle()
1801         function that is called instead of FrameView::forceLayout(). This was unimplemented
1802         for the WK2 FrameLoaderClient, so no layout was forced, with the result
1803         that the contentSize was never updated and scrolling was broken.
1804         
1805         Fix by renaming the client function to forceLayoutOnRestoreFromPageCache()
1806         and having it return a bool to say whether the default forceLayout()
1807         should be done. WK1 can then continue to have its custom behavior,
1808         and Wk2 will simply do a forceLayout().
1809         
1810         Also remove FrameLaoderClient::forceLayout(), which was never called.
1811
1812         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1813         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1814         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
1815         (WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache):
1816
1817 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
1818
1819         [iOS WK2] Get position:fixed working slighlty better
1820         https://bugs.webkit.org/show_bug.cgi?id=129988
1821
1822         Reviewed by Dan Bernstein.
1823         
1824         iOS uses fixed layout, but does not want fixed elements laid
1825         out relative to the frame.
1826
1827         * WebProcess/WebPage/WebPage.cpp:
1828         (WebKit::WebPage::setUseFixedLayout):
1829
1830 2014-03-08  Jon Lee  <jonlee@apple.com>
1831
1832         iOS broken after r165342
1833         https://bugs.webkit.org/show_bug.cgi?id=129987
1834
1835         Reviewed by Simon Fraser.
1836
1837         * NetworkProcess/ios/NetworkProcessIOS.mm:
1838         (WebKit::NetworkProcess::platformLowMemoryHandler): Add missing stub implementation for
1839         platformLowMemoryHandler().
1840
1841 2014-03-08  Eric Carlson  <eric.carlson@apple.com>
1842
1843         [iOS] media preferences not initialized correctly in WebKit2
1844         https://bugs.webkit.org/show_bug.cgi?id=129983
1845
1846         Reviewed by Dan Bernstein.
1847
1848         * Shared/WebPreferencesStore.h: Initialize mediaPlaybackAllowsInline and 
1849         mediaPlaybackRequiresUserGesture correctly for iOS.
1850
1851 2014-03-08  Jeremy Jones  <jeremyj@apple.com>
1852
1853         Allow media element to supply the video layer after fullscreen transition has already begun.
1854         https://bugs.webkit.org/show_bug.cgi?id=129870
1855
1856         Reviewed by Eric Carlson.
1857
1858         WebVideoFullscreenManager and WebVideoFullscreenManagerProxy do their own remote hosting of the video layer instead of needing the video layer to have already been hosted elsewhere. This allows the removal of the coordination with WebPageProxy via a RemoteLayerTreeTransaction.
1859
1860         * Shared/mac/RemoteLayerTreeTransaction.h:
1861         Remove m_videoLayerIDsPendingFullscreen and accessors.
1862
1863         * Shared/mac/RemoteLayerTreeTransaction.mm:
1864         (WebKit::RemoteLayerTreeTransaction::encode):
1865         Don't encode m_videoLayerIDsPendingFullscreen
1866
1867         (WebKit::RemoteLayerTreeTransaction::decode):
1868         Don't decode m_videoLayerIDsPendingFullscreen
1869
1870         * UIProcess/ios/WebPageProxyIOS.mm:
1871         (WebKit::WebPageProxy::didCommitLayerTree):
1872         Don't forward didCommitLayerTree to m_videoFullscreenManager.
1873
1874         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1875         Remove code for synchronizing with the RenderTree.
1876         Add a hosting layer and methods to keep video layer frame and video gravity synchronized.
1877
1878         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1879         Change IPC interface to fascilitate rehosting video layer with a instead of coordinating with the RenderTree by PlatformLayerID.
1880
1881         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1882         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
1883         Remove initialization for removed members.
1884
1885         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID):
1886         Rehost the video layer by id and pass on the layer.
1887         This replaces didCommitLayerTree() and  willLendVideoLayerWithID(). 
1888
1889         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
1890         Cleanup the hosting layer.
1891
1892         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
1893         Forward on the video layer's frame to keep the hosted layer in sync with the interface.
1894
1895         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
1896         Forward the videolayer gravity.
1897
1898         * WebKit2.xcodeproj/project.pbxproj:
1899         Rename WebVideoFullscreenManager.cpp to WebVideoFullscreenManager.mm
1900
1901         * WebProcess/WebPage/WebPage.cpp:
1902         (WebKit::WebPage::willCommitLayerTree):
1903         Don't invovle the m_videoFullscreenManager in layer tree transactions.
1904
1905         * WebProcess/ios/WebVideoFullscreenManager.h:
1906         Remove code that synchronizes with the render tree via RemoteLayerTreeTransaction.
1907         Instead rehost the video layer directly.
1908         Instead of hoping the WebVideoFullscreenModel has a videoLayer, supply one into which
1909         it can add whatever it likes as needed.
1910
1911         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
1912         No more explicit borrowing and returning video layers.
1913         Add functions to keep video layer bounds and gravity in sync with the UI. 
1914
1915         * WebProcess/ios/WebVideoFullscreenManager.mm: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.cpp.
1916         Removed code for synchronizing via RemoteLAyerTreeTransaction.
1917
1918         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
1919         Remove initialization for removed memeber m_sendUnparentVideoLayerTransaction.
1920
1921         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
1922         Creates a fullscreen layer, gives it to the WebVideoFullscreenModel to fill in,
1923         and hosts it in a context to send to the UIProcess.
1924
1925         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
1926         remove enterFullscreen() and just directly send the IPC message. 
1927
1928         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
1929         Clean up the hosting context.
1930
1931         (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
1932         Forward on the video gravity. Type convert from unsigned to MediaPlayer::VideoGravity.
1933
1934 2014-03-08  Andreas Kling  <akling@apple.com>
1935
1936         [WK2] Improve the network process low memory handler.
1937         <https://webkit.org/b/129977>
1938
1939         Split the network process low memory handler into platform-specific
1940         and shared parts. The shared part tells FastMalloc to release freed
1941         pages back to the OS.
1942
1943         For Mac, added a call to purge the in-memory part of CFURLCache.
1944         Remove the malloc_zone_pressure_relief() since that is now taken care
1945         of by the shared MemoryPressureHandler code.
1946
1947         Reviewed by Darin Adler.
1948
1949         * NetworkProcess/NetworkProcess.cpp:
1950         (WebKit::NetworkProcess::initializeNetworkProcess):
1951         (WebKit::NetworkProcess::lowMemoryHandler):
1952         (WebKit::NetworkProcess::platformLowMemoryHandler):
1953         * NetworkProcess/NetworkProcess.h:
1954         * NetworkProcess/mac/NetworkProcessMac.mm:
1955         (WebKit::NetworkProcess::platformLowMemoryHandler):
1956         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1957
1958 2014-03-08  Jae Hyun Park  <jaepark@webkit.org>
1959
1960         Remove unnecessary casting in NetworkProcessMainUnix.cpp
1961         https://bugs.webkit.org/show_bug.cgi?id=129968
1962
1963         Reviewed by Andreas Kling.
1964
1965         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
1966         Since socket is an int, int casting is not necessary.
1967
1968         (WebKit::NetworkProcessMain):
1969
1970 2014-03-08  Aaron Golden  <golden@inkling.com>
1971
1972         Prevent processes spawned by WebProcess from trying to insert the SecItem shim.
1973         https://bugs.webkit.org/show_bug.cgi?id=129864
1974
1975         Reviewed by Anders Carlsson.
1976
1977         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
1978         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
1979
1980 2014-03-07  Tim Horton  <timothy_horton@apple.com>
1981
1982         [WebKit2][iOS] PDF
1983         https://bugs.webkit.org/show_bug.cgi?id=129600
1984         <rdar://problem/15260216>
1985
1986         Reviewed by Anders Carlsson.
1987
1988         Add a single custom content provider which installs a very primitive PDF view
1989         in place of the WKContentView if a PDF is loaded in the main frame.
1990
1991         * Configurations/WebKit2.xcconfig:
1992         Link against CorePDF, for UIPDFPageView.
1993
1994         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
1995         (-[WKWebViewContentProviderRegistry init]):
1996         Initialize the registry, using WKPDFView for all PDF MIME types.
1997
1998         * WebKit2.xcodeproj/project.pbxproj:
1999         * UIProcess/ios/WKPDFView.h: Added.
2000         * UIProcess/ios/WKPDFView.mm: Added.
2001         Add a very simple PDF view based on UIPDFPageView. Additional functionality
2002         can come in the future; right now, we just create one view for each page, and
2003         depend on CATiledLayer to only paint the pages that are being displayed.
2004
2005 2014-03-07  Andreas Kling  <akling@apple.com>
2006
2007         ArgumentEncoder and ArgumentDecoder should be fastmalloced.
2008         <https://webkit.org/b/129960>
2009
2010         Reviewed by Ryosuke Niwa.
2011
2012         * Platform/IPC/ArgumentDecoder.h:
2013         * Platform/IPC/ArgumentEncoder.h:
2014
2015 2014-03-07  Martin Robinson  <mrobinson@igalia.com>
2016
2017         Fix the GTK+ build after the recent iOS merge.
2018
2019         * UIProcess/API/gtk/PageClientImpl.cpp: Make some methods available to non-Cocoa ports and fix some signatures.
2020         * UIProcess/WebPageProxy.h: Ditto.
2021
2022 2014-03-07  Ryuan Choi  <ryuan.choi@samsung.com>
2023
2024         Unreviewed. Fix build on the EFL port after r165303
2025
2026         * UIProcess/CoordinatedGraphics/WebView.cpp:
2027         (WebKit::WebView::didCommitLoadForMainFrame): Added new parameters.
2028         * UIProcess/CoordinatedGraphics/WebView.h: Ditto.
2029         * UIProcess/WebPageProxy.h:
2030         * UIProcess/efl/WebViewEfl.cpp: Added dummy didFinishLoadingDataForCustomContentProvider()
2031         (WebKit::WebViewEfl::exitFullScreen):
2032         (WebKit::WebViewEfl::didFinishLoadingDataForCustomContentProvider):
2033         * UIProcess/efl/WebViewEfl.h: Ditto.
2034
2035 2014-03-07  Enrica Casucci  <enrica@apple.com>
2036
2037         [iOS WebKit2] Keyboard accessory comes up when I click a link.
2038         https://bugs.webkit.org/show_bug.cgi?id=129949
2039         <rdar://problem/16265305>
2040
2041         Reviewed by Simon Fraser.
2042
2043         We need to create the accessory view only when needed.
2044
2045         * UIProcess/ios/WKContentViewInteraction.mm:
2046         (-[WKContentView requiresAccessoryView]):
2047         (-[WKContentView inputAccessoryView]):
2048
2049 2014-03-07  Enrica Casucci  <enrica@apple.com>
2050
2051         [iOS WebKit2] Long-press on a link shows just "Copy".
2052         https://bugs.webkit.org/show_bug.cgi?id=129938
2053         <rdar://problem/16266054>
2054
2055         Reviewed by Benjamin Poulain.
2056
2057         When adding a FIXME comment, I accidentally removed the ! on
2058         the if (!element) condition.
2059
2060         * WebProcess/WebPage/ios/WebPageIOS.mm:
2061         (WebKit::WebPage::getPositionInformation):
2062
2063 2014-03-07  Tim Horton  <timothy_horton@apple.com>
2064
2065         [WebKit2][iOS] Main-frame custom content providers
2066         https://bugs.webkit.org/show_bug.cgi?id=129809
2067
2068         Reviewed by Dan Bernstein.
2069
2070         Re-introduce custom content providers to WebKit2 (removed in r152841), but
2071         for iOS this time.
2072
2073         * UIProcess/API/Cocoa/WKWebView.mm:
2074         (-[WKWebView initWithFrame:configuration:]):
2075         Send the initial MIME types that have custom content providers to the WebProcess.
2076
2077         (-[WKWebView dealloc]):
2078         Unregister our page from the content provider registry.
2079         
2080         (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
2081         Install/uninstall the custom content provider. Create a view, if needed,
2082         based on the class that the registry has associated with the given MIME type.
2083         We unparent the WKContentView while the custom content provider is active,
2084         and re-use the existing WKScrollView to contain the custom content provider.
2085
2086         (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:dataReference:]):
2087         Forward loaded data on to the custom content provider for display.
2088
2089         (-[WKWebView _didCommitLayerTree:WebKit::]):
2090         Assert that we aren't getting layer tree commits while using a custom content provider.
2091
2092         (-[WKWebView viewForZoomingInScrollView:]):
2093         If we're using a custom content provider, its view should be used for zooming
2094         instead of the (unparented) web content view.
2095
2096         (-[WKWebView hasContentView]):
2097         (-[WKWebView scrollViewWillBeginZooming:withView:]):
2098         (-[WKWebView scrollViewWillBeginDragging:]):
2099         (-[WKWebView _didFinishScrolling]):
2100         (-[WKWebView _updateVisibleContentRects]):
2101         If we do not have a parented WKContentView because we are using a custom
2102         content provider, we should not forward scroll view related changes to it.
2103
2104         (-[WKWebView _frameOrBoundsChanged]):
2105         Update the minimum size of the custom content provider if the web view size changes.
2106
2107         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2108         (-[WKWebViewConfiguration copyWithZone:]):
2109         (-[WKWebViewConfiguration _contentProviderRegistry]):
2110         (-[WKWebViewConfiguration _setContentProviderRegistry:]):
2111         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h: Added.
2112         Add an internal WKWebViewConfiguration property, the WKWebViewContentProviderRegistry.
2113
2114         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2115
2116         * UIProcess/Cocoa/WKWebViewContentProvider.h: Added.
2117         A minimal protocol for informing custom content providers of changes to
2118         the size of the view, the represented data, and the owning scroll view.
2119
2120         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.h: Added.
2121         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Added.
2122         (-[WKWebViewContentProviderRegistry addPage:]):
2123         (-[WKWebViewContentProviderRegistry removePage:]):
2124         (-[WKWebViewContentProviderRegistry registerProvider:forMIMEType:]):
2125         (-[WKWebViewContentProviderRegistry providerForMIMEType:]):
2126         (-[WKWebViewContentProviderRegistry mimeTypesWithContentProviders]):
2127         New class, keeps track of a mapping from MIME types to UIViews that
2128         conform to the WKWebViewContentProvider protocol.
2129
2130         * UIProcess/WebPageProxy.cpp:
2131         (WebKit::WebPageProxy::WebPageProxy):
2132         (WebKit::WebPageProxy::didCommitLoadForFrame):
2133         * UIProcess/WebPageProxy.h:
2134         * UIProcess/WebPageProxy.messages.in:
2135
2136         * UIProcess/PageClient.h:
2137         * UIProcess/ios/PageClientImplIOS.h:
2138         * UIProcess/ios/PageClientImplIOS.mm:
2139         (WebKit::PageClientImpl::PageClientImpl):
2140         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2141         (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
2142         * UIProcess/mac/PageClientImpl.h:
2143         * UIProcess/mac/PageClientImpl.mm:
2144         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2145         (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
2146         Add parameters to didCommitLoadForMainFrame, indicating if we should use
2147         a custom content provider to display the main frame, and what MIME type
2148         was loaded in said frame, and add didFinishLoadingDataForCustomContentProvider.
2149         On iOS, forward these to the WKWebView.
2150         Also, give PageClientImplIOS a reference to the WKWebView.
2151         
2152         * UIProcess/ios/WKContentView.mm:
2153         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
2154         
2155         * WebKit2.xcodeproj/project.pbxproj:
2156         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
2157         (-[WKWebProcessPlugInFrame _hasCustomContentProvider]):
2158         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
2159         Expose whether or not a given frame has a custom content provider to the plug-in.
2160
2161         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2162         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
2163         (WebKit::WebFrameLoaderClient::hasHTMLView):
2164         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2165         (WebKit::WebFrameLoaderClient::committedLoad):
2166         (WebKit::WebFrameLoaderClient::finishedLoading):
2167         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
2168         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2169         (WebKit::WebFrameLoaderClient::canCachePage):
2170         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2171         (WebKit::WebFrameLoaderClient::frameHasCustomContentProvider):
2172         Restore WebFrameLoaderClient custom representation code, which ensures
2173         that data is routed correctly (to the UI process, and not to WebCore) and
2174         that we don't try to use the page cache for frames with content providers.
2175
2176         * WebProcess/WebPage/WebPage.cpp:
2177         (WebKit::WebPage::mainFrameHasCustomContentProvider):
2178         (WebKit::WebPage::addMIMETypeWithCustomContentProvider):
2179         (WebKit::WebPage::shouldUseCustomContentProviderForResponse):
2180         (WebKit::WebPage::canShowMIMEType):
2181         * WebProcess/WebPage/WebPage.h:
2182         * WebProcess/WebPage/WebPage.messages.in:
2183         Keep a list of MIME types which can be displayed via custom content providers
2184         in WebPage, which will be pushed down from the registry as new providers
2185         are added. Plug-ins still take precendence over custom content providers.
2186
2187 2014-03-07  Anders Carlsson  <andersca@apple.com>
2188
2189         MigrateHeaders.make should remove C SPI includes from WebKit2 headers
2190         https://bugs.webkit.org/show_bug.cgi?id=129937
2191         <rdar://problem/15920020>
2192
2193         Reviewed by Tim Horton.
2194
2195         * WebKit2.xcodeproj/project.pbxproj:
2196         Make WKPreferences.h and all headers it includes public. Update the post processing of WKBase.h
2197         to account for WKBase.h now being a public header again.
2198
2199 2014-03-07  Alexey Proskuryakov  <ap@apple.com>
2200
2201         REGRESSION (r164847): Pressing the command key while hovering an element causes it to un-hover
2202         https://bugs.webkit.org/show_bug.cgi?id=129872
2203
2204         Reviewed by Tim Horton.
2205
2206         * UIProcess/API/Cocoa/WKViewPrivate.h: Changes in performDictionaryLookupAtCurrentMouseLocation
2207         were also not correct, because the current event could be a keyboard one (Cmd+Ctrl+D).
2208         But this SPI is unused, and can be simply removed.
2209
2210         * UIProcess/API/mac/WKView.mm: (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
2211         locationInWindow is undefined for keyboard events, so we have to use current location.
2212         Thankfully, there is a method that returns the location in appropriate coordinate
2213         space, unlike +[NSEvent mouseLocation] that we used before.
2214
2215 2014-03-07  Andy Estes  <aestes@apple.com>
2216
2217         [iOS] Install WebKit2 XPC services to the correct place during iOS Simulator builds
2218         https://bugs.webkit.org/show_bug.cgi?id=129914
2219
2220         Reviewed by Dan Bernstein.
2221
2222         We weren't specifying INSTALL_PATH for iOS Simulator builds in
2223         BaseXPCService.xcconfig, and r164576 changed INSTALL_PATH to
2224         INSTALL_PATH_ACTUAL. This caused XPC services to start being installed
2225         to the root of the iOS Simulator SDK. Fix this by setting
2226         INSTALL_PATH_ACTUAL for iphonesimulator.
2227
2228         * Configurations/BaseXPCService.xcconfig:
2229
2230 2014-03-07  Andreas Kling  <akling@apple.com>
2231
2232         [Mac] Notify system malloc of fake memory pressure.
2233         <https://webkit.org/b/129908>
2234
2235         Reviewed by Anders Carlsson.
2236
2237         * NetworkProcess/mac/NetworkProcessMac.mm:
2238         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2239
2240             Listen for the fake memory pressure notification and respond by
2241             just forwarding to system malloc. We don't do the full WebCore
2242             memory pressure handling here, since that will cause stuff that
2243             the network process doesn't need to get instantiated.
2244
2245 2014-03-07  Dean Jackson  <dino@apple.com>
2246
2247         Attempt to fix the iOS build.
2248
2249         * Configurations/WebKit2.xcconfig: Add -framework OpenGLES to linking.
2250
2251 2014-03-07  Simon Fraser  <simon.fraser@apple.com>
2252
2253         [iOS] Add an updateID to visibleContentRect updates which is passed back in layer transactions, so we know whether transactions are stale
2254         https://bugs.webkit.org/show_bug.cgi?id=129897
2255
2256         Reviewed by Benjamin Poulain.
2257
2258         In WebKit2 on iOS we need to know when layer updates from the web process
2259         are stale with respect to visible rect updates from the UI process. Do so
2260         by adding an updateID to VisibleContentRectUpdateInfo, and storing it
2261         on each side, returning it in RemoteLayerTreeTransaction.
2262         
2263         Did some re-ordering of members and encoding order in RemoteLayerTreeTransaction
2264         to group like data members together.
2265         
2266         * Shared/VisibleContentRectUpdateInfo.cpp:
2267         (WebKit::VisibleContentRectUpdateInfo::encode):
2268         (WebKit::VisibleContentRectUpdateInfo::decode):
2269         * Shared/VisibleContentRectUpdateInfo.h:
2270         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2271         (WebKit::VisibleContentRectUpdateInfo::updateID):
2272         (WebKit::operator==):
2273         * Shared/mac/RemoteLayerTreeTransaction.h:
2274         (WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID):
2275         (WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID):
2276         * Shared/mac/RemoteLayerTreeTransaction.mm:
2277         (WebKit::RemoteLayerTreeTransaction::encode):
2278         (WebKit::RemoteLayerTreeTransaction::decode):
2279         * UIProcess/WebPageProxy.h:
2280         (WebKit::WebPageProxy::nextVisibleContentRectUpdateID):
2281         (WebKit::WebPageProxy::lastVisibleContentRectUpdateID):
2282         * UIProcess/ios/WKContentView.mm:
2283         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2284         * WebProcess/WebPage/WebPage.cpp:
2285         (WebKit::WebPage::WebPage):
2286         (WebKit::WebPage::willCommitLayerTree):
2287         * WebProcess/WebPage/WebPage.h:
2288         * WebProcess/WebPage/ios/WebPageIOS.mm:
2289         (WebKit::WebPage::updateVisibleContentRects):
2290
2291 2014-03-07  Roger Fong  <roger_fong@apple.com>
2292
2293         Replace setSystemWebGLLoadPolicy API with methods to query for WebGL blocking policy.
2294         https://bugs.webkit.org/show_bug.cgi?id=129873.
2295
2296         Reviewed by Dean Jackson.
2297
2298         Remove setSystemWebGLLoadPolicy API.
2299         * UIProcess/API/APILoaderClient.h:
2300         (API::LoaderClient::resolveWebGLLoadPolicy):
2301         * UIProcess/API/C/WKPage.cpp:
2302         (WKPageSetPageLoaderClient):
2303         * UIProcess/API/C/WKPageLoaderClient.h:
2304         * UIProcess/WebPageProxy.cpp:
2305         (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
2306         * UIProcess/WebPageProxy.h:
2307         * UIProcess/WebPageProxy.messages.in:
2308         * WebProcess/WebPage/mac/WebPageMac.mm:
2309         (WebKit::WebPage::webGLPolicyForURL):
2310
2311         Add API to directly query the WebGL blocking policies from WKSI.
2312         * UIProcess/API/C/mac/WKContextPrivateMac.h:
2313         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2314         (WKContextShouldBlockWebGL):
2315         (WKContextShouldSuggestBlockWebGL):
2316
2317 2014-03-07  Eric Carlson  <eric.carlson@apple.com>
2318
2319         Initialize new WKSI functions for WebKit2
2320         https://bugs.webkit.org/show_bug.cgi?id=129889
2321
2322         Reviewed by Simon Fraser.
2323
2324         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2325         (InitWebCoreSystemInterface):
2326
2327 2014-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2328
2329         [GTK] Use final and override in WebPrintOperationGtk
2330         https://bugs.webkit.org/show_bug.cgi?id=129868
2331
2332         Reviewed by Sergio Villar Senin.
2333
2334         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2335
2336 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
2337
2338         [Mac] Allow com.apple.GSSCred in WebKit sandbox profiles
2339         https://bugs.webkit.org/show_bug.cgi?id=129777
2340         <rdar://problem/16050832>
2341
2342         Reviewed by Anders Carlsson.
2343
2344         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2345         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
2346         * WebProcess/com.apple.WebProcess.sb.in:
2347
2348 2014-03-06  Filip Pizlo  <fpizlo@apple.com>
2349
2350         If the FTL is build-time enabled then it should be run-time enabled.
2351
2352         Rubber stamped by Geoffrey Garen.
2353
2354         * Shared/WebProcessCreationParameters.cpp:
2355         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2356         (WebKit::WebProcessCreationParameters::encode):
2357         (WebKit::WebProcessCreationParameters::decode):
2358         * Shared/WebProcessCreationParameters.h:
2359         * UIProcess/mac/WebContextMac.mm:
2360         (WebKit::registerUserDefaultsIfNeeded):
2361         (WebKit::WebContext::platformInitializeWebProcess):
2362         * WebProcess/cocoa/WebProcessCocoa.mm:
2363         (WebKit::WebProcess::platformInitializeWebProcess):
2364
2365 2014-03-06  Hyowon Kim  <hw1008.kim@samsung.com>
2366
2367         [EFL] Move EvasGL classes from WebKit to WebCore namespace.
2368         https://bugs.webkit.org/show_bug.cgi?id=129797
2369
2370         Reviewed by Gyuyoung Kim.
2371
2372         * UIProcess/API/efl/EwkView.h: namespace changes for EvasGLContext/Surface.
2373
2374 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
2375
2376         Remove one more setCustomFixedPositionRect() that I missed.
2377
2378         * UIProcess/DrawingAreaProxy.h:
2379
2380 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
2381
2382         Send the fixed position rect to the WebProcess along with the other rects
2383         https://bugs.webkit.org/show_bug.cgi?id=129856
2384
2385         Reviewed by Benjamin Poulain.
2386         
2387         Remove the functions that pass the custom fixed position rect through
2388         the DrawingArea, and replace them by adding this rect to the
2389         VisibleContentRectUpdateInfo, along with the "is stable" flag. We
2390         then set the custom fixed position rect in the web process for
2391         stable updates.
2392
2393         * Shared/VisibleContentRectUpdateInfo.cpp:
2394         (WebKit::VisibleContentRectUpdateInfo::encode):
2395         (WebKit::VisibleContentRectUpdateInfo::decode):
2396         * Shared/VisibleContentRectUpdateInfo.h:
2397         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
2398         (WebKit::VisibleContentRectUpdateInfo::customFixedPositionRect):
2399         (WebKit::VisibleContentRectUpdateInfo::inStableState):
2400         (WebKit::operator==):
2401         * UIProcess/DrawingAreaProxy.cpp:
2402         * UIProcess/ios/WKContentView.mm:
2403         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2404         * WebProcess/WebPage/DrawingArea.h:
2405         * WebProcess/WebPage/DrawingArea.messages.in:
2406         * WebProcess/WebPage/ios/WebPageIOS.mm:
2407         (WebKit::WebPage::updateVisibleContentRects):
2408         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2409         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2410         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2411
2412 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
2413
2414         Remove empty class extension in WKContentViewInteraction
2415         https://bugs.webkit.org/show_bug.cgi?id=129849
2416
2417         Reviewed by Enrica Casucci.
2418         
2419         This empty class extension is cruft left over from refactoring.
2420         It can be removed.
2421
2422         * UIProcess/ios/WKContentViewInteraction.mm:
2423
2424 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
2425
2426         [iOS] didUpdateVisibleRect: should use fabs, not abs
2427         https://bugs.webkit.org/show_bug.cgi?id=129843
2428
2429         Reviewed by Benjamin Poulain.
2430         
2431         When zooming we sent messages to the web process with an unchanging
2432         zoom scale because of use of abs() rather than fabs().
2433
2434         * UIProcess/ios/WKContentView.mm:
2435         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2436
2437 2014-03-06  Anders Carlsson  <andersca@apple.com>
2438
2439         Remove WebKit1 header includes from WebKit2
2440         https://bugs.webkit.org/show_bug.cgi?id=129824
2441
2442         Reviewed by Dan Bernstein.
2443
2444         * UIProcess/mac/WKFullScreenWindowController.mm:
2445         (makeResponderFirstResponderIfDescendantOfView):
2446         Add a new function instead of calling an NSWindow category method that's defined in WebKit1.
2447
2448         (-[WKFullScreenWindowController enterFullScreen:]):
2449         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2450         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2451         Call makeResponderFirstResponderIfDescendantOfView.
2452
2453         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2454         Remove unused WebKit1 header import.
2455
2456         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2457         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
2458         Change a category to be on NSObject instead of WebResource.
2459
2460 2014-03-06  Jon Lee  <jonlee@apple.com>
2461
2462         iOS build fix.
2463
2464         Reviewed by Simon Fraser.
2465
2466         * UIProcess/ios/SmartMagnificationController.mm:
2467
2468 2014-03-06  Joseph Pecoraro  <pecoraro@apple.com>
2469
2470         Web Inspector: Expose the console object in JSContexts to interact with Web Inspector
2471         https://bugs.webkit.org/show_bug.cgi?id=127944
2472
2473         Reviewed by Geoffrey Garen.
2474
2475         * WebProcess/WebCoreSupport/WebChromeClient.h:
2476         Update namespaces.
2477
2478 2014-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2479
2480         [GTK] Close the page when the view is disposed instead of when finalized
2481         https://bugs.webkit.org/show_bug.cgi?id=129783
2482
2483         Reviewed by Sergio Villar Senin.
2484
2485         When a GtkWidget is destroyed, the GObject is disposed, but not
2486         finalized if it has additional references. When the destroyed
2487         widget is leaked by the application, we leak the page proxy and
2488         what is more important the web process in multi-process mode.
2489
2490         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2491         (webkitWebViewBaseDispose): Close the WebPageProxy.
2492
2493 2014-03-05  Chris Fleizach  <cfleizach@apple.com>
2494
2495         AX: Support IOS Accessibility in WK2
2496         https://bugs.webkit.org/show_bug.cgi?id=129527
2497
2498         Build fix.
2499
2500         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
2501         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2502
2503 2014-03-05  Chris Fleizach  <cfleizach@apple.com>
2504
2505         AX: Support IOS Accessibility in WK2
2506         https://bugs.webkit.org/show_bug.cgi?id=129527
2507
2508         Address review comments from Simon noted in bug.
2509
2510         * UIProcess/ios/WKContentView.mm:
2511         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
2512         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
2513         (-[WKAccessibilityWebPageObject init]):
2514         (-[WKAccessibilityWebPageObject dealloc]):
2515         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h:
2516         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
2517         (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
2518         (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
2519         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
2520         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
2521         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2522
2523 2014-03-05  Dean Jackson  <dino@apple.com>
2524
2525         [WebGL] Use WKSI to see what the system policy for WebGL is
2526         https://bugs.webkit.org/show_bug.cgi?id=129722
2527         <rdar://problem/15790542>
2528
2529         Reviewed by Tim Horton.
2530
2531         Use the WebKitSystemInterface methods WKShouldBlockWebGL
2532         and WKShouldSuggestBlockingWebGL to query what the host
2533         system thinks about the hardware. Tell the client about
2534         the result in a new WebPage method setSystemWebGLPolicy.
2535
2536         * UIProcess/API/APILoaderClient.h:
2537         (API::LoaderClient::setSystemWebGLLoadPolicy): New empty definition.
2538         * UIProcess/API/C/WKAPICast.h:
2539         (WebKit::toAPI): Convert a WebGLLoadPolicy into a WKWebGLLoadPolicy.
2540         * UIProcess/API/C/WKPage.cpp: Call setSystemWebGLLoadPolicy.
2541         (WKPageSetPageLoaderClient):
2542         * UIProcess/API/C/WKPageLoaderClient.h: New typedef and entry in client structure.
2543         * UIProcess/WebPageProxy.cpp:
2544         (WebKit::WebPageProxy::setSystemWebGLPolicy):
2545         * UIProcess/WebPageProxy.h:
2546         * UIProcess/WebPageProxy.messages.in: Add SetSystemWebGLPolicy.
2547         * Source/WebKit2/Configurations/WebKit2.xcconfig: We have to link against OpenGL now, because WKSI
2548         uses it for hardware detection.
2549         * WebProcess/WebPage/WebPage.cpp: Remove the implementation here, but leave
2550         empty methods for non-Apple platforms.
2551         (WebKit::WebPage::WebPage):
2552         (WebKit::WebPage::webGLPolicyForURL):
2553         (WebKit::WebPage::resolveWebGLPolicyForURL):
2554         * WebProcess/WebPage/WebPage.h: Add m_systemWebGLPolicy.
2555         * WebProcess/WebPage/mac/WebPageMac.mm:
2556         (WebKit::WebPage::webGLPolicyForURL): Moved in from WebPage, but now they call
2557         into WKSI and send the result to the client if necessary.
2558         (WebKit::WebPage::resolveWebGLPolicyForURL):
2559
2560 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
2561
2562         Fix a stupid error in r165118 that caused userVisibleString()
2563         to call itself recursively.
2564
2565         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2566         (WebKit::WebEditorClient::userVisibleString):
2567
2568 2014-03-05  Benjamin Poulain  <bpoulain@apple.com>
2569
2570         [iOS] Rename the various VisibleExtent variations to exposedContentRect
2571         https://bugs.webkit.org/show_bug.cgi?id=129728
2572
2573         Reviewed by Simon Fraser.
2574
2575         * WebProcess/WebPage/DrawingArea.h:
2576         * WebProcess/WebPage/ios/WebPageIOS.mm:
2577         (WebKit::WebPage::updateVisibleContentRects):
2578         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2579         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2580         (WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
2581
2582 2014-03-05  Dean Jackson  <dino@apple.com>
2583
2584         Unreviewed. Fix the Apple-internal builds.
2585
2586         * Configurations/WebKit2.xcconfig: Add -framework OpenGL.
2587
2588 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
2589
2590         ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
2591         https://bugs.webkit.org/show_bug.cgi?id=129752
2592
2593         Reviewed by Enrica Casucci.
2594         
2595         Get WebDragClientMac off of all WebKit headers, and WebEditorClientMac off
2596         all but one by using C functions from WebCoreNSURLExtras.h rather than
2597         the NSURL category.
2598
2599         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2600         (WebKit::WebDragClient::declareAndWriteDragImage):
2601         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2602         (WebKit::WebEditorClient::userVisibleString):
2603         (WebKit::WebEditorClient::canonicalizeURL):
2604         (WebKit::WebEditorClient::canonicalizeURLString):
2605
2606 2014-03-05  Martin Hock  <mhock@apple.com>
2607
2608         Add support for sessions to MemoryCache.
2609         https://bugs.webkit.org/show_bug.cgi?id=127794
2610
2611         Reviewed by Sam Weinig.
2612
2613         * NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
2614         (WebKit::NetworkResourceLoader::sessionID):
2615         * NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
2616         * NetworkProcess/mac/DiskCacheMonitor.mm:
2617         (WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
2618         * WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
2619         (WebKit::NetworkProcessConnection::didCacheResource):
2620         * WebProcess/Network/NetworkProcessConnection.h: Ditto.
2621         * WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
2622
2623 2014-03-05  Enrica Casucci  <enrica@apple.com>
2624
2625         [iOS WebKit2] support multi-select and select with groups for iPhone.
2626         https://bugs.webkit.org/show_bug.cgi?id=129344
2627         <rdar://problem/16206928>
2628
2629         Reviewed by Simon Fraser.
2630
2631         This is the remaining work on select element support on iOS.
2632         This adds multi-select and select with group support with UI
2633         for iPhone that uses UIPickerView.
2634
2635         * UIProcess/ios/WKContentViewInteraction.mm:
2636         (-[WKContentView resignFirstResponder]):
2637         (-[WKContentView inputAccessoryView]): Removed incorrect early return.
2638         (-[WKContentView _stopAssistingNode]):
2639         * UIProcess/ios/forms/WKFormSelectControl.h:
2640         * UIProcess/ios/forms/WKFormSelectControl.mm:
2641         (adjustedFontSize): Moved here to make it available to both picker and
2642         popover based implementations.
2643         (-[WKFormSelectControl initWithView:]):
2644         * UIProcess/ios/forms/WKFormSelectPicker.mm:
2645         (-[WKOptionPickerCell _isSelectable]):
2646         (-[WKOptionPickerCell initCommon]):
2647         (-[WKOptionPickerCell initWithOptionItem:]):
2648         (-[WKOptionGroupPickerCell initWithOptionItem:]):
2649         (-[WKOptionGroupPickerCell labelWidthForBounds:]):
2650         (-[WKOptionGroupPickerCell layoutSubviews]):
2651         (-[WKMultipleSelectPicker initWithView:]):
2652         (-[WKMultipleSelectPicker dealloc]):
2653         (-[WKMultipleSelectPicker controlView]):
2654         (-[WKMultipleSelectPicker controlBeginEditing]):
2655         (-[WKMultipleSelectPicker controlEndEditing]):
2656         (-[WKMultipleSelectPicker layoutSubviews]):
2657         (-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
2658         (-[WKMultipleSelectPicker numberOfComponentsInPickerView:]):
2659         (-[WKMultipleSelectPicker pickerView:numberOfRowsInComponent:]):
2660         (-[WKMultipleSelectPicker findItemIndexAt:]):
2661         (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
2662         (-[WKSelectSinglePicker initWithView:]):
2663         (-[WKSelectSinglePicker controlEndEditing]):
2664         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2665
2666 2014-03-03  Martin Robinson  <mrobinson@igalia.com>
2667
2668         [GTK][CMake] Generate documentation for the DOM bindings
2669         https://bugs.webkit.org/show_bug.cgi?id=126211
2670
2671         Reviewed by Carlos Garcia Campos.
2672
2673         * PlatformGTK.cmake: The list of headers for GIR generation has a better name now.
2674
2675 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
2676
2677         Fix the build after r165095
2678
2679         * UIProcess/API/Cocoa/WKWebView.mm:
2680         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2681
2682 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
2683
2684         [iOS][WK2] Account for the keyboard when computing the unobscuredRect
2685         https://bugs.webkit.org/show_bug.cgi?id=129660
2686
2687         Reviewed by Enrica Casucci.
2688
2689         Adjust the unobscuredRect when a docked keyboard is on screen.
2690
2691         * UIProcess/API/Cocoa/WKWebView.mm:
2692         (-[WKWebView _updateVisibleContentRectsWithStableState:]):
2693         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2694
2695 2014-03-04  Andy Estes  <aestes@apple.com>
2696
2697         [iOS][WebKit2] Exclude plug-in sandbox profiles from the build
2698         https://bugs.webkit.org/show_bug.cgi?id=129719
2699
2700         Reviewed by Simon Fraser.
2701
2702         * Configurations/WebKit2.xcconfig:
2703
2704 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
2705
2706         [iOS][WK2] WKScrollView should be able to cancel touches in content view
2707         https://bugs.webkit.org/show_bug.cgi?id=129711
2708
2709         Reviewed by Simon Fraser.
2710
2711         * UIProcess/ios/WKScrollView.mm:
2712         We should not override UIWebScrollView behavior regarding touch cancellation otherwise we force
2713         other gesture recognizers to fail if delayed touches have been dispatched.
2714
2715 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
2716
2717         [iOS][WK2] Consider the entire view state on update to find if a change is stable or not
2718         https://bugs.webkit.org/show_bug.cgi?id=129721
2719
2720         Reviewed by Simon Fraser.
2721
2722         Changes in scroll, zoom and obscuredRect can happen simultaneously. To compute if the current state
2723         is stable or not, we should consider the complete picture from all the type of updates.
2724
2725         * UIProcess/API/Cocoa/WKWebView.mm:
2726         (-[WKWebView _didFinishScrolling]):
2727         (-[WKWebView scrollViewDidScroll:]):
2728         (-[WKWebView scrollViewDidZoom:]):
2729         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
2730         (-[WKWebView _frameOrBoundsChanged]):
2731         (-[WKWebView _updateVisibleContentRects]):
2732         (-[WKWebView _setObscuredInsets:]):
2733         (-[WKWebView _endInteractiveObscuredInsetsChange]):
2734
2735 2014-03-04  Jeremy Jones  <jeremyj@apple.com>
2736
2737         WebVideoFullscreen, should make the hand off of the video layer explicit.
2738         https://bugs.webkit.org/show_bug.cgi?id=128844
2739
2740         Reviewed by Simon Fraser.
2741
2742         This change introduces a more explicit hand-off of the video layer and fullscreen transition.
2743         This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
2744         WebVideoFullscreenModel <-> WebVideoFullscreenInterface
2745               enterFullScreen(*) ->
2746                                 <- borrowVideoLayer
2747               willLendVideoLayer ->
2748                didLendVideoLayer ->
2749                                 <- didEnterFullscreen
2750                                 ...
2751                                 <- requestExitFullscreen
2752                   exitFullscreen ->
2753                                 <- returnVideoLayer
2754                                 <- didExitFullscreen
2755         (*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.
2756
2757         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2758         Implement WebVideoFullscreenChangeObserver.
2759         Add support for explicit video layer hand-off.
2760         Add m_videoView to retain the videoLayer's UIView.
2761
2762         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2763         WillLendVideoLayerWithID replaces SetVideoLayerID
2764
2765         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2766         Adopt new methods for explicit video layer hand-off.
2767
2768         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
2769         Observe fullscreen changes.
2770
2771         (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
2772         Pending fullscreen transition now does didLendVideoLayer instead of calling enter fullscreen.
2773         It also removes the videoView from it's super view now that it is safe to do so.
2774
2775         (WebKit::WebVideoFullscreenManagerProxy::willLendVideoLayerWithID):
2776         This replaces setVideoLayerID. It retains the UIView for the layer to keep it alive before it is unparented.
2777
2778         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
2779         Adopt more explicit fullscreen transition.
2780
2781         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
2782         Adopt more explicit fullscreen transition.
2783
2784         (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
2785         Adopt more explicit fullscreen transition.
2786
2787         (WebKit::WebVideoFullscreenManagerProxy::borrowVideoLayer):
2788         Adopt more explicit video layer hand-off.
2789
2790         (WebKit::WebVideoFullscreenManagerProxy::returnVideoLayer):
2791         Adopt more explicit video layer hand-off.
2792
2793         * WebProcess/ios/WebVideoFullscreenManager.cpp:
2794         Manage state of fullscreen transition more competently. Wait till an animation is complete to begin the next one.
2795
2796         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
2797         Init three new state members.
2798
2799         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
2800         Update animation state. Don't procede if animation is in progress.
2801
2802         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
2803         Update animation state. Don't procede if animation is in progress.
2804
2805         (WebKit::WebVideoFullscreenManager::willLendVideoLayer):
2806         Adopt more explicit video layer hand-off.
2807         This replaces SetVideoLayer.
2808
2809         (WebKit::WebVideoFullscreenManager::didLendVideoLayer):
2810         This is a no-op as this will be sent through a RemoteLayerTreeTransaction.
2811
2812         (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
2813         Adopt more explicit fullscreen transition.
2814
2815         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
2816         Adopt more explicit fullscreen transition.
2817
2818         * WebProcess/ios/WebVideoFullscreenManager.h:
2819         Adopt more explicit fullscreen transition.
2820
2821         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2822         Adopt more explicit fullscreen/video layer transition.
2823
2824 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2825
2826         Get position:fixed working slightly better on iOS WK2
2827         https://bugs.webkit.org/show_bug.cgi?id=129714
2828
2829         Reviewed by Benjamin Poulain.
2830         
2831         Start telling the RemoteScrollingCoordinatorProxy about scroll position changes
2832         again, so it can update fixed and sticky layers.
2833         
2834         Send the scroll position as a FloatPoint, rather than an IntPoint.
2835
2836         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2837         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling):
2838         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
2839         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2840         * UIProcess/WebPageProxy.h:
2841         * UIProcess/ios/WKContentView.mm:
2842         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2843         Tell the RemoteScrollingCoordinatorProxy about the scroll update.
2844         Only update the customFixedPositionRect if we've finished scrolling or zooming.
2845         * UIProcess/ios/WebPageProxyIOS.mm:
2846         (WebKit::WebPageProxy::updateVisibleContentRects): Return a bool indicating
2847         whether the visible rects changed.
2848
2849 2014-03-04  Conrad Shultz  <conrad_shultz@apple.com>
2850
2851         WKPage's pageExtendedBackgroundColor API exposed through WKView/WKWebView should support NSColor
2852         https://bugs.webkit.org/show_bug.cgi?id=129704
2853
2854         Reviewed by Beth Dakin.
2855
2856         Add NSColor-returning methods to complement the existing UIColor-returning methods.
2857
2858         * UIProcess/API/Cocoa/WKViewPrivate.h:
2859         Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
2860
2861         * UIProcess/API/Cocoa/WKWebView.mm:
2862         (-[WKWebView _pageExtendedBackgroundColor]):
2863         Return an NSColor created from the pageExtendedBackgroundColor.
2864
2865         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2866         Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
2867
2868         * UIProcess/API/mac/WKView.mm:
2869         (-[WKView _pageExtendedBackgroundColor]):
2870         Return an NSColor created from the pageExtendedBackgroundColor.
2871
2872 2014-03-04  Joseph Pecoraro  <pecoraro@apple.com>
2873
2874         Web Inspector: Give WebProcess private RWI entitlement
2875         https://bugs.webkit.org/show_bug.cgi?id=129710
2876
2877         Reviewed by Timothy Hatcher.
2878
2879         * Configurations/WebContent-iOS.entitlements:
2880         Add entitlements to "WebProcess" when code signing.
2881
2882         * Configurations/WebContentProcess.xcconfig:
2883         Add the private RWI entitlement.
2884
2885 2014-03-04  Enrica Casucci  <enrica@apple.com>
2886
2887         [iOS WebKit2]: Next/Prev button in the accessory bar do not work.
2888         https://bugs.webkit.org/show_bug.cgi?id=129690
2889         <rdar://problem/16073569>
2890
2891         Reviewed by Simon Fraser.
2892
2893         Adding support for Next and Previous buttons in the accessory bar.
2894         When the request is processed by the WebProcess, we identify the next
2895         focusable node that needs to be assisted and we call focus() on the element
2896         letting the focus changing machinery take care of updating the assisted node.
2897         This change also add support for the Clear button, when appropriate and hooks up
2898         the call to the WebProcess.
2899
2900         * UIProcess/WebPageProxy.h:
2901         * UIProcess/ios/WKContentViewInteraction.mm:
2902         (-[WKContentView accessoryTab:]):
2903         (-[WKContentView accessoryClear]):
2904         (-[WKContentView _updateAccessory]):
2905         * UIProcess/ios/WebPageProxyIOS.mm:
2906         (WebKit::WebPageProxy::focusNextAssistedNode):
2907         * WebProcess/WebPage/WebPage.h:
2908         * WebProcess/WebPage/WebPage.messages.in:
2909         * WebProcess/WebPage/ios/WebPageIOS.mm:
2910         (WebKit::nextFocusableElement):
2911         (WebKit::hasFocusableElement):
2912         (WebKit::WebPage::focusNextAssistedNode):
2913         (WebKit::WebPage::getAssistedNodeInformation):
2914
2915 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2916
2917         Allow iOS DumpRenderTree crashes to show application-specific information
2918         https://bugs.webkit.org/show_bug.cgi?id=129705
2919
2920         Reviewed by David Kilzer.
2921         
2922         Make the WKSI function SetCrashReportApplicationSpecificInformation available
2923         in iOS simulator builds.
2924
2925         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2926         (InitWebCoreSystemInterface):
2927
2928 2014-03-04  Mark Hahnenberg  <mhahnenberg@apple.com>
2929
2930         Merge API shims and JSLock
2931         https://bugs.webkit.org/show_bug.cgi?id=129650
2932
2933         Reviewed by Mark Lam.
2934
2935         JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason 
2936         to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.
2937
2938         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2939         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
2940         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
2941
2942 2014-03-03  Enrica Casucci  <enrica@apple.com>
2943
2944         [WK2] Selection remains after reload.
2945         https://bugs.webkit.org/show_bug.cgi?id=129648
2946         <rdar://problem/16207547>
2947
2948         Reviewed by Sam Weinig.
2949
2950         We normally clear the selection when resigninig first responder but
2951         that doesn't get called when reloading the page or when navigating with
2952         back/forward buttons. The correct place to do this is when we get
2953         _didCommitLoadForMainFrame where we already stop assisting the node.
2954         The method we call into webselectionassistant is resignedFirstResponder
2955         which takes care of clearing the selection and removing the selection view.
2956
2957         * UIProcess/ios/WKContentViewInteraction.mm:
2958         (-[WKContentView _stopAssistingNode]):
2959
2960 2014-03-04  Hyowon Kim  <hw1008.kim@samsung.com>
2961
2962         Move EvasGLContext and EvasGLSurface files into the efl common directory.
2963         https://bugs.webkit.org/show_bug.cgi?id=129603
2964
2965         Reviewed by Gyuyoung Kim.
2966
2967         * PlatformEfl.cmake: Update for removed files.
2968
2969 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
2970
2971         [iOS][WK2] WebPage::updateVisibleContentRects can set the position directly instead of using programmatic scrolling
2972         https://bugs.webkit.org/show_bug.cgi?id=129649
2973
2974         Reviewed by Sam Weinig.
2975
2976         * WebProcess/WebPage/ios/WebPageIOS.mm:
2977         (WebKit::WebPage::updateVisibleContentRects):
2978         Update my workaround from r165003. We should not use programmatic scrolling when the scroll position is changed
2979         from the UI.
2980
2981 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
2982
2983         [iOS][WK2] Update UIScrollView's contentSize when a new layer tree is committed
2984         https://bugs.webkit.org/show_bug.cgi?id=129641
2985
2986         Reviewed by Sam Weinig.
2987
2988         * UIProcess/API/Cocoa/WKWebView.mm:
2989         (-[WKWebView _didCommitLayerTree:WebKit::]):
2990         Previously, we relied on [UIScrollView setZoomScale:] to reset the contentSize for us.
2991         In the cases where we would not go through [UIScrollView setZoomScale:], the UIScrollView's contentSize
2992         did not match the actual WKContentView's area on screen.
2993
2994 2014-03-03  Jeremy Jones  <jeremyj@apple.com>
2995
2996         Forward application suspend resume notifications to the web process.
2997         https://bugs.webkit.org/show_bug.cgi?id=129356
2998
2999         Reviewed by Eric Carlson.
3000
3001         Repost UIApplicationWillEnterForegroundNotification,
3002         UIApplicationDidBecomeActiveNotification and 
3003         UIApplicationWillResignActiveNotification from UIProcess to WebProcess.
3004         As WebUIApplicationWillEnterForegroundNotification,
3005         WebUIApplicationDidBecomeActiveNotification, and
3006         WebUIApplicationWillResignActiveNotification
3007
3008         * UIProcess/WebPageProxy.h:
3009         Add applicationWillEnterForeground()
3010         applicationWillResignActive()
3011         applicationDidBecomeActive()
3012
3013         * UIProcess/ios/WKContentView.mm:
3014         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
3015         Observe notifications.
3016
3017         (-[WKContentView dealloc]):
3018         Stop observing notifications.
3019
3020         (-[WKContentView _applicationWillResignActive:]):
3021         Notify WebPageProxy of the event.
3022
3023         (-[WKContentView _applicationWillEnterForeground:]):
3024         Notify WebPageProxy of the event.
3025
3026         (-[WKContentView _applicationDidBecomeActive:]):
3027         Notify WebPageProxy of the event.
3028
3029         * UIProcess/ios/WebPageProxyIOS.mm:
3030         (WebKit::WebPageProxy::applicationWillEnterForeground):
3031         Send corresponding Message to WebPage.
3032
3033         (WebKit::WebPageProxy::applicationWillResignActive):
3034         Send corresponding Message to WebPage.
3035
3036         (WebKit::WebPageProxy::applicationDidBecomeActive):
3037         Send corresponding Message to WebPage.
3038
3039         * WebProcess/WebPage/WebPage.h:
3040         Add applicationWillEnterForeground()
3041         applicationWillResignActive()
3042         applicationDidBecomeActive()
3043
3044         * WebProcess/WebPage/WebPage.messages.in:
3045         Add applicationWillEnterForeground()
3046         applicationWillResignActive()
3047         applicationDidBecomeActive()
3048
3049         * WebProcess/WebPage/ios/WebPageIOS.mm:
3050         (WebKit::WebPage::applicationWillResignActive):
3051         Post corresponding NSNotification.
3052
3053         (WebKit::WebPage::applicationWillEnterForeground):
3054         Post corresponding NSNotification.
3055
3056         (WebKit::WebPage::applicationDidBecomeActive):
3057         Post corresponding NSNotification.
3058
3059 2014-03-03  Commit Queue  <commit-queue@webkit.org>
3060
3061         Unreviewed, rolling out r165013.
3062         http://trac.webkit.org/changeset/165013
3063         https://bugs.webkit.org/show_bug.cgi?id=129646
3064
3065         New code is not thread safe, asserting on a worker test
3066         (Requested by ap on #webkit).
3067
3068         * NetworkProcess/NetworkResourceLoader.h:
3069         * NetworkProcess/mac/DiskCacheMonitor.h:
3070         * NetworkProcess/mac/DiskCacheMonitor.mm:
3071         (WebKit::DiskCacheMonitor::DiskCacheMonitor):
3072         * WebProcess/Network/NetworkProcessConnection.cpp:
3073         (WebKit::NetworkProcessConnection::didCacheResource):
3074         * WebProcess/Network/NetworkProcessConnection.h:
3075         * WebProcess/Network/NetworkProcessConnection.messages.in:
3076
3077 2014-03-03  Enrica Casucci  <enrica@apple.com>
3078
3079         [iOS WebKit2]: Text fields don't zoom in when focused
3080         https://bugs.webkit.org/show_bug.cgi?id=129632
3081         <rdar://problem/16185230>
3082
3083         Reviewed by Benjamin Poulain.
3084
3085         When focusing the node we need to zoom and center it and possibly
3086         scroll to make it visible.
3087         On iPad we only scroll, without zooming.
3088
3089         * Shared/AssistedNodeInformation.cpp:
3090         (WebKit::AssistedNodeInformation::encode):
3091         (WebKit::AssistedNodeInformation::decode):
3092         * Shared/AssistedNodeInformation.h:
3093         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
3094         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3095         * UIProcess/ios/WKContentView.h:
3096         * UIProcess/ios/WKContentView.mm:
3097         (-[WKContentView _scrollToRect:withOrigin:minimumScrollDistance:]):
3098         * UIProcess/ios/WKContentViewInteraction.mm:
3099         (-[WKContentView _displayFormNodeInputView]):
3100         (-[WKContentView _startAssistingNode:]):
3101         * WebProcess/WebPage/ios/WebPageIOS.mm:
3102         (WebKit::WebPage::getAssistedNodeInformation):
3103
3104 2014-03-03  Sam Weinig  <sam@webkit.org>
3105
3106         Fix ASSERT and leaks introduced in recent "Support IOS Accessibility in WK2" patch
3107
3108         Reviewed by Simon Fraser.
3109
3110         * UIProcess/ios/WKContentView.mm:
3111         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
3112         * WebProcess/WebPage/ios/WebPageIOS.mm:
3113         (WebKit::WebPage::platformInitializeAccessibility):
3114
3115 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
3116
3117         Composited masks not working on iOS after r164890 
3118         https://bugs.webkit.org/show_bug.cgi?id=129630
3119
3120         Reviewed by Jer Noble.
3121         
3122         Fix typo in UIView-related masks code; set the mask layer
3123         on the view, not the maskView.
3124
3125         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
3126         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
3127
3128 2014-02-28  Chris Fleizach  <cfleizach@apple.com>
3129
3130         AX: Support IOS Accessibility in WK2
3131         https://bugs.webkit.org/show_bug.cgi?id=129527
3132
3133         Reviewed by Sam Weinig.
3134
3135         Implement enough AX hooks so that accessibility can work in WebKit2.
3136
3137         * Platform/IPC/Connection.h:
3138         * Platform/IPC/mac/ConnectionMac.cpp:
3139         (IPC::Connection::identifier):
3140         * UIProcess/ios/PageClientImplIOS.mm:
3141         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
3142         * UIProcess/ios/WKContentView.h:
3143         * UIProcess/ios/WKContentView.mm:
3144         (-[WKContentView _updateForScreen:]):
3145         (-[WKContentView _setAccessibilityWebProcessToken:]):
3146         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
3147         (-[WKContentView _didRelaunchProcess]):
3148         * UIProcess/ios/WebPageProxyIOS.mm:
3149         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
3150         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
3151         * WebKit2.xcodeproj/project.pbxproj:
3152         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3153         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h: Added.
3154         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm: Added.
3155         (-[WKAccessibilityWebPageObject init]):
3156         (-[WKAccessibilityWebPageObject _accessibilityCategoryInstalled:]):
3157         (-[WKAccessibilityWebPageObject pageScale]):
3158         (-[WKAccessibilityWebPageObject dealloc]):
3159         * WebProcess/WebPage/WebPage.h:
3160         * WebProcess/WebPage/ios/WebPageIOS.mm:
3161         (WebKit::WebPage::platformInitialize):
3162         (WebKit::WebPage::platformInitializeAccessibility):
3163         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
3164         (WebKit::WebPage::registerUIProcessAccessibilityTokens):
3165         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h.
3166         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm.
3167         (-[WKAccessibilityWebPageObjectBase accessibilityFocusedUIElement]):
3168         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h: Added.
3169         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Added.
3170         (-[WKAccessibilityWebPageObject accessibilityIsIgnored]):
3171         (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
3172         (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
3173         (-[WKAccessibilityWebPageObject accessibilityIsAttributeSettable:]):
3174         (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
3175         (-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
3176         (-[WKAccessibilityWebPageObject accessibilityActionNames]):
3177         (-[WKAccessibilityWebPageObject accessibilityChildren]):
3178         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
3179         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
3180         (-[WKAccessibilityWebPageObject accessibilityShouldUseUniqueId]):
3181         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
3182         * WebProcess/WebPage/mac/WebPageMac.mm:
3183         * WebProcess/cocoa/WebProcessCocoa.mm:
3184         (WebKit::WebProcess::platformInitializeProcess):
3185
3186 2014-03-03  Martin Hock  <mhock@apple.com>
3187
3188         Add support for sessions to MemoryCache.
3189         https://bugs.webkit.org/show_bug.cgi?id=127794
3190
3191         Reviewed by Sam Weinig.
3192
3193         * NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
3194         (WebKit::NetworkResourceLoader::sessionID):
3195         * NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
3196         * NetworkProcess/mac/DiskCacheMonitor.mm:
3197         (WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
3198         * WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
3199         (WebKit::NetworkProcessConnection::didCacheResource):
3200         * WebProcess/Network/NetworkProcessConnection.h: Ditto.
3201         * WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
3202
3203 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
3204
3205         [iOS][WK2] Regression: ScrollView's scroll offset is never set after r164702
3206         https://bugs.webkit.org/show_bug.cgi?id=129620
3207
3208         Reviewed by Simon Fraser.
3209
3210         * WebProcess/WebPage/ios/WebPageIOS.mm:
3211         (WebKit::WebPage::updateVisibleContentRects):
3212
3213 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
3214
3215         Crash when going into video fullscreen on iOS
3216         https://bugs.webkit.org/show_bug.cgi?id=129613
3217
3218         Reviewed by Dean Jackson.
3219         
3220         We shouldn't reparent a UIView's layer without unparenting
3221         the view first.
3222
3223         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
3224         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
3225
3226 2014-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3227
3228         [GTK] WebKit2WebExtension GIR can't be used in vala
3229         https://bugs.webkit.org/show_bug.cgi?id=127179
3230
3231         Reviewed by Martin Robinson.
3232
3233         Add a different pkg-config file for the web extensions API.
3234
3235         * GNUmakefile.am:
3236         * PlatformGTK.cmake:
3237         * webkit2gtk-web-extension.pc.in: Added.
3238
3239 2014-03-02  Darin Adler  <darin@apple.com>
3240
3241         Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
3242         https://bugs.webkit.org/show_bug.cgi?id=129592
3243
3244         Reviewed by Sam Weinig.
3245
3246         * UIProcess/WebPageProxy.cpp: Added now-needed include.
3247         * WebProcess/WebPage/WebPage.cpp: Ditto.
3248
3249 2014-03-02  Enrica Casucci  <enrica@apple.com>
3250
3251         [iOS WebKit2] Keyboard deadlock when accepting/dismissing autocorrection.
3252         https://bugs.webkit.org/show_bug.cgi?id=129594
3253         <rdar://problem/16168978>
3254
3255         Reviewed by Sam Weinig.
3256
3257         As a temporary fix, we are using a synchronous
3258         message to accept autocorrection until we implement
3259         a solution that processes these requests on a thread that
3260         is not the main thread.
3261
3262         * UIProcess/WebPageProxy.h:
3263         * UIProcess/ios/WKContentViewInteraction.mm:
3264         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
3265         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
3266         * UIProcess/ios/WebPageProxyIOS.mm:
3267         (WebKit::WebPageProxy::applyAutocorrection):
3268         * WebProcess/WebPage/WebPage.h:
3269         * WebProcess/WebPage/WebPage.messages.in:
3270         * WebProcess/WebPage/ios/WebPageIOS.mm:
3271         (WebKit::WebPage::applyAutocorrection):
3272         (WebKit::WebPage::syncApplyAutocorrection):
3273
3274 2014-03-02  Dan Bernstein  <mitz@apple.com>
3275
3276         Try to fix the 32-bit build.
3277
3278         * UIProcess/ios/forms/WKFormSelectPopover.mm:
3279         (adjustedFontSize):
3280
3281 2014-03-02  Sam Weinig  <sam@webkit.org>
3282
3283         Page Cache is not enabled when using the modern WebKit2 API
3284         https://bugs.webkit.org/show_bug.cgi?id=129585
3285
3286         Reviewed by Dan Bernstein.
3287
3288         * UIProcess/API/Cocoa/WKProcessPool.mm:
3289         (-[WKProcessPool initWithConfiguration:]):
3290         Default to CacheModelPrimaryWebBrowser until there is a way to configure it.
3291
3292 2014-03-02  Enrica Casucci  <enrica@apple.com>
3293
3294         [iOS WebKit2] Form controls handling
3295         https://bugs.webkit.org/show_bug.cgi?id=129344
3296         <rdar://problem/16053643>
3297
3298         Reviewed by Simon Fraser.
3299
3300         Adding support for select elements on iOS.
3301         There is full support on iPad, while on iPhone it is
3302         still limited to single select with no groups.
3303         The change also fixes the issue of the keyboard appearing
3304         on screen for types of elements that are implemented with
3305         a popover or a picker.
3306
3307         * Scripts/webkit2/messages.py:
3308         * Shared/AssistedNodeInformation.cpp:
3309         (WebKit::WKOptionItem::encode):
3310         (WebKit::WKOptionItem::decode):
3311         (WebKit::AssistedNodeInformation::encode):
3312         (WebKit::AssistedNodeInformation::decode):
3313         * Shared/AssistedNodeInformation.h:
3314         (WebKit::WKOptionItem::WKOptionItem):
3315         * UIProcess/WebPageProxy.h:
3316         * UIProcess/ios/WKContentViewInteraction.h:
3317         * UIProcess/ios/WKContentViewInteraction.mm:
3318         (-[WKContentView inputView]):
3319         (-[WKContentView assistedNodeSelectOptions]):
3320         (-[WKContentView _startAssistingNode:]):
3321         * UIProcess/ios/WebPageProxyIOS.mm:
3322         (WebKit::WebPageProxy::setAssistedNodeSelectedIndex):
3323         * UIProcess/ios/forms/WKFormSelectControl.h:
3324         * UIProcess/ios/forms/WKFormSelectControl.mm: Added.
3325         (-[WKFormSelectControl initWithView:]):
3326         (+[WKFormSelectControl createPeripheralWithView:]):
3327         (-[WKFormSelectControl assistantView]):
3328         (-[WKFormSelectControl beginEditing]):
3329         (-[WKFormSelectControl endEditing]):
3330         * UIProcess/ios/forms/WKFormSelectPicker.mm: Added.
3331         (-[WKSelectSinglePicker initWithView:]):
3332         (-[WKSelectSinglePicker dealloc]):
3333         (-[WKSelectSinglePicker controlView]):
3334         (-[WKSelectSinglePicker controlBeginEditing]):
3335         (-[WKSelectSinglePicker controlEndEditing]):
3336         (-[WKSelectSinglePicker numberOfComponentsInPickerView:]):
3337         (stringByTrimmingWhitespaceAndNewlines):
3338         (-[WKSelectSinglePicker pickerView:numberOfRowsInComponent:]):
3339         (-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
3340         (-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
3341         * UIProcess/ios/forms/WKFormSelectPopover.mm: Added.
3342         (stringWithWritingDirection):
3343         (adjustedFontSize):
3344         (-[WKSelectTableViewController initWithView:hasGroups:]):
3345         (-[WKSelectTableViewController viewWillAppear:]):
3346         (-[WKSelectTableViewController numberOfSectionsInTableView:]):
3347         (-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
3348         (-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
3349         (-[WKSelectTableViewController populateCell:withItem:]):
3350         (-[WKSelectTableViewController findItemIndexAt:]):
3351         (-[WKSelectTableViewController findItemAt:]):
3352         (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
3353         (-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
3354         (-[WKSelectTableViewController hasText]):
3355         (-[WKSelectTableViewController insertText:]):
3356         (-[WKSelectTableViewController deleteBackward]):
3357         (-[WKSelectPopover initWithView:hasGroups:]):
3358         (-[WKSelectPopover dealloc]):
3359         (-[WKSelectPopover controlView]):
3360         (-[WKSelectPopover controlBeginEditing]):
3361         (-[WKSelectPopover controlEndEditing]):
3362         (-[WKSelectPopover _userActionDismissedPopover:]):
3363         * WebKit2.xcodeproj/project.pbxproj:
3364         * WebProcess/WebPage/WebPage.h:
3365         * WebProcess/WebPage/WebPage.messages.in:
3366         * WebProcess/WebPage/ios/WebPageIOS.mm:
3367         (WebKit::WebPage::setAssistedNodeSelectedIndex):
3368         (WebKit::innerFrameQuad):
3369         (WebKit::WebPage::getPositionInformation):
3370         (WebKit::hasFocusableNode):
3371         (WebKit::WebPage::getAssistedNodeInformation):
3372         (WebKit::WebPage::elementDidFocus):
3373
3374 2014-03-02  Benjamin Poulain  <bpoulain@apple.com>
3375
3376         [iOS][WK2] Pages using tiled compositing layers allocate too many tiles on zoom
3377         https://bugs.webkit.org/show_bug.cgi?id=129471
3378
3379         Reviewed by Simon Fraser.
3380
3381         * WebProcess/WebPage/DrawingArea.h:
3382         * WebProcess/WebPage/ios/WebPageIOS.mm:
3383         (WebKit::WebPage::updateVisibleContentRects):
3384         A few interesting changes here:
3385         -Now that we do not use setExposedRect, we can pass the exposed area directly
3386          to the drawing area since everything is now in content coordinates :)
3387         -The scale is now converted to float before being compared to the Page's scaleFactor.
3388          The page's scalefactor being a float, the comparison was failing most of the time.
3389
3390         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3391         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3392         (WebKit::RemoteLayerTreeDrawingArea::setVisibleExtentContentRect):
3393
3394 2014-03-02  Darin Adler  <darin@apple.com>
3395
3396         Change public text iterator API implementations to not depend on 16-bit character pointers
3397         https://bugs.webkit.org/show_bug.cgi?id=129566
3398
3399         Reviewed by Anders Carlsson.
3400
3401         * WebView/WebTextIterator.mm:
3402         (-[WKDOMTextIterator initWithRange:]): Use make_unique instead of adoptPtr.
3403         (-[WKDOMTextIterator advance]): Clear out the upconverted text since we are moving on to the
3404         next text.
3405         (-[WKDOMTextIterator currentTextPointer]): Upconvert if we have 8-bit text.
3406         (-[WKDOMTextIterator currentTextLength]): Call TextIterator::text().length() since we will
3407         probably be removing TextIterator::length eventually.
3408
3409         * WebProcess/WebCoreSupport/WebEditorClient.cpp: Removed unneded include of TextIterator.h.
3410         * WebProcess/WebPage/WebPage.cpp: Ditto.
3411
3412 2014-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3413
3414         [GTK] Make impossible to build with <webkit2/webkit2.h> and <webkit2/webkit-web-extension.h> included together
3415         https://bugs.webkit.org/show_bug.cgi?id=129549
3416
3417         Reviewed by Martin Robinson.
3418
3419         Add a compile error to prevent mixing the UI and web process APIs.
3420
3421         * UIProcess/API/gtk/webkit2.h:
3422         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
3423
3424 2014-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3425
3426         [GTK] Remove the include dir of the C API from the WebKit2 pkg-config file
3427         https://bugs.webkit.org/show_bug.cgi?id=129543
3428
3429         Reviewed by Martin Robinson.
3430
3431         We are not installing the C API headers anymore.
3432
3433         * webkit2gtk.pc.in:
3434
3435 2014-03-01  Tim Horton  <timothy_horton@apple.com>
3436
3437         Fix the Mac build.
3438
3439         * UIProcess/mac/ViewGestureController.messages.in:
3440
3441 2014-03-01  Tim Horton  <timothy_horton@apple.com>
3442
3443         WebKit2 View Gestures (Smart Magnification): Support for iOS
3444         https://bugs.webkit.org/show_bug.cgi?id=129146
3445         <rdar://problem/16032668>
3446
3447         Reviewed by Benjamin Poulain.
3448
3449         Add support for double-tap smart magnification on iOS.
3450
3451         * DerivedSources.make:
3452         * UIProcess/API/Cocoa/WKWebView.mm:
3453         (-[WKWebView initWithFrame:configuration:]):
3454         WKContentView is no longer API, so it can know about WKWebView
3455         and will always have one.
3456
3457         (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
3458         Don't replace the zoom scale if we're currently animating.
3459
3460         (-[WKWebView _takeViewSnapshot]):
3461         Rename.
3462
3463         (-[WKWebView _zoomToPoint:WebCore::atScale:]):
3464         (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
3465         (constrainContentOffset):
3466         (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
3467         (-[WKWebView _zoomOutWithOrigin:]):
3468         (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
3469         Add _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:
3470         and _zoomOutWithOrigin: as internal API, for use by SmartMagnificationController via WKContentView.
3471         These will use some heuristics to generally center the target rect in the view
3472         in a way that should match WebKit1 fairly closely.
3473
3474         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3475         Don't use the WKContentViewDelegate protocol for things that don't belong there.
3476
3477         * UIProcess/ios/SmartMagnificationController.h: Added.
3478         * UIProcess/ios/SmartMagnificationController.messages.in: Added.
3479         * UIProcess/ios/SmartMagnificationController.mm: Added.
3480         (WebKit::SmartMagnificationController::SmartMagnificationController):
3481         (WebKit::SmartMagnificationController::~SmartMagnificationController):
3482         (WebKit::SmartMagnificationController::handleSmartMagnificationGesture):
3483         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
3484         SmartMagnificationController sits off of WKContentView, and sends/receives
3485         messages to the WebProcess to do the smart magnification hit-testing.
3486
3487         * UIProcess/ios/WKContentView.h:
3488         * UIProcess/ios/WKContentView.mm:
3489         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
3490         As before, teach WKContentView about its owning WKWebView.
3491
3492         (-[WKContentView _takeViewSnapshot]):
3493         Rename.
3494
3495         (-[WKContentView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
3496         (-[WKContentView _zoomOutWithOrigin:]):