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