iOS build fix after r176299. This method is not defined in WKViewIOS.mm.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-11-18  Ryosuke Niwa  <rniwa@webkit.org>
2
3         iOS build fix after r176299. This method is not defined in WKViewIOS.mm.
4
5         * UIProcess/API/Cocoa/WKViewPrivate.h:
6
7 2014-11-18  David Kilzer  <ddkilzer@apple.com>
8
9         FeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
10         <http://webkit.org/b/138813>
11
12         Reviewed by Mark Rowe.
13
14         * Configurations/FeatureDefines.xcconfig: Switch to using SDK
15         selectors.
16
17 2014-11-18  Conrad Shultz  <conrad_shultz@apple.com>
18
19         Give clients a way to cancel preview popovers
20         https://bugs.webkit.org/show_bug.cgi?id=138855
21
22         Reviewed by Tim Horton.
23
24         Promote -[WKView _dismissActionMenuPopovers] from internal to private.
25
26         * UIProcess/API/Cocoa/WKViewPrivate.h:
27         * UIProcess/API/mac/WKView.mm:
28         (-[WKView _dismissActionMenuPopovers]):
29         * UIProcess/API/mac/WKViewInternal.h:
30
31 2014-11-18  Chris Dumez  <cdumez@apple.com>
32
33         Add a setting to toggle DOMTimer throttling support
34         https://bugs.webkit.org/show_bug.cgi?id=138844
35         <rdar://problem/19020874>
36
37         Reviewed by Andreas Kling.
38
39         Add a setting to disable DOM timers throttling, in order to help
40         developers determine if a specific issue is caused by timer
41         throttling.
42
43         * Shared/WebPreferencesDefinitions.h:
44         * UIProcess/API/C/WKPreferences.cpp:
45         (WKPreferencesSetDOMTimersThrottlingEnabled):
46         (WKPreferencesGetDOMTimersThrottlingEnabled):
47         * UIProcess/API/C/WKPreferencesRefPrivate.h:
48         * WebProcess/WebPage/WebPage.cpp:
49         (WebKit::WebPage::updatePreferences):
50
51 2014-11-18  Geoffrey Garen  <ggaren@apple.com>
52
53         Removed the custom allocator for ListHashSet nodes
54         https://bugs.webkit.org/show_bug.cgi?id=138841
55
56         Reviewed by Andreas Kling.
57
58         Uses of ListHashSet no longer need to declare an inline capacity,
59         since that was only used to specify the capacity of the custom allocator.
60
61         * UIProcess/Plugins/PluginInfoStore.cpp:
62         (WebKit::PluginInfoStore::loadPluginsIfNecessary):
63
64 2014-11-18  Eric Carlson  <eric.carlson@apple.com>
65
66         Unreviewed build fix after r176283.
67
68         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
69
70 2014-11-18  Tim Horton  <timothy_horton@apple.com>
71
72         Avoid re-encoding action menu image data
73         https://bugs.webkit.org/show_bug.cgi?id=138817
74         <rdar://problem/18840382>
75
76         Reviewed by Anders Carlsson.
77
78         * Shared/mac/ActionMenuHitTestResult.h:
79         * Shared/mac/ActionMenuHitTestResult.mm:
80         (WebKit::ActionMenuHitTestResult::encode):
81         (WebKit::ActionMenuHitTestResult::decode):
82         Store and encode a SharedMemory with the raw encoded image data,
83         instead of re-painting the image into a ShareableBitmap.
84
85         * UIProcess/mac/WKActionMenuController.mm:
86         (-[WKActionMenuController _hitTestResultImage]):
87         (-[WKActionMenuController _defaultMenuItemsForImage]):
88         (-[WKActionMenuController _copyImage:]):
89         (-[WKActionMenuController _addImageToPhotos:]):
90         (-[WKActionMenuController _defaultMenuItems]):
91         (-[WKActionMenuController _canAddMediaToPhotos]): Deleted.
92         Build a temporary filename from a UUID and the image's desired extension.
93         Use the Image's encoded data instead of re-encoding it with CGImageDestination.
94         Build an image menu only if we have an image, URL, data, and extension.
95
96         * WebProcess/WebPage/mac/WebPageMac.mm:
97         (WebKit::WebPage::performActionMenuHitTestAtLocation):
98
99 2014-11-18  Eric Carlson  <eric.carlson@apple.com>
100
101         [iOS] allow host application to opt-out of alternate fullscreen
102         https://bugs.webkit.org/show_bug.cgi?id=138787
103
104         Reviewed by Sam Weinig.
105         
106         "allowsAlternateFullscreen" doesn't need to be in the public WKWebView header.
107
108         * UIProcess/API/Cocoa/WKWebView.mm:
109         (-[WKWebView initWithFrame:configuration:]): allowsAlternateFullscreen -> _allowsAlternateFullscreen.
110
111         * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Remove allowsAlternateFullscreen.
112         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
113         (-[WKWebViewConfiguration _allowsAlternateFullscreen]): New.
114         (-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]): New.
115
116         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declare _allowsAlternateFullscreen.
117
118 2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>
119
120         Subclass CachedFont for SVG fonts
121         https://bugs.webkit.org/show_bug.cgi?id=138686
122
123         Reviewed by Simon Fraser.
124
125         Re-landing due to flakey bots.
126
127         Update for enum type.
128
129         * WebProcess/Network/WebResourceLoadScheduler.cpp:
130         (WebKit::maximumBufferingTime):
131
132 2014-11-18  Chris Dumez  <cdumez@apple.com>
133
134         Update the Vector API to deal with unsigned types instead of size_t
135         https://bugs.webkit.org/show_bug.cgi?id=138824
136
137         Reviewed by Andreas Kling.
138
139         Update code base to fix build errors related to the typing changes
140         in the Vector API (size_t -> unsigned).
141
142         * Platform/IPC/ArgumentCoders.h:
143         * Platform/IPC/DataReference.h:
144
145 2014-11-18  Commit Queue  <commit-queue@webkit.org>
146
147         Unreviewed, rolling out r176264.
148         https://bugs.webkit.org/show_bug.cgi?id=138837
149
150         caused many test failures (Requested by litherum on #webkit).
151
152         Reverted changeset:
153
154         "Subclass CachedFont for SVG fonts"
155         https://bugs.webkit.org/show_bug.cgi?id=138686
156         http://trac.webkit.org/changeset/176264
157
158 2014-11-18  Daniel Bates  <dabates@apple.com>
159
160         [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
161         SPI are not available in public SDK
162         https://bugs.webkit.org/show_bug.cgi?id=138802
163
164         Reviewed by David Kilzer.
165
166         Include headers DispatchSPI.h and MachVMSPI.h.h instead of including
167         libdispatch and Mach headers directly.
168
169         * Platform/mac/SharedMemoryMac.cpp:
170         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
171
172 2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>
173
174         Subclass CachedFont for SVG fonts
175         https://bugs.webkit.org/show_bug.cgi?id=138686
176
177         Reviewed by Simon Fraser.
178
179         Update for enum type.
180
181         * WebProcess/Network/WebResourceLoadScheduler.cpp:
182         (WebKit::maximumBufferingTime):
183
184 2014-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
185
186         [GTK] Add API to create a WebKitWebContext
187         https://bugs.webkit.org/show_bug.cgi?id=138826
188
189         Reviewed by Gustavo Noronha Silva.
190
191         We have always used a default web context without providing API to
192         create others. The main reason was that nobody requested it and we
193         haven't needed it either. The main problem of the default web
194         context is that you can't configure anything during
195         construction. This hasn't been a problem so far because all the
196         web context configuration we expose in the API can be configured
197         after construction. But now we need to expose API to allow the
198         user to configure the local storage directory, which is a
199         construct only configuration. The default web context was also a
200         problem for our unit tests, because sharing the same context made
201         it difficult to ensure tests cases are independent to each other.
202
203         * UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
204         (WebKitGeolocationProvider::~WebKitGeolocationProvider): Reset the
205         provider to avoid crashes when web context is destroyed and a new
206         one is created.
207         * UIProcess/API/gtk/WebKitWebContext.cpp:
208         (webkitWebContextConstructed): Add constructed implementation to
209         create the WebContext and initialize it.
210         (webkitWebContextDispose): Detach web context clients to avoid
211         crashes when a client callback is called on a disposed WebKitWebContext.
212         (webkit_web_context_class_init): Initialize gettext, add
213         constructed implementation and add the pointer to the vmethods
214         when creating signals.
215         (createDefaultWebContext): Simply create a WebKitWebContext.
216         (webkit_web_context_new): New public method to create a WebKitWebContext.
217         (injectedBundleFilename): Deleted.
218         * UIProcess/API/gtk/WebKitWebContext.h: Add virtual methods for
219         signals, so that users can inherit from WebKitWebContext and
220         override the virtual methods.
221         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
222
223 2014-11-18  Carlos Alberto Lopez Perez  <clopez@igalia.com>
224
225         [SOUP] [GnuTLS] Don't use a SSL3.0 record version in client hello.
226         https://bugs.webkit.org/show_bug.cgi?id=138794
227
228         Reviewed by Sergio Villar Senin.
229
230         It seems that following POODLE many sites incorrectly banned SSL 3.0
231         record packet versions. Since GnuTLS uses a SSL 3.0 record to
232         advertise TLS 1.2, they are effectively banning it even if it doesn't
233         advertise SSL 3.0. That is a server issue, but it can be worked around
234         by using the modifier %LATEST_RECORD_VERSION.
235
236         With this modifier, GnuTLS will use the latest TLS version record
237         in client hello instead of using the default SSL 3.0.
238
239         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
240         (main):
241         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
242         (main):
243
244 2014-11-17  Conrad Shultz  <conrad_shultz@apple.com>
245
246         Page previews should be loaded sooner
247         https://bugs.webkit.org/show_bug.cgi?id=138814
248
249         Reviewed by Tim Horton.
250
251         * UIProcess/mac/WKActionMenuController.mm:
252         (-[WKActionMenuController willOpenMenu:withEvent:]):
253         Send -_createPreviewPopover..
254         (-[WKActionMenuController _previewURLFromActionMenu:]):
255         Relocate some logic to the new -_createPreviewPopover; gate early return on popover visibility.
256         (-[WKActionMenuController _createPreviewPopover]):
257         Renamed from -_createPreviewPopoverForURL:originRect:; explicitly send -loadView to warm up the preview view.
258         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]): Deleted.
259
260 2014-11-17  Beth Dakin  <bdakin@apple.com>
261
262         Preview is sometimes dismissed too early
263         https://bugs.webkit.org/show_bug.cgi?id=138811
264         -and corresponding-
265         rdar://problem/18900839
266
267         Reviewed by Tim Horton.
268
269         Don’t make the popover transient until didCloseMenu: time.
270         * UIProcess/mac/WKActionMenuController.mm:
271         (-[WKActionMenuController didCloseMenu:withEvent:]):
272         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
273
274 2014-11-17  Daniel Bates  <dabates@apple.com>
275
276         Unreviewed, rolling out r176232.
277
278         Broke the Mac build. Will investigate offline.
279
280         Reverted changeset:
281
282         "[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions,
283         MobileGestalt"
284         https://bugs.webkit.org/show_bug.cgi?id=138802
285         http://trac.webkit.org/changeset/176232
286
287 2014-11-17  Daniel Bates  <dabates@apple.com>
288
289         [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
290         SPI are not available in public SDK
291         https://bugs.webkit.org/show_bug.cgi?id=138802
292
293         Reviewed by David Kilzer.
294
295         Include headers DispatchSPI.h and MachVMSPI.h.h instead of including
296         libdispatch and Mach headers directly.
297
298         * Platform/mac/SharedMemoryMac.cpp:
299         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
300
301 2014-11-17  Daniel Bates  <dabates@apple.com>
302
303         [iOS] CoreText and CoreUI SPI are not available in public SDK
304         https://bugs.webkit.org/show_bug.cgi?id=138760
305
306         Reviewed by David Kilzer.
307
308         Include header CoreTextSPI.h instead of including CoreText private headers.
309
310         * WebProcess/WebPage/WebPage.cpp:
311
312 2014-11-17  Tim Horton  <timothy_horton@apple.com>
313
314         DataDetectors PageOverlay callbacks can come in to the wrong overlay
315         https://bugs.webkit.org/show_bug.cgi?id=138801
316         <rdar://problem/18991369>
317
318         Reviewed by Anders Carlsson.
319
320         We can call dataDetectorsDidHideUI on the wrong (or no) PageOverlay,
321         because it's possible to have another performActionMenuHitTestAtLocation
322         between the first one and the dataDetectorsDid*UI that correspond to it.
323
324         To make sure that the callbacks come to the right PageOverlay, plumb
325         an integer ID through all of the callbacks and find the overlay based on that.
326
327         * Shared/mac/ActionMenuHitTestResult.h:
328         Store the ID of the PageOverlay that overrode data detection.
329
330         * UIProcess/mac/WKActionMenuController.mm:
331         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
332         Send the ID back to the Web process when replying from DD callbacks.
333
334         * WebProcess/WebPage/WebPage.h:
335         * WebProcess/WebPage/WebPage.messages.in:
336         * WebProcess/WebPage/mac/WebPageMac.mm:
337         (WebKit::WebPage::performActionMenuHitTestAtLocation):
338         Store the ID of the PageOverlay that overrode data detection instead of
339         keeping the PageOverlay itself.
340
341         (WebKit::WebPage::dataDetectorsDidPresentUI):
342         (WebKit::WebPage::dataDetectorsDidChangeUI):
343         (WebKit::WebPage::dataDetectorsDidHideUI):
344         Find and reply to the correct page overlay.
345
346 2014-11-17  Beth Dakin  <bdakin@apple.com>
347
348         Whitespace action menus should focus the HitTestResult and create an insertion 
349         point
350         https://bugs.webkit.org/show_bug.cgi?id=138786
351         -and corresponding-
352         rdar://problem/18944893
353
354         Reviewed by Tim Horton.
355
356         Whitespace menus should cause the HitTestResult to be focused, and they should set 
357         the selection based on the HitTest location.
358         * UIProcess/WebPageProxy.cpp:
359         (WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult):
360         * UIProcess/WebPageProxy.h:
361         * UIProcess/mac/WKActionMenuController.mm:
362         (-[WKActionMenuController isMenuForTextContent]):
363         (-[WKActionMenuController willOpenMenu:withEvent:]):
364         * WebProcess/WebPage/WebPage.h:
365         * WebProcess/WebPage/WebPage.messages.in:
366         * WebProcess/WebPage/mac/WebPageMac.mm:
367         (WebKit::WebPage::performActionMenuHitTestAtLocation):
368         (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):
369
370 2014-11-17  Daniel Bates  <dabates@apple.com>
371
372         [iOS] AVKit and MediaPlayer SPI are not available in public SDK
373         https://bugs.webkit.org/show_bug.cgi?id=138756
374
375         Reviewed by Eric Carlson.
376
377         Include header MPAVRoutingControllerSPI.h instead of including the
378         private header MPAVRoutingController.h.
379
380         Additionally, sort the list of #import directives.
381
382         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
383
384 2014-11-17  Daniel Bates  <dabates@apple.com>
385
386         [iOS] QuartzCore SPI not available in public SDK
387         https://bugs.webkit.org/show_bug.cgi?id=138751
388
389         Reviewed by David Kilzer.
390
391         * Shared/mac/RemoteLayerBackingStore.mm: Move CALayer forward declaration
392         from this file to file QuartzCoreSPI.h and include header QuartzCoreSPI.h.
393         * Shared/mac/RemoteLayerTreePropertyApplier.mm: Ditto.
394         * UIProcess/API/Cocoa/WKWebView.mm: Include header QuartzCoreSPI.h instead
395         of including QuartzCore headers directly.
396         * UIProcess/ios/ViewGestureControllerIOS.mm: Ditto.
397         * UIProcess/ios/WKContentView.mm: Ditto.
398         * UIProcess/ios/WKPDFPageNumberIndicator.mm: Ditto.
399         * UIProcess/mac/ViewGestureControllerMac.mm: Move CAFilter forward declarations
400         from this file to fileQuartzCoreSPI.h and include header QuartzCoreSPI.h.
401         Also sort the list of #import directives.
402         * UIProcess/mac/ViewSnapshotStore.mm: Include header QuartzCoreSPI.h
403         instead of including QuartzCore headers directly.
404
405 2014-11-17  Eric Carlson  <eric.carlson@apple.com>
406
407         [iOS] allow host application to opt-out of alternate fullscreen
408         https://bugs.webkit.org/show_bug.cgi?id=138787
409
410         Reviewed by Darin Adler.
411
412         * Shared/WebPreferencesDefinitions.h:
413         * UIProcess/API/C/WKPreferences.cpp:
414         (WKPreferencesSetAllowsAlternateFullscreen):
415         (WKPreferencesGetAllowsAlternateFullscreen):
416         * UIProcess/API/C/WKPreferencesRefPrivate.h:
417         * UIProcess/API/Cocoa/WKWebView.mm:
418         (-[WKWebView initWithFrame:configuration:]):
419         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
420         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
421         (-[WKWebViewConfiguration init]):
422         (-[WKWebViewConfiguration copyWithZone:]):
423         * WebProcess/WebPage/WebPage.cpp:
424         (WebKit::WebPage::updatePreferences):
425
426 2014-11-16  Benjamin Poulain  <bpoulain@apple.com>
427
428         Start cleaning up minimal UI from WKWebView
429         https://bugs.webkit.org/show_bug.cgi?id=138725
430
431         Reviewed by Sam Weinig.
432
433         Start removing the old update path for minimumLayoutSize/maximumUnobscuredSize.
434
435         Unfortunately, I cannot remove everything yet because the clients still did not have
436         alternatives to [_overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride]
437         and might change the minimal UI options.
438
439         This patch adds [_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride] to move
440         in the right direction. Next we'll udpate the client code and get rid of all the useless code.
441
442         * UIProcess/API/Cocoa/WKWebView.mm:
443         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
444         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
445         (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]): Deleted.
446         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
447
448 2014-11-16  Zan Dobersek  <zdobersek@igalia.com>
449
450         [TexMap] Add typecasting support for GraphicsLayerTextureMapper
451         https://bugs.webkit.org/show_bug.cgi?id=138741
452
453         Reviewed by Martin Robinson.
454
455         Replace uses of toTextureMapperLayer() with downcasting and
456         calling the GraphicsLayerTextureMapper::layer() method.
457
458         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
459         (WebKit::LayerTreeHostGtk::initialize):
460         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
461         (WebKit::LayerTreeHostGtk::compositeLayersToContext):
462
463 2014-11-16  Tim Horton  <timothy_horton@apple.com>
464
465         Use TextIndicator instead of the built in Lookup highlight
466         https://bugs.webkit.org/show_bug.cgi?id=138775
467         <rdar://problem/18953982>
468
469         Follow-up to r176164.
470
471         * UIProcess/API/mac/WKView.mm:
472         (-[WKView dealloc]):
473         (-[WKView initWithFrame:context:configuration:webView:]):
474         * UIProcess/mac/PageClientImpl.mm:
475         (WebKit::PageClientImpl::didPerformDictionaryLookup):
476         Include the softlinking macros directly in the files they're used
477         in, as they're supposed to be used.
478
479 2014-11-16  Tim Horton  <timothy_horton@apple.com>
480
481         Use TextIndicator instead of the built in Lookup highlight
482         https://bugs.webkit.org/show_bug.cgi?id=138775
483         <rdar://problem/18953982>
484
485         Reviewed by Anders Carlsson.
486
487         In order to make the yellow highlight for Lookup more accurately match the
488         painted content of the web page (in light of e.g. Web fonts, and interesting
489         text features that only WebKit implements and cannot round-trip through
490         NSAttributedString), use a TextIndicator instead of the built-in Lookup
491         highlight where possible.
492
493         * Configurations/BaseTarget.xcconfig:
494         Make it possible to include headers from private frameworks. This matches WebCore.
495
496         * Shared/DictionaryPopupInfo.cpp:
497         (WebKit::DictionaryPopupInfo::encode):
498         (WebKit::DictionaryPopupInfo::decode):
499         * Shared/DictionaryPopupInfo.h:
500         Include the attributed string inside the DictionaryPopupInfo, instead of
501         as a secondary argument to DidPerformDictionaryLookup.
502         Add a TextIndicator to DictionaryPopupInfo, which can be used to highlight
503         the text in the UI process.
504
505         * UIProcess/API/mac/WKView.mm:
506         (-[WKView dealloc]):
507         (-[WKView viewDidMoveToWindow]):
508         (-[WKView _dictionaryLookupPopoverWillClose:]):
509         (-[WKView _setTextIndicator:fadeOut:animate:animationCompletionHandler:]):
510         (-[WKView _setTextIndicator:fadeOut:animate:]):
511         (-[WKView initWithFrame:context:configuration:webView:]):
512         (+[WKView hideWordDefinitionWindow]):
513         * UIProcess/API/mac/WKViewInternal.h:
514         Adopt the Lookup SPI header.
515         If we have the requisite API, register the notification that Lookup sends
516         when the popover closes, and hook that up to hide the text indicator.
517         Add a version of _setTextIndicator: that takes an animation completion handler.
518
519         * UIProcess/PageClient.h:
520         * UIProcess/WebPageProxy.h:
521         * UIProcess/WebPageProxy.messages.in:
522         * UIProcess/ios/WebPageProxyIOS.mm:
523         (WebKit::WebPageProxy::didPerformDictionaryLookup):
524         * UIProcess/mac/WebPageProxyMac.mm:
525         (WebKit::WebPageProxy::didPerformDictionaryLookup):
526         Adjust to the new didPerformDictionaryLookup signature.
527
528         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
529         (InitWebCoreSystemInterface):
530         Remove a WKSI import.
531
532         * UIProcess/mac/PageClientImpl.h:
533         * UIProcess/mac/PageClientImpl.mm:
534         (WebKit::PageClientImpl::didPerformDictionaryLookup):
535         If we have the requisite API, disable Lookup's built-in highlight and
536         present a TextIndicator instead.
537         We currently have to run the animations serially (first bounce the TextIndicator,
538         then animate in the Lookup popover) because the act of adding the Lookup popover
539         blocks us from getting any animation events for the TextIndicator, and breaks
540         the bounce. We could also fix this by using a threaded animation for the TextIndicator,
541         but it's not clear that it's safe to do so.
542
543         (WebKit::PageClientImpl::dismissDictionaryLookupPanel):
544         When explicitly dismissing the Lookup panel, also hide the text indicator.
545
546         * UIProcess/mac/TextIndicatorWindow.h:
547         * UIProcess/mac/TextIndicatorWindow.mm:
548         (WebKit::TextIndicatorWindow::setTextIndicator):
549         Store the completion handler.
550
551         (WebKit::TextIndicatorWindow::bounceAnimationDidEnd):
552         Call the completion handler when the animation completes.
553
554         * UIProcess/mac/WKActionMenuController.mm:
555         (-[WKActionMenuController _createActionMenuItemForTag:]):
556         Disable the Lookup item if lookup is not available.
557
558         * WebProcess/Plugins/PDF/PDFPlugin.mm:
559         (WebKit::PDFPlugin::showDefinitionForAttributedString):
560         Adjust to the new didPerformDictionaryLookup signature.
561         Since PDFPlugin can't trivially repaint the required part of the PDF,
562         we don't build a TextIndicator. This will result in PDFPlugin continuing
563         to use Lookup's built-in highlight.
564         
565         * WebProcess/WebPage/mac/WebPageMac.mm:
566         (WebKit::WebPage::performDictionaryLookupForRange):
567         Build a TextIndicator from the Lookup range and pass it along with
568         the DictionaryPopupInfo.
569
570 2014-11-15  David Kilzer  <ddkilzer@apple.com>
571
572         REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore
573
574         This regressed with the following commit:
575
576             Move DataDetectors scanning code to WebCore
577             https://bugs.webkit.org/show_bug.cgi?id=138731
578             <rdar://problem/18877535>
579
580         * Shared/mac/ActionMenuHitTestResult.mm: Add PLATFORM(MAC) check
581         around the entire implementation since it it unused on iOS.
582
583 2014-11-14  Anders Carlsson  <andersca@apple.com>
584
585         Raise an exception if -[WKWebView initWithFrame:configuration:] is passed a nil configuration
586         https://bugs.webkit.org/show_bug.cgi?id=138757
587
588         Reviewed by Simon Fraser.
589
590         * UIProcess/API/Cocoa/WKWebView.mm:
591         (-[WKWebView initWithFrame:configuration:]):
592
593 2014-11-15  Carlos Garcia Campos  <cgarcia@igalia.com>
594
595         Network process crash when running http/tests/appcache/fallback.html
596         https://bugs.webkit.org/show_bug.cgi?id=138740
597
598         Reviewed by Alexey Proskuryakov.
599
600         It happens because ResourceHandle::continueWillSendRequest() is
601         called with a null request. We could handle that case in the
602         ResourceHandle, but the thing is tha the behaviour is
603         not the same for async loads, or when loading in the web
604         process. In WebResourceLoader::willSendRequest(),
605         ResourceRequest::willSendRequest() is called, and cancels the load
606         if the client returns a null request. In this case, the
607         ResourceLoader is detached and WebResourceLoader::willSendRequest()
608         returns early without sending the ContinueWillSendRequest message
609         to the network process. However, for synchronous loads,
610         NetworkResourceLoader::continueWillSendRequest() is always called.
611
612         Fixes http/tests/appcache/fallback.html for GTK port when using
613         the network process.
614
615         * NetworkProcess/NetworkResourceLoader.cpp:
616         (WebKit::NetworkResourceLoader::continueWillSendRequest): Do not
617         call ResourceHandle::continueWillSendRequest() if the client
618         request is null, since the load is going to be cancelled.
619
620 2014-11-15  Tim Horton  <timothy_horton@apple.com>
621
622         Implement data detectors and mailto action menus for WebKit1
623         https://bugs.webkit.org/show_bug.cgi?id=138765
624         <rdar://problem/18877535>
625
626         Reviewed by Beth Dakin.
627
628         * UIProcess/mac/WKActionMenuController.mm:
629         (-[WKActionMenuController _defaultMenuItemsForMailtoLink]):
630
631 2014-11-14  Tim Horton  <timothy_horton@apple.com>
632
633         Remove pre-[DDActionContext contextForView:...] fallback path
634         https://bugs.webkit.org/show_bug.cgi?id=138735
635         <rdar://problem/18982046>
636
637         Reviewed by Simon Fraser.
638
639         * UIProcess/mac/WKActionMenuController.mm:
640         (-[WKActionMenuController willOpenMenu:withEvent:]):
641         (-[WKActionMenuController didCloseMenu:withEvent:]):
642         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
643         (hasDataDetectorsCompletionAPI): Deleted.
644         Remove the now-unnecessary fallback path.
645
646 2014-11-14  Tim Horton  <timothy_horton@apple.com>
647
648         Frequent crashes under actionContextForResultAtPoint
649         https://bugs.webkit.org/show_bug.cgi?id=138761
650         <rdar://problem/18990684>
651
652         Reviewed by Dean Jackson.
653
654         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
655         (PageOverlayClientImpl::actionContextForResultAtPoint):
656         Initialize apiRange.
657
658 2014-11-14  Daniel Bates  <dabates@apple.com>
659
660         [iOS] CoreGraphics SPI not available in public SDK
661         https://bugs.webkit.org/show_bug.cgi?id=138709
662
663         Reviewed by David Kilzer.
664
665         Include header CoreGraphicsSPI.h instead of including headers of
666         CoreGraphics directly.
667
668         * UIProcess/API/Cocoa/WKWebView.mm:
669         * UIProcess/ios/WKScrollView.mm:
670
671 2014-11-14  Tim Horton  <timothy_horton@apple.com>
672
673         Move DataDetectors scanning code to WebCore
674         https://bugs.webkit.org/show_bug.cgi?id=138731
675         <rdar://problem/18877535>
676
677         Reviewed by Anders Carlsson.
678
679         Move DataDetectors scanning code to WebCore, so that both WebKits can use it.
680
681         * Shared/TextIndicator.cpp:
682         (WebKit::TextIndicator::createWithRange):
683         Move createWithRange in from WebPageMac's textIndicatorForRange.
684
685         (WebKit::TextIndicator::createWithSelectionInFrame):
686         * Shared/TextIndicator.h:
687         * WebProcess/WebPage/WebFrame.cpp:
688         (WebKit::WebFrame::createSelectionSnapshot):
689         * WebProcess/WebPage/WebFrame.h:
690         Constify some things.
691
692         * WebProcess/WebPage/mac/WebPageMac.mm:
693         (WebKit::WebPage::performActionMenuHitTestAtLocation):
694         Avoid using the DD result if it didn't come with a non-null Range.
695         Make use of detectItemAroundHitTestResult and TextIndicator::createWithRange.
696
697         (WebKit::scanForDataDetectedItems): Deleted.
698         (WebKit::textIndicatorForRange): Deleted.
699         Moved these two to other places.
700
701 2014-11-14  Dan Bernstein  <mitz@apple.com>
702
703         <rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
704         https://bugs.webkit.org/show_bug.cgi?id=138753
705
706         Reviewed by Tim Horton.
707
708         Rather than having the UI process record a snapshot jut before the Web Content process’s
709         notion of its current back/forward list item changes, have the UI process record a snapshot
710         right before its own current back/forward list item changes. This ensures that the right
711         snapshot gets attached to the right item in the UI process.
712
713         * UIProcess/WebBackForwardList.cpp:
714         (WebKit::WebBackForwardList::addItem): If there is a current item, record a navigation
715         snapshot of it before making the new item current.
716         (WebKit::WebBackForwardList::goToItem): If there is a current item, record a navigation
717         snapshot of it before making another item current.
718
719         * UIProcess/WebPageProxy.cpp:
720         (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame): Deleted.
721         * UIProcess/WebPageProxy.h:
722
723         * UIProcess/WebPageProxy.messages.in: Removed willChangeCurrentHistoryItemForMainFrame
724         message.
725
726         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
727         (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
728         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Removed declaration of
729         willChangeCurrentHistoryItem override.
730
731         * WebProcess/WebPage/WebPage.cpp:
732         (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame): Deleted.
733         * WebProcess/WebPage/WebPage.h:
734
735 2014-11-14  Dan Bernstein  <mitz@apple.com>
736
737         Add some tracing to help investigating <rdar://problem/18905383> [iOS] Crash due to null m_webPageProxyForBackForwardListForCurrentSwipe in ViewGestureController::endSwipeGesture
738         https://bugs.webkit.org/show_bug.cgi?id=138750
739
740         Reviewed by Tim Horton.
741
742         Emit trace messages at various points, and log them prior to crashing if the error condition
743         occurs. Otherwise, clear the trace messages.
744
745         * UIProcess/ios/ViewGestureControllerIOS.mm:
746         (WebKit::addLogEntry): Helper function that adds a message, including a time stamp and a
747         backtrace, to m_logEntries.
748         (WebKit::dumpLogEntries): Helper function that logs everything in m_logEntries.
749         (WebKit::ViewGestureController::beginSwipeGesture): Add a log entry.
750         (WebKit::ViewGestureController::endSwipeGesture): If
751         m_webPageProxyForBackForwardListForCurrentSwipe is null, dump the log entries just before
752         crashing. Otherwise, clear m_logEntries.
753         (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree): Add a log entry.
754         (WebKit::ViewGestureController::removeSwipeSnapshot): Add a log entry.
755         * UIProcess/mac/ViewGestureController.h: Defined ENABLE_VIEW_GESTURE_CONTROLLER_TRACING,
756         and added m_logEntries member variable.
757
758 2014-11-14  Beth Dakin  <bdakin@apple.com>
759
760         URLs for some videos are not valid URLs, should not be exposed to action menu
761         https://bugs.webkit.org/show_bug.cgi?id=138746
762         -and corresponding-
763         rdar://problem/18941927
764
765         Reviewed by Tim Horton.
766
767         If the video cannot be downloaded, that is also an indication that the URL of the 
768         video will not be valid on its own. In these cases, we should share or copy the 
769         main page’s URL.
770         * UIProcess/mac/WKActionMenuController.mm:
771         (-[WKActionMenuController _defaultMenuItemsForVideo]):
772         (-[WKActionMenuController _copyVideoURL:]):
773
774 2014-11-14  Carlos Garcia Campos  <cgarcia@igalia.com>
775
776         [SOUP] Encode/Decode allowCookies in ResourceRequest
777         https://bugs.webkit.org/show_bug.cgi?id=138730
778
779         Reviewed by Sergio Villar Senin.
780
781         We are not sending this information to the network process, making
782         cookies always available. Fixes
783         http/tests/xmlhttprequest/cross-origin-no-authorization.html when
784         network process is enabled.
785
786         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
787         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
788         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
789
790 2014-11-14  Zan Dobersek  <zdobersek@igalia.com>
791
792         Unreviewed build fix for the GTK+ port using Clang.
793
794         * UIProcess/gtk/RedirectedXCompositeWindow.h: Include the <functional>
795         header for the use of std::function<>.
796
797 2014-11-13  Dan Bernstein  <mitz@apple.com>
798
799         Two WKWebView internal methods are implemented in a category
800         https://bugs.webkit.org/show_bug.cgi?id=138728
801
802         Reviewed by Tim HOrton.
803
804         Moved the implementations from the category to the class.
805
806         * UIProcess/API/Cocoa/WKWebView.mm:
807         (-[WKWebView _ignoresNonWheelMouseEvents]):
808         (-[WKWebView _setIgnoresNonWheelMouseEvents:]):
809
810 2014-11-13  Myles C. Maxfield  <mmaxfield@apple.com>
811
812         Move FontMac and FontCacheMac off of WKSI
813         https://bugs.webkit.org/show_bug.cgi?id=138633
814
815         Reviewed by Simon Fraser.
816
817         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
818         (InitWebCoreSystemInterface):
819         * mac/WebKit2.order:
820
821 2014-11-13  Eric Carlson  <eric.carlson@apple.com>
822
823         Context menus should not offer the "Download video" option for videos that cannot 
824         be downloaded
825         https://bugs.webkit.org/show_bug.cgi?id=138530
826         -and corresponding-
827         rdar://problem/18919130
828
829         Reviewed by Tim Horton.
830
831         Expose isDownloadableMedia() to the InjectedBundleHitTestResult.
832         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
833         (WKBundleHitTestResultIsDownloadableMedia):
834         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
835         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
836         (WebKit::InjectedBundleHitTestResult::isDownloadableMedia):
837         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
838
839 2014-11-13  Daniel Bates  <dabates@apple.com>
840
841         [iOS] NSGeometry data types are not available in the public SDK
842         https://bugs.webkit.org/show_bug.cgi?id=137536
843
844         Reviewed by David Kilzer.
845
846         Substitute header WAKAppKitStubs.h for NSGeometry.h as the latter is a
847         private header.
848
849         * Shared/ios/NativeWebTouchEventIOS.mm:
850
851 2014-11-13  Simon Fraser  <simon.fraser@apple.com>
852
853         [WK2] Fire a layout milestone on session restore based on render tree size
854         https://bugs.webkit.org/show_bug.cgi?id=138711
855         rdar://problem/16033854
856
857         Reviewed by Anders Carlsson.
858         
859         Add a session-restore layout milestone which fires after restoring a session,
860         when the render tree size reaches 50% of the size saved in the session state.
861
862         * Shared/SessionState.h: Add renderTreeSize.
863         * UIProcess/API/Cocoa/WKWebView.mm:
864         (layoutMilestones): Translate from SPI to WebCore milestones.
865         * UIProcess/API/Cocoa/WKWebViewPrivate.h: New iOS-only milestone, er, event.
866         * UIProcess/Cocoa/NavigationState.mm:
867         (WebKit::renderingProgressEvents): Translate from WebCore milestone to rendering event.
868         * UIProcess/WebPageProxy.cpp:
869         (WebKit::WebPageProxy::WebPageProxy): Init stuff.
870         (WebKit::WebPageProxy::sessionState):
871         (WebKit::WebPageProxy::restoreFromSessionState): Zero out the target render tree size,
872         then get it out of session state and set the flag to say that we haven't reached it yet.
873         (WebKit::WebPageProxy::listenForLayoutMilestones): Set a flag to know that we should fire
874         the milestone. The other milestones get sent directly to WebCore.
875         * UIProcess/WebPageProxy.h:
876         * UIProcess/ios/WebPageProxyIOS.mm:
877         (WebKit::exceedsRenderTreeSizeSizeThreshold): Return true when we've reached 50%.
878         (WebKit::WebPageProxy::didCommitLayerTree): Fire the milestone when appropriate.
879         * UIProcess/mac/LegacySessionStateCoding.cpp: Rev the session state data for iOS
880         (where doing so is less disruptive). Standardize some CFString constants.
881         (WebKit::encodeSessionHistory): Wrap for legibility.
882         (WebKit::encodeLegacySessionState): Make a CFNumber for render tree size, and store
883         it in the root dictionary.
884         (WebKit::decodeBackForwardTreeNode): Move a comment to match another similar block.
885         (WebKit::decodeLegacySessionState): Decode render tree size and store it.
886
887 2014-11-13  Tim Horton  <timothy_horton@apple.com>
888
889         Adjust the WKBundlePageOverlay Data Detectors SPI
890         https://bugs.webkit.org/show_bug.cgi?id=138685
891         <rdar://problem/18947156>
892
893         Reviewed by Anders Carlsson.
894
895         * UIProcess/mac/WKActionMenuController.mm:
896         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
897         Forward DDActionContext callbacks to the Web process.
898
899         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
900         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
901         * WebProcess/WebPage/WebPageOverlay.cpp:
902         * WebProcess/WebPage/WebPageOverlay.h:
903         Add four DataDetectors-related WebKit2-only page overlay callbacks:
904
905         (WebKit::WebPageOverlay::actionContextForResultAtPoint):
906         Called during the action menu hit test; clients can reply with a DDActionContext
907         and a DOM range, and WebKit will treat that result and range as if it had
908         detected it itself, building the action menu and showing the yellow highlight as usual.
909
910         (WebKit::WebPageOverlay::dataDetectorsPresentedUI):
911         (WebKit::WebPageOverlay::dataDetectorsChangedUI):
912         (WebKit::WebPageOverlay::dataDetectorsHidUI):
913         These correspond to the DDActionContext callbacks, and can be used by clients
914         to show/hide corresponding UI while DataDetectors in the UI process is presenting UI.
915
916         (WebKit::WebPageOverlay::prepareForActionMenu): Deleted.
917         Get rid of prepareForActionMenu, as nobody ever used it.
918
919         * WebProcess/WebPage/WebPage.cpp:
920         Add WebPageOverlay.h so that we can build, because the destructor lives here.
921
922         * WebProcess/WebPage/WebPage.h:
923         * WebProcess/WebPage/WebPage.messages.in:
924         
925         * WebProcess/WebPage/mac/WebPageMac.mm:
926         (WebKit::WebPage::performActionMenuHitTestAtLocation):
927         Give all of the WebPageOverlays the first shot at data detection; if none of them
928         reply with a valid DDActionContext/DOM range, we'll go ahead and do our normal detection.
929
930         (WebKit::WebPage::dataDetectorsPresentedUI):
931         (WebKit::WebPage::dataDetectorsChangedUI):
932         (WebKit::WebPage::dataDetectorsHidUI):
933         Forward these along to the active WebPageOverlay.
934
935 2014-11-13  Carlos Garcia Campos  <cgarcia@igalia.com>
936
937         [SOUP] Missing ResourceRequest members encoded/decoded
938         https://bugs.webkit.org/show_bug.cgi?id=138694
939
940         Reviewed by Sergio Villar Senin.
941
942         At least timeoutInterval and priority should also be
943         encoded/decoded. This fixes all http/tests/xmlhttprequest/timeout/
944         tests when using the network process, since the timeout is always
945         0 for all requests that we send to the network process.
946
947         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
948         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
949         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
950
951 2014-11-12  Ryuan Choi  <ryuan.choi@navercorp.com>
952
953         [EFL] Fix the build with EFL 1.12
954         https://bugs.webkit.org/show_bug.cgi?id=138245
955
956         Reviewed by Gyuyoung Kim.
957
958         * UIProcess/API/efl/EwkView.cpp:
959         First, modified to use Evas_GL raw pointer instead of UniquePtrEfl because
960         Evas_GL.h can't be included in UniquePtrEfl.h
961         It should be moved into EvasGLContext because WebKit/EFL use only one Evas_GL.
962         Second, provided the version of GLES in Evas_GL_Config not to break build with
963         EFL 1.12
964         (EwkView::EwkView):
965         (EwkView::~EwkView):
966         (EwkView::displayTimerFired):
967         (EwkView::createGLSurface):
968         * UIProcess/API/efl/EwkView.h:
969
970 2014-11-12  Ada Chan  <adachan@apple.com>
971
972         Fix the iOS build.
973
974         * WebProcess/Plugins/PluginView.cpp:
975         (WebKit::PluginView::pageMutedStateDidChange):
976
977 2014-11-05  Ada Chan  <adachan@apple.com>
978
979         Implement new plug-in API for muting plug-ins
980         https://bugs.webkit.org/show_bug.cgi?id=138105
981
982         Reviewed by Anders Carlsson.
983
984         Handle the setting of NPNVmuteAudioBool on the plug-in.
985
986         * PluginProcess/PluginControllerProxy.cpp:
987         (WebKit::PluginControllerProxy::PluginControllerProxy):
988         Initialize m_isMuted.
989         (WebKit::PluginControllerProxy::mutedStateChanged):
990         Tell the plugin about the new muted state.
991         * PluginProcess/PluginControllerProxy.h:
992         * PluginProcess/PluginControllerProxy.messages.in:
993         Add the MutedStateChanged message.
994         * PluginProcess/PluginCreationParameters.cpp:
995         (WebKit::PluginCreationParameters::PluginCreationParameters):
996         Initialize isMuted.
997         (WebKit::PluginCreationParameters::encode):
998         Handle isMuted.
999         (WebKit::PluginCreationParameters::decode):
1000         Ditto.
1001         * PluginProcess/PluginCreationParameters.h:
1002         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1003         (WebKit::NPN_GetValue):
1004         Get the plug-in's muted state.
1005         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1006         (WebKit::NetscapePlugin::isMuted):
1007         Get the muted state from PluginControllerProxy.
1008         (WebKit::NetscapePlugin::mutedStateChanged):
1009         Call NPP_SetValue with NPNVmuteAudioBool and the updated muted state.
1010         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1011         * WebProcess/Plugins/Plugin.h:
1012         (WebKit::Plugin::mutedStateChanged):
1013         * WebProcess/Plugins/PluginController.h:
1014         * WebProcess/Plugins/PluginProxy.cpp:
1015         (WebKit::PluginProxy::initialize):
1016         Set m_pendingPluginCreationParameters->isMuted.
1017         (WebKit::PluginProxy::mutedStateChanged):
1018         Send the MutedStateChanged message to the plugin process.
1019         * WebProcess/Plugins/PluginProxy.h:
1020         * WebProcess/Plugins/PluginView.cpp:
1021         (WebKit::PluginView::pageMutedStateDidChange):
1022         Call Plugin::mutedStateChanged() with the page's muted state.
1023         (WebKit::PluginView::isMuted):
1024         Get the page's current muted state.
1025         * WebProcess/Plugins/PluginView.h:
1026
1027 2014-11-12  Tim Horton  <timothy_horton@apple.com>
1028
1029         Two action menu item titles are swapped
1030         https://bugs.webkit.org/show_bug.cgi?id=138667
1031         <rdar://problem/18960409>
1032
1033         Reviewed by Beth Dakin.
1034
1035         * UIProcess/mac/WKActionMenuController.mm:
1036         (-[WKActionMenuController _createActionMenuItemForTag:]):
1037         Swap them back.
1038
1039 2014-11-12  Commit Queue  <commit-queue@webkit.org>
1040
1041         Unreviewed, rolling out r175806.
1042         https://bugs.webkit.org/show_bug.cgi?id=138666
1043
1044         Capturing CString is not thread safe (Requested by anttik on
1045         #webkit).
1046
1047         Reverted changeset:
1048
1049         "[WK2] Use C++ lambdas in IPC::Connection"
1050         https://bugs.webkit.org/show_bug.cgi?id=138018
1051         http://trac.webkit.org/changeset/175806
1052
1053 2014-11-12  Tim Horton  <timothy_horton@apple.com>
1054
1055         Need to show the text indicator when Data Detectors shows a popover
1056         https://bugs.webkit.org/show_bug.cgi?id=138664
1057         <rdar://problem/18869900>
1058
1059         Reviewed by Beth Dakin.
1060
1061         * UIProcess/mac/WKActionMenuController.h:
1062         * UIProcess/mac/WKActionMenuController.mm:
1063         (hasDataDetectorsCompletionAPI):
1064         Determine if we have the new API.
1065
1066         (-[WKActionMenuController willDestroyView:]):
1067         (-[WKActionMenuController willOpenMenu:withEvent:]):
1068         Make use of the new API.
1069         If we wanted to show a Data Detectors menu but have no items (or they're all
1070         disabled), cancel the menu.
1071         If we don't have it, manually manipulate the highlight.
1072
1073         (-[WKActionMenuController didCloseMenu:withEvent:]):
1074         Make use of the new API.
1075         If we don't have it, manually manipulate the highlight.
1076
1077         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1078         Set up completion handlers if we have the new API; when DataDetectors
1079         presents UI, show the text indicator, when it dismisses, hide it.
1080         If we don't have the API, manually manipulate the highlight.
1081
1082 2014-11-12  Tim Horton  <timothy_horton@apple.com>
1083
1084         Make action menus much more reliable
1085         https://bugs.webkit.org/show_bug.cgi?id=138654
1086         <rdar://problem/18909111>
1087
1088         Reviewed by Anders Carlsson.
1089
1090         * UIProcess/mac/WKActionMenuController.mm:
1091         (-[WKActionMenuController prepareForMenu:withEvent:]):
1092         Remove MenuUpdateStage; nothing actually uses this value, we just pass it around.
1093
1094         (-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
1095         Update the menu as soon as we have a reply from the Web process.
1096
1097         (-[WKActionMenuController menuNeedsUpdate:]):
1098         If our sync-wait for the Web process' reply times out, we should still update
1099         the menu to remove the placeholder separator item.
1100
1101         (-[WKActionMenuController _updateActionMenuItems]):
1102         (-[WKActionMenuController _updateActionMenuItemsForStage:]): Deleted.
1103         If we have our final answer for this menu (_state == Ready), and the final answer
1104         has no items in the menu, cancel tracking on the menu.
1105
1106 2014-11-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1107
1108         [GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer
1109         https://bugs.webkit.org/show_bug.cgi?id=138093
1110
1111         Reviewed by Martin Robinson.
1112
1113         It's only used by WebKitWebViewBase. While moving the code the
1114         following cleanups have been made:
1115
1116           - Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
1117           - Use a helper class XDamageNotifier to handle the XDamage
1118             events filtering and notification.
1119           - Use std::function instead of pointer to function for the
1120             damage callback.
1121           - Pass the X display to the RedirectedXCompositeWindow constructor
1122             and keep it as a member to use it everywhere, instead of using
1123             the default display in some places and the widget display in others.
1124           - Pass the damage notify function as a contructor parameter of
1125             RedirectedXCompositeWindow instead of setting the callback
1126             right after creating the object.
1127           - Remove GLContextNeeded and all the dead code related to the
1128             CreateGLContext mode that is no longer used.
1129           - Rename cairoSurfaceForWidget() as surface().
1130           - windowId() has been renamed as windowID() and made const.
1131           - Use std::unique_ptr instead of PassOwnPtr.
1132           - Fix coding style issues.
1133
1134         * PlatformGTK.cmake:
1135         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1136         (webkitWebViewBaseConstructed):
1137         (webkitWebViewRenderAcceleratedCompositingResults):
1138         (webkitWebViewBaseCreateWebPage):
1139         (redirectedWindowDamagedCallback): Deleted.
1140         * UIProcess/gtk/RedirectedXCompositeWindow.cpp: Renamed from Source/WebCore/platform/gtk/RedirectedXCompositeWindow.cpp.
1141         (WebKit::XDamageNotifier::XDamageNotifier):
1142         (WebKit::XDamageNotifier::add):
1143         (WebKit::XDamageNotifier::remove):
1144         (WebKit::XDamageNotifier::filterXDamageEvent):
1145         (WebKit::XDamageNotifier::filterXEvent):
1146         (WebKit::xDamageNotifier):
1147         (WebKit::supportsXDamageAndXComposite):
1148         (WebKit::RedirectedXCompositeWindow::create):
1149         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
1150         (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
1151         (WebKit::RedirectedXCompositeWindow::resize):
1152         (WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
1153         (WebKit::RedirectedXCompositeWindow::surface):
1154         * UIProcess/gtk/RedirectedXCompositeWindow.h: Renamed from Source/WebCore/platform/gtk/RedirectedXCompositeWindow.h.
1155         (WebKit::RedirectedXCompositeWindow::windowID):
1156
1157 2014-09-01  Philippe Normand  <pnormand@igalia.com>
1158
1159         [WK2] UserMediaClient support
1160         https://bugs.webkit.org/show_bug.cgi?id=123158
1161
1162         Reviewed by Benjamin Poulain.
1163
1164         Support for UserMediaPermissionRequest in WebKit2. It's
1165         implemented similarily to the GeolocationPermissionRequest
1166         support. When the WebPage requires this permission it sends a
1167         message to the UI process which at some point grants or denies the
1168         permission and sends the result back to the WebProcess.
1169
1170         * CMakeLists.txt: Generic CMake support for new files.
1171         * Shared/API/c/WKBase.h: New type for UserMediaPermissionRequest.
1172         * Shared/APIObject.h: Ditto.
1173         * UIProcess/API/C/WKAPICast.h: PermissionRequest API mapping.
1174         * UIProcess/API/APIUIClient.h: New decidePolicy handler for UserMediaPermissionRequest.
1175         (API::UIClient::decidePolicyForUserMediaPermissionRequest):
1176         * UIProcess/API/C/WKPage.cpp: Ditto.
1177         (WKPageSetPageUIClient):
1178         * UIProcess/API/C/WKPageUIClient.h: WKPageUIClient version bump to
1179         5, including the new decidePolicyForUserMediaPermissionRequest member.
1180         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp: Added, C API
1181         implementation of the UserMediaPermissionRequest.
1182         (WKUserMediaPermissionRequestGetTypeID):
1183         (WKUserMediaPermissionRequestAllow):
1184         (WKUserMediaPermissionRequestDeny):
1185         * UIProcess/API/C/WKUserMediaPermissionRequest.h: Added.
1186         * UIProcess/API/C/WebKit2_C.h:
1187         * UIProcess/UserMediaPermissionRequestManagerProxy.h: Added.
1188         * UIProcess/UserMediaPermissionRequestProxy.cpp: Added, proxy
1189         object for the UserMediaPermissionRequestType.
1190         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
1191         (WebKit::UserMediaPermissionRequestProxy::allow):
1192         (WebKit::UserMediaPermissionRequestProxy::deny):
1193         (WebKit::UserMediaPermissionRequestProxy::invalidate):
1194         * UIProcess/UserMediaPermissionRequestProxy.h: Added.
1195         (WebKit::UserMediaPermissionRequestProxy::create):
1196         (WebKit::UserMediaPermissionRequestProxy::mediaParameters):
1197         * UIProcess/WebPageProxy.cpp:
1198         (WebKit::WebPageProxy::WebPageProxy):
1199         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Defer
1200         UserPermissionRequest to the UIClient.
1201         * UIProcess/WebPageProxy.h:
1202         * UIProcess/WebPageProxy.messages.in: New message to handle UserMediaPermissionRequests.
1203         * WebKit2.xcodeproj/project.pbxproj:
1204         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp: Added,
1205         WebProcess side of the UserRequestManager, keeping track of each
1206         permission request.
1207         (WebKit::generateRequestID):
1208         (WebKit::UserMediaPermissionRequestManager::UserMediaPermissionRequestManager):
1209         (WebKit::UserMediaPermissionRequestManager::startRequest):
1210         (WebKit::UserMediaPermissionRequestManager::cancelRequest):
1211         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
1212         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h: Added.
1213         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp: Added,
1214         WebProcess implementation of the WebCore::UserMediaClient.
1215         (WebKit::WebUserMediaClient::WebUserMediaClient):
1216         (WebKit::WebUserMediaClient::pageDestroyed):
1217         (WebKit::WebUserMediaClient::requestPermission):
1218         (WebKit::WebUserMediaClient::cancelRequest):
1219         * WebProcess/WebCoreSupport/WebUserMediaClient.h: Added.
1220         * WebProcess/WebPage/WebPage.cpp:
1221         (WebKit::WebPage::WebPage): Create the
1222         UserMediaPermissionRequestManager and register the UserMediaClient
1223         to the page.
1224         (WebKit::WebPage::didReceiveUserMediaPermissionDecision): Dispatch
1225         decision to manager.
1226         * WebProcess/WebPage/WebPage.h:
1227         (WebKit::WebPage::userMediaPermissionRequestManager):
1228         * WebProcess/WebPage/WebPage.messages.in: New Message to handle
1229         permission decision result from the UI process.
1230
1231 2014-11-11  Tim Horton  <timothy_horton@apple.com>
1232
1233         Add support for mailto: link action menus
1234         https://bugs.webkit.org/show_bug.cgi?id=138641
1235         <rdar://problem/18741567>
1236
1237         Reviewed by Beth Dakin.
1238
1239         * Shared/API/c/WKActionMenuTypes.h:
1240         Add a new type for mailto links.
1241
1242         * UIProcess/mac/WKActionMenuController.mm:
1243         (-[WKActionMenuController _defaultMenuItemsForMailtoLink]):
1244         Build a DDActionContext and grab menu items for our mailto link.
1245
1246         (-[WKActionMenuController _defaultMenuItems]):
1247         Get menu items from _defaultMenuItemsForMailtoLink if needed.
1248
1249 2014-11-11  Conrad Shultz  <conrad_shultz@apple.com>
1250
1251         Clients should be notified when a page preview finishes
1252         https://bugs.webkit.org/show_bug.cgi?id=138635
1253
1254         Reviewed by Tim Horton.
1255
1256         Add SPI to WKView to allow clients to do any cleanup that might be necessary when the preview closes.
1257
1258         * UIProcess/API/Cocoa/WKViewPrivate.h:
1259         Declare new SPI.
1260
1261         * UIProcess/API/mac/WKView.mm:
1262         (-[WKView _finishPreviewingURL:withPreviewView:]):
1263         Stub SPI implementation.
1264
1265         * UIProcess/mac/WKActionMenuController.h:
1266         Add an ivar for the preview view controller.
1267
1268         * UIProcess/mac/WKActionMenuController.mm:
1269         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
1270         Update to use the ivar.
1271         (-[WKActionMenuController _clearPreviewPopover]):
1272         Send -_finishPreviewingURL:withPreviewView: and nil out the view controller ivar.
1273
1274 2014-11-11  Tim Horton  <timothy_horton@apple.com>
1275
1276         Update artwork for some action menu items
1277         https://bugs.webkit.org/show_bug.cgi?id=138634
1278         <rdar://problem/18871984>
1279
1280         Reviewed by Anders Carlsson.
1281
1282         * Resources/OpenInNewWindowTemplate.pdf: Removed.
1283         * UIProcess/mac/WKActionMenuController.mm:
1284         (-[WKActionMenuController _createActionMenuItemForTag:]):
1285         (webKitBundleImageNamed): Deleted.
1286         * WebKit2.xcodeproj/project.pbxproj:
1287         Get rid of our custom art, and use system art for two more items.
1288
1289 2014-11-11  Alexey Proskuryakov  <ap@apple.com>
1290
1291         DRT and WKTR touch disk cache
1292         https://bugs.webkit.org/show_bug.cgi?id=138622
1293
1294         Reviewed by Geoffrey Garen.
1295
1296         Setting a cache model has a very strange behavior in WebKit2, where it ignores
1297         sizes that were explicitly passed from UI process, and uses different ones. As
1298         setCacheModel() is always called on launch, it always creates a non-empty disk cache.
1299
1300         The design needs to be improved one day, but for now, just make sure that we never
1301         create a disk cache during testing.
1302
1303         * NetworkProcess/NetworkProcess.cpp:
1304         (WebKit::NetworkProcess::NetworkProcess):
1305         (WebKit::NetworkProcess::initializeNetworkProcess):
1306         * NetworkProcess/NetworkProcess.h:
1307         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
1308         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
1309         (WebKit::NetworkProcess::platformSetCacheModel):
1310         * WebProcess/WebProcess.cpp:
1311         (WebKit::WebProcess::WebProcess):
1312         (WebKit::WebProcess::initializeWebProcess):
1313         * WebProcess/WebProcess.h:
1314         * WebProcess/cocoa/WebProcessCocoa.mm:
1315         (WebKit::WebProcess::platformSetCacheModel):
1316         (WebKit::WebProcess::platformInitializeWebProcess):
1317
1318 2014-11-11  Eric Carlson  <eric.carlson@apple.com>
1319
1320         [iOS] a page with video in optimized fullscreen is visible
1321         https://bugs.webkit.org/show_bug.cgi?id=138632
1322
1323         Reviewed by Anders Carlsson.
1324
1325         * UIProcess/API/Cocoa/WKWebView.mm:
1326         (-[WKWebView _isPlayingFullscreenOptimizedVideo]): New.
1327
1328         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1329         * UIProcess/ios/PageClientImplIOS.mm:
1330         (WebKit::PageClientImpl::isViewVisible): Return true if displaying optimized fullscreen
1331             video.
1332
1333 2014-11-11  Tim Horton  <timothy_horton@apple.com>
1334
1335         Occasional assertion failure under recommendedScrollbarStyleDidChange()
1336         https://bugs.webkit.org/show_bug.cgi?id=138604
1337         <rdar://problem/18855914>
1338
1339         Reviewed by Beth Dakin.
1340
1341         It is possible for AppKit to install tracking areas into our view
1342         behind our back, but we have code that depends on knowing exactly
1343         the set of tracking areas installed on WKView.
1344
1345         Make this more robust by keeping a reference to the tracking area we
1346         use for many things and manipulating that instead of making assumptions
1347         about the total set of tracking areas on WKView.
1348
1349         * UIProcess/API/mac/WKView.mm:
1350         (-[WKView _primaryTrackingArea]):
1351         (-[WKView _replacePrimaryTrackingArea:]):
1352         Provide a 'primary' tracking area setter/getter.
1353
1354         (-[WKView initWithFrame:context:configuration:webView:]):
1355         Keep a reference to the original tracking area installed at initialization time.
1356
1357         * UIProcess/API/mac/WKViewInternal.h:
1358         * UIProcess/mac/PageClientImpl.mm:
1359         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
1360         Instead of walking the set of tracking areas, make use of the fact that
1361         we know exactly which tracking area we installed, and uninstall just that
1362         one, and replace it with our newly-built one.
1363
1364 2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
1365
1366         Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI
1367         https://bugs.webkit.org/show_bug.cgi?id=138623
1368
1369         Reviewed by Geoff Garen.
1370
1371         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1372         (InitWebCoreSystemInterface):
1373         * mac/WebKit2.order:
1374
1375 2014-11-11  Timothy Horton  <timothy_horton@apple.com>
1376
1377         Add a respondsToSelector check to dismissActionMenuPopovers
1378         ​https://bugs.webkit.org/show_bug.cgi?id=138600
1379         <rdar://problem/18932770>
1380
1381         Reviewed by Beth Dakin.
1382
1383         * UIProcess/mac/WKActionMenuController.mm:
1384         (-[WKActionMenuController dismissActionMenuPopovers]):
1385         Avoid calling this wherever it doesn't exist.
1386
1387 2014-11-11  Tim Horton  <timothy_horton@apple.com>
1388
1389         DataDetectors' menu items aren't presented in the telephone number menu
1390         https://bugs.webkit.org/show_bug.cgi?id=138602
1391         <rdar://problem/18866308>
1392
1393         Reviewed by Beth Dakin.
1394
1395         We currently round-trip the DataDetectors telephone number NSMenuItems
1396         through the very-lossy WebContextMenuItemData, for no real reason.
1397         We should avoid this so that DataDetectors' actual NSMenuItems are
1398         presented in the final menu, so that they can adjust their items after
1399         providing them to us.
1400
1401         * Platform/mac/MenuUtilities.h:
1402         * Platform/mac/MenuUtilities.mm:
1403         (WebKit::menuItemTitleForTelephoneNumber): Deleted.
1404         Stop adjusting the menu item titles, as they come correct now.
1405
1406         (WebKit::menuItemsForTelephoneNumber): Deleted.
1407         (WebKit::menuForTelephoneNumber):
1408         Return a fully-formed menu for the single telephone number case.
1409
1410         * UIProcess/mac/WebPageProxyMac.mm:
1411         (WebKit::WebPageProxy::showTelephoneNumberMenu):
1412         Present the fully-formed menu, without round-tripping through
1413         WebContextMenuItemData, because we do not need to hand the items to
1414         the context menu client (and indeed, were not), and because this
1415         allows us to use the exact items returned by DataDetectors, so they
1416         can keep ahold of the items that we actually present.
1417
1418         * UIProcess/PageClient.h:
1419         * UIProcess/mac/PageClientImpl.h:
1420         * UIProcess/mac/PageClientImpl.mm:
1421         (WebKit::PageClientImpl::showPlatformContextMenu):
1422         Add a Mac-only PageClient function for presenting a NSMenu at a
1423         WKView-relative point.
1424
1425 2014-11-11  Tim Horton  <timothy_horton@apple.com>
1426
1427         Adopt DDActionContext menu type SPI
1428         https://bugs.webkit.org/show_bug.cgi?id=138603
1429         <rdar://problem/18867627>
1430
1431         Reviewed by Anders Carlsson.
1432
1433         * UIProcess/mac/WKActionMenuController.mm:
1434         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1435         Use the new SPI instead of WKSI.
1436
1437 2014-11-11  Tim Horton  <timothy_horton@apple.com>
1438
1439         Data Detectors popovers should be dismissed upon scrolling
1440         https://bugs.webkit.org/show_bug.cgi?id=138600
1441         <rdar://problem/18932770>
1442
1443         Reviewed by Beth Dakin.
1444
1445         * UIProcess/mac/WKActionMenuController.mm:
1446         (-[WKActionMenuController prepareForMenu:withEvent:]):
1447         Dismiss popovers when we start preparing another menu.
1448
1449         (-[WKActionMenuController dismissActionMenuPopovers]):
1450         Use the new DataDetectors SPI.
1451
1452 2014-11-11  Tim Horton  <timothy_horton@apple.com>
1453
1454         Localize strings for action menus
1455         https://bugs.webkit.org/show_bug.cgi?id=138591
1456         <rdar://problem/18815343>
1457
1458         Reviewed by Dan Bates.
1459
1460         * UIProcess/mac/WKActionMenuController.mm:
1461         (-[WKActionMenuController _showTextIndicator]):
1462         (-[WKActionMenuController _hideTextIndicator]):
1463         (-[WKActionMenuController _createActionMenuItemForTag:]):
1464         Make use of the new strings.
1465
1466 2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
1467
1468         Cleanup from r175379
1469         https://bugs.webkit.org/show_bug.cgi?id=138616
1470
1471         Reviewed by Simon Fraser.
1472
1473         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1474         (InitWebCoreSystemInterface):
1475         * mac/WebKit2.order:
1476
1477 2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
1478
1479         Move CTFontTransformGlyphs out from WKSI
1480         https://bugs.webkit.org/show_bug.cgi?id=138599
1481
1482         Reviewed by Simon Fraser.
1483
1484         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1485         (InitWebCoreSystemInterface):
1486         * mac/WebKit2.order:
1487
1488 2014-11-10  Simon Fraser  <simon.fraser@apple.com>
1489
1490         Fix possible crash when closing the web inspector
1491         https://bugs.webkit.org/show_bug.cgi?id=138597
1492         rdar://problem/18872688
1493
1494         Reviewed by Andreas Kling.
1495         
1496         I reported a crash when reloading a page after inspecting it, possibly caused by
1497         r172864. Speculatively fix by null-checking the main frame.
1498
1499         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1500         (WebKit::WebInspectorClient::~WebInspectorClient):
1501
1502 2014-11-10  Beth Dakin  <bdakin@apple.com>
1503
1504         Whitespace action menus aren't working properly
1505         https://bugs.webkit.org/show_bug.cgi?id=138585
1506         -and corresponding-
1507         rdar://problem/18933586
1508
1509         Reviewed by Tim Horton.
1510
1511         Treat the whitespace menu as a text menu.
1512         * UIProcess/mac/WKActionMenuController.mm:
1513         (-[WKActionMenuController isMenuForTextContent]):
1514
1515 2014-11-10  Simon Fraser  <simon.fraser@apple.com>
1516
1517         [iOS WK2] Scroll deceleration rate is wrong
1518         https://bugs.webkit.org/show_bug.cgi?id=138574
1519         rdar://problem/18715303
1520
1521         Reviewed by Benjamin Poulain.
1522         
1523         The CSS Snap Points code incorrectly set the WKScrollView's deceleration rate,
1524         overriding the custom value that UIWebScrollView sets.
1525         
1526         Fix by having WKScrollView store the custom rate at init time, and
1527         using that value in -scrollViewWillBeginDragging:.
1528
1529         * UIProcess/API/Cocoa/WKWebView.mm:
1530         (-[WKWebView scrollViewWillBeginDragging:]):
1531         * UIProcess/ios/WKScrollView.h:
1532         * UIProcess/ios/WKScrollView.mm:
1533         (-[WKScrollView initWithFrame:]):
1534
1535 2014-11-09  Ada Chan  <adachan@apple.com>
1536
1537         Reset WebPageProxy's isPlayingAudio state after web process crash or page invalidation.
1538         https://bugs.webkit.org/show_bug.cgi?id=138559
1539
1540         Reviewed by Andreas Kling.
1541
1542         * UIProcess/WebPageProxy.cpp:
1543         (WebKit::WebPageProxy::resetState):
1544
1545 2014-11-10  Beth Dakin  <bdakin@apple.com>
1546
1547         WK1: Support default actions for read-only text
1548         https://bugs.webkit.org/show_bug.cgi?id=138552
1549         -and corresponding-
1550         rdar://problem/18877483
1551
1552         Reviewed by Tim Horton.
1553
1554         WK1 now needs to do a lot of dictionary lookup operations that it did not 
1555         previously have to handle. So this patch takes a lot of that functionality, which 
1556         was implemented as static functions in WebPageMac for WK2 and moves it into 
1557         WebCore.
1558
1559         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1560         (InitWebCoreSystemInterface):
1561         * WebProcess/WebPage/mac/WebPageMac.mm:
1562         (WebKit::WebPage::performDictionaryLookupForRange):
1563         (WebKit::isPositionInRange): Deleted.
1564         (WebKit::shouldUseSelection): Deleted.
1565         (WebKit::rangeExpandedAroundPositionByCharacters): Deleted.
1566         (WebKit::rangeForDictionaryLookupForSelection): Deleted.
1567         (WebKit::rangeForDictionaryLookupAtHitTestResult): Deleted.
1568
1569 2014-11-10  Dan Bernstein  <mitz@apple.com>
1570
1571         iOS build fix.
1572
1573         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
1574         (WebKit::RemoteLayerTreeHost::createLayer):
1575
1576 2014-11-10  Zan Dobersek  <zdobersek@igalia.com>
1577
1578         [WK2] Use C++ lambdas in IPC::Connection
1579         https://bugs.webkit.org/show_bug.cgi?id=138018
1580
1581         Reviewed by Anders Carlsson.
1582
1583         Replace uses of WTF::bind() in the IPC::Connection class with C++11 lambdas.
1584
1585         * Platform/IPC/Connection.cpp:
1586         (IPC::Connection::SyncMessageState::processIncomingMessage):
1587         (IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
1588         (IPC::Connection::invalidate):
1589         (IPC::Connection::sendMessage):
1590         (IPC::Connection::processIncomingMessage):
1591         (IPC::Connection::enqueueIncomingMessage):
1592         * Platform/IPC/mac/ConnectionMac.mm:
1593         (IPC::Connection::initializeDeadNameSource):
1594         (IPC::Connection::receiveSourceEventHandler):
1595         * Platform/IPC/unix/ConnectionUnix.cpp:
1596         (IPC::Connection::open):
1597
1598 2014-11-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1599
1600         Remove create() factory function in FooAnimationValue classes
1601         https://bugs.webkit.org/show_bug.cgi?id=138206
1602
1603         Reviewed by Darin Adler.
1604
1605         As a step to use std::unique_ptr and std::make_unique, this patch removes create()
1606         factory function in FooAnimationValue classes. As this changes, FooAnimationValue::create()
1607         are changed to std::make_unique<>.
1608
1609         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1610         (IPC::ArgumentCoder<GraphicsLayerAnimation>::decode):
1611         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1612         (WebKit::WebInspectorClient::showPaintRect):
1613
1614 2014-11-09  Chris Dumez  <cdumez@apple.com>
1615
1616         Unreviewed, fix typo in r175796.
1617
1618         Rename areEssentialEqualAsFloat to areEssentiallyEqualAsFloat.
1619
1620         * WebProcess/WebPage/ios/WebPageIOS.mm:
1621         (WebKit::areEssentiallyEqualAsFloat):
1622         (WebKit::WebPage::dynamicViewportSizeUpdate):
1623         (WebKit::areEssentialEqualAsFloat): Deleted.
1624
1625 2014-11-09  Chris Dumez  <cdumez@apple.com>
1626
1627         Add a more correct way to compare floating point numbers and use it
1628         https://bugs.webkit.org/show_bug.cgi?id=138527
1629
1630         Reviewed by Darin Adler.
1631
1632         Use the new WTF::areEssentuallyEqual() utility function from MathExtras.h
1633         to compare floating-point numbers.
1634
1635         * UIProcess/API/Cocoa/WKWebView.mm:
1636         (withinEpsilon):
1637         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
1638         (WebKit::PageViewportController::updateMinimumScaleToFit):
1639         (WebKit::fuzzyCompare): Deleted.
1640         * UIProcess/CoordinatedGraphics/PageViewportController.h:
1641         * WebProcess/WebPage/ios/WebPageIOS.mm:
1642         (WebKit::withinEpsilon):
1643
1644         * UIProcess/API/Cocoa/WKWebView.mm:
1645         (areEssentiallyEqualAsFloat):
1646         (-[WKWebView _didCommitLayerTree:]):
1647         (withinEpsilon): Deleted.
1648         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
1649         (WebKit::PageViewportController::updateMinimumScaleToFit):
1650         (WebKit::fuzzyCompare): Deleted.
1651         * UIProcess/CoordinatedGraphics/PageViewportController.h:
1652         * WebProcess/WebPage/ios/WebPageIOS.mm:
1653         (WebKit::areEssentialEqualAsFloat):
1654         (WebKit::WebPage::dynamicViewportSizeUpdate):
1655         (WebKit::withinEpsilon): Deleted.
1656
1657 2014-11-08  Simon Fraser  <simon.fraser@apple.com>
1658
1659         Implement round-rect clipping on video elements
1660         https://bugs.webkit.org/show_bug.cgi?id=138537
1661         rdar://problem/9534399
1662
1663         Reviewed by Darin Adler.
1664
1665         Support border-radius on video and other layers with composited contents,
1666         by pushing a FloatRoundedRect onto the GraphicsLayer as the contentsClippingRect,
1667         and, on Mac, using layer corner-radius or a CAShapeLayer mask.
1668
1669         * Shared/WebCoreArgumentCoders.cpp:
1670         (IPC::ArgumentCoder<FloatRoundedRect>::encode):
1671         (IPC::ArgumentCoder<FloatRoundedRect>::decode):
1672         * Shared/WebCoreArgumentCoders.h:
1673         * Shared/mac/RemoteLayerBackingStore.mm: New shape layer type.
1674         (WebKit::RemoteLayerBackingStore::drawInContext):
1675         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
1676         (WebKit::applyPropertiesToLayer): Apply corner-radius and shape path.
1677         * Shared/mac/RemoteLayerTreeTransaction.h: Prettify the flags. Yes, I prefer this style.
1678         * Shared/mac/RemoteLayerTreeTransaction.mm:
1679         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
1680         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
1681         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
1682         (WebKit::RemoteLayerTreeTextStream::operator<<):
1683         (WebKit::dumpChangedLayers):
1684         (WebKit::RemoteLayerTreeTransaction::description):
1685         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
1686         (+[WKShapeView layerClass]): Make UIViews with a CAShapeLayer layer class.
1687         (WebKit::RemoteLayerTreeHost::createLayer):
1688         * UIProcess/mac/RemoteLayerTreeHost.mm:
1689         (WebKit::RemoteLayerTreeHost::createLayer):
1690         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
1691         (WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
1692         (WebKit::isEquivalentLayer):
1693         (WebKit::PlatformCALayerRemote::setMask):
1694         (WebKit::PlatformCALayerRemote::setClonedLayer):
1695         (WebKit::PlatformCALayerRemote::cornerRadius):
1696         (WebKit::PlatformCALayerRemote::setCornerRadius):
1697         (WebKit::PlatformCALayerRemote::shapeRoundedRect):
1698         (WebKit::PlatformCALayerRemote::setShapeRoundedRect):
1699         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
1700
1701 2014-11-09  Conrad Shultz  <conrad_shultz@apple.com>
1702
1703         Move _ignoresNonWheelMouseEvents implementation to WKView(Private)
1704         https://bugs.webkit.org/show_bug.cgi?id=138487
1705
1706         Reviewed by Dan Bernstein.
1707
1708         Relocate some methods that should have been in a category implementation.
1709
1710         * UIProcess/API/mac/WKView.mm:
1711         (-[WKView _setIgnoresNonWheelMouseEvents:]):
1712         (-[WKView _ignoresNonWheelMouseEvents]):
1713
1714 2014-11-08  Beth Dakin  <bdakin@apple.com>
1715
1716         WKActionMenuController methods should be more careful to use the best 
1717         WebHitTestResult
1718         https://bugs.webkit.org/show_bug.cgi?id=138536
1719         -and corresponding-
1720         rdar://problem/18919195
1721
1722         Reviewed by Tim Horton.
1723
1724         This patch re-names _hitTestResultForStage to _webHitTestResult. The method no 
1725         longer takes a stage since that value is really not necessary to determine the 
1726         correct WebHitTestResult. This patch also makes all spots in this file that access 
1727         a WebHitTestResult go through _webHitTestResult to ensure that they get the most 
1728         up-to-date option.
1729         * UIProcess/mac/WKActionMenuController.mm:
1730         (-[WKActionMenuController willOpenMenu:withEvent:]):
1731         (-[WKActionMenuController _openURLFromActionMenu:]):
1732         (-[WKActionMenuController _addToReadingListFromActionMenu:]):
1733         (-[WKActionMenuController _previewURLFromActionMenu:]):
1734         (-[WKActionMenuController _defaultMenuItemsForVideo]):
1735         (-[WKActionMenuController _copyVideoURL:]):
1736         (-[WKActionMenuController _saveVideoToDownloads:]):
1737         (-[WKActionMenuController _saveImageToDownloads:]):
1738         (-[WKActionMenuController _defaultMenuItems]):
1739         (-[WKActionMenuController _updateActionMenuItemsForStage:]):
1740         (imageForResource:name::switch): Deleted.
1741         (-[WKActionMenuController _defaultMenuItems:]): Deleted.
1742
1743 2014-11-08  Beth Dakin  <bdakin@apple.com>
1744
1745         Implement action menu support for videos
1746         https://bugs.webkit.org/show_bug.cgi?id=138534
1747         -and corresponding-
1748         rdar://problem/18742164
1749
1750         Reviewed by Tim Horton.
1751
1752         New menu type and items types.
1753         * Shared/API/c/WKActionMenuItemTypes.h:
1754         * Shared/API/c/WKActionMenuTypes.h:
1755
1756         Plumb isMediaThatCanBeDownloaded() up to WebHitTestResult.
1757         * Shared/WebHitTestResult.cpp:
1758         (WebKit::WebHitTestResult::Data::Data):
1759         (WebKit::WebHitTestResult::Data::encode):
1760         (WebKit::WebHitTestResult::Data::decode):
1761         * Shared/WebHitTestResult.h:
1762         (WebKit::WebHitTestResult::isMediaThatCanBeDownloaded):
1763
1764         Re-name _canAddImageToPhotos to _canAddMediaToPhotos, which is more accurate. We 
1765         might use this method for videos some day, so now it has an accurate name.
1766         * UIProcess/mac/WKActionMenuController.mm:
1767
1768         Default items and their actions.
1769         (-[WKActionMenuController _defaultMenuItemsForVideo]):
1770         (-[WKActionMenuController _copyVideoURL:]):
1771         (-[WKActionMenuController _saveVideoToDownloads:]):
1772         (-[WKActionMenuController _defaultMenuItemsForImage]):
1773         (-[WKActionMenuController _canAddMediaToPhotos]):
1774         (-[WKActionMenuController _addImageToPhotos:]):
1775         (-[WKActionMenuController _createActionMenuItemForTag:]):
1776         (-[WKActionMenuController _defaultMenuItems:]):
1777         (-[WKActionMenuController _canAddImageToPhotos]): Deleted.
1778
1779         We hit test including shadow content to get the desired result for editable text 
1780         regions. But for media, we want to re-set to the shadow root.
1781         * WebProcess/WebPage/mac/WebPageMac.mm:
1782         (WebKit::WebPage::performActionMenuHitTestAtLocation):
1783
1784 2014-11-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1785
1786         [GTK] Allow to create a view with a related page in WTR
1787         https://bugs.webkit.org/show_bug.cgi?id=138501
1788
1789         Reviewed by Martin Robinson.
1790
1791         This is needed when running tests in multi web process mode.
1792
1793         * UIProcess/API/C/gtk/WKView.cpp:
1794         (WKViewCreate):
1795         * UIProcess/API/C/gtk/WKView.h:
1796
1797 2014-11-07  Conrad Shultz  <conrad_shultz@apple.com>
1798
1799         "Lookup" action menu should read "Look up"
1800         https://bugs.webkit.org/show_bug.cgi?id=138509
1801
1802         Reviewed by Tim Horton.
1803
1804         * UIProcess/mac/WKActionMenuController.mm:
1805         (-[WKActionMenuController _createActionMenuItemForTag:]):
1806
1807 2014-11-07  Beth Dakin  <bdakin@apple.com>
1808
1809         Null deref performing Lookup on Apple Trailers full screen button
1810         https://bugs.webkit.org/show_bug.cgi?id=138513
1811         -and corresponding-
1812         rdar://problem/18909699
1813
1814         Reviewed by Tim Horton.
1815
1816         * WebProcess/WebPage/mac/WebPageMac.mm:
1817         (WebKit::WebPage::performDictionaryLookupForSelection):
1818
1819 2014-11-07  Anshu Chimala  <anshu@apple.com>
1820
1821         Make it possible to associate snapshots with back/forward list items other than the current item.
1822         https://bugs.webkit.org/show_bug.cgi?id=138490
1823
1824         Reviewed by Tim Horton.
1825
1826         * UIProcess/API/Cocoa/WKViewPrivate.h:
1827         Declare -saveBackForwardSnapshotForItem:, an alternative to -saveBackForwardSnapshotForCurrentItem that accepts a
1828         back/forward list item as an argument.
1829         * UIProcess/API/mac/WKView.mm:
1830         (-[WKView saveBackForwardSnapshotForItem:]):
1831         Pass the provided back/forward list item along to WebPageProxy::recordNavigationSnapshot().
1832
1833         * UIProcess/WebPageProxy.cpp:
1834         (WebKit::WebPageProxy::recordNavigationSnapshot):
1835         Overloaded to optionally take a back/forward list item as an argument. If one isn't provided, default to the current item
1836         as before; otherwise, associate the snapshot with whichever item was provided.
1837         * UIProcess/WebPageProxy.h:
1838         Declare the new recordNavigationSnapshot() overload.
1839
1840         * UIProcess/mac/ViewSnapshotStore.h:
1841         Make recordSnapshot() take a back/forward list item as an argument.
1842         * UIProcess/mac/ViewSnapshotStore.mm:
1843         (WebKit::ViewSnapshotStore::recordSnapshot):
1844         Store the snapshot in the provided back/forward list item instead of in the current item.
1845
1846 2014-11-07  Tim Horton  <timothy_horton@apple.com>
1847
1848         Popovers do not dismiss when navigating back and forth using gestures
1849         https://bugs.webkit.org/show_bug.cgi?id=138512
1850         <rdar://problem/18900200>
1851
1852         Reviewed by Beth Dakin.
1853
1854         * UIProcess/mac/PageClientImpl.mm:
1855         (WebKit::PageClientImpl::navigationGestureDidBegin):
1856         Dismiss action menu related popovers when navigation gestures begin.
1857
1858 2014-11-07  Beth Dakin  <bdakin@apple.com>
1859
1860         Action menu preview popover should dismiss on scroll
1861         https://bugs.webkit.org/show_bug.cgi?id=138511
1862         -and corresponding-
1863         rdar://problem/18901445
1864
1865         Reviewed by Tim Horton.
1866
1867         This patch re-names dismissActionMenuDataDetectorPopovers() to 
1868         dismissActionMenuPopovers() and also calls _clearPreviewPopover from that method 
1869         as well.
1870         * UIProcess/API/mac/WKView.mm:
1871         (-[WKView viewDidMoveToWindow]):
1872         (-[WKView _dismissActionMenuPopovers]):
1873         (-[WKView _dismissActionMenuDataDetectorPopovers]): Deleted.
1874         * UIProcess/API/mac/WKViewInternal.h:
1875         * UIProcess/PageClient.h:
1876         * UIProcess/WebPageProxy.cpp:
1877         (WebKit::WebPageProxy::didCommitLoadForFrame):
1878         (WebKit::WebPageProxy::pageDidScroll):
1879         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1880         * UIProcess/mac/PageClientImpl.h:
1881         * UIProcess/mac/PageClientImpl.mm:
1882         (WebKit::PageClientImpl::dismissActionMenuPopovers):
1883         (WebKit::PageClientImpl::dismissActionMenuDataDetectorPopovers): Deleted.
1884         * UIProcess/mac/WKActionMenuController.h:
1885         * UIProcess/mac/WKActionMenuController.mm:
1886         (-[WKActionMenuController dismissActionMenuPopovers]):
1887         (-[WKActionMenuController dismissActionMenuDataDetectorPopovers]): Deleted.
1888
1889 2014-11-07  Beth Dakin  <bdakin@apple.com>
1890
1891         Support action menus for whitespace in editable areas
1892         https://bugs.webkit.org/show_bug.cgi?id=138488
1893         -and corresponding-
1894         rdar://problem/18877717
1895
1896         Reviewed by Tim Horton.
1897
1898         Very simple menu for whitespace in editable areas.
1899         * Shared/API/c/WKActionMenuTypes.h:
1900         * UIProcess/mac/WKActionMenuController.mm:
1901         (-[WKActionMenuController _defaultMenuItemsForWhitespaceInEditableArea]):
1902         (-[WKActionMenuController _defaultMenuItems:]):
1903
1904 2014-11-07  Beth Dakin  <bdakin@apple.com>
1905
1906         Invoking an action menu should dismiss existing selection
1907         https://bugs.webkit.org/show_bug.cgi?id=138496
1908         -and corresponding-
1909         rdar://problem/18892787
1910
1911         Reviewed by Tim Horton.
1912
1913         * UIProcess/mac/WKActionMenuController.mm:
1914         (-[WKActionMenuController willOpenMenu:withEvent:]):
1915
1916 2014-11-07  Eric Carlson  <eric.carlson@apple.com>
1917
1918         [iOS] Update optimized fullscreen media controls
1919         https://bugs.webkit.org/show_bug.cgi?id=138493
1920
1921         Reviewed by Brent Fulgham.
1922
1923         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1924         (InitWebCoreSystemInterface): Initialize GetMediaUIImageData.
1925
1926 2014-11-07  Antti Koivisto  <antti@apple.com>
1927
1928         Add cache coders
1929         https://bugs.webkit.org/show_bug.cgi?id=138413
1930
1931         Reviewed by Anders Carlsson.
1932
1933         Add encoding and decoding support for cache types.
1934
1935         This is largely a copy of the IPC coder classes with some unnecessary features removed.
1936         The coders compute a type-sensitive checksum that can be used to verify the data integrity.
1937
1938         The code is behind ENABLE(NETWORK_CACHE) and not yet used.
1939
1940         * NetworkProcess/cache: Added.
1941         * NetworkProcess/cache/NetworkCacheCoder.h: Added.
1942         * NetworkProcess/cache/NetworkCacheCoders.cpp: Added.
1943         * NetworkProcess/cache/NetworkCacheCoders.h: Added.
1944         * NetworkProcess/cache/NetworkCacheDecoder.cpp: Added.
1945         * NetworkProcess/cache/NetworkCacheDecoder.h: Added.
1946         * NetworkProcess/cache/NetworkCacheEncoder.cpp: Added.
1947         * NetworkProcess/cache/NetworkCacheEncoder.h: Added.
1948         * WebKit2.xcodeproj/project.pbxproj:
1949
1950 2014-11-06  Conrad Shultz  <conrad_shultz@apple.com>
1951
1952         Clients should be able to customize the view used for page previews
1953         https://bugs.webkit.org/show_bug.cgi?id=138447
1954
1955         Reviewed by Tim Horton.
1956
1957         Add SPI to WKView that clients can use to customize the view used in the page preview popover.
1958
1959         * UIProcess/API/Cocoa/WKViewPrivate.h:
1960         Declare -_viewForPreviewingURL:initialFrameSize:.
1961
1962         * UIProcess/API/mac/WKView.mm:
1963         (-[WKView _viewForPreviewingURL:initialFrameSize:]):
1964         Return nil in the default implementation.
1965
1966         * UIProcess/mac/WKActionMenuController.mm:
1967         (-[WKPagePreviewViewController loadView]):
1968         Only spin up a WKWebView if the delegate (and, therefore, the presenting WKView) doesn't supply a custom view.
1969         (-[WKActionMenuController pagePreviewViewController:viewForPreviewingURL:initialFrameSize:]):
1970         WKPagePreviewViewControllerDelegate method; wrap the WKView SPI.
1971
1972 2014-11-05  Jer Noble  <jer.noble@apple.com>
1973
1974         De-templatize Timer
1975         https://bugs.webkit.org/show_bug.cgi?id=138450
1976
1977         Reviewed by Anders Carlsson.
1978
1979         Remove template specifiers from Timer.
1980
1981         * NetworkProcess/NetworkResourceLoader.cpp:
1982         (WebKit::NetworkResourceLoader::bufferingTimerFired):
1983         * NetworkProcess/NetworkResourceLoader.h:
1984         * Shared/WebMemorySampler.cpp:
1985         (WebKit::WebMemorySampler::sampleTimerFired):
1986         (WebKit::WebMemorySampler::stopTimerFired):
1987         * Shared/WebMemorySampler.h:
1988         * Shared/mac/RemoteLayerBackingStoreCollection.h:
1989         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1990         (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
1991         * UIProcess/API/efl/EwkView.cpp:
1992         (EwkView::displayTimerFired):
1993         * UIProcess/API/efl/EwkView.h:
1994         * UIProcess/efl/TextCheckerClientEfl.cpp:
1995         (TextCheckerClientEfl::languagesUpdateTimerFired):
1996         (TextCheckerClientEfl::spellCheckingSettingChangeTimerFired):
1997         * UIProcess/efl/TextCheckerClientEfl.h:
1998         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1999         (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
2000         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2001         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2002         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2003         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
2004         * WebProcess/WebProcess.cpp:
2005         (WebKit::WebProcess::processSuspensionCleanupTimerFired):
2006         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
2007         * WebProcess/WebProcess.h:
2008
2009 2014-11-06  Dean Jackson  <dino@apple.com>
2010
2011         [filters2] Support for backdrop-filter
2012         https://bugs.webkit.org/show_bug.cgi?id=138384
2013         <rdar://problem/18874494>
2014
2015         Reviewed by Simon Fraser.
2016
2017         Take 2!! Previous patch was rolled out.
2018
2019         * Shared/mac/RemoteLayerBackingStore.mm:
2020         (WebKit::RemoteLayerBackingStore::drawInContext): Handle LayerTypeBackdropLayer in the switch.
2021         * Shared/mac/RemoteLayerTreeTransaction.mm:
2022         (WebKit::RemoteLayerTreeTransaction::description): Describe a backdrop layer.
2023         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
2024         (+[WKBackdropView layerClass]): Define CABackdropLayer and use it as the class.
2025         (WebKit::RemoteLayerTreeHost::createLayer):
2026         * UIProcess/mac/RemoteLayerTreeHost.mm: Ditto.
2027         (WebKit::RemoteLayerTreeHost::createLayer):
2028
2029 2014-11-06  Tim Horton  <timothy_horton@apple.com>
2030
2031         Data detectors popover points at the first line of the detected item
2032         https://bugs.webkit.org/show_bug.cgi?id=138471
2033         <rdar://problem/18893079>
2034
2035         Reviewed by Sam Weinig.
2036
2037         * WebProcess/WebPage/mac/WebPageMac.mm:
2038         (WebKit::scanForDataDetectedItems):
2039         Determine the bounding box of all quads of the detected item's text.
2040         This way, the popover will point at the border of the item, instead of
2041         right at the very first line.
2042
2043 2014-11-06  Beth Dakin  <bdakin@apple.com>
2044
2045         Preview views often misplaced inside popover
2046         https://bugs.webkit.org/show_bug.cgi?id=138472
2047
2048         Reviewed by Tim Horton.
2049
2050         This patch makes the popover maintain aspect ratio, and it uses the final scale of 
2051         that popover to scale the preview view as well.
2052
2053         * UIProcess/mac/WKActionMenuController.mm:
2054         (-[WKPagePreviewViewController initWithPageURL:mainViewSize:popoverToViewScale:]):
2055         (-[WKPagePreviewViewController loadView]):
2056         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
2057         (-[WKActionMenuController _targetSize:fitsInAvailableSpace:]):
2058         (-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]):
2059         (-[WKPagePreviewViewController initWithPageURL:]): Deleted.
2060
2061 2014-11-06  Tim Horton  <timothy_horton@apple.com>
2062
2063         TextIndicatorWindow's bounce animation is lopsided when indicating two short lines of text
2064         https://bugs.webkit.org/show_bug.cgi?id=138458
2065
2066         Reviewed by Simon Fraser.
2067
2068         Previously, the TextIndicator's frame() covered the entire selection highlight bounds.
2069         This was undesirable in cases where the highlight included areas far outside the
2070         bounds of the selected text, as the TextIndicatorWindow's 'bounce' animation
2071         would be misaligned (centered on the highlight instead of on the text).
2072
2073         * Shared/TextIndicator.cpp:
2074         Get rid of the many-argument TextIndicator::create, because it was only used
2075         internally, and have createWithSelectionInFrame make a ::Data instead.
2076
2077         (WebKit::TextIndicator::createWithSelectionInFrame):
2078         Compute and store the bounding rect of all of the selected text rects, and store
2079         all of the text rects relative to that bounding rect instead of relative to the
2080         selection highlight bounds. We do this because the selection highlight bounds
2081         often includes area which is far outside of the text bounds (in the case of a
2082         selection that spans multiple lines), and causes the text indicator bounce
2083         animation to bounce in a lopsided manner.
2084
2085         (WebKit::TextIndicator::TextIndicator):
2086         Adjust to the rename of textRectsInSelectionRectCoordinates -> textRectsInBoundingRectCoordinates.
2087
2088         (WebKit::TextIndicator::frameRect):
2089         Instead of the TextIndicator's frame being the selection highlight bounds,
2090         it is now the bounds of all of the text rects.
2091
2092         (WebKit::TextIndicator::draw):
2093         Translate into the image by the difference between the selection highlight bounds
2094         and the text bounding rect. This is necessary because the content image is still generated
2095         covering the entire selection highlight bounds, but the text rects are in text-rect-bounds coordinates.
2096
2097         (WebKit::TextIndicator::Data::encode):
2098         (WebKit::TextIndicator::Data::decode):
2099         Adjust to the rename of textRectsInSelectionRectCoordinates -> textRectsInBoundingRectCoordinates.
2100         Encode/decode textBoundingRectInWindowCoordinates.
2101
2102         * Shared/TextIndicator.h:
2103         (WebKit::TextIndicator::contentImage): Deleted.
2104         Get rid of an unnecessary getter and constructor.
2105
2106 2014-11-06  Tim Horton  <timothy_horton@apple.com>
2107
2108         Only provide a single result to the action menu DDActionContext
2109         https://bugs.webkit.org/show_bug.cgi?id=138469
2110         <rdar://problem/18869036>
2111
2112         Reviewed by Anders Carlsson.
2113
2114         * WebProcess/WebPage/mac/WebPageMac.mm:
2115         (WebKit::scanForDataDetectedItems):
2116         Only provide one result; secondary results can be extremely unrelated to
2117         the primary one and confuse Data Detectors further down the line.
2118
2119 2014-11-06  Tim Horton  <timothy_horton@apple.com>
2120
2121         Null deref in rangeForDictionaryLookupAtHitTestResult on occasion
2122         https://bugs.webkit.org/show_bug.cgi?id=138459
2123         <rdar://problem/18872825>
2124
2125         Reviewed by Andreas Kling.
2126
2127         * WebProcess/WebPage/mac/WebPageMac.mm:
2128         (WebKit::rangeForDictionaryLookupAtHitTestResult):
2129         rangeExpandedAroundPositionByCharacters can return null.
2130
2131 2014-11-06  Tim Horton  <timothy_horton@apple.com>
2132
2133         Prefer link action menus over images
2134         https://bugs.webkit.org/show_bug.cgi?id=138461
2135         <rdar://problem/18768377>
2136
2137         Reviewed by Anders Carlsson.
2138
2139         * UIProcess/mac/WKActionMenuController.mm:
2140         (-[WKActionMenuController _defaultMenuItems:]):
2141         Swap the priority of links and images.
2142
2143 2014-11-05  Sam Weinig  <sam@webkit.org>
2144
2145         Use std::unique_ptr for TileController
2146         https://bugs.webkit.org/show_bug.cgi?id=138429
2147
2148         Reviewed by Anders Carlsson.
2149
2150         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2151         (WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
2152         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2153
2154 2014-11-06  Dan Bernstein  <mitz@apple.com>
2155
2156         iOS build fix.
2157
2158         * WebProcess/Plugins/PluginController.h:
2159
2160 2014-11-06  Daniel Bates  <dabates@apple.com>
2161
2162         [iOS] WebProcess needs to take a background task assertion to prevent being killed
2163         for "suspended with locked system files"
2164         https://bugs.webkit.org/show_bug.cgi?id=138155
2165         <rdar://problem/17939303>
2166
2167         Reviewed by Anders Carlsson.
2168
2169         Mitigates an issue where the WebProcess may be killed when suspended holding locked files
2170         by allowing the WebProcess to notify the UIProcess when it is holding such files so that
2171         both can continue to run for a period of time after the UIProcess transitions to the
2172         background. In particular, the WebProcess notifies the UIProcess that it is holding- or
2173         relinquished- a locked file when it begins and ends a sequence of SQLite transactions,
2174         respectively.
2175
2176         * UIProcess/WebProcessProxy.cpp:
2177         (WebKit::WebProcessProxy::disconnect): Relinquish an existing background task assertion
2178         when the WebProcess disconnects. Among other situations, the WebProcess may disconnect as
2179         a result of being suspended holding locked files even when the UIProcess requested a
2180         background task assertion (i.e. it may have exceeded its background time limit).
2181         (WebKit::WebProcessProxy::setIsHoldingLockedFiles): Added. Either acquires a new background
2182         task assertion or relinquishes an existing one.
2183         * UIProcess/WebProcessProxy.h:
2184         * UIProcess/WebProcessProxy.messages.in: Added message SetIsHoldingLockedFiles(bool). The WebProcess
2185         dispatches this message to inform the UIProcess that it is holding- or relinquished- a locked file.
2186         * WebKit2.xcodeproj/project.pbxproj: Added files WebSQLiteDatabaseTracker.{cpp, h}.
2187         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.cpp: Added.
2188         (WebKit::WebSQLiteDatabaseTracker::supplementName): Added.
2189         (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker): Added.
2190         (WebKit::WebSQLiteDatabaseTracker::initialize): Register to receive SQLiteDatabaseTrackerClient callbacks.
2191         (WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction): Inform the HysteresisActivity object on
2192         the main thread that we began a transaction so that it calls WebSQLiteDatabaseTracker::started().
2193         (WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction): Inform the HysteresisActivity object on
2194         the main thread that we finished a transaction so that it may eventually call WebSQLiteDatabaseTracker::stopped().
2195         (WebKit::WebSQLiteDatabaseTracker::started): Notify the UIProcess that the WebProcess is holding
2196         a locked file.
2197         (WebKit::WebSQLiteDatabaseTracker::stopped): Notify the UIProcess that the WebProcess has
2198         relinquished the locked file.
2199         * WebProcess/WebCoreSupport/WebSQLiteDatabaseTracker.h: Added. We use a HysteresisActivity object
2200         to coalesce SetIsHoldingLockedFiles(false) messages as an optimization to minimize the number of
2201         messages exchanged between the UIProcess and WebProcess when a web page performs SQLite transactions
2202         in batches.
2203         * WebProcess/WebProcess.cpp:
2204         (WebKit::WebProcess::WebProcess): Instantiate the supplement WebSQLiteDatabaseTracker when building
2205         for iOS.
2206
2207 2014-11-06  Alberto Garcia  <berto@igalia.com>
2208
2209         [GTK] [Stable] webkitgtk 2.6.1 fails to load flashplugin
2210         https://bugs.webkit.org/show_bug.cgi?id=137849
2211
2212         Reviewed by Carlos Garcia Campos.
2213
2214         NPPVpluginNeedsXEmbed is a boolean value, so it should normally
2215         use an NPBool (1 byte). However some plugins (the Flash player in
2216         particular) are using an int instead, so we have to do it as well
2217         else we'll end up corrupting the stack.
2218
2219         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2220         (WebKit::NetscapePlugin::platformPostInitialize):
2221
2222 2014-11-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2223
2224         [GTK] Add context menu API to Web Process Extensions
2225         https://bugs.webkit.org/show_bug.cgi?id=138311
2226
2227         Reviewed by Gustavo Noronha Silva.
2228
2229         Add WebKitWebPage::context-menu signal, similar to the
2230         WebKitWebView one, but that receives a WebKitWebHitTestResult, a
2231         class that extends WebKitTestResult to provide the WebKitDOMNode
2232         from the Web Process Extensions API. This makes WebKitContextMenu,
2233         WebKitContextMenuItem and WebKitTestResult classes shared between
2234         UI and Web Extensions APIs. In addition to be able to customize
2235         the context menu, it also provides API to set user data, as a
2236         GVariant, in the Web Process that is sent to the UI Process.
2237
2238         * PlatformGTK.cmake: Add new files.
2239         * UIProcess/API/gtk/WebKitContextMenu.cpp:
2240         (webkit_context_menu_set_user_data): Add user data to the context
2241         menu as a GVariant.
2242         (webkit_context_menu_get_user_data): Get the user data previously
2243         set with webkit_context_menu_set_user_data() either from the Web
2244         or UI processes.
2245         * UIProcess/API/gtk/WebKitContextMenu.h:
2246         * UIProcess/API/gtk/WebKitContextMenuActions.h:
2247         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
2248         (getContextMenuFromProposedMenu): Convert the received user data
2249         into a GVariant and pass it to webkitWebViewPopulateContextMenu().
2250         * UIProcess/API/gtk/WebKitContextMenuItem.h:
2251         * UIProcess/API/gtk/WebKitForwardDeclarations.h:
2252         * UIProcess/API/gtk/WebKitHitTestResult.h:
2253         * UIProcess/API/gtk/WebKitWebView.cpp:
2254         (webkitWebViewPopulateContextMenu): Set the user data received
2255         from the Web Process to the WebKitContextMenu before emitting
2256         WebKitWebView::context-menu.
2257         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
2258         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitWebHitTestResult.
2259         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2260         * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_web_hit_test_result_get_type.
2261         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.cpp: Added.
2262         (webkitWebHitTestResultGetProperty): Add getter for node property.
2263         (webkitWebHitTestResultSetProperty): Add setter for node property.
2264         (webkit_web_hit_test_result_class_init): Add node property.
2265         (webkitWebHitTestResultCreate): Create a new
2266         WebKitWebHitTestResult for the given InjectedBundleHitTestResult.
2267         (webkit_web_hit_test_result_get_node): Return the WebKitDOMNode.
2268         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResult.h: Added.
2269         * WebProcess/InjectedBundle/API/gtk/WebKitWebHitTestResultPrivate.h: Added.
2270         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2271         (getContextMenuFromDefaultMenu): Build a WebKitContextMenu and
2272         WebKitWebHitTestResult and emit WebKitWebPage::context-menu signal.
2273         (webkit_web_page_class_init): Add WebKitWebPage::context-menu signal.
2274         (webkitWebPageCreate): Add implementation for getContextMenuFromDefaultMenu.
2275         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2276
2277 2014-11-06  Ryuan Choi  <ryuan.choi@gmail.com>
2278
2279         [EFL] Remove m_scrollPosition from CoordinatedGraphicsScene
2280         https://bugs.webkit.org/show_bug.cgi?id=138419
2281
2282         Reviewed by Gyuyoung Kim.
2283
2284         m_scrollPosition of CoordinatedGraphicsScene is only to adjust the position
2285         of fixed element. But this adjustment is only called by paintToCurrentGLContext()
2286         and WebView can pass same information to the parameter of that method.
2287
2288         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
2289         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
2290         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
2291         (WebCore::CoordinatedGraphicsScene::setScrollPosition): Deleted.
2292         * UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h:
2293         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
2294         (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
2295         * UIProcess/CoordinatedGraphics/WebView.cpp:
2296         (WebKit::WebView::paintToCurrentGLContext):
2297
2298 2014-11-05  Commit Queue  <commit-queue@webkit.org>
2299
2300         Unreviewed, rolling out r175672.
2301         https://bugs.webkit.org/show_bug.cgi?id=138455
2302
2303         Tries to make backdrop layers on every layer, asserts on
2304         Mavericks (Requested by smfr on #webkit).
2305
2306         Reverted changeset:
2307
2308         "[filters2] Support for backdrop-filter"
2309         https://bugs.webkit.org/show_bug.cgi?id=138384
2310         http://trac.webkit.org/changeset/175672
2311
2312 2014-11-04  Ada Chan  <adachan@apple.com>
2313
2314         Figure out whether a plug-in is playing audio.
2315         https://bugs.webkit.org/show_bug.cgi?id=137219
2316
2317         Reviewed by Anders Carlsson.
2318
2319         Handle the setting of the NPPVpluginIsPlayingAudio variable.
2320
2321         * PluginProcess/PluginControllerProxy.cpp:
2322         (WebKit::PluginControllerProxy::setPluginIsPlayingAudio):
2323         Send a SetPluginIsPlayingAudio message to the WebProcess.
2324         * PluginProcess/PluginControllerProxy.h:
2325         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2326         (WebKit::NPN_SetValue):
2327         Handle NPPVpluginIsPlayingAudio. Call NetscapePlugin::setIsPlayingAudio().
2328         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2329         (WebKit::NetscapePlugin::setIsPlayingAudio):
2330         Call PluginControllerProxy::setPluginIsPlayingAudio().
2331         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2332         * WebProcess/Plugins/PluginController.h:
2333         * WebProcess/Plugins/PluginProxy.cpp:
2334         (WebKit::PluginProxy::setPluginIsPlayingAudio):
2335         Call PluginView::setPluginIsPlayingAudio().
2336         * WebProcess/Plugins/PluginProxy.h:
2337         * WebProcess/Plugins/PluginProxy.messages.in:
2338         Add the SetPluginIsPlayingAudio message.
2339         * WebProcess/Plugins/PluginView.cpp:
2340         (WebKit::PluginView::PluginView):
2341         Initialize m_pluginIsPlayingAudio.
2342         (WebKit::PluginView::~PluginView):
2343         Remove itself from the Document's list of AudioProducers.
2344         (WebKit::PluginView::initializePlugin):
2345         Add itself to the Document's list of AudioProducers.
2346         (WebKit::PluginView::pageMutedStateDidChange):
2347         Add a FIXME.
2348         (WebKit::PluginView::setPluginIsPlayingAudio):
2349         If m_pluginIsPlayingAudio has changed, tell the Document to update its audio playing state.
2350         * WebProcess/Plugins/PluginView.h:
2351         Now inherits AudioProducer.
2352
2353 2014-11-05  Dan Bernstein  <mitz@apple.com>
2354
2355         Tried to fix the GTK build.
2356
2357         * PlatformGTK.cmake: Removed references to deletion UI resources that have been removed.
2358
2359 2014-11-04  Dean Jackson  <dino@apple.com>
2360
2361         [filters2] Support for backdrop-filter
2362         https://bugs.webkit.org/show_bug.cgi?id=138384
2363         <rdar://problem/18874494>
2364
2365         Reviewed by Simon Fraser.
2366
2367         * Shared/mac/RemoteLayerBackingStore.mm:
2368         (WebKit::RemoteLayerBackingStore::drawInContext): Handle LayerTypeBackdropLayer in the switch.
2369         * Shared/mac/RemoteLayerTreeTransaction.mm:
2370         (WebKit::RemoteLayerTreeTransaction::description): Describe a backdrop layer.
2371         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
2372         (+[WKBackdropView layerClass]): Define CABackdropLayer and use it as the class.
2373         (WebKit::RemoteLayerTreeHost::createLayer):
2374         * UIProcess/mac/RemoteLayerTreeHost.mm: Ditto.
2375         (WebKit::RemoteLayerTreeHost::createLayer):
2376
2377 2014-11-05  Ryuan Choi  <ryuan.choi@gmail.com>
2378
2379         [EFL] Improve previous temporary fix against drawing (0,0) position before rendering content of next web page
2380         https://bugs.webkit.org/show_bug.cgi?id=138305
2381
2382         Reviewed by Gyuyoung Kim.
2383
2384         WebKit2 has freezed layer tree until frame load completion since r101838.
2385         In EFL port, we unfreeze it when PageViewportController::pageTransitionViewportReady() is called though,
2386         UIProcess on EFL port updates cairo surface during the freezing time of layer tree.
2387         Thus UIProcess should not update the layer trees until the layerTreeState is unfrozen.
2388
2389         * UIProcess/API/efl/EwkView.h: Removed previous workarounds.
2390         (EwkView::setWaitingForNewPage): Deleted.
2391         (EwkView::waitingForNewPage): Deleted.
2392         (EwkView::didCommitNewPage): Deleted.
2393         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
2394         (WebKit::PageViewportController::PageViewportController):
2395         (WebKit::PageViewportController::didCommitLoad):
2396         (WebKit::PageViewportController::didRenderFrame):
2397         (WebKit::PageViewportController::syncVisibleContents):
2398         * UIProcess/CoordinatedGraphics/PageViewportController.h:
2399         * UIProcess/efl/PageLoadClientEfl.cpp:
2400         (WebKit::PageLoadClientEfl::didCommitLoadForFrame):
2401         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
2402         (WebKit::PageViewportControllerClientEfl::didChangeVisibleContents):
2403         * UIProcess/efl/ViewClientEfl.cpp:
2404         (WebKit::ViewClientEfl::didRenderFrame):
2405
2406 2014-11-05  Timothy Horton  <timothy_horton@apple.com>
2407
2408         Fix the build.
2409
2410         * UIProcess/mac/WKActionMenuController.mm:
2411
2412 2014-11-05  Dan Bernstein  <mitz@apple.com>
2413
2414         Remove the unused deletion UI feature
2415         https://bugs.webkit.org/show_bug.cgi?id=138442
2416
2417         Rubber-stamped by Alexey Proskuryakov.
2418
2419         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2420         (WebKit::WebEditorClient::shouldShowDeleteInterface): Deleted.
2421         * WebProcess/WebCoreSupport/WebEditorClient.h:
2422
2423 2014-11-05  Conrad Shultz  <conrad_shultz@apple.com>
2424
2425         It should be possible to open a page preview by clicking on it
2426         https://bugs.webkit.org/show_bug.cgi?id=138445
2427
2428         Reviewed by Tim Horton.
2429
2430         Add a click recognizer to WKPagePreviewViewController and plumb it through to WKActionMenuController.
2431
2432         * UIProcess/mac/WKActionMenuController.mm:
2433         Declare <WKPagePreviewViewControllerDelegate>, currently home to just a single method.
2434         (-[WKPagePreviewViewController loadView]):
2435         Configure and add a click gesture recognizer to the WKWebView.
2436         (-[WKPagePreviewViewController _clickRecognized:]):
2437         Gesture recognizer action; send -pagePreviewViewControllerWasClicked: to the delegate.
2438         (-[WKActionMenuController willDestroyView:]):
2439         Extract code to -_clearPreviewPopover.
2440         (-[WKActionMenuController didCloseMenu:withEvent:]):
2441         Ditto.
2442         (-[WKActionMenuController _createPreviewPopoverForURL:]):
2443         Set ourself as the delegate of the page preview controller.
2444         (-[WKActionMenuController _clearPreviewPopover]):
2445         Extracted from various other methods; if appropriate, nil out the preview view controller's delegate.
2446         (-[WKActionMenuController popoverWillClose:]):
2447         Extract code to -_clearPreviewPopover.
2448         (-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
2449         WKPagePreviewViewControllerDelegate method; open the URL of the clicked page.
2450
2451 2014-11-05  Beth Dakin  <bdakin@apple.com>
2452
2453         Page preview popover should show scaled-down web content
2454         https://bugs.webkit.org/show_bug.cgi?id=138444
2455
2456         Reviewed by Anders Carlsson.
2457
2458         Instead of keeping the preferred size in the controller, keep the main view’s 
2459         size, and then scale the bounds of the popover’s view using that and the scale 
2460         factor as a constant. Set the size of the popover explicitly so that it doesn’t 
2461         get the view’s size. This will cause it to scale the WKWebView.
2462         * UIProcess/mac/WKActionMenuController.mm:
2463         (-[WKPagePreviewViewController initWithPageURL:]):
2464         (-[WKPagePreviewViewController loadView]):
2465         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
2466         (-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]):
2467
2468 2014-11-05  Conrad Shultz  <conrad_shultz@apple.com>
2469
2470         Page preview popovers sometimes cover their originating element
2471         https://bugs.webkit.org/show_bug.cgi?id=138437
2472
2473         Reviewed by Beth Dakin.
2474
2475         If a popover is sufficiently large, and the originating element is in a particular location, it's
2476         possible that the popover can't be positioned in a manner that doesn't occlude the originating element.
2477         Address this by scaling down the popover content if it can't fit entirely between the originating
2478         element and the screen edge.
2479
2480         * UIProcess/mac/WKActionMenuController.mm:
2481         (-[WKActionMenuController _previewURLFromActionMenu:]):
2482         Update to use -_createPreviewPopoverForURL:originRect:.
2483         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
2484         Renamed from -_createPreviewPopoverForURL:; extract code to -_preferredSizeForPopoverPresentedFromOriginRect:.
2485         (-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]):
2486         Compute a size that is as large as possible while keeping the popover between the origin rect and screen edge
2487         (with an arbitrary padding applied to keep from directly abutting the screen edge).
2488         (-[WKActionMenuController _createPreviewPopoverForURL:]): Deleted.
2489
2490 2014-11-05  Alexey Proskuryakov  <ap@apple.com>
2491
2492         fast/dom/remove-body-during-body-replacement2.html fails on WK2
2493         https://bugs.webkit.org/show_bug.cgi?id=138334
2494
2495         Reviewed by Anders Carlsson.
2496
2497         Added an SPI to focus a frame.
2498
2499         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2500         (WKBundleFrameFocus):
2501         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2502         * WebProcess/WebPage/WebPage.cpp:
2503         (WebKit::WebPage::setViewState):
2504
2505 2014-11-05  Tim Horton  <timothy_horton@apple.com>
2506
2507         Select Data Detectors results instead of just highlighting them
2508         https://bugs.webkit.org/show_bug.cgi?id=138435
2509         <rdar://problem/18877675>
2510
2511         Reviewed by Beth Dakin.
2512
2513         * UIProcess/WebPageProxy.cpp:
2514         (WebKit::WebPageProxy::selectLastActionMenuRange):
2515         (WebKit::WebPageProxy::selectLookupTextAtLocation): Deleted.
2516         Rename selectLookupTextAtLocation to selectLastActionMenuRange.
2517
2518         * UIProcess/WebPageProxy.h:
2519         * UIProcess/mac/WKActionMenuController.mm:
2520         (-[WKActionMenuController willOpenMenu:withEvent:]):
2521         Do a real selection for single-item Data Detector menus; show the yellow highlight otherwise.
2522         Adopt selectLastActionMenuRange for non-detected text.
2523
2524         * WebProcess/WebPage/WebPage.h:
2525         * WebProcess/WebPage/WebPage.messages.in:
2526         * WebProcess/WebPage/mac/WebPageMac.mm:
2527         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2528         (WebKit::WebPage::selectLastActionMenuRange):
2529         (WebKit::WebPage::selectLookupTextAtLocation): Deleted.
2530         Store the last (detected data or Lookup-derived) action menu range.
2531         Select it upon selectLastActionMenuRange.
2532
2533 2014-11-04  Jon Honeycutt  <jhoneycutt@apple.com>
2534
2535         WebContent crash in WebPage::selectWithGesture()
2536
2537         <https://bugs.webkit.org/show_bug.cgi?id=138399>
2538         <rdar://problem/18550631>
2539
2540         This crash occurs when the web process receives a "TapAndAHalf" gesture
2541         with the "Changed" state without having received a "TapAndAHalf"
2542         gesture with the "Began" state.
2543
2544         No test possible.
2545
2546         Reviewed by Simon Fraser.
2547
2548         * WebProcess/WebPage/ios/WebPageIOS.mm:
2549         (WebKit::WebPage::selectWithGesture):
2550         Null check m_currentWordRange before dereferencing it.
2551
2552 2014-11-05  Conrad Shultz  <conrad_shultz@apple.com>
2553
2554         Disable action menus on page previews
2555         https://bugs.webkit.org/show_bug.cgi?id=138431
2556
2557         Reviewed by Anders Carlsson.
2558
2559         * UIProcess/API/mac/WKView.mm:
2560         (-[WKView _shouldIgnoreMouseEvents]):
2561         Renamed from -shouldIgnoreMouseEvents since this isn't actually public.
2562         (-[WKView swipeWithEvent:]):
2563         (-[WKView mouseMoved:]):
2564         (-[WKView mouseDown:]):
2565         (-[WKView mouseUp:]):
2566         (-[WKView mouseDragged:]):
2567         Updated to reflect method rename.
2568         (-[WKView shouldIgnoreMouseEvents]): Deleted.
2569
2570         * UIProcess/API/mac/WKViewInternal.h:
2571         Expose -_shouldIgnoreMouseEvents.
2572
2573         * UIProcess/mac/WKActionMenuController.mm:
2574         (-[WKActionMenuController prepareForMenu:withEvent:]):
2575         Cancel the menu if the presenting WKView should ignore mouse events.
2576
2577 2014-11-05  Beth Dakin  <bdakin@apple.com>
2578
2579         Action menu URL preview should "peek," i.e. appear when the menu item is 
2580         highlighted
2581         https://bugs.webkit.org/show_bug.cgi?id=138432
2582         -and corresponding-
2583         rdar://problem/18774264
2584
2585         Reviewed by Anders Carlsson.
2586
2587         New ivars. Keep a reference to the popover, and a BOOL that indicates whether we 
2588         should close the popover when the menu goes away.
2589         * UIProcess/mac/WKActionMenuController.h:
2590         * UIProcess/mac/WKActionMenuController.mm:
2591
2592         Re-set the preview bool to NO whenever we are about to pop up a new menu.
2593         (-[WKActionMenuController prepareForMenu:withEvent:]):
2594
2595         Close the popover when the menu closes unless _shouldKeepPreviewPopoverOpen has 
2596         been set.
2597         (-[WKActionMenuController didCloseMenu:withEvent:]):
2598
2599         Set _shouldKeepPreviewPopoverOpen.
2600         (-[WKActionMenuController _keepPreviewOpen:]):
2601
2602         Re-factored to use ivar.
2603         (-[WKActionMenuController _previewURLFromActionMenu:]):
2604         (-[WKActionMenuController _createPreviewPopoverForURL:]):
2605
2606         Now call _previewURLFromActionMenu on menu item highlight.
2607         (-[WKActionMenuController menu:willHighlightItem:]):
2608
2609         NSPopover delegate method so that we can keep our BOOL and ivar accurate in the 
2610         case where the popover is closed by some other mechanism than the action menu 
2611         going away.
2612         (-[WKActionMenuController popoverWillClose:]):
2613
2614         New selector for the preview. Now when this item is actually selected, we just 
2615         want to set the BOOL _shouldKeepPreviewPopoverOpen to YES so that we keep the 
2616         preview open.
2617         (-[WKActionMenuController _createActionMenuItemForTag:]):
2618
2619 2014-11-05  Conrad Shultz  <conrad_shultz@apple.com>
2620
2621         Disable interaction with action menu page previews
2622         https://bugs.webkit.org/show_bug.cgi?id=138400
2623
2624         Reviewed by Tim Horton.
2625
2626         Expand on the existing -[WKView shouldIgnoreMouseEvents] by adding facilities to suppress handling
2627         of all non-wheel events, effectively creating a scroll-only web view. Deploy this in
2628         WKPagePreviewViewController.
2629
2630         * UIProcess/API/Cocoa/WKViewPrivate.h:
2631         Declare the OS X-only ignoresNonWheelMouseEvents SPI.
2632
2633         * UIProcess/API/Cocoa/WKWebView.mm:
2634         (-[WKWebView _ignoresNonWheelMouseEvents]):
2635         (-[WKWebView _setIgnoresNonWheelMouseEvents:]):
2636         Wrap the underlying WKView methods.
2637
2638         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2639         Declare the OS X-only ignoresNonWheelMouseEvents property.
2640
2641         * UIProcess/API/mac/WKView.mm:
2642         Add _ignoresNonWheelMouseEvents to WKViewData.
2643         (-[WKView shouldIgnoreMouseEvents]):
2644         Include a check for _ignoresNonWheelMouseEvents.
2645         (-[WKView _setIgnoresNonWheelMouseEvents:]):
2646         Set the ivar in WKViewData.
2647         (-[WKView _ignoresNonWheelMouseEvents]):
2648         Fetch the ivar in WKViewData.
2649         (-[WKView _shouldIgnoreWheelEvents]):
2650         Implement the old -shouldIgnoreMouseEvents behavior.
2651         (-[WKView scrollWheel:]):
2652         -shouldIgnoreMouseEvents -> -_shouldIgnoreWheelEvents.
2653
2654         * UIProcess/mac/WKActionMenuController.mm:
2655         (-[WKPagePreviewViewController loadView]):
2656         Configure the WKWebView to ignore non-wheel mouse events; use RetainPtr for the WKWebView.
2657
2658 2014-11-03  Dean Jackson  <dino@apple.com>
2659
2660         Add ENABLE_FILTERS_LEVEL_2 feature guard.
2661         https://bugs.webkit.org/show_bug.cgi?id=138362
2662
2663         Reviewed by Tim Horton.
2664
2665         Add a new feature define for Level 2 of CSS Filters.
2666         http://dev.w3.org/fxtf/filters-2/
2667
2668         * Configurations/FeatureDefines.xcconfig:
2669
2670 2014-11-05  Alberto Garcia  <berto@igalia.com>
2671
2672         NetscapePlugin: NPP_GetValue should receive a pointer to NPBool, not bool
2673         https://bugs.webkit.org/show_bug.cgi?id=138418
2674
2675         Reviewed by Carlos Garcia Campos.
2676
2677         Replace bool with NPBool, which is actually an unsigned char.
2678
2679         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
2680         (WebKit::NetscapePlugin::platformPostInitialize):
2681
2682 2014-11-05  Carlos Garcia Campos  <cgarcia@igalia.com>
2683
2684         [GTK] Add WebKitWebResource::failed-with-tls-errors signal
2685         https://bugs.webkit.org/show_bug.cgi?id=137862
2686
2687         Reviewed by Gustavo Noronha Silva.
2688
2689         When a resource load fails due to TLS errors emit WebKitWebResource::failed-with-tls-errors
2690         signal instead of WebKitWebResource::failed so that TLS errors information and certificate
2691         are provided.
2692
2693         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
2694         (didReceiveWebViewMessageFromInjectedBundle): Check if the error
2695         is a TLS failure to emit failed-with-tls-errors instead of failed.
2696         * UIProcess/API/gtk/WebKitWebResource.cpp:
2697         (webkit_web_resource_class_init): Add WebKitWebResource::failed-with-tls-errors signal.
2698         (webkitWebResourceFailedWithTLSErrors): Emit failed-with-tls-errors and finish signals.
2699         * UIProcess/API/gtk/WebKitWebResourcePrivate.h:
2700
2701 2014-11-05  Shivakumar JM  <shiva.jm@samsung.com>
2702
2703         Fix build warning in WebKit2/WebProcess module.
2704         https://bugs.webkit.org/show_bug.cgi?id=138410
2705
2706         Reviewed by Alexey Proskuryakov.
2707
2708         Fix build warning by removing parameter name
2709
2710         * WebProcess/WebPage/WebPageOverlay.h:
2711         (WebKit::WebPageOverlay::Client::prepareForActionMenu):
2712
2713 2014-11-05  Antti Koivisto  <antti@apple.com>
2714
2715         Move HTTPHeaderMap encoding to the class
2716         https://bugs.webkit.org/show_bug.cgi?id=138412
2717
2718         Reviewed by Andreas Kling.
2719
2720         * PluginProcess/PluginControllerProxy.cpp:
2721         * Shared/WebCoreArgumentCoders.cpp:
2722         (IPC::ArgumentCoder<HTTPHeaderMap>::encode): Deleted.
2723         (IPC::ArgumentCoder<HTTPHeaderMap>::decode): Deleted.
2724
2725             Make these HTTPHeaderMap members instead so they can access internals and can be used elsewhere.
2726
2727         * Shared/WebCoreArgumentCoders.h:
2728
2729 2014-11-04  Beth Dakin  <bdakin@apple.com>
2730
2731         Speculative build fix.
2732
2733         * UIProcess/API/mac/WKView.mm:
2734         (-[WKView _dismissActionMenuDataDetectorPopovers]):
2735         * UIProcess/API/mac/WKViewInternal.h:
2736
2737 2014-11-04  Beth Dakin  <bdakin@apple.com>
2738
2739         Un-anchor data detector popovers on scroll
2740         https://bugs.webkit.org/show_bug.cgi?id=138385
2741         -and corresponding-
2742         rdar://problem/18869345
2743
2744         Reviewed by Tim Horton.
2745
2746         Whenever we dismiss the dictionary popover, and on scroll, we should try to 
2747         dismiss the data detector popovers. Right now we don’t have the ability to know if 
2748         a dismiss succeeded, so we will settle for un-anchoring the popover.
2749
2750         * UIProcess/API/mac/WKView.mm:
2751         (-[WKView viewDidMoveToWindow]):
2752         (-[WKView _dismissActionMenuDataDetetcorPopovers]):
2753         * UIProcess/API/mac/WKViewInternal.h:
2754         * UIProcess/PageClient.h:
2755         * UIProcess/WebPageProxy.cpp:
2756         (WebKit::WebPageProxy::didCommitLoadForFrame):
2757         (WebKit::WebPageProxy::pageDidScroll):
2758         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2759         * UIProcess/mac/PageClientImpl.h:
2760         * UIProcess/mac/PageClientImpl.mm:
2761         (WebKit::PageClientImpl::dismissActionMenuDataDetetcorPopovers):
2762         * UIProcess/mac/WKActionMenuController.h:
2763         * UIProcess/mac/WKActionMenuController.mm:
2764         (-[WKActionMenuController dismissActionMenuDataDetetcorPopovers]):
2765
2766 2014-11-04  Andy Estes  <aestes@apple.com>
2767
2768         [iOS] WKPDFView should scroll to a fragment when loading a PDF
2769         https://bugs.webkit.org/show_bug.cgi?id=138404
2770
2771         Reviewed by Tim Horton.
2772
2773         WKPDFView already knew how to scroll to a page number fragment during a same-document navigation, but it didn't
2774         know to do so when loading a PDF whose URL already contained a page number fragment. This could happen if the
2775         user long-presses a page number link and taps 'Open in New Tab'.
2776
2777         * UIProcess/ios/WKPDFView.mm:
2778         (-[WKPDFView web_setContentProviderData:suggestedFilename:]): Called _scrollToFragment:.
2779         (-[WKPDFView _scrollToFragment:]): Moved fragment scrolling code to here from web_didSameDocumentNavigation:.
2780         (-[WKPDFView web_didSameDocumentNavigation:]): Called _scrollToFragment.
2781
2782 2014-11-04  Andy Estes  <aestes@apple.com>
2783
2784         [iOS] Stop using +[NSURL _web_URLWithWTFString:relativeToURL:] in WKPDFView
2785         https://bugs.webkit.org/show_bug.cgi?id=138357
2786
2787         Rubber-stamped by Dan Bernstein.
2788
2789         During patch review for r175595 I changed from using +URLWithString:relativeToURL: to using
2790         +_web_URLWithWTFString:relativeToURL: to append a page number fragment to the document URL.
2791         If the base URL already contains a fragment, +_web_URLWithWTFString:relativeToURL: appends to the existing
2792         fragment whereas +URLWithString:relativeToURL: replaces the existing fragment. I want the latter behavior.
2793
2794         * UIProcess/ios/WKPDFView.mm:
2795         (-[WKPDFView _URLForLinkAnnotation:]):
2796
2797 2014-11-04  Tim Horton  <timothy_horton@apple.com>
2798
2799         Add bundle SPI allowing PageOverlay to customize the action menu
2800         https://bugs.webkit.org/show_bug.cgi?id=138388
2801         <rdar://problem/18875579>
2802
2803         Reviewed by Anders Carlsson.
2804
2805         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2806         Bump the BundlePageOverlay client version.
2807
2808         (WKBundlePageOverlayCreate):
2809         (WKBundlePageOverlaySetAccessibilityClient):
2810         Don't return if we have a version; the version check happens later anyway,
2811         and now it is valid to have a version >0.
2812
2813         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
2814         Bump the BundlePageOverlay client version.
2815         Add prepareForActionMenu callback.
2816
2817         * WebProcess/WebPage/WebPageOverlay.h:
2818         (WebKit::WebPageOverlay::Client::prepareForActionMenu):
2819         * WebProcess/WebPage/WebPageOverlay.cpp:
2820         (WebKit::overlayMap):
2821         (WebKit::WebPageOverlay::WebPageOverlay):
2822         (WebKit::WebPageOverlay::~WebPageOverlay):
2823         (WebKit::WebPageOverlay::fromCoreOverlay):
2824         (WebKit::WebPageOverlay::pageOverlayDestroyed):
2825         Keep track of a map of PageOverlay to WebPageOverlay.
2826
2827         (WebKit::WebPageOverlay::prepareForActionMenu):
2828         Forward prepareForActionMenu to the client.
2829         
2830         * WebProcess/WebPage/mac/WebPageMac.mm:
2831         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2832         Iterate through the overlays and let them prepareForActionMenu;
2833         the first overlay that returns true wins. If no overlays want to
2834         do anything, hand preparation along to the context menu client.
2835
2836 2014-11-03  Jeremy Jones  <jeremyj@apple.com>
2837
2838         Add button and enable optimized fullscreen.
2839         https://bugs.webkit.org/show_bug.cgi?id=138351
2840
2841         Reviewed by Eric Carlson.
2842
2843         Add IsOptimizedFullscreenSupported to enable the feature only where appropriate.
2844
2845         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2846         (InitWebCoreSystemInterface): add IsOptimizedFullscreenSupported
2847
2848 2014-11-04  Andy Estes  <aestes@apple.com>
2849
2850         [iOS] Add long press support for links in WKPDFView
2851         https://bugs.webkit.org/show_bug.cgi?id=138357
2852
2853         Reviewed by Dan Bernstein.
2854
2855         Use WKActionSheetAssistant to show a link action sheet in response to long-pressing on a link. Have WKPDFView
2856         conform to WKActionSheetAssistantDelegate in order to respond to the open and copy actions as well as to
2857         provide the link's URL and position information to WKActionSheetAssistant. The long-pressed link is highlighted
2858         for .75 seconds before the sheet is displayed in order to match UIWebPDFView.
2859
2860         * UIProcess/ios/WKActionSheetAssistant.h: Made protocol methods that WKPDFView doesn't implement optional.
2861         * UIProcess/ios/WKActionSheetAssistant.mm:
2862         (-[WKActionSheetAssistant updatePositionInformation]): Checked if delegate responds to
2863         updatePositionInformationForActionSheetAssistant: before calling.
2864         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]): Checked if delegate responds to
2865         actionSheetAssistant:willStartInteractionWithElement: before calling.
2866         (-[WKActionSheetAssistant cleanupSheet]): Checked if delegate responds to actionSheetAssistantDidStopInteraction:
2867         before calling.
2868         * UIProcess/ios/WKPDFView.h: Conformed to WKActionSheetAssistantDelegate.
2869         * UIProcess/ios/WKPDFView.mm:
2870         (-[WKPDFView web_initWithFrame:webView:]): Instantiated a WKActionSheetAssistant and set self as its delegate.
2871         (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]): Moved highlight drawing to here from
2872         annotation:wasTouchedAtPoint:controller: in order to be reused for long-press.
2873         (-[WKPDFView _URLForLinkAnnotation:]): Moved URL creation to here from annotation:wasTouchedAtPoint:controller:
2874         in order to be reused for long-press. Generated an absolute URL since this URL might go into the pasteboard.
2875         (-[WKPDFView annotation:wasTouchedAtPoint:controller:]): Changed to call
2876         _highlightLinkAnnotation:forDuration:completionHandler: and _URLForLinkAnnotation:.
2877         (-[WKPDFView annotation:isBeingPressedAtPoint:controller:]): Set values on _positionInformation and called
2878         -[WKActionSheetAssistant showLinkSheet] after showing a highlight for .75 seconds.
2879         (-[WKPDFView positionInformation]): Returned _positionInformation.
2880         (-[WKPDFView performAction:]): Added a UTF-8 text and URL representation of the pressed URL to the pasteboard.
2881         (-[WKPDFView openElementAtLocation:]): Called WebPage::navigateToURLWithSimulatedClick().
2882         (-[WKPDFView actionsForElement:defaultActions:]): Returned actions from UIClient::actionsForElement().
2883         (-[WKPDFView _createHighlightViewWithFrame:]): Deleted.
2884
2885 2014-11-04  Anders Carlsson  <andersca@apple.com>
2886
2887         Try to fix the 32-bit build.
2888
2889         * UIProcess/mac/WKActionMenuController.mm:
2890         (-[WKActionMenuController _defaultMenuItemsForLink]):
2891         (-[WKActionMenuController _createActionMenuItemForTag:]):
2892
2893 2014-11-04  Conrad Shultz  <conrad_shultz@apple.com>
2894
2895         Use a web view for Quick Look in action menus
2896         https://bugs.webkit.org/show_bug.cgi?id=138370
2897
2898         Reviewed by Anders Carlsson.
2899
2900         Instead of using the QLPreviewBubble SPI, show a popover containing a web view. This currently
2901         does not inherit any configuration from the presenting WKView and does not expose any
2902         customization options.
2903
2904         * UIProcess/mac/WKActionMenuController.mm:
2905         Declare new internal NSViewController subclass, WKPagePreviewViewController.
2906         (-[WKPagePreviewViewController initWithPageURL:]):
2907         Store the passed-in URL and set a somewhat arbitrary (iPhone 5 screen size) default preferred size.
2908         (-[WKPagePreviewViewController loadView]):
2909         Create a WKWebView and load the URL passed into the initializer.
2910         (-[WKActionMenuController _previewURLFromActionMenu:]):
2911         Renamed from -_quickLookURLFromActionMenu:; present the popover returned by -_createPreviewPopoverForURL:.
2912         (-[WKActionMenuController _createPreviewPopoverForURL:]):
2913         New helper method; return a popover that owns a _WKPagePreviewViewController configured to show a scaled-down web page.
2914         (-[WKActionMenuController _createActionMenuItemForTag:]):
2915         Update to reflect method rename.
2916         (-[WKActionMenuController _quickLookURLFromActionMenu:]): Deleted.
2917
2918 2014-11-04  Chris Dumez  <cdumez@apple.com>
2919
2920         Add ptr() method to Ref class
2921         https://bugs.webkit.org/show_bug.cgi?id=138361
2922
2923         Reviewed by Darin Adler.
2924
2925         Use the new Ref::ptr() method.
2926
2927         * UIProcess/WebContext.cpp:
2928         (WebKit::WebContext::createWebPage):
2929         * UIProcess/WebPageProxy.cpp:
2930         (WebKit::WebPageProxy::setPreferences):
2931         * UIProcess/WebProcessProxy.cpp:
2932         (WebKit::WebProcessProxy::didNavigateWithNavigationData):
2933         (WebKit::WebProcessProxy::didPerformClientRedirect):
2934         (WebKit::WebProcessProxy::didPerformServerRedirect):
2935         (WebKit::WebProcessProxy::didUpdateHistoryTitle):
2936
2937 2014-11-04  Andy Estes  <aestes@apple.com>
2938
2939         [iOS] Include a WKActionSheetAssistant parameter in WKActionSheetAssistantDelegate methods
2940         https://bugs.webkit.org/show_bug.cgi?id=137792
2941
2942         Reviewed by Dan Bernstein.
2943
2944         * UIProcess/API/Cocoa/_WKElementAction.mm:
2945         (+[_WKElementAction elementActionWithTitle:actionHandler:]):
2946         (+[_WKElementAction elementActionWithType:customTitle:]):
2947         (-[_WKElementAction _runActionWithElementInfo:forActionSheetAssistant:]):
2948         * UIProcess/API/Cocoa/_WKElementActionInternal.h:
2949         * UIProcess/ios/WKActionSheetAssistant.h:
2950         * UIProcess/ios/WKActionSheetAssistant.mm:
2951         (-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
2952         (-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
2953         (-[WKActionSheetAssistant updatePositionInformation]):
2954         (-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
2955         (-[WKActionSheetAssistant showImageSheet]):
2956         (-[WKActionSheetAssistant showLinkSheet]):
2957         (-[WKActionSheetAssistant showDataDetectorsSheet]):
2958         (-[WKActionSheetAssistant cleanupSheet]):
2959         * UIProcess/ios/WKContentViewInteraction.mm:
2960         (-[WKContentView positionInformationForActionSheetAssistant:]):
2961         (-[WKContentView updatePositionInformationForActionSheetAssistant:]):
2962         (-[WKContentView actionSheetAssistant:performAction:]):
2963         (-[WKContentView actionSheetAssistant:openElementAtLocation:]):
2964         (-[WKContentView actionSheetAssistant:decideActionsForElement:defaultActions:]):
2965         (-[WKContentView actionSheetAssistant:willStartInteractionWithElement:]):
2966         (-[WKContentView actionSheetAssistantDidStopInteraction:]):
2967
2968 2014-11-04  Csaba Osztrogonác  <ossy@webkit.org>
2969
2970          URTBF after r175564 for !PLATFORM(COCOA).
2971
2972         * Shared/TextIndicator.cpp:
2973
2974 2014-11-04  Tim Horton  <timothy_horton@apple.com>
2975
2976         Implement yellow highlight over data detected items
2977         https://bugs.webkit.org/show_bug.cgi?id=138340
2978         <rdar://problem/18840102>
2979
2980         Reviewed by Anders Carlsson.
2981
2982         * Shared/TextIndicator.cpp: Renamed from Source/WebKit2/UIProcess/TextIndicator.cpp.
2983         * Shared/TextIndicator.h: Renamed from Source/WebKit2/UIProcess/TextIndicator.h.
2984         Move TextIndicator to Shared.
2985         Move all of the members to a Data struct.
2986         Implement encode/decode for TextIndicator::Data, so it can be passed as
2987         the argument to SetTextIndicator, and also as a field on ActionMenuHitTestResult.
2988         Add 'createWithSelectionInFrame', which builds a TextIndicator
2989         from the selection in the given frame.
2990
2991         * Shared/mac/ActionMenuHitTestResult.h:
2992         * Shared/mac/ActionMenuHitTestResult.mm:
2993         (WebKit::ActionMenuHitTestResult::encode):
2994         (WebKit::ActionMenuHitTestResult::decode):
2995         Rename actionBoundingBox to detectedDataBoundingBox.
2996         Store/encode/decode detectedDataTextIndicator.
2997
2998         * UIProcess/WebPageProxy.cpp:
2999         (WebKit::WebPageProxy::setTextIndicator):
3000         * UIProcess/WebPageProxy.h:
3001         * UIProcess/WebPageProxy.messages.in:
3002         Create a TextIndicator from the TextIndicator::Data.
3003         Add an explicit ClearTextIndicator message instead of sending empty Data.
3004         
3005         * UIProcess/mac/WKActionMenuController.h:
3006         * UIProcess/mac/WKActionMenuController.mm:
3007         (-[WKActionMenuController prepareForMenu:withEvent:]):
3008         If the text indicator is up when preparing for a new menu invocation, hide it.
3009
3010         (-[WKActionMenuController willOpenMenu:withEvent:]):
3011         Show the text indicator when the menu opens, for data detected items.
3012
3013         (-[WKActionMenuController didCloseMenu:withEvent:]):
3014         Hide the text indicator when the menu closes, unless we only had one item.
3015         Then, we'll hide it in the DDActionContext completionHandler block.
3016         
3017         (-[WKActionMenuController _showTextIndicator]):
3018         (-[WKActionMenuController _hideTextIndicator]):
3019         Added. Show and hide the text indicator based on the TextIndicator
3020         data included in the action menu hit test result.
3021
3022         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
3023         Hide the text indicator when the data detector popover completes.
3024
3025         * WebKit2.xcodeproj/project.pbxproj:
3026         * WebProcess/WebPage/FindController.cpp:
3027         (WebKit::FindController::getImageForFindMatch):
3028         Make use of the newly-moved createSelectionSnapshot.
3029
3030         (WebKit::FindController::updateFindIndicator):
3031         Make use of TextIndicator::createWithSelectionInFrame, which allows
3032         us to share this code for building a TextIndicator with other callers.
3033
3034         (WebKit::FindController::hideFindIndicator):
3035
3036         (WebKit::getFindIndicatorBitmap): Deleted.
3037         Move getFindIndicatorBitmap to WebFrame::createSelectionSnapshot.
3038
3039         * WebProcess/WebPage/WebFrame.cpp:
3040         (WebKit::WebFrame::createSelectionSnapshot):
3041         Moved from FindController's getFindIndicatorBitmap.
3042         Now returns a ShareableBitmap instead of going ahead and making a Handle.
3043
3044         * WebProcess/WebPage/WebFrame.h:
3045         * WebProcess/WebPage/mac/WebPageMac.mm:
3046         (WebKit::scanForDataDetectedItems):
3047         (WebKit::textIndicatorForRange):
3048         Temporarily change the selection to the given range, then use
3049         TextIndicator::indicatorWithSelectionInFrame to acquire a TextIndicator,
3050         then reset the selection.
3051
3052         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3053         Create a TextIndicator from the data detected range.
3054
3055 2014-11-04  Andy Estes  <aestes@apple.com>
3056
3057         Fix the iOS build after r175549.
3058
3059         * WebProcess/WebPage/ios/WebPageIOS.mm:
3060         (WebKit::WebPage::performActionOnElement):
3061
3062 2014-11-04  Darin Adler  <darin@apple.com>
3063
3064         Eliminate ResourceBuffer and use SharedBuffer directly instead
3065         https://bugs.webkit.org/show_bug.cgi?id=138174
3066
3067         Reviewed by Antti Koivisto.
3068
3069         * CMakeLists.txt: Removed WebResourceBuffer.cpp.
3070
3071         * NetworkProcess/NetworkResourceLoader.cpp:
3072         (WebKit::NetworkResourceLoader::sendBuffer): Use a reference instead of pointer.
3073         * NetworkProcess/NetworkResourceLoader.h: Ditto.
3074         * NetworkProcess/mac/NetworkDiskCacheMonitor.h: Ditto.
3075         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
3076         (WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked): Ditto.
3077         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
3078         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer): Ditto.
3079
3080         * Shared/WebResourceBuffer.cpp: Removed.
3081         * Shared/WebResourceBuffer.h: Removed.
3082
3083         * WebKit2.xcodeproj/project.pbxproj: Removed WebResourceBuffer.cpp/h.
3084
3085         * WebProcess/Network/NetworkProcessConnection.cpp: Removed unneeded includes.
3086         (WebKit::NetworkProcessConnection::didCacheResource): Use a reference instead
3087         of a pointer.
3088
3089         * WebProcess/Network/WebResourceLoadScheduler.cpp: Removed unneeded include.
3090         * WebProcess/Network/WebResourceLoader.cpp: Ditto.
3091         * WebProcess/Network/WebResourceLoader.h: Ditto.
3092         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Ditto.
3093         (WebKit::WebFrameLoaderClient::finishedLoading): Use SharedBuffer directly.
3094         * WebProcess/WebPage/WebFrame.cpp:
3095         (WebKit::WebFrame::source): Ditto.
3096
3097         * WebProcess/WebPage/WebPage.cpp:
3098         (WebKit::WebPage::runJavaScriptInMainFrame): Refactored to make the relationship
3099         between the buffer and the DataReference clearer and to avoid having a long-lived
3100         DataReference pointing to an underlying buffer with unclear lifetime.
3101         (WebKit::WebPage::getContentsAsString): Ditto.
3102         (WebKit::WebPage::getSelectionAsWebArchiveData): Ditto.
3103         (WebKit::WebPage::getMainResourceDataOfFrame): Ditto. Also use SharedBuffer directly.
3104         (WebKit::WebPage::getResourceDataFromFrame): Ditto.
3105         (WebKit::WebPage::getWebArchiveOfFrame): Ditto.
3106
3107         * WebProcess/WebPage/ios/WebPageIOS.mm:
3108         (WebKit::containingLinkElement): Use elementLineage.
3109         (WebKit::WebPage::performActionOnElement): Use references and SharedBuffer.
3110         ALso did a bit of other cleanup in here.
3111         (WebKit::isAssistableElement): Take Element& instead of Node*, since that's what
3112         the caller has.
3113         (WebKit::nextAssistableElement): Changed name to match what the function does.
3114         Added an obviously-missing check on the startNode argument. Updated for change
3115         to isAssistableElement above. Take a Page& instead of a Page*.
3116         (WebKit::hasAssistableElement): Changed name to match what the function does.
3117         Updated for change to nextAssistableElement above. Took out incorrect comparison
3118         of a C++ pointer to the Objective-C object pointer nil. Take a Page& instead of a Page*.
3119         (WebKit::WebPage::focusNextAssistedNode): Updated for above changes.
3120         (WebKit::WebPage::getAssistedNodeInformation): Updated for above changes.
3121
3122 2014-11-04  Tim Horton  <timothy_horton@apple.com>
3123
3124         Dictionary lookup panel pops up at random when clicking on selected text
3125         https://bugs.webkit.org/show_bug.cgi?id=138353
3126         <rdar://problem/18861406>
3127
3128         * WebProcess/WebPage/WebPage.h:
3129         Fix the build; this needs to be public.
3130
3131         * WebProcess/WebPage/mac/WebPageMac.mm:
3132         (WebKit::rangeForDictionaryLookupAtHitTestResult):
3133         Use the right selection (the one we just tested) in the change from r175517.
3134
3135 2014-11-04  Tim Horton  <timothy_horton@apple.com>
3136
3137         Dictionary lookup panel pops up at random when clicking on selected text
3138         https://bugs.webkit.org/show_bug.cgi?id=138353
3139         <rdar://problem/18861406>
3140
3141         Reviewed by Andreas Kling.
3142
3143         * WebProcess/WebPage/WebPage.h:
3144         * WebProcess/WebPage/mac/WebPageMac.mm:
3145         (WebKit::rangeForDictionaryLookupForSelection):
3146         (WebKit::rangeForDictionaryLookupAtHitTestResult):
3147         Factor rangeForDictionaryLookupForSelection out of performDictionaryLookupForSelection.
3148
3149         Make use of rangeForDictionaryLookupForSelection in rangeForDictionaryLookupAtHitTestResult,
3150         returning the selection-based range if the hit test intersects the selected text.
3151         Previously, we were just going forward with performDictionaryLookupForSelection,
3152         which would actually *do* the lookup, even if we just wanted to retrieve the range.
3153
3154         Make rangeForDictionaryLookup* static.
3155
3156         (WebKit::WebPage::performDictionaryLookupForSelection):
3157         Make use of rangeForDictionaryLookupForSelection.
3158
3159 2014-11-03  Chris Dumez  <cdumez@apple.com>
3160
3161         Allow implicit conversion from Ref<T> to T&
3162         https://bugs.webkit.org/show_bug.cgi?id=138331
3163
3164         Reviewed by Andreas Kling.
3165
3166         Remove unnecessary calls to Ref<T>::get() now that a Ref<T> can be
3167         converted implicitly to a T&.
3168
3169 2014-11-03  Simon Fraser  <simon.fraser@apple.com>
3170
3171         Expose visibleDebugOverlayRegions pref via the WK2 C SPI
3172         https://bugs.webkit.org/show_bug.cgi?id=138342
3173
3174         Reviewed by Dan Bernstein.
3175         
3176         Expose WKDebugOverlayRegions via the C SPI.
3177         
3178         * UIProcess/API/C/WKPreferences.cpp:
3179         (WKPreferencesSetVisibleDebugOverlayRegions):
3180         (WKPreferencesGetVisibleDebugOverlayRegions):
3181         * UIProcess/API/C/WKPreferencesRef.h:
3182
3183 2014-11-03  Beth Dakin  <bdakin@apple.com>
3184
3185         Implement action menus for editable text with spelling suggestions
3186         https://bugs.webkit.org/show_bug.cgi?id=138333
3187         -and corresponding-
3188         rdar://problem/18742371
3189
3190         Reviewed by Tim Horton.
3191
3192         New types.
3193         * Shared/API/c/WKActionMenuItemTypes.h:
3194         * Shared/API/c/WKActionMenuTypes.h:
3195
3196         ActionMenuHitTestResult now stores the String result of the lookup.
3197         * Shared/mac/ActionMenuHitTestResult.h:
3198         * Shared/mac/ActionMenuHitTestResult.mm:
3199         (WebKit::ActionMenuHitTestResult::encode):
3200         (WebKit::ActionMenuHitTestResult::decode):
3201
3202         Make getGuessesForWord() public so we can call it from WKActionMenuController.
3203         * UIProcess/WebPageProxy.h:
3204         * UIProcess/mac/WKActionMenuController.mm:
3205
3206         Select the text for all types of text menus.
3207         (-[WKActionMenuController isMenuForTextContent]):
3208         (-[WKActionMenuController willOpenMenu:withEvent:]):
3209
3210         Spelling suggestions are presented in a sub-menu and will replace the selection 
3211         when chosen.
3212         (-[WKActionMenuController _defaultMenuItemsForEditableTextWithSuggestions:]):
3213         (-[WKActionMenuController _changeSelectionToSuggestion:]):
3214         (-[WKActionMenuController _createActionMenuItemForTag:]):
3215         (-[WKActionMenuController _defaultMenuItems:]):
3216
3217         New function to store the lookupText as a String on the ActionMenuHitTestResult.
3218         * WebProcess/WebPage/WebPage.h:
3219         * WebProcess/WebPage/mac/WebPageMac.mm:
3220         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3221         (WebKit::WebPage::lookupTextAtLocation):
3222
3223 2014-11-03  Simon Fraser  <simon.fraser@apple.com>
3224
3225         Add page overlays that show regions with mouseWheel event handlers, and the non-fast-scrollable region, and code to toggle them in MiniBrowser WK2
3226         https://bugs.webkit.org/show_bug.cgi?id=138257
3227
3228         Reviewed by Tim Horton.
3229         
3230         Add private prefs to control visibility of debug-related page region overlays.
3231
3232         * Shared/WebPreferencesDefinitions.h:
3233         * UIProcess/API/Cocoa/WKPreferences.mm:
3234         (-[WKPreferences _visibleDebugOverlayRegions]):
3235         (-[WKPreferences _setVisibleDebugOverlayRegions:]):
3236         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
3237         * UIProcess/mac/WebPreferencesMac.mm:
3238         (WebKit::setDebugUInt32ValueIfInUserDefaults):
3239         * WebProcess/WebPage/WebPage.cpp:
3240         (WebKit::WebPage::updatePreferences):
3241         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3242         (WebKit::RemoteLayerTreeDrawingArea::updatePreferences): Update the overlays.
3243         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3244         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): Update the overlays.
3245
3246 2014-11-03  Commit Queue  <commit-queue@webkit.org>
3247
3248         Unreviewed, rolling out r175406, r175413, and r175423.
3249         https://bugs.webkit.org/show_bug.cgi?id=138327
3250
3251         Multipart tests are still broken (Requested by ap on #webkit).
3252
3253         Reverted changesets:
3254
3255         "Eliminate ResourceBuffer and use SharedBuffer directly
3256         instead"
3257         https://bugs.webkit.org/show_bug.cgi?id=138174
3258         http://trac.webkit.org/changeset/175406
3259
3260         "Unreviewed, iOS build fix since 175406."
3261         http://trac.webkit.org/changeset/175413
3262
3263         "Fix assertion in CachedResource::addDataBuffer"
3264         http://trac.webkit.org/changeset/175423
3265
3266 2014-11-03  Tim Horton  <timothy_horton@apple.com>
3267
3268         _actionMenuItemsForHitTestResult is given kWKActionMenuLink but an empty array of defaultMenuItems
3269         https://bugs.webkit.org/show_bug.cgi?id=138321
3270         <rdar://problem/18855134>
3271
3272         Reviewed by Beth Dakin.
3273
3274         * UIProcess/mac/WKActionMenuController.mm:
3275         (-[WKActionMenuController _defaultMenuItemsForLink]):
3276         (-[WKActionMenuController _defaultMenuItems:]):
3277         Move the HTTP-family-URLs-only condition to the place where we decide what kind of menu to
3278         show. We depend on _defaultMenuItemsForLink returning the link menu, and should never
3279         set the link menu type if we aren't going to build a link menu.
3280
3281 2014-11-03  Tim Horton  <timothy_horton@apple.com>
3282
3283         Use FrameSnapshotting functions in FindController::getFindIndicatorBitmap
3284         https://bugs.webkit.org/show_bug.cgi?id=138300
3285         <rdar://problem/18855863>
3286
3287         Reviewed by Simon Fraser.
3288
3289         Share more code by using WebCore's FrameSnapshotting::snapshotSelection
3290         in FindController instead of copying it into FindController wholesale.
3291
3292         * WebProcess/WebPage/FindController.cpp:
3293         (WebKit::getFindIndicatorBitmap):
3294         Make getFindIndicatorBitmap static, rename it from getFindIndicatorBitmapAndRect,
3295         and drop the rect argument because only one caller wanted it, and we no longer need
3296         to compute it (this happens in WebCore now).
3297
3298         Use snapshotSelection; all of the removed paint behaviors get added by
3299         code in or underneath snapshotSelection now.
3300
3301         Draw the snapshot into our ShareableBitmap; we could avoid this in a future patch
3302         by refactoring the FrameSnapshotting functions to take GraphicsContexts.
3303
3304         (WebKit::FindController::getImageForFindMatch):
3305         (WebKit::FindController::updateFindIndicator):
3306         Adopt the new getFindIndicatorBitmap.
3307
3308         * WebProcess/WebPage/FindController.h:
3309         Remove getFindIndicatorBitmap(AndRect), which is now static.
3310
3311 2014-11-03  Csaba Osztrogonác  <ossy@webkit.org>
3312
3313         URTBF after r175476 to make GTK and EFL build happy.
3314
3315         * UIProcess/API/gtk/PageClientImpl.cpp:
3316         (WebKit::PageClientImpl::setTextIndicator):
3317         (WebKit::PageClientImpl::setFindIndicator): Deleted.
3318         * UIProcess/API/gtk/PageClientImpl.h:
3319         * UIProcess/CoordinatedGraphics/WebView.cpp:
3320         (WebKit::WebView::setTextIndicator):
3321         (WebKit::WebView::setFindIndicator): Deleted.
3322         * UIProcess/CoordinatedGraphics/WebView.h:
3323
3324 2014-11-03  Tim Horton  <timothy_horton@apple.com>
3325
3326         Rename FindIndicator{Window} to TextIndicator{Window}
3327         https://bugs.webkit.org/show_bug.cgi?id=138302
3328         <rdar://problem/18855190>
3329
3330         Reviewed by Anders Carlsson.
3331
3332         Rename FindIndicator{Window} to TextIndicator{Window} (and related),
3333         because it will soon be used to indicate ranges of text that are not
3334         necessarily find-in-page results.
3335
3336         FindController still has things named 'findIndicator' internally,
3337         and I left the API alone (because all the API bits are actually find-specific),
3338         but the actual FindIndicator/Window and the message to set it up, etc. are all
3339         now called Text*.
3340
3341         * CMakeLists.txt:
3342         * UIProcess/API/mac/WKView.mm:
3343         * UIProcess/API/mac/WKViewInternal.h:
3344         * UIProcess/PageClient.h:
3345         * UIProcess/TextIndicator.cpp: Renamed from Source/WebKit2/UIProcess/FindIndicator.cpp.
3346         * UIProcess/TextIndicator.h: Renamed from Source/WebKit2/UIProcess/FindIndicator.h.
3347         * UIProcess/WebPageProxy.cpp:
3348         * UIProcess/WebPageProxy.h:
3349         * UIProcess/WebPageProxy.messages.in:
3350         * UIProcess/ios/PageClientImplIOS.h:
3351         * UIProcess/ios/PageClientImplIOS.mm:
3352         * UIProcess/ios/WKContentView.h:
3353         * UIProcess/mac/PageClientImpl.h:
3354         * UIProcess/mac/PageClientImpl.mm:
3355         * UIProcess/mac/TextIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/mac/FindIndicatorWindow.h.
3356         * UIProcess/mac/TextIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/mac/FindIndicatorWindow.mm.
3357         * WebKit2.xcodeproj/project.pbxproj:
3358         * WebProcess/WebPage/FindController.cpp:
3359
3360 2014-11-03  Beth Dakin  <bdakin@apple.com>
3361
3362         Implement action menus for editable text
3363         https://bugs.webkit.org/show_bug.cgi?id=138284
3364         -and corresponding-
3365         rdar://problem/18742323
3366
3367         Reviewed by Tim Horton.
3368
3369         New item type for paste.
3370         * Shared/API/c/WKActionMenuItemTypes.h:
3371
3372         New menu type for editable text.
3373         * Shared/API/c/WKActionMenuTypes.h:
3374         * UIProcess/mac/WKActionMenuController.mm:
3375
3376         willOpenMenu should select text for both regular text menus and editable text 
3377         menus. 
3378         (-[WKActionMenuController willOpenMenu:withEvent:]):
3379
3380         Default items for editable text.
3381         (-[WKActionMenuController _defaultMenuItemsForEditableText]):
3382         (-[WKActionMenuController _paste:]):
3383         (-[WKActionMenuController _createActionMenuItemForTag:]):
3384
3385         New method _hitTestResultForStage:(MenuUpdateStage)stage will figure out whether 
3386         we can use the WebHitTestResult from the ActionMenuHitTestResult or if we have to 
3387         use the potentially out-of-date WebHitTestResult that is cached on WebPageProxy. 
3388         An important difference between these results is that the ActionMenuHitTest 
3389         result, in addition to being more recent and accurate, also now includes shadow 
3390         content, which affects some editable regions on important sites such as 
3391         bugs.webkit.org and nytimes.com.
3392         (-[WKActionMenuController _defaultMenuItems:]):
3393         (-[WKActionMenuController _updateActionMenuItemsForStage:]):
3394         (imageForResource:name::if): Deleted.
3395
3396         Allow shadow content in action menu hit testing.
3397         * WebProcess/WebPage/mac/WebPageMac.mm:
3398         (WebKit::WebPage::performActionMenuHitTestAtLocation):
3399         (WebKit::WebPage::selectLookupTextAtLocation):
3400
3401 2014-11-03  Ada Chan  <adachan@apple.com>
3402
3403         Persist the page's muted state across web process crashes.
3404         https://bugs.webkit.org/show_bug.cgi?id=138195
3405
3406         Reviewed by Anders Carlsson.
3407
3408         Store the Page's muted state in WebPageCreationParameters so that state can be properly
3409         restored after recovering from a crash in the web process.
3410
3411         * Shared/WebPageCreationParameters.cpp:
3412         (WebKit::WebPageCreationParameters::encode):
3413         (WebKit::WebPageCreationParameters::decode):
3414         * Shared/WebPageCreationParameters.h:
3415         * UIProcess/WebPageProxy.cpp:
3416         (WebKit::WebPageProxy::WebPageProxy):
3417         Initialize m_muted.
3418         (WebKit::WebPageProxy::setMuted):
3419         Update m_muted.
3420         (WebKit::WebPageProxy::creationParameters):
3421         Set the muted data member in WebPageCreationParameters.
3422         * UIProcess/WebPageProxy.h:
3423         * WebProcess/WebPage/WebPage.cpp:
3424         (WebKit::WebPage::WebPage):
3425         Initialize the page's muted state with the muted value from WebPageCreationParameters.
3426
3427 2014-11-03  Ryuan Choi  <ryuan.choi@gmail.com>
3428
3429         [EFL] Remove dependency of PageViewportController from PageViewportControllerClient
3430         https://bugs.webkit.org/show_bug.cgi?id=138301
3431
3432         Reviewed by Gyuyoung Kim.
3433
3434         PaeViewportControllerClient does not need to keep the instance of PageViewPortController.
3435         This patch removes it to simplify relation between them.
3436         In addition, uses a reference for the client of PageViewportController.
3437
3438         * UIProcess/API/efl/EwkView.cpp:
3439         (EwkView::EwkView):
3440         (EwkView::setViewportPosition):
3441         * UIProcess/API/efl/EwkView.h:
3442         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
3443         (WebKit::PageViewportController::PageViewportController):
3444         (WebKit::PageViewportController::didChangeContentsSize):
3445         (WebKit::PageViewportController::didRenderFrame):
3446         (WebKit::PageViewportController::pageDidRequestScroll):
3447         (WebKit::PageViewportController::syncVisibleContents):
3448         (WebKit::PageViewportController::didChangeViewportAttributes):
3449         * UIProcess/CoordinatedGraphics/PageViewportController.h:
3450         * UIProcess/PageViewportControllerClient.h:
3451         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
3452         (WebKit::PageViewportControllerClientEfl::PageViewportControllerClientEfl):
3453         (WebKit::PageViewportControllerClientEfl::setViewportPosition):
3454         (WebKit::PageViewportControllerClientEfl::setController): Deleted.
3455         * UIProcess/efl/PageViewportControllerClientEfl.h:
3456
3457 2014-11-03  Sungmann Cho  <sungmann.cho@navercorp.com>
3458
3459         AX: Fix some minor typos related to the word "accessibility".
3460         https://bugs.webkit.org/show_bug.cgi?id=138299
3461
3462<