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