Fix the iOS build
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-10-24  Benjamin Poulain  <bpoulain@apple.com>
2
3         Fix the iOS build
4
5         * Configurations/WebKit.xcconfig:
6
7 2014-10-24  Beth Dakin  <bdakin@apple.com>
8
9         _actionMenuItemsForHitTestResult should also take a type indicating what the menu 
10         was built for
11         https://bugs.webkit.org/show_bug.cgi?id=138063
12
13         Reviewed by Dan Bernstein.
14
15         New type enum that can be used by clients.
16         * Shared/API/c/WKActionMenuTypes.h: Added.
17
18         Remove the old SPI and add the new.
19         * UIProcess/API/Cocoa/WKViewPrivate.h:
20         * UIProcess/API/mac/WKView.mm:
21         (-[WKView _actionMenuItemsForHitTestResult:withType:defaultActionMenuItems:]):
22         (-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]): Deleted.
23
24         Now keep an ivar for the type.
25         * UIProcess/mac/WKActionMenuController.h:
26
27         Create a category for the old SPI so that we can still call it if clients have 
28         implemented it.
29         * UIProcess/mac/WKActionMenuController.mm:
30         (-[WKActionMenuController initWithPage:view:]):
31         (-[WKActionMenuController didCloseMenu:withEvent:]):
32         (imageForResource:name::if):
33         (-[WKActionMenuController _updateActionMenuItems]):
34         * WebKit2.xcodeproj/project.pbxproj:
35
36 2014-10-24  Tim Horton  <timothy_horton@apple.com>
37
38         Share sheet doesn't attach to the window
39         https://bugs.webkit.org/show_bug.cgi?id=138062
40         <rdar://problem/18767397>
41
42         Reviewed by Beth Dakin.
43
44         * UIProcess/mac/WKActionMenuController.h:
45         WKActionMenuController is now a NSSharingService{Picker}Delegate.
46
47         * UIProcess/mac/WKActionMenuController.mm:
48         (-[WKActionMenuController _defaultMenuItemsForImage]):
49         Set us up as the NSSharingServicePicker delegate.
50
51         (-[WKActionMenuController sharingServicePicker:delegateForSharingService:]):
52         Set us up as the NSSharingService delegate.
53
54         (-[WKActionMenuController sharingService:sourceWindowForShareItems:sharingContentScope:]):
55         Return the appropriate window to attach to.
56
57 2014-10-24  Jer Noble  <jer.noble@apple.com>
58
59         Abstractify WebOriginDataManager to support arbitrary ChildProcess supplements.
60         https://bugs.webkit.org/show_bug.cgi?id=137993
61
62         Reviewed by Brady Eidson.
63
64         To allow different ChildProcess subclasses to handle listing and deletion of origin
65         data, make WebOriginDataManager more generic by having a supplement implement the
66         details, leaving WebOriginDataManager to deal with cross-process messaging.
67
68         De-virtualize AsyncTask, allowing a task to be created by passing in a
69         function<void()>, rather than an object, method, and arguments.
70
71         * Shared/AsyncTask.h:
72         (WebKit::AsyncTask::AsyncTask):
73         (WebKit::AsyncTask::performTask):
74         (WebKit::AsyncTask::~AsyncTask): Deleted.
75
76         Add a new virtual base class, to be implemented by various ChildProcesses, which
77         WebOriginDataManager will use to implement listing and deletion requests.
78
79         * WebProcess/OriginData/WebOriginDataManager.h:
80         * WebProcess/OriginData/WebOriginDataManagerSupplement.h: Added.
81         (WebKit::WebOriginDataManagerSupplement::WebOriginDataManagerSupplement):
82         (WebKit::WebOriginDataManagerSupplement::~WebOriginDataManagerSupplement):
83         (WebKit::WebOriginDataManagerSupplement::getOrigins):
84         (WebKit::WebOriginDataManagerSupplement::deleteEntriesForOrigin):
85         (WebKit::WebOriginDataManagerSupplement::deleteEntriesModifiedBetweenDates):
86         (WebKit::WebOriginDataManagerSupplement::deleteAllEntries):
87         * WebKit2.xcodeproj/project.pbxproj:
88
89         WebOriginDataManager doesn't need to be a ChildSupplement. Remove the DatabaseProcess-
90         specific implementations for its message handlers and replace with clean, generic calls
91         to its supplement. Because these supplements may want to respond to the request
92         asynchronously, pass a completion function in to be called by the supplement once its
93         work is complete.
94
95         * WebProcess/OriginData/WebOriginDataManager.cpp:
96         (WebKit::WebOriginDataManager::WebOriginDataManager):
97         (WebKit::WebOriginDataManager::getOrigins):
98         (WebKit::WebOriginDataManager::deleteEntriesForOrigin):
99         (WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
100         (WebKit::WebOriginDataManager::deleteAllEntries):
101         (WebKit::WebOriginDataManager::supplementName): Deleted.
102
103         DatabaseProcess already uses WebOriginDataManager, so it will be the first process
104         to fall under the heel of the new regime. DatabaseProcess will subclass
105         WebOriginDataManagerSupplement, and pass itself in twice to the WebOriginDataManager
106         constructor. Create a lambda-based AsyncTask for each request, and call the completion
107         function when each request is complete.
108
109         * DatabaseProcess/DatabaseProcess.cpp:
110         (WebKit::DatabaseProcess::DatabaseProcess):
111         (WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
112         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
113         (WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
114         (WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
115         (WebKit::DatabaseProcess::getOrigins):
116         (WebKit::DatabaseProcess::deleteEntriesForOrigin):
117         (WebKit::DatabaseProcess::deleteEntriesModifiedBetweenDates):
118         (WebKit::DatabaseProcess::deleteAllEntries):
119         (WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins): Deleted.
120         (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin): Deleted.
121         (WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates): Deleted.
122         (WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries): Deleted.
123         * DatabaseProcess/DatabaseProcess.h:
124
125 2014-10-24  Beth Dakin  <bdakin@apple.com>
126
127         Very large images crash in action menu code
128         https://bugs.webkit.org/show_bug.cgi?id=138059
129         -and corresponding-
130         rdar://problem/18767859
131
132         Reviewed by Tim Horton.
133
134         If the HitTestResult failed to create and image, then don’t go for the image 
135         action menu.
136         * UIProcess/mac/WKActionMenuController.mm:
137         (-[WKActionMenuController _defaultMenuItems]):
138
139         ShareableBitmap::createShareable() can fail. The result needs to be null-checked.
140         * WebProcess/WebPage/WebPage.cpp:
141         (WebKit::WebPage::performActionMenuHitTestAtLocation):
142
143 2014-10-24  Beth Dakin  <bdakin@apple.com>
144
145         Build fix.
146
147         * UIProcess/mac/WKActionMenuController.h:
148         * UIProcess/mac/WKActionMenuController.mm:
149
150 2014-10-24  Tim Horton  <timothy_horton@apple.com>
151
152         Blindly try to fix all the builds.
153
154         * UIProcess/mac/WKActionMenuController.h:
155         * UIProcess/mac/WKActionMenuController.mm:
156
157 2014-10-24  Timothy Horton  <timothy_horton@apple.com>
158
159         Blindly try to fix all the builds.
160
161         * UIProcess/mac/WKActionMenuController.h:
162
163 2014-10-24  Timothy Horton  <timothy_horton@apple.com>
164
165         Blindly try to fix the 32-bit build.
166
167         * UIProcess/mac/WKActionMenuController.h:
168         * UIProcess/mac/WKActionMenuController.mm:
169
170 2014-10-24  Tim Horton  <timothy_horton@apple.com>
171
172         [Mac][WebKit2] Move action menu code into its own file
173         https://bugs.webkit.org/show_bug.cgi?id=138034
174         <rdar://problem/18758758>
175
176         * UIProcess/mac/WKActionMenuController.mm:
177         (-[WKActionMenuController prepareForMenu:withEvent:]):
178         (-[WKActionMenuController _addImageToPhotos:]):
179         Review comments that were not previously addressed.
180
181 2014-10-24  Tim Horton  <timothy_horton@apple.com>
182
183         [Mac][WebKit2] Move action menu code into its own file
184         https://bugs.webkit.org/show_bug.cgi?id=138034
185         <rdar://problem/18758758>
186
187         Reviewed by Dan Bernstein.
188
189         * UIProcess/API/mac/WKView.mm:
190         (-[WKView initWithFrame:context:configuration:webView:]):
191         Make a WKActionMenuController if needed.
192
193         (-[WKView prepareForMenu:withEvent:]):
194         (-[WKView willOpenMenu:withEvent:]):
195         (-[WKView didCloseMenu:withEvent:]):
196         (-[WKView _didPerformActionMenuHitTest:]):
197         Forward these to WKActionMenuController.
198
199         (-[WKView _openURLFromActionMenu:]): Deleted.
200         (-[WKView _addToReadingListFromActionMenu:]): Deleted.
201         (-[WKView _quickLookURLFromActionMenu:]): Deleted.
202         (-[WKView _createActionMenuItemForTag:]): Deleted.
203         (webKitBundleImageNamed): Deleted.
204         (-[WKView _copyImage:]): Deleted.
205         (-[WKView _saveImageToDownloads:]): Deleted.
206         (temporaryPhotosDirectoryPath): Deleted.
207         (pathToPhotoOnDisk): Deleted.
208         (-[WKView _addImageToPhotos:]): Deleted.
209         (-[WKView _defaultMenuItemsForImage]): Deleted.
210         (-[WKView _defaultMenuItems]): Deleted.
211         (-[WKView _updateActionMenu]): Deleted.
212         Moved to WKActionMenuController.
213
214         * UIProcess/mac/WKActionMenuController.h: Added.
215         * UIProcess/mac/WKActionMenuController.mm: Added.
216         (-[WKActionMenuController initWithPage:view:]):
217         (-[WKActionMenuController prepareForMenu:withEvent:]):
218         (-[WKActionMenuController willOpenMenu:withEvent:]):
219         (-[WKActionMenuController didCloseMenu:withEvent:]):
220         (-[WKActionMenuController didPerformActionMenuHitTest:]):
221         (-[WKActionMenuController _defaultMenuItemsForLink]):
222         (-[WKActionMenuController _openURLFromActionMenu:]):
223         (-[WKActionMenuController _addToReadingListFromActionMenu:]):
224         (-[WKActionMenuController _quickLookURLFromActionMenu:]):
225         (-[WKActionMenuController _defaultMenuItemsForImage]):
226         (-[WKActionMenuController _copyImage:]):
227         (-[WKActionMenuController _saveImageToDownloads:]):
228         (temporaryPhotosDirectoryPath):
229         (pathToPhotoOnDisk):
230         (-[WKActionMenuController _addImageToPhotos:]):
231         (-[WKActionMenuController _createActionMenuItemForTag:]):
232         (webKitBundleImageNamed):
233         (imageForResource:name::if):
234         (-[WKActionMenuController _updateActionMenuItems]):
235         Moved from WKView.
236
237         * WebKit2.xcodeproj/project.pbxproj:
238
239 2014-10-24  Marcos Chavarría Teijeiro  <chavarria1991@gmail.com>
240
241         [GTK] Implement is_selected method on WebKitHitTestResult
242         https://bugs.webkit.org/show_bug.cgi?id=137110
243
244         Reviewed by Tim Horton.
245
246         Expose CONTEXT_SELECTION for WebKitHitTestResult.
247
248         * Shared/WebHitTestResult.cpp: Add is_selected field and getter for this field.
249         (WebKit::WebHitTestResult::Data::Data):
250         (WebKit::WebHitTestResult::Data::encode):
251         (WebKit::WebHitTestResult::Data::decode):
252         * Shared/WebHitTestResult.h:
253         (WebKit::WebHitTestResult::isSelected):
254         * UIProcess/API/gtk/WebKitHitTestResult.cpp: Add WEBKIT_HIT_TEST_RESULT_CONTEXT_SELECTION context and method to check it.
255         (webkitHitTestResultCreate):
256         (webkitHitTestResultCompare):
257         (webkit_hit_test_result_context_is_selection):
258         * UIProcess/API/gtk/WebKitHitTestResult.h:
259         * UIProcess/API/gtk/WebKitWebView.cpp: Modify context-menu callback to set the new context option.
260         (webkitWebViewPopulateContextMenu):
261         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add documentation about new function.
262
263 2014-10-23  Carlos Garcia Campos  <cgarcia@igalia.com>
264
265         [GTK][Cairo] Remove GTK dependency of WidgetBackingStoreGtkX11
266         https://bugs.webkit.org/show_bug.cgi?id=138004
267
268         Reviewed by Gustavo Noronha Silva.
269
270         * UIProcess/BackingStore.h: Rename m_backingStore as m_backend,
271         since it's a bit confusing that a BackingStore class has a
272         m_backingStore member and WidgetBackingStore has been renamed as
273         BackingStoreBackendCairo.
274         * UIProcess/cairo/BackingStoreCairo.cpp:
275         (WebKit::BackingStore::createBackend): Helper function to create
276         the BackingStore backend depending on the platform.
277         (WebKit::BackingStore::paint): Use m_backend instead of m_backingStore.
278         (WebKit::BackingStore::incorporateUpdate): Ditto.
279         (WebKit::BackingStore::scroll): Ditto.
280         (WebKit::createBackingStoreForGTK): Deleted.
281
282 2014-10-23  Benjamin Poulain  <bpoulain@apple.com>
283
284         Fix a bad find-and-replace in r175153
285
286         Looks like I messed up the commit on landing.
287
288         * UIProcess/WebPageProxy.cpp:
289         (WebKit::WebPageProxy::WebPageProxy):
290         (WebKit::WebPageProxy::didCommitLoadForFrame):
291
292 2014-10-23  Benjamin Poulain  <bpoulain@apple.com>
293
294         [iOS WK2] If a page has the exact same VisibleContentRect as the page before, its VisibleContentRectUpdate can be ignored
295         https://bugs.webkit.org/show_bug.cgi?id=138031
296         rdar://problem/18739335
297
298         Reviewed by Simon Fraser.
299
300         Since any VisibleContentRectUpdate is costly for the WebProcess, we avoid sending updates
301         if none of the important parameters have changed (scale and geometry).
302
303         One unintended side effect is that the update of a page can be blocked if the parameters
304         of the previous page were identical.
305
306         What happen is this:
307         1) Page [A] sends its content rect update as needed. WebPageProxy saves the last update
308            in m_lastVisibleContentRectUpdate and use that value to avoid useless updates.
309         2) Page [B] load after page [A] and have the exact VisibleContentRect. When receiving the first
310            layer tree commit after didCommitLoadForFrame, WKWebView sends its VisibleContentRect
311            to WebPageProxy to synchronize the state of the WebProcess with what is on screen.
312         3) Since the two VisibleContentRect update has the same value as the ones of page [A], WebPageProxy
313            discards the update. The WebProcess has its initialization viewport and is not udpated until
314            a major parameter changes (scale or position).
315
316         In rdar://problem/18739335, the problem is the similar but with a different failure point:
317         1) Everything above happened already.
318         2) The layer tree transaction has a scrolling request. This is processed by WKWebView.
319         3) Since the scrolling position is invalid, the request is ignored and we send the last
320            VisibleContentRect to the WebProcess with WebPageProxy::resendLastVisibleContentRects().
321         4) Since the VisibleContentRect was never updated after didCommitLoadForFrame, the one we send
322            is for the previous page, which the web process correctly ignores.
323
324         This patch solves the problem by nuking the cached m_lastVisibleContentRectUpdate before
325         any valid VisibleContentRectUpdate for a new page.
326
327         * UIProcess/WebPageProxy.cpp:
328         (WebKit::WebPageProxy::WebPageProxy):
329         (WebKit::WebPageProxy::didCommitLoadForFrame):
330         * UIProcess/WebPageProxy.h:
331         * UIProcess/ios/WebPageProxyIOS.mm:
332         (WebKit::WebPageProxy::didCommitLayerTree):
333
334 2014-10-23  Joseph Pecoraro  <pecoraro@apple.com>
335
336         Web Inspector: Provide a way to have alternate inspector agents
337         https://bugs.webkit.org/show_bug.cgi?id=137901
338
339         Reviewed by Brian Burg.
340
341         * Configurations/FeatureDefines.xcconfig:
342
343 2014-10-23  Tim Horton  <timothy_horton@apple.com>
344
345         Add some SPI headers for NSExtension and NSSharingService{Picker}
346         https://bugs.webkit.org/show_bug.cgi?id=138027
347
348         Reviewed by Anders Carlsson.
349
350         * UIProcess/API/mac/WKView.mm:
351         * UIProcess/mac/ServicesController.mm:
352         * UIProcess/mac/WebContextMenuProxyMac.mm:
353         Replace redefinitions with SPI header #imports.
354
355 2014-10-23  Benjamin Poulain  <bpoulain@apple.com>
356
357         [iOS WK2] Make sure any dynamic viewport update schedules a layer tree commit
358         https://bugs.webkit.org/show_bug.cgi?id=138021
359
360         Reviewed by Simon Fraser.
361
362         * WebProcess/WebPage/ios/WebPageIOS.mm:
363         (WebKit::WebPage::dynamicViewportSizeUpdate):
364         Sometimes, the clients can do a dynamic viewport update but only change the minimum
365         layout size (see rdar://problem/18755250).
366
367         When that happens, it is possible to do the full state update without ever scheduling
368         a layer tree commit. For example, if the new minimum layout height is only a few pixels
369         smaller than the old value and the layout of the page is equal or larger than the old value,
370         the layout is done without any side effect to the content (assuming a viewport configuration
371         based on width).
372
373         The contract with the client is that the next layer tree commit after a dynamic viewport update
374         carries all the valid parameters for the new viewport size. Since the new layout never scheduled
375         a layer tree commit, the UIProcess is just waiting for one, discarding all input.
376
377         This patch solves the issue by explicitely scheduling a layer flush after updating all the layout
378         and view parameters to their final values. In most cases, this makes no difference since a layer
379         tree commit was already scheduled. In the rare cases where nothing was scheduled, scheduling
380         the layer tree commit ensure we unlock the UIProcess.
381
382 2014-10-23  Ryosuke Niwa  <rniwa@webkit.org>
383
384         WebContent crash in WebKit::WebPage::expandedRangeFromHandle
385         https://bugs.webkit.org/show_bug.cgi?id=138023
386
387         Reviewed by Enrica Casucci.
388
389         The crashes are caused by rangeForBlockAtPoint returning a null Range.
390         Exit early or continue if a range is null in various places.
391
392         * WebProcess/WebPage/ios/WebPageIOS.mm:
393         (WebKit::WebPage::expandedRangeFromHandle): Continue looking for another point if the range returned by
394         rangeForBlockAtPoint is null.
395         (WebKit::WebPage::contractedRangeFromHandle): Ditto.
396         (WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle): Removed the FIXME now that Enrica has
397         verified that this early exit added in r173788 is correct.
398
399 2014-10-23  Joseph Pecoraro  <pecoraro@apple.com>
400
401         [iOS] iPhone unselecting items in <select multiple> shows incorrect values selected
402         https://bugs.webkit.org/show_bug.cgi?id=137989
403
404         Reviewed by Alexey Proskuryakov.
405
406         * UIProcess/ios/forms/WKFormSelectPicker.mm:
407         (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
408         The second argument is "allowsMultipleSelection" and should only be set
409         when we are making a selection in a <select multiple>.
410
411 2014-10-23  Tim Horton  <timothy_horton@apple.com>
412
413         Assertion failures in ImageKit soft linking
414         https://bugs.webkit.org/show_bug.cgi?id=138009
415
416         Reviewed by Anders Carlsson.
417
418         * UIProcess/API/mac/WKView.mm:
419         Soft-link ImageKit correctly.
420         ImageKit is inside the Quartz umbrella framework.
421
422 2014-10-23  Daniel Bates  <dabates@apple.com>
423
424         [iOS] Fix the build after <http://trac.webkit.org/changeset/175079>
425         (https://bugs.webkit.org/show_bug.cgi?id=137995)
426
427         Rubber-stamped by Anders Carlsson.
428
429         Remove PageClientImpl::didPerformActionMenuHitTest() for iOS.
430
431         * UIProcess/ios/PageClientImplIOS.h:
432         * UIProcess/ios/PageClientImplIOS.mm:
433         (WebKit::PageClientImpl::didPerformActionMenuHitTest): Deleted.
434
435 2014-10-23  Krzysztof Czech  <k.czech@samsung.com>
436
437         [EFL] Fix build problem after r175098
438         https://bugs.webkit.org/show_bug.cgi?id=138002
439
440         Reviewed by Gyuyoung Kim.
441
442         Add ECORE_X dependency to avoid linking problems while building unit tests.
443
444         * PlatformEfl.cmake:
445
446 2014-10-23  Krzysztof Czech  <k.czech@samsung.com>
447
448         [EFL] Set proper default value for WebPageAccessibilityObject
449         https://bugs.webkit.org/show_bug.cgi?id=137951
450
451         Reviewed by Csaba Osztrogonác.
452
453         Initial value for WebPageAccessibilityObject should be nullptr.
454
455         * WebProcess/WebPage/WebPage.cpp:
456         (WebKit::WebPage::WebPage):
457
458 2014-10-23  Krzysztof Czech  <k.czech@samsung.com>
459
460         [EFL] Introduce EFL Accessibility in WebKit
461         https://bugs.webkit.org/show_bug.cgi?id=137819
462
463         Reviewed by Gyuyoung Kim.
464
465         EFL Accessibility provides an API that is used to notify clients that certain
466         Accessibility events occur. Utilizing it makes WebKit-EFL coherent with EFL native
467         accessibility approach.
468
469         * PlatformEfl.cmake:
470         * UIProcess/API/efl/EwkView.cpp:
471         (EwkView::EwkView):
472         * UIProcess/API/efl/EwkView.h:
473         (EwkView::webAccessibility):
474         * UIProcess/API/efl/WebAccessibility.cpp: Added.
475         (WebKit::WebAccessibility::WebAccessibility):
476         (WebKit::WebAccessibility::~WebAccessibility):
477         (WebKit::WebAccessibility::eventHandler):
478         (WebKit::WebAccessibility::executeGestureAction):
479         (WebKit::WebAccessibility::activate):
480         (WebKit::WebAccessibility::read):
481         (WebKit::WebAccessibility::readNext):
482         (WebKit::WebAccessibility::readPrev):
483         (WebKit::WebAccessibility::up):
484         (WebKit::WebAccessibility::down):
485         (WebKit::WebAccessibility::scroll):
486         (WebKit::WebAccessibility::mouse):
487         (WebKit::WebAccessibility::enable):
488         (WebKit::WebAccessibility::disable):
489         * UIProcess/API/efl/WebAccessibility.h: Added.
490         (WebKit::WebAccessibility::activateAction):
491         (WebKit::WebAccessibility::nextAction):
492         (WebKit::WebAccessibility::prevAction):
493         (WebKit::WebAccessibility::readAction):
494         * UIProcess/API/efl/ewk_view.cpp:
495         (ewk_view_accessibility_action_activate_get):
496         (ewk_view_accessibility_action_next_get):
497         (ewk_view_accessibility_action_prev_get):
498         (ewk_view_accessibility_action_read_by_point_get):
499         * UIProcess/API/efl/ewk_view.h:
500         * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Added.
501         (EWK2Accessibility::xwindow):
502         (TEST_F):
503         * UIProcess/WebPageProxy.h:
504         * UIProcess/efl/WebPageProxyEfl.cpp:
505         (WebKit::WebPageProxy::accessibilityObjectReadByPoint):
506         (WebKit::WebPageProxy::accessibilityObjectReadPrevious):
507         (WebKit::WebPageProxy::accessibilityObjectReadNext):
508
509 2014-10-22  Benjamin Poulain  <bpoulain@apple.com>
510
511         [iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
512         https://bugs.webkit.org/show_bug.cgi?id=137988
513         rdar://problem/17785162
514
515         Reviewed by Simon Fraser.
516
517         * UIProcess/API/Cocoa/WKWebView.mm:
518         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
519         The algorithm behind dynamic size update finds the best content area to put in the viewport
520         after a viewport change. If an initial size or a target size is empty, it is impossible to
521         compute a reasonable area to keep in the view. We end up handling NaN scales
522         and/or sizes and CoreAnimation raises an exception when applying that value.
523
524         This patch add early exits when that occurs and fallback to the common code.
525
526         On Input, things are easy. If any of the initial values is empty, we just execute the updateBlock
527         without attempting any of the dynamic behaviors.
528
529         For the target values, things are trickier. We do not know what the values are going to be before we execute
530         the block. But once we executed the block, we have already skipped all the setters that call the web process.
531
532         To handle that, every value is set manually on WebPageProxy. This is a bit unfortunate because the setters
533         get yet another entry point.
534
535 2014-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
536
537         EFL and GTK ports have broken since r175075
538         https://bugs.webkit.org/show_bug.cgi?id=137995
539
540         Unreviewed, EFL and GTK ports build fix.
541
542         Need to use PLATFORM(MAC) guard for ActionMenuHitTest functions.
543
544         * UIProcess/PageClient.h:
545         * UIProcess/WebPageProxy.cpp:
546         (WebKit::WebPageProxy::removeNavigationGestureSnapshot):
547         * UIProcess/WebPageProxy.h:
548         * UIProcess/WebPageProxy.messages.in:
549         * WebProcess/WebPage/WebPage.cpp:
550         * WebProcess/WebPage/WebPage.h:
551         * WebProcess/WebPage/WebPage.messages.in:
552
553 2014-10-22  Tim Horton  <timothy_horton@apple.com>
554
555         Add action menu support for images
556         https://bugs.webkit.org/show_bug.cgi?id=137987
557         <rdar://problem/18717767>
558
559         Reviewed by Anders Carlsson, Sam Weinig, and Beth Dakin.
560
561         * Resources/AddImageToPhotos.pdf: Added.
562         * Resources/CopyImage.pdf: Added.
563         * Resources/SaveImageToDownloads.pdf: Added.
564         * Resources/ShareImage.pdf: Added.
565         Add some temporary artwork.
566
567         * Scripts/webkit/messages.py:
568         (struct_or_class):
569         ActionMenuHitTestResult is a struct.
570
571         * Shared/API/c/WKActionMenuItemTypes.h:
572         Add new items for image menus.
573
574         * Shared/mac/ActionMenuHitTestResult.cpp:
575         (WebKit::ActionMenuHitTestResult::encode):
576         (WebKit::ActionMenuHitTestResult::decode):
577         For now, pass the hit image data across to the UI process as a ShareableBitmap.
578
579         * Shared/mac/ActionMenuHitTestResult.h:
580
581         * UIProcess/API/mac/WKView.mm:
582         (-[WKView _createActionMenuItemForTag:]):
583         Refactor action menu item creation into a single function, so that
584         callers can share code and be much simpler.
585
586         (webKitBundleImageNamed):
587         Add a helper to acquire an image from the WebKit2 bundle.
588
589         (-[WKView _copyImage:]):
590         (-[WKView _saveImageToDownloads:]):
591         (temporaryPhotosDirectoryPath):
592         (pathToPhotoOnDisk):
593         (-[WKView _addImageToPhotos:]):
594         Add rudimentary implementations of image actions.
595
596         (-[WKView _defaultMenuItemsForImage]):
597         Support the image menu, plus a submenu acquired from NSSharingServicePicker
598         for the Share menu.
599
600         (-[WKView _defaultMenuItems]):
601         Call _defaultMenuItemsForImage if needed.
602
603         (-[WKView _updateActionMenu]):
604         Refactor _updateActionMenu out of prepareForMenu:withEvent:.
605
606         (-[WKView prepareForMenu:withEvent:]):
607         Ask the Web process to re-hit-test under the location that the menu
608         will appear. Mark the menu as pending.
609
610         (-[WKView _didPerformActionMenuHitTest:]):
611         When we get the hit test reply, record the result for future use.
612
613         (-[WKView willOpenMenu:withEvent:]):
614         If we got a hit test reply, rebuild the menu immediately. If not, wait
615         up to 500ms for the reply to come in. This eventually needs to be
616         cancellable if the menu is rejected in the interim.
617
618         (-[WKView didCloseMenu:withEvent:]):
619         Clear all state when the menu closes.
620
621         * UIProcess/API/mac/WKViewInternal.h:
622         * UIProcess/PageClient.h:
623         * UIProcess/WebPageProxy.cpp:
624         (WebKit::WebPageProxy::performActionMenuHitTestAtLocation):
625         (WebKit::WebPageProxy::didPerformActionMenuHitTest):
626         * UIProcess/WebPageProxy.h:
627         * UIProcess/WebPageProxy.messages.in:
628         * UIProcess/mac/PageClientImpl.h:
629         * UIProcess/mac/PageClientImpl.mm:
630         (WebKit::PageClientImpl::didPerformActionMenuHitTest):
631         * UIProcess/ios/PageClientImplIOS.h:
632         * UIProcess/ios/PageClientImplIOS.mm:
633         * WebProcess/WebPage/WebPage.h:
634         * WebProcess/WebPage/WebPage.messages.in:
635         Plumb didPerformActionMenuHitTest back from WebPageProxy to WKView.
636
637         * WebProcess/WebPage/WebPage.cpp:
638         (WebKit::WebPage::performActionMenuHitTestAtLocation):
639         Hit test at the given location, recording the image data if there is any,
640         and return the result to the UI process.
641
642         * WebKit2.xcodeproj/project.pbxproj:
643         Add the PDFs.
644
645 2014-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
646
647         Remove WidgetBackingStoreCairo::create() factory function
648         https://bugs.webkit.org/show_bug.cgi?id=137943
649
650         Reviewed by Darin Adler.
651
652         WidgetBackingStoreCairo::create() can be replaced by std::make_unique<>.
653         Thus this patch removes it, then use std::make_unique<>|std::unique_ptr<>.
654
655         * UIProcess/BackingStore.h:
656         * UIProcess/cairo/BackingStoreCairo.cpp:
657         (WebKit::createBackingStoreForGTK):
658         (WebKit::BackingStore::incorporateUpdate):
659
660 2014-10-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
661
662         Remove TextCheckerEnchant::create() factory function
663         https://bugs.webkit.org/show_bug.cgi?id=137944
664
665         Reviewed by Darin Adler.
666
667         TextCheckerEnchant::create() can be replaced by std::make_unique<> and std::unique_ptr<>.
668
669         * UIProcess/API/gtk/WebKitTextChecker.cpp:
670         (WebKitTextChecker::WebKitTextChecker):
671         * UIProcess/API/gtk/WebKitTextChecker.h:
672         * UIProcess/efl/TextCheckerClientEfl.cpp:
673         (TextCheckerClientEfl::TextCheckerClientEfl):
674         * UIProcess/efl/TextCheckerClientEfl.h:
675
676 2014-10-22  Antti Koivisto  <antti@apple.com>
677
678         Revert fix for REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
679         (https://bugs.webkit.org/show_bug.cgi?id=137493)
680
681         Turns out the root cause was a bug in MIME type sniffing, https://bugs.webkit.org/show_bug.cgi?id=137855
682
683         Remove the workaround.
684
685         * Shared/Downloads/ios/DownloadIOS.mm:
686         (WebKit::Download::startWithHandle):
687         * Shared/Downloads/mac/DownloadMac.mm:
688         (WebKit::Download::startWithHandle):
689
690 2014-10-22  Beth Dakin  <bdakin@apple.com>
691
692         Remove action menu web preference
693         https://bugs.webkit.org/show_bug.cgi?id=137975
694
695         Reviewed by Tim Horton.
696
697         * Shared/WebPreferencesDefinitions.h:
698         * UIProcess/API/C/WKPreferences.cpp:
699         (WKPreferencesSetActionMenuSupportEnabled): Deleted.
700         (WKPreferencesGetActionMenuSupportEnabled): Deleted.
701         * UIProcess/API/C/WKPreferencesRefPrivate.h:
702         * UIProcess/API/mac/WKView.mm:
703         (-[WKView initWithFrame:context:configuration:webView:]):
704
705 2014-10-22  Chris Dumez  <cdumez@apple.com>
706
707         [Mac][WK2] Fix applicationIsSafari() detection
708         https://bugs.webkit.org/show_bug.cgi?id=137893
709
710         Reviewed by Alexey Proskuryakov.
711
712         Provide an implementation for FrameLoaderClient's new
713         needsQuickLookResourceCachingQuirks(), which accesses the flag stored
714         on the WebProcess, which is initialized upon WebProcess creation.
715
716         QuickLookMac::computeNeedsQuickLookResourceCachingQuirks() is called
717         on UIProcess side so that it works reliably and the flag is passed as
718         parameter when constructing the WebProcess.
719
720         * Shared/WebProcessCreationParameters.cpp:
721         (WebKit::WebProcessCreationParameters::encode):
722         (WebKit::WebProcessCreationParameters::decode):
723         * Shared/WebProcessCreationParameters.h:
724         * UIProcess/mac/WebContextMac.mm:
725         (WebKit::WebContext::platformInitializeWebProcess):
726         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
727         (WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks):
728         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
729         * WebProcess/WebProcess.cpp:
730         (WebKit::WebProcess::WebProcess):
731         * WebProcess/WebProcess.h:
732         (WebKit::WebProcess::needsQuickLookResourceCachingQuirks):
733         * WebProcess/cocoa/WebProcessCocoa.mm:
734         (WebKit::WebProcess::platformInitializeWebProcess):
735
736 2014-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
737
738         Unreviewed. Fix GTK+ debug build after r175046.
739
740         Remove invalid ASSERT.
741
742         * UIProcess/gtk/InputMethodFilter.cpp:
743         (WebKit::InputMethodFilter::setCursorRect):
744
745 2014-10-22  Carlos Garcia Campos  <cgarcia@igalia.com>
746
747         [GTK] Move GtkInputMethodFilter from Platform to WebKit2
748         https://bugs.webkit.org/show_bug.cgi?id=137884
749
750         Reviewed by Gustavo Noronha Silva.
751
752         Merge WebViewBaseInputMethodFilter and GtkInputMethodFilter into a
753         single class InputMethodFilter. The code is mostly the same, but
754         instead of having a setWebView method only to get the WebPageProxy,
755         it has a setPage method that passes the WebPageProxy. The GtkIMContext
756         client window is set by the WebView when it's realized/unrealized.
757
758         * PlatformGTK.cmake:
759         * Shared/NativeWebKeyboardEvent.h:
760         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
761         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
762         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
763         (webkitWebViewBaseRealize):
764         (webkitWebViewBaseUnrealize):
765         (webkit_web_view_base_class_init):
766         (webkitWebViewBaseCreateWebPage):
767         (webkitWebViewBaseEnterFullScreen): Deleted.
768         * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Removed.
769         * UIProcess/API/gtk/WebViewBaseInputMethodFilter.h: Removed.
770         * UIProcess/gtk/InputMethodFilter.cpp: Added.
771         (WebKit::InputMethodFilter::handleCommitCallback):
772         (WebKit::InputMethodFilter::handlePreeditStartCallback):
773         (WebKit::InputMethodFilter::handlePreeditChangedCallback):
774         (WebKit::InputMethodFilter::handlePreeditEndCallback):
775         (WebKit::InputMethodFilter::InputMethodFilter):
776         (WebKit::InputMethodFilter::~InputMethodFilter):
777         (WebKit::InputMethodFilter::setEnabled):
778         (WebKit::InputMethodFilter::setCursorRect):
779         (WebKit::InputMethodFilter::handleKeyboardEvent):
780         (WebKit::InputMethodFilter::handleKeyboardEventWithCompositionResults):
781         (WebKit::InputMethodFilter::filterKeyEvent):
782         (WebKit::InputMethodFilter::confirmComposition):
783         (WebKit::InputMethodFilter::updatePreedit):
784         (WebKit::InputMethodFilter::notifyFocusedIn):
785         (WebKit::InputMethodFilter::notifyFocusedOut):
786         (WebKit::InputMethodFilter::notifyMouseButtonPress):
787         (WebKit::InputMethodFilter::confirmCurrentComposition):
788         (WebKit::InputMethodFilter::cancelContextComposition):
789         (WebKit::InputMethodFilter::sendCompositionAndPreeditWithFakeKeyEvents):
790         (WebKit::InputMethodFilter::handleCommit):
791         (WebKit::InputMethodFilter::handlePreeditStart):
792         (WebKit::InputMethodFilter::handlePreeditChanged):
793         (WebKit::InputMethodFilter::handlePreeditEnd):
794         (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
795         (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
796         (WebKit::InputMethodFilter::logConfirmCompositionForTesting):
797         (WebKit::InputMethodFilter::logSetPreeditForTesting):
798         * UIProcess/gtk/InputMethodFilter.h: Added.
799         (WebKit::InputMethodFilter::context):
800         (WebKit::InputMethodFilter::setPage):
801         (WebKit::InputMethodFilter::setTestingMode):
802         (WebKit::InputMethodFilter::events):
803
804 2014-10-21  Tim Horton  <timothy_horton@apple.com>
805
806         Quick Look preview bubble has unnecessary controls
807         https://bugs.webkit.org/show_bug.cgi?id=137940
808         <rdar://problem/18731860>
809
810         Reviewed by Simon Fraser.
811
812         * UIProcess/API/mac/WKView.mm:
813         (-[WKView _quickLookURLFromActionMenu:]):
814         Temporarily use more SPI to allow us to hide the preview bubble's controls.
815
816 2014-10-21  Jeff Miller  <jeffm@apple.com>
817
818         Remove const from WKURLRequestRef parameter to WKContextDownloadURLRequest()
819         https://bugs.webkit.org/show_bug.cgi?id=137928
820
821         Reviewed by Darin Adler.
822
823         * UIProcess/API/C/WKContext.cpp:
824         (WKContextDownloadURLRequest):
825         * UIProcess/API/C/WKContext.h:
826
827 2014-10-21  Anders Carlsson  <andersca@apple.com>
828
829         WKRemoteObjectCoder should handle floats
830         https://bugs.webkit.org/show_bug.cgi?id=137926
831         <rdar://problem/18695126>
832
833         Reviewed by Beth Dakin.
834
835         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
836         (encodeInvocation):
837         (-[WKRemoteObjectEncoder encodeFloat:forKey:]):
838         (decodeInvocationArguments):
839         (-[WKRemoteObjectDecoder decodeFloatForKey:]):
840
841 2014-10-21  Jeff Miller  <jeffm@apple.com>
842
843         WKContext needs to provide an API to resume a download
844         https://bugs.webkit.org/show_bug.cgi?id=137507
845
846         Reviewed by Darin Adler.
847
848         This patch adds WKContextResumeDownload(), which is only supported on the Mac, and requires the
849         resume data from WKDownloadGetResumeData().
850
851         We have to create a sandbox extension for the partially downloaded file in the UI process so the
852         network or web process can resume writing to it.
853
854         * NetworkProcess/NetworkProcess.cpp:
855         (WebKit::NetworkProcess::resumeDownload):
856         Added, calls through to DownloadManager::resumeDownload().
857
858         * NetworkProcess/NetworkProcess.h:
859         Added resumeDownload().
860
861         * NetworkProcess/NetworkProcess.messages.in:
862         Added ResumeDownload message.
863
864         * Shared/Downloads/Download.h:
865         Added resume().
866
867         * Shared/Downloads/DownloadManager.cpp:
868         (WebKit::DownloadManager::resumeDownload):
869         Added. The URL being downloaded is part of the opaque resumeData, so we can't specify it when the
870         Download is constructed.
871
872         * Shared/Downloads/DownloadManager.h:
873         Added resumeDownload().
874
875         * Shared/Downloads/ios/DownloadIOS.mm:
876         (WebKit::Download::resume):
877         Added, not implemented on this platform.
878
879         * Shared/Downloads/mac/DownloadMac.mm:
880         (WebKit::Download::resume):
881         Added. Consumes the sandbox extension, resumes the download, and sets m_request after the
882         NSURLDownload has been created. Note that we already have code to revoke the sandbox extension when
883         the download is finished, canceled, or fails.
884
885         * Shared/Downloads/soup/DownloadSoup.cpp:
886         (WebKit::Download::resume):
887         Added, not implemented on this platform.
888
889         * UIProcess/API/C/WKContext.cpp:
890         (WKContextResumeDownload):
891         Added.
892
893         * UIProcess/API/C/WKContext.h:
894         Added WKContextResumeDownload().
895
896         * UIProcess/WebContext.cpp:
897         (WebKit::WebContext::resumeDownload):
898         Added. Creates a sandbox extension for the existing file and includes it in the message to the
899         network or web process.
900
901         * UIProcess/WebContext.h:
902         Added resumeDownload().
903
904         * WebProcess/WebProcess.cpp:
905         (WebKit::WebProcess::resumeDownload):
906         Added, calls through to DownloadManager::resumeDownload().
907
908         * WebProcess/WebProcess.h:
909         Added resumeDownload().
910
911         * WebProcess/WebProcess.messages.in:
912         Added ResumeDownload message.
913
914 2014-10-20  Michael Catanzaro  <mcatanzaro@igalia.com>
915
916         Change the default TLS errors policy to WEBKIT_TLS_ERRORS_POLICY_FAIL
917         https://bugs.webkit.org/show_bug.cgi?id=137832
918
919         Reviewed by Carlos Garcia Campos.
920
921         Too many general-purpose browsers that really need this policy
922         are not selecting it, so let's do so for them.
923
924         * UIProcess/API/gtk/WebKitWebContext.cpp:
925         (createDefaultWebContext):
926
927 2014-10-21  Michael Catanzaro  <mcatanzaro@igalia.com>
928
929         [SOUP] Disable SSLv3
930         https://bugs.webkit.org/show_bug.cgi?id=137859
931
932         Reviewed by Carlos Garcia Campos.
933
934         Set G_TLS_GNUTLS_PRIORITY if unset.
935
936         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
937         (main):
938         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
939         (main):
940
941 2014-10-20  Chris Dumez  <cdumez@apple.com>
942
943         ResourceRequest deserialization unnecessarily calls partitionName() on encoded cache partition
944         https://bugs.webkit.org/show_bug.cgi?id=137797
945
946         Reviewed by Darin Adler.
947
948         This patch adds a |needsValidation| argument to
949         ResourceRequest::setCachePartition() setter so that the caller can
950         indicate that the partition name is valid (because it was already
951         processed by partitionName() before). Use this new argument in
952         ArgumentCoder<ResourceRequest>::decode() to spent a bit less time
953         deserializing resource requests.
954
955         * Shared/WebCoreArgumentCoders.cpp:
956         (IPC::ArgumentCoder<ResourceRequest>::decode):
957
958 2014-10-20  Beth Dakin  <bdakin@apple.com>
959
960         Action menu items should have tags
961         https://bugs.webkit.org/show_bug.cgi?id=137898
962
963         Reviewed by Anders Carlsson.
964
965         * Shared/API/c/WKActionMenuItemTypes.h: Added.
966         * UIProcess/API/mac/WKView.mm:
967         (-[WKView _defaultMenuItemsForLink]):
968         * WebKit2.xcodeproj/project.pbxproj:
969
970 2014-10-20  Beth Dakin  <bdakin@apple.com>
971
972         Add support for action menus
973         https://bugs.webkit.org/show_bug.cgi?id=137891
974         rdar://problem/18451638
975         rdar://problem/18694470
976
977         Reviewed by Anders Carlsson.
978
979         Temporary artwork needed for menu item.
980         * Resources/OpenInNewWindowTemplate.pdf: Added.
981         * WebKit2.xcodeproj/project.pbxproj:
982
983         Add a preference that defaults to false for action menu support.
984         * Shared/WebPreferencesDefinitions.h:
985         * UIProcess/API/C/WKPreferences.cpp:
986         (WKPreferencesSetActionMenuSupportEnabled):
987         (WKPreferencesGetActionMenuSupportEnabled):
988         * UIProcess/API/C/WKPreferencesRefPrivate.h:
989
990         New SPI. WebKit clients can implement this method to customize the action menu.
991         * UIProcess/API/Cocoa/WKViewPrivate.h:
992
993         Create the action menu if it is supported.
994         * UIProcess/API/mac/WKView.mm:
995         (-[WKView initWithFrame:context:configuration:webView:]):
996
997         Methods to implement the default menu actions.
998         (-[WKView _openURLFromActionMenu:]):
999         (-[WKView _addToReadingListFromActionMenu:]):
1000         (-[WKView _quickLookURLFromActionMenu:]):
1001
1002         Add action menus support for links. Populate the menu at the right time.
1003         (-[WKView _defaultMenuItemsForLink]):
1004         (-[WKView _defaultMenuItems]):
1005         (-[WKView prepareForMenu:withEvent:]):
1006         (-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]):
1007
1008         New member variable caches the HitTestResult on mouse move.
1009         * UIProcess/WebPageProxy.cpp:
1010         (WebKit::WebPageProxy::mouseDidMoveOverElement):
1011         * UIProcess/WebPageProxy.h:
1012         (WebKit::WebPageProxy::activeActionMenuHitTestResult):
1013
1014 2014-10-20  Timothy Hatcher  <timothy@apple.com>
1015
1016         Web Inspector: Delay and white area when Web Inspector crashes
1017         https://bugs.webkit.org/show_bug.cgi?id=137230
1018
1019         Reviewed by Anders Carlsson.
1020
1021         * UIProcess/WebInspectorProxy.cpp:
1022         (WebKit::processDidCrash): Added.
1023         (WebKit::WebInspectorProxy::eagerlyCreateInspectorPage): Hook up loader client.
1024
1025 2014-10-20  Joseph Pecoraro  <pecoraro@apple.com>
1026
1027         Web Inspector: Generate all Inspector domains together in JavaScriptCore
1028         https://bugs.webkit.org/show_bug.cgi?id=137748
1029
1030         Reviewed by Brian Burg.
1031
1032         * PlatformGTK.cmake:
1033
1034 2014-10-19  Antti Koivisto  <antti@apple.com>
1035
1036         Avoid unnecessary NSURLResponse construction for QuickLook on iOS
1037         https://bugs.webkit.org/show_bug.cgi?id=137876
1038
1039         Reviewed by Andy Estes.
1040
1041         * WebProcess/Network/WebResourceLoader.cpp:
1042         (WebKit::WebResourceLoader::didReceiveResponse):
1043
1044             Switch to the modified QuickLookHandle interface that does not need NSURLResponse.
1045
1046 2014-10-16  Andy Estes  <aestes@apple.com>
1047
1048         [iOS] Capture WKActionSheetAssistant's interaction with WKContentView in a @protocol
1049         https://bugs.webkit.org/show_bug.cgi?id=137792
1050
1051         Reviewed by Tim Horton.
1052
1053         WKPDFView would like to use WKActionSheetAssistant to show an action sheet when long-pressing a link, but it
1054         can't so long as WKActionSheetAssistant is tightly coupled to WKContentView. Resolve this by factoring
1055         WKActionSheetAssistant's interaction with WKContentView into a new protocol called
1056         WKActionSheetAssistantDelegate and having WKContentView conform to this protocol.
1057
1058         * UIProcess/API/Cocoa/_WKElementAction.mm:
1059         (+[_WKElementAction elementActionWithTitle:actionHandler:]): Changed instances of WKContentView * to id <WKActionSheetAssistantDelegate>.
1060         (+[_WKElementAction elementActionWithType:customTitle:]): Ditto.
1061         (-[_WKElementAction _runActionWithElementInfo:delegate:]): Ditto.
1062         (copyElement): Deleted.
1063         (saveImage): Deleted.
1064         (-[_WKElementAction _runActionWithElementInfo:view:]): Deleted.
1065         * UIProcess/API/Cocoa/_WKElementActionInternal.h:
1066         * UIProcess/ios/WKActionSheet.h:
1067         * UIProcess/ios/WKActionSheet.mm:
1068         (-[WKActionSheet init]): Renamed from initWithView: since WKActionSheet no longer needs to know about a view.
1069         (-[WKActionSheet _didRotateAndLayout]): Called -[WKActionSheetDelegate updatePositionInformation].
1070         (-[WKActionSheet initWithView:]): Deleted.
1071         * UIProcess/ios/WKActionSheetAssistant.h:
1072         * UIProcess/ios/WKActionSheetAssistant.mm:
1073         (-[WKActionSheetAssistant delegate]): Added a getter for the delegate property.
1074         (-[WKActionSheetAssistant setDelegate:]): Added a setter for the delegate property.
1075         (-[WKActionSheetAssistant initWithView:]): Changed argument type from WKContentView * to UIView *.
1076         (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]): Returned CGRectZero if there is no delegate.
1077         Otherwise, retrieved positionInformation from the delegate.
1078         (-[WKActionSheetAssistant presentationRectInHostViewForSheet]): Ditto.
1079         (-[WKActionSheetAssistant updatePositionInformation]): Called -[WKActionSheetAssistantDelegate updatePositionInformation].
1080         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]): Returned early if there is no delegate.
1081         Otherwise, retrieved positionInformation from the delegate.
1082         (-[WKActionSheetAssistant showImageSheet]): Ditto.
1083         (-[WKActionSheetAssistant showLinkSheet]): Ditto.
1084         (-[WKActionSheetAssistant showDataDetectorsSheet]): Ditto.
1085         (-[WKActionSheetAssistant cleanupSheet]):
1086         * UIProcess/ios/WKContentViewInteraction.h:
1087         * UIProcess/ios/WKContentViewInteraction.mm:
1088         (-[WKContentView setupInteraction]): Installed self as WKActionSheetAssistant's delegate.
1089         (-[WKContentView updatePositionInformation]): Renamed from _updatePositionInformation.
1090         (-[WKContentView performAction:]): Renamed from _performAction:.
1091         (-[WKContentView openElementAtLocation:]): Called _attemptClickAtLocation:.
1092         (-[WKContentView actionsForElement:defaultActions:]): Called API::UIClient::actionsForElement().
1093         (-[WKContentView startInteractionWithElement:]): Called WebPageProxy::startInteractionWithElementAtPosition().
1094         (-[WKContentView stopInteraction]): Called WebPageProxy::stopInteraction().
1095         (-[WKContentView _updatePositionInformation]): Deleted.
1096         (-[WKContentView _performAction:]): Deleted.
1097
1098 2014-10-20  Carlos Garnacho  <carlosg@gnome.org>
1099
1100         [GTK] Improve zooming gesture positioning
1101         https://bugs.webkit.org/show_bug.cgi?id=137822
1102
1103         Reviewed by Carlos Garcia Campos.
1104
1105         * UIProcess/WebPageProxy.h:
1106         * UIProcess/gtk/GestureController.cpp:
1107         (WebKit::GestureController::ZoomGesture::center):
1108         (WebKit::GestureController::ZoomGesture::begin):
1109         (WebKit::GestureController::ZoomGesture::handleZoom):
1110         (WebKit::GestureController::ZoomGesture::scaleChanged): Calculate
1111         the proper view coordinates for the current offset/scale, based
1112         on the initial gesture center point in document coordinates, and
1113         the current center/scale.
1114         * UIProcess/gtk/GestureController.h:
1115         * UIProcess/gtk/WebPageProxyGtk.cpp:
1116         (WebKit::WebPageProxy::getCenterForZoomGesture): Added. Synchronous
1117         call to retrieve the zoom gesture anchor point, in document coordinates.
1118         * WebProcess/WebPage/WebPage.h:
1119         * WebProcess/WebPage/WebPage.messages.in: Added stub.
1120         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1121         (WebKit::WebPage::getCenterForZoomGesture): Added. Getter for the
1122         translated coordinates used as the anchor point of the zoom gesture.
1123
1124 2014-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1125
1126         [GTK] Remove the factory method from DragAndDropHandler
1127         https://bugs.webkit.org/show_bug.cgi?id=137872
1128
1129         Reviewed by Sergio Villar Senin.
1130
1131         Make the constructor public and use std::make_unique instead.
1132
1133         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1134         (webkitWebViewBaseDragAndDropHandler):
1135         * UIProcess/gtk/DragAndDropHandler.cpp:
1136         (WebKit::DragAndDropHandler::create): Deleted.
1137         * UIProcess/gtk/DragAndDropHandler.h:
1138
1139 2014-10-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1140
1141         [GTK] Add initial gestures support
1142         https://bugs.webkit.org/show_bug.cgi?id=137812
1143
1144         Reviewed by Sergio Villar Senin.
1145
1146         Now that GTK+ has support for gestures, we can use it to handle
1147         touch events and allow to scroll, zoom and tap with the fingers.
1148
1149         * PlatformGTK.cmake: Add new files to compilation.
1150         * UIProcess/API/gtk/PageClientImpl.cpp:
1151         (WebKit::PageClientImpl::doneWithTouchEvent): When the touch event
1152         hasn't been handled by the web process pass it to the
1153         GestureController and only fallback to pointer emulation when the
1154         GestureController doesn't handle the event.
1155         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1156         (webkitWebViewBaseTouchEvent): If the GestureController is
1157         currently processing gestures is because the START touch event was
1158         not handled by the web process, so pass any successive touch
1159         events to the GestureController directly.
1160         (webkitWebViewBaseGestureController): Create the GestureController
1161         on demand and return a reference.
1162         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1163         * UIProcess/gtk/GestureController.cpp: Added.
1164         (WebKit::GestureController::create): Create a GestureController.
1165         (WebKit::GestureController::GestureController): Initialize the
1166         Gesture memebers.
1167         (WebKit::GestureController::handleEvent): Pass the event to the gestures.
1168         (WebKit::GestureController::isProcessingGestures): Whether
1169         Gestures are active.
1170         (WebKit::GestureController::Gesture::Gesture): Base class for gestures.
1171         (WebKit::GestureController::Gesture::isActive): Whether the
1172         gesture is active.
1173         (WebKit::GestureController::Gesture::handleEvent): Pass the event
1174         to the GtkGesture to process it.
1175         (WebKit::GestureController::DragGesture::handleDrag): Send a wheel
1176         event corresponding to the drag gesture to the web process.
1177         (WebKit::GestureController::DragGesture::handleTap): Send move,
1178         press and release events corresponding to a tap gesture to the web process.
1179         (WebKit::GestureController::DragGesture::begin): Start a drag
1180         gesture and schedule a timer to discard tap gesture in case of
1181         long press.
1182         (WebKit::GestureController::DragGesture::update): If the actual
1183         drag hasn't started yet, check the drag threshold to decide
1184         whether to start the drag or not. Otherwise call handleDrag() to
1185         send the appropriate events to the web process.
1186         (WebKit::GestureController::DragGesture::end): If the drag gesture
1187         finishes and the drag didn't happen (it wasn't a long press and
1188         drag threshold was not reached), call handleTap() to emulate a
1189         click event.
1190         (WebKit::GestureController::DragGesture::DragGesture): Initialize
1191         the GtkGestureDrag.
1192         (WebKit::GestureController::ZoomGesture::begin): Save the current
1193         page scale factor and the center point of the gesture.
1194         (WebKit::GestureController::ZoomGesture::scaleChanged): Schedule a
1195         page scale change in an idle for the given scale value.
1196         (WebKit::GestureController::ZoomGesture::ZoomGesture): Initialize
1197         the GtkGestureZoom.
1198         * UIProcess/gtk/GestureController.h: Added.
1199
1200 2014-10-19  Chris Dumez  <cdumez@apple.com>
1201
1202         Use is<>() / downcast<>() for all remaining RenderObject subclasses
1203         https://bugs.webkit.org/show_bug.cgi?id=137845
1204
1205         Reviewed by Darin Adler.
1206
1207         Use is<>() / downcast<>() for all remaining RenderObject subclasses and 
1208         clean up the surrounding code.
1209
1210         * WebProcess/Plugins/PluginView.cpp:
1211         (WebKit::PluginView::pluginProcessCrashed):
1212         * WebProcess/WebPage/WebPage.cpp:
1213         (WebKit::WebPage::createPlugin):
1214
1215 2014-10-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1216
1217         [GTK] Move GtkDragAndDropHelper from Platform to WebKit2
1218         https://bugs.webkit.org/show_bug.cgi?id=137422
1219
1220         Reviewed by Martin Robinson.
1221
1222         WebKitWebViewBase is currently the only user of
1223         GtkDragAndDropHelper, that was added to share the code with
1224         WebKit1. Move all the drag and drop logic to a new class
1225         DragAndDropHandler.
1226
1227         * PlatformGTK.cmake: Add new files to compilation.
1228         * UIProcess/API/gtk/PageClientImpl.cpp:
1229         (WebKit::PageClientImpl::startDrag):
1230         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1231         (webkitWebViewBaseConstructed):
1232         (webkitWebViewBaseDragDataGet):
1233         (webkitWebViewBaseDragEnd):
1234         (webkitWebViewBaseDragDataReceived):
1235         (webkitWebViewBaseDragMotion):
1236         (webkitWebViewBaseDragLeave):
1237         (webkitWebViewBaseDragDrop):
1238         (webkitWebViewBaseDragAndDropHandler):
1239         (dragExitedCallback): Deleted.
1240         (webkitWebViewBaseStartDrag): Deleted.
1241         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1242         * UIProcess/gtk/DragAndDropHandler.cpp: Added.
1243         (WebKit::DragAndDropHandler::create):
1244         (WebKit::DragAndDropHandler::DragAndDropHandler):
1245         (WebKit::DragAndDropHandler::DroppingContext::DroppingContext):
1246         (WebKit::dragOperationToGdkDragActions):
1247         (WebKit::dragOperationToSingleGdkDragAction):
1248         (WebKit::gdkDragActionToDragOperation):
1249         (WebKit::DragAndDropHandler::startDrag):
1250         (WebKit::DragAndDropHandler::fillDragData):
1251         (WebKit::DragAndDropHandler::finishDrag):
1252         (WebKit::DragAndDropHandler::dataObjectForDropData):
1253         (WebKit::DragAndDropHandler::dragEntered):
1254         (WebKit::DragAndDropHandler::requestDragData):
1255         (WebKit::DragAndDropHandler::dragMotion):
1256         (WebKit::DragAndDropHandler::dragLeave):
1257         (WebKit::DragAndDropHandler::drop):
1258         * UIProcess/gtk/DragAndDropHandler.h: Added.
1259
1260 2014-10-18  Dan Bernstein  <mitz@apple.com>
1261
1262         WorkQueue dispatches functions but isn’t a FunctionDispatcher
1263         https://bugs.webkit.org/show_bug.cgi?id=137853
1264
1265         Reviewed by Anders Carlsson.
1266
1267         * Platform/WorkQueue.h: Changed to inherit from FunctionDispatcher.
1268
1269 2014-10-18  Michael Catanzaro  <mcatanzaro@igalia.com>
1270
1271         [GTK] Improve documentation of webkit_web_view_get_tls_info()
1272         https://bugs.webkit.org/show_bug.cgi?id=137852
1273
1274         Reviewed by Martin Robinson.
1275
1276         * UIProcess/API/gtk/WebKitWebView.cpp:
1277
1278 2014-10-17  Chris Dumez  <cdumez@apple.com>
1279
1280         Use is<>() / downcast<>() for RenderBox
1281         https://bugs.webkit.org/show_bug.cgi?id=137804
1282
1283         Reviewed by Andreas Kling.
1284
1285         Use is<>() / downcast<>() for RenderBox and clean up the surrounding
1286         code.
1287
1288         * WebProcess/WebPage/WebPage.cpp:
1289         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
1290         (WebKit::WebPage::plugInIsPrimarySize):
1291         * WebProcess/WebPage/ios/WebPageIOS.mm:
1292         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
1293
1294 2014-10-16  Simon Fraser  <simon.fraser@apple.com>
1295
1296         [iOS] Turn off font autosizing for iOS WebKitTestRunner
1297         https://bugs.webkit.org/show_bug.cgi?id=137806
1298
1299         Reviewed by Sam Weinig.
1300         
1301         Confusingly, WKPreferencesSetTextAutosizingEnabled() does nothing on iOS.
1302         Instead, we have to add WKPreferencesSetMinimumZoomFontSize() and set it to 0
1303         to disable font autosizing.
1304
1305         * UIProcess/API/C/WKPreferences.cpp:
1306         (WKPreferencesSetMinimumZoomFontSize):
1307         (WKPreferencesGetMinimumZoomFontSize):
1308         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1309
1310 2014-10-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1311
1312         [EFL] REGRESSION(r173929): It broke the Web Inspector
1313         https://bugs.webkit.org/show_bug.cgi?id=137522
1314
1315         Reviewed by Csaba Osztrogonác.
1316
1317         r173929 let web inspector use a separate web process. Besides it changed that the inspector is shown
1318         as docking mode by default. However EFL port doesn't support to show web inspector as docking window yet.
1319         This patch is to show web inspector on EFL new window as before. Docking mode should be implemented by
1320         upcoming patch.
1321
1322         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1323         (WebKit::WebInspectorProxy::platformAttach):
1324
1325 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1326
1327         [GLIB] Add API to GMainLoopSource to schedule sources after a delay in microseconds
1328         https://bugs.webkit.org/show_bug.cgi?id=137782
1329
1330         Reviewed by Sergio Villar Senin.
1331
1332         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1333         (WebKit::LayerTreeHostGtk::layerFlushTimerFired): Use microseconds
1334         instead of milliseconds.
1335
1336 2014-10-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1337
1338         [GTK] Move touch events handling from Platform to WebKit2
1339         https://bugs.webkit.org/show_bug.cgi?id=137735
1340
1341         Reviewed by Sergio Villar Senin.
1342
1343         GtkTouchContextHelper was only used by WebKitWebViewBase, since
1344         it's the only one that can create touch events. The code has been
1345         simplified by processing the events in the view, and the native
1346         touch events are now created with the native event and touch points.
1347
1348         * Shared/NativeWebTouchEvent.h:
1349         (WebKit::NativeWebTouchEvent::touchContext): Deleted.
1350         * Shared/gtk/NativeWebTouchEventGtk.cpp:
1351         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent): Pass touch
1352         points instead of touch context to WebEventFactory::createWebTouchEvent().
1353         * Shared/gtk/WebEventFactory.cpp:
1354         (WebKit::WebEventFactory::createWebTouchEvent): Create the
1355         WebTouchEvent for the given native event and points.
1356         (WebKit::touchPhaseFromEvents): Deleted.
1357         (WebKit::appendTouchEvent): Deleted.
1358         * Shared/gtk/WebEventFactory.h:
1359         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1360         (appendTouchEvent): Helper function to create a
1361         WebPlatformTouchPoint for the given native event and add it to the
1362         list of touch points.
1363         (webkitWebViewBaseGetTouchPointForEvent): Build the touch point
1364         list for the event.
1365         (webkitWebViewBaseTouchEvent): Process the touch event.
1366         (webkitWebViewBaseDragDataReceived): Deleted.
1367
1368 2014-10-16  Pascal Jacquemart  <p.jacquemart@samsung.com>
1369
1370         Removing CUSTOM_PROTOCOLS guard
1371         https://bugs.webkit.org/show_bug.cgi?id=137741
1372
1373         Reviewed by Benjamin Poulain.
1374
1375         * NetworkProcess/NetworkProcess.cpp:
1376         (WebKit::NetworkProcess::NetworkProcess):
1377         * Shared/Network/CustomProtocols/Cocoa/CustomProtocolManagerCocoa.mm:
1378         * Shared/Network/CustomProtocols/CustomProtocolManager.h:
1379         * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in:
1380         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.cpp:
1381         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerImpl.h:
1382         * Shared/Network/CustomProtocols/soup/CustomProtocolManagerSoup.cpp:
1383         * Shared/Network/NetworkProcessCreationParameters.cpp:
1384         (WebKit::NetworkProcessCreationParameters::encode):
1385         (WebKit::NetworkProcessCreationParameters::decode):
1386         * Shared/Network/NetworkProcessCreationParameters.h:
1387         * Shared/WebProcessCreationParameters.cpp:
1388         (WebKit::WebProcessCreationParameters::encode):
1389         (WebKit::WebProcessCreationParameters::decode):
1390         * Shared/WebProcessCreationParameters.h:
1391         * UIProcess/API/C/soup/WKAPICastSoup.h:
1392         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.cpp:
1393         (WKSoupCustomProtocolRequestManagerGetTypeID):
1394         (WKSoupCustomProtocolRequestManagerSetClient):
1395         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h:
1396         * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in:
1397         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
1398         * UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
1399         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
1400         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.h:
1401         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
1402         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.h:
1403         * UIProcess/Network/NetworkProcessProxy.cpp:
1404         (WebKit::NetworkProcessProxy::NetworkProcessProxy):
1405         * UIProcess/Network/NetworkProcessProxy.h:
1406         * UIProcess/WebContext.cpp:
1407         (WebKit::WebContext::WebContext):
1408         (WebKit::WebContext::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers):
1409         (WebKit::WebContext::unregisterSchemeForCustomProtocol):
1410         * UIProcess/WebContext.h:
1411         * UIProcess/WebProcessProxy.cpp:
1412         (WebKit::WebProcessProxy::WebProcessProxy):
1413         * UIProcess/WebProcessProxy.h:
1414         * UIProcess/mac/WebContextMac.mm:
1415         (WebKit::WebContext::platformInitializeWebProcess):
1416         (WebKit::WebContext::platformInitializeNetworkProcess):
1417         * WebKit2Prefix.h:
1418         * WebProcess/WebProcess.cpp:
1419         (WebKit::WebProcess::WebProcess):
1420         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
1421         (webkitSoupRequestGenericSendAsync):
1422         (webkitSoupRequestGenericSendFinish):
1423         * WebProcess/soup/WebKitSoupRequestGeneric.h:
1424
1425 2014-10-16  Simon Fraser  <simon.fraser@apple.com>
1426
1427         Crash under RemoteLayerTreeHost::getLayer() when closing a tab
1428         https://bugs.webkit.org/show_bug.cgi?id=137796
1429         rdar://problem/18547565
1430
1431         Reviewed by Tim Horton.
1432         
1433         CA can call our animation delegate after the RemoteLayerTreeHost has been
1434         destroyed. CAAnimation retains its delegate, so it's safe for us to null out
1435         the WKAnimationDelegate's pointer to the RemoteLayerTreeHost when tearing down
1436         the RemoteLayerTreeHost.
1437
1438         * UIProcess/mac/RemoteLayerTreeHost.mm:
1439         (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
1440         (WebKit::RemoteLayerTreeHost::animationDidEnd):
1441         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1442         (-[WKAnimationDelegate invalidate]):
1443         (-[WKAnimationDelegate animationDidStart:]):
1444         (-[WKAnimationDelegate animationDidStop:finished:]):
1445
1446 2014-10-16  Tim Horton  <timothy_horton@apple.com>
1447
1448         Implement selection services menu for Legacy WebKit
1449         https://bugs.webkit.org/show_bug.cgi?id=137582
1450         <rdar://problem/18604241>
1451
1452         Reviewed by Brady Eidson.
1453
1454         * UIProcess/mac/WebContextMenuProxyMac.mm:
1455         (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
1456         Add a note that we should transition to using replaceSelectionWithAttributedString.
1457
1458         * WebProcess/WebPage/mac/WebPageMac.mm:
1459         (WebKit::WebPage::handleSelectionServiceClick):
1460         Allow editor services in editable-but-not-rich-text areas, just like in WebKit1.
1461
1462 2014-10-16  Tim Horton  <timothy_horton@apple.com>
1463
1464         Various crashes in ViewGestureControllerIOS when closing a tab while a swipe gesture is in progress
1465         https://bugs.webkit.org/show_bug.cgi?id=137770
1466         <rdar://problem/17916459>
1467
1468         Reviewed by Dan Bernstein.
1469
1470         When tearing down a WKWebView in the middle of a swipe gesture, a variety of
1471         UI process crashes were observed. First, two uses of potentially deleted objects
1472         (the WebBackForwardListItem and ViewGestureController), which were fixed by
1473         extending the object's lifetime and checking for its liveness, respectively.
1474         Second, a potential null-deref of DrawingArea if the timing of endSwipeGesture
1475         vs. page teardown was such that DrawingArea was null but everything else was in line.
1476         Lastly, another case of messaging a potentially deleted object (specifically,
1477         the _UIViewControllerTransitionContext's animator) in a callback from CA, which
1478         was fixed by nulling out the animator (and a few other properties) when tearing
1479         down the ViewGestureController.
1480
1481         * UIProcess/ios/ViewGestureControllerIOS.mm:
1482         (-[WKSwipeTransitionController invalidate]):
1483         Clear the soon-to-be-invalid ViewGestureController pointer.
1484
1485         (WebKit::ViewGestureController::~ViewGestureController):
1486         Call [WKSwipeTransitionController invalidate] upon destruction.
1487         Clear our transition context's interactor and animator, and inform it that
1488         the transition is not in flight. This avoids a crash when calling back
1489         to the already-destroyed animator later.
1490
1491         (WebKit::ViewGestureController::beginSwipeGesture):
1492         Keep a reference to the target WebBackForwardListItem; this avoids
1493         it being deleted between here and the transition completion block firing.
1494
1495         Look up the ViewGestureController by pageID, just like we do in endSwipeGesture,
1496         to avoid situations where the callback fires after the WKWebView/ViewGestureController
1497         have gone away.
1498
1499         Hold on to our _UIViewControllerOneToOneTransitionContext, so that we can do the
1500         aforementioned clearing upon deallocation.
1501
1502         (WebKit::ViewGestureController::endSwipeGesture):
1503         Null check the DrawingArea. If it is null, instead of doing our normal delayed logic
1504         for swipe snapshot teardown, just put things back together immediately.
1505
1506         (WebKit::ViewGestureController::removeSwipeSnapshot):
1507         Clear m_swipeTransitionContext.
1508
1509 2014-10-16  Antti Koivisto  <antti@apple.com>
1510
1511         REGRESSION (r173356): Downloading a disk image appends ".txt" to it
1512         https://bugs.webkit.org/show_bug.cgi?id=137493
1513         <rdar://problem/18321947>
1514
1515         Reviewed by Alexey Proskuryakov.
1516
1517         * Shared/Downloads/ios/DownloadIOS.mm:
1518         (WebKit::Download::startWithHandle):
1519         * Shared/Downloads/mac/DownloadMac.mm:
1520         (WebKit::Download::startWithHandle):
1521
1522             It appears that the synthesized NS/CFURLResponse fails to serialize the suggested filename correctly
1523             unless it has been accessed first.
1524
1525 2014-10-15  Dan Bernstein  <mitz@apple.com>
1526
1527         [Cocoa] "Plug-in will handle load" error isn't declared in the modern API
1528         https://bugs.webkit.org/show_bug.cgi?id=137747
1529
1530         Reviewed by Anders Carlsson.
1531
1532         * UIProcess/API/Cocoa/WKError.mm: Define _WKLegacyErrorDomain.
1533         * UIProcess/API/Cocoa/WKErrorInternal.h: Changed to import WKErrorPrivate.h.
1534         * UIProcess/API/Cocoa/WKErrorPrivate.h: Added. Declares _WKLegacyErrorDomain
1535         and _WKLegacyErrorPlugInWillHandleLoad.
1536         * WebKit2.xcodeproj/project.pbxproj: Added new private header.
1537
1538 2014-10-15  Chris Dumez  <cdumez@apple.com>
1539
1540         Use is<>() / downcast<>() for TransformOperation subclasses
1541         https://bugs.webkit.org/show_bug.cgi?id=137731
1542
1543         Reviewed by Darin Adler.
1544
1545         Use is<>() / downcast<>() for TransformOperation subclasses and clean
1546         up the surrounding code.
1547
1548         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1549         (IPC::ArgumentCoder<TransformOperations>::encode):
1550
1551 2014-10-15  Alexey Proskuryakov  <ap@apple.com>
1552
1553         [Mac] Allow some Kerberos related paths in sandbox
1554         https://bugs.webkit.org/show_bug.cgi?id=137666
1555         rdar://problem/17965010
1556
1557         Reviewed by Darin Adler.
1558
1559         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1560         * WebProcess/com.apple.WebProcess.sb.in:
1561
1562 2014-10-15  Alexey Proskuryakov  <ap@apple.com>
1563
1564         [Mac] Allow plug-ins to read managed preferences
1565         https://bugs.webkit.org/show_bug.cgi?id=137665
1566         <rdar://problem/18255601>
1567
1568         Reviewed by Darin Adler.
1569
1570         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1571
1572 2014-10-14  Joonghun Park  <jh718.park@samsung.com>
1573
1574         [WK2][EFL] Fix the problem that threads created by a DispatchQueueEfl are not destroyed
1575         even after the DispatchQueueEfl has been destructed
1576         https://bugs.webkit.org/show_bug.cgi?id=137195
1577
1578         Reviewed by Gyuyoung Kim.
1579
1580         Linux and Unix System's pthreads are created in joinable state by default.
1581         If threads aren't destructed explicitly, it will be still live
1582         until process which created the thread is dead.
1583         Besides it may cause out of capacity range of thread creation in a process.
1584         It is one of hidden defects.
1585         This patch calls detachThread() to detach thread immediately after it is created.
1586         So the thread can be destroyed as soon as the thread's ThreadContext::function()
1587         returns.
1588
1589         * Platform/efl/DispatchQueueEfl.cpp:
1590         (DispatchQueue::ThreadContext::start):
1591
1592 2014-10-14  Chris Dumez  <cdumez@apple.com>
1593
1594         Use is<>() / downcast<>() for PlatformCAAnimation subclasses
1595         https://bugs.webkit.org/show_bug.cgi?id=137722
1596
1597         Reviewed by Simon Fraser.
1598
1599         Use is<>() / downcast<>() for PlatformCAAnimation subclasses and clean
1600         up the surrounding code.
1601
1602         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
1603         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
1604         (WebKit::PlatformCAAnimationRemote::copy):
1605         (WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
1606         (WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
1607         (WebKit::PlatformCAAnimationRemote::copyToValueFrom):
1608         (WebKit::PlatformCAAnimationRemote::copyValuesFrom):
1609         (WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
1610         (WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
1611         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1612         (WebKit::PlatformCALayerRemote::addAnimationForKey):
1613         (WebKit::PlatformCALayerRemote::animationStarted):
1614         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1615         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1616         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
1617
1618 2014-10-14  Alexey Proskuryakov  <ap@apple.com>
1619
1620         REGRESSION (r165356): Issues with Japanese text input
1621         https://bugs.webkit.org/show_bug.cgi?id=137719
1622         rdar://problem/18431952
1623         rdar://problem/18483741
1624
1625         Reviewed by Darin Adler.
1626
1627         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection):
1628         In sync code path, ensure consistent message delivery order by adding
1629         a DispatchMessageEvenWhenWaitingForSyncReply flag. This way, delayed
1630         EditorStateChanged messages won't confuse UI process.
1631
1632 2014-10-14  Anders Carlsson  <andersca@apple.com>
1633
1634         Hide the find indicator when starting a swipe
1635         https://bugs.webkit.org/show_bug.cgi?id=137711
1636
1637         Reviewed by Tim Horton.
1638
1639         * UIProcess/mac/PageClientImpl.mm:
1640         (WebKit::PageClientImpl::navigationGestureDidBegin):
1641
1642 2014-10-14  Chris Dumez  <cdumez@apple.com>
1643
1644         Use is<>() / downcast<>() for RenderImage
1645         https://bugs.webkit.org/show_bug.cgi?id=137683
1646
1647         Reviewed by Mihnea Ovidenie.
1648
1649         Use is<>() / downcast<>() for RenderImage.
1650
1651         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1652         (WebKit::cachedImage):
1653         * WebProcess/WebPage/ios/WebPageIOS.mm:
1654         (WebKit::WebPage::performActionOnElement):
1655
1656 2014-10-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1657
1658         [GTK][CMake] Non-ninja build is broken since r174422
1659         https://bugs.webkit.org/show_bug.cgi?id=137656
1660
1661         Reviewed by Philippe Normand.
1662
1663         Make WebKit2-forwarding-headers depend only on static,
1664         non-generated sources.
1665
1666         * CMakeLists.txt:
1667         * PlatformGTK.cmake:
1668
1669 2014-10-13  Chris Dumez  <cdumez@apple.com>
1670
1671         Use is<>() / downcast<>() for PlatformCALayer subclasses
1672         https://bugs.webkit.org/show_bug.cgi?id=137661
1673
1674         Reviewed by Simon Fraser.
1675
1676         Use is<>() / downcast<>() for PlatformCALayer subclasses and clean up 
1677         the surrounding code.
1678
1679         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1680         (WebKit::PlatformCALayerRemote::~PlatformCALayerRemote):
1681         (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
1682         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
1683         (WebKit::PlatformCALayerRemote::setSublayers):
1684         (WebKit::PlatformCALayerRemote::appendSublayer):
1685         (WebKit::PlatformCALayerRemote::insertSublayer):
1686         (WebKit::PlatformCALayerRemote::replaceSublayer):
1687         (WebKit::PlatformCALayerRemote::adoptSublayers):
1688         (WebKit::PlatformCALayerRemote::setMask):
1689         (WebKit::PlatformCALayerRemote::copyFiltersFrom):
1690         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1691         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
1692         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
1693         (WebKit::RemoteLayerTreeContext::buildTransaction):
1694
1695 2014-10-13  Chris Dumez  <cdumez@apple.com>
1696
1697         Use is<>() / downcast<>() for Filter / FilterOperation subclasses
1698         https://bugs.webkit.org/show_bug.cgi?id=137644
1699
1700         Reviewed by Darin Adler.
1701
1702         Use is<>() / downcast<>() for Filter / FilterOperation subclasses.
1703
1704         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1705         (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
1706         * Shared/WebCoreArgumentCoders.cpp:
1707         (IPC::ArgumentCoder<FilterOperation>::encode):
1708         * Shared/mac/RemoteLayerTreeTransaction.mm:
1709         (WebKit::RemoteLayerTreeTextStream::operator<<):
1710
1711 2014-10-12  Sergio Villar Senin  <svillar@igalia.com>
1712
1713         [SOUP] [WK2] WebProcess and NetworkProcess initialization clears cache contents
1714         https://bugs.webkit.org/show_bug.cgi?id=137489
1715
1716         Reviewed by Carlos Garcia Campos.
1717
1718         Temporarily set the SoupCache's maximum size to a huge value
1719         before calling soup_cache_load() so that the cache is not shrinked
1720         to the default value.
1721
1722         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1723         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1724         * WebProcess/soup/WebProcessSoup.cpp:
1725         (WebKit::WebProcess::platformInitializeWebProcess):
1726
1727 2014-10-12  Ryuan Choi  <ryuan.choi@gmail.com>
1728
1729         [EFL] Introduce EWebKit_Extension
1730         https://bugs.webkit.org/show_bug.cgi?id=134921
1731
1732         Reviewed by Gyuyoung Kim.
1733
1734         EWebKit2 does not provide the functionality to extend WebProcess.
1735         Although there is ewk_context_new_with_injected_bundle_path() in ewebkit2 APIs,
1736         application developers can not make bundle object without touching WK APIs
1737         which ewebkit2 does not expose.
1738
1739         This patch introduces EWebKit_Extension, basic structure for the extension of WebProcess.
1740
1741         * PlatformEfl.cmake:
1742         Added files for the EWebKit_Extension and install them properly.
1743         * UIProcess/API/efl/ewk_context.cpp:
1744         (EwkContext::EwkContext):
1745         (bundlePathForExtension):
1746         (EwkContext::create):
1747         (EwkContext::getInjectedBundleInitializationUserData):
1748         (EwkContext::setMessageFromInjectedBundleCallback):
1749         (ewk_context_new_with_extensions_path):
1750         Deleted because ewebkit2 does not have a way to make injected bundle.
1751         Instead, Ewk_Extension will cover the same functionalities.
1752         (ewk_context_new_with_injected_bundle_path): Deleted.
1753         * UIProcess/API/efl/ewk_context.h:
1754         * UIProcess/API/efl/ewk_context_private.h:
1755         (EwkContext::extensionsPath):
1756         * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: Removed.
1757         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
1758         (EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample):
1759         (EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample): Renamed injectedBundleSample to extensionSample.
1760         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
1761         * UIProcess/API/efl/tests/extensions/extension_sample.cpp: Copied from Source/WebKit2/UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp.
1762         * UIProcess/API/efl/tests/test_ewk2_context.cpp: Renamed ewk_context_new_with_injected_bundle_path to ewk_context_new_with_extensions_path.
1763         (TEST_F):
1764         * WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Added.
1765         * WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Added.
1766         (EwkExtension::append):
1767         (EwkExtension::remove):
1768         (ewk_extension_client_add):
1769         (ewk_extension_client_del):
1770         * WebProcess/InjectedBundle/API/efl/ewk_extension.h: Added.
1771         * WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Added.
1772         (EwkExtension::EwkExtension):
1773         (EwkExtension::~EwkExtension):
1774         * WebProcess/efl/ExtensionManagerEfl.cpp: Added.
1775         (WebKit::ExtensionManagerEfl::shared):
1776         (WebKit::ExtensionManagerEfl::ExtensionManagerEfl):
1777         (WebKit::ExtensionManagerEfl::initialize):
1778         * WebProcess/efl/ExtensionManagerEfl.h: Added.
1779         * WebProcess/efl/WebInjectedBundleMainEfl.cpp: Added.
1780         (WKBundleInitialize):
1781         * efl/ewebkit2-extension.pc.in: Added.
1782
1783 2014-10-10  Chris Dumez  <cdumez@apple.com>
1784
1785         Use is<>() / downcast<>() for Image subclasses
1786         https://bugs.webkit.org/show_bug.cgi?id=137625
1787
1788         Reviewed by Andreas Kling.
1789
1790         Use is<>() / downcast<>() for Image subclasses.
1791
1792         * WebProcess/Plugins/PluginView.cpp:
1793         (WebKit::PluginView::pluginSnapshotTimerFired):
1794
1795 2014-10-10  Chris Dumez  <cdumez@apple.com>
1796
1797         Use is<>() / downcast<>() for GraphicsLayer subclasses
1798         https://bugs.webkit.org/show_bug.cgi?id=137595
1799
1800         Reviewed by Darin Adler.
1801
1802         Use is<>() / downcast<>() for GraphicsLayer subclasses and clean up the
1803         surrounding code.
1804
1805         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1806         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1807         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
1808         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1809         (WebKit::TiledCoreAnimationDrawingArea::layerForTransientZoom):
1810         (WebKit::TiledCoreAnimationDrawingArea::shadowLayerForTransientZoom):
1811
1812 2014-10-10  Pascal Jacquemart  <p.jacquemart@samsung.com>
1813
1814         Fix debug build on EFL after r174584
1815         https://bugs.webkit.org/show_bug.cgi?id=137613
1816
1817         Reviewed by Christophe Dumez.
1818
1819         * UIProcess/efl/RequestManagerClientEfl.cpp:
1820         (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
1821
1822 2014-10-10  Chris Dumez  <cdumez@apple.com>
1823
1824         Use is<>() / downcast<>() for RenderBoxModelObject
1825         https://bugs.webkit.org/show_bug.cgi?id=137587
1826
1827         Reviewed by Mihnea Ovidenie.
1828
1829         Use is<>() / downcast<>() for RenderBoxModelObject and clean up the
1830         surrounding code.
1831
1832         * WebProcess/Plugins/PluginView.cpp:
1833         (WebKit::PluginView::renderer):
1834         (WebKit::PluginView::invalidateRect):
1835
1836 2014-10-10  Pascal Jacquemart  <p.jacquemart@samsung.com>
1837
1838         [SOUP] Remove custom URI schemes implementation
1839         https://bugs.webkit.org/show_bug.cgi?id=128169
1840
1841         Reviewed by Carlos Garcia Campos.
1842
1843         * Shared/WebProcessCreationParameters.cpp:
1844         (WebKit::WebProcessCreationParameters::encode):
1845         (WebKit::WebProcessCreationParameters::decode):
1846         * Shared/WebProcessCreationParameters.h:
1847         * UIProcess/API/C/soup/WKAPICastSoup.h:
1848         * UIProcess/API/C/soup/WKContextSoup.cpp: Removed.
1849         * UIProcess/API/C/soup/WKSoupRequestManager.cpp: Removed.
1850         * UIProcess/WebContext.cpp:
1851         (WebKit::WebContext::WebContext):
1852         * UIProcess/WebPageProxy.cpp:
1853         (WebKit::WebPageProxy::didReceiveURIRequest): Deleted.
1854         * UIProcess/WebPageProxy.h:
1855         * UIProcess/WebPageProxy.messages.in:
1856         * UIProcess/soup/WebSoupRequestManagerClient.cpp: Removed.
1857         * UIProcess/soup/WebSoupRequestManagerProxy.cpp: Removed.
1858         * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Removed.
1859         * WebProcess/WebProcess.cpp:
1860         (WebKit::WebProcess::WebProcess):
1861         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
1862         (webkitSoupRequestGenericSendAsync):
1863         (webkitSoupRequestGenericSendFinish):
1864         * WebProcess/soup/WebProcessSoup.cpp:
1865         (WebKit::WebProcess::platformInitializeWebProcess):
1866         * WebProcess/soup/WebSoupRequestManager.cpp: Removed.
1867         * WebProcess/soup/WebSoupRequestManager.messages.in: Removed.
1868
1869 2014-10-09  Dean Jackson  <dino@apple.com>
1870
1871         Remove ENABLE_CSS3_CONDITIONAL_RULES
1872         https://bugs.webkit.org/show_bug.cgi?id=137571
1873
1874         Reviewed by Simon Fraser.
1875
1876         * Configurations/FeatureDefines.xcconfig:
1877
1878 2014-10-09  Tim Horton  <timothy_horton@apple.com>
1879
1880         Move ServicesOverlayController to WebCore
1881         https://bugs.webkit.org/show_bug.cgi?id=137416
1882         <rdar://problem/18546283>
1883
1884         Reviewed by Anders Carlsson.
1885
1886         * Platform/Logging.h:
1887         Move Services logging channel to WebCore.
1888
1889         * WebKit2.xcodeproj/project.pbxproj:
1890         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1891         (WebKit::WebChromeClient::handleTelephoneNumberClick):
1892         (WebKit::WebChromeClient::handleSelectionServiceClick):
1893         (WebKit::WebChromeClient::hasRelevantSelectionServices):
1894         Implement services-related ChromeClient callbacks.
1895         Clicks are forwarded to WebPageMac where they do what they used to;
1896         hasRelevantSelectionServices is implemented as it was when it lived
1897         inside ServicesOverlayController.
1898
1899         * WebProcess/WebCoreSupport/WebChromeClient.h:
1900         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1901         (WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged): Deleted.
1902         (WebKit::WebEditorClient::selectionRectsDidChange): Deleted.
1903         * WebProcess/WebCoreSupport/WebEditorClient.h:
1904         Remove WebEditorClient overrides for now-removed functions.
1905
1906         * WebProcess/WebPage/WebPage.cpp:
1907         (WebKit::WebPage::WebPage):
1908         (WebKit::WebPage::updatePreferences):
1909         Forward serviceControlsEnabled setting to WebCore.
1910
1911         (WebKit::WebPage::servicesOverlayController): Deleted.
1912         * WebProcess/WebPage/WebPage.h:
1913         (WebKit::WebPage::serviceControlsEnabled): Deleted.
1914
1915 2014-10-09  Andy Estes  <aestes@apple.com>
1916
1917         [iOS] Crash in CFURLDownloadClient.didFail if the download has a null resumeData
1918         https://bugs.webkit.org/show_bug.cgi?id=137551
1919
1920         Reviewed by David Kilzer.
1921
1922         CFDataGetBytePtr() and CFDataGetLength() crash if passed a null value.
1923
1924         * Shared/Downloads/ios/DownloadIOS.mm:
1925         (WebKit::setUpDownloadClient):
1926
1927 2014-10-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1928
1929         [X11] Plugin process crashes in NetscapePlugin::platformPostInitialize()
1930         https://bugs.webkit.org/show_bug.cgi?id=137426
1931
1932         Reviewed by Darin Adler.
1933
1934         For some reason flash crashes when NPP_GetValue is called with
1935         NPPVpluginCancelSrcStream, but only in windowed mode. Not calling
1936         NPP_GetValue and unconditionally loading the source URL in the
1937         browser fixes the crash and plugins work normally. We can handle
1938         this particular case with a new quirk.
1939
1940         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1941         (WebKit::NetscapePluginModule::determineQuirks): Add
1942         DoNotCancelSrcStreamInWindowedMode quirk if it's flash plugin.
1943         * Shared/Plugins/PluginQuirks.h: Add
1944         DoNotCancelSrcStreamInWindowedMode quirk.
1945         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1946         (WebKit::NetscapePlugin::shouldLoadSrcURL): Return early if plugin
1947         is windowed and DoNotCancelSrcStreamInWindowedMode quirk is present.
1948
1949 2014-10-09  Chris Dumez  <cdumez@apple.com>
1950
1951         Use is<>() / downcast<>() for Widget subclasses
1952         https://bugs.webkit.org/show_bug.cgi?id=137549
1953
1954         Reviewed by Darin Adler.
1955
1956         Use is<>() / downcast<>() for Widget subclasses and clean up the
1957         surrounding code.
1958
1959         * Shared/WebRenderObject.cpp:
1960         (WebKit::WebRenderObject::WebRenderObject):
1961
1962 2014-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1963
1964         [GTK] Use the PageLoadState observer also to monitor title and estimated load progress
1965         https://bugs.webkit.org/show_bug.cgi?id=136997
1966
1967         Reviewed by Gustavo Noronha Silva.
1968
1969         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1970         (attachLoaderClientToView): Remove implementation of
1971         didReceiveTitleForFrame, didStartProgress, didChangeProgress and
1972         didFinishProgress.
1973         (didReceiveTitleForFrame): Deleted.
1974         (didChangeProgress): Deleted.
1975         * UIProcess/API/gtk/WebKitWebView.cpp:
1976         (webkit_web_view_get_estimated_load_progress): Return the value
1977         directly from the PageLoadState object, since we don't need to
1978         cache the value anymore.
1979         (webkitWebViewSetTitle): Deleted.
1980         (webkitWebViewSetEstimatedLoadProgress): Deleted.
1981         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1982
1983 2014-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1984
1985         Race condition with WebKitWebView:is-loading after starting page load
1986         https://bugs.webkit.org/show_bug.cgi?id=136692
1987
1988         Reviewed by Gustavo Noronha Silva.
1989
1990         Use PageLoadState::Observer to update both is-loading and uri
1991         properties, instead of manually update them. This ensures that our
1992         web view is always in sync with the WebPageProxy so that
1993         webkit_web_view_is_loading() returns true right after requesting
1994         any load. We still need to manually set the is-loading property
1995         only in the case where we delay the emission of the load-changed
1996         signals when waiting for the main resource. The bahaviour is a bit
1997         different but still consistent with what our API documentation says.
1998
1999         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2000         (attachLoaderClientToView): Remove
2001         didSameDocumentNavigationForFrame implementation, since we are
2002         already notified about the URL change by the PageLoadState::Observer.
2003         (didSameDocumentNavigationForFrame): Deleted.
2004         * UIProcess/API/gtk/WebKitWebView.cpp:
2005         (webkitWebViewSetIsLoading): No longer update the URI when
2006         changing the is-loading property.
2007         (webkitWebViewConstructed): Crate a PageLoadStateObserver and add
2008         it to the PageLoadState.
2009         (webkitWebViewDispose): Remove the PageLoadStateObserver from the PageLoadState.
2010         (webkitWebViewEmitLoadChanged): Add isDelayedEvent parameter to
2011         update the is-loading property accordingly when emitting the
2012         delayed events.
2013         (webkitWebViewEmitDelayedLoadEvents): Pass true as isDelayedEvent
2014         parameter of webkitWebViewEmitLoadChanged().
2015         (webkitWebViewLoadChanged): Pass false as isDelayedEvent parameter
2016         of webkitWebViewEmitLoadChanged().
2017         (webkitWebViewLoadFailed):
2018         (webkitWebViewLoadFailedWithTLSErrors):
2019         (webkitWebViewUpdateURI): Deleted.
2020         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2021
2022 2014-10-08  Christophe Dumez  <cdumez@apple.com>
2023
2024         Use is<>() / downcast<>() for RenderBlock objects
2025         https://bugs.webkit.org/show_bug.cgi?id=137512
2026
2027         Reviewed by Darin Adler.
2028
2029         Use is<>() / downcast<>() for RenderBlock objects and clean up the 
2030         surrounding code.
2031
2032         * WebProcess/WebPage/ios/WebPageIOS.mm:
2033         (WebKit::WebPage::rangeForWebSelectionAtPosition):
2034         (WebKit::WebPage::contractedRangeFromHandle):
2035
2036 2014-10-08  Ada Chan  <adachan@apple.com>
2037
2038         Implement WKPageIsPlayingAudio().
2039         https://bugs.webkit.org/show_bug.cgi?id=137048
2040
2041         Reviewed by Darin Adler.
2042
2043         * UIProcess/API/C/WKPage.cpp:
2044         (WKPageIsPlayingAudio):
2045
2046 2014-10-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2047
2048         [EFL][CoordinatedGraphics] All EFL layout tests are broken since r174231
2049         https://bugs.webkit.org/show_bug.cgi?id=137443
2050
2051         Reviewed by Zoltan Herczeg.
2052
2053         EFL layout test and MiniBrowser have broken since r174231. r174231 was to move PageOverlay implementation
2054         from WebKit2 to WebCore with lazy initializing of PageOverlayController. It caused all EFL layout tests
2055         crash and build break. To restore EFL layout test, this patch sets viewOverlayRootLayer through
2056         attachViewOverlayGraphicsLayer() as mac port's one in r174231.
2057
2058         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
2059         (WebKit::CoordinatedDrawingArea::attachViewOverlayGraphicsLayer):
2060         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
2061         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2062         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2063         (WebKit::CoordinatedLayerTreeHost::updateRootLayers):
2064         (WebKit::CoordinatedLayerTreeHost::setViewOverlayRootLayer):
2065         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
2066         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
2067         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2068
2069 2014-10-08  Commit Queue  <commit-queue@webkit.org>
2070
2071         Unreviewed, rolling out r174335.
2072         https://bugs.webkit.org/show_bug.cgi?id=137515
2073
2074         It broke EFL layout test totally (Requested by gyuyoung on
2075         #webkit).
2076
2077         Reverted changeset:
2078
2079         "[EFL] Introduce EWebKit_Extension"
2080         https://bugs.webkit.org/show_bug.cgi?id=134921
2081         http://trac.webkit.org/changeset/174335
2082
2083 2014-10-08  Carlos Garcia Campos  <cgarcia@igalia.com>
2084
2085         [GTK] Make forwarding headers generation depend on source code
2086         https://bugs.webkit.org/show_bug.cgi?id=137394
2087
2088         Reviewed by Philippe Normand.
2089
2090         Only run generate-forwarding-headers.pl when source code changes
2091         and use a different target for the symlinks.
2092
2093         * PlatformGTK.cmake:
2094
2095 2014-10-07  Pascal Jacquemart  <p.jacquemart@samsung.com>
2096
2097         [EFL] Enable custom URI schemes with CustomProtocols
2098         https://bugs.webkit.org/show_bug.cgi?id=128177
2099
2100         Reviewed by Gyuyoung Kim.
2101
2102         Fixing ewk_context_url_scheme_register() ewebkit2 API
2103         rely on r162449 - CustomProtocols implementation from Carlos Garcia Campos
2104
2105         * PlatformEfl.cmake:
2106         * UIProcess/API/efl/ewk_context.h:
2107         * UIProcess/API/efl/ewk_url_scheme_request.cpp:
2108         (EwkUrlSchemeRequest::EwkUrlSchemeRequest):
2109         (EwkUrlSchemeRequest::finish):
2110         * UIProcess/API/efl/ewk_url_scheme_request_private.h:
2111         (EwkUrlSchemeRequest::create):
2112         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2113         (TEST_F):
2114         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManager.cpp:
2115         * UIProcess/efl/RequestManagerClientEfl.cpp:
2116         (WebKit::RequestManagerClientEfl::RequestManagerClientEfl):
2117         (WebKit::RequestManagerClientEfl::startLoading):
2118         (WebKit::RequestManagerClientEfl::stopLoading):
2119         (WebKit::RequestManagerClientEfl::registerURLSchemeHandler):
2120         (WebKit::EwkUrlSchemeHandler::EwkUrlSchemeHandler): Deleted.
2121         (WebKit::RequestManagerClientEfl::didReceiveURIRequest): Deleted.
2122         * UIProcess/efl/RequestManagerClientEfl.h:
2123         * UIProcess/efl/WebContextEfl.cpp:
2124         (WebKit::WebContext::platformInitializeWebProcess):
2125         * UIProcess/soup/WebContextSoup.cpp:
2126         (WebKit::WebContext::platformInitializeNetworkProcess):
2127
2128 2014-10-07  Sungmann Cho  <sungmann.cho@navercorp.com>
2129
2130         Remove WKPageCreateSnapshotOfVisibleContent API.
2131         https://bugs.webkit.org/show_bug.cgi?id=66979
2132
2133         Reviewed by Darin Adler.
2134
2135         After the landing of the first patch of webkit.org/b/66979,
2136         WKPageCreateSnapshotOfVisibleContent API has been neglected for years.
2137         Currently, this is not used anywhere and does not break the nightlies.
2138         So we can remove this.
2139
2140         * UIProcess/API/C/WKPage.cpp:
2141         (WKPageCreateSnapshotOfVisibleContent): Deleted.
2142         * UIProcess/API/C/WKPagePrivate.h:
2143
2144 2014-10-07  Sungmann Cho  <sungmann.cho@navercorp.com>
2145
2146         Remove WKPageSetInvalidMessageFunction.
2147         https://bugs.webkit.org/show_bug.cgi?id=137509
2148
2149         Reviewed by Benjamin Poulain.
2150
2151         According to the FIXME comment in WKPageSetInvalidMessageFunction,
2152         we can remove this function when doing so won't break the nightlies.
2153         Currently, this is not used anywhere and does not break the nightlies.
2154         So we can remove this.
2155
2156         * UIProcess/API/C/WKPage.cpp:
2157         (WKPageSetInvalidMessageFunction): Deleted.
2158         * UIProcess/API/C/WKPagePrivate.h:
2159
2160 2014-10-07  Christophe Dumez  <cdumez@apple.com>
2161
2162         [WK2] Use is<>() / downcast<>() for DrawingArea subclasses
2163         https://bugs.webkit.org/show_bug.cgi?id=137497
2164
2165         Reviewed by Benjamin Poulain.
2166
2167         Use is<>() / downcast<>() for DrawingArea subclasses.
2168
2169         * WebProcess/WebPage/DrawingArea.h:
2170         * WebProcess/WebPage/WebPage.cpp:
2171         (WebKit::WebPage::didCommitLoad):
2172         * WebProcess/WebPage/ios/WebPageIOS.mm:
2173         (WebKit::WebPage::synchronizeDynamicViewportUpdate):
2174         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2175         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2176
2177 2014-10-07  Simon Fraser  <simon.fraser@apple.com>
2178
2179         Roll-over Changelogs.
2180
2181         * ChangeLog-2014-10-07: Copied from Source/WebKit2/ChangeLog.
2182
2183 == Rolled over to ChangeLog-2014-10-07 ==