[EFL][WK2] Add ewk API to allow accepting a specific TLS certificate for a specific...
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-12-04  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
2
3         [EFL][WK2] Add ewk API to allow accepting a specific TLS certificate for a specific host
4         https://bugs.webkit.org/show_bug.cgi?id=131160
5
6         Reviewed by Gyuyoung Kim.
7
8         * UIProcess/API/efl/ewk_context.cpp:
9         (EwkContext::allowSpecificHTTPSCertificateForHost):
10         (ewk_context_tls_certificate_for_host_allow):
11         * UIProcess/API/efl/ewk_context.h:
12         * UIProcess/API/efl/ewk_context_private.h:
13         * UIProcess/API/efl/tests/test_ewk2_ssl.cpp:
14
15 2014-12-03  Commit Queue  <commit-queue@webkit.org>
16
17         Unreviewed, rolling out r176457.
18         https://bugs.webkit.org/show_bug.cgi?id=139247
19
20         More iOS breakage (Requested by andersca on #webkit).
21
22         Reverted changeset:
23
24         "Fix iOS build."
25         http://trac.webkit.org/changeset/176457
26
27 2014-12-03  Beth Dakin  <bdakin@apple.com>
28
29         <input> elements get whitespace action menu instead of editable text menu
30         https://bugs.webkit.org/show_bug.cgi?id=139241
31         -and corresponding-
32         rdar://problem/19072083
33
34         Reviewed by Sam Weinig.
35
36         Add isOverTextInsideFormControlElement to WebHitTestResult.
37         * Shared/WebHitTestResult.cpp:
38         (WebKit::WebHitTestResult::Data::Data):
39         (WebKit::WebHitTestResult::Data::encode):
40         (WebKit::WebHitTestResult::Data::decode):
41         * Shared/WebHitTestResult.h:
42         (WebKit::WebHitTestResult::isOverTextInsideFormControlElement):
43
44         Offer the text menus for text inside form controls.
45         * UIProcess/mac/WKActionMenuController.mm:
46         (-[WKActionMenuController _defaultMenuItems]):
47
48         We should disallow shadow content in the hit test. This is the default and it is 
49         how context menus behave. We originally wanted to text inside shadow content so 
50         that we could find the text, but the new function I added to HitTestResult will 
51         allow that.
52         * WebProcess/WebPage/mac/WebPageMac.mm:
53
54         Adjust to the fact that we don’t hit test shadow content any more.
55         (WebKit::WebPage::performActionMenuHitTestAtLocation):
56         (WebKit::WebPage::lookupTextAtLocation):
57         (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):
58
59 2014-12-03  Commit Queue  <commit-queue@webkit.org>
60
61         Unreviewed, rolling out r176489.
62         https://bugs.webkit.org/show_bug.cgi?id=139242
63
64         More iOS breakage (Requested by andersca on #webkit).
65
66         Reverted changeset:
67
68         "Unreviewed, iOS build fix after r176452."
69         http://trac.webkit.org/changeset/176489
70
71 2014-12-03  Tim Horton  <timothy_horton@apple.com>
72
73         Implement action menus for tel: URLs
74         https://bugs.webkit.org/show_bug.cgi?id=139240
75         <rdar://problem/19115662>
76
77         Reviewed by Anders Carlsson.
78
79         * Shared/API/c/WKActionMenuTypes.h:
80         Add a new type.
81
82         * UIProcess/mac/WKActionMenuController.mm:
83         (-[WKActionMenuController _defaultMenuItemsForDataDetectableLink]):
84         Rename this function as it will work for both mailto and tel URLs.
85         Adjust it to use contextForView:.
86
87         (-[WKActionMenuController _clearActionMenuState]):
88         (-[WKActionMenuController menuNeedsUpdate:]):
89         (-[WKActionMenuController _defaultMenuItems]):
90         Don't check the menu type when going to interact with _currentActionContext.
91         We'll only have a _currentActionContext if we have a data detected item,
92         and there are multiple menu types that end up using DDActionContext.
93
94 2014-12-03  Commit Queue  <commit-queue@webkit.org>
95
96         Unreviewed, rolling out r176452 and r176559.
97         https://bugs.webkit.org/show_bug.cgi?id=139239
98
99         Broke iOS (Requested by andersca on #webkit).
100
101         Reverted changesets:
102
103         "Remove alignment code from IPC coders"
104         https://bugs.webkit.org/show_bug.cgi?id=138963
105         http://trac.webkit.org/changeset/176452
106
107         "[WK2] SecComp buildfix after r176452"
108         https://bugs.webkit.org/show_bug.cgi?id=139081
109         http://trac.webkit.org/changeset/176559
110
111 2014-12-03  Tim Horton  <timothy_horton@apple.com>
112
113         Keyboard input should be disabled in the preview popover
114         https://bugs.webkit.org/show_bug.cgi?id=139219
115         <rdar://problem/19052381>
116
117         Reviewed by Anders Carlsson.
118
119         Make sure that keyboard input, Quick Look, etc. are blocked in preview popovers
120         and WKThumbnailViews. Also block the fake mouseMove events that originate in
121         the Web process upon scrolling, because we were missing those despite blocking
122         ordinary mouseMove events.
123
124         * UIProcess/API/Cocoa/WKViewPrivate.h:
125         * UIProcess/API/mac/WKView.mm:
126         Rename _ignoresNonWheelMouseEvents to _ignoresNonWheelEvents, because it will
127         apply not only to mouse events but also key events, Quick Look events, menu
128         preparation events, swipe events, etc.
129
130         Add _ignoresAllEvents, which means the same thing as _ignoresNonWheelEvents
131         with the addition of ignoring scrollWheel events.
132
133         (-[WKView scrollWheel:]):
134         (-[WKView swipeWithEvent:]):
135         (-[WKView mouseMoved:]):
136         (-[WKView mouseDown:]):
137         (-[WKView mouseUp:]):
138         (-[WKView mouseDragged:]):
139         Adjust to the new name.
140
141         (-[WKView performKeyEquivalent:]):
142         (-[WKView keyUp:]):
143         (-[WKView keyDown:]):
144         (-[WKView flagsChanged:]):
145         (-[WKView quickLookWithEvent:]):
146         (-[WKView prepareForMenu:withEvent:]):
147         (-[WKView willOpenMenu:withEvent:]):
148         (-[WKView didCloseMenu:withEvent:]):
149         Block all of these events as well as those we were previously blocking.
150
151         (-[WKView _setIgnoresAllEvents:]):
152         (-[WKView _setIgnoresNonWheelMouseEvents:]):
153         (-[WKView _setIgnoresNonWheelEvents:]):
154         (-[WKView _ignoresNonWheelEvents]):
155         (-[WKView _ignoresAllEvents]):
156         * UIProcess/API/mac/WKViewInternal.h:
157         Adjust to the new names and the addition of ignoresAllEvents.
158
159         * UIProcess/mac/WKActionMenuController.mm:
160         (-[WKPagePreviewViewController loadView]):
161         Adjust to the new name.
162
163         (-[WKActionMenuController prepareForMenu:withEvent:]):
164         Move bailing from prepareForMenu: up to WKView.
165
166         * UIProcess/API/Cocoa/WKWebView.mm:
167         (-[WKWebView _ignoresNonWheelEvents]):
168         (-[WKWebView _setIgnoresNonWheelEvents:]):
169         (-[WKWebView _ignoresNonWheelMouseEvents]): Deleted.
170         (-[WKWebView _setIgnoresNonWheelMouseEvents:]): Deleted.
171         * UIProcess/API/Cocoa/WKWebViewInternal.h:
172         Adjust to the new name (without "mouse" in it).
173
174         * UIProcess/API/Cocoa/_WKThumbnailView.mm:
175         (-[_WKThumbnailView _viewWasUnparented]):
176         (-[_WKThumbnailView _viewWasParented]):
177         Explicitly tell WKView to disable event handling while thumbnailed,
178         instead of having WKView special-case thumbnail views internally.
179
180         * UIProcess/WebPageProxy.cpp:
181         (WebKit::WebPageProxy::setShouldDispatchFakeMouseMoveEvents):
182         * UIProcess/WebPageProxy.h:
183         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
184         (WebKit::WebChromeClient::shouldDispatchFakeMouseMoveEvents):
185         * WebProcess/WebCoreSupport/WebChromeClient.h:
186         * WebProcess/WebPage/WebPage.cpp:
187         (WebKit::WebPage::WebPage):
188         * WebProcess/WebPage/WebPage.h:
189         (WebKit::WebPage::shouldDispatchFakeMouseMoveEvents):
190         (WebKit::WebPage::setShouldDispatchFakeMouseMoveEvents):
191         * WebProcess/WebPage/WebPage.messages.in:
192         Plumb shouldDispatchFakeMouseMoveEvents from the UI process to the Web process
193         and through to WebKit2's ChromeClient implementation.
194
195 2014-12-03  Anders Carlsson  <andersca@apple.com>
196
197         Remove ENABLE_UI_PROCESS_STORAGE define, it's always 1.
198
199         Rubber-stamped by Beth Dakin.
200
201         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
202         (WebKit::WebPlatformStrategies::localStorageNamespace):
203         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
204         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
205
206 2014-12-03  Anders Carlsson  <andersca@apple.com>
207
208         Use an @autoreleasepool instead of NSAutoreleasePool.
209
210         Rubber-stamped by Tim Horton.
211
212         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
213         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
214
215 2014-12-03  Dan Bernstein  <mitz@apple.com>
216
217         REGRESSION(r176687): Caused webkit2 test assertion failure crashes in WebKit::WebPage::willStartDrag()
218         https://bugs.webkit.org/show_bug.cgi?id=139224
219
220         Reviewed by Alexey Proskuryakov.
221
222         * WebProcess/WebPage/WebPage.cpp:
223         (WebKit::WebPage::mouseEventSyncForTesting): Wait for the UI process to start dragging if
224         needed before handling the event.
225
226 2014-12-03  Michael Catanzaro  <mcatanzaro@igalia.com>
227
228         [GTK] outdated comment
229         https://bugs.webkit.org/show_bug.cgi?id=137801
230
231         Reviewed by Carlos Garcia Campos.
232
233         Remove a comment that is no longer correct.
234
235         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
236
237 2014-12-02  Conrad Shultz  <conrad_shultz@apple.com>
238
239         Don't block menu highlighting when presenting a page preview
240         https://bugs.webkit.org/show_bug.cgi?id=139217
241
242         Reviewed by Tim Horton.
243
244         * UIProcess/mac/WKActionMenuController.mm:
245         (-[WKActionMenuController _previewURLFromActionMenu:]):
246         Defer popover presentation to the next turn of the runloop.
247
248 2014-12-02  Timothy Horton  <timothy_horton@apple.com>
249
250         Fix the build.
251
252         * UIProcess/mac/WebContextMac.mm:
253
254 2014-12-02  Dan Bernstein  <mitz@apple.com>
255
256         <rdar://problem/18441138> [iOS] Text selection in WKWebView with WKSelectionGranularityCharacter only works in the most recent WKWebView to load
257         https://bugs.webkit.org/show_bug.cgi?id=139211
258
259         Reviewed by Anders Carlsson.
260
261         * UIProcess/ios/WKContentViewInteraction.mm:
262         (-[WKContentView becomeFirstResponder]): Override to activate the text selection for when
263         becoming first resopnder.
264         (-[WKContentView resignFirstResponder]): Deactiavte the text selection when resigning first
265         responder. This ensures that if another WKWebView becomes first responder, and it uses
266         block selection, we don’t end up with two active selection views.
267         (-[WKContentView useSelectionAssistantWithMode:]): Only activate the text selection if this
268         is the first responder. This ensures that loading content into a non-first-responder
269         WKWebView doesn‘t deactivate the text selection in the current first responder.
270
271 2014-12-02  Alexey Proskuryakov  <ap@apple.com>
272
273         http/tests/appcache/main-resource-fallback-for-network-error-crash.html can break subsequent tests
274         https://bugs.webkit.org/show_bug.cgi?id=139149
275
276         Reviewed by Anders Carlsson.
277
278         This changes API behavior. I think that it's OK, because existing behavior made no sense.
279         We used to delete caches from disk, but they were still active in memory. Now we also
280         obsolete them in memory, so documents that use a cache still work, but new ones don't
281         pick one up.
282
283         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
284         (WebKit::WebApplicationCacheManager::deleteAllEntries): Use the new WebCore function
285         that properly deletes caches.
286
287 2014-12-02  Tim Horton  <timothy_horton@apple.com>
288
289         Remove a SnowLeopard-era quirk for QuickLook
290         https://bugs.webkit.org/show_bug.cgi?id=139208
291         <rdar://problem/19121822>
292
293         Reviewed by Alexey Proskuryakov.
294
295         * Shared/WebProcessCreationParameters.cpp:
296         (WebKit::WebProcessCreationParameters::encode):
297         (WebKit::WebProcessCreationParameters::decode):
298         * Shared/WebProcessCreationParameters.h:
299         * UIProcess/mac/WebContextMac.mm:
300         (WebKit::WebContext::platformInitializeWebProcess):
301         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
302         (WebKit::WebFrameLoaderClient::needsQuickLookResourceCachingQuirks): Deleted.
303         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
304         * WebProcess/WebProcess.cpp:
305         (WebKit::WebProcess::WebProcess):
306         * WebProcess/WebProcess.h:
307         (WebKit::WebProcess::needsQuickLookResourceCachingQuirks): Deleted.
308         * WebProcess/cocoa/WebProcessCocoa.mm:
309         (WebKit::WebProcess::platformInitializeWebProcess):
310
311 2014-12-02  Beth Dakin  <bdakin@apple.com>
312
313         Build fix.
314
315         * UIProcess/mac/WKActionMenuController.mm:
316         (-[WKActionMenuController _defaultMenuItemsForLink]):
317
318 2014-12-02  Beth Dakin  <bdakin@apple.com>
319
320         More build fix.
321
322         * UIProcess/mac/WKActionMenuController.mm:
323         (-[WKActionMenuController _defaultMenuItemsForLink]):
324
325 2014-12-02  Dan Bernstein  <mitz@apple.com>
326
327         REGRESSION: Dragging selected text changes the selection
328         https://bugs.webkit.org/show_bug.cgi?id=139110
329
330         Reviewed by Simon Fraser.
331
332         After it sent the UI process the message to start dragging, the Web process handled mouse
333         move events that had already been in flight, interpreting them as a drag to start a new
334         selection. This is fixed by ignoring any mouse events received after asking the UI process
335         to start dragging.
336
337         * UIProcess/mac/WebPageProxyMac.mm:
338         (WebKit::WebPageProxy::setDragImage): Send the new DidStartDrag message back to the Web
339         process, so that it stops ignoring mouse events.
340
341         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
342         (WebKit::WebDragClient::startDrag): Call the new WebPage::willStartDrag, so that it starts
343         ignoring mouse events.
344
345         * WebProcess/WebPage/WebPage.cpp:
346         (WebKit::WebPage::WebPage): Initialize new member variable.
347         (WebKit::WebPage::mouseEvent): Don’t handle the event if we have asked the UI process to
348         start dragging.
349
350         * WebProcess/WebPage/WebPage.h:
351         (WebKit::WebPage::willStartDrag): Added. Sets new member variable m_isStartingDrag to true.
352         (WebKit::WebPage::didStartDrag): Added. Handles the message from the UI process by setting
353         m_isStartingDrag back to false.
354
355         * WebProcess/WebPage/WebPage.messages.in: Added DidStartDrag.
356
357 2014-12-02  Beth Dakin  <bdakin@apple.com>
358
359         Should use standardQuickLookMenuItem for apps that don't implement customizations
360         https://bugs.webkit.org/show_bug.cgi?id=139193
361         -and corresponding-
362         rdar://problem/18944696
363
364         Reviewed by Anders Carlsson.
365
366         New SPI will allow clients to opt-out of the standardQuickLookMenuItem. By 
367         default, opt in.
368         * UIProcess/API/Cocoa/WKViewPrivate.h:
369         * UIProcess/API/mac/WKView.mm:
370         (-[WKView _shouldUseStandardQuickLookPreview]):
371         * UIProcess/mac/WKActionMenuController.mm:
372
373         Use [NSMenuItem standardQuickLookMenuItem] unless the client has requested 
374         otherwise.
375         (-[WKActionMenuController _defaultMenuItemsForLink]):
376
377         Delegate methods to set up the standardQuickLookMenuItem.
378         (-[WKActionMenuController menuItem:viewAtScreenPoint:]):
379         (-[WKActionMenuController menuItem:previewItemAtPoint:]):
380         (-[WKActionMenuController menuItem:preferredEdgeForPoint:]):
381
382 2014-12-02  Tim Horton  <timothy_horton@apple.com>
383
384         TextIndicator can get stuck (especially if we don't get LUNotificationPopoverWillClose when we should)
385         https://bugs.webkit.org/show_bug.cgi?id=139175
386         <rdar://problem/19072236>
387
388         Reviewed by Beth Dakin.
389
390         * UIProcess/API/mac/WKView.mm:
391         (-[WKView scrollWheel:]):
392         (-[WKView mouseDown:]):
393         Work around <rdar://problem/19086993> by always explicitly clearing the
394         active text indicator in mouseDown: and scrollWheel:.
395         This way, even if you manage to get a text indicator that outlives the
396         Look Up popover (or find-in-page, or whatever), it will be dismissed
397         by clicking or scrolling the view.
398
399 2014-12-02  Anders Carlsson  <andersca@apple.com>
400
401         Remove visited link handling from PageGroup
402         https://bugs.webkit.org/show_bug.cgi?id=139185
403
404         Reviewed by Sam Weinig.
405
406         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
407         (WebKit::WebChromeClient::populateVisitedLinks): Deleted.
408         * WebProcess/WebCoreSupport/WebChromeClient.h:
409
410 2014-12-01  Anders Carlsson  <andersca@apple.com>
411
412         Remove WKBundleRemoveAllVisitedLinks
413         https://bugs.webkit.org/show_bug.cgi?id=139163
414
415         Reviewed by Sam Weinig.
416
417         WKBundleRemoveAllVisitedLinks has been a no-op since at least Yosemite; get rid of it.
418
419         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
420         (WKBundleRemoveAllVisitedLinks): Deleted.
421         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
422         * WebProcess/InjectedBundle/InjectedBundle.cpp:
423         (WebKit::InjectedBundle::removeAllVisitedLinks): Deleted.
424         * WebProcess/InjectedBundle/InjectedBundle.h:
425
426 2014-12-02  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
427
428         Fix class was previously declared as a struct warnings
429         https://bugs.webkit.org/show_bug.cgi?id=139131
430
431         Reviewed by Csaba Osztrogonác.
432
433         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
434         * UIProcess/CoordinatedGraphics/WebViewClient.h:
435
436 2014-12-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
437
438         [EFL] ewk_view_scale_set() doesn't work correctly
439         https://bugs.webkit.org/show_bug.cgi?id=139109
440
441         Reviewed by Csaba Osztrogonác.
442
443         When ewk_view_scale_set() is called, it has only updated a scale factor which is maintained by WebPageProxy.
444         It causes WebPageProxy unsynchronized with PageViewportController's scale factor. That's why wrong scale
445         behavior has occured through ewk_view_scale_set(). Besides zooming has similar problem as well.
446
447         Thus this patch updates m_pageScaleFactor of PageViewportController as well as prohibits to change the scale
448         factor through viewport meta tag update. Because ewk_view_scale_set() means that user wants to set a specific
449         value to scale factor of current viewport.
450
451         * UIProcess/API/efl/EwkView.cpp:
452         (EwkView::updateScaleToPageViewportController):
453             Set m_initiallyFitToViewport to false. And call didChangeContentsVisibility() with new scale and scale position.
454
455         * UIProcess/API/efl/EwkView.h:
456         * UIProcess/API/efl/ewk_view.cpp:
457         (ewk_view_scale_set):
458         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
459         (TEST_F):
460         * UIProcess/CoordinatedGraphics/PageViewportController.cpp:
461         (WebKit::PageViewportController::didCommitLoad):
462             Set m_initiallyFitToViewport to true in order to fit content to viewport size by default.
463             Initizlize content position with (0, 0).
464
465         (WebKit::PageViewportController::pageTransitionViewportReady):
466            Do not update scale when m_initiallyFitToViewport is false.
467
468         (WebKit::PageViewportController::syncVisibleContents):
469            Return false when syncVisibleContents is failed.
470
471         (WebKit::PageViewportController::didChangeViewportAttributes):
472            Do not update scale when m_initiallyFitToViewport is false.
473
474         (WebKit::PageViewportController::applyScaleAfterRenderingContents):
475             If syncVisibleContents() is failed, m_pageScaleFactor should be restored with previous value.
476             If not, new scale factor isn't applied though, PageViewportController uses it as own scale factor.
477
478         (WebKit::PageViewportController::updateMinimumScaleToFit):
479            Do not update scale when m_initiallyFitToViewport is false or m_hadUserInteraction is true.
480
481         * UIProcess/CoordinatedGraphics/PageViewportController.h:
482         (WebKit::PageViewportController::setInitiallyFitToViewport):
483
484 2014-11-20  Jeffrey Pfau  <jpfau@apple.com>
485
486         Add cancelable version of willSendRequest
487         https://bugs.webkit.org/show_bug.cgi?id=138987
488
489         Reviewed by Anders Carlsson.
490
491         * WebProcess/Network/WebResourceLoader.cpp:
492         (WebKit::WebResourceLoader::willSendRequest):
493
494 2014-12-01  Conrad Shultz  <conrad_shultz@apple.com>
495
496         Clients need a way to explicitly set the title of a page preview
497         https://bugs.webkit.org/show_bug.cgi?id=139161
498
499         Reviewed by Beth Dakin.
500
501         This implicitly assumes that only one page preview can be associate with a given WKView at a time.
502
503         * UIProcess/API/Cocoa/WKViewPrivate.h:
504         * UIProcess/API/mac/WKView.mm:
505         (-[WKView _setPreviewTitle:]):
506         Wrap -[WKActionMenuController setPreviewTitle:]
507
508         * UIProcess/mac/WKActionMenuController.h:
509         * UIProcess/mac/WKActionMenuController.mm:
510         Add ivars for the title and the title text field (previously not independently exposed).
511         (-[WKPagePreviewViewController previewTitle]):
512         Accessor.
513         (-[WKPagePreviewViewController setPreviewTitle:]):
514         Accessor; set the text field's string value.
515         (-[WKPagePreviewViewController loadView]):
516         Adopt the _titleTextField ivar; assume that if a client has explicitly set the previewTitle then we don't
517         need to ask for it again.
518         (-[WKActionMenuController setPreviewTitle:]):
519         Wrap -[WKPagePreviewViewController setPreviewTitle:].
520
521 2014-12-01  Anders Carlsson  <andersca@apple.com>
522
523         Make WebKit2 work slightly better with garbage collection
524         https://bugs.webkit.org/show_bug.cgi?id=139159
525         <rdar://problem/19108390>
526
527         Reviewed by Dan Bernstein.
528
529         * Shared/Cocoa/APIObject.mm:
530         (API::Object::ref):
531         (API::Object::deref):
532         Call CFRetain/CFRelease to prevent the memory from being collected.
533
534         (API::Object::newObject):
535         Call CFRetain under GC so we'll prevent memory from being collected prematurely.
536
537 2014-12-01  Tim Horton  <timothy_horton@apple.com>
538
539         Implement yellow highlight for WebKit1 data detectors
540         https://bugs.webkit.org/show_bug.cgi?id=138956
541         <rdar://problem/18992185>
542
543         Reviewed by Beth Dakin.
544
545         * Shared/WebCoreArgumentCoders.cpp:
546         (IPC::ArgumentCoder<TextIndicatorData>::encode):
547         (IPC::ArgumentCoder<TextIndicatorData>::decode):
548         * WebProcess/WebPage/FindController.cpp:
549         (WebKit::FindController::updateFindIndicator):
550         (WebKit::FindController::drawRect):
551         Adjust to the fact that TextIndicator keeps screen-relative rects.
552
553 2014-12-01  Anders Carlsson  <andersca@apple.com>
554
555         Remove old site specific quirks code that was added in 2009
556         https://bugs.webkit.org/show_bug.cgi?id=139141
557
558         Reviewed by Antti Koivisto.
559
560         * NetworkProcess/RemoteNetworkingContext.h:
561         * NetworkProcess/mac/RemoteNetworkingContext.mm:
562         (WebKit::RemoteNetworkingContext::needsSiteSpecificQuirks): Deleted.
563         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
564         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
565         (WebKit::WebFrameNetworkingContext::needsSiteSpecificQuirks): Deleted.
566
567 2014-12-01  Joseph Pecoraro  <pecoraro@apple.com>
568
569         Web Inspector: Crash in WebInspectorClient::hideHighlight when page is destroyed
570         https://bugs.webkit.org/show_bug.cgi?id=139136
571
572         Reviewed by Simon Fraser.
573
574         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
575         (WebKit::WebInspectorClient::hideHighlight):
576         Speculatively fix by null-checking the main frame which
577         can be null during page destruction.
578
579 2014-11-30  Jaehun Lim  <ljaehun.lim@samsung.com>
580
581         [EFL] Add eldbus to the library list
582         https://bugs.webkit.org/show_bug.cgi?id=139120
583
584         Reviewed by Gyuyoung Kim.
585
586         Fix undefined reference errors for eldbus APIs.
587
588         * PlatformEfl.cmake:
589
590 2014-11-29  Anders Carlsson  <andersca@apple.com>
591
592         Crash when calling WKPageClose on the originated page from within createNewPage callback
593         https://bugs.webkit.org/show_bug.cgi?id=139099
594         <rdar://problem/19052564>
595
596         Reviewed by Sam Weinig.
597
598         Null check the namespace ID.
599
600         * UIProcess/Storage/StorageManager.cpp:
601         (WebKit::StorageManager::cloneSessionStorageNamespaceInternal):
602
603 2014-11-28  Tim Horton  <timothy_horton@apple.com>
604
605         Stale userData is handed to WKView _actionMenuItemsForHitTestResult under prepareForMenu
606         https://bugs.webkit.org/show_bug.cgi?id=139069
607         <rdar://problem/19075587>
608
609         Reviewed by Sam Weinig.
610
611         * UIProcess/mac/WKActionMenuController.mm:
612         (-[WKActionMenuController wkView:willHandleMouseDown:]):
613         (-[WKActionMenuController didCloseMenu:withEvent:]):
614         (-[WKActionMenuController _clearActionMenuState]):
615         Previously, _userData was not being cleared in didCloseMenu, so a subsequent
616         action menu invocation would end up sending stale userData to _actionMenuItemsForHitTestResult.
617
618         Additionally, factor all of the cleanup code out into _clearActionMenuState,
619         and call it from both wkView:willHandleMouseDown: and didCloseMenu:withEvent:.
620
621 2014-11-26  Timothy Horton  <timothy_horton@apple.com>
622
623         DataDetectors PageOverlay callbacks are never called
624         https://bugs.webkit.org/show_bug.cgi?id=139067
625         <rdar://problem/19086676>
626
627         Reviewed by Anders Carlsson.
628
629         * Shared/mac/ActionMenuHitTestResult.mm:
630         (WebKit::ActionMenuHitTestResult::encode):
631         (WebKit::ActionMenuHitTestResult::decode):
632         Encode/decode the PageOverlay ID.
633
634 2014-11-28  Simon Fraser  <simon.fraser@apple.com>
635
636         Allow clients of the WKRenderLayerRef C SPI to connect layer trees across frame boundaries
637         https://bugs.webkit.org/show_bug.cgi?id=139021
638
639         Reviewed by Dan Bernstein.
640         
641         Add WKRenderLayerGetFrameContentsLayer which returns a WKRenderLayerRef for
642         the content document of a RenderWidget, if its has one (e.g. frames, iframes
643         and <object> with document contents).
644
645         * Shared/API/c/WKRenderLayer.cpp:
646         (WKRenderLayerGetFrameContentsLayer):
647         * Shared/API/c/WKRenderLayer.h:
648         * Shared/UserMessageCoders.h:
649         (WebKit::UserMessageEncoder::baseEncode):
650         (WebKit::UserMessageDecoder::baseDecode):
651         * Shared/WebRenderLayer.cpp:
652         (WebKit::WebRenderLayer::create):
653         (WebKit::WebRenderLayer::WebRenderLayer):
654         * Shared/WebRenderLayer.h:
655         (WebKit::WebRenderLayer::frameContentsLayer):
656
657 2014-11-28  Csaba Osztrogonác  <ossy@webkit.org>
658
659         [WK2] SecComp buildfix after r176452
660         https://bugs.webkit.org/show_bug.cgi?id=139081
661
662         Reviewed by Antti Koivisto.
663
664         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
665         (WebKit::SeccompBrokerClient::dispatch):
666         (WebKit::SeccompBroker::runLoop):
667
668 2014-11-28  Csaba Osztrogonác  <ossy@webkit.org>
669
670         Fix -Wc++11-narrowing error in SeccompFilters.cpp
671         https://bugs.webkit.org/show_bug.cgi?id=139079
672
673         Reviewed by Carlos Garcia Campos.
674
675         * Shared/linux/SeccompFilters/SeccompFilters.cpp:
676         (WebKit::SeccompFilters::addRule):
677         * Shared/linux/SeccompFilters/SeccompFilters.h:
678
679 2014-11-28  Csaba Osztrogonác  <ossy@webkit.org>
680
681         [WK2] SecComp buildfix after r168605 and r168999
682         https://bugs.webkit.org/show_bug.cgi?id=139080
683
684         Reviewed by Carlos Garcia Campos.
685
686         * Shared/linux/SeccompFilters/SyscallPolicy.cpp:
687         (WebKit::SyscallPolicy::addDefaultWebProcessPolicy):
688
689 2014-11-27  Ryuan Choi  <ryuan.choi@navercorp.com>
690
691         [EFL] Remove E_Dbus dependency
692         https://bugs.webkit.org/show_bug.cgi?id=136355
693
694         Reviewed by Gyuyoung Kim.
695
696         * UIProcess/API/efl/ewk_main.cpp: Added init/shutdown for eldbus.
697         (WebKit::EwkMain::initialize):
698         (WebKit::EwkMain::finalize):
699         (WebKit::EwkMain::shutdownInitializedEFLModules):
700
701 2014-11-25  Anders Carlsson  <andersca@apple.com>
702
703         Remove user content handling from PageGroup
704         https://bugs.webkit.org/show_bug.cgi?id=139051
705
706         Reviewed by Antti Koivisto.
707
708         * WebProcess/InjectedBundle/InjectedBundle.cpp:
709         (WebKit::InjectedBundle::addUserScript):
710         (WebKit::InjectedBundle::addUserStyleSheet):
711         (WebKit::InjectedBundle::removeUserScript):
712         (WebKit::InjectedBundle::removeUserStyleSheet):
713         (WebKit::InjectedBundle::removeUserScripts):
714         (WebKit::InjectedBundle::removeUserStyleSheets):
715         (WebKit::InjectedBundle::removeAllUserContent):
716         Talk to the user content controller from the passed in WebPageGroupProxy.
717
718         * WebProcess/WebPage/WebPage.cpp:
719         (WebKit::WebPage::WebPage):
720         Create the WebPageGroupProxy before creating the page so we can get its user content controller and
721         pass it to the page configuration if necessary.
722         
723         * WebProcess/WebPage/WebPageGroupProxy.cpp:
724         (WebKit::WebPageGroupProxy::userContentController):
725         New function that lazily creates a user content controller. We don't want to create this eagerly since
726         it's not used with the modern API.
727
728         (WebKit::WebPageGroupProxy::addUserStyleSheet):
729         (WebKit::WebPageGroupProxy::addUserScript):
730         (WebKit::WebPageGroupProxy::removeAllUserStyleSheets):
731         (WebKit::WebPageGroupProxy::removeAllUserScripts):
732         (WebKit::WebPageGroupProxy::removeAllUserContent):
733         Call through to the user content controller.
734
735         * WebProcess/WebPage/WebPageGroupProxy.h:
736         Add an m_userContentController member.
737
738 2014-11-25  Ting-Wei Lan  <lantw44@gmail.com>
739
740         [GTK] Use LD_LIBRARY_PATH to make g-ir-scanner use the newly-built
741         version of libraries when running the temporary executable
742         https://bugs.webkit.org/show_bug.cgi?id=138833
743
744         Reviewed by Carlos Garcia Campos.
745
746         This patch modifies LD_LIBRARY_PATH to make sure the dynamic linker
747         find the correct version of libraries when running the temporary
748         executable to generate the .gir file.
749
750         * PlatformGTK.cmake:
751
752 2014-11-25  Csaba Osztrogonác  <ossy@webkit.org>
753
754         [EFL] REGRESSION(r176514): It made performance tests fail
755         https://bugs.webkit.org/show_bug.cgi?id=139037
756
757         Reviewed by Gyuyoung Kim.
758
759         * WebProcess/efl/WebProcessMainEfl.cpp: Don't try to load/shutdown eail if eailLibraryPath() is empty.
760
761 2014-11-24  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
762
763         Remove Qt cruft related to tap higlighting
764         https://bugs.webkit.org/show_bug.cgi?id=139030
765
766         Reviewed by Andreas Kling.
767
768         * CMakeLists.txt:
769         * WebProcess/WebPage/TapHighlightController.cpp: Removed.
770         * WebProcess/WebPage/TapHighlightController.h: Removed.
771
772 2014-11-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
773
774         Unreviewed, EFL build fix since r176530.
775
776         * UIProcess/CoordinatedGraphics/WebView.cpp: Replace pointer with reference.
777         (WebKit::WebView::processDidExit):
778
779 2014-11-24  Benjamin Poulain  <bpoulain@apple.com>
780
781         [WK2] Remove some bad stuff from WebPageProxy
782         https://bugs.webkit.org/show_bug.cgi?id=138896
783
784         Reviewed by Sam Weinig.
785
786         The state loadStateAtProcessExit does not seem to be used anywhere.
787
788         The state urlAtProcessExit only exists to forward the url from
789         WebPageProxy::resetStateAfterProcessExited() to the coordinated graphics code
790         WebView::processDidExit().
791
792         * UIProcess/CoordinatedGraphics/WebView.cpp:
793         (WebKit::WebView::processDidExit):
794         * UIProcess/WebPageProxy.cpp:
795         (WebKit::WebPageProxy::WebPageProxy):
796         (WebKit::WebPageProxy::resetStateAfterProcessExited):
797         * UIProcess/WebPageProxy.h:
798         (WebKit::WebPageProxy::urlAtProcessExit): Deleted.
799         (WebKit::WebPageProxy::loadStateAtProcessExit): Deleted.
800
801 2014-11-24  Ryuan Choi  <ryuan.choi@navercorp.com>
802
803         [EFL] REGRESSION(176066): It made all performance tests fail
804         https://bugs.webkit.org/show_bug.cgi?id=138865
805
806         Reviewed by Csaba Osztrogonác.
807
808         Since r176066, there are crash because evas_gl_surface is destroyed with
809         invalid evas_gl instance after evas_gl is destroyed.
810
811         * UIProcess/API/efl/EwkView.cpp:
812         (EwkView::~EwkView):
813
814 2014-11-24  Alberto Garcia  <berto@igalia.com>
815
816         Webkit2 doesnt build on powerpc 32 bits
817         https://bugs.webkit.org/show_bug.cgi?id=130837
818
819         Reviewed by Carlos Garcia Campos.
820
821         Check if libatomic is needed in order to use std::atomic, and add
822         it to the list of WebKit2 libraries.
823
824         * PlatformGTK.cmake:
825
826 2014-11-24  Carlos Garcia Campos  <cgarcia@igalia.com>
827
828         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.7.2 release.
829
830         * gtk/NEWS: Add release notes for 2.7.2.
831
832 2014-11-24  Krzysztof Czech  <k.czech@samsung.com>
833
834         [EFL] Utilize Eail library to support accessibility in EFL
835         https://bugs.webkit.org/show_bug.cgi?id=137742
836
837         Reviewed by Gyuyoung Kim.
838
839         Initialize EAIL module so that all the listeners and atk-bridge started properly.
840         Dynamic loading of EAIL help us to avoid elementary dependencies in WebKit.
841
842         * WebProcess/efl/WebProcessMainEfl.cpp:
843         (eailLibraryPath): reads path provided by ACCESSIBILITY_EAIL_LIBRARY_PATH variable.
844         (eail):
845
846 2014-11-24  Carlos Garcia Campos  <cgarcia@igalia.com>
847
848         [GTK] WebKitWebView is created with the wrong web context when using webkit_web_view_new_with_related_view()
849         https://bugs.webkit.org/show_bug.cgi?id=139023
850
851         Reviewed by Sergio Villar Senin.
852
853         The WebKitWebContext is a construct only property, so it's always
854         set to the default value when not provided, during the
855         construction. When a related-view is used to create a new web view
856         we should ensure that the same web context is used for the new web
857         view, instead of the default. We should also ignore any web
858         context given as construct parameter if a related view is alos provided.
859
860         * UIProcess/API/gtk/WebKitWebView.cpp:
861         (webkitWebViewConstructed): Do not set the context to the default
862         one when not given during construction.
863         (webkitWebViewSetProperty): Only use the default web context when
864         not provided as construct parameter and there isn't a related view.
865
866 2014-11-23  Carlos Garcia Campos  <cgarcia@igalia.com>
867
868         [GTK] Add API to override the default local storage directory
869         https://bugs.webkit.org/show_bug.cgi?id=138828
870
871         Reviewed by Gustavo Noronha Silva.
872
873         Add WebKitWebContext:local-storage-directory construct-only
874         property. If not provided the default will be used.
875
876         * UIProcess/API/gtk/WebKitWebContext.cpp:
877         (webkitWebContextGetProperty):
878         (webkitWebContextSetProperty):
879         (webkitWebContextConstructed):
880         (webkit_web_context_class_init):
881
882 2014-11-23  Conrad Shultz  <conrad_shultz@apple.com>
883
884         Page previews should have titles
885         https://bugs.webkit.org/show_bug.cgi?id=139020
886
887         Reviewed by Tim Horton.
888
889         * UIProcess/API/Cocoa/WKViewPrivate.h:
890         Declare -_titleForPreviewOfURL:.
891
892         * UIProcess/API/mac/WKView.mm:
893         (-[WKView _titleForPreviewOfURL:]):
894         Stub implementation.
895
896         * UIProcess/mac/WKActionMenuController.mm:
897         (+[WKPagePreviewViewController previewPadding]):
898         Account for the title height.
899         (-[WKPagePreviewViewController loadView]):
900         Set correct autoresize masks on some views; create and configure a title view that is
901         horizontally and vertically centered.
902         (-[WKActionMenuController pagePreviewViewController:titleForPreviewOfURL:]):
903         WKPagePreviewViewControllerDelegate method; wrap -[WKView _titleForPreviewOfURL:].
904
905 2014-11-22  Simon Fraser  <simon.fraser@apple.com>
906
907         Extend WKRenderObject and WKRenderLayer with some more useful data
908         https://bugs.webkit.org/show_bug.cgi?id=139006
909
910         Reviewed by Sam Weinig.
911         
912         Implement WKRenderLayerGetBackingStoreMemoryEstimate,
913         WKRenderObjectCopyTextSnippet and WKRenderObjectGetTextLength for improved
914         RenderLayer and RenderTree display in clients of the C SPI.        
915
916         * Shared/API/c/WKRenderLayer.cpp:
917         (WKRenderLayerGetBackingStoreMemoryEstimate):
918         * Shared/API/c/WKRenderLayer.h:
919         * Shared/API/c/WKRenderObject.cpp:
920         (WKRenderObjectCopyTextSnippet):
921         (WKRenderObjectGetTextLength):
922         * Shared/API/c/WKRenderObject.h:
923         * Shared/UserMessageCoders.h:
924         (WebKit::UserMessageEncoder::baseEncode):
925         (WebKit::UserMessageDecoder::baseDecode):
926         * Shared/WebRenderLayer.cpp:
927         (WebKit::WebRenderLayer::create):
928         (WebKit::WebRenderLayer::WebRenderLayer):
929         * Shared/WebRenderLayer.h:
930         (WebKit::WebRenderLayer::backingStoreMemoryEstimate):
931         * Shared/WebRenderObject.cpp:
932         (WebKit::WebRenderObject::create):
933         (WebKit::WebRenderObject::WebRenderObject):
934         * Shared/WebRenderObject.h:
935         (WebKit::WebRenderObject::textSnippet):
936         (WebKit::WebRenderObject::textLength):
937
938 2014-11-21  Jer Noble  <jer.noble@apple.com>
939
940         Support multiple signatures of diagnostic logging.
941         https://bugs.webkit.org/show_bug.cgi?id=138690
942
943         Reviewed by Anders Carlsson.
944
945         Extend the existing WKBundlePageDiagnosticLoggingClient interface by deprecating
946         the original logDiagnosticMessage client method in V1 and adding three new,
947         explicit client methods.
948
949         * CMakeLists.txt:
950         * WebKit2.xcodeproj/project.pbxproj:
951         * WebProcess/InjectedBundle/API/c/WKBundlePageDiagnosticLoggingClient.h:
952         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
953         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageDeprecated):
954             Renamed from logDiagnosticMessage().
955         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage): Pass to the client.
956         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageWithResult): Ditto.
957         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessageWithValue): Ditto.
958         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.h:
959         * WebProcess/WebCoreSupport/WebChromeClient.h:
960         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
961         (WebKit::WebChromeClient::logDiagnosticMessage): Deleted.
962         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp: Added.
963         (WebKit::WebDiagnosticLoggingClient::WebDiagnosticLoggingClient): Simple constructor.
964         (WebKit::WebDiagnosticLoggingClient::~WebDiagnosticLoggingClient): Simple destructor.
965         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessage): Pass to the injected bundle.
966         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithResult): Ditto.
967         (WebKit::WebDiagnosticLoggingClient::logDiagnosticMessageWithValue): Ditto.
968         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h: Added.
969         * WebProcess/WebPage/WebPage.cpp:
970         (WebKit::WebPage::WebPage): Initialize the new client.
971
972 2014-11-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
973
974         Unreviewed, EFL build fix since r176459.
975
976         r176459 removed Timer parameter in timer callbacks only for Mac port.
977         So this patch applies it to remaining classes for EFL port.
978
979         * UIProcess/API/efl/EwkView.cpp:
980         (EwkView::EwkView):
981         (EwkView::displayTimerFired):
982         * UIProcess/API/efl/EwkView.h:
983         * UIProcess/efl/TextCheckerClientEfl.cpp:
984         (TextCheckerClientEfl::TextCheckerClientEfl):
985         (TextCheckerClientEfl::languagesUpdateTimerFired):
986         (TextCheckerClientEfl::spellCheckingSettingChangeTimerFired):
987         * UIProcess/efl/TextCheckerClientEfl.h:
988         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
989         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
990         (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired):
991         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
992
993 2014-11-21  Chris Dumez  <cdumez@apple.com>
994
995         Unreviewed, iOS build fix after r176462.
996
997         Fix include path to TextIndicator.h to include WebCore/
998         as it was moved.
999
1000         * UIProcess/ios/PageClientImplIOS.mm:
1001
1002 2014-11-21  Chris Dumez  <cdumez@apple.com>
1003
1004         Unreviewed, iOS build fix after r176452.
1005
1006         dencodeFixedLengthData() now only takes 2 arguments instead of
1007         3.
1008
1009         * Shared/ios/QuickLookDocumentData.cpp:
1010         (WebKit::QuickLookDocumentData::decode):
1011
1012 2014-11-21  Zalan Bujtas  <zalan@apple.com>
1013
1014         Simple line layout: Add "show simple line layout debug borders" setting to MiniBrowser.
1015         https://bugs.webkit.org/show_bug.cgi?id=138981
1016
1017         Reviewed by Simon Fraser.
1018
1019         * UIProcess/API/Cocoa/WKPreferences.mm:
1020         (-[WKPreferences _simpleLineLayoutDebugBordersEnabled]):
1021         (-[WKPreferences _setSimpleLineLayoutDebugBordersEnabled:]):
1022         * UIProcess/API/Cocoa/WKPreferencesPrivate.h:
1023
1024 2014-11-21  Eric Carlson  <eric.carlson@apple.com>
1025
1026         WebVideoFullscreenManagerProxy must clear pointers when invalidated
1027         https://bugs.webkit.org/show_bug.cgi?id=138982
1028
1029         Reviewed by Jer Noble.
1030
1031         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1032         (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy): Call invalidate.
1033         (WebKit::WebVideoFullscreenManagerProxy::invalidate): Set WebVideoFullscreenModel and
1034             WebVideoFullscreenChangeObserver to NULL.
1035
1036 2014-11-21  Timothy Horton  <timothy_horton@apple.com>
1037
1038         Fix the build.
1039
1040         * UIProcess/API/mac/WKView.mm:
1041         (-[WKView mouseDown:]):
1042
1043 2014-11-21  Beth Dakin  <bdakin@apple.com>
1044
1045         The preview action menu item should not have a title
1046         https://bugs.webkit.org/show_bug.cgi?id=138989
1047         -and corresponding-
1048         rdar://problem/19061959
1049
1050         Reviewed by Anders Carlsson.
1051
1052         * UIProcess/mac/WKActionMenuController.mm:
1053         (-[WKActionMenuController _createActionMenuItemForTag:]):
1054
1055 2014-11-21  Conrad Shultz  <conrad_shultz@apple.com>
1056
1057         Page previews should have a margin.
1058         https://bugs.webkit.org/show_bug.cgi?id=138990
1059
1060         Reviewed by Beth Dakin.
1061
1062         Enclose the WKWebView (or client-supplied preview view) in a container slightly larger
1063         than the preview view. Adjust sizing code to accommodate the margin.
1064
1065         * UIProcess/mac/WKActionMenuController.mm:
1066         (+[WKPagePreviewViewController previewPadding]):
1067         Return the total amount of fixed padding surrounding the preview
1068         (-[WKPagePreviewViewController loadView]):
1069         Store the actual previewView in an ivar so that clients can distinguish it from the container
1070         view; wrap the preview in a container view; set frames appropriately.
1071         (-[WKActionMenuController _createPreviewPopover]):
1072         Update to reflect method rename; supplement the popover size with the fixed padding.
1073         (-[WKActionMenuController _preferredPopoverSizeWithPreviewPadding:]):
1074         Renamed from -_preferredPopoverSize; account for the fixed padding when computing the preferred size.
1075         (-[WKActionMenuController _clearPreviewPopover]):
1076         Use the previewView ivar instead of the view controller's view.
1077         (-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
1078         Ditto.
1079         (-[WKActionMenuController _preferredPopoverSize]): Deleted.
1080
1081 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1082
1083         REGRESSION (r176415): Can get stuck, unable to invoke any DataDetectors popovers
1084         https://bugs.webkit.org/show_bug.cgi?id=138955
1085         <rdar://problem/19056442>
1086
1087         Reviewed by Anders Carlsson.
1088
1089         * UIProcess/API/mac/WKView.mm:
1090         (-[WKView mouseDown:]):
1091         * UIProcess/mac/WKActionMenuController.h:
1092         * UIProcess/mac/WKActionMenuController.mm:
1093         (-[WKActionMenuController wkView:willHandleMouseDown:]):
1094         (-[WKActionMenuController didCloseMenu:withEvent:]):
1095         (-[WKActionMenuController menuNeedsUpdate:]):
1096         Keep track of whether we have called shouldUseActionsWithContext: on a
1097         DDActionContext; if we get a mouseDown without having seen didCloseMenu:
1098         (and thus don't properly pair the shouldUseActionsWithContext: with a didUseActions),
1099         tear down the old DDActionContext before proceeding.
1100
1101 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1102
1103         REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
1104         ​https://bugs.webkit.org/show_bug.cgi?id=138960
1105         <rdar://problem/19056715>
1106
1107         Reviewed by Anders Carlsson.
1108
1109         * UIProcess/mac/WKActionMenuController.mm:
1110         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1111         (-[WKActionMenuController _defaultMenuItemsForMailtoLink]): Deleted.
1112         Use DataDetectors SPI instead of an explicit blacklist.
1113
1114 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1115
1116         Crashes while encoding a TextIndicator with no contentImageWithHighlight
1117         https://bugs.webkit.org/show_bug.cgi?id=138984
1118         <rdar://problem/19063717>
1119
1120         Reviewed by Sam Weinig.
1121
1122         * Shared/WebCoreArgumentCoders.cpp:
1123         (IPC::ArgumentCoder<TextIndicatorData>::encode):
1124         (IPC::ArgumentCoder<TextIndicatorData>::decode):
1125         encodeImage doesn't deal with null images, so handle that case gracefully.
1126
1127 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1128
1129         REGRESSION (r176351): Parts of apple.com/contact aren't Lookup-able
1130         https://bugs.webkit.org/show_bug.cgi?id=138960
1131         <rdar://problem/19056715>
1132
1133         Reviewed by Beth Dakin.
1134
1135         * UIProcess/mac/WKActionMenuController.mm:
1136         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1137         Blacklist contact results, because they don't have useful menus. If we
1138         bail before setting up _currentActionContext, we'll still allow fallthrough
1139         to ordinary text actions, avoiding mysterious failure when a contact is detected.
1140
1141         This doesn't break the case that r176351 was intended to fix,
1142         because in that case we were detecting e.g. addresses.
1143
1144 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1145
1146         Move TextIndicator{Window} to WebCore
1147         https://bugs.webkit.org/show_bug.cgi?id=138954
1148         <rdar://problem/18992185>
1149
1150         Some adjustments by Csaba Osztrogonác.
1151         Reviewed by Anders Carlsson.
1152
1153         * CMakeLists.txt:
1154         Remove TextIndicator.cpp.
1155
1156         * Scripts/webkit/messages.py:
1157         (struct_or_class):
1158         (headers_for_type):
1159         Tell messages.py that TextIndicatorData is a struct, and comes from TextIndicator.h.
1160
1161         * Shared/WebCoreArgumentCoders.h:
1162         * Shared/WebCoreArgumentCoders.cpp:
1163         (IPC::ArgumentCoder<TextIndicatorData>::encode):
1164         (IPC::ArgumentCoder<TextIndicatorData>::decode):
1165         Add argument coders for TextIndicatorData.
1166
1167         * Shared/DictionaryPopupInfo.h:        
1168         * Shared/mac/ActionMenuHitTestResult.h:
1169         * Shared/mac/ActionMenuHitTestResult.mm:
1170         * UIProcess/API/gtk/PageClientImpl.h:
1171         * UIProcess/API/gtk/PageClientImpl.cpp:
1172         * UIProcess/API/mac/WKView.mm:
1173         * UIProcess/API/mac/WKViewInternal.h:
1174         * UIProcess/CoordinatedGraphics/WebView.h:
1175         * UIProcess/CoordinatedGraphics/WebView.cpp:
1176         * UIProcess/PageClient.h:
1177         * UIProcess/WebPageProxy.cpp:
1178         * UIProcess/WebPageProxy.h:
1179         * UIProcess/WebPageProxy.messages.in:
1180         * UIProcess/ios/PageClientImplIOS.h:
1181         * UIProcess/ios/WKContentView.h:
1182         * UIProcess/mac/PageClientImpl.h:
1183         * UIProcess/mac/PageClientImpl.mm:
1184         * UIProcess/mac/WKActionMenuController.mm:
1185         * WebKit2.xcodeproj/project.pbxproj:
1186         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1187         * WebProcess/WebPage/FindController.cpp:
1188         * WebProcess/WebPage/WebPage.h:
1189         * WebProcess/WebPage/ios/WebPageIOS.mm:
1190         * WebProcess/WebPage/mac/WebPageMac.mm:
1191         Adjust to TextIndicator and TextIndicatorWindow's new home.
1192
1193 2014-11-21  Tim Horton  <timothy_horton@apple.com>
1194
1195         REGRESSION (r176238): Mailto links are getting preloaded, which results in a compose window
1196         https://bugs.webkit.org/show_bug.cgi?id=138972
1197
1198         Reviewed by Beth Dakin.
1199
1200         * UIProcess/mac/WKActionMenuController.mm:
1201         (-[WKActionMenuController willOpenMenu:withEvent:]):
1202         Only preload links.
1203
1204 2014-11-21  Anders Carlsson  <andersca@apple.com>
1205
1206         Remove the Timer parameters from timer callbacks
1207         https://bugs.webkit.org/show_bug.cgi?id=138974
1208
1209         Reviewed by Antti Koivisto.
1210
1211         * NetworkProcess/NetworkResourceLoader.cpp:
1212         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1213         (WebKit::NetworkResourceLoader::bufferingTimerFired):
1214         * NetworkProcess/NetworkResourceLoader.h:
1215         * Shared/WebMemorySampler.cpp:
1216         (WebKit::WebMemorySampler::WebMemorySampler):
1217         (WebKit::WebMemorySampler::sampleTimerFired):
1218         (WebKit::WebMemorySampler::stopTimerFired):
1219         * Shared/WebMemorySampler.h:
1220         * Shared/mac/RemoteLayerBackingStoreCollection.h:
1221         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1222         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
1223         (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
1224         * WebProcess/Plugins/PluginView.cpp:
1225         (WebKit::PluginView::PluginView):
1226         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1227         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1228         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1229         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
1230         * WebProcess/WebProcess.cpp:
1231         (WebKit::WebProcess::WebProcess):
1232         (WebKit::WebProcess::processSuspensionCleanupTimerFired):
1233         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
1234         * WebProcess/WebProcess.h:
1235
1236 2014-11-21  Anders Carlsson  <andersca@apple.com>
1237
1238         Remove the Timer parameters from timer callbacks
1239         https://bugs.webkit.org/show_bug.cgi?id=138974
1240
1241         Reviewed by Antti Koivisto.
1242
1243         * NetworkProcess/NetworkResourceLoader.cpp:
1244         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1245         (WebKit::NetworkResourceLoader::bufferingTimerFired):
1246         * NetworkProcess/NetworkResourceLoader.h:
1247         * Shared/WebMemorySampler.cpp:
1248         (WebKit::WebMemorySampler::WebMemorySampler):
1249         (WebKit::WebMemorySampler::sampleTimerFired):
1250         (WebKit::WebMemorySampler::stopTimerFired):
1251         * Shared/WebMemorySampler.h:
1252         * Shared/mac/RemoteLayerBackingStoreCollection.h:
1253         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
1254         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
1255         (WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
1256         * WebProcess/Plugins/PluginView.cpp:
1257         (WebKit::PluginView::PluginView):
1258         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1259         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1260         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
1261         (WebKit::RemoteLayerTreeDrawingArea::layerFlushTimerFired):
1262         * WebProcess/WebProcess.cpp:
1263         (WebKit::WebProcess::WebProcess):
1264         (WebKit::WebProcess::processSuspensionCleanupTimerFired):
1265         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
1266         * WebProcess/WebProcess.h:
1267
1268 2014-11-21  Antti Koivisto  <antti@apple.com>
1269
1270         Fix iOS build.
1271
1272         * Shared/ios/QuickLookDocumentData.cpp:
1273         (WebKit::QuickLookDocumentData::encode):
1274
1275 2014-11-21  Antti Koivisto  <antti@apple.com>
1276
1277         Remove alignment code from IPC coders
1278         https://bugs.webkit.org/show_bug.cgi?id=138963
1279
1280         Reviewed by Anders Carlsson.
1281
1282         Alignment code achieves nothing except making the messages somewhat bigger.
1283
1284         * Platform/IPC/ArgumentCoders.cpp:
1285         (IPC::ArgumentCoder<CString>::encode):
1286         (IPC::ArgumentCoder<CString>::decode):
1287         (IPC::ArgumentCoder<String>::encode):
1288         (IPC::decodeStringText):
1289         * Platform/IPC/ArgumentCoders.h:
1290         (IPC::SimpleArgumentCoder::encode):
1291         (IPC::SimpleArgumentCoder::decode):
1292         * Platform/IPC/ArgumentDecoder.cpp:
1293         (IPC::ArgumentDecoder::initialize):
1294         (IPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
1295         (IPC::ArgumentDecoder::decodeFixedLengthData):
1296         (IPC::ArgumentDecoder::decodeVariableLengthByteArray):
1297         (IPC::ArgumentDecoder::decodeNumber):
1298         (IPC::ArgumentDecoder::decode):
1299         (IPC::roundUpToAlignment): Deleted.
1300         (IPC::alignedBufferIsLargeEnoughToContain): Deleted.
1301         (IPC::ArgumentDecoder::alignBufferPosition): Deleted.
1302         (IPC::decodeValueFromBuffer): Deleted.
1303         * Platform/IPC/ArgumentDecoder.h:
1304         (IPC::ArgumentDecoder::isInvalid):
1305         (IPC::ArgumentDecoder::markInvalid):
1306         (IPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
1307         * Platform/IPC/ArgumentEncoder.cpp:
1308         (IPC::ArgumentEncoder::ArgumentEncoder):
1309         (IPC::ArgumentEncoder::grow):
1310         (IPC::ArgumentEncoder::encodeFixedLengthData):
1311         (IPC::ArgumentEncoder::encodeVariableLengthByteArray):
1312         (IPC::ArgumentEncoder::encode):
1313         * Platform/IPC/ArgumentEncoder.h:
1314         (IPC::ArgumentEncoder::buffer):
1315         (IPC::ArgumentEncoder::mutableBuffer):
1316         * Platform/IPC/DataReference.cpp:
1317         (IPC::SharedBufferDataReference::encode):
1318         * Platform/IPC/MessageEncoder.cpp:
1319         (IPC::MessageEncoder::setIsSyncMessage):
1320         (IPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
1321         * Platform/IPC/mac/ConnectionMac.mm:
1322         (IPC::Connection::sendOutgoingMessage):
1323
1324 2014-11-21  Anders Carlsson  <andersca@apple.com>
1325
1326         Make memoryCache() return a reference
1327         https://bugs.webkit.org/show_bug.cgi?id=138939
1328
1329         Reviewed by Antti Koivisto.
1330
1331         * WebProcess/Network/NetworkProcessConnection.cpp:
1332         (WebKit::NetworkProcessConnection::didCacheResource):
1333         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1334         (WebKit::WebResourceCacheManager::getCacheOrigins):
1335         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
1336         * WebProcess/WebProcess.cpp:
1337         (WebKit::WebProcess::terminate):
1338         (WebKit::WebProcess::didClose):
1339         (WebKit::WebProcess::clearResourceCaches):
1340         (WebKit::getWebCoreMemoryCacheStatistics):
1341         (WebKit::WebProcess::setMemoryCacheDisabled):
1342         * WebProcess/cocoa/WebProcessCocoa.mm:
1343         (WebKit::WebProcess::platformSetCacheModel):
1344         * WebProcess/soup/WebProcessSoup.cpp:
1345         (WebKit::WebProcess::platformSetCacheModel):
1346
1347 2014-11-21  Daniel Bates  <dabates@apple.com>
1348
1349         [iOS] WebKit2 fails to build with public SDK due to missing SPI from CFNetwork, QuartzCore, MediaPlayer, XPC
1350         https://bugs.webkit.org/show_bug.cgi?id=138930
1351
1352         Reviewed by Anders Carlsson.
1353
1354         * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Remove forward declaration for NSCachedURLResponse
1355         methods as this functionality was incorporated into CFNetworkSPI.h, which is included by this file.
1356         * Platform/mac/LayerHostingContext.mm: Moved QuartzCore forward declarations from this file to file
1357         QuartzCoreSPI.h and included header QuartzCoreSPI.h.
1358         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: Include header XPCSPI.h.
1359         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: Remove forward declarations of
1360         XPC SPI since these declarations are part of XCPSPI.h, which is included by header XPCServiceEntryPoint.h.
1361         * UIProcess/API/Cocoa/WKWebView.mm: Remove unnecessary include of header QuartzCore/CARenderServer.h
1362         as it will be included by header QuartzCoreSPI.h.
1363         * UIProcess/Network/NetworkProcessProxy.cpp: Include header XPCSPI.h when building for iOS with
1364         USE(XPC_SERVICES) enabled.
1365         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Include header MediaPlayerSPI.h instead of including
1366         MediaPlayer private headers directly. Also sort the list of #import directives.
1367
1368 2014-11-20  Dan Bernstein  <mitz@apple.com>
1369
1370         Build fix.
1371
1372         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
1373         (-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]): Cast the return value of
1374         [getMPAudioVideoRoutingPopoverControllerClass() alloc] to resolve ambiguity about which
1375         -initWithType: we are calling.
1376         (-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]): Cast to resolve ambiguity.
1377         (-[WKAirPlayRoutePicker show:fromRect:]): Cast for consistency.
1378
1379 2014-11-20  Benjamin Poulain  <bpoulain@apple.com>
1380
1381         Remove the remaining vestiges of minimal-ui
1382         https://bugs.webkit.org/show_bug.cgi?id=138890
1383
1384         Reviewed by Sam Weinig.
1385
1386         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1387         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
1388         * WebProcess/WebPage/WebPage.cpp:
1389         (WebKit::WebPage::didCommitLoad):
1390         (WebKit::WebPage::didFinishDocumentLoad): Deleted.
1391         * WebProcess/WebPage/WebPage.h:
1392         * WebProcess/WebPage/ios/WebPageIOS.mm:
1393         (WebKit::WebPage::savePageState):
1394         (WebKit::WebPage::restorePageState):
1395         (WebKit::WebPage::viewportConfigurationChanged):
1396         (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
1397
1398 2014-11-20  Beth Dakin  <bdakin@apple.com>
1399
1400         Preview popover needs minimum and maximum sizes
1401         https://bugs.webkit.org/show_bug.cgi?id=138943
1402         -and corresponding-
1403         rdar://problem/18904651
1404
1405         Reviewed by Tim Horton.
1406
1407         Quick follow-up to get the right screen.
1408         * UIProcess/mac/WKActionMenuController.mm:
1409         (-[WKActionMenuController largestPopoverSize]):
1410
1411 2014-11-20  Beth Dakin  <bdakin@apple.com>
1412
1413         Preview popover needs minimum and maximum sizes
1414         https://bugs.webkit.org/show_bug.cgi?id=138943
1415         -and corresponding-
1416         rdar://problem/18904651
1417
1418         Reviewed by Tim Horton.
1419
1420         This patch enforces minimum and maximum popover sizes. If the popover needs to be 
1421         sized up to be above the minimum, it will end up covering some of the 
1422         _hitTestResult, so we should compute a new origin rect based on the original 
1423         event location. 
1424         * UIProcess/mac/WKActionMenuController.h:
1425         * UIProcess/mac/WKActionMenuController.mm:
1426         (-[WKActionMenuController prepareForMenu:withEvent:]):
1427         (-[WKActionMenuController _previewURLFromActionMenu:]):
1428         (-[WKActionMenuController _createPreviewPopover]):
1429         (-[WKActionMenuController largestPopoverSize]):
1430         (-[WKActionMenuController _preferredPopoverSize]):
1431         (-[WKActionMenuController _preferredSizeForPopoverPresentedFromOriginRect:]): Deleted.
1432
1433 2014-11-20  Conrad Shultz  <conrad_shultz@apple.com>
1434
1435         Clicks on previews can be recognized multiple times
1436         https://bugs.webkit.org/show_bug.cgi?id=138944
1437
1438         Reviewed by Tim Horton.
1439
1440         * UIProcess/mac/WKActionMenuController.mm:
1441         (-[WKPagePreviewViewController _clickRecognized:]):
1442         Only dispatch the delegate message on the appropriate gesture recognizer state transition.
1443
1444 2014-11-20  Conrad Shultz  <conrad_shultz@apple.com>
1445
1446         Clients should be able to customize preview click behavior
1447         https://bugs.webkit.org/show_bug.cgi?id=138940
1448
1449         Reviewed by Tim Horton.
1450
1451         * UIProcess/API/Cocoa/WKViewPrivate.h:
1452         Declare -_handleClickInPreviewView:URL:.
1453
1454         * UIProcess/API/mac/WKView.mm:
1455         (-[WKView _handleClickInPreviewView:URL:]):
1456         Extracted from -[WKActionMenuController pagePreviewViewControllerWasClicked:].
1457
1458         * UIProcess/mac/WKActionMenuController.mm:
1459         (-[WKActionMenuController pagePreviewViewControllerWasClicked:]):
1460         Extract code to -[WKView _handleClickInPreviewView:URL:].
1461
1462 2014-11-20  Csaba Osztrogonác  <ossy@webkit.org>
1463
1464         URTBF after r176420 to fix non Apple builds.
1465
1466         * WebProcess/WebProcess.cpp:
1467         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
1468
1469 2014-11-20  Anders Carlsson  <andersca@apple.com>
1470
1471         WebPlugInClient::m_webPage can never be null, use a reference
1472         https://bugs.webkit.org/show_bug.cgi?id=138937
1473
1474         Reviewed by Andreas Kling.
1475
1476         * WebProcess/WebCoreSupport/WebPlugInClient.cpp:
1477         (WebKit::WebPlugInClient::WebPlugInClient):
1478         (WebKit::WebPlugInClient::shouldAutoStartFromOrigin):
1479         * WebProcess/WebCoreSupport/WebPlugInClient.h:
1480         * WebProcess/WebPage/WebPage.cpp:
1481         (WebKit::WebPage::WebPage):
1482         * WebProcess/WebProcess.cpp:
1483         (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
1484         * WebProcess/WebProcess.h:
1485
1486 2014-11-20  Tim Horton  <timothy_horton@apple.com>
1487
1488         TextIndicator should have getters for TextIndicator::Data properties
1489         https://bugs.webkit.org/show_bug.cgi?id=138920
1490
1491         Reviewed by Beth Dakin.
1492
1493         Instead of having clients reach into the data(), add getters.
1494         Remove frameRect(), which is identical to the textBoundingRectInWindowCoordinates getter.
1495         Remove declarations for draw/drawContentImage, which were already removed.
1496
1497         * Shared/TextIndicator.cpp:
1498         (WebKit::TextIndicator::frameRect): Deleted.
1499         * Shared/TextIndicator.h:
1500         (WebKit::TextIndicator::textBoundingRectInWindowCoordinates):
1501         (WebKit::TextIndicator::textRectsInBoundingRectCoordinates):
1502         (WebKit::TextIndicator::contentImageScaleFactor):
1503         (WebKit::TextIndicator::contentImageWithHighlight):
1504         (WebKit::TextIndicator::contentImage):
1505         * UIProcess/mac/TextIndicatorWindow.mm:
1506         (-[WKTextIndicatorView initWithFrame:textIndicator:margin:]):
1507         (-[WKTextIndicatorView presentWithCompletionHandler:]):
1508         (WebKit::TextIndicatorWindow::setTextIndicator):
1509
1510 2014-11-20  Tim Horton  <timothy_horton@apple.com>
1511
1512         Cancel DataDetectors menu earlier if we know it can't be presented
1513         https://bugs.webkit.org/show_bug.cgi?id=138922
1514         <rdar://problem/18950441>
1515
1516         Reviewed by Beth Dakin.
1517
1518         * UIProcess/mac/WKActionMenuController.mm:
1519         (-[WKActionMenuController willOpenMenu:withEvent:]):
1520         If we end up with a menu with no items, don't change selection or anything.
1521
1522         (-[WKActionMenuController menuNeedsUpdate:]):
1523         Move our call to shouldUseActionsWithContext earlier, to menuNeedsUpdate,
1524         and use a bigger hammer (removeAllItems).
1525
1526 2014-11-20  Tim Horton  <timothy_horton@apple.com>
1527
1528         Don't use a TextIndicator BounceAndCrossfade transition if the selection highlight is never shown
1529         https://bugs.webkit.org/show_bug.cgi?id=138919
1530         <rdar://problem/19042207>
1531
1532         Reviewed by Beth Dakin.
1533
1534         * Shared/TextIndicator.h:
1535         (WebKit::TextIndicator::presentationTransition):
1536         (WebKit::TextIndicator::setPresentationTransition):
1537         Add getter and setter pair.
1538
1539         * UIProcess/mac/WKActionMenuController.mm:
1540         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1541         If the selection highlight will never be shown because there's only a single menu item,
1542         use a normal bounce animation instead of bounce + crossfade.
1543
1544 2014-11-20  Beth Dakin  <bdakin@apple.com>
1545
1546         Invalid message WebPageProxy.DidPerformDictionaryLookup on Google stocks result
1547         https://bugs.webkit.org/show_bug.cgi?id=138568
1548         -and corresponding-
1549         rdar://problem/18904600
1550
1551         Reviewed by Tim Horton.
1552
1553         Skip images for lookup.
1554         * WebProcess/WebPage/mac/WebPageMac.mm:
1555         (WebKit::WebPage::performDictionaryLookupForRange):
1556
1557 2014-11-20  Daniel Bates  <dabates@apple.com>
1558
1559         [iOS] Add more ENABLE({TOUCH_EVENTS, IOS_TOUCH_EVENTS})-guards in WebKit2
1560         https://bugs.webkit.org/show_bug.cgi?id=138928
1561
1562         Reviewed by Simon Fraser.
1563
1564         * UIProcess/ios/WKContentViewInteraction.h:
1565         * UIProcess/ios/WKContentViewInteraction.mm:
1566         (-[WKContentView setupInteraction]):
1567         * WebProcess/WebPage/WebPage.cpp:
1568         (WebKit::WebPage::didCommitLoad):
1569         * WebProcess/WebPage/WebPage.h:
1570         * WebProcess/WebPage/ios/WebPageIOS.mm:
1571         (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
1572
1573 2014-11-20  Anders Carlsson  <andersca@apple.com>
1574
1575         Add -[WKWebView loadData:MIMEType:textEncodingName:baseURL:]
1576         https://bugs.webkit.org/show_bug.cgi?id=138929
1577         <rdar://problem/18683802>
1578
1579         Reviewed by Dan Bernstein.
1580
1581         Also, re-implement -[WKWebView loadHTMLString:baseURL:] in terms of this newly added function
1582         and assume a UTF-8 encoding. This matches what Legacy WebKit does.
1583
1584         * UIProcess/API/Cocoa/WKWebView.h:
1585         * UIProcess/API/Cocoa/WKWebView.mm:
1586         (-[WKWebView loadHTMLString:baseURL:]):
1587         (-[WKWebView loadData:MIMEType:textEncodingName:baseURL:]):
1588         * UIProcess/WebPageProxy.cpp:
1589         (WebKit::WebPageProxy::loadData):
1590         * UIProcess/WebPageProxy.h:
1591
1592 2014-11-20  Antti Koivisto  <antti@apple.com>
1593
1594         Remove alignment code from cache coders
1595         https://bugs.webkit.org/show_bug.cgi?id=138927
1596
1597         Failed to land this file.
1598
1599         * NetworkProcess/cache/NetworkCacheCoders.cpp:
1600         (WebKit::NetworkCacheCoder<CString>::encode):
1601         (WebKit::NetworkCacheCoder<CString>::decode):
1602         (WebKit::NetworkCacheCoder<String>::encode):
1603         (WebKit::decodeStringText):
1604         (WebKit::NetworkCacheCoder<WebCore::CertificateInfo>::encode):
1605         (WebKit::NetworkCacheCoder<WebCore::CertificateInfo>::decode):
1606         * NetworkProcess/cache/NetworkCacheCoders.h:
1607
1608 2014-11-20  Antti Koivisto  <antti@apple.com>
1609
1610         Remove alignment code from cache coders
1611         https://bugs.webkit.org/show_bug.cgi?id=138927
1612
1613         Reviewed by Anders Carlsson.
1614
1615         Alignment code doesn't do anything useful, wastes space and produces wrong results
1616         if the encoder and decoder buffers don't have the same 8-byte alignment.
1617
1618         * NetworkProcess/cache/NetworkCacheDecoder.cpp:
1619         (WebKit::NetworkCacheDecoder::NetworkCacheDecoder):
1620         (WebKit::NetworkCacheDecoder::bufferIsLargeEnoughToContain):
1621         (WebKit::NetworkCacheDecoder::decodeFixedLengthData):
1622         (WebKit::NetworkCacheDecoder::decodeNumber):
1623         (WebKit::roundUpToAlignment): Deleted.
1624         (WebKit::alignedBufferIsLargeEnoughToContain): Deleted.
1625         (WebKit::NetworkCacheDecoder::alignBufferPosition): Deleted.
1626         * NetworkProcess/cache/NetworkCacheDecoder.h:
1627         (WebKit::NetworkCacheDecoder::currentOffset):
1628         (WebKit::NetworkCacheDecoder::isInvalid):
1629         (WebKit::NetworkCacheDecoder::markInvalid):
1630         (WebKit::NetworkCacheDecoder::bufferIsLargeEnoughToContain):
1631         * NetworkProcess/cache/NetworkCacheEncoder.cpp:
1632         (WebKit::NetworkCacheEncoder::grow):
1633         (WebKit::NetworkCacheEncoder::encodeFixedLengthData):
1634         (WebKit::NetworkCacheEncoder::encodeNumber):
1635         (WebKit::roundUpToAlignment): Deleted.
1636         * NetworkProcess/cache/NetworkCacheEncoder.h:
1637
1638 2014-11-20  Csaba Osztrogonác  <ossy@webkit.org>
1639
1640         [GTK] URTBF after r176363.
1641
1642         * UIProcess/API/gtk/PageClientImpl.cpp:
1643         (WebKit::PageClientImpl::setTextIndicator):
1644         * UIProcess/API/gtk/PageClientImpl.h:
1645
1646 2014-11-19  Yongjun Zhang  <yongjun_zhang@apple.com>
1647
1648         Don't track sub-resources that are started after main frame progress has completed.
1649         https://bugs.webkit.org/show_bug.cgi?id=138582
1650
1651         Reviewed by Sam Weinig.
1652
1653         After main frame progress has finished, starting loading a sub-resource shouldn't affect
1654         UI process's view of page loading status (i.e., the page has already completed loading
1655         and the progress shouldn't change). To achive that, don't track the subresources that
1656         are started after the main frame has finished, except for those triggered by user interaction.
1657
1658         * WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:  Notify WebPage that the main frame progress
1659             has started or finished.
1660         (WebKit::WebProgressTrackerClient::progressStarted):
1661         (WebKit::WebProgressTrackerClient::progressFinished):
1662         * WebProcess/WebPage/WebPage.cpp:
1663         (WebKit::WebPage::WebPage):
1664         (WebKit::WebPage::addResourceRequest): Don't track the resource request if it is initiated after
1665             the main frame is loaded and it is not triggered by user interaction.
1666         (WebKit::WebPage::removeResourceRequest):
1667         * WebProcess/WebPage/WebPage.h: Rename m_networkResourceRequestIdentifiers to m_trackedNetworkResourceRequestIdentifiers.
1668         (WebKit::WebPage::setMainFrameProgressCompleted):
1669
1670 2014-11-19  Sun-woo Nam  <sunny.nam@samsung.com>
1671
1672         [EFL] Fix build failure since r176363.
1673         https://bugs.webkit.org/show_bug.cgi?id=138903
1674
1675         Reviewed by Gyuyoung Kim.
1676
1677         The parameter for animation on setTextIndicator() was removed on 'PageClient' class.
1678
1679         * UIProcess/CoordinatedGraphics/WebView.cpp:
1680         (WebKit::WebView::setTextIndicator):
1681         * UIProcess/CoordinatedGraphics/WebView.h:
1682
1683 2014-11-19  Timothy Horton  <timothy_horton@apple.com>
1684
1685         Try to fix the iOS build
1686
1687         * WebProcess/WebPage/ios/WebPageIOS.mm:
1688         (WebKit::WebPage::performDictionaryLookupForSelection):
1689         (WebKit::WebPage::performDictionaryLookupForRange):
1690
1691 2014-11-19  Timothy Horton  <timothy_horton@apple.com>
1692
1693         Fix the 32-bit build
1694
1695         * UIProcess/mac/TextIndicatorWindow.mm:
1696         (WebKit::TextIndicatorWindow::setTextIndicator):
1697
1698 2014-11-19  Tim Horton  <timothy_horton@apple.com>
1699
1700         Add an optional entry transition (from selection highlight) to TextIndicator
1701         https://bugs.webkit.org/show_bug.cgi?id=138856
1702         <rdar://problem/18840128>
1703
1704         Reviewed by Anders Carlsson.
1705
1706         * Shared/TextIndicator.cpp:
1707         (WebKit::outsetIndicatorRectIncludingShadow):
1708         (WebKit::TextIndicator::createWithRange):
1709         (WebKit::snapshotSelectionWithHighlight):
1710         (WebKit::TextIndicator::createWithSelectionInFrame):
1711         (WebKit::TextIndicator::frameRect):
1712         (WebKit::TextIndicator::Data::encode):
1713         (WebKit::TextIndicator::Data::decode):
1714         Remove TextIndicator::draw and related functions; drawing is handled entirely
1715         by the TextIndicatorWindow now, and TextIndicator just stores the required data.
1716
1717         Unify outsetIndicatorRectIncludingShadow.
1718
1719         Add an argument to createWithRange/createWithSelectionInFrame to indicate
1720         if the TextIndicator should transition from the selection highlight to
1721         the yellow bubble.
1722
1723         If we're doing the transition, paint the selection into a second bitmap,
1724         without forcing the text to black and without hiding the blue highlight.
1725
1726         Encode/decode the second bitmap.
1727
1728         * Shared/TextIndicator.h:
1729         * UIProcess/mac/TextIndicatorWindow.h:
1730         * UIProcess/mac/TextIndicatorWindow.mm:
1731         (-[WKTextIndicatorView initWithFrame:textIndicator:margin:transitionFromSelectionColor:]):
1732         (-[WKTextIndicatorView presentWithCompletionHandler:]):
1733         (-[WKTextIndicatorView hideWithCompletionHandler:]):
1734         (-[WKTextIndicatorView isFlipped]):
1735         (WebKit::TextIndicatorWindow::TextIndicatorWindow):
1736         (WebKit::TextIndicatorWindow::setTextIndicator):
1737         (WebKit::TextIndicatorWindow::closeWindow):
1738         (WebKit::TextIndicatorWindow::startFadeOutTimerFired):
1739         Re-implement the bounce animation using CoreAnimation instead of
1740         the WKSI-based WKWindowBounceAnimation*.
1741
1742         * WebProcess/WebPage/WebPage.h:
1743         * WebProcess/WebPage/mac/WebPageMac.mm:
1744         (WebKit::WebPage::performDictionaryLookupForSelection):
1745         (WebKit::WebPage::performDictionaryLookupOfCurrentSelection):
1746         (WebKit::WebPage::performDictionaryLookupForRange):
1747         (WebKit::WebPage::performActionMenuHitTestAtLocation):
1748         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1749         Use the aforementioned transition animation for performDictionaryLookupOfCurrentSelection,
1750         the context menu lookup item, and for Data Detectors.
1751
1752 2014-11-19  Anders Carlsson  <andersca@apple.com>
1753
1754         Add a version of API::Data::createWithoutCopying that takes an NSData
1755         https://bugs.webkit.org/show_bug.cgi?id=138893
1756
1757         Reviewed by Dan Bernstein.
1758
1759         * Shared/APIData.h:
1760         * Shared/Cocoa/APIDataCocoa.mm: Added.
1761         (API::Data::createWithoutCopying):
1762         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1763         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
1764         (releaseNSData): Deleted.
1765         * WebKit2.xcodeproj/project.pbxproj:
1766         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
1767         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
1768
1769 2014-11-19  Beth Dakin  <bdakin@apple.com>
1770
1771         Invoking an action menu on a selection should result in the text menu
1772         https://bugs.webkit.org/show_bug.cgi?id=138892
1773         -and corresponding-
1774         rdar://problem/18996776
1775
1776         Reviewed by Tim Horton.
1777
1778         * UIProcess/mac/WKActionMenuController.mm:
1779         (-[WKActionMenuController _defaultMenuItems]):
1780
1781 2014-11-19  Anders Carlsson  <andersca@apple.com>
1782
1783         Fix iOS build.
1784
1785         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1786
1787 2014-11-19  Anders Carlsson  <andersca@apple.com>
1788
1789         Rename two Cocoa-only .cpp files to .mm.
1790
1791         Rubber-stamped by Sam Weinig.
1792
1793         * Shared/APIWebArchive.mm: Renamed from Source/WebKit2/Shared/APIWebArchive.cpp.
1794         * Shared/APIWebArchiveResource.mm: Renamed from Source/WebKit2/Shared/APIWebArchiveResource.cpp.
1795         * WebKit2.xcodeproj/project.pbxproj:
1796
1797 2014-11-19  Beth Dakin  <bdakin@apple.com>
1798
1799         Data detected results with no menu items should not fall through to regular text 
1800         action menus
1801         https://bugs.webkit.org/show_bug.cgi?id=138887
1802         -and corresponding-
1803         rdar://problem/18971616
1804
1805         Reviewed by Tim Horton.
1806
1807         * UIProcess/mac/WKActionMenuController.mm:
1808         (-[WKActionMenuController _defaultMenuItems]):
1809
1810 2014-11-19  Daniel Bates  <dabates@apple.com>
1811
1812         [iOS] Make WebKit build with public iOS SDK
1813         https://bugs.webkit.org/show_bug.cgi?id=136863
1814
1815         Reviewed by David Kilzer.
1816
1817         * NetworkProcess/cocoa/NetworkProcessCocoa.mm: Moved CFNetwork forward declarations
1818         from this file to file CFNetworkSPI.h and included header CFNetworkSPI.h.
1819         * NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Ditto.
1820         * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Ditto.
1821         * UIProcess/API/Cocoa/WKProcessPool.mm: Ditto.
1822         * UIProcess/mac/WebContextMac.mm: Ditto.
1823         * WebProcess/cocoa/WebProcessCocoa.mm: Ditto.
1824
1825 2014-11-19  Anders Carlsson  <andersca@apple.com>
1826
1827         Add APIs for customizing the user agent
1828         https://bugs.webkit.org/show_bug.cgi?id=138881
1829         rdar://problem/17233981
1830
1831         Reviewed by Dan Bernstein.
1832
1833         * UIProcess/API/Cocoa/WKWebView.h:
1834         * UIProcess/API/Cocoa/WKWebView.mm:
1835         (-[WKWebView initWithFrame:configuration:]):
1836         (-[WKWebView customUserAgent]):
1837         (-[WKWebView setCustomUserAgent:]):
1838         (-[WKWebView _customUserAgent]):
1839         (-[WKWebView _setCustomUserAgent:]):
1840         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
1841         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1842         (LazyInitialized::set):
1843         (-[WKWebViewConfiguration copyWithZone:]):
1844         (defaultApplicationNameForUserAgent):
1845         (-[WKWebViewConfiguration applicationNameForUserAgent]):
1846         (-[WKWebViewConfiguration setApplicationNameForUserAgent:]):
1847
1848 2014-11-19  Simon Fraser  <simon.fraser@apple.com>
1849
1850         [WK2 UI-side compositing] Initialize RemoteLayerTreeTransaction properties which are unset on Mac
1851         https://bugs.webkit.org/show_bug.cgi?id=138877
1852
1853         Reviewed by Tim Horton.
1854         
1855         These data members are unused on Mac, but still encoded, so initialize them with
1856         reasonable values.
1857
1858         * Shared/mac/RemoteLayerTreeTransaction.mm:
1859         (WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
1860
1861 2014-11-19  Enrica Casucci  <enrica@apple.com>
1862
1863         Refactor iOS selection gestures.
1864         https://bugs.webkit.org/show_bug.cgi?id=138720
1865         rdar://problem/18964359
1866
1867         Reviewed by Benjamin Poulain.
1868
1869         This is a first step towards refactoring the selection gestures code.
1870         It introduces more general selection movement functions that can be used to build
1871         the gestures.
1872
1873         * UIProcess/WebPageProxy.h:
1874         * UIProcess/ios/WKContentViewInteraction.h:
1875         * UIProcess/ios/WKContentViewInteraction.mm:
1876         (toWKTextGranularity):
1877         (toWKSelectionDirection):
1878         (-[WKContentView selectPositionAtPoint:completionHandler:]):
1879         (-[WKContentView selectPositionAtBoundary:inDirection:fromPoint:completionHandler:]):
1880         (-[WKContentView selectTextWithGranularity:atPoint:completionHandler:]):
1881         (-[WKContentView beginSelectionInDirection:completionHandler:]):
1882         (-[WKContentView updateSelectionWithExtentPoint:completionHandler:]):
1883         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
1884         * UIProcess/ios/WebPageProxyIOS.mm:
1885         (WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
1886         (WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
1887         (WebKit::WebPageProxy::selectPositionAtPoint):
1888         (WebKit::WebPageProxy::beginSelectionInDirection):
1889         (WebKit::WebPageProxy::updateSelectionWithExtentPoint):
1890         * WebProcess/WebPage/WebPage.cpp:
1891         (WebKit::WebPage::WebPage):
1892         * WebProcess/WebPage/WebPage.h:
1893         * WebProcess/WebPage/WebPage.messages.in:
1894         * WebProcess/WebPage/ios/WebPageIOS.mm:
1895         (WebKit::WebPage::selectWithGesture):
1896         (WebKit::WebPage::visiblePositionInFocusedNodeForPoint):
1897         (WebKit::WebPage::selectPositionAtPoint):
1898         (WebKit::WebPage::selectPositionAtBoundaryWithDirection):
1899         (WebKit::WebPage::selectTextWithGranularityAtPoint):
1900         (WebKit::WebPage::beginSelectionInDirection):
1901         (WebKit::WebPage::updateSelectionWithExtentPoint):
1902
1903 2014-11-19  Simon Fraser  <simon.fraser@apple.com>
1904
1905         [WK2 UI-side Compositing] Fix the position and scroll indicator of the UI-side tiled scrolling indicator
1906         https://bugs.webkit.org/show_bug.cgi?id=138876
1907
1908         Reviewed by Beth Dakin.
1909         
1910         Fix the position of the tiled scrolling indicator in MiniBrowser by taking top
1911         content offset into account.
1912         
1913         On Mac, pass the current scroll position back to the UI process via the RemoteLayerTreeTransaction
1914         so that we can use it to show the correctly scroll offset in the indicator. This is temporary until
1915         Mac does UI-side scrolling.
1916
1917         * Shared/mac/RemoteLayerTreeTransaction.h:
1918         (WebKit::RemoteLayerTreeTransaction::scrollPosition):
1919         (WebKit::RemoteLayerTreeTransaction::setScrollPosition):
1920         * Shared/mac/RemoteLayerTreeTransaction.mm:
1921         (WebKit::RemoteLayerTreeTransaction::encode):
1922         (WebKit::RemoteLayerTreeTransaction::decode):
1923         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
1924         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
1925         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
1926         (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
1927         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
1928         * WebProcess/WebPage/WebPage.cpp:
1929         (WebKit::WebPage::willCommitLayerTree):
1930
1931 2014-11-19  Michael Catanzaro  <mcatanzaro@igalia.com>
1932
1933         [GTK] Error in documentation of webkit_print_operation_get_page_setup()
1934         https://bugs.webkit.org/show_bug.cgi?id=138868
1935
1936         Reviewed by Carlos Garcia Campos.
1937
1938         Fix copypaste error in documentation of
1939         webkit_print_operation_get_page_setup().
1940
1941         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
1942
1943 2014-11-19  Mark Rowe  <mrowe@apple.com>
1944
1945         Remove an unused file.
1946
1947         * version.plist: Removed.
1948
1949 2014-11-18  Benjamin Poulain  <bpoulain@apple.com>
1950
1951         [WK2] Remove the minimalUI code from the UIProcess
1952         https://bugs.webkit.org/show_bug.cgi?id=138819
1953
1954         Reviewed by Sam Weinig.
1955
1956         It looks like the only interface we have to keep alive is
1957         [WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:].
1958
1959         Clean up everything else, it is a pile of useless code.
1960
1961         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
1962         * UIProcess/API/Cocoa/WKWebView.mm:
1963         (-[WKWebView _didCommitLoadForMainFrame]):
1964         (-[WKWebView _didCommitLayerTree:]):
1965         (-[WKWebView _frameOrBoundsChanged]):
1966         (-[WKWebView _didRelaunchProcess]):
1967         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1968         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
1969         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
1970         (-[WKWebView _setUsesMinimalUI:]): Deleted.
1971         (-[WKWebView _usesMinimalUI]): Deleted.
1972         (activeMinimumLayoutSizeForMinimalUI): Deleted.
1973         (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]): Deleted.
1974         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1975         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1976         * UIProcess/API/ios/WKViewIOS.mm:
1977         (-[WKView _frameOrBoundsChanged]):
1978         * UIProcess/PageClient.h:
1979         * UIProcess/WebPageProxy.h:
1980         * UIProcess/WebPageProxy.messages.in:
1981         * UIProcess/ios/PageClientImplIOS.h:
1982         * UIProcess/ios/PageClientImplIOS.mm:
1983         (WebKit::PageClientImpl::setUsesMinimalUI): Deleted.
1984         * UIProcess/ios/WebPageProxyIOS.mm:
1985         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
1986         (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.
1987         (WebKit::WebPageProxy::setUsesMinimalUI): Deleted.
1988         * WebProcess/WebPage/WebPage.h:
1989         * WebProcess/WebPage/WebPage.messages.in:
1990         * WebProcess/WebPage/ios/WebPageIOS.mm:
1991         (WebKit::WebPage::viewportPropertiesDidChange):
1992         (WebKit::WebPage::dynamicViewportSizeUpdate):
1993         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.
1994
1995 2014-11-18  Conrad Shultz  <conrad_shultz@apple.com>
1996
1997         Unreviewed. Revision to the build fix in r176304.
1998
1999         The guarded method should simply be in the !TARGET_OS_IPHONE block.
2000
2001         * UIProcess/API/Cocoa/WKViewPrivate.h:
2002
2003 2014-11-18  Benjamin Poulain  <bpoulain@apple.com>
2004
2005         iOS8 new "slow tap" heuristic fires mouse compat events despite preventDefault on touchend
2006         https://bugs.webkit.org/show_bug.cgi?id=137069
2007         rdar://problem/18481464
2008
2009         Reviewed by Simon Fraser.
2010
2011         On WebKit2, we let UIWebTouchEventsGestureRecognizer and _UIWebHighlightLongPressGestureRecognizer
2012         run concurrently. This causes a race with an incorrect behavior:
2013         1) If UIWebTouchEventsGestureRecognizer does not cancel the native gestures on start.
2014         2) _UIWebHighlightLongPressGestureRecognizer starts after highlightDelay.
2015         3) When the finger leaves the screen, both gestures end.
2016         -> If the touch end sent to JavaScript in [3] ask the priority over native events, that no longer stops
2017            the _UIWebHighlightLongPressGestureRecognizer.
2018
2019         The two gesture recognizers can run in any order, there is no guarantee on which one runs first.
2020         To solve the bug, I must make sure the _UIWebHighlightLongPressGestureRecognizer never trigger a click
2021         if the page wants the event.
2022
2023         To solve the order problem, I use the fact that event recognition goes in two phases for
2024         non cancelled events:
2025         1) Update the gesture recognizers.
2026         2) Trigger the actions.
2027
2028         I do not know the order of recognizers in [1], but I know both have run before [2] is executed.
2029         I use that to stop _UIWebHighlightLongPressGestureRecognizer from ending with a click in the case of the bug:
2030         1) When _UIWebHighlightLongPressGestureRecognizer starts, I set _highlightLongPressCanClick signaling
2031            the gesture can end normally. This is done on a timer and not direct input so I don't really have to worry
2032            about a race here.
2033         2) When processing the touch event for UIWebTouchEventsGestureRecognizer, I reset the flag _highlightLongPressCanClick
2034            if the page wants the event.
2035         3) When the actions of _UIWebHighlightLongPressGestureRecognizer are processed, the touch event
2036            has already been processed by the page and the flag has been cleared if needed.
2037
2038         * UIProcess/ios/WKContentViewInteraction.h:
2039         * UIProcess/ios/WKContentViewInteraction.mm:
2040         (-[WKContentView _webTouchEvent:preventsNativeGestures:]):
2041         (-[WKContentView _highlightLongPressRecognized:]):
2042
2043 2014-11-18  Ryosuke Niwa  <rniwa@webkit.org>
2044
2045         iOS build fix after r176299. This method is not defined in WKViewIOS.mm.
2046
2047         * UIProcess/API/Cocoa/WKViewPrivate.h:
2048
2049 2014-11-18  David Kilzer  <ddkilzer@apple.com>
2050
2051         FeatureDefines.xcconfig: Switch from using PLATFORM_NAME to SDK selectors
2052         <http://webkit.org/b/138813>
2053
2054         Reviewed by Mark Rowe.
2055
2056         * Configurations/FeatureDefines.xcconfig: Switch to using SDK
2057         selectors.
2058
2059 2014-11-18  Conrad Shultz  <conrad_shultz@apple.com>
2060
2061         Give clients a way to cancel preview popovers
2062         https://bugs.webkit.org/show_bug.cgi?id=138855
2063
2064         Reviewed by Tim Horton.
2065
2066         Promote -[WKView _dismissActionMenuPopovers] from internal to private.
2067
2068         * UIProcess/API/Cocoa/WKViewPrivate.h:
2069         * UIProcess/API/mac/WKView.mm:
2070         (-[WKView _dismissActionMenuPopovers]):
2071         * UIProcess/API/mac/WKViewInternal.h:
2072
2073 2014-11-18  Chris Dumez  <cdumez@apple.com>
2074
2075         Add a setting to toggle DOMTimer throttling support
2076         https://bugs.webkit.org/show_bug.cgi?id=138844
2077         <rdar://problem/19020874>
2078
2079         Reviewed by Andreas Kling.
2080
2081         Add a setting to disable DOM timers throttling, in order to help
2082         developers determine if a specific issue is caused by timer
2083         throttling.
2084
2085         * Shared/WebPreferencesDefinitions.h:
2086         * UIProcess/API/C/WKPreferences.cpp:
2087         (WKPreferencesSetDOMTimersThrottlingEnabled):
2088         (WKPreferencesGetDOMTimersThrottlingEnabled):
2089         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2090         * WebProcess/WebPage/WebPage.cpp:
2091         (WebKit::WebPage::updatePreferences):
2092
2093 2014-11-18  Geoffrey Garen  <ggaren@apple.com>
2094
2095         Removed the custom allocator for ListHashSet nodes
2096         https://bugs.webkit.org/show_bug.cgi?id=138841
2097
2098         Reviewed by Andreas Kling.
2099
2100         Uses of ListHashSet no longer need to declare an inline capacity,
2101         since that was only used to specify the capacity of the custom allocator.
2102
2103         * UIProcess/Plugins/PluginInfoStore.cpp:
2104         (WebKit::PluginInfoStore::loadPluginsIfNecessary):
2105
2106 2014-11-18  Eric Carlson  <eric.carlson@apple.com>
2107
2108         Unreviewed build fix after r176283.
2109
2110         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2111
2112 2014-11-18  Tim Horton  <timothy_horton@apple.com>
2113
2114         Avoid re-encoding action menu image data
2115         https://bugs.webkit.org/show_bug.cgi?id=138817
2116         <rdar://problem/18840382>
2117
2118         Reviewed by Anders Carlsson.
2119
2120         * Shared/mac/ActionMenuHitTestResult.h:
2121         * Shared/mac/ActionMenuHitTestResult.mm:
2122         (WebKit::ActionMenuHitTestResult::encode):
2123         (WebKit::ActionMenuHitTestResult::decode):
2124         Store and encode a SharedMemory with the raw encoded image data,
2125         instead of re-painting the image into a ShareableBitmap.
2126
2127         * UIProcess/mac/WKActionMenuController.mm:
2128         (-[WKActionMenuController _hitTestResultImage]):
2129         (-[WKActionMenuController _defaultMenuItemsForImage]):
2130         (-[WKActionMenuController _copyImage:]):
2131         (-[WKActionMenuController _addImageToPhotos:]):
2132         (-[WKActionMenuController _defaultMenuItems]):
2133         (-[WKActionMenuController _canAddMediaToPhotos]): Deleted.
2134         Build a temporary filename from a UUID and the image's desired extension.
2135         Use the Image's encoded data instead of re-encoding it with CGImageDestination.
2136         Build an image menu only if we have an image, URL, data, and extension.
2137
2138         * WebProcess/WebPage/mac/WebPageMac.mm:
2139         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2140
2141 2014-11-18  Eric Carlson  <eric.carlson@apple.com>
2142
2143         [iOS] allow host application to opt-out of alternate fullscreen
2144         https://bugs.webkit.org/show_bug.cgi?id=138787
2145
2146         Reviewed by Sam Weinig.
2147         
2148         "allowsAlternateFullscreen" doesn't need to be in the public WKWebView header.
2149
2150         * UIProcess/API/Cocoa/WKWebView.mm:
2151         (-[WKWebView initWithFrame:configuration:]): allowsAlternateFullscreen -> _allowsAlternateFullscreen.
2152
2153         * UIProcess/API/Cocoa/WKWebViewConfiguration.h: Remove allowsAlternateFullscreen.
2154         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2155         (-[WKWebViewConfiguration _allowsAlternateFullscreen]): New.
2156         (-[WKWebViewConfiguration _setAllowsAlternateFullscreen:]): New.
2157
2158         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declare _allowsAlternateFullscreen.
2159
2160 2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>
2161
2162         Subclass CachedFont for SVG fonts
2163         https://bugs.webkit.org/show_bug.cgi?id=138686
2164
2165         Reviewed by Simon Fraser.
2166
2167         Re-landing due to flakey bots.
2168
2169         Update for enum type.
2170
2171         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2172         (WebKit::maximumBufferingTime):
2173
2174 2014-11-18  Chris Dumez  <cdumez@apple.com>
2175
2176         Update the Vector API to deal with unsigned types instead of size_t
2177         https://bugs.webkit.org/show_bug.cgi?id=138824
2178
2179         Reviewed by Andreas Kling.
2180
2181         Update code base to fix build errors related to the typing changes
2182         in the Vector API (size_t -> unsigned).
2183
2184         * Platform/IPC/ArgumentCoders.h:
2185         * Platform/IPC/DataReference.h:
2186
2187 2014-11-18  Commit Queue  <commit-queue@webkit.org>
2188
2189         Unreviewed, rolling out r176264.
2190         https://bugs.webkit.org/show_bug.cgi?id=138837
2191
2192         caused many test failures (Requested by litherum on #webkit).
2193
2194         Reverted changeset:
2195
2196         "Subclass CachedFont for SVG fonts"
2197         https://bugs.webkit.org/show_bug.cgi?id=138686
2198         http://trac.webkit.org/changeset/176264
2199
2200 2014-11-18  Daniel Bates  <dabates@apple.com>
2201
2202         [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
2203         SPI are not available in public SDK
2204         https://bugs.webkit.org/show_bug.cgi?id=138802
2205
2206         Reviewed by David Kilzer.
2207
2208         Include headers DispatchSPI.h and MachVMSPI.h.h instead of including
2209         libdispatch and Mach headers directly.
2210
2211         * Platform/mac/SharedMemoryMac.cpp:
2212         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
2213
2214 2014-11-18  Myles C. Maxfield  <mmaxfield@apple.com>
2215
2216         Subclass CachedFont for SVG fonts
2217         https://bugs.webkit.org/show_bug.cgi?id=138686
2218
2219         Reviewed by Simon Fraser.
2220
2221         Update for enum type.
2222
2223         * WebProcess/Network/WebResourceLoadScheduler.cpp:
2224         (WebKit::maximumBufferingTime):
2225
2226 2014-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2227
2228         [GTK] Add API to create a WebKitWebContext
2229         https://bugs.webkit.org/show_bug.cgi?id=138826
2230
2231         Reviewed by Gustavo Noronha Silva.
2232
2233         We have always used a default web context without providing API to
2234         create others. The main reason was that nobody requested it and we
2235         haven't needed it either. The main problem of the default web
2236         context is that you can't configure anything during
2237         construction. This hasn't been a problem so far because all the
2238         web context configuration we expose in the API can be configured
2239         after construction. But now we need to expose API to allow the
2240         user to configure the local storage directory, which is a
2241         construct only configuration. The default web context was also a
2242         problem for our unit tests, because sharing the same context made
2243         it difficult to ensure tests cases are independent to each other.
2244
2245         * UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
2246         (WebKitGeolocationProvider::~WebKitGeolocationProvider): Reset the
2247         provider to avoid crashes when web context is destroyed and a new
2248         one is created.
2249         * UIProcess/API/gtk/WebKitWebContext.cpp:
2250         (webkitWebContextConstructed): Add constructed implementation to
2251         create the WebContext and initialize it.
2252         (webkitWebContextDispose): Detach web context clients to avoid
2253         crashes when a client callback is called on a disposed WebKitWebContext.
2254         (webkit_web_context_class_init): Initialize gettext, add
2255         constructed implementation and add the pointer to the vmethods
2256         when creating signals.
2257         (createDefaultWebContext): Simply create a WebKitWebContext.
2258         (webkit_web_context_new): New public method to create a WebKitWebContext.
2259         (injectedBundleFilename): Deleted.
2260         * UIProcess/API/gtk/WebKitWebContext.h: Add virtual methods for
2261         signals, so that users can inherit from WebKitWebContext and
2262         override the virtual methods.
2263         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
2264
2265 2014-11-18  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2266
2267         [SOUP] [GnuTLS] Don't use a SSL3.0 record version in client hello.
2268         https://bugs.webkit.org/show_bug.cgi?id=138794
2269
2270         Reviewed by Sergio Villar Senin.
2271
2272         It seems that following POODLE many sites incorrectly banned SSL 3.0
2273         record packet versions. Since GnuTLS uses a SSL 3.0 record to
2274         advertise TLS 1.2, they are effectively banning it even if it doesn't
2275         advertise SSL 3.0. That is a server issue, but it can be worked around
2276         by using the modifier %LATEST_RECORD_VERSION.
2277
2278         With this modifier, GnuTLS will use the latest TLS version record
2279         in client hello instead of using the default SSL 3.0.
2280
2281         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp:
2282         (main):
2283         * WebProcess/EntryPoint/unix/WebProcessMain.cpp:
2284         (main):
2285
2286 2014-11-17  Conrad Shultz  <conrad_shultz@apple.com>
2287
2288         Page previews should be loaded sooner
2289         https://bugs.webkit.org/show_bug.cgi?id=138814
2290
2291         Reviewed by Tim Horton.
2292
2293         * UIProcess/mac/WKActionMenuController.mm:
2294         (-[WKActionMenuController willOpenMenu:withEvent:]):
2295         Send -_createPreviewPopover..
2296         (-[WKActionMenuController _previewURLFromActionMenu:]):
2297         Relocate some logic to the new -_createPreviewPopover; gate early return on popover visibility.
2298         (-[WKActionMenuController _createPreviewPopover]):
2299         Renamed from -_createPreviewPopoverForURL:originRect:; explicitly send -loadView to warm up the preview view.
2300         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]): Deleted.
2301
2302 2014-11-17  Beth Dakin  <bdakin@apple.com>
2303
2304         Preview is sometimes dismissed too early
2305         https://bugs.webkit.org/show_bug.cgi?id=138811
2306         -and corresponding-
2307         rdar://problem/18900839
2308
2309         Reviewed by Tim Horton.
2310
2311         Don’t make the popover transient until didCloseMenu: time.
2312         * UIProcess/mac/WKActionMenuController.mm:
2313         (-[WKActionMenuController didCloseMenu:withEvent:]):
2314         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
2315
2316 2014-11-17  Daniel Bates  <dabates@apple.com>
2317
2318         Unreviewed, rolling out r176232.
2319
2320         Broke the Mac build. Will investigate offline.
2321
2322         Reverted changeset:
2323
2324         "[iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions,
2325         MobileGestalt"
2326         https://bugs.webkit.org/show_bug.cgi?id=138802
2327         http://trac.webkit.org/changeset/176232
2328
2329 2014-11-17  Daniel Bates  <dabates@apple.com>
2330
2331         [iOS] Libdispatch, Dyld, IOKit, Mach, NSPointerFunctions, MobileGestalt
2332         SPI are not available in public SDK
2333         https://bugs.webkit.org/show_bug.cgi?id=138802
2334
2335         Reviewed by David Kilzer.
2336
2337         Include headers DispatchSPI.h and MachVMSPI.h.h instead of including
2338         libdispatch and Mach headers directly.
2339
2340         * Platform/mac/SharedMemoryMac.cpp:
2341         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
2342
2343 2014-11-17  Daniel Bates  <dabates@apple.com>
2344
2345         [iOS] CoreText and CoreUI SPI are not available in public SDK
2346         https://bugs.webkit.org/show_bug.cgi?id=138760
2347
2348         Reviewed by David Kilzer.
2349
2350         Include header CoreTextSPI.h instead of including CoreText private headers.
2351
2352         * WebProcess/WebPage/WebPage.cpp:
2353
2354 2014-11-17  Tim Horton  <timothy_horton@apple.com>
2355
2356         DataDetectors PageOverlay callbacks can come in to the wrong overlay
2357         https://bugs.webkit.org/show_bug.cgi?id=138801
2358         <rdar://problem/18991369>
2359
2360         Reviewed by Anders Carlsson.
2361
2362         We can call dataDetectorsDidHideUI on the wrong (or no) PageOverlay,
2363         because it's possible to have another performActionMenuHitTestAtLocation
2364         between the first one and the dataDetectorsDid*UI that correspond to it.
2365
2366         To make sure that the callbacks come to the right PageOverlay, plumb
2367         an integer ID through all of the callbacks and find the overlay based on that.
2368
2369         * Shared/mac/ActionMenuHitTestResult.h:
2370         Store the ID of the PageOverlay that overrode data detection.
2371
2372         * UIProcess/mac/WKActionMenuController.mm:
2373         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
2374         Send the ID back to the Web process when replying from DD callbacks.
2375
2376         * WebProcess/WebPage/WebPage.h:
2377         * WebProcess/WebPage/WebPage.messages.in:
2378         * WebProcess/WebPage/mac/WebPageMac.mm:
2379         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2380         Store the ID of the PageOverlay that overrode data detection instead of
2381         keeping the PageOverlay itself.
2382
2383         (WebKit::WebPage::dataDetectorsDidPresentUI):
2384         (WebKit::WebPage::dataDetectorsDidChangeUI):
2385         (WebKit::WebPage::dataDetectorsDidHideUI):
2386         Find and reply to the correct page overlay.
2387
2388 2014-11-17  Beth Dakin  <bdakin@apple.com>
2389
2390         Whitespace action menus should focus the HitTestResult and create an insertion 
2391         point
2392         https://bugs.webkit.org/show_bug.cgi?id=138786
2393         -and corresponding-
2394         rdar://problem/18944893
2395
2396         Reviewed by Tim Horton.
2397
2398         Whitespace menus should cause the HitTestResult to be focused, and they should set 
2399         the selection based on the HitTest location.
2400         * UIProcess/WebPageProxy.cpp:
2401         (WebKit::WebPageProxy::focusAndSelectLastActionMenuHitTestResult):
2402         * UIProcess/WebPageProxy.h:
2403         * UIProcess/mac/WKActionMenuController.mm:
2404         (-[WKActionMenuController isMenuForTextContent]):
2405         (-[WKActionMenuController willOpenMenu:withEvent:]):
2406         * WebProcess/WebPage/WebPage.h:
2407         * WebProcess/WebPage/WebPage.messages.in:
2408         * WebProcess/WebPage/mac/WebPageMac.mm:
2409         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2410         (WebKit::WebPage::focusAndSelectLastActionMenuHitTestResult):
2411
2412 2014-11-17  Daniel Bates  <dabates@apple.com>
2413
2414         [iOS] AVKit and MediaPlayer SPI are not available in public SDK
2415         https://bugs.webkit.org/show_bug.cgi?id=138756
2416
2417         Reviewed by Eric Carlson.
2418
2419         Include header MPAVRoutingControllerSPI.h instead of including the
2420         private header MPAVRoutingController.h.
2421
2422         Additionally, sort the list of #import directives.
2423
2424         * UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
2425
2426 2014-11-17  Daniel Bates  <dabates@apple.com>
2427
2428         [iOS] QuartzCore SPI not available in public SDK
2429         https://bugs.webkit.org/show_bug.cgi?id=138751
2430
2431         Reviewed by David Kilzer.
2432
2433         * Shared/mac/RemoteLayerBackingStore.mm: Move CALayer forward declaration
2434         from this file to file QuartzCoreSPI.h and include header QuartzCoreSPI.h.
2435         * Shared/mac/RemoteLayerTreePropertyApplier.mm: Ditto.
2436         * UIProcess/API/Cocoa/WKWebView.mm: Include header QuartzCoreSPI.h instead
2437         of including QuartzCore headers directly.
2438         * UIProcess/ios/ViewGestureControllerIOS.mm: Ditto.
2439         * UIProcess/ios/WKContentView.mm: Ditto.
2440         * UIProcess/ios/WKPDFPageNumberIndicator.mm: Ditto.
2441         * UIProcess/mac/ViewGestureControllerMac.mm: Move CAFilter forward declarations
2442         from this file to fileQuartzCoreSPI.h and include header QuartzCoreSPI.h.
2443         Also sort the list of #import directives.
2444         * UIProcess/mac/ViewSnapshotStore.mm: Include header QuartzCoreSPI.h
2445         instead of including QuartzCore headers directly.
2446
2447 2014-11-17  Eric Carlson  <eric.carlson@apple.com>
2448
2449         [iOS] allow host application to opt-out of alternate fullscreen
2450         https://bugs.webkit.org/show_bug.cgi?id=138787
2451
2452         Reviewed by Darin Adler.
2453
2454         * Shared/WebPreferencesDefinitions.h:
2455         * UIProcess/API/C/WKPreferences.cpp:
2456         (WKPreferencesSetAllowsAlternateFullscreen):
2457         (WKPreferencesGetAllowsAlternateFullscreen):
2458         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2459         * UIProcess/API/Cocoa/WKWebView.mm:
2460         (-[WKWebView initWithFrame:configuration:]):
2461         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2462         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2463         (-[WKWebViewConfiguration init]):
2464         (-[WKWebViewConfiguration copyWithZone:]):
2465         * WebProcess/WebPage/WebPage.cpp:
2466         (WebKit::WebPage::updatePreferences):
2467
2468 2014-11-16  Benjamin Poulain  <bpoulain@apple.com>
2469
2470         Start cleaning up minimal UI from WKWebView
2471         https://bugs.webkit.org/show_bug.cgi?id=138725
2472
2473         Reviewed by Sam Weinig.
2474
2475         Start removing the old update path for minimumLayoutSize/maximumUnobscuredSize.
2476
2477         Unfortunately, I cannot remove everything yet because the clients still did not have
2478         alternatives to [_overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride]
2479         and might change the minimal UI options.
2480
2481         This patch adds [_overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride] to move
2482         in the right direction. Next we'll udpate the client code and get rid of all the useless code.
2483
2484         * UIProcess/API/Cocoa/WKWebView.mm:
2485         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
2486         (-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
2487         (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]): Deleted.
2488         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2489
2490 2014-11-16  Zan Dobersek  <zdobersek@igalia.com>
2491
2492         [TexMap] Add typecasting support for GraphicsLayerTextureMapper
2493         https://bugs.webkit.org/show_bug.cgi?id=138741
2494
2495         Reviewed by Martin Robinson.
2496
2497         Replace uses of toTextureMapperLayer() with downcasting and
2498         calling the GraphicsLayerTextureMapper::layer() method.
2499
2500         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
2501         (WebKit::LayerTreeHostGtk::initialize):
2502         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
2503         (WebKit::LayerTreeHostGtk::compositeLayersToContext):
2504
2505 2014-11-16  Tim Horton  <timothy_horton@apple.com>
2506
2507         Use TextIndicator instead of the built in Lookup highlight
2508         https://bugs.webkit.org/show_bug.cgi?id=138775
2509         <rdar://problem/18953982>
2510
2511         Follow-up to r176164.
2512
2513         * UIProcess/API/mac/WKView.mm:
2514         (-[WKView dealloc]):
2515         (-[WKView initWithFrame:context:configuration:webView:]):
2516         * UIProcess/mac/PageClientImpl.mm:
2517         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2518         Include the softlinking macros directly in the files they're used
2519         in, as they're supposed to be used.
2520
2521 2014-11-16  Tim Horton  <timothy_horton@apple.com>
2522
2523         Use TextIndicator instead of the built in Lookup highlight
2524         https://bugs.webkit.org/show_bug.cgi?id=138775
2525         <rdar://problem/18953982>
2526
2527         Reviewed by Anders Carlsson.
2528
2529         In order to make the yellow highlight for Lookup more accurately match the
2530         painted content of the web page (in light of e.g. Web fonts, and interesting
2531         text features that only WebKit implements and cannot round-trip through
2532         NSAttributedString), use a TextIndicator instead of the built-in Lookup
2533         highlight where possible.
2534
2535         * Configurations/BaseTarget.xcconfig:
2536         Make it possible to include headers from private frameworks. This matches WebCore.
2537
2538         * Shared/DictionaryPopupInfo.cpp:
2539         (WebKit::DictionaryPopupInfo::encode):
2540         (WebKit::DictionaryPopupInfo::decode):
2541         * Shared/DictionaryPopupInfo.h:
2542         Include the attributed string inside the DictionaryPopupInfo, instead of
2543         as a secondary argument to DidPerformDictionaryLookup.
2544         Add a TextIndicator to DictionaryPopupInfo, which can be used to highlight
2545         the text in the UI process.
2546
2547         * UIProcess/API/mac/WKView.mm:
2548         (-[WKView dealloc]):
2549         (-[WKView viewDidMoveToWindow]):
2550         (-[WKView _dictionaryLookupPopoverWillClose:]):
2551         (-[WKView _setTextIndicator:fadeOut:animate:animationCompletionHandler:]):
2552         (-[WKView _setTextIndicator:fadeOut:animate:]):
2553         (-[WKView initWithFrame:context:configuration:webView:]):
2554         (+[WKView hideWordDefinitionWindow]):
2555         * UIProcess/API/mac/WKViewInternal.h:
2556         Adopt the Lookup SPI header.
2557         If we have the requisite API, register the notification that Lookup sends
2558         when the popover closes, and hook that up to hide the text indicator.
2559         Add a version of _setTextIndicator: that takes an animation completion handler.
2560
2561         * UIProcess/PageClient.h:
2562         * UIProcess/WebPageProxy.h:
2563         * UIProcess/WebPageProxy.messages.in:
2564         * UIProcess/ios/WebPageProxyIOS.mm:
2565         (WebKit::WebPageProxy::didPerformDictionaryLookup):
2566         * UIProcess/mac/WebPageProxyMac.mm:
2567         (WebKit::WebPageProxy::didPerformDictionaryLookup):
2568         Adjust to the new didPerformDictionaryLookup signature.
2569
2570         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2571         (InitWebCoreSystemInterface):
2572         Remove a WKSI import.
2573
2574         * UIProcess/mac/PageClientImpl.h:
2575         * UIProcess/mac/PageClientImpl.mm:
2576         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2577         If we have the requisite API, disable Lookup's built-in highlight and
2578         present a TextIndicator instead.
2579         We currently have to run the animations serially (first bounce the TextIndicator,
2580         then animate in the Lookup popover) because the act of adding the Lookup popover
2581         blocks us from getting any animation events for the TextIndicator, and breaks
2582         the bounce. We could also fix this by using a threaded animation for the TextIndicator,
2583         but it's not clear that it's safe to do so.
2584
2585         (WebKit::PageClientImpl::dismissDictionaryLookupPanel):
2586         When explicitly dismissing the Lookup panel, also hide the text indicator.
2587
2588         * UIProcess/mac/TextIndicatorWindow.h:
2589         * UIProcess/mac/TextIndicatorWindow.mm:
2590         (WebKit::TextIndicatorWindow::setTextIndicator):
2591         Store the completion handler.
2592
2593         (WebKit::TextIndicatorWindow::bounceAnimationDidEnd):
2594         Call the completion handler when the animation completes.
2595
2596         * UIProcess/mac/WKActionMenuController.mm:
2597         (-[WKActionMenuController _createActionMenuItemForTag:]):
2598         Disable the Lookup item if lookup is not available.
2599
2600         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2601         (WebKit::PDFPlugin::showDefinitionForAttributedString):
2602         Adjust to the new didPerformDictionaryLookup signature.
2603         Since PDFPlugin can't trivially repaint the required part of the PDF,
2604         we don't build a TextIndicator. This will result in PDFPlugin continuing
2605         to use Lookup's built-in highlight.
2606         
2607         * WebProcess/WebPage/mac/WebPageMac.mm:
2608         (WebKit::WebPage::performDictionaryLookupForRange):
2609         Build a TextIndicator from the Lookup range and pass it along with
2610         the DictionaryPopupInfo.
2611
2612 2014-11-15  David Kilzer  <ddkilzer@apple.com>
2613
2614         REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore
2615
2616         This regressed with the following commit:
2617
2618             Move DataDetectors scanning code to WebCore
2619             https://bugs.webkit.org/show_bug.cgi?id=138731
2620             <rdar://problem/18877535>
2621
2622         * Shared/mac/ActionMenuHitTestResult.mm: Add PLATFORM(MAC) check
2623         around the entire implementation since it it unused on iOS.
2624
2625 2014-11-14  Anders Carlsson  <andersca@apple.com>
2626
2627         Raise an exception if -[WKWebView initWithFrame:configuration:] is passed a nil configuration
2628         https://bugs.webkit.org/show_bug.cgi?id=138757
2629
2630         Reviewed by Simon Fraser.
2631
2632         * UIProcess/API/Cocoa/WKWebView.mm:
2633         (-[WKWebView initWithFrame:configuration:]):
2634
2635 2014-11-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2636
2637         Network process crash when running http/tests/appcache/fallback.html
2638         https://bugs.webkit.org/show_bug.cgi?id=138740
2639
2640         Reviewed by Alexey Proskuryakov.
2641
2642         It happens because ResourceHandle::continueWillSendRequest() is
2643         called with a null request. We could handle that case in the
2644         ResourceHandle, but the thing is tha the behaviour is
2645         not the same for async loads, or when loading in the web
2646         process. In WebResourceLoader::willSendRequest(),
2647         ResourceRequest::willSendRequest() is called, and cancels the load
2648         if the client returns a null request. In this case, the
2649         ResourceLoader is detached and WebResourceLoader::willSendRequest()
2650         returns early without sending the ContinueWillSendRequest message
2651         to the network process. However, for synchronous loads,
2652         NetworkResourceLoader::continueWillSendRequest() is always called.
2653
2654         Fixes http/tests/appcache/fallback.html for GTK port when using
2655         the network process.
2656
2657         * NetworkProcess/NetworkResourceLoader.cpp:
2658         (WebKit::NetworkResourceLoader::continueWillSendRequest): Do not
2659         call ResourceHandle::continueWillSendRequest() if the client
2660         request is null, since the load is going to be cancelled.
2661
2662 2014-11-15  Tim Horton  <timothy_horton@apple.com>
2663
2664         Implement data detectors and mailto action menus for WebKit1
2665         https://bugs.webkit.org/show_bug.cgi?id=138765
2666         <rdar://problem/18877535>
2667
2668         Reviewed by Beth Dakin.
2669
2670         * UIProcess/mac/WKActionMenuController.mm:
2671         (-[WKActionMenuController _defaultMenuItemsForMailtoLink]):
2672
2673 2014-11-14  Tim Horton  <timothy_horton@apple.com>
2674
2675         Remove pre-[DDActionContext contextForView:...] fallback path
2676         https://bugs.webkit.org/show_bug.cgi?id=138735
2677         <rdar://problem/18982046>
2678
2679         Reviewed by Simon Fraser.
2680
2681         * UIProcess/mac/WKActionMenuController.mm:
2682         (-[WKActionMenuController willOpenMenu:withEvent:]):
2683         (-[WKActionMenuController didCloseMenu:withEvent:]):
2684         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
2685         (hasDataDetectorsCompletionAPI): Deleted.
2686         Remove the now-unnecessary fallback path.
2687
2688 2014-11-14  Tim Horton  <timothy_horton@apple.com>
2689
2690         Frequent crashes under actionContextForResultAtPoint
2691         https://bugs.webkit.org/show_bug.cgi?id=138761
2692         <rdar://problem/18990684>
2693
2694         Reviewed by Dean Jackson.
2695
2696         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2697         (PageOverlayClientImpl::actionContextForResultAtPoint):
2698         Initialize apiRange.
2699
2700 2014-11-14  Daniel Bates  <dabates@apple.com>
2701
2702         [iOS] CoreGraphics SPI not available in public SDK
2703         https://bugs.webkit.org/show_bug.cgi?id=138709
2704
2705         Reviewed by David Kilzer.
2706
2707         Include header CoreGraphicsSPI.h instead of including headers of
2708         CoreGraphics directly.
2709
2710         * UIProcess/API/Cocoa/WKWebView.mm:
2711         * UIProcess/ios/WKScrollView.mm:
2712
2713 2014-11-14  Tim Horton  <timothy_horton@apple.com>
2714
2715         Move DataDetectors scanning code to WebCore
2716         https://bugs.webkit.org/show_bug.cgi?id=138731
2717         <rdar://problem/18877535>
2718
2719         Reviewed by Anders Carlsson.
2720
2721         Move DataDetectors scanning code to WebCore, so that both WebKits can use it.
2722
2723         * Shared/TextIndicator.cpp:
2724         (WebKit::TextIndicator::createWithRange):
2725         Move createWithRange in from WebPageMac's textIndicatorForRange.
2726
2727         (WebKit::TextIndicator::createWithSelectionInFrame):
2728         * Shared/TextIndicator.h:
2729         * WebProcess/WebPage/WebFrame.cpp:
2730         (WebKit::WebFrame::createSelectionSnapshot):
2731         * WebProcess/WebPage/WebFrame.h:
2732         Constify some things.
2733
2734         * WebProcess/WebPage/mac/WebPageMac.mm:
2735         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2736         Avoid using the DD result if it didn't come with a non-null Range.
2737         Make use of detectItemAroundHitTestResult and TextIndicator::createWithRange.
2738
2739         (WebKit::scanForDataDetectedItems): Deleted.
2740         (WebKit::textIndicatorForRange): Deleted.
2741         Moved these two to other places.
2742
2743 2014-11-14  Dan Bernstein  <mitz@apple.com>
2744
2745         <rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
2746         https://bugs.webkit.org/show_bug.cgi?id=138753
2747
2748         Reviewed by Tim Horton.
2749
2750         Rather than having the UI process record a snapshot jut before the Web Content process’s
2751         notion of its current back/forward list item changes, have the UI process record a snapshot
2752         right before its own current back/forward list item changes. This ensures that the right
2753         snapshot gets attached to the right item in the UI process.
2754
2755         * UIProcess/WebBackForwardList.cpp:
2756         (WebKit::WebBackForwardList::addItem): If there is a current item, record a navigation
2757         snapshot of it before making the new item current.
2758         (WebKit::WebBackForwardList::goToItem): If there is a current item, record a navigation
2759         snapshot of it before making another item current.
2760
2761         * UIProcess/WebPageProxy.cpp:
2762         (WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame): Deleted.
2763         * UIProcess/WebPageProxy.h:
2764
2765         * UIProcess/WebPageProxy.messages.in: Removed willChangeCurrentHistoryItemForMainFrame
2766         message.
2767
2768         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2769         (WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
2770         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Removed declaration of
2771         willChangeCurrentHistoryItem override.
2772
2773         * WebProcess/WebPage/WebPage.cpp:
2774         (WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame): Deleted.
2775         * WebProcess/WebPage/WebPage.h:
2776
2777 2014-11-14  Dan Bernstein  <mitz@apple.com>
2778
2779         Add some tracing to help investigating <rdar://problem/18905383> [iOS] Crash due to null m_webPageProxyForBackForwardListForCurrentSwipe in ViewGestureController::endSwipeGesture
2780         https://bugs.webkit.org/show_bug.cgi?id=138750
2781
2782         Reviewed by Tim Horton.
2783
2784         Emit trace messages at various points, and log them prior to crashing if the error condition
2785         occurs. Otherwise, clear the trace messages.
2786
2787         * UIProcess/ios/ViewGestureControllerIOS.mm:
2788         (WebKit::addLogEntry): Helper function that adds a message, including a time stamp and a
2789         backtrace, to m_logEntries.
2790         (WebKit::dumpLogEntries): Helper function that logs everything in m_logEntries.
2791         (WebKit::ViewGestureController::beginSwipeGesture): Add a log entry.
2792         (WebKit::ViewGestureController::endSwipeGesture): If
2793         m_webPageProxyForBackForwardListForCurrentSwipe is null, dump the log entries just before
2794         crashing. Otherwise, clear m_logEntries.
2795         (WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree): Add a log entry.
2796         (WebKit::ViewGestureController::removeSwipeSnapshot): Add a log entry.
2797         * UIProcess/mac/ViewGestureController.h: Defined ENABLE_VIEW_GESTURE_CONTROLLER_TRACING,
2798         and added m_logEntries member variable.
2799
2800 2014-11-14  Beth Dakin  <bdakin@apple.com>
2801
2802         URLs for some videos are not valid URLs, should not be exposed to action menu
2803         https://bugs.webkit.org/show_bug.cgi?id=138746
2804         -and corresponding-
2805         rdar://problem/18941927
2806
2807         Reviewed by Tim Horton.
2808
2809         If the video cannot be downloaded, that is also an indication that the URL of the 
2810         video will not be valid on its own. In these cases, we should share or copy the 
2811         main page’s URL.
2812         * UIProcess/mac/WKActionMenuController.mm:
2813         (-[WKActionMenuController _defaultMenuItemsForVideo]):
2814         (-[WKActionMenuController _copyVideoURL:]):
2815
2816 2014-11-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2817
2818         [SOUP] Encode/Decode allowCookies in ResourceRequest
2819         https://bugs.webkit.org/show_bug.cgi?id=138730
2820
2821         Reviewed by Sergio Villar Senin.
2822
2823         We are not sending this information to the network process, making
2824         cookies always available. Fixes
2825         http/tests/xmlhttprequest/cross-origin-no-authorization.html when
2826         network process is enabled.
2827
2828         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2829         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2830         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2831
2832 2014-11-14  Zan Dobersek  <zdobersek@igalia.com>
2833
2834         Unreviewed build fix for the GTK+ port using Clang.
2835
2836         * UIProcess/gtk/RedirectedXCompositeWindow.h: Include the <functional>
2837         header for the use of std::function<>.
2838
2839 2014-11-13  Dan Bernstein  <mitz@apple.com>
2840
2841         Two WKWebView internal methods are implemented in a category
2842         https://bugs.webkit.org/show_bug.cgi?id=138728
2843
2844         Reviewed by Tim HOrton.
2845
2846         Moved the implementations from the category to the class.
2847
2848         * UIProcess/API/Cocoa/WKWebView.mm:
2849         (-[WKWebView _ignoresNonWheelMouseEvents]):
2850         (-[WKWebView _setIgnoresNonWheelMouseEvents:]):
2851
2852 2014-11-13  Myles C. Maxfield  <mmaxfield@apple.com>
2853
2854         Move FontMac and FontCacheMac off of WKSI
2855         https://bugs.webkit.org/show_bug.cgi?id=138633
2856
2857         Reviewed by Simon Fraser.
2858
2859         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2860         (InitWebCoreSystemInterface):
2861         * mac/WebKit2.order:
2862
2863 2014-11-13  Eric Carlson  <eric.carlson@apple.com>
2864
2865         Context menus should not offer the "Download video" option for videos that cannot 
2866         be downloaded
2867         https://bugs.webkit.org/show_bug.cgi?id=138530
2868         -and corresponding-
2869         rdar://problem/18919130
2870
2871         Reviewed by Tim Horton.
2872
2873         Expose isDownloadableMedia() to the InjectedBundleHitTestResult.
2874         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2875         (WKBundleHitTestResultIsDownloadableMedia):
2876         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
2877         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2878         (WebKit::InjectedBundleHitTestResult::isDownloadableMedia):
2879         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2880
2881 2014-11-13  Daniel Bates  <dabates@apple.com>
2882
2883         [iOS] NSGeometry data types are not available in the public SDK
2884         https://bugs.webkit.org/show_bug.cgi?id=137536
2885
2886         Reviewed by David Kilzer.
2887
2888         Substitute header WAKAppKitStubs.h for NSGeometry.h as the latter is a
2889         private header.
2890
2891         * Shared/ios/NativeWebTouchEventIOS.mm:
2892
2893 2014-11-13  Simon Fraser  <simon.fraser@apple.com>
2894
2895         [WK2] Fire a layout milestone on session restore based on render tree size
2896         https://bugs.webkit.org/show_bug.cgi?id=138711
2897         rdar://problem/16033854
2898
2899         Reviewed by Anders Carlsson.
2900         
2901         Add a session-restore layout milestone which fires after restoring a session,
2902         when the render tree size reaches 50% of the size saved in the session state.
2903
2904         * Shared/SessionState.h: Add renderTreeSize.
2905         * UIProcess/API/Cocoa/WKWebView.mm:
2906         (layoutMilestones): Translate from SPI to WebCore milestones.
2907         * UIProcess/API/Cocoa/WKWebViewPrivate.h: New iOS-only milestone, er, event.
2908         * UIProcess/Cocoa/NavigationState.mm:
2909         (WebKit::renderingProgressEvents): Translate from WebCore milestone to rendering event.
2910         * UIProcess/WebPageProxy.cpp:
2911         (WebKit::WebPageProxy::WebPageProxy): Init stuff.
2912         (WebKit::WebPageProxy::sessionState):
2913         (WebKit::WebPageProxy::restoreFromSessionState): Zero out the target render tree size,
2914         then get it out of session state and set the flag to say that we haven't reached it yet.
2915         (WebKit::WebPageProxy::listenForLayoutMilestones): Set a flag to know that we should fire
2916         the milestone. The other milestones get sent directly to WebCore.
2917         * UIProcess/WebPageProxy.h:
2918         * UIProcess/ios/WebPageProxyIOS.mm:
2919         (WebKit::exceedsRenderTreeSizeSizeThreshold): Return true when we've reached 50%.
2920         (WebKit::WebPageProxy::didCommitLayerTree): Fire the milestone when appropriate.
2921         * UIProcess/mac/LegacySessionStateCoding.cpp: Rev the session state data for iOS
2922         (where doing so is less disruptive). Standardize some CFString constants.
2923         (WebKit::encodeSessionHistory): Wrap for legibility.
2924         (WebKit::encodeLegacySessionState): Make a CFNumber for render tree size, and store
2925         it in the root dictionary.
2926         (WebKit::decodeBackForwardTreeNode): Move a comment to match another similar block.
2927         (WebKit::decodeLegacySessionState): Decode render tree size and store it.
2928
2929 2014-11-13  Tim Horton  <timothy_horton@apple.com>
2930
2931         Adjust the WKBundlePageOverlay Data Detectors SPI
2932         https://bugs.webkit.org/show_bug.cgi?id=138685
2933         <rdar://problem/18947156>
2934
2935         Reviewed by Anders Carlsson.
2936
2937         * UIProcess/mac/WKActionMenuController.mm:
2938         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
2939         Forward DDActionContext callbacks to the Web process.
2940
2941         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2942         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
2943         * WebProcess/WebPage/WebPageOverlay.cpp:
2944         * WebProcess/WebPage/WebPageOverlay.h:
2945         Add four DataDetectors-related WebKit2-only page overlay callbacks:
2946
2947         (WebKit::WebPageOverlay::actionContextForResultAtPoint):
2948         Called during the action menu hit test; clients can reply with a DDActionContext
2949         and a DOM range, and WebKit will treat that result and range as if it had
2950         detected it itself, building the action menu and showing the yellow highlight as usual.
2951
2952         (WebKit::WebPageOverlay::dataDetectorsPresentedUI):
2953         (WebKit::WebPageOverlay::dataDetectorsChangedUI):
2954         (WebKit::WebPageOverlay::dataDetectorsHidUI):
2955         These correspond to the DDActionContext callbacks, and can be used by clients
2956         to show/hide corresponding UI while DataDetectors in the UI process is presenting UI.
2957
2958         (WebKit::WebPageOverlay::prepareForActionMenu): Deleted.
2959         Get rid of prepareForActionMenu, as nobody ever used it.
2960
2961         * WebProcess/WebPage/WebPage.cpp:
2962         Add WebPageOverlay.h so that we can build, because the destructor lives here.
2963
2964         * WebProcess/WebPage/WebPage.h:
2965         * WebProcess/WebPage/WebPage.messages.in:
2966         
2967         * WebProcess/WebPage/mac/WebPageMac.mm:
2968         (WebKit::WebPage::performActionMenuHitTestAtLocation):
2969         Give all of the WebPageOverlays the first shot at data detection; if none of them
2970         reply with a valid DDActionContext/DOM range, we'll go ahead and do our normal detection.
2971
2972         (WebKit::WebPage::dataDetectorsPresentedUI):
2973         (WebKit::WebPage::dataDetectorsChangedUI):
2974         (WebKit::WebPage::dataDetectorsHidUI):
2975         Forward these along to the active WebPageOverlay.
2976
2977 2014-11-13  Carlos Garcia Campos  <cgarcia@igalia.com>
2978
2979         [SOUP] Missing ResourceRequest members encoded/decoded
2980         https://bugs.webkit.org/show_bug.cgi?id=138694
2981
2982         Reviewed by Sergio Villar Senin.
2983
2984         At least timeoutInterval and priority should also be
2985         encoded/decoded. This fixes all http/tests/xmlhttprequest/timeout/
2986         tests when using the network process, since the timeout is always
2987         0 for all requests that we send to the network process.
2988
2989         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
2990         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
2991         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2992
2993 2014-11-12  Ryuan Choi  <ryuan.choi@navercorp.com>
2994
2995         [EFL] Fix the build with EFL 1.12
2996         https://bugs.webkit.org/show_bug.cgi?id=138245
2997
2998         Reviewed by Gyuyoung Kim.
2999
3000         * UIProcess/API/efl/EwkView.cpp:
3001         First, modified to use Evas_GL raw pointer instead of UniquePtrEfl because
3002         Evas_GL.h can't be included in UniquePtrEfl.h
3003         It should be moved into EvasGLContext because WebKit/EFL use only one Evas_GL.
3004         Second, provided the version of GLES in Evas_GL_Config not to break build with
3005         EFL 1.12
3006         (EwkView::EwkView):
3007         (EwkView::~EwkView):
3008         (EwkView::displayTimerFired):
3009         (EwkView::createGLSurface):
3010         * UIProcess/API/efl/EwkView.h:
3011
3012 2014-11-12  Ada Chan  <adachan@apple.com>
3013
3014         Fix the iOS build.
3015
3016         * WebProcess/Plugins/PluginView.cpp:
3017         (WebKit::PluginView::pageMutedStateDidChange):
3018
3019 2014-11-05  Ada Chan  <adachan@apple.com>
3020
3021         Implement new plug-in API for muting plug-ins
3022         https://bugs.webkit.org/show_bug.cgi?id=138105
3023
3024         Reviewed by Anders Carlsson.
3025
3026         Handle the setting of NPNVmuteAudioBool on the plug-in.
3027
3028         * PluginProcess/PluginControllerProxy.cpp:
3029         (WebKit::PluginControllerProxy::PluginControllerProxy):
3030         Initialize m_isMuted.
3031         (WebKit::PluginControllerProxy::mutedStateChanged):
3032         Tell the plugin about the new muted state.
3033         * PluginProcess/PluginControllerProxy.h:
3034         * PluginProcess/PluginControllerProxy.messages.in:
3035         Add the MutedStateChanged message.
3036         * PluginProcess/PluginCreationParameters.cpp:
3037         (WebKit::PluginCreationParameters::PluginCreationParameters):
3038         Initialize isMuted.
3039         (WebKit::PluginCreationParameters::encode):
3040         Handle isMuted.
3041         (WebKit::PluginCreationParameters::decode):
3042         Ditto.
3043         * PluginProcess/PluginCreationParameters.h:
3044         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3045         (WebKit::NPN_GetValue):
3046         Get the plug-in's muted state.
3047         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3048         (WebKit::NetscapePlugin::isMuted):
3049         Get the muted state from PluginControllerProxy.
3050         (WebKit::NetscapePlugin::mutedStateChanged):
3051         Call NPP_SetValue with NPNVmuteAudioBool and the updated muted state.
3052         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3053         * WebProcess/Plugins/Plugin.h:
3054         (WebKit::Plugin::mutedStateChanged):
3055         * WebProcess/Plugins/PluginController.h:
3056         * WebProcess/Plugins/PluginProxy.cpp:
3057         (WebKit::PluginProxy::initialize):
3058         Set m_pendingPluginCreationParameters->isMuted.
3059         (WebKit::PluginProxy::mutedStateChanged):
3060         Send the MutedStateChanged message to the plugin process.
3061         * WebProcess/Plugins/PluginProxy.h:
3062         * WebProcess/Plugins/PluginView.cpp:
3063         (WebKit::PluginView::pageMutedStateDidChange):
3064         Call Plugin::mutedStateChanged() with the page's muted state.
3065         (WebKit::PluginView::isMuted):
3066         Get the page's current muted state.
3067         * WebProcess/Plugins/PluginView.h:
3068
3069 2014-11-12  Tim Horton  <timothy_horton@apple.com>
3070
3071         Two action menu item titles are swapped
3072         https://bugs.webkit.org/show_bug.cgi?id=138667
3073         <rdar://problem/18960409>
3074
3075         Reviewed by Beth Dakin.
3076
3077         * UIProcess/mac/WKActionMenuController.mm:
3078         (-[WKActionMenuController _createActionMenuItemForTag:]):
3079         Swap them back.
3080
3081 2014-11-12  Commit Queue  <commit-queue@webkit.org>
3082
3083         Unreviewed, rolling out r175806.
3084         https://bugs.webkit.org/show_bug.cgi?id=138666
3085
3086         Capturing CString is not thread safe (Requested by anttik on
3087         #webkit).
3088
3089         Reverted changeset:
3090
3091         "[WK2] Use C++ lambdas in IPC::Connection"
3092         https://bugs.webkit.org/show_bug.cgi?id=138018
3093         http://trac.webkit.org/changeset/175806
3094
3095 2014-11-12  Tim Horton  <timothy_horton@apple.com>
3096
3097         Need to show the text indicator when Data Detectors shows a popover
3098         https://bugs.webkit.org/show_bug.cgi?id=138664
3099         <rdar://problem/18869900>
3100
3101         Reviewed by Beth Dakin.
3102
3103         * UIProcess/mac/WKActionMenuController.h:
3104         * UIProcess/mac/WKActionMenuController.mm:
3105         (hasDataDetectorsCompletionAPI):
3106         Determine if we have the new API.
3107
3108         (-[WKActionMenuController willDestroyView:]):
3109         (-[WKActionMenuController willOpenMenu:withEvent:]):
3110         Make use of the new API.
3111         If we wanted to show a Data Detectors menu but have no items (or they're all
3112         disabled), cancel the menu.
3113         If we don't have it, manually manipulate the highlight.
3114
3115         (-[WKActionMenuController didCloseMenu:withEvent:]):
3116         Make use of the new API.
3117         If we don't have it, manually manipulate the highlight.
3118
3119         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
3120         Set up completion handlers if we have the new API; when DataDetectors
3121         presents UI, show the text indicator, when it dismisses, hide it.
3122         If we don't have the API, manually manipulate the highlight.
3123
3124 2014-11-12  Tim Horton  <timothy_horton@apple.com>
3125
3126         Make action menus much more reliable
3127         https://bugs.webkit.org/show_bug.cgi?id=138654
3128         <rdar://problem/18909111>
3129
3130         Reviewed by Anders Carlsson.
3131
3132         * UIProcess/mac/WKActionMenuController.mm:
3133         (-[WKActionMenuController prepareForMenu:withEvent:]):
3134         Remove MenuUpdateStage; nothing actually uses this value, we just pass it around.
3135
3136         (-[WKActionMenuController didPerformActionMenuHitTest:userData:]):
3137         Update the menu as soon as we have a reply from the Web process.
3138
3139         (-[WKActionMenuController menuNeedsUpdate:]):
3140         If our sync-wait for the Web process' reply times out, we should still update
3141         the menu to remove the placeholder separator item.
3142
3143         (-[WKActionMenuController _updateActionMenuItems]):
3144         (-[WKActionMenuController _updateActionMenuItemsForStage:]): Deleted.
3145         If we have our final answer for this menu (_state == Ready), and the final answer
3146         has no items in the menu, cancel tracking on the menu.
3147
3148 2014-11-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3149
3150         [GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer
3151         https://bugs.webkit.org/show_bug.cgi?id=138093
3152
3153         Reviewed by Martin Robinson.
3154
3155         It's only used by WebKitWebViewBase. While moving the code the
3156         following cleanups have been made:
3157
3158           - Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
3159           - Use a helper class XDamageNotifier to handle the XDamage
3160             events filtering and notification.
3161           - Use std::function instead of pointer to function for the
3162             damage callback.
3163           - Pass the X display to the RedirectedXCompositeWindow constructor
3164             and keep it as a member to use it everywhere, instead of using
3165             the default display in some places and the widget display in others.
3166           - Pass the damage notify function as a contructor parameter of
3167             RedirectedXCompositeWindow instead of setting the callback
3168             right after creating the object.
3169           - Remove GLContextNeeded and all the dead code related to the
3170             CreateGLContext mode that is no longer used.
3171           - Rename cairoSurfaceForWidget() as surface().
3172           - windowId() has been renamed as windowID() and made const.
3173           - Use std::unique_ptr instead of PassOwnPtr.
3174           - Fix coding style issues.
3175
3176         * PlatformGTK.cmake:
3177         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
3178         (webkitWebViewBaseConstructed):
3179         (webkitWebViewRenderAcceleratedCompositingResults):
3180         (webkitWebViewBaseCreateWebPage):
3181         (redirectedWindowDamagedCallback): Deleted.
3182         * UIProcess/gtk/RedirectedXCompositeWindow.cpp: Renamed from Source/WebCore/platform/gtk/RedirectedXCompositeWindow.cpp.
3183         (WebKit::XDamageNotifier::XDamageNotifier):
3184         (WebKit::XDamageNotifier::add):
3185         (WebKit::XDamageNotifier::remove):
3186         (WebKit::XDamageNotifier::filterXDamageEvent):
3187         (WebKit::XDamageNotifier::filterXEvent):
3188         (WebKit::xDamageNotifier):
3189         (WebKit::supportsXDamageAndXComposite):
3190         (WebKit::RedirectedXCompositeWindow::create):
3191         (WebKit::RedirectedXCompositeWindow::RedirectedXCompositeWindow):
3192         (WebKit::RedirectedXCompositeWindow::~RedirectedXCompositeWindow):
3193         (WebKit::RedirectedXCompositeWindow::resize):
3194         (WebKit::RedirectedXCompositeWindow::cleanupPixmapAndPixmapSurface):
3195         (WebKit::RedirectedXCompositeWindow::surface):
3196         * UIProcess/gtk/RedirectedXCompositeWindow.h: Renamed from Source/WebCore/platform/gtk/RedirectedXCompositeWindow.h.
3197         (WebKit::RedirectedXCompositeWindow::windowID):
3198
3199 2014-09-01  Philippe Normand  <pnormand@igalia.com>
3200
3201         [WK2] UserMediaClient support
3202         https://bugs.webkit.org/show_bug.cgi?id=123158
3203
3204         Reviewed by Benjamin Poulain.
3205
3206         Support for UserMediaPermissionRequest in WebKit2. It's
3207         implemented similarily to the GeolocationPermissionRequest
3208         support. When the WebPage requires this permission it sends a
3209         message to the UI process which at some point grants or denies the
3210         permission and sends the result back to the WebProcess.
3211
3212         * CMakeLists.txt: Generic CMake support for new files.
3213         * Shared/API/c/WKBase.h: New type for UserMediaPermissionRequest.
3214         * Shared/APIObject.h: Ditto.
3215         * UIProcess/API/C/WKAPICast.h: PermissionRequest API mapping.
3216         * UIProcess/API/APIUIClient.h: New decidePolicy handler for UserMediaPermissionRequest.
3217         (API::UIClient::decidePolicyForUserMediaPermissionRequest):
3218         * UIProcess/API/C/WKPage.cpp: Ditto.
3219         (WKPageSetPageUIClient):
3220         * UIProcess/API/C/WKPageUIClient.h: WKPageUIClient version bump to
3221         5, including the new decidePolicyForUserMediaPermissionRequest member.
3222         * UIProcess/API/C/WKUserMediaPermissionRequest.cpp: Added, C API
3223         implementation of the UserMediaPermissionRequest.
3224         (WKUserMediaPermissionRequestGetTypeID):
3225         (WKUserMediaPermissionRequestAllow):
3226         (WKUserMediaPermissionRequestDeny):
3227         * UIProcess/API/C/WKUserMediaPermissionRequest.h: Added.
3228         * UIProcess/API/C/WebKit2_C.h:
3229         * UIProcess/UserMediaPermissionRequestManagerProxy.h: Added.
3230         * UIProcess/UserMediaPermissionRequestProxy.cpp: Added, proxy
3231         object for the UserMediaPermissionRequestType.
3232         (WebKit::UserMediaPermissionRequestProxy::UserMediaPermissionRequestProxy):
3233         (WebKit::UserMediaPermissionRequestProxy::allow):
3234         (WebKit::UserMediaPermissionRequestProxy::deny):
3235         (WebKit::UserMediaPermissionRequestProxy::invalidate):
3236         * UIProcess/UserMediaPermissionRequestProxy.h: Added.
3237         (WebKit::UserMediaPermissionRequestProxy::create):
3238         (WebKit::UserMediaPermissionRequestProxy::mediaParameters):
3239         * UIProcess/WebPageProxy.cpp:
3240         (WebKit::WebPageProxy::WebPageProxy):
3241         (WebKit::WebPageProxy::requestUserMediaPermissionForFrame): Defer
3242         UserPermissionRequest to the UIClient.
3243         * UIProcess/WebPageProxy.h:
3244         * UIProcess/WebPageProxy.messages.in: New message to handle UserMediaPermissionRequests.
3245         * WebKit2.xcodeproj/project.pbxproj:
3246         * WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp: Added,
3247         WebProcess side of the UserRequestManager, keeping track of each
3248         permission request.
3249         (WebKit::generateRequestID):
3250         (WebKit::UserMediaPermissionRequestManager::UserMediaPermissionRequestManager):
3251         (WebKit::UserMediaPermissionRequestManager::startRequest):
3252         (WebKit::UserMediaPermissionRequestManager::cancelRequest):
3253         (WebKit::UserMediaPermissionRequestManager::didReceiveUserMediaPermissionDecision):
3254         * WebProcess/MediaStream/UserMediaPermissionRequestManager.h: Added.
3255         * WebProcess/WebCoreSupport/WebUserMediaClient.cpp: Added,
3256         WebProcess implementation of the WebCore::UserMediaClient.
3257         (WebKit::WebUserMediaClient::WebUserMediaClient):
3258         (WebKit::WebUserMediaClient::pageDestroyed):
3259         (WebKit::WebUserMediaClient::requestPermission):
3260         (WebKit::WebUserMediaClient::cancelRequest):
3261         * WebProcess/WebCoreSupport/WebUserMediaClient.h: Added.
3262         * WebProcess/WebPage/WebPage.cpp:
3263         (WebKit::WebPage::WebPage): Create the
3264         UserMediaPermissionRequestManager and register the UserMediaClient
3265         to the page.
3266         (WebKit::WebPage::didReceiveUserMediaPermissionDecision): Dispatch
3267         decision to manager.
3268         * WebProcess/WebPage/WebPage.h:
3269         (WebKit::WebPage::userMediaPermissionRequestManager):
3270         * WebProcess/WebPage/WebPage.messages.in: New Message to handle
3271         permission decision result from the UI process.
3272
3273 2014-11-11  Tim Horton  <timothy_horton@apple.com>
3274
3275         Add support for mailto: link action menus
3276         https://bugs.webkit.org/show_bug.cgi?id=138641
3277         <rdar://problem/18741567>
3278
3279         Reviewed by Beth Dakin.
3280
3281         * Shared/API/c/WKActionMenuTypes.h:
3282         Add a new type for mailto links.
3283
3284         * UIProcess/mac/WKActionMenuController.mm:
3285         (-[WKActionMenuController _defaultMenuItemsForMailtoLink]):
3286         Build a DDActionContext and grab menu items for our mailto link.
3287
3288         (-[WKActionMenuController _defaultMenuItems]):
3289         Get menu items from _defaultMenuItemsForMailtoLink if needed.
3290
3291 2014-11-11  Conrad Shultz  <conrad_shultz@apple.com>
3292
3293         Clients should be notified when a page preview finishes
3294         https://bugs.webkit.org/show_bug.cgi?id=138635
3295
3296         Reviewed by Tim Horton.
3297
3298         Add SPI to WKView to allow clients to do any cleanup that might be necessary when the preview closes.
3299
3300         * UIProcess/API/Cocoa/WKViewPrivate.h:
3301         Declare new SPI.
3302
3303         * UIProcess/API/mac/WKView.mm:
3304         (-[WKView _finishPreviewingURL:withPreviewView:]):
3305         Stub SPI implementation.
3306
3307         * UIProcess/mac/WKActionMenuController.h:
3308         Add an ivar for the preview view controller.
3309
3310         * UIProcess/mac/WKActionMenuController.mm:
3311         (-[WKActionMenuController _createPreviewPopoverForURL:originRect:]):
3312         Update to use the ivar.
3313         (-[WKActionMenuController _clearPreviewPopover]):
3314         Send -_finishPreviewingURL:withPreviewView: and nil out the view controller ivar.
3315
3316 2014-11-11  Tim Horton  <timothy_horton@apple.com>
3317
3318         Update artwork for some action menu items
3319         https://bugs.webkit.org/show_bug.cgi?id=138634
3320         <rdar://problem/18871984>
3321
3322         Reviewed by Anders Carlsson.
3323
3324         * Resources/OpenInNewWindowTemplate.pdf: Removed.
3325         * UIProcess/mac/WKActionMenuController.mm:
3326         (-[WKActionMenuController _createActionMenuItemForTag:]):
3327         (webKitBundleImageNamed): Deleted.
3328         * WebKit2.xcodeproj/project.pbxproj:
3329         Get rid of our custom art, and use system art for two more items.
3330
3331 2014-11-11  Alexey Proskuryakov  <ap@apple.com>
3332
3333         DRT and WKTR touch disk cache
3334         https://bugs.webkit.org/show_bug.cgi?id=138622
3335
3336         Reviewed by Geoffrey Garen.
3337
3338         Setting a cache model has a very strange behavior in WebKit2, where it ignores
3339         sizes that were explicitly passed from UI process, and uses different ones. As
3340         setCacheModel() is always called on launch, it always creates a non-empty disk cache.
3341
3342         The design needs to be improved one day, but for now, just make sure that we never
3343         create a disk cache during testing.
3344
3345         * NetworkProcess/NetworkProcess.cpp:
3346         (WebKit::NetworkProcess::NetworkProcess):
3347         (WebKit::NetworkProcess::initializeNetworkProcess):
3348         * NetworkProcess/NetworkProcess.h:
3349         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
3350         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
3351         (WebKit::NetworkProcess::platformSetCacheModel):
3352         * WebProcess/WebProcess.cpp:
3353         (WebKit::WebProcess::WebProcess):
3354         (WebKit::WebProcess::initializeWebProcess):
3355         * WebProcess/WebProcess.h:
3356         * WebProcess/cocoa/WebProcessCocoa.mm:
3357         (WebKit::WebProcess::platformSetCacheModel):
3358         (WebKit::WebProcess::platformInitializeWebProcess):
3359
3360 2014-11-11  Eric Carlson  <eric.carlson@apple.com>
3361
3362         [iOS] a page with video in optimized fullscreen is visible
3363         https://bugs.webkit.org/show_bug.cgi?id=138632
3364
3365         Reviewed by Anders Carlsson.
3366
3367         * UIProcess/API/Cocoa/WKWebView.mm:
3368         (-[WKWebView _isPlayingFullscreenOptimizedVideo]): New.
3369
3370         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3371         * UIProcess/ios/PageClientImplIOS.mm:
3372         (WebKit::PageClientImpl::isViewVisible): Return true if displaying optimized fullscreen
3373             video.
3374
3375 2014-11-11  Tim Horton  <timothy_horton@apple.com>
3376
3377         Occasional assertion failure under recommendedScrollbarStyleDidChange()
3378         https://bugs.webkit.org/show_bug.cgi?id=138604
3379         <rdar://problem/18855914>
3380
3381         Reviewed by Beth Dakin.
3382
3383         It is possible for AppKit to install tracking areas into our view
3384         behind our back, but we have code that depends on knowing exactly
3385         the set of tracking areas installed on WKView.
3386
3387         Make this more robust by keeping a reference to the tracking area we
3388         use for many things and manipulating that instead of making assumptions
3389         about the total set of tracking areas on WKView.
3390
3391         * UIProcess/API/mac/WKView.mm:
3392         (-[WKView _primaryTrackingArea]):
3393         (-[WKView _replacePrimaryTrackingArea:]):
3394         Provide a 'primary' tracking area setter/getter.
3395
3396         (-[WKView initWithFrame:context:configuration:webView:]):
3397         Keep a reference to the original tracking area installed at initialization time.
3398
3399         * UIProcess/API/mac/WKViewInternal.h:
3400         * UIProcess/mac/PageClientImpl.mm:
3401         (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange):
3402         Instead of walking the set of tracking areas, make use of the fact that
3403         we know exactly which tracking area we installed, and uninstall just that
3404         one, and replace it with our newly-built one.
3405
3406 2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
3407
3408         Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI
3409         https://bugs.webkit.org/show_bug.cgi?id=138623
3410
3411         Reviewed by Geoff Garen.
3412
3413         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3414         (InitWebCoreSystemInterface):
3415         * mac/WebKit2.order:
3416
3417 2014-11-11  Timothy Horton  <timothy_horton@apple.com>
3418
3419         Add a respondsToSelector check to dismissActionMenuPopovers
3420         ​https://bugs.webkit.org/show_bug.cgi?id=138600
3421         <rdar://problem/18932770>
3422
3423         Reviewed by Beth Dakin.
3424
3425         * UIProcess/mac/WKActionMenuController.mm:
3426         (-[WKActionMenuController dismissActionMenuPopovers]):
3427         Avoid calling this wherever it doesn't exist.
3428
3429 2014-11-11  Tim Horton  <timothy_horton@apple.com>
3430
3431         DataDetectors' menu items aren't presented in the telephone number menu
3432         https://bugs.webkit.org/show_bug.cgi?id=138602
3433         <rdar://problem/18866308>
3434
3435         Reviewed by Beth Dakin.
3436
3437         We currently round-trip the DataDetectors telephone number NSMenuItems
3438         through the very-lossy WebContextMenuItemData, for no real reason.
3439         We should avoid this so that DataDetectors' actual NSMenuItems are
3440         presented in the final menu, so that they can adjust their items after
3441         providing them to us.
3442
3443         * Platform/mac/MenuUtilities.h:
3444         * Platform/mac/MenuUtilities.mm:
3445         (WebKit::menuItemTitleForTelephoneNumber): Deleted.
3446         Stop adjusting the menu item titles, as they come correct now.
3447
3448         (WebKit::menuItemsForTelephoneNumber): Deleted.
3449         (WebKit::menuForTelephoneNumber):
3450         Return a fully-formed menu for the single telephone number case.
3451
3452         * UIProcess/mac/WebPageProxyMac.mm:
3453         (WebKit::WebPageProxy::showTelephoneNumberMenu):
3454         Present the fully-formed menu, without round-tripping through
3455         WebContextMenuItemData, because we do not need to hand the items to
3456         the context menu client (and indeed, were not), and because this
3457         allows us to use the exact items returned by DataDetectors, so they
3458         can keep ahold of the items that we actually present.
3459
3460         * UIProcess/PageClient.h:
3461         * UIProcess/mac/PageClientImpl.h:
3462         * UIProcess/mac/PageClientImpl.mm:
3463         (WebKit::PageClientImpl::showPlatformContextMenu):
3464         Add a Mac-only PageClient function for presenting a NSMenu at a
3465         WKView-relative point.
3466
3467 2014-11-11  Tim Horton  <timothy_horton@apple.com>
3468
3469         Adopt DDActionContext menu type SPI
3470         https://bugs.webkit.org/show_bug.cgi?id=138603
3471         <rdar://problem/18867627>
3472
3473         Reviewed by Anders Carlsson.
3474
3475         * UIProcess/mac/WKActionMenuController.mm:
3476         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
3477         Use the new SPI instead of WKSI.
3478
3479 2014-11-11  Tim Horton  <timothy_horton@apple.com>
3480
3481         Data Detectors popovers should be dismissed upon scrolling
3482         https://bugs.webkit.org/show_bug.cgi?id=138600
3483         <rdar://problem/18932770>
3484
3485         Reviewed by Beth Dakin.
3486
3487         * UIProcess/mac/WKActionMenuController.mm:
3488         (-[WKActionMenuController prepareForMenu:withEvent:]):
3489         Dismiss popovers when we start preparing another menu.
3490
3491         (-[WKActionMenuController dismissActionMenuPopovers]):
3492         Use the new DataDetectors SPI.
3493
3494 2014-11-11  Tim Horton  <timothy_horton@apple.com>
3495
3496         Localize strings for action menus
3497         https://bugs.webkit.org/show_bug.cgi?id=138591
3498         <rdar://problem/18815343>