REGRESSION(CMake): Make it possible to build without introspection
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-11-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         REGRESSION(CMake): Make it possible to build without introspection
4         https://bugs.webkit.org/show_bug.cgi?id=138006
5
6         Reviewed by Philippe Normand.
7
8         Do not install introspection files when introspection is disabled.
9
10         * PlatformGTK.cmake:
11
12 2014-10-31  Dan Bernstein  <mitz@apple.com>
13
14         Removed a reference to a file that’s been deleted.
15
16         * WebKit2.xcodeproj/project.pbxproj: Removed reference to XPCPtr.h.
17
18 2014-10-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
19
20         Use std::unique_ptr instead of OwnPtr in CoordinatorDrawingProxy
21         https://bugs.webkit.org/show_bug.cgi?id=138238
22
23         Reviewed by Ryosuke Niwa.
24
25         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
26         (WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy): Use std::make_unique.
27         (WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode):
28         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h: Use std::unique_ptr instead of OwnPtr.
29
30 2014-10-31  Sam Weinig  <sam@webkit.org>
31
32         Add bundle SPI to customize the action menu
33         <rdar://problem/18830771>
34         https://bugs.webkit.org/show_bug.cgi?id=138271
35
36         Reviewed by Anders Carlsson.
37
38         - Adds a new function to the WKBundlePageContextMenuClient that allows the client to pass construct
39           user data in the bundle that can be available when customizing the menu in -[WKView _actionMenuItemsForHitTestResult...].
40         - Changes the signature of  -[WKView _actionMenuItemsForHitTestResult...] to add userData.
41         - Makes the actual hit test result available in the second invocation of -[WKView _actionMenuItemsForHitTestResult...]
42           by serializing it in the ActionMenuHitTestResult.
43
44         * Shared/mac/ActionMenuHitTestResult.h:
45         * Shared/mac/ActionMenuHitTestResult.mm:
46         (WebKit::ActionMenuHitTestResult::encode):
47         (WebKit::ActionMenuHitTestResult::decode):
48         Adds the WebHitTestResult and the original hit test request location.
49         
50         * UIProcess/API/Cocoa/WKViewPrivate.h:
51         Adds a new version of _actionMenuItemsForHitTestResult that passes userData along.
52
53         * UIProcess/API/mac/WKView.mm:
54         (-[WKView _didPerformActionMenuHitTest:userData:]):
55         (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:userData:]):
56         * UIProcess/API/mac/WKViewInternal.h:
57         * UIProcess/PageClient.h:
58         * UIProcess/WebPageProxy.cpp:
59         (WebKit::WebPageProxy::didPerformActionMenuHitTest):
60         * UIProcess/WebPageProxy.h:
61         * UIProcess/WebPageProxy.messages.in:
62         * UIProcess/mac/PageClientImpl.h:
63         * UIProcess/mac/PageClientImpl.mm:
64         (WebKit::PageClientImpl::didPerformActionMenuHitTest):
65         Pipe the user data through to the WKView.
66
67         * UIProcess/mac/WKActionMenuController.h:
68         * UIProcess/mac/WKActionMenuController.mm:
69         (-[WKActionMenuController prepareForMenu:withEvent:]):
70         (-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
71         (-[WKActionMenuController menuNeedsUpdate:]):
72         (-[WKActionMenuController _updateActionMenuItemsForStage:]):
73         Differentiate between the two times _updateActionMenuItems was called via a new stage parameter,
74         (it is called once in prepareForMenu, and once in menuNeedsUpdate). Use the last mouse move hit
75         test result in the prepareForMenu case (as we don't have a real result yet), and the hit result
76         passed in via didPerformActionMenuHitTest in the menuNeedsUpdate case (assuming we didn't time out)
77         waiting on the web process.
78
79         * WebProcess/InjectedBundle/API/c/WKBundlePageContextMenuClient.h:
80         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
81         (WebKit::InjectedBundlePageContextMenuClient::prepareForActionMenu):
82         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
83         * WebProcess/WebPage/mac/WebPageMac.mm:
84         (WebKit::WebPage::performActionMenuHitTestAtLocation):
85         Adds new bundle SPI to collect user data to pass to the -[WKView _actionMenuItemsForHitTestResult...] method.
86
87 2014-10-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
88
89         Use std::unique_ptr for TypeCountSet
90         https://bugs.webkit.org/show_bug.cgi?id=138242
91
92         Reviewed by Andreas Kling.
93
94         * WebProcess/WebProcess.cpp:
95         (WebKit::WebProcess::getWebCoreStatistics): Use std::unique_ptr<> instead of OwnPtr.
96
97 2014-10-30  Jer Noble  <jer.noble@apple.com>
98
99         [WK2] Send origin & deletion requests to WebProcessess in additon to the DatabaseProcess.
100         https://bugs.webkit.org/show_bug.cgi?id=138212
101
102         Reviewed by Brady Eidson.
103
104         Now that the WebProcess has its own WebOriginDataManager, WebOriginDataManagerProxy needs to
105         send its origin and deletion messages to all the WebProcesses. This necessetates synchronizing
106         all the various process's callbacks so that the final callback is only triggered once all the
107         messaged processes reply.
108
109         Add a simple class, CallbackSynchronizer, which will keep track of outstanding process callbacks
110         and which will trigger the final callback once all of them finish.
111
112         * UIProcess/WebOriginDataManagerProxy.cpp:
113         (WebKit::CallbackSynchronizer::create):
114         (WebKit::CallbackSynchronizer::~CallbackSynchronizer):
115         (WebKit::CallbackSynchronizer::taskStarted):
116         (WebKit::CallbackSynchronizer::taskCompleted):
117         (WebKit::CallbackSynchronizer::CallbackSynchronizer):
118         (WebKit::createSynchronizedCallback):
119         (WebKit::sendMessageToAllProcessesInContext):
120         (WebKit::WebOriginDataManagerProxy::getOrigins):
121         (WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
122         (WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
123         (WebKit::WebOriginDataManagerProxy::deleteAllEntries):
124
125         Drive-by fix: check the correct enum value for WebMedia origin requests.
126
127         * WebProcess/WebProcess.cpp:
128         (WebKit::WebProcess::getOrigins):
129         (WebKit::WebProcess::deleteEntriesForOrigin):
130         (WebKit::WebProcess::deleteEntriesModifiedBetweenDates):
131         (WebKit::WebProcess::deleteAllEntries):
132
133 2014-10-31  Tim Horton  <timothy_horton@apple.com>
134
135         REGRESSION (r175376): Occasional null deref when doing a dictionary lookup
136         https://bugs.webkit.org/show_bug.cgi?id=138261
137         <rdar://problem/18841709>
138
139         Reviewed by Anders Carlsson.
140
141         * WebProcess/WebPage/mac/WebPageMac.mm:
142         (WebKit::WebPage::performDictionaryLookupAtLocation):
143         rangeForDictionaryLookupAtHitTestResult can easily return null.
144
145 2014-10-31  Beth Dakin  <bdakin@apple.com>
146
147         Use system art for action menus when possible
148         https://bugs.webkit.org/show_bug.cgi?id=138260
149
150         Reviewed by Tim Horton.
151
152         * Resources/AddImageToPhotosTemplate.pdf: Removed.
153         * Resources/CopyImageTemplate.pdf: Removed.
154         * Resources/SaveImageToDownloadsTemplate.pdf: Removed.
155         * Resources/ShareImageTemplate.pdf: Removed.
156         * UIProcess/mac/WKActionMenuController.mm:
157         (-[WKActionMenuController _createActionMenuItemForTag:]):
158         * WebKit2.xcodeproj/project.pbxproj:
159
160 2014-10-31  Timothy Horton  <timothy_horton@apple.com>
161
162         Fix the build for Yosemite systems after r175417
163
164         * UIProcess/mac/WKActionMenuController.mm:
165
166 2014-10-31  Timothy Horton  <timothy_horton@apple.com>
167
168         Fix the build for pre-Yosemite systems after r175417
169
170         * UIProcess/API/mac/WKView.mm:
171         (-[WKView dealloc]):
172         (-[WKView initWithFrame:context:configuration:webView:]):
173         * UIProcess/API/mac/WKViewInternal.h:
174         * UIProcess/mac/PageClientImpl.mm:
175         (WebKit::PageClientImpl::didPerformActionMenuHitTest):
176         * UIProcess/mac/WKActionMenuController.h:
177         * UIProcess/mac/WKActionMenuController.mm:
178
179 2014-10-31  Timothy Horton  <timothy_horton@apple.com>
180
181         Remove "Add to iPhoto" from the action menu's sharing menu
182         https://bugs.webkit.org/show_bug.cgi?id=138251
183         <rdar://problem/18837197>
184
185         Reviewed by Anders Carlsson.
186
187         * UIProcess/mac/WKActionMenuController.mm:
188         (-[WKActionMenuController sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
189         Retain/autorelease the new array.
190
191 2014-10-31  Tim Horton  <timothy_horton@apple.com>
192
193         Remove "Add to iPhoto" from the action menu's sharing menu
194         https://bugs.webkit.org/show_bug.cgi?id=138251
195         <rdar://problem/18837197>
196
197         Reviewed by Anders Carlsson.
198
199         * UIProcess/mac/WKActionMenuController.mm:
200         (-[WKActionMenuController sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
201         Filter out "Add to iPhoto".
202
203 2014-10-31  Adrian Perez de Castro  <aperez@igalia.com>
204
205         [GTK] Support script message handlers WebKitUserContentManager
206         https://bugs.webkit.org/show_bug.cgi?id=133730
207
208         Reviewed by Carlos Garcia Campos.
209
210         Support user script message handlers in WebKitUserContentManager.
211         This needs building with ENABLE_USER_MESSAGE_HANDLERS, for which
212         an option is added to the CMake build files. The option is disabled
213         globally by default, and the WebKitGTK port enables it. On the API
214         level, two new methods to register and unregister names are provided
215         in the "window.webkit" namespace, and on message reception the
216         "WebKitUserContentManager::script-message-received" signal is
217         emitted, using the registered names as signal detail.
218
219         * UIProcess/API/gtk/WebKitJavascriptResult.cpp: Add a new private
220         function to construct a WebKitJavascriptResult directly from a
221         WebCore::SerializedScriptValue.
222         (_WebKitJavascriptResult::_WebKitJavascriptResult): Ditto.
223         (webkitJavascriptResultCreate): Ditto.
224         * UIProcess/API/gtk/WebKitJavascriptResultPrivate.h: Ditto.
225         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
226         (webkit_user_content_manager_class_init): Install the
227         "script-message-received" signal.
228         (webkit_user_content_manager_register_script_message_handler):
229         Added.
230         (webkit_user_content_manager_unregister_script_message_handler):
231         Added.
232         * UIProcess/API/gtk/WebKitUserContentManager.h: Added the new
233         public API methods.
234         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
235         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
236         webkit_user_content_manager_get_type() to the list in order to make
237         gtk-doc to generate documentation for signals.
238
239 2014-10-31  Martin Hock  <mhock@apple.com>
240
241         Unreviewed, iOS build fix since 175406.
242
243         * WebProcess/WebPage/ios/WebPageIOS.mm:
244         (WebKit::WebPage::performActionOnElement):
245
246 2014-10-30  Darin Adler  <darin@apple.com>
247
248         Eliminate ResourceBuffer and use SharedBuffer directly instead
249         https://bugs.webkit.org/show_bug.cgi?id=138174
250
251         Reviewed by Antti Koivisto.
252
253         * CMakeLists.txt: Removed WebResourceBuffer.cpp.
254
255         * NetworkProcess/NetworkResourceLoader.cpp:
256         (WebKit::NetworkResourceLoader::sendBuffer): Use a reference instead of pointer.
257         * NetworkProcess/NetworkResourceLoader.h: Ditto.
258         * NetworkProcess/mac/NetworkDiskCacheMonitor.h: Ditto.
259         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
260         (WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked): Ditto.
261         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
262         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer): Ditto.
263
264         * Shared/WebResourceBuffer.cpp: Removed.
265         * Shared/WebResourceBuffer.h: Removed.
266
267         * WebKit2.xcodeproj/project.pbxproj: Removed WebResourceBuffer.cpp/h.
268
269         * WebProcess/Network/NetworkProcessConnection.cpp: Removed unneeded includes.
270         (WebKit::NetworkProcessConnection::didCacheResource): Use a reference instead
271         of a pointer.
272
273         * WebProcess/Network/WebResourceLoadScheduler.cpp: Removed unneeded include.
274         * WebProcess/Network/WebResourceLoader.cpp: Ditto.
275         * WebProcess/Network/WebResourceLoader.h: Ditto.
276         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Ditto.
277         (WebKit::WebFrameLoaderClient::finishedLoading): Use SharedBuffer directly.
278         * WebProcess/WebPage/WebFrame.cpp:
279         (WebKit::WebFrame::source): Ditto.
280
281         * WebProcess/WebPage/WebPage.cpp:
282         (WebKit::WebPage::runJavaScriptInMainFrame): Refactored to make the relationship
283         between the buffer and the DataReference clearer and to avoid having a long-lived
284         DataReference pointing to an underlying buffer with unclear lifetime.
285         (WebKit::WebPage::getContentsAsString): Ditto.
286         (WebKit::WebPage::getSelectionAsWebArchiveData): Ditto.
287         (WebKit::WebPage::getMainResourceDataOfFrame): Ditto. Also use SharedBuffer directly.
288         (WebKit::WebPage::getResourceDataFromFrame): Ditto.
289         (WebKit::WebPage::getWebArchiveOfFrame): Ditto.
290
291         * WebProcess/WebPage/ios/WebPageIOS.mm:
292         (WebKit::containingLinkElement): Use elementLineage.
293         (WebKit::WebPage::performActionOnElement): Use references and SharedBuffer.
294         ALso did a bit of other cleanup in here.
295         (WebKit::isAssistableElement): Take Element& instead of Node*, since that's what
296         the caller has.
297         (WebKit::nextAssistableElement): Changed name to match what the function does.
298         Added an obviously-missing check on the startNode argument. Updated for change
299         to isAssistableElement above. Take a Page& instead of a Page*.
300         (WebKit::hasAssistableElement): Changed name to match what the function does.
301         Updated for change to nextAssistableElement above. Took out incorrect comparison
302         of a C++ pointer to the Objective-C object pointer nil. Take a Page& instead of a Page*.
303         (WebKit::WebPage::focusNextAssistedNode): Updated for above changes.
304         (WebKit::WebPage::getAssistedNodeInformation): Updated for above changes.
305
306 2014-10-30  Jer Noble  <jer.noble@apple.com>
307
308         [EME] Add Setting for accessing storage location for MediaKeys data
309         https://bugs.webkit.org/show_bug.cgi?id=138147
310
311         Reviewed by Brady Eidson.
312
313         * WebProcess/WebPage/WebPage.cpp:
314         (WebKit::WebPage::WebPage): Pass from WebMediaKeyStorageManager into Settings.
315
316 2014-10-30  Dana Burkart  <dburkart@apple.com>
317
318         Workaround for <rdar://problem/18830639>
319
320         Unreviewed.
321
322         * Shared/API/Cocoa/WKFoundation.h:
323
324 2014-10-30  Dana Burkart  <dburkart@apple.com>
325
326         <rdar://problem/18821260> Prepare for the mysterious future
327
328         Reviewed by Lucas Forschler.
329
330         * Configurations/Base.xcconfig:
331         * Configurations/DebugRelease.xcconfig:
332         * Configurations/FeatureDefines.xcconfig:
333         * Configurations/Version.xcconfig:
334         * Configurations/WebContentService.Development.xcconfig:
335         * Configurations/WebContentService.xcconfig:
336         * Configurations/WebKit.xcconfig:
337
338 2014-10-30  Anders Carlsson  <andersca@apple.com>
339
340         Try to fix the iOS build.
341
342         * WebProcess/WebPage/WebPage.messages.in:
343
344 2014-10-30  Tim Horton  <timothy_horton@apple.com>
345
346         Long spins under rangeExpandedAroundPosition on Yahoo Mail
347         https://bugs.webkit.org/show_bug.cgi?id=138223
348         <rdar://problem/18819547>
349
350         Reviewed by Enrica Casucci.
351
352         * WebProcess/WebPage/mac/WebPageMac.mm:
353         (WebKit::rangeExpandedAroundPositionByCharacters):
354         Reimplement rangeExpandedAroundPosition to operate on characters instead of lines,
355         and to use Position. Moving VisiblePositions by line can be very expensive in some cases,
356         and for generating lookup/Data Detectors context, we don't care about that kind of precision.
357         This makes this function ~1000x faster when it hits on a row in the Yahoo Mail message list.
358
359         (WebKit::WebPage::performDictionaryLookupAtLocation):
360         (WebKit::scanForDataDetectedItems):
361         Adopt the new rangeExpandedAroundPositionByCharacters, expanding 250 characters
362         before and after, which roughly matches what we were usually getting going by line,
363         and is a reasonable amount of context for these operations.
364
365 2014-10-30  Brady Eidson  <beidson@apple.com>
366
367         IndexedDB is deleting data when a PK is shared amongst two objectStores
368         rdar://problem/18479306 and https://bugs.webkit.org/show_bug.cgi?id=137154
369
370         Reviewed by Jer Noble.
371
372         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
373         (WebKit::v1RecordsTableSchema): Store away the v1 schema for introspection into the database.
374         (WebKit::v2RecordsTableSchema): Add utility methods to get the v2 schema with different Table names.
375         (WebKit::createOrMigrateRecordsTableIfNecessary): Check to see if the Records table exists with
376           the correct schema. If it is the v1 schema, then migrate the data to a new v2 table, drop the v1
377           table, then slide the new table into place.
378         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::ensureValidRecordsTable): Make sure the Records table
379           exists and is v2, and then make sure the uniqueness index exists.
380         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata): Don’t bother creating
381           the Records table here as it will have already been established earlier.
382         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
383         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
384
385 2014-10-30  Beth Dakin  <bdakin@apple.com>
386
387         Implement action menus for text
388         https://bugs.webkit.org/show_bug.cgi?id=138220
389         -and corresponding-
390         rdar://problem/18742297
391
392         Reviewed by Tim Horton.
393
394         Two new types of actions for the two text actions.
395         * Shared/API/c/WKActionMenuItemTypes.h:
396
397         One new type of menu.
398         * Shared/API/c/WKActionMenuTypes.h:
399
400         Pass willOpenMenu on to the WKActionMenuController.
401         * UIProcess/API/mac/WKView.mm:
402         (-[WKView willOpenMenu:withEvent:]):
403
404         Two new WebPageProxy functions that will pass messages along to the web process.
405         * UIProcess/WebPageProxy.cpp:
406         (WebKit::WebPageProxy::selectLookupTextAtLocation):
407         * UIProcess/WebPageProxy.h:
408
409         At willOpenMenu time, text menus should select text so that it is clear what the 
410         menu actions will apply to.
411         * UIProcess/mac/WKActionMenuController.h:
412         * UIProcess/mac/WKActionMenuController.mm:
413
414         Menu items for text menus.
415         (-[WKActionMenuController willOpenMenu:withEvent:]):
416         (-[WKActionMenuController _defaultMenuItemsForText]):
417         (-[WKActionMenuController _copyText:]):
418         (-[WKActionMenuController _lookupText:]):
419         (-[WKActionMenuController _createActionMenuItemForTag:]):
420         (imageForResource:name::if):
421
422         New messages to the web process.
423         * UIProcess/mac/WebPageProxyMac.mm:
424         (WebKit::WebPageProxy::performDictionaryLookupOfCurrentSelection):
425         * WebProcess/WebPage/WebPage.h:
426         * WebProcess/WebPage/WebPage.messages.in:
427
428         Re-factor performDictionaryLookupAtLocation() to re-use the code that finds the 
429         Range for the dictionary lookup. That code now lives in 
430         rangeForDictionaryLookupAtHitTestResult() and can be used by 
431         performDictionaryLookupAtLocation() and our new function 
432         selectLookupTextAtLocation().
433         * WebProcess/WebPage/mac/WebPageMac.mm:
434         (WebKit::WebPage::rangeForDictionaryLookupAtHitTestResult):
435         (WebKit::WebPage::performDictionaryLookupAtLocation):
436
437         Since the action menu text is always selected, when the lookup action is chosen, 
438         we can just lookup the current selection.
439         (WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
440
441         Uses the new function rangeForDictionaryLookupAtHitTestResult() to get a lookup 
442         range and then select it.
443         (WebKit::WebPage::selectLookupTextAtLocation):
444
445 2014-10-30  Dan Bernstein  <mitz@apple.com>
446
447         When a client certificate is rejected, Safari says the website didn’t accept the certificate “unknown” instead of naming the certificate
448         https://bugs.webkit.org/show_bug.cgi?id=138216
449
450         Reviewed by Alexey Proskuryakov.
451
452         * Shared/cf/ArgumentCodersCF.cpp:
453         (IPC::typeFromCFTypeRef): Remove no-longer-necessary platform guards around SecIdentityRef.
454         (IPC::encode): Ditto.
455         (IPC::decode): Ditto.
456         * Shared/mac/WebCoreArgumentCodersMac.mm:
457         (IPC::ArgumentCoder<ResourceError>::encodePlatformData): If NSErrorClientCertificateChainKey
458         is present in the error’s userInfo dictionary, assert that it’s an array of identities and
459         certificates, and include it in the filtered dictionary.
460
461 2014-10-29  Hunseop Jeong  <hs85.jeong@samsung.com>
462
463         [CoordinatedGraphics] Use modern for-loops
464         https://bugs.webkit.org/show_bug.cgi?id=138168
465
466         Reviewed by Andreas Kling.
467
468         No new tests as there is no change in functionality.
469
470         * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: Use a modern for loop.
471         (WebCore::CoordinatedBackingStore::texture):
472         (WebCore::CoordinatedBackingStore::paintTilesToTextureMapper):
473         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp: Use a modern for loop.
474         (WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate):
475         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Use a modern for loop.
476         (WebCore::CoordinatedGraphicsScene::setLayerChildrenIfNeeded):
477         (WebCore::CoordinatedGraphicsScene::createLayers): changed the name of argument to be equal with deleteLayer(). 
478         (WebCore::CoordinatedGraphicsScene::deleteLayers):
479         (WebCore::CoordinatedGraphicsScene::createTilesIfNeeded):
480         (WebCore::CoordinatedGraphicsScene::removeTilesIfNeeded):
481         (WebCore::CoordinatedGraphicsScene::updateTilesIfNeeded):
482         (WebCore::CoordinatedGraphicsScene::syncUpdateAtlases):
483         (WebCore::CoordinatedGraphicsScene::syncImageBackings):
484         (WebCore::CoordinatedGraphicsScene::commitSceneState):
485         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp: Use a modern for loop.
486         (WebKit::shouldPaintBoundsRect):
487         (WebKit::CoordinatedDrawingArea::display):
488
489 2014-10-29  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
490
491         Unreviewed, EFL build fix since r175349.
492
493         * UIProcess/WebBackForwardList.cpp:
494         (WebKit::WebBackForwardList::didRemoveItem): Use PLATFORM(COCOA) for setSnapshot().
495
496 2014-10-29  Tim Horton  <timothy_horton@apple.com>
497
498         Null deref under performActionMenuHitTestAtLocation
499         https://bugs.webkit.org/show_bug.cgi?id=138197
500         <rdar://problem/18817803>
501
502         Reviewed by Beth Dakin.
503
504         * WebProcess/WebPage/mac/WebPageMac.mm:
505         (WebKit::scanForDataDetectedItems):
506         Null-check the expanded range.
507
508 2014-10-28  Ada Chan  <adachan@apple.com>
509
510         Implement WKPageSetMuted(bool).
511         https://bugs.webkit.org/show_bug.cgi?id=138158
512
513         Reviewed by Anders Carlsson.
514
515         * UIProcess/API/C/WKPage.cpp:
516         (WKPageSetMuted):
517         * UIProcess/API/C/WKPagePrivate.h:
518         * UIProcess/WebPageProxy.cpp:
519         (WebKit::WebPageProxy::setMuted):
520         * UIProcess/WebPageProxy.h:
521         * WebProcess/WebPage/WebPage.cpp:
522         (WebKit::WebPage::setMuted):
523         * WebProcess/WebPage/WebPage.h:
524         * WebProcess/WebPage/WebPage.messages.in:
525
526 2014-10-29  Anders Carlsson  <andersca@apple.com>
527
528         Clear ViewSnapshots when back/forward list items are removed from their list
529         https://bugs.webkit.org/show_bug.cgi?id=138188
530         <rdar://problem/18817001>
531
532         Reviewed by Tim Horton.
533
534         Ideally we should remove the WebBackForwardListItem objects as well, but this is a somewhat safer fix.
535
536         Change all the "remove item" codepaths to call WebBackForwardList::didRemoveItem and have it clear out the snapshot.
537
538         * UIProcess/WebBackForwardList.cpp:
539         (WebKit::WebBackForwardList::pageClosed):
540         (WebKit::WebBackForwardList::addItem):
541         (WebKit::WebBackForwardList::removeAllItems):
542         (WebKit::WebBackForwardList::clear):
543         (WebKit::WebBackForwardList::didRemoveItem):
544         * UIProcess/WebBackForwardList.h:
545
546 2014-10-29  Tim Horton  <timothy_horton@apple.com>
547
548         Hide the 'Add to Photos' item if it isn't available
549         https://bugs.webkit.org/show_bug.cgi?id=138182
550         <rdar://problem/18814999>
551
552         Reviewed by Beth Dakin.
553
554         * UIProcess/mac/WKActionMenuController.mm:
555         (-[WKActionMenuController _defaultMenuItemsForImage]):
556         (-[WKActionMenuController _canAddImageToPhotos]):
557         (-[WKActionMenuController _addImageToPhotos:]):
558         Factor _canAddImageToPhotos out of _addImageToPhotos:, and use it in
559         _defaultMenuItemsForImage to avoid including the menu item in the first place.
560
561 2014-10-29  Tim Horton  <timothy_horton@apple.com>
562
563         Rename WebPageProxy::activeActionMenuHitTestResult to lastMouseMoveHitTestResult
564         https://bugs.webkit.org/show_bug.cgi?id=138137
565         <rdar://problem/18798257>
566
567         Reviewed by Anders Carlsson.
568
569         * UIProcess/WebPageProxy.cpp:
570         (WebKit::WebPageProxy::mouseDidMoveOverElement):
571         * UIProcess/WebPageProxy.h:
572         (WebKit::WebPageProxy::lastMouseMoveHitTestResult):
573         (WebKit::WebPageProxy::activeActionMenuHitTestResult): Deleted.
574         * UIProcess/mac/WKActionMenuController.mm:
575         (-[WKActionMenuController _defaultMenuItemsForLink]):
576         (-[WKActionMenuController _openURLFromActionMenu:]):
577         (-[WKActionMenuController _addToReadingListFromActionMenu:]):
578         (-[WKActionMenuController _quickLookURLFromActionMenu:]):
579         (-[WKActionMenuController _saveImageToDownloads:]):
580         (imageForResource:name::if):
581         (-[WKActionMenuController _updateActionMenuItems]):
582         Rename to the more accurate and general name.
583
584 2014-10-29  Tim Horton  <timothy_horton@apple.com>
585
586         Implement action menus for data detected items
587         https://bugs.webkit.org/show_bug.cgi?id=138178
588         <rdar://problem/18709436>
589
590         Reviewed by Anders Carlsson.
591
592         * Shared/API/c/WKActionMenuTypes.h:
593         Add a new type.
594
595         * Shared/WebHitTestResult.cpp:
596         (WebKit::WebHitTestResult::Data::Data):
597         (WebKit::WebHitTestResult::Data::encode):
598         (WebKit::WebHitTestResult::Data::decode):
599         * Shared/WebHitTestResult.h:
600         (WebKit::WebHitTestResult::isTextNode):
601         Determine, store, encode, and decode whether or not the hit node is a text node.
602
603         * Shared/mac/ActionMenuHitTestResult.h:
604         * Shared/mac/ActionMenuHitTestResult.mm: Renamed from Source/WebKit2/Shared/mac/ActionMenuHitTestResult.cpp.
605         (WebKit::ActionMenuHitTestResult::encode):
606         (WebKit::ActionMenuHitTestResult::decode):
607         Make ActionMenuHitTestResult an Obj-C++ file.
608         Store, encode, and decode (securely!) a DDActionContext and FloatRect
609         representing the bounding box of the data detected item, if any.
610
611         * UIProcess/API/mac/WKView.mm:
612         (-[WKView initWithFrame:context:configuration:webView:]):
613         (-[WKView willOpenMenu:withEvent:]): Deleted.
614         Stop using willOpenMenu; we'll use NSMenuDelegate's menuNeedsUpdate: instead.
615         Hook up WKActionMenuController as our action menu's delegate.
616
617         * UIProcess/mac/WKActionMenuController.mm:
618         (-[WKActionMenuController prepareForMenu:withEvent:]):
619         Call _updateActionMenuItems *after* we've adjusted _state, so that it
620         can depend on the value being correct.
621
622         (-[WKActionMenuController willOpenMenu:withEvent:]):
623         (-[WKActionMenuController didPerformActionMenuHitTest:]):
624         Move menu updating to menuNeedsUpdate for more accurate timing.
625
626         (_updateActionMenuItems):
627         When building the menu, if we have a text node that is not a link,
628         and hit a data detected item, retrieve the menu from the DDActionContext.
629         If we have nothing, make sure to reset _type, and if the final hit-test
630         is still pending, build a menu with a dummy item.
631
632         * WebKit2.xcodeproj/project.pbxproj:
633         * WebProcess/WebPage/WebPage.cpp:
634         (WebKit::WebPage::performActionMenuHitTestAtLocation): Moved to WebPageMac.
635         * WebProcess/WebPage/mac/WebPageMac.mm:
636         (WebKit::rangeExpandedAroundPosition):
637         Factor this out of performDictionaryLookupAtLocation.
638
639         (WebKit::WebPage::performDictionaryLookupAtLocation):
640         Make use of rangeExpandedAroundPosition.
641
642         (WebKit::scanForDataDetectedItems):
643         Expand to four lines of context around the hit point.
644         Convert that range to plain text, and feed it to DataDetectors.
645         Find the result that intersects the hit point, and make a DDActionContext
646         for it. Also, store the bounding box of the first quad of the detected
647         text, to provide to Data Detectors as a hint for UI placement.
648
649         (WebKit::WebPage::performActionMenuHitTestAtLocation):
650         If the hit node is a text node, call scanForDataDetectedItems and
651         store the resultant DDActionContext and bounding rect on our
652         ActionMenuHitTestResult for transfer to the UI process.
653
654 2014-10-29  Joseph Pecoraro  <pecoraro@apple.com>
655
656         [iOS] iPad: Occasional <select> crashes attempting to scroll to non-existing row 0 in viewWillAppear
657         https://bugs.webkit.org/show_bug.cgi?id=138165
658
659         Reviewed by David Kilzer.
660
661         This is a speculative fix for a crash attempting to scroll to a row in a
662         select picker on iPad. In these cases we are trying to scroll to the first
663         row of the first section, but no such row appears to exist. I was unable
664         to reproduce the issue, but if it is happening we should be able to protect
665         safely protect against crashing.
666
667         * UIProcess/ios/forms/WKFormSelectPopover.mm:
668         (-[WKSelectTableViewController viewWillAppear:]):
669         Protect against trying to scroll to a section/row that does not exist
670         by pre-checking that the section/row is valid.
671
672 2014-10-28  Ting-Wei Lan  <lantw44@gmail.com>
673
674         Cast std::chrono::duration.count() to int64_t in ArgumentCoder
675         https://bugs.webkit.org/show_bug.cgi?id=136981
676
677         Reviewed by Alexey Proskuryakov.
678
679         Explicitly cast the return value of std::chrono::duration.count() to
680         a fixed-size interger type, which prevents compilation error when
681         the return value type matches neither int32_t nor int64_t.
682
683         * Platform/IPC/ArgumentCoders.h:
684
685 2014-10-28  Jer Noble  <jer.noble@apple.com>
686
687         [EME] Pass location for media key storage through from WebKit/WebKit2.
688         https://bugs.webkit.org/show_bug.cgi?id=137120
689
690         Reviewed by Anders Carlsson.
691
692         Allow the location for media key storage to be passed into the WebProcess from the UIProcess
693         through the WebContextConfiguraiton struct.
694
695         * Shared/WebProcessCreationParameters.cpp:
696         (WebKit::WebProcessCreationParameters::encode): Add mediaKeysStorageDirectory.
697         (WebKit::WebProcessCreationParameters::decode): Ditto.
698         * Shared/WebProcessCreationParameters.h:
699         * UIProcess/API/C/WKContextConfigurationRef.cpp:
700         (WKContextConfigurationCopyMediaKeysStorageDirectory): Added getter.
701         (WKContextConfigurationSetMediaKeysStorageDirectory): Added setter.
702         * UIProcess/API/C/WKContextConfigurationRef.h:
703         * UIProcess/API/C/WKOriginDataManager.h:
704         * UIProcess/API/Cocoa/WKProcessPool.mm:
705         (-[WKProcessPool _initWithConfiguration:]): Provide a default location.
706         * UIProcess/APIContextConfiguration.cpp:
707         (API::ContextConfiguration::webContextConfiguration): Set mediaKeysStorageDirectory.
708         * UIProcess/APIContextConfiguration.h:
709         (API::ContextConfiguration::mediaKeysStorageDirectory): Added getter.
710         (API::ContextConfiguration::setMediaKeysStorageDirectory): Added setter.
711         * UIProcess/WebContext.cpp:
712         (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults): Apply mediaKeysStorageDirectory.
713         (WebKit::WebContext::WebContext): Initialize m_mediaKeysStorageDirectory.
714         (WebKit::WebContext::createNewWebProcess): Create a sandbox extension handle for mediaKeysStorageDirectory.
715         * UIProcess/WebContext.h:
716         * UIProcess/efl/WebContextEfl.cpp:
717         (WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Return a default location.
718         * UIProcess/gtk/WebContextGtk.cpp:
719         (WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Ditto.
720         * UIProcess/mac/WebContextMac.mm:
721         (WebKit::WebContext::platformDefaultMediaKeysStorageDirectory): Return an overridable default location.
722         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp: Added.
723         (WebKit::WebMediaKeyStorageManager::initialize): Pull the mediaKeysStorageDirectory out of configuration.
724         (WebKit::WebMediaKeyStorageManager::supplementName): Return a configuration name.
725         (WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectoryForOrigin): Return the
726             correct storage directory based on the SecureOrigin.
727         (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins): Return the origins within the
728             storage directory.
729         (WebKit::removeAllMediaKeyStorageForOriginPath): Static, remove contents and directory at path.
730         (WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesForOrigin): Use
731             removeAllMediaKeyStorageForOriginPath to remove origin data.
732         (WebKit::WebMediaKeyStorageManager::deleteMediaKeyEntriesModifiedBetweenDates): Ditto.
733         (WebKit::WebMediaKeyStorageManager::deleteAllMediaKeyEntries): Ditto.
734         * WebProcess/MediaCache/WebMediaKeyStorageManager.h: Added.
735         (WebKit::WebMediaKeyStorageManager::WebMediaKeyStorageManager): Default constructor.
736         (WebKit::WebMediaKeyStorageManager::~WebMediaKeyStorageManager): Default virtual destructor.
737         (WebKit::WebMediaKeyStorageManager::mediaKeyStorageDirectory): Simple accessor.
738         * WebProcess/WebProcess.cpp:
739         (WebKit::WebProcess::WebProcess): Add WebMediaKeyStorageManager as a supplement.
740         * WebProcess/cocoa/WebProcessCocoa.mm:
741         (WebKit::WebProcess::platformInitializeWebProcess): Create a sandbox extension from the sandbox extension handle.
742
743         Add new source files to project(s).
744
745         * PlatformEfl.cmake:
746         * PlatformGTK.cmake:
747         * WebKit2.xcodeproj/project.pbxproj:
748         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
749         (WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):
750         (WebKit::removeAllMediaKeyStorageForOriginPath):
751
752         Drive-by fix: references to VoidCallback are ambiguous, since the same name is re-used in multiple namespaces.
753         Make references to WebCore::VoidCallback explicit where the entire WebCore (and other) namespaces are pulled in.
754
755         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
756         (WebKit::NotificationPermissionRequestManager::startRequest):
757         (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
758         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
759         (WebKit::WebNotificationClient::requestPermission):
760
761 2014-10-28  Jeremy Jones  <jeremyj@apple.com>
762
763         Add optimized fullscreen mode.
764         https://bugs.webkit.org/show_bug.cgi?id=138044
765
766         Reviewed by Anders Carlsson.
767
768         Enable different types of fullscreen video behavior.
769         Add an enum parameter to enterVideoFullscreenForVideoElement for alternate types of fullscreen.
770
771         * UIProcess/ios/WebVideoFullscreenManagerProxy.h: Add fullscreenType parameter
772         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
773         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
774         (WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): ditto
775         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
776         (WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): ditto
777         * WebProcess/WebCoreSupport/WebChromeClient.h: ditto
778         * WebProcess/ios/WebVideoFullscreenManager.h: ditto
779         * WebProcess/ios/WebVideoFullscreenManager.mm:
780         (WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): ditto
781         (WebKit::WebVideoFullscreenManager::didCleanupFullscreen): ditto
782
783 2014-10-28  Dan Bernstein  <mitz@apple.com>
784
785         Added a Radar reference to a comment.
786
787         * Shared/mac/WebCoreArgumentCodersMac.mm:
788         (IPC::ArgumentCoder<Credential>::encodePlatformData):
789
790 2014-10-28  Dan Bernstein  <mitz@apple.com>
791
792         [Cocoa] REGERESSION (r171801): Client certificate authentication is failing
793         https://bugs.webkit.org/show_bug.cgi?id=138144
794
795         Reviewed by Alexey Proskuryakov.
796
797         NSURLCredential’s implementation of NSSecureCoding fails to encode identity-based
798         credentials properly. Work around that by encoding the identity, certificate, and
799         persistence individually.
800
801         * Shared/mac/WebCoreArgumentCodersMac.mm:
802         (IPC::ArgumentCoder<Credential>::encodePlatformData):
803         (IPC::ArgumentCoder<Credential>::decodePlatformData):
804
805 2014-10-28  Joseph Pecoraro  <pecoraro@apple.com>
806
807         [iOS] iPhone should not allow selecting <optgroup> in <select multiple>
808         https://bugs.webkit.org/show_bug.cgi?id=137991
809
810         Reviewed by Darin Adler.
811
812         We seem to be getting the delegate when we are not supposed to.
813         Workaround the issue as best we can by reseting the styles
814         for the group's content view and not changing selections.
815
816         * UIProcess/ios/forms/WKFormSelectPicker.mm:
817         (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
818
819 2014-10-28  Tim Horton  <timothy_horton@apple.com>
820
821         Remove an inaccurate comment in WKActionMenuController
822         https://bugs.webkit.org/show_bug.cgi?id=138135
823
824         Reviewed by Anders Carlsson.
825
826         * UIProcess/mac/WKActionMenuController.mm:
827         (-[WKActionMenuController _defaultMenuItemsForLink]):
828         The comment is wrong; the separator is there for spacing, not just as a workaround.
829
830 2014-10-28  Carlos Garcia Campos  <cgarcia@igalia.com>
831
832         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.1 release.
833
834         * gtk/NEWS: Add release notes for 2.7.1.
835
836 2014-10-28  Dan Bernstein  <mitz@apple.com>
837
838         [Mac] OS X Mavericks build broken with public SDK
839         https://bugs.webkit.org/show_bug.cgi?id=138108
840
841         Reviewed by Mark Rowe.
842
843         * Shared/API/Cocoa/WKFoundation.h: Only define the NSEventModifierFlags type when using a
844         version of the OS X SDK that doesn’t define it.
845
846 2014-10-27  Conrad Shultz  <conrad_shultz@apple.com>
847
848         NSSharingService protocol conformance should be internal to WKActionMenuController
849         https://bugs.webkit.org/show_bug.cgi?id=138112
850
851         Reviewed by Tim Horton.
852
853         * UIProcess/mac/WKActionMenuController.h:
854         * UIProcess/mac/WKActionMenuController.mm:
855         Move protocol conformance from the interface to a class extension.
856
857 2014-10-27  Enrica Casucci  <enrica@apple.com>
858
859         WebContent crash in WebKit::WebPage::expandedRangeFromHandle.
860         https://bugs.webkit.org/show_bug.cgi?id=138023
861         rdar://problem/18787412
862
863         Reviewed by Ryosuke Niwa.
864
865         We must change that we have a valid currentRange before trying
866         to expand or contract.
867
868         * WebProcess/WebPage/ios/WebPageIOS.mm:
869         (WebKit::WebPage::changeBlockSelection):
870
871 2014-10-27  Alexey Proskuryakov  <ap@apple.com>
872
873         http/tests/cookies/third-party-cookie-relaxing.html is flaky on bots
874         https://bugs.webkit.org/show_bug.cgi?id=138098
875
876         Reviewed by Anders Carlsson.
877
878         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
879         * WebProcess/com.apple.WebProcess.sb.in:
880         Update for the new name of testing session. Memory regions are now of the form
881         "WebKit Test-<pid>-0".
882
883 2014-10-27  Chris Dumez  <cdumez@apple.com>
884
885         Use separate HashMaps for common and uncommon headers in HTTPHeaderMap
886         https://bugs.webkit.org/show_bug.cgi?id=138079
887
888         Reviewed by Anders Carlsson.
889
890         Update the WK2 IPC HTTPHeaderMap serialization / deserialization code
891         to leverage the fact that HTTPHeaderMap now stores common HTTP headers
892         and uncommon one in separate HashMaps. This speeds up deserialization
893         as we no longer need to call findHTTPHeaderName() for every decoded
894         header. We already know if the header is a common one or not, and if
895         it is then we already have a HTTPHeaderName type instead of a String.
896
897         I see that we spend ~40% less time in HTTPHeaderMap decoding when
898         loading http://flickr.com/explore, while the encoding takes about
899         the same amount of time as before.
900
901         * Shared/WebCoreArgumentCoders.cpp:
902         (IPC::ArgumentCoder<HTTPHeaderMap>::encode):
903         (IPC::ArgumentCoder<HTTPHeaderMap>::decode):
904
905 2014-10-24  Benjamin Poulain  <bpoulain@apple.com>
906
907         Fix the iOS build
908
909         * Configurations/WebKit.xcconfig:
910
911 2014-10-24  Beth Dakin  <bdakin@apple.com>
912
913         _actionMenuItemsForHitTestResult should also take a type indicating what the menu 
914         was built for
915         https://bugs.webkit.org/show_bug.cgi?id=138063
916
917         Reviewed by Dan Bernstein.
918
919         New type enum that can be used by clients.
920         * Shared/API/c/WKActionMenuTypes.h: Added.
921
922         Remove the old SPI and add the new.
923         * UIProcess/API/Cocoa/WKViewPrivate.h:
924         * UIProcess/API/mac/WKView.mm:
925         (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]):
926         (-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]): Deleted.
927
928         Now keep an ivar for the type.
929         * UIProcess/mac/WKActionMenuController.h:
930
931         Create a category for the old SPI so that we can still call it if clients have 
932         implemented it.
933         * UIProcess/mac/WKActionMenuController.mm:
934         (-[WKActionMenuController initWithPage:view:]):
935         (-[WKActionMenuController didCloseMenu:withEvent:]):
936         (imageForResource:name::if):
937         (-[WKActionMenuController _updateActionMenuItems]):
938         * WebKit2.xcodeproj/project.pbxproj:
939
940 2014-10-24  Tim Horton  <timothy_horton@apple.com>
941
942         Share sheet doesn't attach to the window
943         https://bugs.webkit.org/show_bug.cgi?id=138062
944         <rdar://problem/18767397>
945
946         Reviewed by Beth Dakin.
947
948         * UIProcess/mac/WKActionMenuController.h:
949         WKActionMenuController is now a NSSharingService{Picker}Delegate.
950
951         * UIProcess/mac/WKActionMenuController.mm:
952         (-[WKActionMenuController _defaultMenuItemsForImage]):
953         Set us up as the NSSharingServicePicker delegate.
954
955         (-[WKActionMenuController sharingServicePicker:delegateForSharingService:]):
956         Set us up as the NSSharingService delegate.
957
958         (-[WKActionMenuController sharingService:sourceWindowForShareItems:sharingContentScope:]):
959         Return the appropriate window to attach to.
960
961 2014-10-24  Jer Noble  <jer.noble@apple.com>
962
963         Abstractify WebOriginDataManager to support arbitrary ChildProcess supplements.
964         https://bugs.webkit.org/show_bug.cgi?id=137993
965
966         Reviewed by Brady Eidson.
967
968         To allow different ChildProcess subclasses to handle listing and deletion of origin
969         data, make WebOriginDataManager more generic by having a supplement implement the
970         details, leaving WebOriginDataManager to deal with cross-process messaging.
971
972         De-virtualize AsyncTask, allowing a task to be created by passing in a
973         function<void()>, rather than an object, method, and arguments.
974
975         * Shared/AsyncTask.h:
976         (WebKit::AsyncTask::AsyncTask):
977         (WebKit::AsyncTask::performTask):
978         (WebKit::AsyncTask::~AsyncTask): Deleted.
979
980         Add a new virtual base class, to be implemented by various ChildProcesses, which
981         WebOriginDataManager will use to implement listing and deletion requests.
982
983         * WebProcess/OriginData/WebOriginDataManager.h:
984         * WebProcess/OriginData/WebOriginDataManagerSupplement.h: Added.
985         (WebKit::WebOriginDataManagerSupplement::WebOriginDataManagerSupplement):
986         (WebKit::WebOriginDataManagerSupplement::~WebOriginDataManagerSupplement):
987         (WebKit::WebOriginDataManagerSupplement::getOrigins):
988         (WebKit::WebOriginDataManagerSupplement::deleteEntriesForOrigin):
989         (WebKit::WebOriginDataManagerSupplement::deleteEntriesModifiedBetweenDates):
990         (WebKit::WebOriginDataManagerSupplement::deleteAllEntries):
991         * WebKit2.xcodeproj/project.pbxproj:
992
993         WebOriginDataManager doesn't need to be a ChildSupplement. Remove the DatabaseProcess-
994         specific implementations for its message handlers and replace with clean, generic calls
995         to its supplement. Because these supplements may want to respond to the request
996         asynchronously, pass a completion function in to be called by the supplement once its
997         work is complete.
998
999         * WebProcess/OriginData/WebOriginDataManager.cpp:
1000         (WebKit::WebOriginDataManager::WebOriginDataManager):
1001         (WebKit::WebOriginDataManager::getOrigins):
1002         (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
1003         (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
1004         (WebKit::WebOriginDataManager::deleteAllEntries):
1005         (WebKit::WebOriginDataManager::supplementName): Deleted.
1006
1007         DatabaseProcess already uses WebOriginDataManager, so it will be the first process
1008         to fall under the heel of the new regime. DatabaseProcess will subclass
1009         WebOriginDataManagerSupplement, and pass itself in twice to the WebOriginDataManager
1010         constructor. Create a lambda-based AsyncTask for each request, and call the completion
1011         function when each request is complete.
1012
1013         * DatabaseProcess/DatabaseProcess.cpp:
1014         (WebKit::DatabaseProcess::DatabaseProcess):
1015         (WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
1016         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
1017         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
1018         (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
1019         (WebKit::DatabaseProcess::getOrigins):
1020         (WebKit::DatabaseProcess::deleteEntriesForOrigin):
1021         (WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates):
1022         (WebKit::DatabaseProcess::deleteAllEntries):
1023         (WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins): Deleted.
1024         (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin): Deleted.
1025         (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates): Deleted.
1026         (WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries): Deleted.
1027         * DatabaseProcess/DatabaseProcess.h:
1028
1029 2014-10-24  Beth Dakin  <bdakin@apple.com>
1030
1031         Very large images crash in action menu code
1032         https://bugs.webkit.org/show_bug.cgi?id=138059
1033         -and corresponding-
1034         rdar://problem/18767859
1035
1036         Reviewed by Tim Horton.
1037
1038         If the HitTestResult failed to create and image, then don’t go for the image 
1039         action menu.
1040         * UIProcess/mac/WKActionMenuController.mm:
1041         (-[WKActionMenuController _defaultMenuItems]):
1042
1043         ShareableBitmap::createShareable() can fail. The result needs to be null-checked.
1044         * WebProcess/WebPage/WebPage.cpp:
1045         (WebKit::WebPage::performActionMenuHitTestAtLocation):
1046
1047 2014-10-24  Beth Dakin  <bdakin@apple.com>
1048
1049         Build fix.
1050
1051         * UIProcess/mac/WKActionMenuController.h:
1052         * UIProcess/mac/WKActionMenuController.mm:
1053
1054 2014-10-24  Tim Horton  <timothy_horton@apple.com>
1055
1056         Blindly try to fix all the builds.
1057
1058         * UIProcess/mac/WKActionMenuController.h:
1059         * UIProcess/mac/WKActionMenuController.mm:
1060
1061 2014-10-24  Timothy Horton  <timothy_horton@apple.com>
1062
1063         Blindly try to fix all the builds.
1064
1065         * UIProcess/mac/WKActionMenuController.h:
1066
1067 2014-10-24  Timothy Horton  <timothy_horton@apple.com>
1068
1069         Blindly try to fix the 32-bit build.
1070
1071         * UIProcess/mac/WKActionMenuController.h:
1072         * UIProcess/mac/WKActionMenuController.mm:
1073
1074 2014-10-24  Tim Horton  <timothy_horton@apple.com>
1075
1076         [Mac][WebKit2] Move action menu code into its own file
1077         https://bugs.webkit.org/show_bug.cgi?id=138034
1078         <rdar://problem/18758758>
1079
1080         * UIProcess/mac/WKActionMenuController.mm:
1081         (-[WKActionMenuController prepareForMenu:withEvent:]):
1082         (-[WKActionMenuController _addImageToPhotos:]):
1083         Review comments that were not previously addressed.
1084
1085 2014-10-24  Tim Horton  <timothy_horton@apple.com>
1086
1087         [Mac][WebKit2] Move action menu code into its own file
1088         https://bugs.webkit.org/show_bug.cgi?id=138034
1089         <rdar://problem/18758758>
1090
1091         Reviewed by Dan Bernstein.
1092
1093         * UIProcess/API/mac/WKView.mm:
1094         (-[WKView initWithFrame:context:configuration:webView:]):
1095         Make a WKActionMenuController if needed.
1096
1097         (-[WKView prepareForMenu:withEvent:]):
1098         (-[WKView willOpenMenu:withEvent:]):
1099         (-[WKView didCloseMenu:withEvent:]):
1100         (-[WKView _didPerformActionMenuHitTest:]):
1101         Forward these to WKActionMenuController.
1102
1103         (-[WKView _openURLFromActionMenu:]): Deleted.
1104         (-[WKView _addToReadingListFromActionMenu:]): Deleted.
1105         (-[WKView _quickLookURLFromActionMenu:]): Deleted.
1106         (-[WKView _createActionMenuItemForTag:]): Deleted.
1107         (webKitBundleImageNamed): Deleted.
1108         (-[WKView _copyImage:]): Deleted.
1109         (-[WKView _saveImageToDownloads:]): Deleted.
1110         (temporaryPhotosDirectoryPath): Deleted.
1111         (pathToPhotoOnDisk): Deleted.
1112         (-[WKView _addImageToPhotos:]): Deleted.
1113         (-[WKView _defaultMenuItemsForImage]): Deleted.
1114         (-[WKView _defaultMenuItems]): Deleted.
1115         (-[WKView _updateActionMenu]): Deleted.
1116         Moved to WKActionMenuController.
1117
1118         * UIProcess/mac/WKActionMenuController.h: Added.
1119         * UIProcess/mac/WKActionMenuController.mm: Added.
1120         (-[WKActionMenuController initWithPage:view:]):
1121         (-[WKActionMenuController prepareForMenu:withEvent:]):
1122         (-[WKActionMenuController willOpenMenu:withEvent:]):
1123         (-[WKActionMenuController didCloseMenu:withEvent:]):
1124         (-[WKActionMenuController didPerformActionMenuHitTest:]):
1125         (-[WKActionMenuController _defaultMenuItemsForLink]):
1126         (-[WKActionMenuController _openURLFromActionMenu:]):
1127         (-[WKActionMenuController _addToReadingListFromActionMenu:]):
1128         (-[WKActionMenuController _quickLookURLFromActionMenu:]):
1129         (-[WKActionMenuController _defaultMenuItemsForImage]):
1130         (-[WKActionMenuController _copyImage:]):
1131         (-[WKActionMenuController _saveImageToDownloads:]):
1132         (temporaryPhotosDirectoryPath):
1133         (pathToPhotoOnDisk):
1134         (-[WKActionMenuController _addImageToPhotos:]):
1135         (-[WKActionMenuController _createActionMenuItemForTag:]):
1136         (webKitBundleImageNamed):
1137         (imageForResource:name::if):
1138         (-[WKActionMenuController _updateActionMenuItems]):
1139         Moved from WKView.
1140
1141         * WebKit2.xcodeproj/project.pbxproj:
1142
1143 2014-10-24  Marcos Chavarría Teijeiro  <chavarria1991@gmail.com>
1144
1145         [GTK] Implement is_selected method on WebKitHitTestResult
1146         https://bugs.webkit.org/show_bug.cgi?id=137110
1147
1148         Reviewed by Tim Horton.
1149
1150         Expose CONTEXT_SELECTION for WebKitHitTestResult.
1151
1152         * Shared/WebHitTestResult.cpp: Add is_selected field and getter for this field.
1153         (WebKit::WebHitTestResult::Data::Data):
1154         (WebKit::WebHitTestResult::Data::encode):
1155         (WebKit::WebHitTestResult::Data::decode):
1156         * Shared/WebHitTestResult.h:
1157         (WebKit::WebHitTestResult::isSelected):
1158         * UIProcess/API/gtk/WebKitHitTestResult.cpp: Add WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION context and method to check it.
1159         (webkitHitTestResultCreate):
1160         (webkitHitTestResultCompare):
1161         (webkit_hit_test_result_context_is_selection):
1162         * UIProcess/API/gtk/WebKitHitTestResult.h:
1163         * UIProcess/API/gtk/WebKitWebView.cpp: Modify context-menu callback to set the new context option.
1164         (webkitWebViewPopulateContextMenu):
1165         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add documentation about new function.
1166
1167 2014-10-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1168
1169         [GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
1170         https://bugs.webkit.org/show_bug.cgi?id=138004
1171
1172         Reviewed by Gustavo Noronha Silva.
1173
1174         * UIProcess/BackingStore.h: Rename m_backingStore as m_backend,
1175         since it's a bit confusing that a BackingStore class has a
1176         m_backingStore member and WidgetBackingStore has been renamed as
1177         BackingStoreBackendCairo.
1178         * UIProcess/cairo/BackingStoreCairo.cpp:
1179         (WebKit::BackingStore::createBackend): Helper function to create
1180         the BackingStore backend depending on the platform.
1181         (WebKit::BackingStore::paint): Use m_backend instead of m_backingStore.
1182         (WebKit::BackingStore::incorporateUpdate): Ditto.
1183         (WebKit::BackingStore::scroll): Ditto.
1184         (WebKit::createBackingStoreForGTK): Deleted.
1185
1186 2014-10-23  Benjamin Poulain  <bpoulain@apple.com>
1187
1188         Fix a bad find-and-replace in r175153
1189
1190         Looks like I messed up the commit on landing.
1191
1192         * UIProcess/WebPageProxy.cpp:
1193         (WebKit::WebPageProxy::WebPageProxy):
1194         (WebKit::WebPageProxy::didCommitLoadForFrame):
1195
1196 2014-10-23  Benjamin Poulain  <bpoulain@apple.com>
1197
1198         [iOS WK2] If a page has the exact same VisibleContentRect as the page before, its VisibleContentRectUpdate can be ignored
1199         https://bugs.webkit.org/show_bug.cgi?id=138031
1200         rdar://problem/18739335
1201
1202         Reviewed by Simon Fraser.
1203
1204         Since any VisibleContentRectUpdate is costly for the WebProcess, we avoid sending updates
1205         if none of the important parameters have changed (scale and geometry).
1206
1207         One unintended side effect is that the update of a page can be blocked if the parameters
1208         of the previous page were identical.
1209
1210         What happen is this:
1211         1) Page [A] sends its content rect update as needed. WebPageProxy saves the last update
1212            in m_lastVisibleContentRectUpdate and use that value to avoid useless updates.
1213         2) Page [B] load after page [A] and have the exact VisibleContentRect. When receiving the first
1214            layer tree commit after didCommitLoadForFrame, WKWebView sends its VisibleContentRect
1215            to WebPageProxy to synchronize the state of the WebProcess with what is on screen.
1216         3) Since the two VisibleContentRect update has the same value as the ones of page [A], WebPageProxy
1217            discards the update. The WebProcess has its initialization viewport and is not udpated until
1218            a major parameter changes (scale or position).
1219
1220         In rdar://problem/18739335, the problem is the similar but with a different failure point:
1221         1) Everything above happened already.
1222         2) The layer tree transaction has a scrolling request. This is processed by WKWebView.
1223         3) Since the scrolling position is invalid, the request is ignored and we send the last
1224            VisibleContentRect to the WebProcess with WebPageProxy::resendLastVisibleContentRects().
1225         4) Since the VisibleContentRect was never updated after didCommitLoadForFrame, the one we send
1226            is for the previous page, which the web process correctly ignores.
1227
1228         This patch solves the problem by nuking the cached m_lastVisibleContentRectUpdate before
1229         any valid VisibleContentRectUpdate for a new page.
1230
1231         * UIProcess/WebPageProxy.cpp:
1232         (WebKit::WebPageProxy::WebPageProxy):
1233         (WebKit::WebPageProxy::didCommitLoadForFrame):
1234         * UIProcess/WebPageProxy.h:
1235         * UIProcess/ios/WebPageProxyIOS.mm:
1236         (WebKit::WebPageProxy::didCommitLayerTree):
1237
1238 2014-10-23  Joseph Pecoraro  <pecoraro@apple.com>
1239
1240         Web Inspector: Provide a way to have alternate inspector agents
1241         https://bugs.webkit.org/show_bug.cgi?id=137901
1242
1243         Reviewed by Brian Burg.
1244
1245         * Configurations/FeatureDefines.xcconfig:
1246
1247 2014-10-23  Tim Horton  <timothy_horton@apple.com>
1248
1249         Add some SPI headers for NSExtension and NSSharingService{Picker}
1250         https://bugs.webkit.org/show_bug.cgi?id=138027
1251
1252         Reviewed by Anders Carlsson.
1253
1254         * UIProcess/API/mac/WKView.mm:
1255         * UIProcess/mac/ServicesController.mm:
1256         * UIProcess/mac/WebContextMenuProxyMac.mm:
1257         Replace redefinitions with SPI header #imports.
1258
1259 2014-10-23  Benjamin Poulain  <bpoulain@apple.com>
1260
1261         [iOS WK2] Make sure any dynamic viewport update schedules a layer tree commit
1262         https://bugs.webkit.org/show_bug.cgi?id=138021
1263
1264         Reviewed by Simon Fraser.
1265
1266         * WebProcess/WebPage/ios/WebPageIOS.mm:
1267         (WebKit::WebPage::dynamicViewportSizeUpdate):
1268         Sometimes, the clients can do a dynamic viewport update but only change the minimum
1269         layout size (see rdar://problem/18755250).
1270
1271         When that happens, it is possible to do the full state update without ever scheduling
1272         a layer tree commit. For example, if the new minimum layout height is only a few pixels
1273         smaller than the old value and the layout of the page is equal or larger than the old value,
1274         the layout is done without any side effect to the content (assuming a viewport configuration
1275         based on width).
1276
1277         The contract with the client is that the next layer tree commit after a dynamic viewport update
1278         carries all the valid parameters for the new viewport size. Since the new layout never scheduled
1279         a layer tree commit, the UIProcess is just waiting for one, discarding all input.
1280
1281         This patch solves the issue by explicitely scheduling a layer flush after updating all the layout
1282         and view parameters to their final values. In most cases, this makes no difference since a layer
1283         tree commit was already scheduled. In the rare cases where nothing was scheduled, scheduling
1284         the layer tree commit ensure we unlock the UIProcess.
1285
1286 2014-10-23  Ryosuke Niwa  <rniwa@webkit.org>
1287
1288         WebContent crash in WebKit::WebPage::expandedRangeFromHandle
1289         https://bugs.webkit.org/show_bug.cgi?id=138023
1290
1291         Reviewed by Enrica Casucci.
1292
1293         The crashes are caused by rangeForBlockAtPoint returning a null Range.
1294         Exit early or continue if a range is null in various places.
1295
1296         * WebProcess/WebPage/ios/WebPageIOS.mm:
1297         (WebKit::WebPage::expandedRangeFromHandle): Continue looking for another point if the range returned by
1298         rangeForBlockAtPoint is null.
1299         (WebKit::WebPage::contractedRangeFromHandle): Ditto.
1300         (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle): Removed the FIXME now that Enrica has
1301         verified that this early exit added in r173788 is correct.
1302
1303 2014-10-23  Joseph Pecoraro  <pecoraro@apple.com>
1304
1305         [iOS] iPhone unselecting items in <select multiple> shows incorrect values selected
1306         https://bugs.webkit.org/show_bug.cgi?id=137989
1307
1308         Reviewed by Alexey Proskuryakov.
1309
1310         * UIProcess/ios/forms/WKFormSelectPicker.mm:
1311         (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
1312         The second argument is "allowsMultipleSelection" and should only be set
1313         when we are making a selection in a <select multiple>.
1314
1315 2014-10-23  Tim Horton  <timothy_horton@apple.com>
1316
1317         Assertion failures in ImageKit soft linking
1318         https://bugs.webkit.org/show_bug.cgi?id=138009
1319
1320         Reviewed by Anders Carlsson.
1321
1322         * UIProcess/API/mac/WKView.mm:
1323         Soft-link ImageKit correctly.
1324         ImageKit is inside the Quartz umbrella framework.
1325
1326 2014-10-23  Daniel Bates  <dabates@apple.com>
1327
1328         [iOS] Fix the build after <http://trac.webkit.org/changeset/175079>
1329         (https://bugs.webkit.org/show_bug.cgi?id=137995)
1330
1331         Rubber-stamped by Anders Carlsson.
1332
1333         Remove PageClientImpl::didPerformActionMenuHitTest() for iOS.
1334
1335         * UIProcess/ios/PageClientImplIOS.h:
1336         * UIProcess/ios/PageClientImplIOS.mm:
1337         (WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
1338
1339 2014-10-23  Krzysztof Czech  <k.czech@samsung.com>
1340
1341         [EFL] Fix build problem after r175098
1342         https://bugs.webkit.org/show_bug.cgi?id=138002
1343
1344         Reviewed by Gyuyoung Kim.
1345
1346         Add ECORE_X dependency to avoid linking problems while building unit tests.
1347
1348         * PlatformEfl.cmake:
1349
1350 2014-10-23  Krzysztof Czech  <k.czech@samsung.com>
1351
1352         [EFL] Set proper default value for WebPageAccessibilityObject
1353         https://bugs.webkit.org/show_bug.cgi?id=137951
1354
1355         Reviewed by Csaba Osztrogonác.
1356
1357         Initial value for WebPageAccessibilityObject should be nullptr.
1358
1359         * WebProcess/WebPage/WebPage.cpp:
1360         (WebKit::WebPage::WebPage):
1361
1362 2014-10-23  Krzysztof Czech  <k.czech@samsung.com>
1363
1364         [EFL] Introduce EFL Accessibility in WebKit
1365         https://bugs.webkit.org/show_bug.cgi?id=137819
1366
1367         Reviewed by Gyuyoung Kim.
1368
1369         EFL Accessibility provides an API that is used to notify clients that certain
1370         Accessibility events occur. Utilizing it makes WebKit-EFL coherent with EFL native
1371         accessibility approach.
1372
1373         * PlatformEfl.cmake:
1374         * UIProcess/API/efl/EwkView.cpp:
1375         (EwkView::EwkView):
1376         * UIProcess/API/efl/EwkView.h:
1377         (EwkView::webAccessibility):
1378         * UIProcess/API/efl/WebAccessibility.cpp: Added.
1379         (WebKit::WebAccessibility::WebAccessibility):
1380         (WebKit::WebAccessibility::~WebAccessibility):
1381         (WebKit::WebAccessibility::eventHandler):
1382         (WebKit::WebAccessibility::executeGestureAction):
1383         (WebKit::WebAccessibility::activate):
1384         (WebKit::WebAccessibility::read):
1385         (WebKit::WebAccessibility::readNext):
1386         (WebKit::WebAccessibility::readPrev):
1387         (WebKit::WebAccessibility::up):
1388         (WebKit::WebAccessibility::down):
1389         (WebKit::WebAccessibility::scroll):
1390         (WebKit::WebAccessibility::mouse):
1391         (WebKit::WebAccessibility::enable):
1392         (WebKit::WebAccessibility::disable):
1393         * UIProcess/API/efl/WebAccessibility.h: Added.
1394         (WebKit::WebAccessibility::activateAction):
1395         (WebKit::WebAccessibility::nextAction):
1396         (WebKit::WebAccessibility::prevAction):
1397         (WebKit::WebAccessibility::readAction):
1398         * UIProcess/API/efl/ewk_view.cpp:
1399         (ewk_view_accessibility_action_activate_get):
1400         (ewk_view_accessibility_action_next_get):
1401         (ewk_view_accessibility_action_prev_get):
1402         (ewk_view_accessibility_action_read_by_point_get):
1403         * UIProcess/API/efl/ewk_view.h:
1404         * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Added.
1405         (EWK2Accessibility::xwindow):
1406         (TEST_F):
1407         * UIProcess/WebPageProxy.h:
1408         * UIProcess/efl/WebPageProxyEfl.cpp:
1409         (WebKit::WebPageProxy::accessibilityObjectReadByPoint):
1410         (WebKit::WebPageProxy::accessibilityObjectReadPrevious):
1411         (WebKit::WebPageProxy::accessibilityObjectReadNext):
1412
1413 2014-10-22  Benjamin Poulain  <bpoulain@apple.com>
1414
1415         [iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
1416         https://bugs.webkit.org/show_bug.cgi?id=137988
1417         rdar://problem/17785162
1418
1419         Reviewed by Simon Fraser.
1420
1421         * UIProcess/API/Cocoa/WKWebView.mm:
1422         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1423         The algorithm behind dynamic size update finds the best content area to put in the viewport
1424         after a viewport change. If an initial size or a target size is empty, it is impossible to
1425         compute a reasonable area to keep in the view. We end up handling NaN scales
1426         and/or sizes and CoreAnimation raises an exception when applying that value.
1427
1428         This patch add early exits when that occurs and fallback to the common code.
1429
1430         On Input, things are easy. If any of the initial values is empty, we just execute the updateBlock
1431         without attempting any of the dynamic behaviors.
1432
1433         For the target values, things are trickier. We do not know what the values are going to be before we execute
1434         the block. But once we executed the block, we have already skipped all the setters that call the web process.
1435
1436         To handle that, every value is set manually on WebPageProxy. This is a bit unfortunate because the setters
1437         get yet another entry point.
1438
1439 2014-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1440
1441         EFL and GTK ports have broken since r175075
1442         https://bugs.webkit.org/show_bug.cgi?id=137995
1443
1444         Unreviewed, EFL and GTK ports build fix.
1445
1446         Need to use PLATFORM(MAC) guard for ActionMenuHitTest functions.
1447
1448         * UIProcess/PageClient.h:
1449         * UIProcess/WebPageProxy.cpp:
1450         (WebKit::WebPageProxy::removeNavigationGestureSnapshot):
1451         * UIProcess/WebPageProxy.h:
1452         * UIProcess/WebPageProxy.messages.in:
1453         * WebProcess/WebPage/WebPage.cpp:
1454         * WebProcess/WebPage/WebPage.h:
1455         * WebProcess/WebPage/WebPage.messages.in:
1456
1457 2014-10-22  Tim Horton  <timothy_horton@apple.com>
1458
1459         Add action menu support for images
1460         https://bugs.webkit.org/show_bug.cgi?id=137987
1461         <rdar://problem/18717767>
1462
1463         Reviewed by Anders Carlsson, Sam Weinig, and Beth Dakin.
1464
1465         * Resources/AddImageToPhotos.pdf: Added.
1466         * Resources/CopyImage.pdf: Added.
1467         * Resources/SaveImageToDownloads.pdf: Added.
1468         * Resources/ShareImage.pdf: Added.
1469         Add some temporary artwork.
1470
1471         * Scripts/webkit/messages.py:
1472         (struct_or_class):
1473         ActionMenuHitTestResult is a struct.
1474
1475         * Shared/API/c/WKActionMenuItemTypes.h:
1476         Add new items for image menus.
1477
1478         * Shared/mac/ActionMenuHitTestResult.cpp:
1479         (WebKit::ActionMenuHitTestResult::encode):
1480         (WebKit::ActionMenuHitTestResult::decode):
1481         For now, pass the hit image data across to the UI process as a ShareableBitmap.
1482
1483         * Shared/mac/ActionMenuHitTestResult.h:
1484
1485         * UIProcess/API/mac/WKView.mm:
1486         (-[WKView _createActionMenuItemForTag:]):
1487         Refactor action menu item creation into a single function, so that
1488         callers can share code and be much simpler.
1489
1490         (webKitBundleImageNamed):
1491         Add a helper to acquire an image from the WebKit2 bundle.
1492
1493         (-[WKView _copyImage:]):
1494         (-[WKView _saveImageToDownloads:]):
1495         (temporaryPhotosDirectoryPath):
1496         (pathToPhotoOnDisk):
1497         (-[WKView _addImageToPhotos:]):
1498         Add rudimentary implementations of image actions.
1499
1500         (-[WKView _defaultMenuItemsForImage]):
1501         Support the image menu, plus a submenu acquired from NSSharingServicePicker
1502         for the Share menu.
1503
1504         (-[WKView _defaultMenuItems]):
1505         Call _defaultMenuItemsForImage if needed.
1506
1507         (-[WKView _updateActionMenu]):
1508         Refactor _updateActionMenu out of prepareForMenu:withEvent:.
1509
1510         (-[WKView prepareForMenu:withEvent:]):
1511         Ask the Web process to re-hit-test under the location that the menu
1512         will appear. Mark the menu as pending.
1513
1514         (-[WKView _didPerformActionMenuHitTest:]):
1515         When we get the hit test reply, record the result for future use.
1516
1517         (-[WKView willOpenMenu:withEvent:]):
1518         If we got a hit test reply, rebuild the menu immediately. If not, wait
1519         up to 500ms for the reply to come in. This eventually needs to be
1520         cancellable if the menu is rejected in the interim.
1521
1522         (-[WKView didCloseMenu:withEvent:]):
1523         Clear all state when the menu closes.
1524
1525         * UIProcess/API/mac/WKViewInternal.h:
1526         * UIProcess/PageClient.h:
1527         * UIProcess/WebPageProxy.cpp:
1528         (WebKit::WebPageProxy::performActionMenuHitTestAtLocation):
1529         (WebKit::WebPageProxy::didPerformActionMenuHitTest):
1530         * UIProcess/WebPageProxy.h:
1531         * UIProcess/WebPageProxy.messages.in:
1532         * UIProcess/mac/PageClientImpl.h:
1533         * UIProcess/mac/PageClientImpl.mm:
1534         (WebKit::PageClientImpl::didPerformActionMenuHitTest):
1535         * UIProcess/ios/PageClientImplIOS.h:
1536         * UIProcess/ios/PageClientImplIOS.mm:
1537         * WebProcess/WebPage/WebPage.h:
1538         * WebProcess/WebPage/WebPage.messages.in:
1539         Plumb didPerformActionMenuHitTest back from WebPageProxy to WKView.
1540
1541         * WebProcess/WebPage/WebPage.cpp:
1542         (WebKit::WebPage::performActionMenuHitTestAtLocation):
1543         Hit test at the given location, recording the image data if there is any,
1544         and return the result to the UI process.
1545
1546         * WebKit2.xcodeproj/project.pbxproj:
1547         Add the PDFs.
1548
1549 2014-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1550
1551         Remove WidgetBackingStoreCairo::create() factory function
1552         https://bugs.webkit.org/show_bug.cgi?id=137943
1553
1554         Reviewed by Darin Adler.
1555
1556         WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
1557         Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.
1558
1559         * UIProcess/BackingStore.h:
1560         * UIProcess/cairo/BackingStoreCairo.cpp:
1561         (WebKit::createBackingStoreForGTK):
1562         (WebKit::BackingStore::incorporateUpdate):
1563
1564 2014-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1565
1566         Remove TextCheckerEnchant::create() factory function
1567         https://bugs.webkit.org/show_bug.cgi?id=137944
1568
1569         Reviewed by Darin Adler.
1570
1571         TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.
1572
1573         * UIProcess/API/gtk/WebKitTextChecker.cpp:
1574         (WebKitTextChecker::WebKitTextChecker):
1575         * UIProcess/API/gtk/WebKitTextChecker.h:
1576         * UIProcess/efl/TextCheckerClientEfl.cpp:
1577         (TextCheckerClientEfl::TextCheckerClientEfl):
1578         * UIProcess/efl/TextCheckerClientEfl.h:
1579
1580 2014-10-22  Antti Koivisto  <antti@apple.com>
1581
1582         Revert fix for REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
1583         (https://bugs.webkit.org/show_bug.cgi?id=137493)
1584
1585         Turns out the root cause was a bug in MIME type sniffing, https://bugs.webkit.org/show_bug.cgi?id=137855
1586
1587         Remove the workaround.
1588
1589         * Shared/Downloads/ios/DownloadIOS.mm:
1590         (WebKit::Download::startWithHandle):
1591         * Shared/Downloads/mac/DownloadMac.mm:
1592         (WebKit::Download::startWithHandle):
1593
1594 2014-10-22  Beth Dakin  <bdakin@apple.com>
1595
1596         Remove action menu web preference
1597         https://bugs.webkit.org/show_bug.cgi?id=137975
1598
1599         Reviewed by Tim Horton.
1600
1601         * Shared/WebPreferencesDefinitions.h:
1602         * UIProcess/API/C/WKPreferences.cpp:
1603         (WKPreferencesSetActionMenuSupportEnabled): Deleted.
1604         (WKPreferencesGetActionMenuSupportEnabled): Deleted.
1605         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1606         * UIProcess/API/mac/WKView.mm:
1607         (-[WKView initWithFrame:context:configuration:webView:]):
1608
1609 2014-10-22  Chris Dumez  <cdumez@apple.com>
1610
1611         [Mac][WK2] Fix applicationIsSafari() detection
1612         https://bugs.webkit.org/show_bug.cgi?id=137893
1613
1614         Reviewed by Alexey Proskuryakov.
1615
1616         Provide an implementation for FrameLoaderClient's new
1617         needsQuickLookResourceCachingQuirks(), which accesses the flag stored
1618         on the WebProcess, which is initialized upon WebProcess creation.
1619
1620         QuickLookMac::computeNeedsQuickLookResourceCachingQuirks() is called
1621         on UIProcess side so that it works reliably and the flag is passed as
1622         parameter when constructing the WebProcess.
1623
1624         * Shared/WebProcessCreationParameters.cpp:
1625         (WebKit::WebProcessCreationParameters::encode):
1626         (WebKit::WebProcessCreationParameters::decode):
1627         * Shared/WebProcessCreationParameters.h:
1628         * UIProcess/mac/WebContextMac.mm:
1629         (WebKit::WebContext::platformInitializeWebProcess):
1630         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1631         (WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks):
1632         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1633         * WebProcess/WebProcess.cpp:
1634         (WebKit::WebProcess::WebProcess):
1635         * WebProcess/WebProcess.h:
1636         (WebKit::WebProcess::needsQuickLookResourceCachingQuirks):
1637         * WebProcess/cocoa/WebProcessCocoa.mm:
1638         (WebKit::WebProcess::platformInitializeWebProcess):
1639
1640 2014-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1641
1642         Unreviewed. Fix GTK+ debug build after r175046.
1643
1644         Remove invalid ASSERT.
1645
1646         * UIProcess/gtk/InputMethodFilter.cpp:
1647         (WebKit::InputMethodFilter::setCursorRect):
1648
1649 2014-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1650
1651         [GTK] Move GtkInputMethodFilter from Platform to WebKit2
1652         https://bugs.webkit.org/show_bug.cgi?id=137884
1653
1654         Reviewed by Gustavo Noronha Silva.
1655
1656         Merge WebViewBaseInputMethodFilter and GtkInputMethodFilter into a
1657         single class InputMethodFilter. The code is mostly the same, but
1658         instead of having a setWebView method only to get the WebPageProxy,
1659         it has a setPage method that passes the WebPageProxy. The GtkIMContext
1660         client window is set by the WebView when it's realized/unrealized.
1661
1662         * PlatformGTK.cmake:
1663         * Shared/NativeWebKeyboardEvent.h:
1664         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
1665         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1666         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1667         (webkitWebViewBaseRealize):
1668         (webkitWebViewBaseUnrealize):
1669         (webkit_web_view_base_class_init):
1670         (webkitWebViewBaseCreateWebPage):
1671         (webkitWebViewBaseEnterFullScreen): Deleted.
1672         * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Removed.
1673         * UIProcess/API/gtk/WebViewBaseInputMethodFilter.h: Removed.
1674         * UIProcess/gtk/InputMethodFilter.cpp: Added.
1675         (WebKit::InputMethodFilter::handleCommitCallback):
1676         (WebKit::InputMethodFilter::handlePreeditStartCallback):
1677         (WebKit::InputMethodFilter::handlePreeditChangedCallback):
1678         (WebKit::InputMethodFilter::handlePreeditEndCallback):
1679         (WebKit::InputMethodFilter::InputMethodFilter):
1680         (WebKit::InputMethodFilter::~InputMethodFilter):
1681         (WebKit::InputMethodFilter::setEnabled):
1682         (WebKit::InputMethodFilter::setCursorRect):
1683         (WebKit::InputMethodFilter::handleKeyboardEvent):
1684         (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
1685         (WebKit::InputMethodFilter::filterKeyEvent):
1686         (WebKit::InputMethodFilter::confirmComposition):
1687         (WebKit::InputMethodFilter::updatePreedit):
1688         (WebKit::InputMethodFilter::notifyFocusedIn):
1689         (WebKit::InputMethodFilter::notifyFocusedOut):
1690         (WebKit::InputMethodFilter::notifyMouseButtonPress):
1691         (WebKit::InputMethodFilter::confirmCurrentComposition):
1692         (WebKit::InputMethodFilter::cancelContextComposition):
1693         (WebKit::InputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
1694         (WebKit::InputMethodFilter::handleCommit):
1695         (WebKit::InputMethodFilter::handlePreeditStart):
1696         (WebKit::InputMethodFilter::handlePreeditChanged):
1697         (WebKit::InputMethodFilter::handlePreeditEnd):
1698         (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
1699         (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
1700         (WebKit::InputMethodFilter::logConfirmCompositionForTesting):
1701         (WebKit::InputMethodFilter::logSetPreeditForTesting):
1702         * UIProcess/gtk/InputMethodFilter.h: Added.
1703         (WebKit::InputMethodFilter::context):
1704         (WebKit::InputMethodFilter::setPage):
1705         (WebKit::InputMethodFilter::setTestingMode):
1706         (WebKit::InputMethodFilter::events):
1707
1708 2014-10-21  Tim Horton  <timothy_horton@apple.com>
1709
1710         Quick Look preview bubble has unnecessary controls
1711         https://bugs.webkit.org/show_bug.cgi?id=137940
1712         <rdar://problem/18731860>
1713
1714         Reviewed by Simon Fraser.
1715
1716         * UIProcess/API/mac/WKView.mm:
1717         (-[WKView _quickLookURLFromActionMenu:]):
1718         Temporarily use more SPI to allow us to hide the preview bubble's controls.
1719
1720 2014-10-21  Jeff Miller  <jeffm@apple.com>
1721
1722         Remove const from WKURLRequestRef parameter to WKContextDownloadURLRequest()
1723         https://bugs.webkit.org/show_bug.cgi?id=137928
1724
1725         Reviewed by Darin Adler.
1726
1727         * UIProcess/API/C/WKContext.cpp:
1728         (WKContextDownloadURLRequest):
1729         * UIProcess/API/C/WKContext.h:
1730
1731 2014-10-21  Anders Carlsson  <andersca@apple.com>
1732
1733         WKRemoteObjectCoder should handle floats
1734         https://bugs.webkit.org/show_bug.cgi?id=137926
1735         <rdar://problem/18695126>
1736
1737         Reviewed by Beth Dakin.
1738
1739         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1740         (encodeInvocation):
1741         (-[WKRemoteObjectEncoder encodeFloat:forKey:]):
1742         (decodeInvocationArguments):
1743         (-[WKRemoteObjectDecoder decodeFloatForKey:]):
1744
1745 2014-10-21  Jeff Miller  <jeffm@apple.com>
1746
1747         WKContext needs to provide an API to resume a download
1748         https://bugs.webkit.org/show_bug.cgi?id=137507
1749
1750         Reviewed by Darin Adler.
1751
1752         This patch adds WKContextResumeDownload(), which is only supported on the Mac, and requires the
1753         resume data from WKDownloadGetResumeData().
1754
1755         We have to create a sandbox extension for the partially downloaded file in the UI process so the
1756         network or web process can resume writing to it.
1757
1758         * NetworkProcess/NetworkProcess.cpp:
1759         (WebKit::NetworkProcess::resumeDownload):
1760         Added, calls through to DownloadManager::resumeDownload().
1761
1762         * NetworkProcess/NetworkProcess.h:
1763         Added resumeDownload().
1764
1765         * NetworkProcess/NetworkProcess.messages.in:
1766         Added ResumeDownload message.
1767
1768         * Shared/Downloads/Download.h:
1769         Added resume().
1770
1771         * Shared/Downloads/DownloadManager.cpp:
1772         (WebKit::DownloadManager::resumeDownload):
1773         Added. The URL being downloaded is part of the opaque resumeData, so we can't specify it when the
1774         Download is constructed.
1775
1776         * Shared/Downloads/DownloadManager.h:
1777         Added resumeDownload().
1778
1779         * Shared/Downloads/ios/DownloadIOS.mm:
1780         (WebKit::Download::resume):
1781         Added, not implemented on this platform.
1782
1783         * Shared/Downloads/mac/DownloadMac.mm:
1784         (WebKit::Download::resume):
1785         Added. Consumes the sandbox extension, resumes the download, and sets m_request after the
1786         NSURLDownload has been created. Note that we already have code to revoke the sandbox extension when
1787         the download is finished, canceled, or fails.
1788
1789         * Shared/Downloads/soup/DownloadSoup.cpp:
1790         (WebKit::Download::resume):
1791         Added, not implemented on this platform.
1792
1793         * UIProcess/API/C/WKContext.cpp:
1794         (WKContextResumeDownload):
1795         Added.
1796
1797         * UIProcess/API/C/WKContext.h:
1798         Added WKContextResumeDownload().
1799
1800         * UIProcess/WebContext.cpp:
1801         (WebKit::WebContext::resumeDownload):
1802         Added. Creates a sandbox extension for the existing file and includes it in the message to the
1803         network or web process.
1804
1805         * UIProcess/WebContext.h:
1806         Added resumeDownload().
1807
1808         * WebProcess/WebProcess.cpp:
1809         (WebKit::WebProcess::resumeDownload):
1810         Added, calls through to DownloadManager::resumeDownload().
1811
1812         * WebProcess/WebProcess.h:
1813         Added resumeDownload().
1814
1815         * WebProcess/WebProcess.messages.in:
1816         Added ResumeDownload message.
1817
1818 2014-10-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1819
1820         Change the default TLS errors policy to WEBKIT_TLS_ERRORS_POLICY_FAIL
1821         https://bugs.webkit.org/show_bug.cgi?id=137832
1822
1823         Reviewed by Carlos Garcia Campos.
1824
1825         Too many general-purpose browsers that really need this policy
1826         are not selecting it, so let's do so for them.
1827
1828         * UIProcess/API/gtk/WebKitWebContext.cpp:
1829         (createDefaultWebContext):
1830
1831 2014-10-21  Michael Catanzaro  <mcatanzaro@igalia.com>
1832
1833         [SOUP] Disable SSLv3
1834         https://bugs.webkit.org/show_bug.cgi?id=137859
1835
1836         Reviewed by Carlos Garcia Campos.
1837
1838         Set G_TLS_GNUTLS_PRIORITY if unset.
1839
1840         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
1841         (main):
1842         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
1843         (main):
1844
1845 2014-10-20  Chris Dumez  <cdumez@apple.com>
1846
1847         ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition
1848         https://bugs.webkit.org/show_bug.cgi?id=137797
1849
1850         Reviewed by Darin Adler.
1851
1852         This patch adds a |needsValidation| argument to
1853         ResourceRequest::setCachePartition() setter so that the caller can
1854         indicate that the partition name is valid (because it was already
1855         processed by partitionName() before). Use this new argument in
1856         ArgumentCoder<ResourceRequest>::decode() to spent a bit less time
1857         deserializing resource requests.
1858
1859         * Shared/WebCoreArgumentCoders.cpp:
1860         (IPC::ArgumentCoder<ResourceRequest>::decode):
1861
1862 2014-10-20  Beth Dakin  <bdakin@apple.com>
1863
1864         Action menu items should have tags
1865         https://bugs.webkit.org/show_bug.cgi?id=137898
1866
1867         Reviewed by Anders Carlsson.
1868
1869         * Shared/API/c/WKActionMenuItemTypes.h: Added.
1870         * UIProcess/API/mac/WKView.mm:
1871         (-[WKView _defaultMenuItemsForLink]):
1872         * WebKit2.xcodeproj/project.pbxproj:
1873
1874 2014-10-20  Beth Dakin  <bdakin@apple.com>
1875
1876         Add support for action menus
1877         https://bugs.webkit.org/show_bug.cgi?id=137891
1878         rdar://problem/18451638
1879         rdar://problem/18694470
1880
1881         Reviewed by Anders Carlsson.
1882
1883         Temporary artwork needed for menu item.
1884         * Resources/OpenInNewWindowTemplate.pdf: Added.
1885         * WebKit2.xcodeproj/project.pbxproj:
1886
1887         Add a preference that defaults to false for action menu support.
1888         * Shared/WebPreferencesDefinitions.h:
1889         * UIProcess/API/C/WKPreferences.cpp:
1890         (WKPreferencesSetActionMenuSupportEnabled):
1891         (WKPreferencesGetActionMenuSupportEnabled):
1892         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1893
1894         New SPI. WebKit clients can implement this method to customize the action menu.
1895         * UIProcess/API/Cocoa/WKViewPrivate.h:
1896
1897         Create the action menu if it is supported.
1898         * UIProcess/API/mac/WKView.mm:
1899         (-[WKView initWithFrame:context:configuration:webView:]):
1900
1901         Methods to implement the default menu actions.
1902         (-[WKView _openURLFromActionMenu:]):
1903         (-[WKView _addToReadingListFromActionMenu:]):
1904         (-[WKView _quickLookURLFromActionMenu:]):
1905
1906         Add action menus support for links. Populate the menu at the right time.
1907         (-[WKView _defaultMenuItemsForLink]):
1908         (-[WKView _defaultMenuItems]):
1909         (-[WKView prepareForMenu:withEvent:]):
1910         (-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]):
1911
1912         New member variable caches the HitTestResult on mouse move.
1913         * UIProcess/WebPageProxy.cpp:
1914         (WebKit::WebPageProxy::mouseDidMoveOverElement):
1915         * UIProcess/WebPageProxy.h:
1916         (WebKit::WebPageProxy::activeActionMenuHitTestResult):
1917
1918 2014-10-20  Timothy Hatcher  <timothy@apple.com>
1919
1920         Web Inspector: Delay and white area when Web Inspector crashes
1921         https://bugs.webkit.org/show_bug.cgi?id=137230
1922
1923         Reviewed by Anders Carlsson.
1924
1925         * UIProcess/WebInspectorProxy.cpp:
1926         (WebKit::processDidCrash): Added.
1927         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage): Hook up loader client.
1928
1929 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
1930
1931         Web Inspector: Generate all Inspector domains together in JavaScriptCore
1932         https://bugs.webkit.org/show_bug.cgi?id=137748
1933
1934         Reviewed by Brian Burg.
1935
1936         * PlatformGTK.cmake:
1937
1938 2014-10-19  Antti Koivisto  <antti@apple.com>
1939
1940         Avoid unnecessary NSURLResponse construction for QuickLook on iOS
1941         https://bugs.webkit.org/show_bug.cgi?id=137876
1942
1943         Reviewed by Andy Estes.
1944
1945         * WebProcess/Network/WebResourceLoader.cpp:
1946         (WebKit::WebResourceLoader::didReceiveResponse):
1947
1948             Switch to the modified QuickLookHandle interface that does not need NSURLResponse.
1949
1950 2014-10-16  Andy Estes  <aestes@apple.com>
1951
1952         [iOS] Capture WKActionSheetAssistant's interaction with WKContentView in a @protocol
1953         https://bugs.webkit.org/show_bug.cgi?id=137792
1954
1955         Reviewed by Tim Horton.
1956
1957         WKPDFView would like to use WKActionSheetAssistant to show an action sheet when long-pressing a link, but it
1958         can't so long as WKActionSheetAssistant is tightly coupled to WKContentView. Resolve this by factoring
1959         WKActionSheetAssistant's interaction with WKContentView into a new protocol called
1960         WKActionSheetAssistantDelegate and having WKContentView conform to this protocol.
1961
1962         * UIProcess/API/Cocoa/_WKElementAction.mm:
1963         (+[_WKElementAction elementActionWithTitle:actionHandler:]): Changed instances of WKContentView * to id <WKActionSheetAssistantDelegate>.
1964         (+[_WKElementAction elementActionWithType:customTitle:]): Ditto.
1965         (-[_WKElementAction _runActionWithElementInfo:delegate:]): Ditto.
1966         (copyElement): Deleted.
1967         (saveImage): Deleted.
1968         (-[_WKElementAction _runActionWithElementInfo:view:]): Deleted.
1969         * UIProcess/API/Cocoa/_WKElementActionInternal.h:
1970         * UIProcess/ios/WKActionSheet.h:
1971         * UIProcess/ios/WKActionSheet.mm:
1972         (-[WKActionSheet init]): Renamed from initWithView: since WKActionSheet no longer needs to know about a view.
1973         (-[WKActionSheet _didRotateAndLayout]): Called -[WKActionSheetDelegate updatePositionInformation].
1974         (-[WKActionSheet initWithView:]): Deleted.
1975         * UIProcess/ios/WKActionSheetAssistant.h:
1976         * UIProcess/ios/WKActionSheetAssistant.mm:
1977         (-[WKActionSheetAssistant delegate]): Added a getter for the delegate property.
1978         (-[WKActionSheetAssistant setDelegate:]): Added a setter for the delegate property.
1979         (-[WKActionSheetAssistant initWithView:]): Changed argument type from WKContentView * to UIView *.
1980         (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]): Returned CGRectZero if there is no delegate.
1981         Otherwise, retrieved positionInformation from the delegate.
1982         (-[WKActionSheetAssistant presentationRectInHostViewForSheet]): Ditto.
1983         (-[WKActionSheetAssistant updatePositionInformation]): Called -[WKActionSheetAssistantDelegate updatePositionInformation].
1984         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]): Returned early if there is no delegate.
1985         Otherwise, retrieved positionInformation from the delegate.
1986         (-[WKActionSheetAssistant showImageSheet]): Ditto.
1987         (-[WKActionSheetAssistant showLinkSheet]): Ditto.
1988         (-[WKActionSheetAssistant showDataDetectorsSheet]): Ditto.
1989         (-[WKActionSheetAssistant cleanupSheet]):
1990         * UIProcess/ios/WKContentViewInteraction.h:
1991         * UIProcess/ios/WKContentViewInteraction.mm:
1992         (-[WKContentView setupInteraction]): Installed self as WKActionSheetAssistant's delegate.
1993         (-[WKContentView updatePositionInformation]): Renamed from _updatePositionInformation.
1994         (-[WKContentView performAction:]): Renamed from _performAction:.
1995         (-[WKContentView openElementAtLocation:]): Called _attemptClickAtLocation:.
1996         (-[WKContentView actionsForElement:defaultActions:]): Called API::UIClient::actionsForElement().
1997         (-[WKContentView startInteractionWithElement:]): Called WebPageProxy::startInteractionWithElementAtPosition().
1998         (-[WKContentView stopInteraction]): Called WebPageProxy::stopInteraction().
1999         (-[WKContentView _updatePositionInformation]): Deleted.
2000         (-[WKContentView _performAction:]): Deleted.
2001
2002 2014-10-20  Carlos Garnacho  <carlosg@gnome.org>
2003
2004         [GTK] Improve zooming gesture positioning
2005         https://bugs.webkit.org/show_bug.cgi?id=137822
2006
2007         Reviewed by Carlos Garcia Campos.
2008
2009         * UIProcess/WebPageProxy.h:
2010         * UIProcess/gtk/GestureController.cpp:
2011         (WebKit::GestureController::ZoomGesture::center):
2012         (WebKit::GestureController::ZoomGesture::begin):
2013         (WebKit::GestureController::ZoomGesture::handleZoom):
2014         (WebKit::GestureController::ZoomGesture::scaleChanged): Calculate
2015         the proper view coordinates for the current offset/scale, based
2016         on the initial gesture center point in document coordinates, and
2017         the current center/scale.
2018         * UIProcess/gtk/GestureController.h:
2019         * UIProcess/gtk/WebPageProxyGtk.cpp:
2020         (WebKit::WebPageProxy::getCenterForZoomGesture): Added. Synchronous
2021         call to retrieve the zoom gesture anchor point, in document coordinates.
2022         * WebProcess/WebPage/WebPage.h:
2023         * WebProcess/WebPage/WebPage.messages.in: Added stub.
2024         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2025         (WebKit::WebPage::getCenterForZoomGesture): Added. Getter for the
2026         translated coordinates used as the anchor point of the zoom gesture.
2027
2028 2014-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2029
2030         [GTK] Remove the factory method from DragAndDropHandler
2031         https://bugs.webkit.org/show_bug.cgi?id=137872
2032
2033         Reviewed by Sergio Villar Senin.
2034
2035         Make the constructor public and use std::make_unique instead.
2036
2037         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2038         (webkitWebViewBaseDragAndDropHandler):
2039         * UIProcess/gtk/DragAndDropHandler.cpp:
2040         (WebKit::DragAndDropHandler::create): Deleted.
2041         * UIProcess/gtk/DragAndDropHandler.h:
2042
2043 2014-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2044
2045         [GTK] Add initial gestures support
2046         https://bugs.webkit.org/show_bug.cgi?id=137812
2047
2048         Reviewed by Sergio Villar Senin.
2049
2050         Now that GTK+ has support for gestures, we can use it to handle
2051         touch events and allow to scroll, zoom and tap with the fingers.
2052
2053         * PlatformGTK.cmake: Add new files to compilation.
2054         * UIProcess/API/gtk/PageClientImpl.cpp:
2055         (WebKit::PageClientImpl::doneWithTouchEvent): When the touch event
2056         hasn't been handled by the web process pass it to the
2057         GestureController and only fallback to pointer emulation when the
2058         GestureController doesn't handle the event.
2059         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2060         (webkitWebViewBaseTouchEvent): If the GestureController is
2061         currently processing gestures is because the START touch event was
2062         not handled by the web process, so pass any successive touch
2063         events to the GestureController directly.
2064         (webkitWebViewBaseGestureController): Create the GestureController
2065         on demand and return a reference.
2066         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2067         * UIProcess/gtk/GestureController.cpp: Added.
2068         (WebKit::GestureController::create): Create a GestureController.
2069         (WebKit::GestureController::GestureController): Initialize the
2070         Gesture memebers.
2071         (WebKit::GestureController::handleEvent): Pass the event to the gestures.
2072         (WebKit::GestureController::isProcessingGestures): Whether
2073         Gestures are active.
2074         (WebKit::GestureController::Gesture::Gesture): Base class for gestures.
2075         (WebKit::GestureController::Gesture::isActive): Whether the
2076         gesture is active.
2077         (WebKit::GestureController::Gesture::handleEvent): Pass the event
2078         to the GtkGesture to process it.
2079         (WebKit::GestureController::DragGesture::handleDrag): Send a wheel
2080         event corresponding to the drag gesture to the web process.
2081         (WebKit::GestureController::DragGesture::handleTap): Send move,
2082         press and release events corresponding to a tap gesture to the web process.
2083         (WebKit::GestureController::DragGesture::begin): Start a drag
2084         gesture and schedule a timer to discard tap gesture in case of
2085         long press.
2086         (WebKit::GestureController::DragGesture::update): If the actual
2087         drag hasn't started yet, check the drag threshold to decide
2088         whether to start the drag or not. Otherwise call handleDrag() to
2089         send the appropriate events to the web process.
2090         (WebKit::GestureController::DragGesture::end): If the drag gesture
2091         finishes and the drag didn't happen (it wasn't a long press and
2092         drag threshold was not reached), call handleTap() to emulate a
2093         click event.
2094         (WebKit::GestureController::DragGesture::DragGesture): Initialize
2095         the GtkGestureDrag.
2096         (WebKit::GestureController::ZoomGesture::begin): Save the current
2097         page scale factor and the center point of the gesture.
2098         (WebKit::GestureController::ZoomGesture::scaleChanged): Schedule a
2099         page scale change in an idle for the given scale value.
2100         (WebKit::GestureController::ZoomGesture::ZoomGesture): Initialize
2101         the GtkGestureZoom.
2102         * UIProcess/gtk/GestureController.h: Added.
2103
2104 2014-10-19  Chris Dumez  <cdumez@apple.com>
2105
2106         Use is<>() / downcast<>() for all remaining RenderObject subclasses
2107         https://bugs.webkit.org/show_bug.cgi?id=137845
2108
2109         Reviewed by Darin Adler.
2110
2111         Use is<>() / downcast<>() for all remaining RenderObject subclasses and 
2112         clean up the surrounding code.
2113
2114         * WebProcess/Plugins/PluginView.cpp:
2115         (WebKit::PluginView::pluginProcessCrashed):
2116         * WebProcess/WebPage/WebPage.cpp:
2117         (WebKit::WebPage::createPlugin):
2118
2119 2014-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2120
2121         [GTK] Move GtkDragAndDropHelper from Platform to WebKit2
2122         https://bugs.webkit.org/show_bug.cgi?id=137422
2123
2124         Reviewed by Martin Robinson.
2125
2126         WebKitWebViewBase is currently the only user of
2127         GtkDragAndDropHelper, that was added to share the code with
2128         WebKit1. Move all the drag and drop logic to a new class
2129         DragAndDropHandler.
2130
2131         * PlatformGTK.cmake: Add new files to compilation.
2132         * UIProcess/API/gtk/PageClientImpl.cpp:
2133         (WebKit::PageClientImpl::startDrag):
2134         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2135         (webkitWebViewBaseConstructed):
2136         (webkitWebViewBaseDragDataGet):
2137         (webkitWebViewBaseDragEnd):
2138         (webkitWebViewBaseDragDataReceived):
2139         (webkitWebViewBaseDragMotion):
2140         (webkitWebViewBaseDragLeave):
2141         (webkitWebViewBaseDragDrop):
2142         (webkitWebViewBaseDragAndDropHandler):
2143         (dragExitedCallback): Deleted.
2144         (webkitWebViewBaseStartDrag): Deleted.
2145         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2146         * UIProcess/gtk/DragAndDropHandler.cpp: Added.
2147         (WebKit::DragAndDropHandler::create):
2148         (WebKit::DragAndDropHandler::DragAndDropHandler):
2149         (WebKit::DragAndDropHandler::DroppingContext::DroppingContext):
2150         (WebKit::dragOperationToGdkDragActions):
2151         (WebKit::dragOperationToSingleGdkDragAction):
2152         (WebKit::gdkDragActionToDragOperation):
2153         (WebKit::DragAndDropHandler::startDrag):
2154         (WebKit::DragAndDropHandler::fillDragData):
2155         (WebKit::DragAndDropHandler::finishDrag):
2156         (WebKit::DragAndDropHandler::dataObjectForDropData):
2157         (WebKit::DragAndDropHandler::dragEntered):
2158         (WebKit::DragAndDropHandler::requestDragData):
2159         (WebKit::DragAndDropHandler::dragMotion):
2160         (WebKit::DragAndDropHandler::dragLeave):
2161         (WebKit::DragAndDropHandler::drop):
2162         * UIProcess/gtk/DragAndDropHandler.h: Added.
2163
2164 2014-10-18  Dan Bernstein  <mitz@apple.com>
2165
2166         WorkQueue dispatches functions but isn’t a FunctionDispatcher
2167         https://bugs.webkit.org/show_bug.cgi?id=137853
2168
2169         Reviewed by Anders Carlsson.
2170
2171         * Platform/WorkQueue.h: Changed to inherit from FunctionDispatcher.
2172
2173 2014-10-18  Michael Catanzaro  <mcatanzaro@igalia.com>
2174
2175         [GTK] Improve documentation of webkit_web_view_get_tls_info()
2176         https://bugs.webkit.org/show_bug.cgi?id=137852
2177
2178         Reviewed by Martin Robinson.
2179
2180         * UIProcess/API/gtk/WebKitWebView.cpp:
2181
2182 2014-10-17  Chris Dumez  <cdumez@apple.com>
2183
2184         Use is<>() / downcast<>() for RenderBox
2185         https://bugs.webkit.org/show_bug.cgi?id=137804
2186
2187         Reviewed by Andreas Kling.
2188
2189         Use is<>() / downcast<>() for RenderBox and clean up the surrounding
2190         code.
2191
2192         * WebProcess/WebPage/WebPage.cpp:
2193         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2194         (WebKit::WebPage::plugInIsPrimarySize):
2195         * WebProcess/WebPage/ios/WebPageIOS.mm:
2196         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
2197
2198 2014-10-16  Simon Fraser  <simon.fraser@apple.com>
2199
2200         [iOS] Turn off font autosizing for iOS WebKitTestRunner
2201         https://bugs.webkit.org/show_bug.cgi?id=137806
2202
2203         Reviewed by Sam Weinig.
2204         
2205         Confusingly, WKPreferencesSetTextAutosizingEnabled() does nothing on iOS.
2206         Instead, we have to add WKPreferencesSetMinimumZoomFontSize() and set it to 0
2207         to disable font autosizing.
2208
2209         * UIProcess/API/C/WKPreferences.cpp:
2210         (WKPreferencesSetMinimumZoomFontSize):
2211         (WKPreferencesGetMinimumZoomFontSize):
2212         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2213
2214 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2215
2216         [EFL] REGRESSION(r173929): It broke the Web Inspector
2217         https://bugs.webkit.org/show_bug.cgi?id=137522
2218
2219         Reviewed by Csaba Osztrogonác.
2220
2221         r173929 let web inspector use a separate web process. Besides it changed that the inspector is shown
2222         as docking mode by default. However EFL port doesn't support to show web inspector as docking window yet.
2223         This patch is to show web inspector on EFL new window as before. Docking mode should be implemented by
2224         upcoming patch.
2225
2226         * UIProcess/efl/WebInspectorProxyEfl.cpp:
2227         (WebKit::WebInspectorProxy::platformAttach):
2228
2229 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2230
2231         [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
2232         https://bugs.webkit.org/show_bug.cgi?id=137782
2233
2234         Reviewed by Sergio Villar Senin.
2235
2236         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2237         (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Use microseconds
2238         instead of milliseconds.
2239
2240 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2241
2242         [GTK] Move touch events handling from Platform to WebKit2
2243         https://bugs.webkit.org/show_bug.cgi?id=137735
2244
2245         Reviewed by Sergio Villar Senin.
2246
2247         GtkTouchContextHelper was only used by WebKitWebViewBase, since
2248         it's the only one that can create touch events. The code has been
2249         simplified by processing the events in the view, and the native
2250         touch events are now created with the native event and touch points.
2251
2252         * Shared/NativeWebTouchEvent.h:
2253         (WebKit::NativeWebTouchEvent::touchContext): Deleted.
2254         * Shared/gtk/NativeWebTouchEventGtk.cpp:
2255         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): Pass touch
2256         points instead of touch context to WebEventFactory::createWebTouchEvent().
2257         * Shared/gtk/WebEventFactory.cpp:
2258         (WebKit::WebEventFactory::createWebTouchEvent): Create the
2259         WebTouchEvent for the given native event and points.
2260         (WebKit::touchPhaseFromEvents): Deleted.
2261         (WebKit::appendTouchEvent): Deleted.
2262         * Shared/gtk/WebEventFactory.h:
2263         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2264         (appendTouchEvent): Helper function to create a
2265         WebPlatformTouchPoint for the given native event and add it to the
2266         list of touch points.
2267         (webkitWebViewBaseGetTouchPointForEvent): Build the touch point
2268         list for the event.
2269         (webkitWebViewBaseTouchEvent): Process the touch event.
2270         (webkitWebViewBaseDragDataReceived): Deleted.
2271
2272 2014-10-16  Pascal Jacquemart  <p.jacquemart@samsung.com>
2273
2274         Removing CUSTOM_PROTOCOLS guard
2275         https://bugs.webkit.org/show_bug.cgi?id=137741
2276
2277         Reviewed by Benjamin Poulain.
2278
2279         * NetworkProcess/NetworkProcess.cpp:
2280         (WebKit::NetworkProcess::NetworkProcess):
2281         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
2282         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
2283         * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in:
2284         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
2285         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
2286         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
2287         * Shared/Network/NetworkProcessCreationParameters.cpp:
2288         (WebKit::NetworkProcessCreationParameters::encode):
2289         (WebKit::NetworkProcessCreationParameters::decode):
2290         * Shared/Network/NetworkProcessCreationParameters.h:
2291         * Shared/WebProcessCreationParameters.cpp:
2292         (WebKit::WebProcessCreationParameters::encode):
2293         (WebKit::WebProcessCreationParameters::decode):
2294         * Shared/WebProcessCreationParameters.h:
2295         * UIProcess/API/C/soup/WKAPICastSoup.h:
2296         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp:
2297         (WKSoupCustomProtocolRequestManagerGetTypeID):
2298         (WKSoupCustomProtocolRequestManagerSetClient):
2299         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
2300         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in:
2301         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
2302         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
2303         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
2304         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h:
2305         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
2306         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h:
2307         * UIProcess/Network/NetworkProcessProxy.cpp:
2308         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
2309         * UIProcess/Network/NetworkProcessProxy.h:
2310         * UIProcess/WebContext.cpp:
2311         (WebKit::WebContext::WebContext):
2312         (WebKit::WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers):
2313         (WebKit::WebContext::unregisterSchemeForCustomProtocol):
2314         * UIProcess/WebContext.h:
2315         * UIProcess/WebProcessProxy.cpp:
2316         (WebKit::WebProcessProxy::WebProcessProxy):
2317         * UIProcess/WebProcessProxy.h:
2318         * UIProcess/mac/WebContextMac.mm:
2319         (WebKit::WebContext::platformInitializeWebProcess):
2320         (WebKit::WebContext::platformInitializeNetworkProcess):
2321         * WebKit2Prefix.h:
2322         * WebProcess/WebProcess.cpp:
2323         (WebKit::WebProcess::WebProcess):
2324         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
2325         (webkitSoupRequestGenericSendAsync):
2326         (webkitSoupRequestGenericSendFinish):
2327         * WebProcess/soup/WebKitSoupRequestGeneric.h:
2328
2329 2014-10-16  Simon Fraser  <simon.fraser@apple.com>
2330
2331         Crash under RemoteLayerTreeHost::getLayer() when closing a tab
2332         https://bugs.webkit.org/show_bug.cgi?id=137796
2333         rdar://problem/18547565
2334
2335         Reviewed by Tim Horton.
2336         
2337         CA can call our animation delegate after the RemoteLayerTreeHost has been
2338         destroyed. CAAnimation retains its delegate, so it's safe for us to null out
2339         the WKAnimationDelegate's pointer to the RemoteLayerTreeHost when tearing down
2340         the RemoteLayerTreeHost.
2341
2342         * UIProcess/mac/RemoteLayerTreeHost.mm:
2343         (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
2344         (WebKit::RemoteLayerTreeHost::animationDidEnd):
2345         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2346         (-[WKAnimationDelegate invalidate]):
2347         (-[WKAnimationDelegate animationDidStart:]):
2348         (-[WKAnimationDelegate animationDidStop:finished:]):
2349
2350 2014-10-16  Tim Horton  <timothy_horton@apple.com>
2351
2352         Implement selection services menu for Legacy WebKit
2353         https://bugs.webkit.org/show_bug.cgi?id=137582
2354         <rdar://problem/18604241>
2355
2356         Reviewed by Brady Eidson.
2357
2358         * UIProcess/mac/WebContextMenuProxyMac.mm:
2359         (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
2360         Add a note that we should transition to using replaceSelectionWithAttributedString.
2361
2362         * WebProcess/WebPage/mac/WebPageMac.mm:
2363         (WebKit::WebPage::handleSelectionServiceClick):
2364         Allow editor services in editable-but-not-rich-text areas, just like in WebKit1.
2365
2366 2014-10-16  Tim Horton  <timothy_horton@apple.com>
2367
2368         Various crashes in ViewGestureControllerIOS when closing a tab while a swipe gesture is in progress
2369         https://bugs.webkit.org/show_bug.cgi?id=137770
2370         <rdar://problem/17916459>
2371
2372         Reviewed by Dan Bernstein.
2373
2374         When tearing down a WKWebView in the middle of a swipe gesture, a variety of
2375         UI process crashes were observed. First, two uses of potentially deleted objects
2376         (the WebBackForwardListItem and ViewGestureController), which were fixed by
2377         extending the object's lifetime and checking for its liveness, respectively.
2378         Second, a potential null-deref of DrawingArea if the timing of endSwipeGesture
2379         vs. page teardown was such that DrawingArea was null but everything else was in line.
2380         Lastly, another case of messaging a potentially deleted object (specifically,
2381         the _UIViewControllerTransitionContext's animator) in a callback from CA, which
2382         was fixed by nulling out the animator (and a few other properties) when tearing
2383         down the ViewGestureController.
2384
2385         * UIProcess/ios/ViewGestureControllerIOS.mm:
2386         (-[WKSwipeTransitionController invalidate]):
2387         Clear the soon-to-be-invalid ViewGestureController pointer.
2388
2389         (WebKit::ViewGestureController::~ViewGestureController):
2390         Call [WKSwipeTransitionController invalidate] upon destruction.
2391         Clear our transition context's interactor and animator, and inform it that
2392         the transition is not in flight. This avoids a crash when calling back
2393         to the already-destroyed animator later.
2394
2395         (WebKit::ViewGestureController::beginSwipeGesture):
2396         Keep a reference to the target WebBackForwardListItem; this avoids
2397         it being deleted between here and the transition completion block firing.
2398
2399         Look up the ViewGestureController by pageID, just like we do in endSwipeGesture,
2400         to avoid situations where the callback fires after the WKWebView/ViewGestureController
2401         have gone away.
2402
2403         Hold on to our _UIViewControllerOneToOneTransitionContext, so that we can do the
2404         aforementioned clearing upon deallocation.
2405
2406         (WebKit::ViewGestureController::endSwipeGesture):
2407         Null check the DrawingArea. If it is null, instead of doing our normal delayed logic
2408         for swipe snapshot teardown, just put things back together immediately.
2409
2410         (WebKit::ViewGestureController::removeSwipeSnapshot):
2411         Clear m_swipeTransitionContext.
2412
2413 2014-10-16  Antti Koivisto  <antti@apple.com>
2414
2415         REGRESSION (r173356): Downloading a disk image appends ".txt" to it
2416         https://bugs.webkit.org/show_bug.cgi?id=137493
2417         <rdar://problem/18321947>
2418
2419         Reviewed by Alexey Proskuryakov.
2420
2421         * Shared/Downloads/ios/DownloadIOS.mm:
2422         (WebKit::Download::startWithHandle):
2423         * Shared/Downloads/mac/DownloadMac.mm:
2424         (WebKit::Download::startWithHandle):
2425
2426             It appears that the synthesized NS/CFURLResponse fails to serialize the suggested filename correctly
2427             unless it has been accessed first.
2428
2429 2014-10-15  Dan Bernstein  <mitz@apple.com>
2430
2431         [Cocoa] "Plug-in will handle load" error isn't declared in the modern API
2432         https://bugs.webkit.org/show_bug.cgi?id=137747
2433
2434         Reviewed by Anders Carlsson.
2435
2436         * UIProcess/API/Cocoa/WKError.mm: Define _WKLegacyErrorDomain.
2437         * UIProcess/API/Cocoa/WKErrorInternal.h: Changed to import WKErrorPrivate.h.
2438         * UIProcess/API/Cocoa/WKErrorPrivate.h: Added. Declares _WKLegacyErrorDomain
2439         and _WKLegacyErrorPlugInWillHandleLoad.
2440         * WebKit2.xcodeproj/project.pbxproj: Added new private header.
2441
2442 2014-10-15  Chris Dumez  <cdumez@apple.com>
2443
2444         Use is<>() / downcast<>() for TransformOperation subclasses
2445         https://bugs.webkit.org/show_bug.cgi?id=137731
2446
2447         Reviewed by Darin Adler.
2448
2449         Use is<>() / downcast<>() for TransformOperation subclasses and clean
2450         up the surrounding code.
2451
2452         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2453         (IPC::ArgumentCoder<TransformOperations>::encode):
2454
2455 2014-10-15  Alexey Proskuryakov  <ap@apple.com>
2456
2457         [Mac] Allow some Kerberos related paths in sandbox
2458         https://bugs.webkit.org/show_bug.cgi?id=137666
2459         rdar://problem/17965010
2460
2461         Reviewed by Darin Adler.
2462
2463         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2464         * WebProcess/com.apple.WebProcess.sb.in:
2465
2466 2014-10-15  Alexey Proskuryakov  <ap@apple.com>
2467
2468         [Mac] Allow plug-ins to read managed preferences
2469         https://bugs.webkit.org/show_bug.cgi?id=137665
2470         <rdar://problem/18255601>
2471
2472         Reviewed by Darin Adler.
2473
2474         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2475
2476 2014-10-14  Joonghun Park  <jh718.park@samsung.com>
2477
2478         [WK2][EFL] Fix the problem that threads created by a DispatchQueueEfl are not destroyed
2479         even after the DispatchQueueEfl has been destructed
2480         https://bugs.webkit.org/show_bug.cgi?id=137195
2481
2482         Reviewed by Gyuyoung Kim.
2483
2484         Linux and Unix System's pthreads are created in joinable state by default.
2485         If threads aren't destructed explicitly, it will be still live
2486         until process which created the thread is dead.
2487         Besides it may cause out of capacity range of thread creation in a process.
2488         It is one of hidden defects.
2489         This patch calls detachThread() to detach thread immediately after it is created.
2490         So the thread can be destroyed as soon as the thread's ThreadContext::function()
2491         returns.
2492
2493         * Platform/efl/DispatchQueueEfl.cpp:
2494         (DispatchQueue::ThreadContext::start):
2495
2496 2014-10-14  Chris Dumez  <cdumez@apple.com>
2497
2498         Use is<>() / downcast<>() for PlatformCAAnimation subclasses
2499         https://bugs.webkit.org/show_bug.cgi?id=137722
2500
2501         Reviewed by Simon Fraser.
2502
2503         Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
2504         up the surrounding code.
2505
2506         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2507         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2508         (WebKit::PlatformCAAnimationRemote::copy):
2509         (WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
2510         (WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
2511         (WebKit::PlatformCAAnimationRemote::copyToValueFrom):
2512         (WebKit::PlatformCAAnimationRemote::copyValuesFrom):
2513         (WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
2514         (WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
2515         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2516         (WebKit::PlatformCALayerRemote::addAnimationForKey):
2517         (WebKit::PlatformCALayerRemote::animationStarted):
2518         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2519         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2520         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
2521
2522 2014-10-14  Alexey Proskuryakov  <ap@apple.com>
2523
2524         REGRESSION (r165356): Issues with Japanese text input
2525         https://bugs.webkit.org/show_bug.cgi?id=137719
2526         rdar://problem/18431952
2527         rdar://problem/18483741
2528
2529         Reviewed by Darin Adler.
2530
2531         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection):
2532         In sync code path, ensure consistent message delivery order by adding
2533         a DispatchMessageEvenWhenWaitingForSyncReply flag. This way, delayed
2534         EditorStateChanged messages won't confuse UI process.
2535
2536 2014-10-14  Anders Carlsson  <andersca@apple.com>
2537
2538         Hide the find indicator when starting a swipe
2539         https://bugs.webkit.org/show_bug.cgi?id=137711
2540
2541         Reviewed by Tim Horton.
2542
2543         * UIProcess/mac/PageClientImpl.mm:
2544         (WebKit::PageClientImpl::navigationGestureDidBegin):
2545
2546 2014-10-14  Chris Dumez  <cdumez@apple.com>
2547
2548         Use is<>() / downcast<>() for RenderImage
2549         https://bugs.webkit.org/show_bug.cgi?id=137683
2550
2551         Reviewed by Mihnea Ovidenie.
2552
2553         Use is<>() / downcast<>() for RenderImage.
2554
2555         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2556         (WebKit::cachedImage):
2557         * WebProcess/WebPage/ios/WebPageIOS.mm:
2558         (WebKit::WebPage::performActionOnElement):
2559
2560 2014-10-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2561
2562         [GTK][CMake] Non-ninja build is broken since r174422
2563         https://bugs.webkit.org/show_bug.cgi?id=137656
2564
2565         Reviewed by Philippe Normand.
2566
2567         Make WebKit2-forwarding-headers depend only on static,
2568         non-generated sources.
2569
2570         * CMakeLists.txt:
2571         * PlatformGTK.cmake:
2572
2573 2014-10-13  Chris Dumez  <cdumez@apple.com>
2574
2575         Use is<>() / downcast<>() for PlatformCALayer subclasses
2576         https://bugs.webkit.org/show_bug.cgi?id=137661
2577
2578         Reviewed by Simon Fraser.
2579
2580         Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up 
2581         the surrounding code.
2582
2583         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2584         (WebKit::PlatformCALayerRemote::~PlatformCALayerRemote):
2585         (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
2586         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
2587         (WebKit::PlatformCALayerRemote::setSublayers):
2588         (WebKit::PlatformCALayerRemote::appendSublayer):
2589         (WebKit::PlatformCALayerRemote::insertSublayer):
2590         (WebKit::PlatformCALayerRemote::replaceSublayer):
2591         (WebKit::PlatformCALayerRemote::adoptSublayers):
2592         (WebKit::PlatformCALayerRemote::setMask):
2593         (WebKit::PlatformCALayerRemote::copyFiltersFrom):
2594         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2595         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
2596         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2597         (WebKit::RemoteLayerTreeContext::buildTransaction):
2598
2599 2014-10-13  Chris Dumez  <cdumez@apple.com>
2600
2601         Use is<>() / downcast<>() for Filter / FilterOperation subclasses
2602         https://bugs.webkit.org/show_bug.cgi?id=137644
2603
2604         Reviewed by Darin Adler.
2605
2606         Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
2607
2608         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2609         (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
2610         * Shared/WebCoreArgumentCoders.cpp:
2611         (IPC::ArgumentCoder<FilterOperation>::encode):
2612         * Shared/mac/RemoteLayerTreeTransaction.mm:
2613         (WebKit::RemoteLayerTreeTextStream::operator<<):
2614
2615 2014-10-12  Sergio Villar Senin  <svillar@igalia.com>
2616
2617         [SOUP] [WK2] WebProcess and NetworkProcess initialization clears cache contents
2618         https://bugs.webkit.org/show_bug.cgi?id=137489
2619
2620         Reviewed by Carlos Garcia Campos.
2621
2622         Temporarily set the SoupCache's maximum size to a huge value
2623         before calling soup_cache_load() so that the cache is not shrinked
2624         to the default value.
2625
2626         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2627         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2628         * WebProcess/soup/WebProcessSoup.cpp:
2629         (WebKit::WebProcess::platformInitializeWebProcess):
2630
2631 2014-10-12  Ryuan Choi  <ryuan.choi@gmail.com>
2632
2633         [EFL] Introduce EWebKit_Extension
2634         https://bugs.webkit.org/show_bug.cgi?id=134921
2635
2636         Reviewed by Gyuyoung Kim.
2637
2638         EWebKit2 does not provide the functionality to extend WebProcess.
2639         Although there is ewk_context_new_with_injected_bundle_path() in ewebkit2 APIs,
2640         application developers can not make bundle object without touching WK APIs
2641         which ewebkit2 does not expose.
2642
2643         This patch introduces EWebKit_Extension, basic structure for the extension of WebProcess.
2644
2645         * PlatformEfl.cmake:
2646         Added files for the EWebKit_Extension and install them properly.
2647         * UIProcess/API/efl/ewk_context.cpp:
2648         (EwkContext::EwkContext):
2649         (bundlePathForExtension):
2650         (EwkContext::create):
2651         (EwkContext::getInjectedBundleInitializationUserData):
2652         (EwkContext::setMessageFromInjectedBundleCallback):
2653         (ewk_context_new_with_extensions_path):
2654         Deleted because ewebkit2 does not have a way to make injected bundle.
2655         Instead, Ewk_Extension will cover the same functionalities.
2656         (ewk_context_new_with_injected_bundle_path): Deleted.
2657         * UIProcess/API/efl/ewk_context.h:
2658         * UIProcess/API/efl/ewk_context_private.h:
2659         (EwkContext::extensionsPath):
2660         * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: Removed.
2661         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
2662         (EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample):
2663         (EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample): Renamed injectedBundleSample to extensionSample.
2664         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
2665         * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Copied from Source/WebKit2/UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp.
2666         * UIProcess/API/efl/tests/test_ewk2_context.cpp: Renamed ewk_context_new_with_injected_bundle_path to ewk_context_new_with_extensions_path.
2667         (TEST_F):
2668         * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Added.
2669         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Added.
2670         (EwkExtension::append):
2671         (EwkExtension::remove):
2672         (ewk_extension_client_add):
2673         (ewk_extension_client_del):
2674         * WebProcess/InjectedBundle/API/efl/ewk_extension.h: Added.
2675         * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Added.
2676         (EwkExtension::EwkExtension):
2677         (EwkExtension::~EwkExtension):
2678         * WebProcess/efl/ExtensionManagerEfl.cpp: Added.
2679         (WebKit::ExtensionManagerEfl::shared):
2680         (WebKit::ExtensionManagerEfl::ExtensionManagerEfl):
2681         (WebKit::ExtensionManagerEfl::initialize):
2682         * WebProcess/efl/ExtensionManagerEfl.h: Added.
2683         * WebProcess/efl/WebInjectedBundleMainEfl.cpp: Added.
2684         (WKBundleInitialize):
2685         * efl/ewebkit2-extension.pc.in: Added.
2686
2687 2014-10-10  Chris Dumez  <cdumez@apple.com>
2688
2689         Use is<>() / downcast<>() for Image subclasses
2690         https://bugs.webkit.org/show_bug.cgi?id=137625
2691
2692         Reviewed by Andreas Kling.
2693
2694         Use is<>() / downcast<>() for Image subclasses.
2695
2696         * WebProcess/Plugins/PluginView.cpp:
2697         (WebKit::PluginView::pluginSnapshotTimerFired):
2698
2699 2014-10-10  Chris Dumez  <cdumez@apple.com>
2700
2701         Use is<>() / downcast<>() for GraphicsLayer subclasses
2702         https://bugs.webkit.org/show_bug.cgi?id=137595
2703
2704         Reviewed by Darin Adler.
2705
2706         Use is<>() / downcast<>() for GraphicsLayer subclasses and clean up the
2707         surrounding code.
2708
2709         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2710         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2711         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2712         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2713         (WebKit::TiledCoreAnimationDrawingArea::layerForTransientZoom):
2714         (WebKit::TiledCoreAnimationDrawingArea::shadowLayerForTransientZoom):
2715
2716 2014-10-10  Pascal Jacquemart  <p.jacquemart@samsung.com>
2717
2718         Fix debug build on EFL after r174584
2719         https://bugs.webkit.org/show_bug.cgi?id=137613
2720
2721         Reviewed by Christophe Dumez.
2722
2723         * UIProcess/efl/RequestManagerClientEfl.cpp:
2724         (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
2725
2726 2014-10-10  Chris Dumez  <cdumez@apple.com>
2727
2728         Use is<>() / downcast<>() for RenderBoxModelObject
2729         https://bugs.webkit.org/show_bug.cgi?id=137587
2730
2731         Reviewed by Mihnea Ovidenie.
2732
2733         Use is<>() / downcast<>() for RenderBoxModelObject and clean up the
2734         surrounding code.
2735
2736         * WebProcess/Plugins/PluginView.cpp:
2737         (WebKit::PluginView::renderer):
2738         (WebKit::PluginView::invalidateRect):
2739
2740 2014-10-10  Pascal Jacquemart  <p.jacquemart@samsung.com>
2741
2742         [SOUP] Remove custom URI schemes implementation
2743         https://bugs.webkit.org/show_bug.cgi?id=128169
2744
2745         Reviewed by Carlos Garcia Campos.
2746
2747         * Shared/WebProcessCreationParameters.cpp:
2748         (WebKit::WebProcessCreationParameters::encode):
2749         (WebKit::WebProcessCreationParameters::decode):
2750         * Shared/WebProcessCreationParameters.h:
2751         * UIProcess/API/C/soup/WKAPICastSoup.h:
2752         * UIProcess/API/C/soup/WKContextSoup.cpp: Removed.
2753         * UIProcess/API/C/soup/WKSoupRequestManager.cpp: Removed.
2754         * UIProcess/WebContext.cpp:
2755         (WebKit::WebContext::WebContext):
2756         * UIProcess/WebPageProxy.cpp:
2757         (WebKit::WebPageProxy::didReceiveURIRequest): Deleted.
2758         * UIProcess/WebPageProxy.h:
2759         * UIProcess/WebPageProxy.messages.in:
2760         * UIProcess/soup/WebSoupRequestManagerClient.cpp: Removed.
2761         * UIProcess/soup/WebSoupRequestManagerProxy.cpp: Removed.
2762         * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Removed.
2763         * WebProcess/WebProcess.cpp:
2764         (WebKit::WebProcess::WebProcess):
2765         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
2766         (webkitSoupRequestGenericSendAsync):
2767         (webkitSoupRequestGenericSendFinish):
2768         * WebProcess/soup/WebProcessSoup.cpp:
2769         (WebKit::WebProcess::platformInitializeWebProcess):
2770         * WebProcess/soup/WebSoupRequestManager.cpp: Removed.
2771         * WebProcess/soup/WebSoupRequestManager.messages.in: Removed.
2772
2773 2014-10-09  Dean Jackson  <dino@apple.com>
2774
2775         Remove ENABLE_CSS3_CONDITIONAL_RULES
2776         https://bugs.webkit.org/show_bug.cgi?id=137571
2777
2778         Reviewed by Simon Fraser.
2779
2780         * Configurations/FeatureDefines.xcconfig:
2781
2782 2014-10-09  Tim Horton  <timothy_horton@apple.com>
2783
2784         Move ServicesOverlayController to WebCore
2785         https://bugs.webkit.org/show_bug.cgi?id=137416
2786         <rdar://problem/18546283>
2787
2788         Reviewed by Anders Carlsson.
2789
2790         * Platform/Logging.h:
2791         Move Services logging channel to WebCore.
2792
2793         * WebKit2.xcodeproj/project.pbxproj:
2794         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2795         (WebKit::WebChromeClient::handleTelephoneNumberClick):
2796         (WebKit::WebChromeClient::handleSelectionServiceClick):
2797         (WebKit::WebChromeClient::hasRelevantSelectionServices):
2798         Implement services-related ChromeClient callbacks.
2799         Clicks are forwarded to WebPageMac where they do what they used to;
2800         hasRelevantSelectionServices is implemented as it was when it lived
2801         inside ServicesOverlayController.
2802
2803         * WebProcess/WebCoreSupport/WebChromeClient.h:
2804         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2805         (WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged): Deleted.
2806         (WebKit::WebEditorClient::selectionRectsDidChange): Deleted.
2807         * WebProcess/WebCoreSupport/WebEditorClient.h:
2808         Remove WebEditorClient overrides for now-removed functions.
2809
2810         * WebProcess/WebPage/WebPage.cpp:
2811         (WebKit::WebPage::WebPage):
2812         (WebKit::WebPage::updatePreferences):
2813         Forward serviceControlsEnabled setting to WebCore.
2814
2815         (WebKit::WebPage::servicesOverlayController): Deleted.
2816         * WebProcess/WebPage/WebPage.h:
2817         (WebKit::WebPage::serviceControlsEnabled): Deleted.
2818
2819 2014-10-09  Andy Estes  <aestes@apple.com>
2820
2821         [iOS] Crash in CFURLDownloadClient.didFail if the download has a null resumeData
2822         https://bugs.webkit.org/show_bug.cgi?id=137551
2823
2824         Reviewed by David Kilzer.
2825
2826         CFDataGetBytePtr() and CFDataGetLength() crash if passed a null value.
2827
2828         * Shared/Downloads/ios/DownloadIOS.mm:
2829         (WebKit::setUpDownloadClient):
2830
2831 2014-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>
2832
2833         [X11] Plugin process crashes in NetscapePlugin::platformPostInitialize()
2834         https://bugs.webkit.org/show_bug.cgi?id=137426
2835
2836         Reviewed by Darin Adler.
2837
2838         For some reason flash crashes when NPP_GetValue is called with
2839         NPPVpluginCancelSrcStream, but only in windowed mode. Not calling
2840         NPP_GetValue and unconditionally loading the source URL in the
2841         browser fixes the crash and plugins work normally. We can handle
2842         this particular case with a new quirk.
2843
2844         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
2845         (WebKit::NetscapePluginModule::determineQuirks): Add
2846         DoNotCancelSrcStreamInWindowedMode quirk if it's flash plugin.
2847         * Shared/Plugins/PluginQuirks.h: Add
2848         DoNotCancelSrcStreamInWindowedMode quirk.
2849         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2850         (WebKit::NetscapePlugin::shouldLoadSrcURL): Return early if plugin
2851         is windowed and DoNotCancelSrcStreamInWindowedMode quirk is present.
2852
2853 2014-10-09  Chris Dumez  <cdumez@apple.com>
2854
2855         Use is<>() / downcast<>() for Widget subclasses
2856         https://bugs.webkit.org/show_bug.cgi?id=137549
2857
2858         Reviewed by Darin Adler.
2859
2860         Use is<>() / downcast<>() for Widget subclasses and clean up the
2861         surrounding code.
2862
2863         * Shared/WebRenderObject.cpp:
2864         (WebKit::WebRenderObject::WebRenderObject):
2865
2866 2014-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2867
2868         [GTK] Use the PageLoadState observer also to monitor title and estimated load progress
2869         https://bugs.webkit.org/show_bug.cgi?id=136997
2870
2871         Reviewed by Gustavo Noronha Silva.
2872
2873         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2874         (attachLoaderClientToView): Remove implementation of
2875         didReceiveTitleForFrame, didStartProgress, didChangeProgress and
2876         didFinishProgress.
2877         (didReceiveTitleForFrame): Deleted.
2878         (didChangeProgress): Deleted.
2879         * UIProcess/API/gtk/WebKitWebView.cpp:
2880         (webkit_web_view_get_estimated_load_progress): Return the value
2881         directly from the PageLoadState object, since we don't need to
2882         cache the value anymore.
2883         (webkitWebViewSetTitle): Deleted.
2884         (webkitWebViewSetEstimatedLoadProgress): Deleted.
2885         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2886
2887 2014-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2888
2889         Race condition with WebKitWebView:is-loading after starting page load
2890         https://bugs.webkit.org/show_bug.cgi?id=136692
2891
2892         Reviewed by Gustavo Noronha Silva.
2893
2894         Use PageLoadState::Observer to update both is-loading and uri
2895         properties, instead of manually update them. This ensures that our
2896         web view is always in sync with the WebPageProxy so that
2897         webkit_web_view_is_loading() returns true right after requesting
2898         any load. We still need to manually set the is-loading property
2899         only in the case where we delay the emission of the load-changed
2900         signals when waiting for the main resource. The bahaviour is a bit
2901         different but still consistent with what our API documentation says.
2902
2903         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2904         (attachLoaderClientToView): Remove
2905         didSameDocumentNavigationForFrame implementation, since we are
2906         already notified about the URL change by the PageLoadState::Observer.
2907         (didSameDocumentNavigationForFrame): Deleted.
2908         * UIProcess/API/gtk/WebKitWebView.cpp:
2909         (webkitWebViewSetIsLoading): No longer update the URI when
2910         changing the is-loading property.
2911         (webkitWebViewConstructed): Crate a PageLoadStateObserver and add
2912         it to the PageLoadState.
2913         (webkitWebViewDispose): Remove the PageLoadStateObserver from the PageLoadState.
2914         (webkitWebViewEmitLoadChanged): Add isDelayedEvent parameter to
2915         update the is-loading property accordingly when emitting the
2916         delayed events.
2917         (webkitWebViewEmitDelayedLoadEvents): Pass true as isDelayedEvent
2918         parameter of webkitWebViewEmitLoadChanged().
2919         (webkitWebViewLoadChanged): Pass false as isDelayedEvent parameter
2920         of webkitWebViewEmitLoadChanged().
2921         (webkitWebViewLoadFailed):
2922         (webkitWebViewLoadFailedWithTLSErrors):
2923         (webkitWebViewUpdateURI): Deleted.
2924         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2925
2926 2014-10-08  Christophe Dumez  <cdumez@apple.com>
2927
2928         Use is<>() / downcast<>() for RenderBlock objects
2929         https://bugs.webkit.org/show_bug.cgi?id=137512
2930
2931         Reviewed by Darin Adler.
2932
2933         Use is<>() / downcast<>() for RenderBlock objects and clean up the 
2934         surrounding code.
2935
2936         * WebProcess/WebPage/ios/WebPageIOS.mm:
2937         (WebKit::WebPage::rangeForWebSelectionAtPosition):
2938         (WebKit::WebPage::contractedRangeFromHandle):
2939
2940 2014-10-08  Ada Chan  <adachan@apple.com>
2941
2942         Implement WKPageIsPlayingAudio().
2943         https://bugs.webkit.org/show_bug.cgi?id=137048
2944
2945         Reviewed by Darin Adler.
2946
2947         * UIProcess/API/C/WKPage.cpp:
2948         (WKPageIsPlayingAudio):
2949
2950 2014-10-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2951
2952         [EFL][CoordinatedGraphics] All EFL layout tests are broken since r174231
2953         https://bugs.webkit.org/show_bug.cgi?id=137443
2954
2955         Reviewed by Zoltan Herczeg.
2956
2957         EFL layout test and MiniBrowser have broken since r174231. r174231 was to move PageOverlay implementation
2958         from WebKit2 to WebCore with lazy initializing of PageOverlayController. It caused all EFL layout tests
2959         crash and build break. To restore EFL layout test, this patch sets viewOverlayRootLayer through
2960         attachViewOverlayGraphicsLayer() as mac port's one in r174231.
2961
2962         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
2963         (WebKit::CoordinatedDrawingArea::attachViewOverlayGraphicsLayer):
2964         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
2965         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2966         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2967         (WebKit::CoordinatedLayerTreeHost::updateRootLayers):
2968         (WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
2969         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
2970         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
2971         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2972
2973 2014-10-08  Commit Queue  <commit-queue@webkit.org>
2974
2975         Unreviewed, rolling out r174335.
2976         https://bugs.webkit.org/show_bug.cgi?id=137515
2977
2978         It broke EFL layout test totally (Requested by gyuyoung on
2979         #webkit).
2980
2981         Reverted changeset:
2982
2983         "[EFL] Introduce EWebKit_Extension"
2984         https://bugs.webkit.org/show_bug.cgi?id=134921
2985         http://trac.webkit.org/changeset/174335
2986
2987 2014-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2988
2989         [GTK] Make forwarding headers generation depend on source code
2990         https://bugs.webkit.org/show_bug.cgi?id=137394
2991
2992         Reviewed by Philippe Normand.
2993
2994         Only run generate-forwarding-headers.pl when source code changes
2995         and use a different target for the symlinks.
2996
2997         * PlatformGTK.cmake:
2998
2999 2014-10-07  Pascal Jacquemart  <p.jacquemart@samsung.com>
3000
3001         [EFL] Enable custom URI schemes with CustomProtocols
3002         https://bugs.webkit.org/show_bug.cgi?id=128177
3003
3004         Reviewed by Gyuyoung Kim.
3005
3006         Fixing ewk_context_url_scheme_register() ewebkit2 API
3007         rely on r162449 - CustomProtocols implementation from Carlos Garcia Campos
3008
3009         * PlatformEfl.cmake:
3010         * UIProcess/API/efl/ewk_context.h:
3011         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
3012         (EwkUrlSchemeRequest::EwkUrlSchemeRequest):
3013         (EwkUrlSchemeRequest::finish):
3014         * UIProcess/API/efl/ewk_url_scheme_request_private.h:
3015         (EwkUrlSchemeRequest::create):
3016         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
3017         (TEST_F):
3018         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
3019         * UIProcess/efl/RequestManagerClientEfl.cpp:
3020         (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
3021         (WebKit::RequestManagerClientEfl::startLoading):
3022         (WebKit::RequestManagerClientEfl::stopLoading):
3023         (WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
3024         (WebKit::EwkUrlSchemeHandler::EwkUrlSchemeHandler): Deleted.
3025         (WebKit::RequestManagerClientEfl::didReceiveURIRequest): Deleted.
3026         * UIProcess/efl/RequestManagerClientEfl.h:
3027         * UIProcess/efl/WebContextEfl.cpp:
3028         (WebKit::WebContext::platformInitializeWebProcess):
3029         * UIProcess/soup/WebContextSoup.cpp:
3030         (WebKit::WebContext::platformInitializeNetworkProcess):
3031
3032 2014-10-07  Sungmann Cho  <sungmann.cho@navercorp.com>
3033
3034         Remove WKPageCreateSnapshotOfVisibleContent API.
3035         https://bugs.webkit.org/show_bug.cgi?id=66979
3036
3037         Reviewed by Darin Adler.
3038
3039         After the landing of the first patch of webkit.org/b/66979,
3040         WKPageCreateSnapshotOfVisibleContent API has been neglected for years.
3041         Currently, this is not used anywhere and does not break the nightlies.
3042         So we can remove this.
3043
3044         * UIProcess/API/C/WKPage.cpp:
3045         (WKPageCreateSnapshotOfVisibleContent): Deleted.
3046         * UIProcess/API/C/WKPagePrivate.h:
3047
3048 2014-10-07  Sungmann Cho  <sungmann.cho@navercorp.com>
3049
3050         Remove WKPageSetInvalidMessageFunction.
3051         https://bugs.webkit.org/show_bug.cgi?id=137509
3052
3053         Reviewed by Benjamin Poulain.
3054
3055         According to the FIXME comment in WKPageSetInvalidMessageFunction,
3056         we can remove this function when doing so won't break the nightlies.
3057         Currently, this is not used anywhere and does not break the nightlies.
3058         So we can remove this.
3059
3060         * UIProcess/API/C/WKPage.cpp:
3061         (WKPageSetInvalidMessageFunction): Deleted.
3062         * UIProcess/API/C/WKPagePrivate.h:
3063
3064 2014-10-07  Christophe Dumez  <cdumez@apple.com>
3065
3066         [WK2] Use is<>() / downcast<>() for DrawingArea subclasses
3067         https://bugs.webkit.org/show_bug.cgi?id=137497
3068
3069         Reviewed by Benjamin Poulain.
3070
3071         Use is<>() / downcast<>() for DrawingArea subclasses.
3072
3073         * WebProcess/WebPage/DrawingArea.h:
3074         * WebProcess/WebPage/WebPage.cpp:
3075         (WebKit::WebPage::didCommitLoad):
3076         * WebProcess/WebPage/ios/WebPageIOS.mm:
3077         (WebKit::WebPage::synchronizeDynamicViewportUpdate):
3078         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3079         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3080
3081 2014-10-07  Simon Fraser  <simon.fraser@apple.com>
3082
3083         Roll-over Changelogs.
3084
3085         * ChangeLog-2014-10-07: Copied from Source/WebKit2/ChangeLog.
3086
3087 == Rolled over to ChangeLog-2014-10-07 ==