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