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