Don't register for Lookup notifications until needed
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2015-05-07  Conrad Shultz  <conrad_shultz@apple.com>
2
3         Don't register for Lookup notifications until needed
4         https://bugs.webkit.org/show_bug.cgi?id=144783
5
6         Reviewed by Tim Horton.
7
8         * UIProcess/API/mac/WKView.mm:
9         Add a WKViewData ivar to track whether we've already registered for popover notifications.
10         (-[WKView _prepareForDictionaryLookup]):
11         Added; moved notification registration from -[WKView initWithFrame:processPool:configuration:webView:.
12         (-[WKView initWithFrame:processPool:configuration:webView:]):
13         Move notification registration to -_prepareForDictionaryLookup.
14
15         * UIProcess/API/mac/WKViewInternal.h:
16         Expose -_prepareForDictionaryLookup.
17
18         * UIProcess/mac/PageClientImpl.mm:
19         (WebKit::PageClientImpl::didPerformDictionaryLookup):
20         Send -[WKView _prepareForDictionaryLookup].
21
22         * UIProcess/mac/WKImmediateActionController.mm:
23         (-[WKImmediateActionController _animationControllerForText]):
24         Ditto.
25
26 2015-05-07  Commit Queue  <commit-queue@webkit.org>
27
28         Unreviewed, rolling out r183961.
29         https://bugs.webkit.org/show_bug.cgi?id=144784
30
31         Broke js/dom/JSON-stringify.html (Requested by kling on
32         #webkit).
33
34         Reverted changeset:
35
36         "Optimize serialization of quoted JSON strings."
37         https://bugs.webkit.org/show_bug.cgi?id=144754
38         http://trac.webkit.org/changeset/183961
39
40 2015-05-07  Anders Carlsson  <andersca@apple.com>
41
42         Build fixes.
43
44         * UIProcess/API/mac/WKView.mm:
45         (-[WKView initWithFrame:processPool:configuration:webView:]):
46         Use the regular init method.
47
48         * UIProcess/mac/WKSharingServicePickerDelegate.mm:
49         (-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
50         * WebProcess/WebPage/mac/WebPageMac.mm:
51         (WebKit::WebPage::handleSelectionServiceClick):
52         Pass empty dictionaries instead of nil.
53
54 2015-05-07  Chris Dumez  <cdumez@apple.com>
55
56         ASSERTION when pasting text into the WebInspector console
57         https://bugs.webkit.org/show_bug.cgi?id=144774
58
59         Reviewed by Ryosuke Niwa.
60
61         Fix assertion in didChangeSelection() meant to check that calling
62         editorState() does not cause a synchronous layout. The assertion
63         was not correct as it was relying on FrameView::needsLayout() and
64         we would hit it if calling editorState() would schedule a layout.
65         Instead, the new assertion relies on FrameView::layoutCount(),
66         which is more accurate.
67
68         * WebProcess/WebPage/WebPage.cpp:
69         (WebKit::WebPage::didChangeSelection):
70
71 2015-05-07  Andreas Kling  <akling@apple.com>
72
73         Optimize serialization of quoted JSON strings.
74         <https://webkit.org/b/144754>
75
76         Reviewed by Darin Adler.
77
78         * NetworkProcess/cache/NetworkCacheEntry.cpp:
79         (WebKit::NetworkCache::Entry::asJSON): Use the new StringBuilder API.
80
81 2015-05-07  Martin Robinson  <mrobinson@igalia.com>
82
83         Followup fixes to r183936
84
85         I neglected to include a few review comments when I landed the patch.
86
87         * UIProcess/gtk/TextCheckerGtk.cpp:
88         (WebKit::checkerState): Remove double semicolons.
89         (WebKit::updateStateForAllProcessPools): Use range-based-for loop here and
90         give the function a better name.
91         (WebKit::TextChecker::setContinuousSpellCheckingEnabled): Use new function name
92         (WebKit::TextChecker::setGrammarCheckingEnabled):Use new function name
93         (WebKit::TextChecker::ignoreWord): Fix unused parameter warning.
94         (WebKit::updateStateForAllContexts): Deleted.
95
96 2015-05-07  Michael Catanzaro  <mcatanzaro@igalia.com>
97
98         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
99         https://bugs.webkit.org/show_bug.cgi?id=144746
100
101         Reviewed by Martin Robinson.
102
103         Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
104
105         * Shared/gtk/ProcessExecutablePathGtk.cpp:
106         (WebKit::findWebKitProcess):
107         * UIProcess/API/gtk/WebKitWebContext.cpp:
108         (injectedBundleDirectory):
109         * UIProcess/gtk/TextCheckerGtk.cpp:
110         (WebKit::enchantTextChecker):
111
112 2015-05-06  Dean Jackson  <dino@apple.com>
113
114         Handle backdrop views that have to tile
115         https://bugs.webkit.org/show_bug.cgi?id=142317
116         <rdar://problem/20049088>
117
118         Reviewed by Simon Fraser.
119
120         Take 2 - this was rolled out because Mavericks was crashing.
121
122         Add some better logging for custom appearance.
123
124         * Shared/mac/RemoteLayerTreeTransaction.mm:
125         (WebKit::RemoteLayerTreeTextStream::operator<<):
126
127 2015-05-07  Sungmann Cho  <sungmann.cho@navercorp.com>
128
129         Add PLUGIN_ARCHITECTURE(X11) around m_frameRectInWindowCoordinates in NetscapePlugin.
130         https://bugs.webkit.org/show_bug.cgi?id=144490
131
132         Reviewed by Darin Adler.
133
134         m_frameRectInWindowCoordinates in NetscapePlugin is currently being used only for
135         the windowed plugins, and the windowed plugins are only supported on X11. So we can
136         guard it with PLUGIN_ARCHITECTURE(X11).
137
138         No new tests, no behavior change.
139
140         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
141         (WebKit::NetscapePlugin::geometryDidChange):
142         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
143
144 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
145
146         Revert "Introducing the Platform Abstraction Layer (PAL)"
147         https://bugs.webkit.org/show_bug.cgi?id=144751
148
149         Unreviewed.
150
151         PAL should be a new target inside WebCore, rather than a top-level folder.
152
153         * Configurations/FeatureDefines.xcconfig: Updated
154
155 2015-05-07  Jer Noble  <jer.noble@apple.com>
156
157         [WK2][Fullscreen] Fullscreen video does not enter low-power mode.
158         https://bugs.webkit.org/show_bug.cgi?id=144744
159
160         Reviewed by Darin Adler.
161
162         One of the requirements of entering low-power compositing mode is that no masking layers
163         are present in any of the ancestors of the fullscreen video layer. So once our fullscreen
164         transition animation completes, remove the mask layer entirely from our clipping layer.
165         This means it needs to be re-created and added when entering fullscreen, rather than just
166         at initialization time.
167
168         * UIProcess/mac/WKFullScreenWindowController.mm:
169         (-[WKFullScreenWindowController initWithWindow:webView:]):
170         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
171         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]):
172
173 2015-05-07  Martin Robinson  <mrobinson@igalia.com>
174
175         [GTK] All spell checking layout tests fail
176         https://bugs.webkit.org/show_bug.cgi?id=144648
177
178         Reviewed by Carlos Garcia Campos.
179
180         Simplify and complete the GTK+ spell-checking implementation. Instead of using
181         the EFL/GTK+ only WKTextChecker interface, directly implement Enchant spell-checking
182         in TextCheckerGtk. The per-context spell checking API is an illusion, since all
183         WKTextChecker implementations will adjust the same singleton. This can be a first step
184         toward removing it entirely.
185
186         Also complete the implementation of the TextChecker interface by duplicating the EFL code,
187         which reuses other methods in the same class. Eventually this duplication will collapse,
188         once GTK+ and EFL can share an Enchant implementation.
189
190         * PlatformGTK.cmake:
191         * UIProcess/API/gtk/WebKitPrivate.h:
192         * UIProcess/API/gtk/WebKitTextChecker.cpp: Removed.
193         * UIProcess/API/gtk/WebKitTextChecker.h: Removed.
194         * UIProcess/API/gtk/WebKitWebContext.cpp: Remove WebTextChecker usage and
195         replace it with calls directly to the TextChecker singleton via static methods.
196         * UIProcess/TextChecker.h:
197         * UIProcess/gtk/TextCheckerGtk.cpp: Move the WebTextChecker enchant implementation
198         here and reuse the EFL version of WebKit::TextChecker::requestCheckingOfString.
199         Also initialize languages properly when building for developer builds. This
200         allows WebKitTestRunner to work even when it doesn't explicitly set the languages.
201
202 2015-05-07  Ada Chan  <adachan@apple.com>
203
204         Fix a couple of cases where the backForwardListState's currentIndex is not set correctly in WebBackForwardList::backForwardListState().
205         https://bugs.webkit.org/show_bug.cgi?id=144666
206
207         Reviewed by Darin Adler.
208
209         * UIProcess/WebBackForwardList.cpp:
210         (WebKit::WebBackForwardList::backForwardListState):
211         If the first item is filtered out and the currentIndex is 0, don't decrement currentIndex.
212         If all the items are filtered out, set currentIndex to the uninitialized value.
213
214 2015-05-07  Csaba Osztrogonác  <ossy@webkit.org>
215
216         [WK2] Remove Windows cruft
217         https://bugs.webkit.org/show_bug.cgi?id=144745
218
219         Reviewed by Darin Adler.
220
221         * NetworkProcess/soup/NetworkProcessSoup.cpp:
222         (WebKit::getMemorySize):
223         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
224         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::encode):
225         (IPC::ArgumentCoder<WebCore::GraphicsSurfaceToken>::decode):
226         * WebProcess/soup/WebProcessSoup.cpp:
227         (WebKit::getMemorySize):
228
229 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
230
231         REGRESSION(r182032): [GTK] Production build is broken after r182032
232         https://bugs.webkit.org/show_bug.cgi?id=144736
233
234         Reviewed by Martin Robinson.
235
236         The problem is that r182032 moved the NetworkProcess sources from
237         WebKit2 sources to NetworkProcess sources. That's not a problem
238         for developer builds where all internal symbols are exported, but
239         doesn't work for production builds because all those internal
240         symbols are private.
241
242         * CMakeLists.txt: Use a different name for common network process
243         sources variable.
244         * PlatformMac.cmake: Append common network process sources to the
245         network process source list for Mac.
246
247 2015-05-07  Dan Bernstein  <mitz@apple.com>
248
249         <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
250         https://bugs.webkit.org/show_bug.cgi?id=144727
251
252         Reviewed by Darin Adler.
253
254         * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig, and define
255         INSTALL_PATH_PREFIX and LD_DYLIB_INSTALL_NAME for the iOS 8.x Simulator.
256         * Configurations/WebKit2.xcconfig: Define INSTALL_PATH_ACTUAL and let INSTALL_PATH be
257         derived from it and INSTALL_PATH_PREFIX. Don’t override DYLIB_INSTALL_NAME_BASE for iOS,
258         because we define LD_DYLIB_INSTALL_NAME directly where needed.
259
260 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
261
262         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.9.1 release.
263
264         * gtk/NEWS: Add release notes for 2.9.1.
265
266 2015-05-07  Carlos Garcia Campos  <cgarcia@igalia.com>
267
268         [GTK] Remove dock button from Web Inspector window
269         https://bugs.webkit.org/show_bug.cgi?id=144728
270
271         Reviewed by Sergio Villar Senin.
272
273         We added the dock buttons to the headerbar, because they were
274         removed from the inspector toolbar, but with the new tabbed
275         design, the dock buttons are back in the toolbar and look redundant.
276
277         * UIProcess/WebInspectorProxy.h:
278         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
279         (WebKit::WebInspectorProxy::createInspectorWindow):
280         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
281         (WebKit::WebInspectorProxy::dockButtonClicked): Deleted.
282
283 2015-05-06  Jer Noble  <jer.noble@apple.com>
284
285         [WK2][Fullscreen] Elements whose children extend beyond their bounds are clipped in fullscreen mode.
286         https://bugs.webkit.org/show_bug.cgi?id=144716
287
288         Reviewed by Darin Adler.
289
290         We create a mask animation for the transition between windowed and fullscreen modes, on the
291         assumption that the element being taken into fullscreen mode does not have visible children
292         who extend beyond that elements bounds. This assumption breaks down in the case where div
293         with absolutely positioned children is taken fullscreen. While we can't necessarily make the
294         transition look correct in this case, we can remove the mask after the transition completes.
295
296         * UIProcess/mac/WKFullScreenWindowController.mm:
297         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
298         * WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:
299         (WebKit::removeAllMediaKeyStorageForOriginPath):
300
301 2015-05-06  Jinwoo Jeong  <jw00.jeong@samsung.com>
302
303         Fix a build break on EFL debug build
304         https://bugs.webkit.org/show_bug.cgi?id=144654
305
306         Reviewed by Gyuyoung Kim.
307
308         No new tests, just build fix.
309
310         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
311         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
312         (WebKit::CoordinatedGraphicsScene::paintToGraphicsContext):
313
314 2015-05-06  Daniel Bates  <dabates@apple.com>
315
316         [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
317         https://bugs.webkit.org/show_bug.cgi?id=144657
318         <rdar://problem/18894598>
319
320         Reviewed by Andy Estes.
321
322         Pause and resume the database thread when the UIProcess enters and leaves the background,
323         respectively, so that we avoid WebProcess termination due to holding a locked SQLite
324         database file when the WebProcess is suspended. This behavior matches the analagous
325         behavior in Legacy WebKit.
326
327         * UIProcess/WebPageProxy.h:
328         * UIProcess/ios/WKContentView.mm:
329         (-[WKContentView _applicationDidEnterBackground:]): Call WebPageProxy::applicationDidEnterBackground()
330         when the UIProcess enters the background.
331         * UIProcess/ios/WebPageProxyIOS.mm:
332         (WebKit::WebPageProxy::applicationDidEnterBackground): Added; notify the WebProcess to pause the database thread.
333         We temporarily take out background assertion on the WebProcess before sending this notification to ensure that the
334         WebProcess is running to receive it. We'll release this assertion when the WebProcess replies that it received the
335         notification.
336         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
337         (WebKit::WebDatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseManager::setPauseAllDatabases().
338         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
339         * WebProcess/WebPage/WebPage.h:
340         * WebProcess/WebPage/WebPage.messages.in: Add message ApplicationDidEnterBackground(). Also,
341         add empty lines to help demarcate this message and the other UIKit application lifecycle-related
342         messages from the rest of the list of messages.
343         * WebProcess/WebPage/ios/WebPageIOS.mm:
344         (WebKit::WebPage::applicationWillEnterForeground): Resume the database thread.
345         (WebKit::WebPage::applicationDidEnterBackground): Pause the database thread.
346
347 2015-05-06  Ryuan Choi  <ryuan.choi@navercorp.com>
348
349         [EFL] ewk_view_page_contents_get() API test is flaky
350         https://bugs.webkit.org/show_bug.cgi?id=144683
351
352         Reviewed by Gyuyoung Kim.
353
354         Callback of WKPageGetContentsAsMHTMLData contains WKData which does not contain null terminated character.
355
356         * UIProcess/API/efl/ewk_view.cpp: Pass the data of string instead of WKData directly.
357         (ewkViewPageContentsAsMHTMLCallback):
358
359 2015-05-06  Joseph Pecoraro  <pecoraro@apple.com>
360
361         Web Inspector: Docking Toolbar Buttons do not respect Docking Availability
362         https://bugs.webkit.org/show_bug.cgi?id=144714
363
364         Reviewed by Timothy Hatcher.
365
366         * UIProcess/WebInspectorProxy.cpp:
367         (WebKit::WebInspectorProxy::createInspectorPage):
368         (WebKit::WebInspectorProxy::attachAvailabilityChanged):
369         * WebProcess/WebPage/WebInspectorUI.cpp:
370         (WebKit::WebInspectorUI::setDockingUnavailable):
371         * WebProcess/WebPage/WebInspectorUI.h:
372         * WebProcess/WebPage/WebInspectorUI.messages.in:
373         When docking availability changes, inform the inspector page
374         so it can respond by updating its UI.
375
376 2015-05-06  Joonghun Park  <jh718.park@samsung.com>
377
378         [WK2] Simplify AsyncRequestImpl::ArgumentType parameters
379         https://bugs.webkit.org/show_bug.cgi?id=144689
380
381         Reviewed by Darin Adler.
382
383         Remove duplicated typename and ::type from AsyncRequestImpl related
384         function parameters.
385
386         * Shared/AsyncRequest.h:
387
388 2015-05-06  Commit Queue  <commit-queue@webkit.org>
389
390         Unreviewed, rolling out r183894.
391         https://bugs.webkit.org/show_bug.cgi?id=144719
392
393         crashes on mavericks (Requested by dino on #webkit).
394
395         Reverted changeset:
396
397         "Handle backdrop views that have to tile"
398         https://bugs.webkit.org/show_bug.cgi?id=142317
399         http://trac.webkit.org/changeset/183894
400
401 2015-05-06  Brady Eidson  <beidson@apple.com>
402
403         Addition review followup for:
404         Crash executing null AsyncRequest in IDB code.
405         <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
406
407         Reviewed by Darin Adler.
408
409         This patch adds a layer on top of the UniqueIDBDatabase request map to catch this coding mistake in the future. 
410  
411          * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
412         (WebKit::UniqueIDBDatabase::didCompleteBoolRequest): Get rid of the ASSERT and the temporary variable,
413           make it a single line which reads better.
414         (WebKit::UniqueIDBDatabase::didPutRecordInBackingStore): Ditto.
415         (WebKit::UniqueIDBDatabase::didGetRecordFromBackingStore): Ditto.
416         (WebKit::UniqueIDBDatabase::didOpenCursorInBackingStore): Ditto.
417         (WebKit::UniqueIDBDatabase::didAdvanceCursorInBackingStore): Ditto.
418         (WebKit::UniqueIDBDatabase::didIterateCursorInBackingStore): Ditto.
419         (WebKit::UniqueIDBDatabase::didCountInBackingStore): Ditto.
420         (WebKit::UniqueIDBDatabase::didDeleteRangeInBackingStore): Ditto.
421         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h: Ditto.
422
423         Add the class AsyncRequestMap which shadows a HashMap but does aggressive runtime checks
424         in ::take() to make sure the same request was not dispatched twice in a row, and makes sure we
425         never try to execute a null AsyncRequest by way of a RELEASE_ASSERT.
426         * Shared/AsyncRequest.h:
427         (WebKit::AsyncRequestMap::AsyncRequestMap):
428         (WebKit::AsyncRequestMap::take):
429         (WebKit::AsyncRequestMap::add):
430         (WebKit::AsyncRequestMap::clear):
431         (WebKit::AsyncRequestMap::values):
432
433 2015-05-06  Brady Eidson  <beidson@apple.com>
434
435         Crash executing null AsyncRequest in IDB code.
436         <rdar://problem/18854856> and https://bugs.webkit.org/show_bug.cgi?id=144715
437
438         Reviewed by Darin Adler.
439
440         When UniqueIDBDatabase fails to execute an operation on the database work queue it usually
441         dispatches an AsyncRequest ID back to the main thread with an error callback.
442
443         For two of its operations it would then also dispatch the success callback.
444
445         In those cases the main thread would first take the AsyncRequest for the error callback out
446         of a map and then execute it.
447
448         It would then try to take the same AsyncRequest out of the map again, fail to do so, then
449         execute a null AsyncRequest.
450
451         This patch fixes the two functions to not dispatch both an error and success callback.
452
453         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
454         (WebKit::UniqueIDBDatabase::countInBackingStore): Return after dispatching the error callback.
455         (WebKit::UniqueIDBDatabase::deleteRangeInBackingStore): Ditto.
456
457 2015-05-06  Dean Jackson  <dino@apple.com>
458
459         Handle backdrop views that have to tile
460         https://bugs.webkit.org/show_bug.cgi?id=142317
461         <rdar://problem/20049088>
462
463         Reviewed by Simon Fraser.
464
465         Add some better logging for custom appearance.
466
467         * Shared/mac/RemoteLayerTreeTransaction.mm:
468         (WebKit::RemoteLayerTreeTextStream::operator<<):
469
470 2015-05-06  Chris Dumez  <cdumez@apple.com>
471
472         Disable network cache efficacy logging
473         https://bugs.webkit.org/show_bug.cgi?id=144703
474         <rdar://problem/20439143>
475
476         Reviewed by Andreas Kling.
477
478         Disable network cache efficacy logging by default as we have sufficient
479         data for now.
480
481         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
482         (WebKit::registerUserDefaultsIfNeeded):
483
484 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
485
486         Fix the build.
487
488         * UIProcess/mac/WKViewLayoutStrategy.mm:
489         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
490
491 2015-05-06  Dan Bernstein  <mitz@apple.com>
492
493         No way to get a WKWebProcessPlugInFrame’s parent frame
494         https://bugs.webkit.org/show_bug.cgi?id=144705
495
496         Reviewed by Sam Weinig.
497
498         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
499         (-[WKWebProcessPlugInFrame _parentFrame]): Added this getter.
500         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h: Declared new
501         _parentFrame property.
502
503 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
504
505         Fix the build.
506
507         * UIProcess/mac/WKViewLayoutStrategy.mm:
508         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
509
510 2015-04-02  Myles C. Maxfield  <mmaxfield@apple.com>
511
512         Introducing the Platform Abstraction Layer (PAL)
513         https://bugs.webkit.org/show_bug.cgi?id=143358
514
515         Reviewed by Simon Fraser.
516
517         * Configurations/FeatureDefines.xcconfig: Updated
518
519 2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
520
521         [GTK][WK2] The WebKit network disk cache is not enabled
522         https://bugs.webkit.org/show_bug.cgi?id=142821
523
524         Reviewed by Martin Robinson.
525
526         Enable NetworkCache for the GTK+ port.
527
528         * config.h:
529
530 2015-05-06  Ryuan Choi  <ryuan.choi@navercorp.com>
531
532         [EFL] Remove redudant condition in ViewClientEfl::didChangeViewportAttributes
533         https://bugs.webkit.org/show_bug.cgi?id=144672
534
535         Reviewed by Gyuyoung Kim.
536
537         ViewClientEfl::didChangeViewportAttributes is always called when fixed layout is disabled.
538
539         * UIProcess/efl/ViewClientEfl.cpp:
540         (WebKit::ViewClientEfl::didChangeViewportAttributes):
541         Removes condition that checks whether fixed layout is enabled.
542
543 2015-05-05  Alexey Proskuryakov  <ap@apple.com>
544
545         NetworkResourceLoader::cleanup() should clear ResourceHandle client pointer.
546         https://bugs.webkit.org/show_bug.cgi?id=144641
547         rdar://problem/20250960
548
549         Reviewed by David Kilzer.
550
551         * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::cleanup):
552         Clear the client pointer.
553
554         * Shared/Authentication/AuthenticationManager.cpp:
555         (WebKit::AuthenticationManager::useCredentialForChallenge):
556         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
557         (WebKit::AuthenticationManager::cancelChallenge):
558         (WebKit::AuthenticationManager::performDefaultHandling):
559         (WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue):
560         Updated comments, which were not accurate, at least on Mac.
561
562 2015-05-05  Tim Horton  <timothy_horton@apple.com>
563
564         Views get stuck with viewScale < 1 after switching from DynamicSizeWithMinimumViewSize to ViewSize
565         https://bugs.webkit.org/show_bug.cgi?id=144656
566
567         Reviewed by Dan Bernstein.
568
569         * UIProcess/mac/WKViewLayoutStrategy.mm:
570         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
571         Reset the viewScale when we leave the DynamicSizeWithMinimumViewSize strategy.
572
573 2015-05-05  Tim Horton  <timothy_horton@apple.com>
574
575         Fix the build.
576
577         * Platform/mac/LayerHostingContext.mm:
578         (WebKit::LayerHostingContext::setFencePort):
579
580 2015-05-05  Tim Horton  <timothy_horton@apple.com>
581
582         Fix the build.
583
584         * UIProcess/mac/WKViewLayoutStrategy.mm:
585         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
586
587 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
588
589         Add a layout mode for computing fixed layout size from a minimum size
590         https://bugs.webkit.org/show_bug.cgi?id=144610
591         <rdar://problem/19790341>
592
593         Reviewed by Simon Fraser.
594
595         Add a layout mode where WebKit determines the layout size with a set of
596         (still in flux) heuristics, trying hard to keep the page usable below a
597         particular client-defined threshold view size.
598
599         This can mean that WebKit will start scaling down the page inside the view
600         to make the whole page fit, using the viewScale mechanism.
601
602         * UIProcess/API/C/WKLayoutMode.h:
603         * UIProcess/API/Cocoa/_WKLayoutMode.h:
604         Add the new layout mode, and documentation for the two complicated ones.
605         
606         * UIProcess/API/Cocoa/WKWebView.mm:
607         (-[WKWebView _layoutMode]):
608         (-[WKWebView _setLayoutMode:]):
609         (-[WKWebView _setViewScale:]):
610         (-[WKWebView _setMinimumViewSize:]):
611         (-[WKWebView _minimumViewSize]):
612         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
613         Forward the layoutMode and viewScale parameters to WKView if we have one.
614
615         * UIProcess/API/Cocoa/WKViewPrivate.h:
616         * UIProcess/API/mac/WKView.mm:
617         (-[WKView dealloc]):
618         (-[WKView viewWillStartLiveResize]):
619         (-[WKView viewDidEndLiveResize]):
620         (-[WKView setFrameSize:]):
621         (-[WKView initWithFrame:processPool:configuration:webView:]):
622         (-[WKView disableFrameSizeUpdates]):
623         (-[WKView enableFrameSizeUpdates]):
624         (-[WKView frameSizeUpdatesDisabled]):
625         (-[WKView _layoutMode]):
626         (-[WKView _setLayoutMode:]):
627         (-[WKView _setViewScale:]):
628         (-[WKView _setMinimumViewSize:]):
629         (-[WKView _minimumViewSize]):
630         Store the minimum view size, and update the fixed layout size if needed.
631
632         (-[WKView _updateAutomaticallyComputedFixedLayoutSize]): Deleted.
633         (-[WKView _setAutomaticallyComputesFixedLayoutSizeFromViewScale:]): Deleted.
634         (-[WKView _automaticallyComputesFixedLayoutSizeFromViewScale]): Deleted.
635         Store the WKLayoutMode on the WKViewLayoutStrategy instead of having a
636         bunch of things like _automaticallyComputesFixedLayoutSizeFromViewScale.
637
638         * UIProcess/API/mac/WKViewInternal.h:
639
640         * UIProcess/mac/WKViewLayoutStrategy.h: Added.
641         * UIProcess/mac/WKViewLayoutStrategy.mm: Added.
642         (+[WKViewLayoutStrategy layoutStrategyWithPage:view:mode:]):
643         (-[WKViewLayoutStrategy initWithPage:view:mode:]):
644         (-[WKViewLayoutStrategy willDestroyView:]):
645         (-[WKViewLayoutStrategy layoutMode]):
646         (-[WKViewLayoutStrategy updateLayout]):
647         (-[WKViewLayoutStrategy disableFrameSizeUpdates]):
648         (-[WKViewLayoutStrategy enableFrameSizeUpdates]):
649         (-[WKViewLayoutStrategy frameSizeUpdatesDisabled]):
650         (-[WKViewLayoutStrategy didChangeViewScale]):
651         (-[WKViewLayoutStrategy didChangeMinimumViewSize]):
652         (-[WKViewLayoutStrategy willStartLiveResize]):
653         (-[WKViewLayoutStrategy didEndLiveResize]):
654         (-[WKViewLayoutStrategy didChangeFrameSize]):
655         (-[WKViewLayoutStrategy willChangeLayoutStrategy]):
656         (-[WKViewViewSizeLayoutStrategy initWithPage:view:mode:]):
657         (-[WKViewViewSizeLayoutStrategy updateLayout]):
658         (-[WKViewFixedSizeLayoutStrategy initWithPage:view:mode:]):
659         (-[WKViewFixedSizeLayoutStrategy updateLayout]):
660         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy initWithPage:view:mode:]):
661         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy updateLayout]):
662         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeViewScale]):
663         (-[WKViewDynamicSizeComputedFromViewScaleLayoutStrategy didChangeFrameSize]):
664         Move the existing layout strategies from WKView into WKViewLayoutStrategy subclasses.
665
666         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy initWithPage:view:mode:]):
667         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy updateLayout]):
668         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeMinimumViewSize]):
669         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willStartLiveResize]):
670         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didEndLiveResize]):
671         While in live resize with the new layout mode, disable frame size updates.
672         The new layout mode will do a live scale during part of the resize, and
673         we don't always want to send the new view size to the Web process.
674
675         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy didChangeFrameSize]):
676         (-[WKViewDynamicSizeWithMinimumViewSizeLayoutStrategy willChangeLayoutStrategy]):
677         While in the new layout mode, maintain the viewScale as the minimum of the
678         scale required to fit the current view frame size inside the minimumViewSize.
679         If no scaling is required, carry on as usual, pushing the new view frame size
680         to the DrawingArea and on to the Web process.
681         If scaling is required, apply a transform to the view in the UI process,
682         until the live resize completes, in which case we send a fenced viewScale
683         adjustment to the Web process (so that the tiles paint at the new viewScale
684         synchronized with the removal of the transform in the UI process).
685
686         * UIProcess/WebPageProxy.cpp:
687         (WebKit::WebPageProxy::scaleViewFenced):
688         * UIProcess/WebPageProxy.h:
689         * WebProcess/WebPage/DrawingArea.h:
690         (WebKit::DrawingArea::addFence):
691         (WebKit::DrawingArea::acceleratedAnimationDidEnd): Deleted.
692         * WebProcess/WebPage/WebPage.cpp:
693         (WebKit::WebPage::scaleViewAndUpdateGeometryFenced):
694         * WebProcess/WebPage/WebPage.h:
695         * WebProcess/WebPage/WebPage.messages.in:
696         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
697         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
698         (WebKit::TiledCoreAnimationDrawingArea::addFence):
699         Add scaleViewAndUpdateGeometryFenced and the ability to install CoreAnimation fences on
700         TiledCoreAnimationDrawingArea's CAContext.
701
702         Add the ability to send updateGeometry out-of-band, so that
703         we can send it synchronously inside the message along with the CA fence.
704         We have to both change the viewScale and updateGeometry simultaneously
705         in the same CA commit that we install the fence into, in order to ensure
706         that there is no flash.
707
708 2015-05-05  Alex Christensen  <achristensen@webkit.org>
709
710         [Content Extensions] Release input NSString when finished copying it.
711         https://bugs.webkit.org/show_bug.cgi?id=144642
712
713         Reviewed by Brian Weinstein.
714
715         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.h:
716         * UIProcess/API/Cocoa/_WKUserContentExtensionStore.mm:
717         (-[_WKUserContentExtensionStore compileContentExtensionForIdentifier:encodedContentExtension:completionHandler:]):
718
719 2015-05-05  Alex Christensen  <achristensen@webkit.org>
720
721         [Content Extensions] Use less memory to store the json input.
722         https://bugs.webkit.org/show_bug.cgi?id=144604
723
724         Reviewed by Benjamin Poulain.
725
726         * UIProcess/API/APIUserContentExtensionStore.cpp:
727         (API::compiledToFile):
728         (API::UserContentExtensionStore::compileContentExtension):
729         * UIProcess/API/APIUserContentExtensionStore.h:
730         Don't copy strings as much or keep them alive after done using them.
731
732 2015-05-04  Alex Christensen  <achristensen@webkit.org>
733
734         [Content Extensions] Use less memory when writing byte code to file
735         https://bugs.webkit.org/show_bug.cgi?id=144602
736
737         Reviewed by Darin Adler.
738
739         * UIProcess/API/APIUserContentExtensionStore.cpp:
740         (API::decodeContentExtensionMetaData):
741         (API::writeDataToFile):
742         (API::compiledToFile):
743         (API::createExtension):
744         Compile and write each DFA to file, then come back and write the header when finalizing.
745         Also don't copy the DFA bytecode. This way, we don't need to keep more than one DFA's
746         bytecode in memory at a time.
747
748 2015-05-05  Sungmann Cho  <sungmann.cho@navercorp.com>
749
750         Make all FrameLoadState data members private.
751         https://bugs.webkit.org/show_bug.cgi?id=144562
752
753         Reviewed by Darin Adler.
754
755         Previously, all of the data members in FrameLoadState were public and accessed directly
756         from outside the class. But these should all be private as noted in FrameLoadState.h
757         for better encapsulation.
758
759         No new tests, no behavior change.
760
761         * UIProcess/API/C/WKFrame.cpp:
762         (WKFrameGetFrameLoadState):
763         * UIProcess/FrameLoadState.h:
764         (WebKit::FrameLoadState::state):
765         (WebKit::FrameLoadState::url):
766         (WebKit::FrameLoadState::provisionalURL):
767         (WebKit::FrameLoadState::unreachableURL):
768         * UIProcess/WebFrameProxy.h:
769         (WebKit::WebFrameProxy::url):
770         (WebKit::WebFrameProxy::provisionalURL):
771         (WebKit::WebFrameProxy::unreachableURL):
772
773 2015-05-05  Alexey Proskuryakov  <ap@apple.com>
774
775         Crashes in SandboxExtension::consumePermanently when uploading
776         https://bugs.webkit.org/show_bug.cgi?id=144611
777         rdar://problem/10156710
778
779         Reviewed by Darin Adler.
780
781         This only fixes the crashes, uploading still won't work.
782         Added null checks and some logging that may help us get to the root cause eventually.
783
784         * Shared/SandboxExtension.h:
785         (WebKit::SandboxExtension::createHandle):
786         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
787         * Shared/mac/SandboxExtensionMac.mm:
788         (WebKit::SandboxExtension::createHandle):
789         (WebKit::SandboxExtension::createHandleForReadWriteDirectory):
790         * UIProcess/WebPageProxy.cpp:
791         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
792         * WebProcess/WebPage/WebPage.cpp:
793         (WebKit::WebPage::extendSandboxForFileFromOpenPanel):
794
795 2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>
796
797         Remove TextureMapperImageBuffer
798         https://bugs.webkit.org/show_bug.cgi?id=143561
799
800         Reviewed by Žan Doberšek.
801
802         * Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
803         (WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
804         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
805         (WebKit::LayerTreeHostGtk::setNativeSurfaceHandleForCompositing):
806
807 2015-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
808
809         [SOUP] Network Cache: IOChannel operations are not sent to the right thread
810         https://bugs.webkit.org/show_bug.cgi?id=144542
811
812         Reviewed by Darin Adler.
813
814         We are ignoring the given WorkQueue and running the async
815         operations in the current thread. Check the given WorkQueue
816         instead and schedule the operation to the given queue. If the
817         given queue is nullptr, which means the operation should be run in
818         the main context, the operation is run directly if the current
819         context is the main one or sent to the main context using a
820         GMainLoopSource.
821
822         Fixes crashes due to asserts when running disk-cache layout tests
823         in a Debug build.
824
825         * NetworkProcess/cache/NetworkCacheIOChannel.h:
826         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
827         (WebKit::NetworkCache::runTaskInQueue):
828         (WebKit::NetworkCache::IOChannel::read):
829         (WebKit::NetworkCache::IOChannel::readSync):
830         (WebKit::NetworkCache::IOChannel::write):
831
832 2015-05-04  Dan Bernstein  <mitz@apple.com>
833
834         WebKit always goes through LaunchServices for main frame navigation actions
835         https://bugs.webkit.org/show_bug.cgi?id=144608
836
837         Reviewed by Tim Horton.
838
839         * UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Defined
840         _WKNavigationActionPolicyAllowWithoutTryingAppLink.
841         * UIProcess/Cocoa/NavigationState.mm:
842         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): If the policy
843         is _WKNavigationActionPolicyAllowWithoutTryingAppLink, don’t go through tryAppLink.
844
845 2015-05-04  Enrica Casucci  <enrica@apple.com>
846
847         [iOS WK2] editorState should include information about selection clipping rectangle.
848         https://bugs.webkit.org/show_bug.cgi?id=144603
849         rdar://problem/20521252
850
851         Reviewed by Chris Dumez.
852
853         Adding selectionClipRect to the post-layout portion of EditorState.
854         This way we can compute the selection clipping rectangle based on
855         up-to-date information instead of using the rectangle provided when
856         then element was first focused.
857
858         * Shared/EditorState.cpp:
859         (WebKit::EditorState::PostLayoutData::encode):
860         (WebKit::EditorState::PostLayoutData::decode):
861         * Shared/EditorState.h:
862         * UIProcess/ios/WKContentViewInteraction.mm:
863         (-[WKContentView _selectionClipRect]):
864         * WebProcess/WebPage/ios/WebPageIOS.mm:
865         (WebKit::WebPage::platformEditorState):
866
867 2015-05-04  Antti Koivisto  <antti@apple.com>
868
869         Network Cache: Support time based cache clearing
870         https://bugs.webkit.org/show_bug.cgi?id=144568
871         <rdar://problem/19769820>
872
873         Reviewed by Andreas Kling.
874
875         Support clearing cache entries newer than given time only.
876
877         * NetworkProcess/cache/NetworkCache.cpp:
878         (WebKit::NetworkCache::Cache::deleteDumpFile):
879         (WebKit::NetworkCache::Storage::traverse):
880
881             Also fix thread safety of traverse handler function.
882
883         (WebKit::NetworkCache::Cache::clear):
884
885             Also add completion handler to support the API properly.
886
887         * NetworkProcess/cache/NetworkCache.h:
888         * NetworkProcess/cache/NetworkCacheStorage.cpp:
889         (WebKit::NetworkCache::Storage::clear):
890         * NetworkProcess/cache/NetworkCacheStorage.h:
891         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
892         (WebKit::clearNSURLCache):
893
894             Factor to a function.
895
896         (WebKit::NetworkProcess::clearDiskCache):
897
898 2015-05-04  Zan Dobersek  <zdobersek@igalia.com>
899
900         [WTF] Remove Functional.h inclusions
901         https://bugs.webkit.org/show_bug.cgi?id=144400
902
903         Reviewed by Darin Adler.
904
905         Remove unnecessary inclusions of the <wtf/Functional.h> header in WebKit2.
906
907         * Platform/IPC/unix/ConnectionUnix.cpp:
908         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Import the <objc/runtime.h>
909         header that was previously indirectly included through the Functional.h header.
910         * WebProcess/WebPage/DrawingArea.cpp:
911
912 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
913
914         [ARM] Don't compare unsigned chars to EOF (-1)
915         https://bugs.webkit.org/show_bug.cgi?id=144439
916
917         Reviewed by Geoffrey Garen.
918
919         * Shared/linux/WebMemorySamplerLinux.cpp:
920         (WebKit::nextToken): Don't cast return value of fgetc() to char.
921
922 2015-05-04  Antti Koivisto  <antti@apple.com>
923
924         Remove NetworkResourceLoadScheduler
925         https://bugs.webkit.org/show_bug.cgi?id=144550
926
927         Reviewed by Sam Weinig.
928
929         It doesn't really do anything.
930
931         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
932         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
933         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
934         * NetworkProcess/NetworkProcess.cpp:
935         (WebKit::NetworkProcess::getNetworkProcessStatistics):
936         * NetworkProcess/NetworkProcess.h:
937         (WebKit::NetworkProcess::networkResourceLoadScheduler): Deleted.
938         * NetworkProcess/NetworkResourceLoadScheduler.cpp: Removed.
939         * NetworkProcess/NetworkResourceLoadScheduler.h: Removed.
940         * NetworkProcess/NetworkResourceLoader.cpp:
941         (WebKit::NetworkResourceLoader::cleanup):
942         * NetworkProcess/NetworkResourceLoader.h:
943         (WebKit::NetworkResourceLoader::create):
944         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
945         (WebKit::initializeNetworkSettings):
946
947             Moved from NetworkResourceLoadSchedulerMac.mm.
948
949         (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
950         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm: Removed.
951         * NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp: Removed.
952         * WebKit2.xcodeproj/project.pbxproj:
953
954 2015-05-03  Alexey Proskuryakov  <ap@apple.com>
955
956         Crash in SandboxExtension::consume when uploading iWork -tef documents to iCloud
957         https://bugs.webkit.org/show_bug.cgi?id=144509
958         rdar://problem/18731910
959
960         Reviewed by Daniel Bates.
961
962         No test, because testRunner.beginDragWithFiles doesn't work in WKTR, and making
963         it work is hard.
964
965         * Shared/BlobDataFileReferenceWithSandboxExtension.cpp:
966         (WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
967         (WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
968
969 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
970
971         [GTK][EFL] Unify platform display handling
972         https://bugs.webkit.org/show_bug.cgi?id=144517
973
974         Reviewed by Martin Robinson.
975
976         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
977         (webkitWebViewBaseRealize): Use PlatformDisplay::sharedDisplay()
978         to checkt the display type.
979         (webkitWebViewBaseCreateWebPage): Ditto.
980         * UIProcess/cairo/BackingStoreCairo.cpp:
981         (WebKit::BackingStore::createBackend): Pass the native X11 shared
982         display to BackingStoreBackendCairoX11.
983         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
984         (WebKit::NetscapePlugin::x11HostDisplay): Return the native X11
985         shared display.
986
987 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
988
989         Unreviewed. Fix Debug build with NETWORK_CACHE enabled and CACHE_PARTITIONING disabled.
990
991         * NetworkProcess/cache/NetworkCache.cpp:
992         (WebKit::NetworkCache::Cache::store):
993
994 2015-05-01  Dan Bernstein  <mitz@apple.com>
995
996         WebKit2 part of <rdar://problem/8636045> Back/forward navigation to an error page in Safari breaks the back-forward list
997         https://bugs.webkit.org/show_bug.cgi?id=144501
998
999         Reviewed by Darin Adler.
1000
1001         * UIProcess/WebPageProxy.cpp:
1002         (WebKit::WebPageProxy::loadAlternateHTMLString): If this is called during
1003         didFailProvisionalLoadForFrame, send back the provisional URL captured at the time of
1004         failure.
1005         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): Get the provisioinal URL and keep
1006         it in new member variable m_failingProvisionalLoadURL for the duration of the client’s
1007         handling of this message.
1008         * UIProcess/WebPageProxy.h:
1009
1010         * UIProcess/WebPageProxy.messages.in: Added provisionalURL parameter to
1011         DidFailProvisionalLoadForFrame.
1012
1013         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1014         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Send the URL for this error
1015         to the UI process.
1016
1017         * WebProcess/WebPage/WebPage.cpp:
1018         (WebKit::WebPage::loadAlternateHTMLString): Temporarily restore the loader’s state to
1019         reflect the provisional load error being handled.
1020
1021         * WebProcess/WebPage/WebPage.h:
1022         * WebProcess/WebPage/WebPage.messages.in: Added provisionalLoadErrorURL parameter to
1023         LoadAlternateHTMLString.
1024
1025 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
1026
1027         USE(...) macro should expect unprefixed variables
1028         https://bugs.webkit.org/show_bug.cgi?id=144454
1029
1030         Reviewed by Daniel Bates.
1031
1032         * Shared/API/c/WKBase.h: Replace all occurrences WTF_USE with USE.
1033         * WebKit2.xcodeproj/project.pbxproj: Ditto.
1034
1035 2015-05-01  Brady Eidson  <beidson@apple.com>
1036
1037         Add API to disable meta refreshes.
1038         <rdar://problem/20333198> and https://bugs.webkit.org/show_bug.cgi?id=144269
1039
1040         Reviewed by Alexey Proskuryakov.
1041
1042         Add a preference to enable/disable meta refreshes, enabled by default.
1043
1044         * Shared/WebPreferencesDefinitions.h:
1045         * UIProcess/API/C/WKPreferences.cpp:
1046         (WKPreferencesSetMetaRefreshEnabled):
1047         (WKPreferencesGetMetaRefreshEnabled):
1048         (WKPreferencesGetIgnoreViewportScalingConstraints): Deleted.
1049         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1050         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1051         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1052         * WebProcess/WebPage/WebPage.cpp:
1053         (WebKit::WebPage::updatePreferences):
1054
1055 2015-05-01  Antti Koivisto  <antti@apple.com>
1056
1057         Remove network process load serialization code
1058         https://bugs.webkit.org/show_bug.cgi?id=144448
1059
1060         Reviewed by Alexey Proskuryakov.
1061
1062         TestRunner.setSerializeHTTPLoads is used by a few tests but it is unnecessary
1063         with network process. We don't reorder loads anyway so test results are consistent.
1064         There or no other clients for this code.
1065
1066         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1067         (WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
1068         (WebKit::NetworkConnectionToWebProcess::setSerialLoadingEnabled): Deleted.
1069         * NetworkProcess/NetworkConnectionToWebProcess.h:
1070         (WebKit::NetworkConnectionToWebProcess::isSerialLoadingEnabled): Deleted.
1071         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1072         * NetworkProcess/NetworkProcess.cpp:
1073         (WebKit::NetworkProcess::getNetworkProcessStatistics):
1074         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1075         (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
1076         (WebKit::NetworkResourceLoadScheduler::removeLoader):
1077         (WebKit::NetworkResourceLoadScheduler::loadsPendingCount): Deleted.
1078         * NetworkProcess/NetworkResourceLoadScheduler.h:
1079         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1080         (WKBundleSetTabKeyCyclesThroughElements):
1081         (WKBundleSetSerialLoadingEnabled): Deleted.
1082         (WKBundleDispatchPendingLoadRequests): Deleted.
1083         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1084         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1085         (WebKit::InjectedBundle::setSerialLoadingEnabled): Deleted.
1086         (WebKit::InjectedBundle::dispatchPendingLoadRequests): Deleted.
1087
1088             Remove also this as it does nothing.
1089
1090         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1091         (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler):
1092         (WebKit::WebResourceLoadScheduler::suspendPendingRequests):
1093         (WebKit::WebResourceLoadScheduler::resumePendingRequests):
1094
1095             Remove implementation, it does nothing.
1096
1097         (WebKit::WebResourceLoadScheduler::setSerialLoadingEnabled):
1098         * WebProcess/Network/WebResourceLoadScheduler.h:
1099
1100 2015-04-30  Timothy Horton  <timothy_horton@apple.com>
1101
1102         Remove long-deprecated unused WKView minimumLayoutWidth properties
1103         https://bugs.webkit.org/show_bug.cgi?id=144480
1104
1105         Reviewed by Alexey Proskuryakov.
1106
1107         * UIProcess/API/Cocoa/WKViewPrivate.h:
1108         * UIProcess/API/mac/WKView.mm:
1109         (-[WKView minimumLayoutWidth]): Deleted.
1110         (-[WKView setMinimumLayoutWidth:]): Deleted.
1111         (-[WKView minimumWidthForAutoLayout]): Deleted.
1112         (-[WKView setMinimumWidthForAutoLayout:]): Deleted.
1113         These were replaced with minimumSizeForAutoLayout long ago.
1114
1115 2015-04-30  Simon Fraser  <simon.fraser@apple.com>
1116
1117         Fixed elements end up in the middle of the view with pageScale < 1
1118         https://bugs.webkit.org/show_bug.cgi?id=144428
1119         rdar://problem/20404982
1120
1121         Reviewed by Tim Horton.
1122
1123         Encode/decode fixedElementsLayoutRelativeToFrame.
1124
1125         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1126         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
1127         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
1128
1129 2015-04-30  Tim Horton  <timothy_horton@apple.com>
1130
1131         Asynchronous (or timed-out synchronous) resize flashes white instead of page background color
1132         https://bugs.webkit.org/show_bug.cgi?id=144468
1133
1134         Reviewed by Simon Fraser and Dan Bernstein.
1135
1136         * UIProcess/API/mac/WKView.mm:
1137         (-[WKView _viewBackgroundColor]):
1138         (-[WKView updateLayer]):
1139         Use the pageExtendedBackgroundColor for the background color of the WKView,
1140         if we have one (and aren't using a transparent background). This means
1141         during asynchronous resize or other cases where the Web process isn't keeping
1142         up with the UI process during a resize, we'll see background color instead of white.
1143
1144 2015-04-30  Beth Dakin  <bdakin@apple.com>
1145
1146         Should choose UIScrollView indicatorStyle based on the document background color
1147         https://bugs.webkit.org/show_bug.cgi?id=144473
1148         -and corresponding-
1149         rdar://problem/19897699
1150
1151         Reviewed by Simon Fraser.
1152
1153         Update the indicator style whenever the background color changes.  
1154         * UIProcess/API/Cocoa/WKWebView.mm:
1155         (-[WKWebView _updateScrollViewBackground]):
1156
1157 2015-04-30  Enrica Casucci  <enrica@apple.com>
1158
1159         [iOS] tapping in the middle of a word in editable content should not select the word.
1160         https://bugs.webkit.org/show_bug.cgi?id=144421
1161         rdar://problem/20710948
1162
1163         Reviewed by Tim Horton.
1164
1165         Reverting to the original behavior.
1166
1167         * WebProcess/WebPage/ios/WebPageIOS.mm:
1168         (WebKit::WebPage::selectWithGesture):
1169
1170 2015-04-29  Hunseop Jeong  <hs85.jeong@samsung.com>
1171
1172         Fix the EFL build after r183595
1173         https://bugs.webkit.org/show_bug.cgi?id=144427
1174
1175         Reviewed by Gyuyoung Kim.
1176
1177         updateWheelEventTestTriggersIfNeeded() is guarded by #if ENABLE(CSS_SCROLL_SNAP) || ENABLE(RUBBER_BANDING).
1178
1179         * WebProcess/WebPage/EventDispatcher.cpp:
1180         (WebKit::updateWheelEventTestTriggersIfNeeded):
1181
1182 2015-04-29  Brent Fulgham  <bfulgham@apple.com>
1183
1184         Expand test infrastructure to support scrolling tests
1185         https://bugs.webkit.org/show_bug.cgi?id=143684
1186         <rdar://problem/20375516>
1187
1188         Reviewed by Simon Fraser.
1189
1190         Update test programs to activate (and deactivate) the new WheelEventTestTrigger logic.
1191
1192         * UIProcess/API/C/WKPage.cpp:
1193         (WKPageClearWheelEventTestTriggers): Added.
1194         * UIProcess/API/C/WKPage.h:
1195         * UIProcess/WebPageProxy.cpp:
1196         (WebKit::WebPageProxy::clearWheelEventTestTrigger): Added.
1197         * UIProcess/WebPageProxy.h:
1198         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1199         (WKBundlePageStartMonitoringScrollOperations): Interact with WheelEventTestTrigger through
1200         the Page, rather than MainFrame.
1201         (WKBundlePageRegisterScrollOperationCompletionCallback): Ditto.
1202         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1203         (WebKit::PDFPlugin::createScrollbar): Make sure scroll animator knows about any
1204         active test triggers.
1205         * WebPage/EventDispatcher.mm:
1206         (WebKit::EventDispatcher::wheelEvent): If the wheel event was passed to the scrolling thread,
1207         defer tests until a Scrolling Thread Sync has occurred.
1208         * WebPage/WebPage.cpp:
1209         (WebKit::WebPage::clearWheelEventTestTrigger): Added.
1210         * WebPage/WebPage.h:
1211         * WebPage/WebPage.message.in: Added ClearWheelEventTestTrigger message.
1212
1213 2015-04-29  Enrica Casucci  <enrica@apple.com>
1214
1215         Adding the ability to move selection by granularity on iOS.
1216         https://bugs.webkit.org/show_bug.cgi?id=144410
1217         rdar://problem/19213337
1218
1219         Reviewed by Benjamin Poulain.
1220
1221         This patch also correctly sets _usingGestureForSelection for all
1222         the functions that change the selection with a gesture.
1223         This way we make sure that the selection drawing is not delayed
1224         until the next time we paint.
1225
1226         * UIProcess/WebPageProxy.h:
1227         * UIProcess/ios/WKContentViewInteraction.mm:
1228         (-[WKContentView moveSelectionAtBoundary:inDirection:completionHandler:]):
1229         * UIProcess/ios/WebPageProxyIOS.mm:
1230         (WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
1231         * WebProcess/WebPage/WebPage.h:
1232         * WebProcess/WebPage/WebPage.messages.in:
1233         * WebProcess/WebPage/ios/WebPageIOS.mm:
1234         (WebKit::WebPage::moveSelectionAtBoundaryWithDirection):
1235
1236 2015-04-29  Tim Horton  <timothy_horton@apple.com>
1237
1238         UI process sometimes crashes under _takeViewSnapshot when the window is off-screen
1239         https://bugs.webkit.org/show_bug.cgi?id=144418
1240         <rdar://problem/20740278>
1241
1242         Reviewed by Alexey Proskuryakov.
1243
1244         * UIProcess/API/mac/WKView.mm:
1245         (-[WKView _takeViewSnapshot]):
1246         Null-check the array before checking if it has any items.
1247         If the window is off-screen, we can't snapshot it.
1248
1249 2015-04-29  Simon Fraser  <simon.fraser@apple.com>
1250
1251         Allow testing of plug-ins that handle wheel events.
1252         https://bugs.webkit.org/show_bug.cgi?id=144413
1253
1254         Reviewed by Tim Horton.
1255         
1256         Allow the Test Netscape Plug-in to pretend to handle wheel events,
1257         so layout tests can use it.
1258
1259         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1260         (WebKit::NetscapePluginModule::determineQuirks):
1261
1262 2015-04-29  Filip Pizlo  <fpizlo@apple.com>
1263
1264         JSTypeInfo should have an inline type flag to indicate if getCallData() has been overridden
1265         https://bugs.webkit.org/show_bug.cgi?id=144397
1266
1267         Reviewed by Andreas Kling.
1268
1269         If you override getCallData() and you want to be called a "function", then you need to use the
1270         new TypeOfShouldCallGetCallData flag.
1271
1272         * WebProcess/Plugins/Netscape/JSNPObject.h:
1273
1274 2015-04-29  Antti Koivisto  <antti@apple.com>
1275
1276         ResourceLoadPriority should be enum class
1277         https://bugs.webkit.org/show_bug.cgi?id=144326
1278
1279         Reviewed by Darin Adler.
1280
1281         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1282         (WebKit::NetworkConnectionToWebProcess::servePendingRequests): Deleted.
1283
1284             Remove this unused message.
1285
1286         * NetworkProcess/NetworkConnectionToWebProcess.h:
1287         * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
1288         * NetworkProcess/cache/NetworkCache.cpp:
1289         (WebKit::NetworkCache::makeStoreDecision):
1290         (WebKit::NetworkCache::Cache::retrieve):
1291         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
1292         (WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
1293         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1294         (WebKit::WebResourceLoadScheduler::servePendingRequests):
1295         * WebProcess/Network/WebResourceLoadScheduler.h:
1296
1297 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
1298
1299         [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
1300         https://bugs.webkit.org/show_bug.cgi?id=132159
1301
1302         Reviewed by Darin Adler.
1303
1304         Add SPI to set the font whitelist.
1305
1306         * Shared/WebProcessCreationParameters.cpp:
1307         (WebKit::WebProcessCreationParameters::encode):
1308         (WebKit::WebProcessCreationParameters::decode):
1309         * Shared/WebProcessCreationParameters.h:
1310         * UIProcess/API/C/WKContext.cpp:
1311         (WKContextSetFontWhitelist):
1312         * UIProcess/API/C/WKContextPrivate.h:
1313         * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
1314         (WebKit::WebProcessPool::platformInitializeWebProcess):
1315         * UIProcess/WebProcessPool.cpp:
1316         (WebKit::WebProcessPool::setFontWhitelist):
1317         * UIProcess/WebProcessPool.h:
1318         * WebProcess/cocoa/WebProcessCocoa.mm:
1319         (WebKit::WebProcess::platformInitializeWebProcess):
1320
1321 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
1322
1323         [CMake] [GTK] Organize and clean up unused CMake variables
1324         https://bugs.webkit.org/show_bug.cgi?id=144364
1325
1326         Reviewed by Gyuyoung Kim.
1327
1328         * PlatformGTK.cmake: Add variables specific to this project.
1329         * webkit2gtk-web-extension.pc.in: Hardcode the GTK+ API version. It rarely changes.
1330         * webkit2gtk.pc.in: Ditto.
1331
1332 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1333
1334         REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
1335         https://bugs.webkit.org/show_bug.cgi?id=144388
1336
1337         Reviewed by Brady Eidson.
1338
1339         Move the WebContextMenuClient::shareMenuItem() implementation to
1340         platform files, since platforms not supporting share menu item
1341         should return a null ContextMenuIem instead.
1342
1343         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1344         (WebKit::WebContextMenuClient::shareMenuItem): Deleted.
1345         * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp:
1346         (WebKit::WebContextMenuClient::shareMenuItem):
1347         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
1348         (WebKit::WebContextMenuClient::shareMenuItem):
1349         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1350         (WebKit::WebContextMenuClient::shareMenuItem):
1351
1352 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1353
1354         REGRESSION(r183467): [SOUP] isMainResource is no longer passed as resource load parameters to the network process
1355         https://bugs.webkit.org/show_bug.cgi?id=144381
1356
1357         Reviewed by Darin Adler.
1358
1359         A requester enum value is passed now as part of the
1360         ResourceRequest, but it's not encoded/decoded for soup.
1361
1362         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1363         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData): Encode requester.
1364         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData): Decode requester.
1365
1366 2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1367
1368         [SOUP] Use xattrs to get/set the creation time of disk cache files
1369         https://bugs.webkit.org/show_bug.cgi?id=144251
1370
1371         Reviewed by Martin Robinson.
1372
1373         The network process disk cache uses the creation time to compute a
1374         worth value used to determine the order in which cached resources
1375         are deleted when the cache is shrunk. In some operating systems
1376         like Linux there's no st_birthtime in struct stat, but since cache
1377         files are always created and deleted by us, we could use a custom
1378         xattr to store and retrieve the creation time of cached resources.
1379
1380         * NetworkProcess/cache/NetworkCacheFileSystemPosix.h:
1381         (WebKit::NetworkCache::fileTimes):
1382         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:
1383         (WebKit::NetworkCache::IOChannel::IOChannel):
1384
1385 2015-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
1386
1387         Network Cache: Do not create a SharedBuffer for mapped resources unless explicitly requested
1388         https://bugs.webkit.org/show_bug.cgi?id=144337
1389
1390         Reviewed by Antti Koivisto.
1391
1392         We send a buffer or a memory mapped handler to the web process
1393         depending on whether the resource body is mapped or not, but we
1394         are always creating a shared buffer even for mapped resources.
1395         Split initializeBufferFromStorageRecord() moving the mapped memory
1396         handler initialization to its own method.
1397
1398         * NetworkProcess/cache/NetworkCacheEntry.cpp:
1399         (WebKit::NetworkCache::Entry::initializeShareableResourceHandleFromStorageRecord):
1400         Initialize the mapped memory handler if the body data is mapped.
1401         (WebKit::NetworkCache::Entry::initializeBufferFromStorageRecord):
1402         Initialize the buffer by wrapping the mapped memory if the body
1403         data is mapped, or using the body data directly otherwise.
1404         (WebKit::NetworkCache::Entry::shareableResourceHandle): Call
1405         initializeShareableResourceHandleFromStorageRecord() if the
1406         handler is null.
1407         * NetworkProcess/cache/NetworkCacheEntry.h:
1408
1409 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
1410
1411         Make a non-static version of FrameView::yPositionForRootContentLayer()
1412         https://bugs.webkit.org/show_bug.cgi?id=144375
1413
1414         Reviewed by Andy Estes.
1415
1416         There were two calls to the static FrameView::yPositionForRootContentLayer()
1417         which passed in all the arguments for the same FrameView. Make a member
1418         function for convenience.
1419
1420         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1421         (WebKit::shadowLayerPositionForFrame):
1422
1423 2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>
1424
1425         [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
1426         https://bugs.webkit.org/show_bug.cgi?id=143001
1427
1428         Reviewed by Gyuyoung Kim.
1429
1430         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1431         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
1432         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1433         (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange):
1434         * WebProcess/WebCoreSupport/WebChromeClient.h:
1435         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1436         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
1437         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1438         * WebProcess/WebPage/WebPage.cpp:
1439         (WebKit::WebPage::setSize):
1440         (WebKit::WebPage::setUseFixedLayout):
1441         (WebKit::WebPage::canHandleUserEvents):
1442         * WebProcess/WebPage/WebPage.h:
1443
1444 2015-04-28  Timothy Horton  <timothy_horton@apple.com>
1445
1446         [TextIndicator] Yellow highlight takes too long to fade out on scroll
1447         https://bugs.webkit.org/show_bug.cgi?id=144358
1448         <rdar://problem/19451011>
1449
1450         Reviewed by Beth Dakin.
1451
1452         * UIProcess/API/Cocoa/WKViewPrivate.h:
1453         * UIProcess/API/mac/WKView.mm:
1454         (-[WKView renewGState]):
1455         (-[WKView viewDidMoveToWindow]):
1456         (-[WKView _dictionaryLookupPopoverWillClose:]):
1457         (-[WKView _setTextIndicator:]):
1458         (-[WKView _setTextIndicator:withLifetime:]):
1459         (-[WKView _clearTextIndicatorWithAnimation:]):
1460         (-[WKView magnifyWithEvent:]):
1461         (-[WKView smartMagnifyWithEvent:]):
1462         (-[WKView setMagnification:centeredAtPoint:]):
1463         (-[WKView setMagnification:]):
1464         (-[WKView _dismissContentRelativeChildWindows]):
1465         (-[WKView _dismissContentRelativeChildWindowsWithAnimation:]):
1466         (-[WKView _setTextIndicator:fadeOut:]): Deleted.
1467         * UIProcess/API/mac/WKViewInternal.h:
1468         * UIProcess/PageClient.h:
1469         * UIProcess/WebPageProxy.cpp:
1470         (WebKit::WebPageProxy::pageDidScroll):
1471         (WebKit::WebPageProxy::setTextIndicator):
1472         (WebKit::WebPageProxy::clearTextIndicator):
1473         * UIProcess/WebPageProxy.h:
1474         * UIProcess/WebPageProxy.messages.in:
1475         * UIProcess/ios/PageClientImplIOS.h:
1476         * UIProcess/ios/PageClientImplIOS.mm:
1477         (WebKit::PageClientImpl::setTextIndicator):
1478         (WebKit::PageClientImpl::clearTextIndicator):
1479         * UIProcess/mac/PageClientImpl.h:
1480         * UIProcess/mac/PageClientImpl.mm:
1481         (WebKit::PageClientImpl::setTextIndicator):
1482         (WebKit::PageClientImpl::clearTextIndicator):
1483         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1484         (WebKit::PageClientImpl::dismissContentRelativeChildWindows):
1485         * UIProcess/mac/WKActionMenuController.mm:
1486         (-[WKActionMenuController _defaultMenuItemsForDataDetectedText]):
1487         * UIProcess/mac/WKImmediateActionController.mm:
1488         (-[WKImmediateActionController _defaultAnimationController]):
1489         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
1490         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
1491         (-[WKImmediateActionController _animationControllerForText]):
1492         * WebProcess/WebPage/FindController.cpp:
1493         (WebKit::FindController::updateFindIndicator):
1494         Make _setTextIndicator take a reference.
1495         Add a variant of _setTextIndicator that takes a Lifetime.
1496         Make _clearTextIndicatorWithAnimation take a DismissalAnimation.
1497         Make dismissContentRelativeChildWindows take a parameter indicating
1498         whether the dismissal should include animation or not (currently
1499         only applies to TextIndicator).
1500         Don't animate when dismissal occurs because of scrolling, zooming,
1501         or other things in which the content will have changed significantly
1502         underneath the indicator and shouldn't have a slowly-fading-out yellow highlight.
1503
1504 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1505
1506         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1507         https://bugs.webkit.org/show_bug.cgi?id=144304
1508
1509         Reviewed by Geoffrey Garen.
1510
1511         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1512
1513         * Configurations/FeatureDefines.xcconfig:
1514
1515 2015-04-28  Commit Queue  <commit-queue@webkit.org>
1516
1517         Unreviewed, rolling out r183514.
1518         https://bugs.webkit.org/show_bug.cgi?id=144359
1519
1520         It broke cloop test bots (Requested by mcatanzaro on #webkit).
1521
1522         Reverted changeset:
1523
1524         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
1525         https://bugs.webkit.org/show_bug.cgi?id=144304
1526         http://trac.webkit.org/changeset/183514
1527
1528 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
1529
1530         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
1531         https://bugs.webkit.org/show_bug.cgi?id=144304
1532
1533         Reviewed by Geoffrey Garen.
1534
1535         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
1536
1537         * Configurations/FeatureDefines.xcconfig:
1538
1539 2015-04-28  Enrica Casucci  <enrica@apple.com>
1540
1541         Add support for lookup on iOS.
1542         https://bugs.webkit.org/show_bug.cgi?id=144342
1543         rdar://problem/19994090
1544
1545         Reviewed by Tim Horton.
1546
1547         * UIProcess/WebPageProxy.h:
1548         * UIProcess/ios/WKContentViewInteraction.mm:
1549         (-[WKContentView _lookup:]):
1550         (-[WKContentView canPerformAction:withSender:]):
1551         * UIProcess/ios/WebPageProxyIOS.mm:
1552         (WebKit::WebPageProxy::getLookupContextAtPoint):
1553         * WebProcess/WebPage/WebPage.h:
1554         * WebProcess/WebPage/WebPage.messages.in:
1555         * WebProcess/WebPage/ios/WebPageIOS.mm:
1556         (WebKit::WebPage::getLookupContextAtPoint):
1557
1558 2015-04-28  Brady Eidson  <beidson@apple.com>
1559
1560         Consolidate most "frame load" arguments into FrameLoadRequest.
1561         https://bugs.webkit.org/show_bug.cgi?id=144276
1562
1563         Reviewed by Alexey Proskuryakov.
1564
1565         * WebProcess/Plugins/PluginView.cpp:
1566         (WebKit::PluginView::loadURL):
1567         
1568         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1569         (WebKit::WebFrameLoaderClient::dispatchCreatePage):
1570         
1571         * WebProcess/WebPage/WebInspector.cpp:
1572         (WebKit::WebInspector::openInNewTab):
1573
1574 2015-04-28  Chris Dumez  <cdumez@apple.com>
1575
1576         [WK2][Mac] Update WebContent process' sandbox profile for AWD
1577         https://bugs.webkit.org/show_bug.cgi?id=144315
1578         <rdar://problem/20719293>
1579
1580         Reviewed by Alexey Proskuryakov.
1581
1582         Update sandbox profile for AWD similarly to what was done for iOS in
1583         r182278.
1584
1585         * WebProcess/com.apple.WebProcess.sb.in:
1586
1587 2015-04-28  Antti Koivisto  <antti@apple.com>
1588
1589         Network Cache: Disk cache getting filled by YouTube video data
1590         https://bugs.webkit.org/show_bug.cgi?id=144259
1591
1592         Reviewed by Darin Adler.
1593
1594         MSE media is loaded via XHR and tends to eventually fill the cache.
1595
1596         YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
1597         We can reduce disk writes and keep more useful resources around by not caching them
1598
1599         * NetworkProcess/NetworkResourceLoader.cpp:
1600         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1601         (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
1602         * NetworkProcess/cache/NetworkCache.cpp:
1603         (WebKit::NetworkCache::makeStoreDecision):
1604
1605             Don't store if the requester is XHR and response has video or audio content type.
1606
1607         * NetworkProcess/cache/NetworkCache.h:
1608         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
1609         (WebKit::NetworkCache::storeDecisionToDiagnosticKey):
1610         * Shared/Network/NetworkResourceLoadParameters.cpp:
1611         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
1612         (WebKit::NetworkResourceLoadParameters::encode):
1613         (WebKit::NetworkResourceLoadParameters::decode):
1614         * Shared/Network/NetworkResourceLoadParameters.h:
1615
1616             The requester type is now part of the ResourceRequest, no need for separate parameter.
1617
1618         * Shared/mac/WebCoreArgumentCodersMac.mm:
1619         (IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
1620         (IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
1621         * WebProcess/Network/WebResourceLoadScheduler.cpp:
1622         (WebKit::WebResourceLoadScheduler::scheduleLoad):
1623
1624 2015-04-28  Zan Dobersek  <zdobersek@igalia.com>
1625
1626         [WK2] API::UserContentURLPattern creation functions should return Ref<>
1627         https://bugs.webkit.org/show_bug.cgi?id=144225
1628
1629         Reviewed by Darin Adler.
1630
1631         Have API::UserContentURLPattern creation functions return Ref<>.
1632         Call-sites are also updated, using and operating on the returned Ref<>
1633         object where possible.
1634
1635         * Shared/API/APIUserContentURLPattern.h:
1636         (API::UserContentURLPattern::create):
1637         * Shared/API/c/WKUserContentURLPattern.cpp:
1638         (WKUserContentURLPatternCreate):
1639
1640 2015-04-28  Zan Dobersek  <zdobersek@igalia.com>
1641
1642         [WK2] API::URLRequest, API::URLResponse creation functions should return Ref<>
1643         https://bugs.webkit.org/show_bug.cgi?id=144224
1644
1645         Reviewed by Darin Adler.
1646
1647         Have API::URLRequest and API::URLResponse creation functions return Ref<>.
1648         The call-sites are also updated, using and operating on the returned Ref<> object
1649         where possible.
1650
1651         * Shared/API/APIURLRequest.h:
1652         (API::URLRequest::create):
1653         * Shared/API/APIURLResponse.h:
1654         (API::URLResponse::create):
1655         * Shared/API/c/WKURLRequest.cpp:
1656         (WKURLRequestCreateWithWKURL):
1657         * Shared/API/c/mac/WKURLRequestNS.mm:
1658         (WKURLRequestCreateWithNSURLRequest):
1659         * Shared/API/c/mac/WKURLResponseNS.mm:
1660         (WKURLResponseCreateWithNSURLResponse):
1661         * UIProcess/API/C/WKContext.cpp:
1662         (WKContextSetDownloadClient):
1663         * UIProcess/API/C/WKDownload.cpp:
1664         (WKDownloadCopyRequest):
1665         * UIProcess/API/C/WKNavigationDataRef.cpp:
1666         (WKNavigationDataCopyOriginalRequest):
1667         * UIProcess/API/C/WKPage.cpp:
1668         (WKPageSetPagePolicyClient):
1669         (WKPageSetPageUIClient):
1670         * UIProcess/Cocoa/NavigationState.mm:
1671         (WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
1672         * UIProcess/Network/CustomProtocols/soup/WebSoupCustomProtocolRequestManagerClient.cpp:
1673         (WebKit::WebSoupCustomProtocolRequestManagerClient::startLoading):
1674         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1675         (willSendRequestForFrame):
1676         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
1677         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
1678         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
1679         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
1680
1681 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1682
1683         [WK2] API::Point, API::Size, API::Rect creation functions should return Ref<>
1684         https://bugs.webkit.org/show_bug.cgi?id=144223
1685
1686         Reviewed by Darin Adler.
1687
1688         Have API::Point, API::Size and API::Rect creation functions return Ref<>.
1689         Call-sites are also updated, using and operating on the returned Ref<> object
1690         where possible.
1691
1692         * Shared/API/APIGeometry.h:
1693         (API::Size::create):
1694         (API::Point::create):
1695         (API::Rect::create):
1696         * Shared/API/c/WKGeometry.cpp:
1697         (WKPointCreate):
1698         (WKSizeCreate):
1699         (WKRectCreate):
1700
1701 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1702
1703         [WK2] API::Error creation functions should return Ref<>
1704         https://bugs.webkit.org/show_bug.cgi?id=144222
1705
1706         Reviewed by Darin Adler.
1707
1708         Have API::Error creation functions return Ref<>.
1709         The call-sites are also updated, using and operating
1710         on the returned Ref<> object where possible.
1711
1712         * Shared/API/APIError.h:
1713         (API::Error::create):
1714         * Shared/API/c/cf/WKErrorCF.cpp:
1715         (WKErrorCreateWithCFError):
1716         * UIProcess/API/C/WKOriginDataManager.cpp:
1717         (WKOriginDataManagerDeleteEntriesForOrigin):
1718         (WKOriginDataManagerDeleteEntriesModifiedBetweenDates):
1719         (WKOriginDataManagerDeleteAllEntries):
1720         * UIProcess/API/C/WKPage.cpp:
1721         (toGenericCallbackFunction):
1722         (WKPageForceRepaint):
1723         (WKPageValidateCommand):
1724         (WKPageComputePagesForPrinting):
1725         * UIProcess/API/C/WKPluginSiteDataManager.cpp:
1726         (WKPluginSiteDataManagerClearSiteData):
1727         (WKPluginSiteDataManagerClearAllSiteData):
1728         * UIProcess/GenericCallback.h:
1729         (WebKit::toGenericCallbackFunction):
1730         * UIProcess/WebPageProxy.cpp:
1731         (WebKit::WebPageProxy::printFinishedCallback):
1732
1733 2015-04-27  Sungmann Cho  <sungmann.cho@navercorp.com>
1734
1735         [GTK] Remove unnecessary semicolon from WebKitNotificationProvider.h.
1736         https://bugs.webkit.org/show_bug.cgi?id=144312
1737
1738         Reviewed by Martin Robinson.
1739
1740         No new tests, no behavior change.
1741
1742         * UIProcess/API/gtk/WebKitNotificationProvider.h:
1743
1744 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
1745
1746         PDF action menu fixes
1747         https://bugs.webkit.org/show_bug.cgi?id=144299
1748         <rdar://problem/20702215>
1749
1750         Reviewed by Tim Horton.
1751
1752         Make two corrections to how PDFs are handled:
1753         1. When calculating the view rect for the user's selection, make sure
1754         that we get coordinates for the correct PDF page. The existing code assumed
1755         that the current PDFLayerControler's current page was correct, but this will
1756         not be true if you zoom the PDF out so that several pages are displayed at
1757         once. Each selection keeps track of the page it is referenced against.
1758         
1759         2. Revise the offsets calculated for the TextIndicator to take into account
1760         the font descender (as well as the ascender), and to adjust by the scaled
1761         amount of margin around the selected text.
1762
1763         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1764         (WebKit::PDFPlugin::viewRectForSelection): Use correct page for calculating
1765         the coordinates.
1766         * WebProcess/WebPage/mac/WebPageMac.mm:
1767         (WebKit::WebPage::dictionaryPopupInfoForSelectionInPDFPlugin): Include font 'descendant'
1768         and (scaled) margin when adjusting the hit target for the TextIndicator to draw.
1769
1770 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
1771
1772         Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
1773         https://bugs.webkit.org/show_bug.cgi?id=144193
1774
1775         Reviewed by Darin Adler.
1776
1777         * CMakeLists.txt:
1778
1779 2015-04-24  Jon Honeycutt  <jhoneycutt@apple.com>
1780
1781         Context menus are not reshown after an orientation change
1782
1783         <https://bugs.webkit.org/show_bug.cgi?id=144143>
1784         <rdar://problem/20679931>
1785
1786         Reviewed by Darin Adler.
1787
1788         * UIProcess/ios/WKActionSheet.mm:
1789         (-[WKActionSheet updateSheetPosition]):
1790         Return early if we're still in a rotation, not if the rotation is
1791         complete.
1792
1793 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1794
1795         [WK2] API::Dictionary creation functions should return Ref<>
1796         https://bugs.webkit.org/show_bug.cgi?id=144221
1797
1798         Reviewed by Darin Adler.
1799
1800         Have API::Dictionary creation functions return Ref<>.
1801         The call-sites are also updated, using and operating
1802         on the returned Ref<> object where possible.
1803
1804         * Shared/API/APIDictionary.cpp:
1805         (API::Dictionary::create):
1806         * Shared/API/APIDictionary.h:
1807         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
1808         (createEncodedObject):
1809         * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
1810         (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
1811         * Shared/API/c/WKDictionary.cpp:
1812         (WKDictionaryCreate):
1813         * Shared/API/c/WKMutableDictionary.cpp:
1814         (WKMutableDictionaryCreate):
1815         * Shared/Plugins/Netscape/PluginInformation.cpp:
1816         (WebKit::createPluginInformationDictionary):
1817         * Shared/Plugins/Netscape/PluginInformation.h:
1818         * UIProcess/API/C/WKPage.cpp:
1819         (WKPageSetPageUIClient):
1820         * UIProcess/API/gtk/WebKitWebContext.cpp:
1821         (webkit_web_context_prefetch_dns):
1822         * UIProcess/API/gtk/WebKitWebView.cpp:
1823         (webkit_web_view_get_snapshot):
1824         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
1825         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
1826         * UIProcess/Plugins/PlugInAutoStartProvider.h:
1827         * UIProcess/StatisticsRequest.cpp:
1828         (WebKit::createDictionaryFromHashMap):
1829         (WebKit::StatisticsRequest::completedRequest):
1830         * UIProcess/WebFormClient.cpp:
1831         (WebKit::WebFormClient::willSubmitForm):
1832         * UIProcess/WebPageProxy.cpp:
1833         (WebKit::WebPageProxy::didFailToInitializePlugin):
1834         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1835         (didInitiateLoadForResource):
1836         (willSendRequestForFrame):
1837         (didReceiveResponseForResource):
1838         (didReceiveContentLengthForResource):
1839         (didFinishLoadForResource):
1840         (didFailLoadForResource):
1841         (webkitWebPageDidReceiveMessage):
1842         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1843         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
1844         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
1845
1846 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1847
1848         [WK2] API::Data creation functions should return Ref<>
1849         https://bugs.webkit.org/show_bug.cgi?id=144220
1850
1851         Reviewed by Darin Adler.
1852
1853         Have API::Data creation functions return Ref<>.
1854         The call-sites are also updated, using and operating
1855         on the returned Ref<> object where possible.
1856
1857         * Shared/API/APIData.h:
1858         (API::Data::createWithoutCopying):
1859         (API::Data::create):
1860         * Shared/API/c/WKData.cpp:
1861         (WKDataCreate):
1862         * Shared/API/c/mac/WKWebArchive.cpp:
1863         (WKWebArchiveCopyData):
1864         * Shared/API/c/mac/WKWebArchiveResource.cpp:
1865         (WKWebArchiveResourceCopyData):
1866         * Shared/APIWebArchive.h:
1867         * Shared/APIWebArchive.mm:
1868         (API::WebArchive::data):
1869         * Shared/APIWebArchiveResource.h:
1870         * Shared/APIWebArchiveResource.mm:
1871         (API::WebArchiveResource::data):
1872         * Shared/Cocoa/APIDataCocoa.mm:
1873         (API::Data::createWithoutCopying):
1874         * UIProcess/API/Cocoa/WKWebView.mm:
1875         (-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]):
1876         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
1877         (webkitURISchemeRequestReadCallback):
1878         * UIProcess/API/gtk/WebKitWebView.cpp:
1879         (webkit_web_view_load_bytes):
1880         * UIProcess/Downloads/DownloadProxy.cpp:
1881         (WebKit::createData):
1882         * UIProcess/WebPageProxy.cpp:
1883         (WebKit::WebPageProxy::dataCallback):
1884         (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
1885
1886 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1887
1888         [WK2] API::URL creation functions should return Ref<>
1889         https://bugs.webkit.org/show_bug.cgi?id=144219
1890
1891         Reviewed by Darin Adler.
1892
1893         Have API::URL creation functions return Ref<>.
1894         The call-sites are also updated, using and operating in the
1895         returned Ref<> object, where possible.
1896
1897         * Shared/API/APIURL.h:
1898         (API::URL::create):
1899         * Shared/API/c/WKSharedAPICast.h:
1900         (WebKit::toCopiedURLAPI):
1901         * Shared/API/c/WKURL.cpp:
1902         (WKURLCreateWithUTF8CString):
1903         (WKURLCreateWithBaseURL):
1904         * UIProcess/API/gtk/WebKitWebResource.cpp:
1905         (webkit_web_resource_get_data):
1906         * UIProcess/WebIconDatabase.cpp:
1907         (WebKit::WebIconDatabase::didChangeIconForPageURL):
1908         (WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):
1909         * WebProcess/WebPage/WebPage.cpp:
1910         (WebKit::WebPage::userAgent):
1911
1912 2015-04-27  Zan Dobersek  <zdobersek@igalia.com>
1913
1914         [WK2] API::String creation functions should return Ref<>
1915         https://bugs.webkit.org/show_bug.cgi?id=144218
1916
1917         Reviewed by Darin Adler.
1918
1919         Have API::String creation functions return Ref<>.
1920         The call-sites are also updated, using and operating on the returned
1921         Ref<> object, where possible.
1922
1923         * Shared/API/APIString.h:
1924         * Shared/API/c/WKPluginInformation.cpp:
1925         (WKPluginInformationBundleIdentifierKey):
1926         (WKPluginInformationBundleVersionKey):
1927         (WKPluginInformationBundleShortVersionKey):
1928         (WKPluginInformationPathKey):
1929         (WKPluginInformationDisplayNameKey):
1930         (WKPluginInformationDefaultLoadPolicyKey):
1931         (WKPluginInformationUpdatePastLastBlockedVersionIsKnownAvailableKey):
1932         (WKPluginInformationHasSandboxProfileKey):
1933         (WKPluginInformationFrameURLKey):
1934         (WKPluginInformationMIMETypeKey):
1935         (WKPluginInformationPageURLKey):
1936         (WKPluginInformationPluginspageAttributeURLKey):
1937         (WKPluginInformationPluginURLKey):
1938         (WKPlugInInformationReplacementObscuredKey):
1939         * Shared/API/c/WKSharedAPICast.h:
1940         (WebKit::ProxyingRefPtr::ProxyingRefPtr):
1941         (WebKit::toCopiedAPI):
1942         * Shared/API/c/WKString.cpp:
1943         (WKStringCreateWithUTF8CString):
1944         (WKStringCreateWithJSString):
1945         * UIProcess/API/C/WKDatabaseManager.cpp:
1946         (WKDatabaseManagerGetOriginKey):
1947         (WKDatabaseManagerGetOriginQuotaKey):
1948         (WKDatabaseManagerGetOriginUsageKey):
1949         (WKDatabaseManagerGetDatabaseDetailsKey):
1950         (WKDatabaseManagerGetDatabaseDetailsNameKey):
1951         (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
1952         (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
1953         (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
1954         (WKDatabaseManagerGetDatabaseDetailsCreationTimeKey):
1955         (WKDatabaseManagerGetDatabaseDetailsModificationTimeKey):
1956         * UIProcess/API/C/WKKeyValueStorageManager.cpp:
1957         (WKKeyValueStorageManagerGetOriginKey):
1958         (WKKeyValueStorageManagerGetCreationTimeKey):
1959         (WKKeyValueStorageManagerGetModificationTimeKey):
1960         * UIProcess/API/C/WKPage.cpp:
1961         (WKPageGetSessionHistoryURLValueType):
1962         (WKPageGetSessionBackForwardListItemValueType):
1963         (toGenericCallbackFunction):
1964         (WKPageValidateCommand):
1965         * UIProcess/WebProcessPool.cpp:
1966         (WebKit::WebProcessPool::didReceiveInvalidMessage):
1967
1968 2015-04-27  Brady Eidson  <beidson@apple.com>
1969
1970         Make 'enum NavigationType' be an enum class
1971         https://bugs.webkit.org/show_bug.cgi?id=144270
1972
1973         Reviewed by Alex Christensen.
1974
1975         * Shared/API/c/WKSharedAPICast.h:
1976         (WebKit::toAPI):
1977         
1978         * Shared/NavigationActionData.cpp:
1979         (WebKit::NavigationActionData::NavigationActionData):
1980         
1981         * UIProcess/API/Cocoa/WKNavigationAction.mm:
1982         (toWKNavigationType):
1983         
1984         * UIProcess/API/gtk/WebKitPrivate.cpp:
1985         (toWebKitNavigationType):
1986         
1987         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1988         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1989         
1990         * WebProcess/WebPage/WebInspector.cpp:
1991         (WebKit::WebInspector::openInNewTab):
1992
1993 2015-04-27  Brent Fulgham  <bfulgham@apple.com>
1994
1995         REGRESSION(r182879): Images and video can no longer be downloaded
1996         https://bugs.webkit.org/show_bug.cgi?id=144267
1997         <rdar://problem/20702844>
1998
1999         Reviewed by Simon Fraser.
2000
2001         * UIProcess/mac/WKActionMenuController.mm:
2002         (-[WKActionMenuController _createActionMenuItemForTag:]): Check for
2003         "!WebCore::protocolIs(..., "file")" for image and media downloads.
2004
2005 2015-04-27  Csaba Osztrogonác  <ossy@webkit.org>
2006
2007         [EFL] TestWebKitAPI's forwarding header generator should depend on WebKit2's generator
2008         https://bugs.webkit.org/show_bug.cgi?id=143874
2009
2010         Reviewed by Gyuyoung Kim.
2011
2012         * PlatformEfl.cmake: Rename the generator to have consistent name with other generators.
2013         * Scripts/generate-forwarding-headers.pl: Removed the unnecessary multiple include-path support.
2014
2015 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2016
2017         [SOUP] Add initial implementation of NetworkProcess disk cache
2018         https://bugs.webkit.org/show_bug.cgi?id=143872
2019
2020         Reviewed by Martin Robinson.
2021
2022         Implement the platform specific parts of the disk cache
2023         implementation for Soup. It's mainly NetworkCache::Data and
2024         NetworkCache::IOChannel.
2025
2026         * CMakeLists.txt:
2027         * NetworkProcess/cache/NetworkCache.cpp:
2028         (WebKit::NetworkCache::dumpFileChanged):
2029         (WebKit::NetworkCache::Cache::initialize):
2030         * NetworkProcess/cache/NetworkCacheBlobStorage.cpp:
2031         * NetworkProcess/cache/NetworkCacheData.h:
2032         (WebKit::NetworkCache::Data::soupBuffer):
2033         * NetworkProcess/cache/NetworkCacheDataSoup.cpp: Added.
2034         (WebKit::NetworkCache::Data::Data):
2035         (WebKit::NetworkCache::Data::empty):
2036         (WebKit::NetworkCache::Data::data):
2037         (WebKit::NetworkCache::Data::isNull):
2038         (WebKit::NetworkCache::Data::apply):
2039         (WebKit::NetworkCache::Data::subrange):
2040         (WebKit::NetworkCache::concatenate):
2041         (WebKit::NetworkCache::MapWrapper::~MapWrapper):
2042         (WebKit::NetworkCache::deleteMapWrapper):
2043         (WebKit::NetworkCache::mapFile):
2044         (WebKit::NetworkCache::Data::adoptMap):
2045         (WebKit::NetworkCache::computeSHA1):
2046         (WebKit::NetworkCache::bytesEqual):
2047         * NetworkProcess/cache/NetworkCacheIOChannel.h:
2048         * NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp: Added.
2049         (WebKit::NetworkCache::IOChannel::IOChannel):
2050         (WebKit::NetworkCache::IOChannel::open):
2051         (WebKit::NetworkCache::fillDataFromReadBuffer):
2052         (WebKit::NetworkCache::inputStreamReadReadyCallback):
2053         (WebKit::NetworkCache::IOChannel::read):
2054         (WebKit::NetworkCache::IOChannel::readSync):
2055         (WebKit::NetworkCache::outputStreamWriteReadyCallback):
2056         (WebKit::NetworkCache::IOChannel::write):
2057         * NetworkProcess/cache/NetworkCacheStorageSoup.cpp: Removed.
2058         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp:
2059         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2060         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2061         (WebKit::NetworkProcess::platformSetCacheModel):
2062         (WebKit::NetworkProcess::clearDiskCache):
2063         * PlatformGTK.cmake:
2064
2065 2015-04-26  Yusuke Suzuki  <utatane.tea@gmail.com>
2066
2067         [ES6] Implement ES6 template literals
2068         https://bugs.webkit.org/show_bug.cgi?id=142691
2069
2070         Reviewed by Darin Adler.
2071
2072         Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
2073
2074         * Configurations/FeatureDefines.xcconfig:
2075
2076 2015-04-26  Sungmann Cho  <sungmann.cho@navercorp.com>
2077
2078         Remove PluginView::renderer().
2079         https://bugs.webkit.org/show_bug.cgi?id=144216
2080
2081         Reviewed by Darin Adler.
2082
2083         Nobody should have to know about the plug-in view's renderer except the plug-in view itself.
2084
2085         No new tests, no behavior change.
2086
2087         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2088         (WebKit::PDFPlugin::convertFromScrollbarToContainingView):
2089         (WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
2090         * WebProcess/Plugins/PluginView.cpp:
2091         (WebKit::PluginView::renderer): Deleted.
2092         * WebProcess/Plugins/PluginView.h:
2093
2094 2015-04-26  Doug Russell  <d_russell@apple.com>
2095
2096         AX: richer text change notifications (142719)
2097         https://bugs.webkit.org/show_bug.cgi?id=142719
2098
2099         Reviewed by Darin Adler.
2100
2101         Richer accessibility value change notifications. Introduce AXTextEditType,
2102         postTextStateChangeNotification and postTextReplacementNotification to give assistive
2103         tech apps more reliable context for responding to changes in web content. Also implement
2104         a mechanism to post value changes in password form fields in coalesced ticks to thwart
2105         analyzing the cadence of changes.
2106
2107         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
2108         and an overload of postTextReplacementNotification to give assistive tech apps more
2109         reliable context for responding to changes in web content selection. Also block posting
2110         selection changes on password fields.
2111
2112         * UIProcess/WebEditCommandProxy.cpp:
2113         (WebKit::WebEditCommandProxy::nameForEditAction):
2114
2115 2015-04-26  Dan Bernstein  <mitz@apple.com>
2116
2117         <rdar://problem/20702337> REGRESSION (r182952): Plug-in service fails to load because it links against WebKit2.framework
2118         https://bugs.webkit.org/show_bug.cgi?id=144233
2119
2120         Reviewed by Simon Fraser.
2121
2122         Have the plug-in service link against WebKit.framework rather than WebKit2.framework.
2123
2124         * Configurations/PluginService.32.xcconfig: Removed linker flags for linking against WebKit2
2125         and Foundation from the definition of OTHER_LDFLAGS. Since linking is no longer conditional,
2126         we can just do it in the target’s Link Binary With Libraries build phase.
2127
2128         * Configurations/PluginService.64.xcconfig: Ditto.
2129
2130         * WebKit2.xcodeproj/project.pbxproj: Have Foundation and WebKit listed in the services’ Link
2131         Binariy With Libraries build phases (one service already had WebKit).
2132
2133 2015-04-26  Dan Bernstein  <mitz@apple.com>
2134
2135         Fixed the build.
2136
2137         * UIProcess/ios/forms/WKFileUploadPanel.mm:
2138         (-[WKFileUploadPanel _showDocumentPickerMenu]): Suppressed deprecation warnings around use
2139         of -[UIDocumentMenuViewController _setIgnoreApplicationEntitlementForImport:].
2140
2141 2015-04-25  Tim Horton  <timothy_horton@apple.com>
2142
2143         Further update gesture swipe shadow style
2144         https://bugs.webkit.org/show_bug.cgi?id=144215
2145         <rdar://problem/19295843>
2146
2147         Reviewed by Dan Bernstein.
2148
2149         * Resources/mac/SwipeShadow.png: Removed.
2150         * Resources/mac/SwipeShadow@2x.png: Removed.
2151         * UIProcess/mac/ViewGestureController.h:
2152         * UIProcess/mac/ViewGestureControllerMac.mm:
2153         (WebKit::ViewGestureController::beginSwipeGesture):
2154         * WebKit2.xcodeproj/project.pbxproj:
2155         Use a CAGradientLayer instead of PNGs for the swipe shadow.
2156
2157 2015-04-25  Dan Bernstein  <mitz@apple.com>
2158
2159         WebKit2 part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
2160         https://bugs.webkit.org/show_bug.cgi?id=144201
2161
2162         Reviewed by Darin Adler.
2163
2164         Instead of TBD, we use the high version number to which it corresponds in CFAvailability.h,
2165         9876.5.
2166
2167         * mac/MigrateHeadersFromWebKitLegacy.make: To detect not-yet-available declarations in
2168         headers, look for "9876_5" rather than "TBA".
2169
2170 2015-04-24  Timothy Hatcher  <timothy@apple.com>
2171
2172         Web Inspector: Remove native window dock controls
2173         https://bugs.webkit.org/show_bug.cgi?id=144184
2174
2175         Reviewed by Joseph Pecoraro.
2176
2177         * Resources/DockBottom.pdf: Removed.
2178         * Resources/DockBottomLegacy.pdf: Removed.
2179         * Resources/DockRight.pdf: Removed.
2180         * Resources/DockRightLegacy.pdf: Removed.
2181         * UIProcess/WebInspectorProxy.h:
2182         * UIProcess/mac/WebInspectorProxyMac.mm:
2183         (WebKit::WebInspectorProxy::createInspectorWindow):
2184         (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
2185         * WebKit2.xcodeproj/project.pbxproj:
2186
2187 2015-04-25  Martin Robinson  <mrobinson@igalia.com>
2188
2189         Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
2190         https://bugs.webkit.org/show_bug.cgi?id=144182
2191
2192         Reviewed by Simon Fraser.
2193
2194         * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2195
2196 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
2197
2198         Have the web inspector report accurate memory use for layers with detached backing store
2199         https://bugs.webkit.org/show_bug.cgi?id=144179
2200
2201         Reviewed by Dean Jackson.
2202         
2203         Remote layers can make their backing store volatile, so the backing only contributes
2204         to reported memory use when attached.
2205
2206         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2207
2208 2015-04-24  Andreas Kling  <akling@apple.com>
2209
2210         theverge.com burning 100% CPU on iPad (due to window.screenX/Y)
2211         <https://webkit.org/b/144175>
2212         <rdar://problem/20694585>
2213
2214         Reviewed by Anders Carlsson.
2215
2216         Return an empty window rect on iOS WK2 builds. This avoids sending a synchronous
2217         IPC request to the UI process that would give the same result, but spend way
2218         more time and CPU cycles to do so.
2219
2220         With this change, theverge.com CPU usage goes from 100% to ~20% when idle.
2221
2222         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2223         (WebKit::WebChromeClient::windowRect):
2224
2225 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
2226
2227         TextIndicator for embedded PDFs is slightly offset
2228         https://bugs.webkit.org/show_bug.cgi?id=144172
2229         <rdar://problem/20691304>
2230
2231         Reviewed by Tim Horton.
2232
2233         When I converted the existing DOM Range logic to work with PDFSelections, I omitted the
2234         step where the font ascent was used to adjust the origin used for the TextIndicator. This
2235         patch determines the correct ascent for the range of characters in the selection, and
2236         adjusts the offset by the difference between the ascent and the height of the selection rect.
2237         
2238         Also, since the PDFSelection only supplies the bounding rect for the selection, I calculate
2239         an equivalent text bounding box by insetting the rect by half the size of the ascent.
2240
2241         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2242         (WebKit::PDFPlugin::scaleFactor): Add accessor for PDF scale factor.
2243         * WebProcess/Plugins/PDF/PDFPlugin.h:
2244         * WebProcess/WebPage/mac/WebPageMac.mm:
2245         (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Adjusted to take the
2246         font ascent and scale factor into account.
2247
2248 2015-04-24  David Kilzer  <ddkilzer@apple.com>
2249
2250         REGRESSION (r183293): Fix iOS EWS build by adding SPI declaration for +[UIPeripheralHost visiblePeripheralFrame]
2251
2252         Fixes the following build failures:
2253
2254             WebKit2/UIProcess/ios/WKPDFView.mm:740:45: error: class method '+visiblePeripheralFrame' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
2255                 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
2256                                                         ^~~~~~~~~~~~~~~~~~~~~~
2257             WebKit2/UIProcess/ios/WKPDFView.mm:740:12: error: no viable conversion from 'id' to 'CGRect'
2258                 CGRect keyboardRect = [UIPeripheralHost visiblePeripheralFrame];
2259                        ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2260
2261         * Platform/spi/ios/UIKitSPI.h:
2262         (+[UIPeripheralHost visiblePeripheralFrame]): Add declaration.
2263
2264 2015-04-24  Anders Carlsson  <andersca@apple.com>
2265
2266         Change _WKWebsiteDataStore to hold on to an internal WKWebsiteDataStore
2267         https://bugs.webkit.org/show_bug.cgi?id=144171
2268
2269         Reviewed by Tim Horton.
2270
2271         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2272         (-[WKWebViewConfiguration _websiteDataStore]):
2273         (-[WKWebViewConfiguration _setWebsiteDataStore:]):
2274         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2275         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2276         (-[_WKWebsiteDataStore initWithDataStore:]):
2277         (+[_WKWebsiteDataStore defaultDataStore]):
2278         (+[_WKWebsiteDataStore nonPersistentDataStore]):
2279         (-[_WKWebsiteDataStore isNonPersistent]):
2280         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2281         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2282         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2283         * UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h.
2284         * WebKit2.xcodeproj/project.pbxproj:
2285
2286 2015-04-24  Tim Horton  <timothy_horton@apple.com>
2287
2288         WKPDFView does not support password-protected PDFs
2289         https://bugs.webkit.org/show_bug.cgi?id=144162
2290         <rdar://problem/18411512>
2291
2292         Reviewed by Andy Estes.
2293
2294         * Platform/spi/ios/UIKitSPI.h:
2295         Add some SPI.
2296
2297         * UIProcess/ios/WKPDFView.h:
2298         * UIProcess/ios/WKPDFView.mm:
2299         (-[WKPDFView _didLoadPDFDocument]):
2300         (-[WKPDFView web_setContentProviderData:suggestedFilename:]):
2301         Move creation of the UIPDFDocument (only possible if the CGPDFDocument is unlocked)
2302         and initial setup of the page views out into _didLoadPDFDocument.
2303
2304         If the CGPDFDocument is locked, we'll show some UI to unlock it; otherwise
2305         we'll continue on to _didLoadPDFDocument as previously.
2306
2307         (-[WKPDFView web_setMinimumSize:]):
2308         Resize the password UI instead of the PDF pages if we have it.
2309
2310         (-[WKPDFView _computePageAndDocumentFrames]):
2311         Don't bother doing any work revalidating PDF pages if the document is locked.
2312
2313         (-[WKPDFView _updatePasswordEntryField]):
2314         Make sure that the UIDocumentPassword view is always the size of the scrollview.
2315         This takes care of rotation.
2316
2317         (-[WKPDFView _keyboardDidShow:]):
2318         Make sure that we scroll the password field around, if necessary, to keep it
2319         on screen when editing begins.
2320
2321         (-[WKPDFView _showPasswordEntryField]):
2322         (-[WKPDFView _hidePasswordEntryField]):
2323         Adjust the background color (to match the UIDocumentPasswordView) and disable zooming
2324         while it's up. The UIDocumentPassword view is installed into the scroll view
2325         to match UIWebView behavior.
2326
2327         (-[WKPDFView userDidEnterPassword:forPasswordView:]):
2328         (-[WKPDFView didBeginEditingPassword:inView:]):
2329         (-[WKPDFView didEndEditingPassword:inView:]):
2330         (-[WKPDFView _didFailToUnlock]):
2331         Pop up a dialog informing the user that they entered the wrong password.
2332
2333         (-[WKPDFView _tryToUnlockWithPassword:]):
2334         Try to unlock the document. If it succeeds, hide the unlock UI and go back to
2335         _didLoadPDFDocument.
2336
2337 2015-04-24  Commit Queue  <commit-queue@webkit.org>
2338
2339         Unreviewed, rolling out r183266.
2340         https://bugs.webkit.org/show_bug.cgi?id=144164
2341
2342         Broke 32-bit build and a test. (Requested by ap on #webkit).
2343
2344         Reverted changeset:
2345
2346         "AX: richer text change notifications (142719)"
2347         https://bugs.webkit.org/show_bug.cgi?id=142719
2348         http://trac.webkit.org/changeset/183266
2349
2350 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
2351
2352         REGRESSION: WebKit2.ActionMenusTest API test fails
2353         https://bugs.webkit.org/show_bug.cgi?id=144149
2354         <rdar://problem/20677770>
2355
2356         Reviewed by Tim Horton.
2357
2358         Tested by TestWebKitAPI 
2359
2360         The 'lookupTextAtLocation' method was not converting the NSEvent coordinates it
2361         was receiving from root view to the plugin view. Consequently, full page PDFs
2362         did hit testing correctly, but an <embed> PDF would not.
2363
2364         Since 'existingSelectionContainsPoint' is exposed as API, I also modified it to
2365         expect 'root view' coordinates and perform the requisite conversions, rather
2366         than expecting 'plugin view' coordinates.
2367
2368         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2369         (WebKit::PDFPlugin::existingSelectionContainsPoint): Expect 'root view' coordinates
2370         for the input.
2371         (WebKit::PDFPlugin::lookupTextAtLocation): Properly convert the passed 'root view'
2372         coordinates to the PDF's view coordinate space.
2373         * WebProcess/WebPage/mac/WebPageMac.mm:
2374         (WebKit::WebPage::performActionMenuHitTestAtLocation): Pass hit point using view coordinates,
2375         not content coordinates.
2376
2377 2015-04-24  Anders Carlsson  <andersca@apple.com>
2378
2379         Address a review comment from Joe Pecoraro.
2380
2381         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2382
2383 2015-04-24  Anders Carlsson  <andersca@apple.com>
2384
2385         Rename -[WKWebsiteDataStore isNonPersistent] to -[WKWebsiteDataStore isPersistent]
2386         https://bugs.webkit.org/show_bug.cgi?id=144158
2387
2388         Reviewed by Beth Dakin.
2389
2390         * UIProcess/API/APIWebsiteDataStore.cpp:
2391         (API::WebsiteDataStore::isPersistent):
2392         (API::WebsiteDataStore::isNonPersistent): Deleted.
2393         * UIProcess/API/APIWebsiteDataStore.h:
2394         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2395         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2396         (-[WKWebsiteDataStore isPersistent]):
2397         (-[WKWebsiteDataStore isNonPersistent]): Deleted.
2398         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
2399         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
2400         (-[_WKWebsiteDataStore isNonPersistent]):
2401         * UIProcess/WebsiteData/WebsiteDataStore.h:
2402
2403 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
2404
2405         Immediate action not functional for embedded PDFs
2406         https://bugs.webkit.org/show_bug.cgi?id=143952
2407         <rdar://problem/19842365>        
2408
2409         Reviewed by Tim Horton.
2410
2411         Add a new method to retrieve appropriate dictionary lookup content and update the
2412         hit test result with relevant dictionary content and the bounding rect of the
2413         selection.
2414
2415         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add stub.
2416         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: Initialize plugin type.
2417         * WebProcess/Plugins/PDF/PDFPlugin.h:
2418         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2419         (WebKit::rectInWindowSpaceForRectInLayoutSpace): New helper function to
2420         convert PDF 'in page' units to the equivalent view units.
2421         (WebKit::PDFPlugin::PDFPlugin): Initialize plugin type.
2422         (WebKit::PDFPlugin::viewRectForSelection): Query a provided PDFSelection for
2423         its bounding rect and return the result in view units.
2424         * WebProcess/Plugins/Plugin.h:
2425         * WebProcess/Plugins/PluginProxy.cpp: Initialize plugin type.
2426         * WebProcess/Plugins/PluginProxy.h: Add stub.
2427         * WebProcess/Plugins/PluginView.cpp: 
2428         (WebKit::PluginView::viewRectForSelection): Added.
2429         * WebProcess/Plugins/PluginView.h:
2430         * WebProcess/WebPage/WebPage.h:
2431         * WebProcess/WebPage/mac/WebPageMac.mm:
2432         (WebKit::WebPage::dictionaryPopupInfoForPDFSelectionInPluginView): Added.
2433         (WebKit::textIndicatorTransitionForActionMenu): Added helper function.
2434         (WebKit::WebPage::performActionMenuHitTestAtLocation): Update the hit test information
2435         with relevant dictionary lookup content, and mark the result as a text node (if
2436         appropriate).
2437
2438 2015-04-24  Jer Noble  <jer.noble@apple.com>
2439
2440         [WK2] Only issue a isPlayingAudioDidChange() notification if the audio playing state actually changed.
2441         https://bugs.webkit.org/show_bug.cgi?id=144153
2442
2443         Reviewed by Alexey Proskuryakov.
2444
2445         Check the old state vs. the new state and only issue the change notification if the IsPlayingAudio state changed.
2446
2447         * UIProcess/WebPageProxy.cpp:
2448         (WebKit::WebPageProxy::isPlayingMediaDidChange):
2449
2450 2015-04-24  Antti Koivisto  <antti@apple.com>
2451
2452         CrashTracer: [USER] com.apple.WebKit.Networking at com.apple.WebKit: WebKit::NetworkResourceLoader::~NetworkResourceLoader + 14
2453         https://bugs.webkit.org/show_bug.cgi?id=144147
2454
2455         Reviewed by Chris Dumez.
2456
2457         Storage::storeBodyAsBlob copies the std::function callback for handling mapped bodies in a thread.
2458         This is thread safe only if the function copy is thread safe. It is currently not as we are capturing
2459         RefPtr<NetworkResourceLoader> and NetworkResourceLoader doesn't use thread safe refcounting.
2460
2461         Fix by avoiding copying of the callback. Use same apporach for WriteOperation as we already use for
2462         ReadOperation: count the active operations in progress and delete WriteOperation when everything is
2463         finished. This way we don't need to copy the function out from WriteOperation.
2464
2465         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2466         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation):
2467         (WebKit::NetworkCache::Storage::WriteOperation::WriteOperation):
2468
2469             Move definition here from the header.
2470
2471         (WebKit::NetworkCache::Storage::~Storage):
2472         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2473
2474             Increment the operation count when storing a blob, call finishWriteOperation when done.
2475
2476         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2477         (WebKit::NetworkCache::Storage::finishReadOperation):
2478
2479             Count active operations instead of finished operations. This makes the code clearer.
2480
2481         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2482         (WebKit::NetworkCache::Storage::finishWriteOperation):
2483
2484             Mirror the way ReadOperations work.
2485
2486         * NetworkProcess/cache/NetworkCacheStorage.h:
2487         (WebKit::NetworkCache::Storage::ReadOperation::ReadOperation): Deleted.
2488
2489 2015-04-24  Timothy Hatcher  <timothy@apple.com>
2490
2491         REGRESSION: Web Inspector: Start Timeline Recording in Develop menu broken
2492         https://bugs.webkit.org/show_bug.cgi?id=144150
2493
2494         Reviewed by Brian Burg.
2495
2496         * WebProcess/WebPage/WebInspectorUI.cpp:
2497         (WebKit::WebInspectorUI::evaluateCommandOnLoad): Properly treat bools as literals
2498         instead of strings by not using the string version of evaluateCommandOnLoad.
2499
2500 2015-04-23  Anders Carlsson  <andersca@apple.com>
2501
2502         Add headerdocs for WKWebsiteDataRecord and WKWebsiteDataStore
2503         https://bugs.webkit.org/show_bug.cgi?id=144138
2504
2505         Reviewed by Darin Adler.
2506
2507         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2508         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2509         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
2510         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
2511         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
2512         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
2513
2514 2015-04-24  Doug Russell  <d_russell@apple.com>
2515
2516         AX: richer text change notifications (142719)
2517         https://bugs.webkit.org/show_bug.cgi?id=142719
2518
2519         Reviewed by Darin Adler.
2520
2521         Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
2522
2523         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
2524
2525         * UIProcess/WebEditCommandProxy.cpp:
2526         (WebKit::WebEditCommandProxy::nameForEditAction):
2527
2528 2015-04-24  Darin Adler  <darin@apple.com>
2529
2530         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
2531         https://bugs.webkit.org/show_bug.cgi?id=128007
2532
2533         Reviewed by Anders Carlsson.
2534
2535         * NetworkProcess/cache/NetworkCacheEncoder.h: Added an include now
2536         needed that was inherited from OwnPtr.h before.
2537
2538 2015-04-24  Antti Koivisto  <antti@apple.com>
2539
2540         Network Cache: Make path functions members
2541         https://bugs.webkit.org/show_bug.cgi?id=144146
2542
2543         Reviewed by Carlos Garcia Campos.
2544
2545         This simplifies the code.
2546
2547         * NetworkProcess/cache/NetworkCacheStorage.cpp:
2548         (WebKit::NetworkCache::Storage::partitionPathForKey):
2549         (WebKit::NetworkCache::Storage::recordPathForKey):
2550         (WebKit::NetworkCache::Storage::bodyPathForKey):
2551         (WebKit::NetworkCache::Storage::storeBodyAsBlob):
2552         (WebKit::NetworkCache::Storage::remove):
2553         (WebKit::NetworkCache::Storage::dispatchReadOperation):
2554         (WebKit::NetworkCache::Storage::finishReadOperation):
2555         (WebKit::NetworkCache::Storage::dispatchWriteOperation):
2556         (WebKit::NetworkCache::partitionPathForKey): Deleted.
2557         (WebKit::NetworkCache::recordPathForKey): Deleted.
2558         (WebKit::NetworkCache::bodyPathForKey): Deleted.
2559         * NetworkProcess/cache/NetworkCacheStorage.h:
2560
2561 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2562
2563         Unreviewed. Remove incorrect assert after r183189.
2564
2565         In this case the assert was already there, but it's incorrect
2566         because we are handling uninitialized attachments below in the
2567         same function, and also when sending messages. So, if it's ok to
2568         send uninitialized attachments, it's ok to receive them. This
2569         didn't fail before r183189, because we were only invaliding the
2570         attachments by setting the file descriptor to -1, and they were
2571         handled as null attachments. After r183189, the move operator
2572         resets the moved attachment leaving it uninitialized again.
2573
2574         * Platform/IPC/unix/ConnectionUnix.cpp:
2575         (IPC::Connection::processMessage):
2576
2577 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2578
2579         [SOUP] Use a webkit subdirectory for the disk cache
2580         https://bugs.webkit.org/show_bug.cgi?id=144048
2581
2582         Reviewed by Martin Robinson.
2583
2584         Recent versions of libsoup remove any file in cache dir not
2585         referenced by the index when the cache is loaded to workaround
2586         leaked resources when load/dump is unbalanced for whatever reason,
2587         like a crash. We currently use $XDG_CACHE_HOME/app-name as default
2588         disk cache directory, but that directory could be used by apps to
2589         cache other things, and the soup cache might end up deleting other
2590         stuff. The soup cache assumes the given directory is only for the
2591         disk cache, so we should ensure that.
2592
2593         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2594         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Append
2595         webkit to the given disk cache and clear the previous soup cache if it exists.
2596         * WebProcess/soup/WebProcessSoup.cpp:
2597         (WebKit::WebProcess::platformInitializeWebProcess): Ditto.
2598
2599 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2600
2601         Unreviewed. Remove incorrect ASSERT added in r183176.
2602
2603         We allow to encode null attachments.
2604
2605         * Platform/unix/SharedMemoryUnix.cpp:
2606         (WebKit::SharedMemory::Handle::releaseAttachment):
2607
2608 2015-04-23  Dan Bernstein  <mitz@apple.com>
2609
2610         <rdar://problem/20680694> Framework header postprocessing isn’t removing WK_DEPRECATED macros when it should.
2611
2612         Reviewed by Andy Estes.
2613
2614         * mac/postprocess-framework-headers.sh:
2615
2616 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
2617
2618         Make it possible to detach GraphicsLayerCA backing store
2619         https://bugs.webkit.org/show_bug.cgi?id=144140
2620
2621         Reviewed by Tim Horton.
2622         
2623         This changes makes it possible to denote a GraphicsLayerCA's backing store
2624         as "attached" or not. When not attached, the backing store is made volatile
2625         and can be purged. This will be used in a future patch.
2626
2627         * Shared/mac/RemoteLayerBackingStore.mm:
2628         (WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore): Whitespace.
2629         (WebKit::RemoteLayerBackingStore::display): If backingStoreWillBeDisplayed()
2630         returns true, this indicates that the backing store was brought out of the
2631         "unreachable" list, so return true even if the backing store doesn't require
2632         painting.
2633         * Shared/mac/RemoteLayerBackingStoreCollection.h: C++11 initializer, and comments.
2634         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
2635         (WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
2636         (WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed): Return true
2637         if the caller will need to submit the backing store in the current transaction.
2638         (WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable): This
2639         explicit dirtying is no longer necessary given the backingStoreWillBeDisplayed() change.
2640         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2641         (WebKit::applyPropertiesToLayer): Only set the layer's backing if we both have backing
2642         store, and it's attached.
2643         * Shared/mac/RemoteLayerTreeTransaction.h: New bit, and data member.
2644         * Shared/mac/RemoteLayerTreeTransaction.mm:
2645         (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
2646         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
2647         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
2648         (WebKit::dumpChangedLayers):
2649         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2650         (WebKit::PlatformCALayerRemote::recursiveBuildTransaction): Only call display()
2651         on the backing store if it's attached.
2652         (WebKit::PlatformCALayerRemote::setBackingStoreAttached):
2653         (WebKit::PlatformCALayerRemote::backingStoreAttached):
2654         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2655         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
2656         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2657         (WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
2658
2659 2015-04-23  Tim Horton  <timothy_horton@apple.com>
2660
2661         Quick Look preview popover is not dismissed on scroll in Mail
2662         https://bugs.webkit.org/show_bug.cgi?id=144119
2663         <rdar://problem/19752045>
2664
2665         Reviewed by Anders Carlsson.
2666
2667         * UIProcess/API/mac/WKView.mm:
2668         (-[WKView renewGState]):
2669         If we have a TextIndicator, dismiss all content relative child windows
2670         on renewGState, not just the TextIndicator itself.
2671
2672         This will fix cases like Mail, where WebKit isn't driving the scrolling,
2673         and we have no way (except renewGState) to know that scrolling is happening.
2674
2675 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
2676
2677         Changing TiledBacking velocity should schedule a tile revalidation
2678         https://bugs.webkit.org/show_bug.cgi?id=144123
2679
2680         Reviewed by Tim Horton.
2681         
2682         Drive-by fix: use the FrameView& that we have already.
2683
2684         * WebProcess/WebPage/ios/WebPageIOS.mm:
2685         (WebKit::WebPage::updateVisibleContentRects):
2686
2687 2015-04-23  Jer Noble  <jer.noble@apple.com>
2688
2689         [Mac] Disable QTKit by default on future OS X.
2690         https://bugs.webkit.org/show_bug.cgi?id=144082
2691
2692         Reviewed by Darin Adler.
2693
2694         QTKitEnabled defaults to false.
2695
2696         * Shared/WebPreferencesDefinitions.h:
2697
2698 2015-04-23  Jer Noble  <jer.noble@apple.com>
2699
2700         [WK2][Mac] Tweak the timing curve of the WebKit Fullscreen animation
2701         https://bugs.webkit.org/show_bug.cgi?id=144120
2702
2703         Reviewed by Eric Carlson.
2704
2705         Tweak the curve to ease-in faster when the fullscreen animation duration is short.
2706
2707         * UIProcess/mac/WKFullScreenWindowController.mm:
2708         (timingFunctionForDuration):
2709         (zoomAnimation):
2710         (maskAnimation):
2711         (fadeAnimation):
2712
2713 2015-04-23  Enrica Casucci  <enrica@apple.com>
2714
2715         iOS build fix after r183208.
2716
2717         Unreviewed.
2718
2719         * UIProcess/ios/WKContentViewInteraction.mm:
2720
2721 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
2722
2723         [iOS] WebKit services should inherit environment variables for home
2724         https://bugs.webkit.org/show_bug.cgi?id=144078
2725         rdar://problem/20571678
2726
2727         Reviewed by Dan Bernstein.
2728
2729         Pass current environment variables as XPC bootstrap. Also while at it, made
2730         _CFBundleSetupXPCBootstrap not soft linked.
2731
2732         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2733         (main):
2734         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2735         (WebKit::connectToService):
2736
2737 2015-04-23  Enrica Casucci  <enrica@apple.com>
2738
2739         Support share button.
2740         https://bugs.webkit.org/show_bug.cgi?id=144077
2741         rdar://problem/19772892
2742
2743         Reviewed by Darin Adler.
2744
2745         * UIProcess/ios/WKContentViewInteraction.mm:
2746         (-[WKContentView _share:]):
2747         (-[WKContentView canPerformAction:withSender:]):
2748         (-[WKContentView _define:]):
2749         (-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
2750         (-[WKContentView moveByOffset:]):
2751         (-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
2752         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
2753         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
2754         (-[WKContentView accessoryTab:]):
2755         (-[WKContentView _becomeFirstResponderWithSelectionMovingForward:completionHandler:]):
2756         (-[WKContentView executeEditCommandWithCallback:]):
2757
2758 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2759
2760         [UNIX] Do not allow copies of IPC::Attachment
2761         https://bugs.webkit.org/show_bug.cgi?id=144096
2762
2763         Reviewed by Darin Adler.
2764
2765         It ensures that the file descriptor ownership is always correctly
2766         transferred. This way we can remove the dispose() method to
2767         explicitly close the file descriptor and always close it in the
2768         Attachment destructor (unless explicitly transferred to
2769         IPC::Connection or SharedMemory). It simplifies the code and
2770         ensure we don't leak file descriptors.
2771
2772         * Platform/IPC/ArgumentDecoder.cpp:
2773         (IPC::ArgumentDecoder::~ArgumentDecoder): Remove the code to
2774         explicitly dispose attachments.
2775         (IPC::ArgumentDecoder::removeAttachment): Use WTF::move().
2776         * Platform/IPC/ArgumentEncoder.cpp:
2777         (IPC::ArgumentEncoder::~ArgumentEncoder): Remove the code to
2778         explicitly dispose attachments.
2779         (IPC::ArgumentEncoder::addAttachment): Use WTF::move().
2780         (IPC::ArgumentEncoder::releaseAttachments): Simplify by using WTF::move().
2781         * Platform/IPC/ArgumentEncoder.h:
2782         * Platform/IPC/Attachment.cpp:
2783         (IPC::Attachment::encode): Move a copy of the attachment, and
2784         reset the file descriptor, since the ownership is passed to the encoder.
2785         * Platform/IPC/Attachment.h: Make copy constructor and assignment
2786         private to not allow public copies. The only copy allowed is done
2787         by Attachment::encode(). Make m_fileDescriptor mutable so that we
2788         can reset it in Attachment::encode() after passing the ownership
2789         to the encoder.
2790         * Platform/IPC/unix/AttachmentUnix.cpp:
2791         (IPC::Attachment::~Attachment): Close the file descriptor if it
2792         hasn't been released explicitly.
2793         (IPC::Attachment::dispose): Deleted.
2794         * Platform/IPC/unix/ConnectionUnix.cpp:
2795         (IPC::Connection::processMessage): Do not use AttachmentResourceGuard.
2796         (IPC::Connection::sendOutgoingMessage): Ditto.
2797         (IPC::AttachmentResourceGuard::AttachmentResourceGuard): Deleted.
2798         (IPC::AttachmentResourceGuard::~AttachmentResourceGuard): Deleted.
2799         * Platform/unix/SharedMemoryUnix.cpp:
2800         (WebKit::SharedMemory::Handle::~Handle): Do not call clear().
2801         (WebKit::SharedMemory::Handle::clear): Reset the attachment.
2802         * UIProcess/WebInspectorProxy.cpp:
2803         (WebKit::WebInspectorProxy::createInspectorPage): Use WTF::move().
2804         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2805         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2806         Call releaseFileDescriptor() instead of fileDescritpro() since the
2807         ownership is passed to the connection.
2808
2809 2015-04-23  Alexey Proskuryakov  <ap@apple.com>
2810
2811         Build fix.
2812
2813         * WebProcess/cocoa/WebProcessCocoa.mm: Correct the case of an include file name.
2814
2815 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2816
2817         Unreviewed. Fix debug build after r183176.
2818
2819         * Platform/unix/SharedMemoryUnix.cpp:
2820         (WebKit::SharedMemory::Handle::decode):
2821         (WebKit::SharedMemory::createHandle):
2822
2823 2015-04-23  Andreas Kling  <akling@apple.com>
2824
2825         There should only be one way to get the system memory size.
2826         <https://webkit.org/b/144081>
2827
2828         Reviewed by Antti Koivisto.
2829
2830         * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
2831         (WebKit::NetworkProcess::platformSetCacheModel):
2832         (WebKit::memorySize): Deleted.
2833         * WebProcess/cocoa/WebProcessCocoa.mm:
2834         (WebKit::WebProcess::platformSetCacheModel):
2835         (WebKit::memorySize): Deleted.
2836
2837 2015-04-23  Chris Dumez  <cdumez@apple.com>
2838
2839         [WK2] WebDiagnosticLoggingClient is leaking
2840         https://bugs.webkit.org/show_bug.cgi?id=144089
2841         <rdar://problem/19706214>
2842
2843         Reviewed by Darin Adler.
2844
2845         WebDiagnosticLoggingClient is leaking. It is constructed inside WebPage
2846         constructor but there is no code destroying it.
2847
2848         This patch adds a new xxxDestroyed() virtual function to
2849         DiagnosticLoggingClient and that is overriden in
2850         WebDiagnosticLoggingClient to call "delete this". This is the same
2851         pattern as for other WK2 clients (e.g. WebFrameLoaderClient,
2852         WebProgressTrackerClient).
2853
2854         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.cpp:
2855         (WebKit::WebDiagnosticLoggingClient::mainFrameDestroyed):
2856         * WebProcess/WebCoreSupport/WebDiagnosticLoggingClient.h:
2857
2858 2015-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2859
2860         [UNIX] Simplify the file descriptor handling in SharedMemory
2861         https://bugs.webkit.org/show_bug.cgi?id=144046
2862
2863         Reviewed by Darin Adler.
2864
2865         Simplify the file descriptor handling and clarify its ownership by
2866         using IPC::Attachment in SharedMemory::Handle instead of fd and
2867         size members. SharedMemory::Handle::adoptFromAttachment() has been
2868         renamed as SharedMemory::Handle::adoptAttachment() and receives an
2869         IPC::Attachment. And SharedMemory::Handle::releaseToAttachment()
2870         has been renamed as SharedMemory::Handle::releaseAttachment().
2871
2872         * Platform/IPC/Attachment.h: Add move constructor and move assigned operator.
2873         * Platform/IPC/Connection.h:
2874         (IPC::Connection::identifierIsNull): A file descriptor is null
2875         when it's -1 no 0.
2876         * Platform/IPC/unix/AttachmentUnix.cpp:
2877         (IPC::Attachment::Attachment):
2878         (IPC::Attachment::operator=):
2879         (IPC::Attachment::dispose): Reset the file descriptor after
2880         closing it.
2881         * Platform/IPC/unix/ConnectionUnix.cpp:
2882         (IPC::Connection::processMessage): Use
2883         SharedMemory::Handle::adoptAttachment() that receives an
2884         IPC::Attachment now.
2885         (IPC::Connection::sendOutgoingMessage): Use
2886         SharedMemory::Handle::releaseAttachment().
2887         * Platform/SharedMemory.h:
2888         * Platform/unix/SharedMemoryUnix.cpp:
2889         (WebKit::SharedMemory::Handle::Handle): Remove initializers for
2890         file descriptor and size members.
2891         (WebKit::SharedMemory::Handle::clear): Dispose the attachment.
2892         (WebKit::SharedMemory::Handle::isNull): Handle is null if the
2893         attachment file descriptor is -1.
2894         (WebKit::SharedMemory::Handle::encode): Use releaseAttachment().
2895         (WebKit::SharedMemory::Handle::decode): Use adoptAttachment().
2896         (WebKit::SharedMemory::Handle::releaseAttachment): Implement it
2897         using move.
2898         (WebKit::SharedMemory::Handle::adoptAttachment): Ditto.
2899         (WebKit::SharedMemory::map): Use
2900         IPC::Attachment::releaseFileDescriptor() instead of manually
2901         changing the member.
2902         (WebKit::SharedMemory::createHandle): Initialize the handle
2903         attachment with the duplicated file descriptor and size.
2904
2905 2015-04-22  Darin Adler  <darin@apple.com>
2906
2907         Remove OwnPtr and PassOwnPtr use from WebKit/cf, WebKit/mac, and WebKit2
2908         https://bugs.webkit.org/show_bug.cgi?id=143943
2909
2910         Reviewed by Anders Carlsson.
2911
2912         * WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.h:
2913         Removed unneeded include.
2914
2915 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
2916
2917         VisibleSelection should only accept Range by reference
2918         https://bugs.webkit.org/show_bug.cgi?id=144047
2919
2920         Reviewed by Tim Horton.
2921
2922         Update all uses of VisibleSelection to pass a Range reference instead
2923         of a Range pointer.
2924
2925         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2926         (WebKit::InjectedBundleRangeHandle::renderedImage):
2927         * WebProcess/WebPage/FindController.cpp:
2928         (WebKit::FindController::getImageForFindMatch):
2929         (WebKit::FindController::selectFindMatch):
2930         * WebProcess/WebPage/WebPage.cpp:
2931         (WebKit::WebPage::insertTextAsync):
2932         (WebKit::WebPage::setCompositionAsync):
2933         * WebProcess/WebPage/mac/WebPageMac.mm:
2934         (WebKit::WebPage::insertDictatedTextAsync):
2935
2936 2015-04-22  Anders Carlsson  <andersca@apple.com>
2937
2938         Add WK_ARRAY and WK_SET annotations
2939         https://bugs.webkit.org/show_bug.cgi?id=144075
2940         rdar://problem/19417770
2941
2942         Reviewed by Dan Bernstein.
2943
2944         * Shared/API/Cocoa/WKFoundation.h:
2945         * UIProcess/API/Cocoa/WKBackForwardList.h:
2946         * UIProcess/API/Cocoa/WKUserContentController.h:
2947         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
2948         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
2949         * mac/postprocess-framework-headers.sh:
2950
2951 2015-04-22  Brent Fulgham  <bfulgham@apple.com>
2952
2953         Unreviewed build fix after r183136.
2954
2955         * WebProcess/WebPage/mac/WebPageMac.mm: Correct capitalization of
2956         'HTMLPluginImageElement.h' -> 'HTMLPlugInImageElement.h'
2957
2958 2015-04-21  Brent Fulgham  <bfulgham@apple.com>
2959
2960         Extend action menus to support PDF
2961         https://bugs.webkit.org/show_bug.cgi?id=143895
2962         <rdar://problem/19003333>
2963
2964         Reviewed by Tim Horton.
2965
2966         If the mouse pointer is over a PDF, try to provide a relevant action menu for whatever
2967         content is under the mouse. For now, we only support copying text and handling URLs.
2968
2969         If no text is selected, use the dictionary lookup service to find a semantically appropriate
2970         selection underneath the mouse. This is consistent with how normal text is treated in pure HTML
2971         views. If some text is already selected, and the mouse is over the existing selection, continue
2972         using the selected text. Otherwise, discard the old selection and select the most appropriate
2973         region under the mouse pointer.
2974
2975         * Shared/API/c/WKActionMenuTypes.h: Add PDF menu option.
2976         * Shared/WebMouseEvent.cpp: Recognize mouse force events as valid mouse events.
2977         * UIProcess/mac/WKActionMenuController.mm:
2978         (-[WKActionMenuController _defaultMenuItemsForPDF]): Add simply copy text option.
2979         (-[WKActionMenuController _defaultMenuItems]): Recognize PDFs and add relevant action
2980         menu entries.
2981         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Provide stub for new method.
2982         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Expose 'rectsForSelectionInLayerSpace',
2983         'rectsForAnnotationInLayoutSpace', 'layout', and 'currentPage'.
2984         * WebProcess/Plugins/PDF/PDFPlugin.h:
2985         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2986         (WebKit::PDFPlugin::getSelectionForWordAtPoint): Added.
2987         (WebKit::PDFPlugin::existingSelectionContainsPoint): Added.
2988         (WebKit::PDFPlugin::lookupTextAtLocation): Added.
2989         * WebProcess/Plugins/Plugin.h: Add declaration for new 'getSelectionForWordAtPoint' method.
2990         * WebProcess/Plugins/PluginProxy.h: Provide stub for new method.
2991         * WebProcess/Plugins/PluginView.cpp:
2992         (WebKit::PluginView::getSelectionForWordAtPoint): Added.
2993         (WebKit::PluginView::existingSelectionContainsPoint): Added.
2994         (WebKit::PluginView::lookupTextAtLocation): Added.
2995         * WebProcess/Plugins/PluginView.h:
2996         * WebProcess/WebPage/mac/WebPageMac.mm:
2997         (WebKit::WebPage::performActionMenuHitTestAtLocation): Update to support PDF documents and retrieve
2998         relevant content to support later action menu handling.
2999
3000 2015-04-22  Eric Carlson  <eric.carlson@apple.com>
3001
3002         Update AirPlay sandbox rules
3003         https://bugs.webkit.org/show_bug.cgi?id=144062
3004         <rdar://problem/19869448>
3005
3006         Reviewed by Alexey Proskuryakov.
3007
3008         * WebProcess/com.apple.WebProcess.sb.in: Remove obsolete rules.
3009
3010 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
3011
3012         [Mac] In nightlies and local builds, WebKit services can get terminated under memory pressure
3013         https://bugs.webkit.org/show_bug.cgi?id=144052
3014         rdar://problem/19754404
3015
3016         Reviewed by Darin Adler.
3017
3018         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
3019         (main): Make XPC transaction tracking work again after a re-exec.
3020
3021 2015-04-22  Zan Dobersek  <zdobersek@igalia.com>
3022
3023         [WK2] Have API::Array creation methods return Ref<>
3024         https://bugs.webkit.org/show_bug.cgi?id=143933
3025
3026         Reviewed by Darin Adler.
3027
3028         API::Array::create() and API::Array::createStringArray() should return Ref<> objects
3029         as the return values are never null. It's up to the caller to implicitly convert the
3030         returned objects to RefPtr<> if so required. All the call-sites have been updated to
3031         reflect that.
3032
3033         * Shared/API/APIArray.cpp:
3034         (API::Array::create):
3035         (API::Array::createStringArray):
3036         (API::Array::copy):
3037         * Shared/API/APIArray.h:
3038         * Shared/API/APIDictionary.cpp:
3039         (API::Dictionary::keys):
3040         * Shared/API/APIDictionary.h:
3041         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
3042         (ensureObjectStream):
3043         * Shared/API/c/WKArray.cpp:
3044         (WKArrayCreate):
3045         (WKArrayCreateAdoptingValues):
3046         * Shared/API/c/WKContextMenuItem.cpp:
3047         (WKContextMenuCopySubmenuItems):
3048         * Shared/API/c/WKDictionary.cpp:
3049         (WKDictionaryCopyKeys):
3050         * Shared/API/c/WKMutableArray.cpp:
3051         (WKMutableArrayCreate):
3052         * Shared/Cocoa/WKNSDictionary.mm:
3053         (-[WKNSDictionary keyEnumerator]):
3054         * Shared/SecurityOriginData.cpp:
3055         (WebKit::performAPICallbackWithSecurityOriginDataVector):
3056         * Shared/WebContextMenuItem.cpp:
3057         (WebKit::WebContextMenuItem::submenuItemsAsAPIArray):
3058         * Shared/WebContextMenuItem.h:
3059         * Shared/WebOpenPanelParameters.cpp:
3060         (WebKit::WebOpenPanelParameters::acceptMIMETypes):
3061         (WebKit::WebOpenPanelParameters::selectedFileNames):
3062         * Shared/WebOpenPanelParameters.h:
3063         * UIProcess/API/C/WKBackForwardListRef.cpp:
3064         (WKBackForwardListCopyBackListWithLimit):
3065         (WKBackForwardListCopyForwardListWithLimit):
3066         * UIProcess/API/C/WKGrammarDetail.cpp:
3067         (WKGrammarDetailCopyGuesses):
3068         * UIProcess/API/C/WKOpenPanelParameters.cpp:
3069         (WKOpenPanelParametersCopyAcceptedMIMETypes):
3070         (WKOpenPanelParametersCopySelectedFileNames):
3071         * UIProcess/API/C/WKPage.cpp:
3072         (WKPageSetPageContextMenuClient):
3073         (WKPageCopyRelatedPages):
3074         * UIProcess/API/Cocoa/WKBackForwardList.mm:
3075         (-[WKBackForwardList backList]):
3076         (-[WKBackForwardList forwardList]):
3077         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
3078         (createWKArray):
3079         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3080         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3081         * UIProcess/API/gtk/WebKitBackForwardList.cpp:
3082         (webkit_back_forward_list_get_back_list_with_limit):
3083         (webkit_back_forward_list_get_forward_list_with_limit):
3084         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
3085         (webkit_file_chooser_request_get_mime_types):
3086         (webkit_file_chooser_request_get_mime_types_filter):
3087         (webkit_file_chooser_request_select_files):
3088         * UIProcess/API/gtk/WebKitNotificationProvider.cpp:
3089         (WebKitNotificationProvider::notificationCloseCallback):
3090         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
3091         (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
3092         * UIProcess/Notifications/WebNotificationProvider.cpp:
3093         (WebKit::WebNotificationProvider::clearNotifications):
3094         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
3095         (WebKit::WebPluginSiteDataManager::didGetSitesWithData):
3096         * UIProcess/StatisticsRequest.cpp:
3097         (WebKit::StatisticsRequest::completedRequest):
3098         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
3099         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
3100         * UIProcess/WebBackForwardList.cpp:
3101         (WebKit::WebBackForwardList::backList):
3102         (WebKit::WebBackForwardList::forwardList):
3103         (WebKit::WebBackForwardList::backListAsAPIArrayWithLimit):
3104         (WebKit::WebBackForwardList::forwardListAsAPIArrayWithLimit):
3105         * UIProcess/WebBackForwardList.h:
3106         * UIProcess/WebCookieManagerProxy.cpp:
3107         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
3108         * UIProcess/WebDatabaseManagerProxy.cpp:
3109         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
3110         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
3111         * UIProcess/WebGrammarDetail.cpp:
3112         (WebKit::WebGrammarDetail::guesses):
3113         * UIProcess/WebGrammarDetail.h:
3114         * UIProcess/WebKeyValueStorageManager.cpp:
3115         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
3116         (WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
3117         * UIProcess/WebMediaCacheManagerProxy.cpp:
3118         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache):
3119         * UIProcess/WebOriginDataManagerProxy.cpp:
3120         (WebKit::WebOriginDataManagerProxy::didGetOrigins):
3121         * UIProcess/WebPageProxy.cpp:
3122         (WebKit::WebPageProxy::didFindStringMatches):
3123         * UIProcess/WebProcessPool.cpp:
3124         (WebKit::WebProcessPool::pluginInfoStoreDidLoadPlugins):
3125         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3126         (-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
3127         (-[WKFileUploadPanel presentWithParameters:resultListener:]):
3128         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
3129         (-[WKWebProcessPlugInFrame childFrames]):
3130         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
3131         (WKBundleBackForwardListItemCopyChildren):
3132         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3133         (WKBundleFrameCopyChildFrames):
3134         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3135         (WKBundlePageCopyTrackedRepaintRects):
3136         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
3137         (WebKit::InjectedBundleBackForwardListItem::children):
3138         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
3139         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
3140         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
3141         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
3142         (WebKit::InjectedBundlePageFormClient::didAssociateFormControls):
3143         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3144         (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
3145         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3146         (WebKit::findLargestFrameInFrameSet):
3147         * WebProcess/WebPage/WebFrame.cpp:
3148         (WebKit::WebFrame::childFrames):
3149         * WebProcess/WebPage/WebFrame.h:
3150         * WebProcess/WebPage/WebPage.cpp:
3151         (WebKit::WebPage::trackedRepaintRects):
3152         * WebProcess/WebPage/WebPage.h:
3153
3154 2015-04-21  Eric Carlson  <eric.carlson@apple.com>
3155
3156         [Mac] Use one playback target for all web processes
3157         https://bugs.webkit.org/show_bug.cgi?id=144009
3158
3159         Reviewed by Tim Horton.
3160
3161         Every WebPageProxy uses the WebMediaSessionManager singleton to talk to the playback target
3162         picker.
3163
3164         * UIProcess/PageClient.h:
3165         * UIProcess/WebPageProxy.cpp:
3166         (WebKit::WebPageProxy::WebPageProxy):
3167         (WebKit::WebPageProxy::resetState):
3168         (WebKit::WebPageProxy::isPlayingMediaDidChange):
3169         (WebKit::WebPageProxy::addPlaybackTargetPickerClient):
3170         (WebKit::WebPageProxy::removePlaybackTargetPickerClient):
3171         (WebKit::WebPageProxy::showPlaybackTargetPicker):
3172         (WebKit::WebPageProxy::playbackTargetPickerClientStateDidChange):
3173         (WebKit::WebPageProxy::setPlaybackTarget):
3174         (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange):
3175         (WebKit::WebPageProxy::setShouldPlayToPlaybackTarget):
3176         (WebKit::WebPageProxy::devicePickerProxy): Deleted.
3177         (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): Deleted.
3178         (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): Deleted.
3179         (WebKit::WebPageProxy::didChoosePlaybackTarget): Deleted.
3180         * UIProcess/WebPageProxy.h:
3181         (WebKit::WebPageProxy::isPlayingAudio):
3182         * UIProcess/WebPageProxy.messages.in:
3183         * UIProcess/mac/PageClientImpl.h:
3184         * UIProcess/mac/PageClientImpl.mm:
3185         (WebKit::PageClientImpl::mediaSessionManager):
3186         (WebKit::PageClientImpl::createPlaybackTargetPicker): Deleted.
3187         * UIProcess/mac/WebMediaSessionManagerMac.cpp: Added.
3188         (WebKit::WebMediaSessionManagerMac::singleton):
3189         (WebKit::WebMediaSessionManagerMac::WebMediaSessionManagerMac):
3190         (WebKit::WebMediaSessionManagerMac::~WebMediaSessionManagerMac):
3191         (WebKit::WebMediaSessionManagerMac::targetPicker):
3192         * UIProcess/mac/WebMediaSessionManagerMac.h: Added.
3193         * WebProcess/Plugins/PluginView.h:
3194         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3195         (WebKit::WebChromeClient::isPlayingMediaDidChange):
3196         (WebKit::WebChromeClient::addPlaybackTargetPickerClient):
3197         (WebKit::WebChromeClient::removePlaybackTargetPickerClient):
3198         (WebKit::WebChromeClient::showPlaybackTargetPicker):
3199         (WebKit::WebChromeClient::playbackTargetPickerClientStateDidChange):
3200         (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): Deleted.
3201         (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): Deleted.
3202         * WebProcess/WebCoreSupport/WebChromeClient.h:
3203         * WebProcess/WebPage/WebPage.h:
3204         * WebProcess/WebPage/WebPage.messages.in:
3205         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3206         (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
3207         * WebProcess/WebPage/mac/WebPageMac.mm:
3208         (WebKit::WebPage::playbackTargetSelected):
3209         (WebKit::WebPage::playbackTargetAvailabilityDidChange):
3210         (WebKit::WebPage::setShouldPlayToPlaybackTarget):
3211
3212 2015-04-21  Anders Carlsson  <andersca@apple.com>
3213
3214         WKWebsiteDataStore doesn't track and remove IndexedDB databases
3215         https://bugs.webkit.org/show_bug.cgi?id=144032
3216         rdar://problem/20242856
3217
3218         Reviewed by Tim Horton.
3219
3220         * DatabaseProcess/DatabaseProcess.cpp:
3221         (WebKit::DatabaseProcess::fetchWebsiteData):
3222         (WebKit::DatabaseProcess::deleteWebsiteData):
3223         (WebKit::DatabaseProcess::deleteWebsiteDataForOrigins):
3224         * DatabaseProcess/DatabaseProcess.h:
3225         * DatabaseProcess/DatabaseProcess.messages.in:
3226         * Shared/WebsiteData/WebsiteDataTypes.h:
3227         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
3228         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
3229         (dataTypesToString):
3230         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
3231         (WebKit::toWebsiteDataTypes):
3232         (WebKit::toWKWebsiteDataTypes):
3233         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3234         (WebKit::generateCallbackID):
3235         (WebKit::DatabaseProcessProxy::~DatabaseProcessProxy):
3236         (WebKit::DatabaseProcessProxy::fetchWebsiteData):
3237         (WebKit::DatabaseProcessProxy::deleteWebsiteData):
3238         (WebKit::DatabaseProcessProxy::deleteWebsiteDataForOrigins):
3239         (WebKit::DatabaseProcessProxy::didClose):
3240         (WebKit::DatabaseProcessProxy::didFetchWebsiteData):
3241         (WebKit::DatabaseProcessProxy::didDeleteWebsiteData):
3242         (WebKit::DatabaseProcessProxy::didDeleteWebsiteDataForOrigins):
3243         * UIProcess/Databases/DatabaseProcessProxy.h:
3244         * UIProcess/Databases/DatabaseProcessProxy.messages.in:
3245         * UIProcess/WebProcessPool.h:
3246         * UIProcess/WebsiteData/WebsiteDataStore.cpp:
3247         (WebKit::WebsiteDataStore::fetchData):
3248         (WebKit::WebsiteDataStore::removeData):
3249
3250 2015-04-21  Anders Carlsson  <andersca@apple.com>
3251
3252         Add module maps for WebKit
3253         https://bugs.webkit.org/show_bug.cgi?id=144026
3254         rdar://problem/19665428
3255
3256         Reviewed by Dan Bernstein.
3257
3258         * Configurations/WebKit.xcconfig:
3259         * Modules/OSX.modulemap: Added.
3260         * Modules/iOS.modulemap: Added.
3261
3262 2015-04-21  Tim Horton  <timothy_horton@apple.com>
3263
3264         Long pause under _takeViewSnapshot when screen updates are disabled
3265         https://bugs.webkit.org/show_bug.cgi?id=144017
3266         <rdar://problem/20548397>
3267
3268         Reviewed by Simon Fraser.
3269
3270         * UIProcess/API/mac/WKView.mm:
3271         (-[WKView _takeViewSnapshot]):
3272         Use CGSHWCaptureWindowList, for snapshotting that doesn't block on
3273         the next commit, and can succeed while screen updates are disabled
3274         without blocking.
3275
3276 2015-04-21  Chris Dumez  <cdumez@apple.com>
3277
3278         [WK2][NetworkCache] Better account of resource revalidations in efficacy logging
3279         https://bugs.webkit.org/show_bug.cgi?id=144014
3280
3281         Reviewed by Antti Koivisto.
3282
3283         Better account of resource revalidations in efficacy logging.
3284         Prevously, resources that were in the cache but needed revalidation
3285         were counted as retrieval successes, which is not entirely accurate.
3286
3287         We now distinguish "is in the cache and is directly usable" from
3288         "is in the cache but needs revalidation". We also log how many of these
3289         revalidations are successful.
3290
3291         * NetworkProcess/NetworkResourceLoader.cpp:
3292         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
3293         * NetworkProcess/cache/NetworkCache.cpp:
3294         (WebKit::NetworkCache::Cache::update):
3295         * NetworkProcess/cache/NetworkCache.h:
3296         * NetworkProcess/cache/NetworkCacheStatistics.cpp:
3297         (WebKit::NetworkCache::Statistics::recordRetrievedCachedEntry):
3298         (WebKit::NetworkCache::Statistics::recordRevalidationSuccess):
3299         * NetworkProcess/cache/NetworkCacheStatistics.h:
3300
3301 2015-04-21  Dan Bernstein  <mitz@apple.com>
3302
3303         [Cocoa] Framework header postprocessing should respect additional definitions
3304         https://bugs.webkit.org/show_bug.cgi?id=144018
3305
3306         Reviewed by Anders Carlsson.
3307
3308         * mac/postprocess-framework-headers.sh: Read definitons from
3309         /usr/local/include/WebKitAdditions/Scripts/postprocess-framework-headers-definitions, and
3310         have them take precedence over OSX_VERSION and IOS_VERSION and supply additional options to
3311         sed.
3312
3313 2015-04-21  Anders Carlsson  <andersca@apple.com>
3314
3315         Fix block signatures
3316         https://bugs.webkit.org/show_bug.cgi?id=144002
3317
3318         Reviewed by Andreas Kling.
3319
3320         * UIProcess/API/Cocoa/WKUIDelegate.h:
3321         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
3322         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3323         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3324         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3325         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3326         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3327         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3328         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3329         * UIProcess/ios/WKPDFView.mm:
3330         (-[WKPDFView _highlightLinkAnnotation:forDuration:completionHandler:]):
3331         * UIProcess/ios/forms/WKFileUploadPanel.mm:
3332         (-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
3333         (-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
3334         (-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
3335
3336 2015-04-21  Timothy Horton  <timothy_horton@apple.com>
3337
3338         PDFs still don't snapshot properly in iOS Safari
3339         https://bugs.webkit.org/show_bug.cgi?id=143976
3340         <rdar://problem/18283459>
3341
3342         Reviewed by Anders Carlsson.
3343
3344         * UIProcess/WebPageProxy.cpp:
3345         (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
3346         * UIProcess/WebPageProxy.h:
3347         * UIProcess/API/Cocoa/WKWebView.mm:
3348         (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
3349         Inform the client that we've passed all reasonable layout milestones
3350         as soon as the custom content provider has been handed its data.
3351         WKPDFView, the only custom content provider, synchronously lays out
3352         its subviews upon initial receipt of data, so this works fine for it.
3353         This ensures that clients that normally depend on layout milestones firing
3354         won't break when a custom content view is installed.
3355
3356         (-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
3357         Fall back to renderInContext: if the custom content view is not parented
3358         when a snapshot is requested.
3359
3360 2015-04-21  Dan Bernstein  <mitz@apple.com>
3361
3362         Merged WKBackForwardListItem’s Internal category into the class extension in WKBackForwardListItemInternal.h.
3363
3364         Reviewed by Anders Carlsson.
3365
3366         * UIProcess/API/Cocoa/WKBackForwardListItem.mm:
3367         (-[WKBackForwardListItem _item]):
3368         (-[WKBackForwardListItem _apiObject]):
3369         * UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
3370
3371 2015-04-21  Chris Dumez  <cdumez@apple.com>
3372
3373         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&) constructor explicit
3374         https://bugs.webkit.org/show_bug.cgi?id=143970
3375
3376         Reviewed by Darin Adler.
3377
3378         Make Vector(const Vector<T, otherCapacity, otherOverflowBehaviour>&)
3379         constructor explicit as it copies the vector and it is easy to call it
3380         by mistake.
3381
3382         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
3383         (WebKit::WebIDBServerConnection::setIndexKeys):
3384         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
3385
3386 2015-04-20  Dan Bernstein  <mitz@apple.com>
3387
3388         Expose more bundle form client functions as WKWebProcessPlugInFormDelegatePrivate methods
3389         https://bugs.webkit.org/show_bug.cgi?id=143973
3390
3391         Reviewed by Anders Carlsson.
3392
3393         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
3394         delegate methods.
3395
3396         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Declared new frame
3397         property.
3398         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
3399         (-[WKWebProcessPlugInNodeHandle frame]): Added. Returns the node’s document’s frame. This is
3400         useful to delegates getting an array of nodes via the new method.
3401
3402         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3403         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added overrides of
3404         shouldNotifyOnFormChanges and didAssociateFormControls, which call the new delegate methods.
3405
3406 2015-04-20  Joseph Pecoraro  <pecoraro@apple.com>
3407
3408         Cleanup some StringBuilder use
3409         https://bugs.webkit.org/show_bug.cgi?id=143550
3410
3411         Reviewed by Darin Adler.
3412
3413         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
3414         (WebKit::buildObjectStoreStatement):
3415         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
3416         (WebKit::v2RecordsTableSchema):
3417         * Shared/Databases/IndexedDB/IDBUtilities.cpp:
3418         (WebKit::uniqueDatabaseIdentifier):
3419         * UIProcess/API/APIUserScript.cpp:
3420         (API::UserScript::generateUniqueURL):
3421         * UIProcess/WebProcessPool.cpp:
3422         (WebKit::WebProcessPool::didReceiveInvalidMessage):
3423         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
3424         (WebKit::combinedSecurityOriginIdentifier):
3425
3426 2015-04-20  Anders Carlsson  <andersca@apple.com>
3427
3428         Modify the WKWebsiteDataStore API to take a NSSet of types instead of a bitmask
3429         https://bugs.webkit.org/show_bug.cgi?id=143966
3430
3431         Reviewed by Dan Bernstein.
3432
3433         * UIProcess/API/Cocoa/WKWebsiteDataRecord.h:
3434         * UIProcess/API/Cocoa/WKWebsiteDataRecord.mm:
3435         (dataTypesToString):
3436         (-[WKWebsiteDataRecord dataTypes]):
3437         * UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
3438         (WebKit::toWebsiteDataTypes):
3439         (WebKit::toWKWebsiteDataTypes):
3440         * UIProcess/API/Cocoa/WKWebsiteDataStore.h:
3441         * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
3442         (+[WKWebsiteDataStore allWebsiteDataTypes]):
3443         (-[WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3444         (-[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3445         (-[WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3446         * UIProcess/API/Cocoa/_WKWebsiteDataRecord.h:
3447         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3448         * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
3449         (toWKWebsiteDataTypes):
3450         (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
3451         (-[_WKWebsiteDataStore removeDataOfTypes:forDataRecords:completionHandler:]):
3452         (-[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:]):
3453
3454 2015-04-20  Beth Dakin  <bdakin@apple.com>
3455
3456         Should remove mouseForceClick and mouseForceCancelled from DOM force events
3457         https://bugs.webkit.org/show_bug.cgi?id=143904
3458         -and corresponding-
3459         rdar://problem/20578842
3460
3461         Reviewed by Dan Bernstein.
3462
3463         * WebProcess/WebPage/mac/WebPageMac.mm:
3464         (WebKit::WebPage::immediateActionDidCancel):
3465
3466 2015-04-20  Tim Horton  <timothy_horton@apple.com>
3467
3468         Implement immediate action support for tel: and mailto: URLs
3469         https://bugs.webkit.org/show_bug.cgi?id=143916
3470         <rdar://problem/19721711>
3471
3472         Reviewed by Darin Adler.
3473
3474         * Shared/API/c/WKImmediateActionTypes.h:
3475         * UIProcess/mac/WKImmediateActionController.mm:
3476         (-[WKImmediateActionController _defaultAnimationController]):
3477         (-[WKImmediateActionController _animationControllerForDataDetectedText]):
3478         (-[WKImmediateActionController _animationControllerForDataDetectedLink]):
3479         (-[WKImmediateActionController _menuItemForDataDetectedText]): Deleted.
3480         Add _animationControllerForDataDetectedLink and use it when
3481         building immediate actions for tel: and mailto: links.
3482
3483 2015-04-20  Alex Christensen  <achristensen@webkit.org>
3484
3485         Properly report errors from _WKUserContentExtensionStore.