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