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