60007bbe21cea9c62ab863e38eb995ea71a7f012
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-05-24  Sam Weinig  <sam@webkit.org>
2
3         [WebKit2] Rework WebPreferencesStore to allow easier overriding of defaults
4         https://bugs.webkit.org/show_bug.cgi?id=133258
5
6         Reviewed by Anders Carlsson.
7
8         To support changing default values of preferences based on which API you are using (either
9         the legacy C-SPI or the Objective-C API), overhaul the WebPreferencesStore to use a single
10         HashMap of String -> Value (where Value is new type that can be a String, bool, uint32_t or double)
11         instead of four HashMaps.  This allows us to use two of these new HashMaps, one for the actual
12         set values, and one for overridden defaults. This new Value class will also allow easier incremental
13         updating of preferences in the future.
14         
15         Other notable changes:
16         - Removed Float kind of preferences. There were none.
17         - Move StorageBlockingPolicy preference to the correct group, it's a uint32_t, not bool.
18
19         * Shared/WebPreferencesStore.cpp:
20         * Shared/WebPreferencesStore.h:
21
22 2014-05-25  David Kilzer  <ddkilzer@apple.com>
23
24         Add type-checked casts for TransformOperations
25         <http://webkit.org/b/133217>
26
27         Reviewed by Simon Fraser.
28
29         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
30         (IPC::ArgumentCoder<TransformOperations>::encode):
31         - Switch to type-checked casts.
32
33 2014-05-25  David Kilzer  <ddkilzer@apple.com>
34
35         Use type-checking FilterOperation casts in CoordinatedGraphicsArgumentCoders.cpp
36         <http://webkit.org/b/133203>
37
38         Reviewed by Simon Fraser.
39
40         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
41         (IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
42         - Replace static_cast<>() operators with type-checking
43           FilterOperation casts.
44         - Replace 'default' statement with 'case' statements so new
45           filters added later require an explicit decision to be made.
46         (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
47         - Replace 'default' statement with 'case' statements so new
48           filters added later require an explicit decision to be made.
49
50 2014-05-24  Jon Honeycutt  <jhoneycutt@apple.com>
51
52         Potential null dereference in
53         WebFrameLoaderClient::dispatchDidFailProvisionalLoad()
54         <https://bugs.webkit.org/show_bug.cgi?id=133193>
55
56         WebFrameLoaderClient::dispatchDidFailProvisionalLoad() calls the
57         InjectedBundleLoaderClient's didFailProvisionalLoadWithErrorForFrame()
58         before sending a message to the UI process that a provisional load has
59         failed. It's possible for the provisional document loader to become
60         null while calling into the InjectedBundleLoaderClient (as is the case
61         with the WebKitTestRunner's injected bundle), leading to a null
62         dereference when trying to send the DidFailProvisionalLoadForFrame
63         message.
64
65         Reviewed by Darin Adler.
66
67         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
68         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
69         Get the navigation ID before calling into the injected bundle.
70
71 2014-05-23  Simon Fraser  <simon.fraser@apple.com>
72
73         Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
74         https://bugs.webkit.org/show_bug.cgi?id=133254
75
76         Reviewed by Tim Horton.
77         
78         Override scrollPosition() on ScrollingTreeOverflowScrollingNodeIOS.
79
80         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
81         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
82         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollPosition):
83
84 2014-05-24  Chris Fleizach  <cfleizach@apple.com>
85
86         AX: fix coordinate mapping for iOS accessibility
87         https://bugs.webkit.org/show_bug.cgi?id=133188
88
89         Reviewed by Sam Weinig.
90
91         Add in accessibility conversion methods that will check if the methods are present 
92         (if accessibility is not on, they won't be)
93         and use those to convert points into the right coordinate space that VoiceOver is expecting.
94
95         * UIProcess/PageClient.h:
96         * UIProcess/WebPageProxy.cpp:
97         (WebKit::WebPageProxy::accessibilityScreenToRootView):
98         (WebKit::WebPageProxy::rootViewToAccessibilityScreen):
99         * UIProcess/WebPageProxy.h:
100         * UIProcess/WebPageProxy.messages.in:
101         * UIProcess/ios/PageClientImplIOS.h:
102         * UIProcess/ios/PageClientImplIOS.mm:
103         (WebKit::PageClientImpl::accessibilityScreenToRootView):
104         (WebKit::PageClientImpl::rootViewToAccessibilityScreen):
105         * UIProcess/mac/PageClientImpl.h:
106         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
107         (WebKit::WebChromeClient::accessibilityScreenToRootView):
108         (WebKit::WebChromeClient::rootViewToAccessibilityScreen):
109         * WebProcess/WebCoreSupport/WebChromeClient.h:
110         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
111         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
112         * WebProcess/WebPage/WebPage.cpp:
113         (WebKit::WebPage::accessibilityScreenToRootView):
114         (WebKit::WebPage::rootViewToAccessibilityScreen):
115         * WebProcess/WebPage/WebPage.h:
116
117 2014-05-24  Carlos Garcia Campos  <cgarcia@igalia.com>
118
119         REGRESSION(r165841): Messages sent before the child process is launched are never sent after r165841
120         https://bugs.webkit.org/show_bug.cgi?id=131675
121
122         Reviewed by Anders Carlsson.
123
124         Since r165841 the connection is opened after the pending messages
125         are sent, because connectionWillOpen might send messages that we
126         want to happen after the ones already pending. The problem is that
127         Connection::canSendOutgoingMessages() returns false when
128         connection hasn't been opened. We should ensure no messages are
129         sent by connectionWillOpen.
130
131         * Shared/ChildProcessProxy.cpp:
132         (WebKit::ChildProcessProxy::didFinishLaunching): Open the
133         connection before sending pending messages.
134         * UIProcess/WebPageProxy.cpp:
135         (WebKit::WebPageProxy::connectionWillOpen): Do not call
136         VisitedLinkProvider::addProcess() here because it tries to send a
137         message to the web process, but the connection hasn't be opened yet.
138         (WebKit::WebPageProxy::processDidFinishLaunching): Call
139         VisitedLinkProvider::addProcess() here instead.
140         * UIProcess/WebPageProxy.h:
141         * UIProcess/WebProcessProxy.cpp:
142         (WebKit::WebProcessProxy::didFinishLaunching): Call
143         WebPageProxy::processDidFinishLaunching() for every web page.
144
145 2014-05-23  Ian Henderson  <ianh@apple.com>
146
147         REGRESSION: Rubberbanding out jumps to top left corner on google.com
148         https://bugs.webkit.org/show_bug.cgi?id=133253
149         <rdar://problem/17025664>
150
151         Reviewed by Benjamin Poulain.
152
153         * UIProcess/API/Cocoa/WKWebView.mm:
154         (-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
155         Avoid deceleration during zooming to work around a UIKit bug.
156
157 2014-05-23  Benjamin Poulain  <bpoulain@apple.com>
158
159         [iOS][WK2] Avoid updating the view from the viewport configuration unnecessarily
160         https://bugs.webkit.org/show_bug.cgi?id=133255
161         <rdar://problem/16890926>
162
163         Reviewed by Simon Fraser.
164
165         All the updates were mostly harmless since they are pretty cheap, but they can be
166         very annoying for debugging.
167
168         This patch skips viewportUpdates in the trivial cases.
169
170         * UIProcess/API/Cocoa/WKWebView.mm:
171         (-[WKWebView _setMinimumLayoutSizeOverride:]):
172         (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
173         * WebProcess/WebPage/WebPage.cpp:
174         (WebKit::WebPage::mainFrameDidLayout):
175         * WebProcess/WebPage/ios/WebPageIOS.mm:
176         (WebKit::WebPage::viewportPropertiesDidChange):
177
178 2014-05-23  Benjamin Poulain  <bpoulain@apple.com>
179
180         [iOS][WK2] The page scale factor randomly resets to initial scale when editing
181         https://bugs.webkit.org/show_bug.cgi?id=133244
182
183         Reviewed by Enrica Casucci.
184
185         We were never telling the WebProcess that zoom is used triggered. As a result, the ViewportConfiguration was free
186         to reset the scale whenever it felt like it. The fix is to call willStartUserTriggeredZoom before changing the scale.
187
188         This patch also split _willStartUserTriggeredScrollingOrZooming from willStartUserTriggeredZoom
189         and rename it to willStartPanOrPinchGesture. This is just a tiny cleanup since the only thing left in _willStartUserTriggeredScrollingOrZooming
190         was gesture related.
191
192         * UIProcess/API/Cocoa/WKWebView.mm:
193         (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
194         (-[WKWebView scrollViewWillBeginZooming:withView:]):
195         (-[WKWebView scrollViewWillBeginDragging:]):
196         * UIProcess/API/Cocoa/WKWebViewInternal.h:
197         * UIProcess/API/ios/WKViewIOS.mm:
198         (-[WKView scrollViewWillBeginDragging:]):
199         * UIProcess/ios/WKContentView.h:
200         * UIProcess/ios/WKContentView.mm:
201         (-[WKContentView willStartUserTriggeredZoom]):
202         (-[WKContentView willStartUserTriggeredScroll]): Deleted.
203         * UIProcess/ios/WKContentViewInteraction.h:
204         * UIProcess/ios/WKContentViewInteraction.mm:
205         (-[WKContentView willStartPanOrPinchGesture]):
206         (-[WKContentView _willStartUserTriggeredScrollingOrZooming]): Deleted.
207
208 2014-05-23  Tim Horton  <timothy_horton@apple.com>
209
210         REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
211         https://bugs.webkit.org/show_bug.cgi?id=132794
212         <rdar://problem/16877909>
213
214         Reviewed by Simon Fraser.
215
216         * WebKit2.xcodeproj/project.pbxproj:
217         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
218         (WebKit::WebChromeClient::createDisplayRefreshMonitor):
219         * WebProcess/WebCoreSupport/WebChromeClient.h:
220         * WebProcess/WebPage/DrawingArea.h:
221         (WebKit::DrawingArea::graphicsLayerFactory):
222         (WebKit::DrawingArea::createDisplayRefreshMonitor):
223         Plumb the DisplayRefreshMonitor request through to the DrawingArea.
224         RemoteLayerTreeDrawingArea will implement and return a RemoteLayerTreeDisplayRefreshMonitor.
225
226         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h: Added.
227         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
228         * WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm: Added.
229         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
230         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor):
231         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
232         When requesting a display refresh callback, schedule a layer commit.
233         It may end up being empty, but will still call us back with a didUpdate,
234         upon which we'll fire the callback.
235
236         (WebKit::RemoteLayerTreeDisplayRefreshMonitor::didUpdateLayers):
237
238         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
239         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
240         (WebKit::RemoteLayerTreeDrawingArea::createDisplayRefreshMonitor):
241         (WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
242         Keep track of the set of DisplayRefreshMonitors.
243
244         (WebKit::RemoteLayerTreeDrawingArea::didUpdate):
245         Fire requestAnimationFrame callbacks once the UI process commits the new layer tree.
246
247 2014-05-23  Jeremy Jones  <jeremyj@apple.com>
248
249         Hide fullscreen immediately when switching tabs.
250         https://bugs.webkit.org/show_bug.cgi?id=133239
251
252         Reviewed by Eric Carlson.
253
254         Renamed a function to better describe it's new functionality.
255
256         * UIProcess/WebPageProxy.cpp:
257         (WebKit::WebPageProxy::viewStateDidChange):
258         now calls: requestHideAndExitFullscreen
259
260 2014-05-23  Enrica Casucci  <enrica@apple.com>
261
262         REGRESSION (WebKit2): Keyboard disappears/appears automatically between text boxes.
263         https://bugs.webkit.org/show_bug.cgi?id=133243
264         <rdar://problem/16761913>
265
266         Reviewed by Benjamin Poulain.
267
268         We need to ensure that when an element loses focus and another one gets it,
269         this is handled in one single message in the UI process to avoid seeing
270         the keyboard animating in and out.
271         This is accomplished by always postponing the blur notification until all events
272         have been processed.
273         If a new node is focused before the delayed blur notification is sent to the UI
274         process, the message we send includes both blur and focus notification. In this case,
275         the postponed blur notification is not sent.
276
277         * UIProcess/PageClient.h:
278         * UIProcess/WebPageProxy.h:
279         * UIProcess/WebPageProxy.messages.in:
280         * UIProcess/ios/PageClientImplIOS.h:
281         * UIProcess/ios/PageClientImplIOS.mm:
282         (WebKit::PageClientImpl::startAssistingNode):
283         * UIProcess/ios/WKContentViewInteraction.h:
284         * UIProcess/ios/WKContentViewInteraction.mm:
285         (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
286         (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]): Deleted.
287         * UIProcess/ios/WebPageProxyIOS.mm:
288         (WebKit::WebPageProxy::startAssistingNode):
289         * WebProcess/WebPage/WebPage.cpp:
290         (WebKit::WebPage::WebPage):
291         * WebProcess/WebPage/WebPage.h:
292         * WebProcess/WebPage/ios/WebPageIOS.mm:
293         (WebKit::WebPage::elementDidFocus):
294         (WebKit::WebPage::elementDidBlur):
295
296 2014-05-23  Anders Carlsson  <andersca@apple.com>
297
298         Remove an assertion.
299
300         * WebProcess/WebPage/WebPage.cpp:
301         (WebKit::WebPage::loadRequest):
302
303 2014-05-23  Tim Horton  <timothy_horton@apple.com>
304
305         [iOS] WKPDFView should have a page indicator
306         https://bugs.webkit.org/show_bug.cgi?id=133109
307         <rdar://problem/16383003>
308
309         Reviewed by Anders Carlsson.
310
311         * UIProcess/API/Cocoa/WKWebView.mm:
312         (-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
313         (-[WKWebView _setObscuredInsets:]):
314         Forward obscured insets changes to the custom content view.
315
316         (-[WKWebView _updateScrollViewBackground]):
317         If we have a custom content view, use its background instead of the
318         (likely nonexistent) page's when updaing the scroll view's background color.
319
320         * UIProcess/API/Cocoa/WKWebViewInternal.h:
321         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
322         * UIProcess/Cocoa/WKWebViewContentProvider.h:
323         * UIProcess/Cocoa/WKWebViewContentProviderDelegate.h: Added.
324         * UIProcess/API/Cocoa/WKWebView.mm:
325         (-[WKWebView _setInsetForOverlaidAccessoryViews:]):
326         Add SPI for clients to inform us about potential overlaid accessory views
327         which should be taken into account e.g. for positioning the page indicator.
328
329         Add a view that sits fixed on top of the WKWebView, ignores interaction,
330         but provides the WKWebViewContentProvider a place to install views
331         that don't scroll along with the content.
332
333         * UIProcess/ios/WKPDFPageNumberIndicator.h: Added.
334         * UIProcess/ios/WKPDFPageNumberIndicator.mm: Added.
335         (-[WKPDFPageNumberIndicator initWithFrame:]):
336         (-[WKPDFPageNumberIndicator dealloc]):
337         (-[WKPDFPageNumberIndicator setCurrentPageNumber:]):
338         (-[WKPDFPageNumberIndicator setPageCount:]):
339         (-[WKPDFPageNumberIndicator show]):
340         (-[WKPDFPageNumberIndicator hide:]):
341         (-[WKPDFPageNumberIndicator moveToPoint:animated:]):
342         (-[WKPDFPageNumberIndicator sizeThatFits:]):
343         (-[WKPDFPageNumberIndicator _updateLabel]):
344         (-[WKPDFPageNumberIndicator _makeRoundedCorners]):
345         Add a page number indicator.
346
347         * UIProcess/ios/WKPDFView.mm:
348         (-[WKPDFView dealloc]):
349         (-[WKPDFView web_setScrollView:]):
350         (-[WKPDFView _revalidateViews]):
351         (-[WKPDFView _offsetForPageNumberIndicator]):
352         (-[WKPDFView _updatePageNumberIndicator]):
353         (-[WKPDFView web_setObscuredInsets:]):
354         (-[WKPDFView web_setInsetForOverlaidAccessoryViews:]):
355         (-[WKPDFView web_setFixedOverlayView:]):
356         (-[WKPDFView _computePageAndDocumentFrames]):
357         Update the page number indicator when the topmost visible page changes.
358         Move the page number indicator around when the obscured insets change.
359
360         * WebKit2.xcodeproj/project.pbxproj:
361
362 2014-05-23  Anders Carlsson  <andersca@apple.com>
363
364         Fix test failures on the bot.
365
366         * UIProcess/API/Cocoa/WKProcessPool.mm:
367         (websiteDataDirectoryURL):
368         If we have no bundle identifier, use the process name.
369
370 2014-05-23  Enrica Casucci  <enrica@apple.com>
371
372         REGRESSION (iOS WebKit2): Autocorrection is not accurate when changing selection.
373         https://bugs.webkit.org/show_bug.cgi?id=133237
374         <rdar://problem/16655776>
375
376         Reviewed by Ryosuke Niwa.
377
378         * UIProcess/ios/WKContentViewInteraction.mm:
379         (-[WKContentView beginSelectionChange]):
380         (-[WKContentView endSelectionChange]):
381
382         When the selection is changed with a gesture in an editable element,
383         we must notify the keyboard to make sure the autocorrection engine 
384         updates its typing context. WKContentView must implement
385         beginSelectionChange and endSelectionChange to call into
386         the keyboard layer.
387
388 2014-05-22  Brent Fulgham  <bfulgham@apple.com>
389
390         [iOS] WK2: Provide implementation for windowFrame
391         https://bugs.webkit.org/show_bug.cgi?id=133205
392         <rdar://problem/16894890>
393
394         Reviewed by Benjamin Poulain.
395
396         * UIProcess/Cocoa/UIDelegate.h:
397         * UIProcess/Cocoa/UIDelegate.mm:
398         (WebKit::UIDelegate::UIClient::windowFrame): Added.
399         * UIProcess/ios/PageClientImplIOS.mm:
400         (WebKit::PageClientImpl::convertToUserSpace): Added.
401
402 2014-05-20  Anders Carlsson  <andersca@apple.com>
403
404         Use a per app directory structure for website data
405         https://bugs.webkit.org/show_bug.cgi?id=133125
406         <rdar://problem/16830143>
407
408         Reviewed by Dan Bernstein, Sam Weinig and Tim Horton.
409
410         Put website data in subdirectories of ~/Library/WebKit/<bundle ID>/WebsiteData.
411         We use "LocalStorage", "WebSQL", and "IndexedDB" subdirectories.
412
413         * UIProcess/API/Cocoa/WKProcessPool.mm:
414         (websiteDataDirectoryURL):
415         (-[WKProcessPool _initWithConfiguration:]):
416
417 2014-05-23  Dan Bernstein  <mitz@apple.com>
418
419         [Cocoa] WKNavigationResponsePrivate.h is internal
420         https://bugs.webkit.org/show_bug.cgi?id=133218
421
422         Reviewed by Dean Jackson.
423
424         * WebKit2.xcodeproj/project.pbxproj: Promote WKNavigationResponsePrivate.h to private.
425
426 2014-05-23  Carlos Garcia Campos  <cgarcia@igalia.com>
427
428         [UNIX] Reorganize and cleanup main functions of GTK and EFL ports
429         https://bugs.webkit.org/show_bug.cgi?id=131024
430
431         Reviewed by Gustavo Noronha Silva.
432
433         Move main function implementation files to <process-dir>/EntryPoint/unix/<ProcessName>Main.cpp
434         files that are now shared by GTK and EFL ports. These files call a
435         main method that wraps a new method ChildProcessMain that contains
436         the common code and uses a helper class for the platform specific
437         code. GTK+ and EFL ports implement that helper class for every process type.
438
439         * NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp: Renamed from Source/WebKit2/efl/MainEfl.cpp.
440         (main):
441         * NetworkProcess/efl/NetworkProcessMainEfl.cpp: Renamed from Source/WebKit2/unix/NetworkMainUnix.cpp.
442         (WebKit::NetworkProcessMainUnix):
443         * NetworkProcess/gtk/NetworkProcessMainGtk.cpp: Renamed from Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp.
444         (WebKit::NetworkProcessMainUnix):
445         * NetworkProcess/unix/NetworkProcessMainUnix.h:
446         * PlatformEfl.cmake:
447         * PlatformGTK.cmake:
448         * PluginProcess/EntryPoint/unix/PluginProcessMain.cpp: Renamed from Source/WebKit2/unix/PluginMainUnix.cpp.
449         (main):
450         * PluginProcess/unix/PluginProcessMainUnix.cpp:
451         (WebKit::webkitXError):
452         (WebKit::PluginProcessMainUnix):
453         * PluginProcess/unix/PluginProcessMainUnix.h:
454         * Shared/unix/ChildProcessMain.cpp: Copied from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
455         (WebKit::ChildProcessMainBase::parseCommandLine):
456         * Shared/unix/ChildProcessMain.h: Renamed from Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.h.
457         (WebKit::ChildProcessMainBase::platformInitialize):
458         (WebKit::ChildProcessMainBase::platformFinalize):
459         (WebKit::ChildProcessMainBase::initializationParameters):
460         (WebKit::ChildProcessMain):
461         * WebProcess/EntryPoint/unix/WebProcessMain.cpp: Renamed from Source/WebKit2/gtk/MainGtk.cpp.
462         (main):
463         * WebProcess/efl/WebProcessMainEfl.cpp:
464         (WebKit::WebProcessMainUnix):
465         (dummyExtensionErrorHandler): Deleted.
466         * WebProcess/gtk/WebProcessMainGtk.cpp:
467         (WebKit::WebProcessMainUnix):
468         * WebProcess/unix/WebProcessMainUnix.h: Renamed from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
469
470 2014-05-22  Zan Dobersek  <zdobersek@igalia.com>
471
472         Have the decoded element in VectorArgumentCoder::decode() moved into Vector::append()
473         https://bugs.webkit.org/show_bug.cgi?id=133082
474
475         Reviewed by Andreas Kling.
476
477         * Platform/IPC/ArgumentCoders.h: Move the decoded element into the Vector::append() call.
478         This enforces a move instead of a copy if the decoded element's type is move-constructible.
479
480 2014-05-22  Zan Dobersek  <zdobersek@igalia.com>
481
482         Move the passed-in Vector<Attachment> in MessageDecoder constructor down into ArgumentDecoder
483         https://bugs.webkit.org/show_bug.cgi?id=133080
484
485         Reviewed by Andreas Kling.
486
487         * Platform/IPC/MessageDecoder.cpp:
488         (IPC::MessageDecoder::MessageDecoder): The Vector<Attachment> object was passed in by value.
489         Move it into the ArgumentDecoder constructor as it is not used elsewhere in this constructor
490         and produces a copy otherwise.
491
492 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
493
494         [iOS][WK2] Add support for minimal-ui viewports
495         https://bugs.webkit.org/show_bug.cgi?id=133162
496
497         Reviewed by Simon Fraser.
498
499         In the WebKit2 layers, we have two parts to minimal-ui.
500         -In WebPage, we need to get the values from the UIProcess and setup the ViewportConfiguration.
501          Another part is freezing the state on page load.
502         -In the UIProcess, we need to get the right information for layout and styling, and we need to tell
503          the UI clients about minimal-ui changes.
504
505         * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
506         * UIProcess/API/Cocoa/WKWebView.mm:
507         (-[WKWebView _setUsesMinimalUI:]):
508         (-[WKWebView _usesMinimalUI]):
509         (-[WKWebView _didCommitLayerTree:WebKit::]):
510         (-[WKWebView _frameOrBoundsChanged]):
511         (-[WKWebView _minimumLayoutSizeOverride]):
512         (-[WKWebView _setMinimumLayoutSizeOverride:]):
513         (-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
514         (-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
515         (-[WKWebView _largestUnobscuredSizeOverride]):
516         (-[WKWebView _setMaximumUnobscuredSizeOverride:]):
517         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
518         (setViewportConfigurationMinimumLayoutSize): Deleted.
519         * UIProcess/API/Cocoa/WKWebViewInternal.h:
520         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
521         * UIProcess/PageClient.h:
522         * UIProcess/WebPageProxy.h:
523         * UIProcess/WebPageProxy.messages.in:
524         * UIProcess/ios/PageClientImplIOS.h:
525         * UIProcess/ios/PageClientImplIOS.mm:
526         (WebKit::PageClientImpl::setUsesMinimalUI):
527         * UIProcess/ios/WebPageProxyIOS.mm:
528         (WebKit::WebPageProxy::dynamicViewportSizeUpdate):
529         (WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
530         (WebKit::WebPageProxy::setMaximumUnobscuredSize):
531         (WebKit::WebPageProxy::setUsesMinimalUI):
532         (WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI): Deleted.
533         * WebProcess/WebPage/WebPage.cpp:
534         (WebKit::WebPage::WebPage):
535         (WebKit::WebPage::didCommitLoad):
536         * WebProcess/WebPage/WebPage.h:
537         * WebProcess/WebPage/WebPage.messages.in:
538         * WebProcess/WebPage/ios/WebPageIOS.mm:
539         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
540         (WebKit::WebPage::setMaximumUnobscuredSize):
541         (WebKit::WebPage::willFlushLayers):
542         (WebKit::WebPage::dynamicViewportSizeUpdate):
543         (WebKit::WebPage::viewportConfigurationChanged):
544         (WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
545         (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI): Deleted.
546         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
547         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
548
549 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
550
551         [iOS][WK2] Reset the special action-target of WKSyntheticClickTapGestureRecognizer on destruction
552         https://bugs.webkit.org/show_bug.cgi?id=133165
553         <rdar://problem/16283914>
554
555         Reviewed by Andy Estes.
556
557         It is unclear why, but the WKSyntheticClickTapGestureRecognizer sometimes survives its own view
558         and is reset after WKContentView was destructed.
559         This patch cleans up the target-action on destruction to avoid accessing a destructed object.
560
561         * UIProcess/ios/WKContentViewInteraction.mm:
562         (-[WKContentView cleanupInteraction]):
563
564 2014-05-22  Benjamin Poulain  <bpoulain@apple.com>
565
566         Do not force a layout when changing the FixedLayoutSize in WebPage
567         https://bugs.webkit.org/show_bug.cgi?id=133167
568
569         Reviewed by Andreas Kling.
570
571         WebPage::setFixedLayoutSize was forcing a layout immediately after changing the layout size on FrameView.
572         This is forcing plenty of extra layouts since the fixed layout size is one of many properties updated on the FrameView.
573
574         FrameView marks that layout is needed. It is not clear why a layout was performed immediately.
575
576         * WebProcess/WebPage/WebPage.cpp:
577         (WebKit::WebPage::setFixedLayoutSize):
578
579 2014-05-22  Andreas Kling  <akling@apple.com>
580
581         [iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
582         <https://webkit.org/b/133197>
583         <rdar://problem/17011561>
584
585         Try to free up as much memory as possible before going into background.
586
587         Reviewed by Gavin Barraclough.
588
589         * WebProcess/WebProcess.cpp:
590         (WebKit::WebProcess::processWillSuspend):
591
592 2014-05-22  Andreas Kling  <akling@apple.com>
593
594         Hook up a setting for showing detailed logging during memory pressure relief.
595         <https://webkit.org/b/133194>
596
597         Plumb through the same setting that we used for detailed logging in WK1.
598
599         Reviewed by Gavin Barraclough.
600
601         * Shared/WebProcessCreationParameters.cpp:
602         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
603         (WebKit::WebProcessCreationParameters::encode):
604         (WebKit::WebProcessCreationParameters::decode):
605         * Shared/WebProcessCreationParameters.h:
606         * UIProcess/mac/WebContextMac.mm:
607         (WebKit::WebContext::platformInitializeWebProcess):
608         * WebProcess/cocoa/WebProcessCocoa.mm:
609         (WebKit::WebProcess::platformInitializeWebProcess):
610
611 2014-05-22  Andy Estes  <aestes@apple.com>
612
613         [iOS] Send shareable resources to QuickLook if enabled
614         https://bugs.webkit.org/show_bug.cgi?id=133189
615         <rdar://problem/17003995>
616
617         Reviewed by Brady Eidson.
618
619         Like we do for didReceiveData(), we need to pass an incoming ShareableResource to QuickLook if a QuickLook
620         handle exists.
621
622         * Shared/ShareableResource.cpp:
623         (WebKit::ShareableResource::Handle::tryWrapInCFData): Return the shared resource in a CFDataRef.
624         (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Implemented in terms of tryWrapInCFData().
625         * Shared/ShareableResource.h:
626         * WebProcess/Network/WebResourceLoader.cpp:
627         (WebKit::WebResourceLoader::didReceiveResource): If a QuickLook handle exists, send the shareable resource to
628         it via a CFDataRef.
629
630 2014-05-22  Martin Hock  <mhock@apple.com>
631
632         [iOS] Enable -apple-system- styled elements to respond to system font size changes.
633         https://bugs.webkit.org/show_bug.cgi?id=133186
634         <rdar://problem/16583782>
635
636         Reviewed by Enrica Casucci.
637
638         * UIProcess/API/Cocoa/WKWebView.mm:
639         (-[WKWebView initWithFrame:configuration:]):
640         (-[WKWebView _contentSizeCategoryDidChange:]):
641         (-[WKWebView _contentSizeCategory]):
642         * UIProcess/WebPageProxy.h:
643         * UIProcess/ios/WebPageProxyIOS.mm:
644         (WebKit::WebPageProxy::contentSizeCategoryDidChange):
645         * WebProcess/WebPage/WebPage.h:
646         * WebProcess/WebPage/WebPage.messages.in:
647         * WebProcess/WebPage/ios/WebPageIOS.mm:
648         (WebKit::WebPage::contentSizeCategoryDidChange):
649
650 2014-05-22  Alexey Proskuryakov  <ap@apple.com>
651
652         [iOS] Add CFBundleAllowMixedLocalizations to WebContentService
653         https://bugs.webkit.org/show_bug.cgi?id=133187
654         <rdar://problem/16561084>
655
656         Reviewed by Tim Horton.
657
658         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
659         We already had it in WebContentService.Development, just not here.
660
661 2014-05-22  Alexey Proskuryakov  <ap@apple.com>
662
663         [iOS][WK2] Application cache is broken
664         https://bugs.webkit.org/show_bug.cgi?id=133172
665         <rdar://problem/16994593>
666
667         Reviewed by Andy Estes.
668
669         * UIProcess/mac/WebContextMac.mm:
670         (WebKit::WebContext::platformDefaultApplicationCacheDirectory): Use a proper
671         path for application cache database (same as WebKit1).
672
673 2014-05-22  Enrica Casucci  <enrica@apple.com>
674
675         REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
676         https://bugs.webkit.org/show_bug.cgi?id=133183
677         <rdar://problem/17004207>
678
679         Reviewed by Geoff Garen.
680
681         The keyboard type should be search if the input type is search
682         or if it is text and it is inside a form with an action and either
683         name, id or title contain the word search. This matches the
684         heuristics we have in WK1 for iOS.
685
686         * WebProcess/WebPage/ios/WebPageIOS.mm:
687         (WebKit::WebPage::getAssistedNodeInformation):
688
689 2014-05-21  Oliver Hunt  <oliver@apple.com>
690
691         Only enable sandbox extensions on mac.
692
693         RS = Alexey.
694
695         * WebKit2Prefix.h:
696
697 2014-05-21  Oliver Hunt  <oliver@apple.com>
698
699         [iOS] Enable sandboxing for the database process
700         https://bugs.webkit.org/show_bug.cgi?id=132963
701
702         Reviewed by Alexey Proskuryakov.
703
704         Simply ensure that the database process is running in a tight
705         sandbox. As part of this i've separated out ChildProcessIOS
706         and ensures that the database process loads a custom sandbox.
707
708         * Configurations/WebKit.xcconfig:
709         * DatabaseProcess/ios/DatabaseProcessIOS.mm:
710         (WebKit::DatabaseProcess::initializeSandbox):
711         * DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Added.
712         * Shared/ios/ChildProcessIOS.mm: Added.
713         Essentially cloned from the Mac version, only all the OSX
714         specific logic has been stripped.
715         (WebKit::ChildProcess::setApplicationIsDaemon):
716         (WebKit::ChildProcess::platformInitialize):
717         (WebKit::ChildProcess::initializeSandbox):
718         (WebKit::ChildProcess::setQOS):
719         * Shared/mac/ChildProcessMac.mm:
720         Remove all the IOS ifdefs.
721         (WebKit::ChildProcess::setApplicationIsDaemon):
722         (WebKit::ChildProcess::platformInitialize):
723         (WebKit::ChildProcess::initializeSandbox):
724         (WebKit::ChildProcess::setQOS):
725         * WebKit2.xcodeproj/project.pbxproj:
726
727 2014-05-21  Andy Estes  <aestes@apple.com>
728
729         [iOS] Create a UIPrintFormatter for WKWebView
730         https://bugs.webkit.org/show_bug.cgi?id=133005
731
732         Reviewed by Tim Horton.
733
734         Implemented a UIPrintFormatter subclass to support printing WKWebViews using UIPrintInteractionController.
735         Overrode -_recalcPageCount: to synchronously ask the web process to lay out for printing and return the number
736         of page rects. The web process returns the page rects immediately and then starts rendering the page to a PDF,
737         returning the PDF data to the UI process asynchronously. When UIPrintInteractionController later calls our
738         overridden -drawInRect:forPageAtIndex:, we block and wait for the PDF data to be returned. Since
739         UIPrintInteractionController draws each page after a delay, it's possible that the web process has already
740         returned the PDF data to us by the time we print the first page.
741
742         * Shared/WebPreferencesStore.h: Correctly initialized shouldPrintBackgrounds for iOS.
743         * UIProcess/API/Cocoa/WKWebView.mm:
744         (-[WKWebView _dataForDisplayedPDF]): Now that WKPDFView vends its CGPDFDocument directly, extract its data here.
745         (-[WKWebView _printFormatterClass]): Tell UIView which UIPrintFormatter to alloc.
746         (-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]):
747         If we're displaying a PDF, return its page count directly. Otherwise, synchronously ask the web process to
748         compute page rects for printing and then return the number of rects.
749         (-[WKWebView _endPrinting]): Cleared state and sent the WebPage::EndPrinting message to the web process.
750         (-[WKWebView _printedDocument]): If we're displaying a PDF, return its data directly. Otherwise, if we haven't
751         received PDF data from the web process yet, wait for it indefinitely (there's no sensible timeout to use here
752         since failing to receive the data results in printing some number of blank pages).
753         (-[WKWebView _setPrintedDocument:]): Set the CGPDFDocument received from the web process.
754         * UIProcess/API/Cocoa/WKWebViewInternal.h: Declared methods called by WKWebViewPrintFormatter.
755         * UIProcess/PageClient.h: Declared didFinishDrawingPagesToPDF.
756         * UIProcess/WKWebViewPrintFormatter.h: Added.
757         * UIProcess/WKWebViewPrintFormatter.mm: Added.
758         (-[WKWebViewPrintFormatter dealloc]): Cleared state and called -[WKWebView _endPrinting].
759         (-[WKWebViewPrintFormatter webView]): Returned the WKWebView for this print formatter.
760         (-[WKWebViewPrintFormatter _recalcPageCount]): Set up a PrintInfo object given the formatter's content rect
761         and called -_computePageCountAndStartDrawingToPDFWithPrintInfo:...
762         (-[WKWebViewPrintFormatter rectForPageAtIndex:]): Called -_recalcIfNecessary and then returned the rect from
763         -_pageContentRect.
764         (-[WKWebViewPrintFormatter drawInRect:forPageAtIndex:]): Taught to draw the given page of the printed PDF
765         document into the given rect and context provided to us.
766         * UIProcess/WebPageProxy.h: Declared didFinishDrawingPagesToPDF.
767         * UIProcess/WebPageProxy.messages.in: Added DidFinishDrawingPagesToPDF. Made this a delayed syncrhonous message
768         so that additoinal work could be performed after sending the response.
769         * UIProcess/ios/PageClientImplIOS.h:
770         * UIProcess/ios/PageClientImplIOS.mm:
771         (WebKit::PageClientImpl::didFinishDrawingPagesToPDF): Created a CGPDFDocument from the data sent to us by the
772         web process and called -[WKWebView _setPrintedDocument:].
773         * UIProcess/ios/WKPDFView.h:
774         * UIProcess/ios/WKPDFView.mm:
775         (-[WKPDFView pdfDocument]): Returned the underlying CGPDFDocument.
776         (-[WKPDFView documentData]): Deleted.
777         * UIProcess/ios/WebPageProxyIOS.mm:
778         (WebKit::WebPageProxy::didFinishDrawingPagesToPDF):
779         * WebKit2.xcodeproj/project.pbxproj:
780         * WebProcess/WebPage/WebPage.cpp:
781         (WebKit::WebPage::computePagesForPrinting): Changed to call computePagesForPrintingImpl.
782         (WebKit::WebPage::computePagesForPrintingImpl): Moved the common logic of computePagesForPrinting to here so it
783         could be called by computePagesForPrintingAndStartDrawingToPDF.
784         (WebKit::WebPage::drawPagesToPDF): Changed to call drawPagesToPDFImpl
785         (WebKit::WebPage::drawPagesToPDFImpl): Moved the common logic of drawPagesToPDF to here so it could be called
786         by computePagesForPrintingAndStartDrawingToPDF.
787         * WebProcess/WebPage/WebPage.h:
788         * WebProcess/WebPage/WebPage.messages.in:
789         * WebProcess/WebPage/ios/WebPageIOS.mm:
790         (WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): Computed page rects and returned them as a
791         synchronous response. Afterwards called drawPagesToPDFImpl() and returned the PDF data by sending
792         WebPageProxy::DidFinishDrawingPagesToPDF.
793
794 2014-05-21  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
795
796         [EFL] Turn on ENABLE_CSS_FILTERS
797         https://bugs.webkit.org/show_bug.cgi?id=133153
798
799         Reviewed by Gyuyoung Kim.
800
801         Make WebKit2 compile after r166741 when CSS_FILTERS are enabled.
802
803         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
804         (IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
805
806 2014-05-21  Brady Eidson  <beidson@apple.com>
807
808         Special handling of telephone number detection menu.
809         <rdar://problem/16967971> and https://bugs.webkit.org/show_bug.cgi?id=133143
810
811         Reviewed by Geoff Garen.
812
813         Add a bool to ContextMenuContextData to represent telephone number menus:
814         * Shared/ContextMenuContextData.cpp:
815         (WebKit::ContextMenuContextData::ContextMenuContextData):
816         (WebKit::ContextMenuContextData::operator=):
817         (WebKit::ContextMenuContextData::encode):
818         (WebKit::ContextMenuContextData::decode):
819         * Shared/ContextMenuContextData.h:
820         (WebKit::ContextMenuContextData::ContextMenuContextData):
821         (WebKit::ContextMenuContextData::isTelephoneNumberContext):
822
823         * UIProcess/mac/WebContextMenuProxyMac.mm:
824         (WebKit::WebContextMenuProxyMac::showContextMenu): If the menu is a telephone
825           number menu then display it using a specific AppKit API.
826
827         * UIProcess/mac/WebPageProxyMac.mm:
828         (WebKit::WebPageProxy::showTelephoneNumberMenu): Filter the array of menu items
829           through a new WKSI call, and then show it using a telephone number context.
830
831 2014-05-21  Alexey Proskuryakov  <ap@apple.com>
832
833         [Mac] REGRESSION (Async text input): Asian text input doesn't work in Flash
834         https://bugs.webkit.org/show_bug.cgi?id=133128
835         <rdar://problem/16890920>
836
837         Reviewed by Anders Carlsson.
838
839         * UIProcess/API/mac/WKView.mm:
840         (-[WKView _interpretKeyEvent:completionHandler:]): Added a separate code path for
841         plug-in input. Before async text input, we used to provide a nil input context due
842         to having _data->_interpretKeyEventsParameters while this function was executing,
843         and thus took a shortcut. The new behavior is different from pre-async in that
844         we don't collect commands at all, but I couldn't find any case where that mattered.
845         (-[WKView inputContext]): The _collectedKeypressCommands check was not a correct
846         replacement for _interpretKeyEventsParameters one, because this variable is not
847         always set within -_interpretKeyEvent:completionHandler:.
848
849         * UIProcess/mac/WKTextInputWindowController.mm:
850         (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
851         While at it, fixed a separate issue with Cangjie predictive input. We shouldn't
852         keep prediction pop-up on screen after hiding the bottom input window.
853
854 2014-05-16  Martin Robinson  <mrobinson@igalia.com>
855
856         [CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
857         https://bugs.webkit.org/show_bug.cgi?id=132819
858
859         Reviewed by Carlos Garcia Campos.
860
861         * PlatformEfl.cmake: No need to prefix EXEC_INSTALL_DIR with the prefix any longer.
862         * PlatformGtk.cmake: No longer use CMAKE_INSTALL_FULL_FOO variables, instead using the WebKit-specific ones.
863         * efl/EWebKit2Config.cmake.in: Ditto.
864         * efl/ewebkit2.pc.in: Instead of hard-coding the path to the library installation directory use LIB_INSTALL_DIR.
865         * webkit2gtk-web-extension.pc.in: No longer use the pkg-config only variables. Instead use
866         the common CMake ones.
867         * webkit2gtk.pc.in: Ditto.
868
869 2014-05-21  Carlos Garcia Campos  <cgarcia@igalia.com>
870
871         REGRESSION(r168625): [GTK] Assertion failure in LocalStorageDatabaseTracker
872         https://bugs.webkit.org/show_bug.cgi?id=133118
873
874         Reviewed by Philippe Normand.
875
876         Call WebContext::applyPlatformSpecificConfigurationDefaults() to
877         initialize the WebContextConfiguration before creating the default WebContext.
878
879         * UIProcess/API/gtk/WebKitWebContext.cpp:
880         (createDefaultWebContext):
881
882 2014-05-21  Shivakumar JM  <shiva.jm@samsung.com>
883
884         [WebKit2] Cleanup the build from unused variable in WebProcess module
885         https://bugs.webkit.org/show_bug.cgi?id=133062
886
887         Reviewed by Csaba Osztrogonác.
888
889         Fix unused parameter by using UNUSED_PARAM macro
890
891         * WebProcess/UserContent/WebUserContentController.cpp:
892         (WebKit::WebUserContentController::addUserScriptMessageHandlers):
893         (WebKit::WebUserContentController::removeUserScriptMessageHandler):
894
895 2014-05-20  Enrica Casucci  <enrica@apple.com>
896
897         REGRESSION (WK2): Tapping on the input field in duckduckgo.com shows the keyboard but not the caret.
898         https://bugs.webkit.org/show_bug.cgi?id=133140
899         <rdar://problem/16980898>
900
901         Reviewed by Benjamin Poulain.
902
903         When a page focuses a field on load, we receive the call to startAssistingNode
904         but we don't create a text interaction assistant if the focus is not originated
905         by a user action. Upon receiving the selection change notification we don't
906         call the text interaction assistant, since we don't have one, but we do call
907         the web selection assistant. We don't have any valid rects for web selection
908         and we clear the selection on the page, causing the caret not to appear and
909         the typing to have no effect.
910
911         * UIProcess/ios/WKContentViewInteraction.mm:
912         (-[WKContentView _updateChangedSelection]):
913
914 2014-05-20  Dean Jackson  <dino@apple.com>
915
916         [Mac] Allow popup menus to override default appearance
917         https://bugs.webkit.org/show_bug.cgi?id=133129
918
919         Reviewed by Tim Horton.
920
921         Add an extra "hideArrows" flag to PlatformPopupMenuData
922         and replace the call to WKPopupMenuWithSize with WKPopupMenu.
923
924         * Shared/PlatformPopupMenuData.cpp: Encode and decode the new data value.
925         (WebKit::PlatformPopupMenuData::encode):
926         (WebKit::PlatformPopupMenuData::decode):
927         * Shared/PlatformPopupMenuData.h: Add hideArrows boolean.
928         * UIProcess/mac/WebPopupMenuProxyMac.mm:
929         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
930         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
931         (WebKit::WebPopupMenu::setUpPlatformData): The hideArrows flag is
932         true if we don't have the default appearance.
933
934 2014-05-20  Eric Carlson  <eric.carlson@apple.com>
935
936         [Mac] do not deactivate an audio session that has running I/O
937         https://bugs.webkit.org/show_bug.cgi?id=133127
938
939         Reviewed by Jer Noble.
940
941         * WebProcess/WebPage/WebPage.cpp:
942         (WebKit::WebPage::WebPage): Settings::setShouldManageAudioSession renamed to 
943             setShouldManageAudioSessionCategory, deal with it.
944
945 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
946
947         REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes
948         https://bugs.webkit.org/show_bug.cgi?id=133106
949         <rdar://problem/16967648>
950
951         Reviewed by Sam Weinig.
952
953         Fix regression from r169063. That commit removed scrolledContentsLayers from 
954         frame scrolling nodes, but they do actually use them.
955         
956         So put them back; not in the base class, because they have a somewhat different
957         meaning for overflow scrolling and frame scrolling.
958
959         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
960         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
961         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
962         (WebKit::RemoteScrollingTreeTextStream::dump):
963         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
964         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
965
966 2014-05-20  Alexey Proskuryakov  <ap@apple.com>
967
968         [Mac] WebProcess doesn't follow localization of UI process when run as a service
969         https://bugs.webkit.org/show_bug.cgi?id=133126
970         <rdar://problem/13396515>
971         <rdar://problem/16561084>
972
973         Reviewed by Sam Weinig and Tim Horton.
974
975         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
976         (WebKit::handleXPCBootstrap):
977         (main):
978         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
979         (WebKit::handleXPCBootstrap):
980         (main):
981         Set localization very early in process lifetime (in development builds, that's
982         even before WebKit framework is loaded).
983
984         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService):
985         Pass UI process localization to the service, computing it in the same way we do
986         for child processes.
987
988 2014-05-20  Anders Carlsson  <andersca@apple.com>
989
990         Fix a header comment
991         https://bugs.webkit.org/show_bug.cgi?id=133123
992         <rdar://problem/16973783>
993
994         Reviewed by Geoffrey Garen.
995
996         * UIProcess/API/Cocoa/WKUserContentController.h:
997
998 2014-05-20  Carlos Garcia Campos  <cgarcia@igalia.com>
999
1000         [GTK] WebKitWebPage::send-request always pass a valid pointer for redirected response
1001         https://bugs.webkit.org/show_bug.cgi?id=133119
1002
1003         Reviewed by Sergio Villar Senin.
1004
1005         The problem is that we were checking whether the passed in
1006         WKURLResponseRef is NULL or not, but it's always a valid object
1007         that can contain a NULL WebCore::ResourceResponse.
1008
1009         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1010         (willSendRequestForFrame): Pass NULL as redirect-response
1011         parameter of WebKitWebPage::send-request signal when the
1012         WebCore::ResourceResponse of the passed in WKURLResponseRef is NULL.
1013
1014 2014-05-20  Antti Koivisto  <antti@apple.com>
1015
1016         Double-tap zoom does not take obscuring insets into account
1017         https://bugs.webkit.org/show_bug.cgi?id=133116
1018         <rdar://problem/16765604>
1019
1020         Reviewed by Anders Carlsson.
1021
1022         * UIProcess/API/Cocoa/WKWebView.mm:
1023         (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
1024         
1025             Compute the zoom target taking insets into account.
1026
1027 2014-05-19  Gavin Barraclough  <baraclough@apple.com>
1028
1029         WebKit2/iOS: parented view should be considered hidden if app is backgrounded
1030         https://bugs.webkit.org/show_bug.cgi?id=133099
1031         radar://16942183
1032
1033         Reviewed by Simon Fraser.
1034
1035         * UIProcess/ios/PageClientImplIOS.mm:
1036         (WebKit::PageClientImpl::isViewWindowActive):
1037             - implemented in terms of isViewVisible.
1038             - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
1039         (WebKit::PageClientImpl::isViewFocused):
1040             - implemented in terms of isViewWindowActive.
1041             - FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
1042         (WebKit::PageClientImpl::isViewVisible):
1043             - take UIApplication applicationState into account in determining visibility.
1044         (WebKit::PageClientImpl::isViewVisibleOrOccluded):
1045             - implemented in terms of isViewVisible.
1046         (WebKit::PageClientImpl::isVisuallyIdle):
1047             - implemented in terms of isViewVisible.
1048         * UIProcess/ios/WKContentView.mm:
1049         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
1050             - register for UIApplicationDidEnterBackgroundNotification.
1051         (-[WKContentView _applicationDidEnterBackground:]):
1052         (-[WKContentView _applicationWillEnterForeground:]):
1053             - when the application state changes all flags except IsInWindow may be affected.
1054
1055 2014-05-19  Enrica Casucci  <enrica@apple.com>
1056
1057         WK2 iOS: Pressing the form navigation button causes the keyboard to be dismissed.
1058         https://bugs.webkit.org/show_bug.cgi?id=133100
1059         <rdar://problem/16808673>
1060
1061         Reviewed by Benjamin Poulain.
1062
1063         The call to focusNextAssistedNode is the result of a user action, since
1064         it is called when the user pressed the form navigation buttons.
1065         Therefore we must set m_userIsInteracting to true before changing the focus
1066         to make sure the focus change is honored.
1067
1068         * WebProcess/WebPage/ios/WebPageIOS.mm:
1069         (WebKit::WebPage::focusNextAssistedNode):
1070
1071 2014-05-19  Beth Dakin  <bdakin@apple.com>
1072
1073         TelephoneNumberOverlayController should use a modern loop for text quad bounding 
1074         boxes
1075         https://bugs.webkit.org/show_bug.cgi?id=133096
1076
1077         Reviewed by Anders Carlsson.
1078
1079         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
1080         (WebKit::textQuadsToBoundingRectForRange):
1081
1082 2014-05-19  Jeremy Jones  <jeremyj@apple.com>
1083
1084         PlatformCALayerRemoteCustom properties aren't initialized to match the PlatformLayer
1085         https://bugs.webkit.org/show_bug.cgi?id=133025
1086
1087         Reviewed by Simon Fraser.
1088
1089         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
1090         (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
1091         Initialize PlatformCALayerRemote properties from the PlatformLayer.
1092
1093 2014-05-19  Benjamin Poulain  <bpoulain@apple.com>
1094
1095         [iOS][WK2] When a page relayout on dynamic resize, keep the same relative width in view
1096         https://bugs.webkit.org/show_bug.cgi?id=133026
1097         <rdar://problem/16833971>
1098
1099         Reviewed by Simon Fraser.
1100
1101         When a page does not relayout, we keep the same width in view.
1102         When a page relayout, we should keep the same relative width in view.
1103
1104         * WebProcess/WebPage/ios/WebPageIOS.mm:
1105         (WebKit::isResponsiveDesignWithContentLargerThanLayout):
1106         (WebKit::WebPage::dynamicViewportSizeUpdate):
1107
1108 2014-05-19  Benjamin Poulain  <benjamin@webkit.org>
1109
1110         [WK2] Add some missing state reset on crash
1111         https://bugs.webkit.org/show_bug.cgi?id=133036
1112
1113         Reviewed by Sam Weinig.
1114
1115         * UIProcess/WebPageProxy.cpp:
1116         (WebKit::WebPageProxy::resetState):
1117         The missing reset for m_isTrackingTouchEvents would cause the WebPageProxy to send
1118         touch events when it shouldn't. That would only be for an active touch sequence.
1119
1120         The missing reset m_lastVisibleContentRectUpdate would prevent pushing the new UI state
1121         to the new page on reload, that is very bad.
1122
1123         Also moved m_videoFullscreenManager to be in the same order as initialization, and invalidate
1124         the callbacks for dictation.
1125
1126 2014-05-19  Benjamin Poulain  <bpoulain@apple.com>
1127
1128         [iOS][WK2] Move scale noise filtering to the WebProcess
1129         https://bugs.webkit.org/show_bug.cgi?id=133021
1130
1131         Reviewed by Darin Adler.
1132
1133         Filtering in the UIProcess was stupid. It forces to handle a third kind of scale just for updates.
1134
1135         The WebProcess already adjusts the input scale based on the viewport. Changing the input scale at that level
1136         is already supported. It is a better place to have the filtering.
1137
1138         * UIProcess/ios/WKContentView.mm:
1139         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
1140         * WebProcess/WebPage/ios/WebPageIOS.mm:
1141         (WebKit::WebPage::updateVisibleContentRects):
1142
1143 2014-05-19  Simon Fraser  <simon.fraser@apple.com>
1144
1145         Split scrolling tree ScrollingNodes into FrameScrollingNodes and OverflowScrollingNodes
1146         https://bugs.webkit.org/show_bug.cgi?id=133022
1147
1148         Reviewed by Sam Weinig.
1149         
1150         In both the scrolling state tree and the scrolling tree, split the "scrolling nodes"
1151         into FrameScrolling and OverflowScrolling nodes.
1152         
1153         Move what was the "viewportSize" property onto the base class for the scrolling
1154         nodes, calling it "scrollableAreaSize".
1155         
1156         Make minimum/maximumScrollPosition() virtual so we can share more code (and there
1157         is more code sharing to be done in future).
1158
1159         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
1160         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
1161         (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
1162         (ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
1163         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
1164         (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
1165         (ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode):
1166         (WebKit::encodeNodeAndDescendants):
1167         (WebKit::RemoteScrollingCoordinatorTransaction::decode):
1168         (WebKit::RemoteScrollingTreeTextStream::dump):
1169         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
1170         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1171         * UIProcess/Scrolling/RemoteScrollingTree.cpp:
1172         (WebKit::RemoteScrollingTree::createNode):
1173         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
1174         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollLayer):
1175         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
1176         * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
1177         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
1178         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
1179         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
1180         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):
1181         (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
1182         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
1183         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
1184
1185 2014-05-19  Alexey Proskuryakov  <ap@apple.com>
1186
1187         [Mac] Fix a typo in plug-in sandbox
1188         https://bugs.webkit.org/show_bug.cgi?id=133074
1189
1190         Reviewed by Anders Carlsson.
1191
1192         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1193
1194 2014-05-16  Andy Estes  <aestes@apple.com>
1195
1196         [WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
1197         https://bugs.webkit.org/show_bug.cgi?id=133010
1198
1199         Reviewed by Geoffrey Garen.
1200
1201         If a thread is blocked on m_waitForMessageCondition and we lose our connection, treat that like we do a timeout.
1202
1203         * Platform/IPC/Connection.cpp:
1204         (IPC::Connection::Connection):
1205         (IPC::Connection::waitForMessage):
1206         (IPC::Connection::connectionDidClose):
1207         * Platform/IPC/Connection.h:
1208
1209 2014-05-19  Mark Rowe  <mrowe@apple.com>
1210
1211         Build fix after r169023.
1212
1213         * Shared/API/Cocoa/WebKitPrivate.h: Stop including headers that no longer exist.
1214         I hope for weinig's sake that no-one was relying on them.
1215
1216 2014-05-18  Anders Carlsson  <andersca@apple.com>
1217
1218         Relax an assertion when creating document loaders
1219         https://bugs.webkit.org/show_bug.cgi?id=133058
1220
1221         Reviewed by Sam Weinig.
1222
1223         When navigating back/forward items recursively, createDocumentLoader will be called
1224         for subframes before main frames so only associate the navigation with main frames.
1225
1226         * WebProcess/WebPage/WebPage.cpp:
1227         (WebKit::WebPage::createDocumentLoader):
1228
1229 2014-05-18  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
1230
1231         CMake Buildfix after r169023.
1232
1233         Reviewed by Csaba Osztrogonác.
1234
1235         * CMakeLists.txt: Add new files after r168994.
1236
1237 2014-05-18  Sam Weinig  <sam@webkit.org>
1238
1239         [WebKit2] Implement ScriptMessageHandlers
1240         https://bugs.webkit.org/show_bug.cgi?id=133053
1241
1242         Reviewed by Anders Carlsson.
1243
1244         * DerivedSources.make:
1245         * Scripts/webkit2/messages.py:
1246         (struct_or_class):
1247         (argument_coder_headers_for_type):
1248         (headers_for_type):
1249         * UIProcess/API/Cocoa/WKScriptMessage.mm:
1250         (-[WKScriptMessage _initWithBody:webView:name:]):
1251         (-[WKScriptMessage body]):
1252         (-[WKScriptMessage webView]):
1253         (-[WKScriptMessage name]):
1254         (-[WKScriptMessage _scriptWorld]): Deleted.
1255         * UIProcess/API/Cocoa/WKScriptMessageInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKScriptMessagePrivate.h.
1256         * UIProcess/API/Cocoa/WKScriptMessagePrivate.h: Removed.
1257         * UIProcess/API/Cocoa/WKUserContentController.mm:
1258         (-[WKUserContentController addScriptMessageHandler:name:]):
1259         (-[WKUserContentController removeScriptMessageHandlerForName:]):
1260         (-[WKUserContentController _addScriptMessageHandler:name:world:]): Deleted.
1261         (-[WKUserContentController _removeScriptMessageHandlerForName:world:]): Deleted.
1262         * UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
1263         * UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Removed.
1264         * UIProcess/API/Cocoa/WKWebView.mm:
1265         (pageToViewMap):
1266         (fromWebPageProxy):
1267         (-[WKWebView initWithFrame:configuration:]):
1268         (-[WKWebView dealloc]):
1269         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1270         * UIProcess/UserContent/WebScriptMessageHandler.cpp: Added.
1271         (WebKit::WebScriptMessageHandlerHandle::encode):
1272         (WebKit::WebScriptMessageHandlerHandle::decode):
1273         (WebKit::generateIdentifier):
1274         (WebKit::WebScriptMessageHandler::create):
1275         (WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
1276         (WebKit::WebScriptMessageHandler::~WebScriptMessageHandler):
1277         * UIProcess/UserContent/WebScriptMessageHandler.h: Added.
1278         (WebKit::WebScriptMessageHandler::Client::~Client):
1279         (WebKit::WebScriptMessageHandler::handle):
1280         (WebKit::WebScriptMessageHandler::identifier):
1281         (WebKit::WebScriptMessageHandler::name):
1282         (WebKit::WebScriptMessageHandler::client):
1283         * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
1284         (WebKit::WebUserContentControllerProxy::addProcess):
1285         (WebKit::WebUserContentControllerProxy::removeProcess):
1286         (WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
1287         (WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
1288         (WebKit::WebUserContentControllerProxy::didPostMessage):
1289         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1290         * UIProcess/UserContent/WebUserContentControllerProxy.messages.in: Added.
1291         * WebKit2.xcodeproj/project.pbxproj:
1292         * WebProcess/UserContent/WebUserContentController.cpp:
1293         (WebKit::WebUserMessageHandlerDescriptorProxy::create):
1294         (WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
1295         (WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):
1296         (WebKit::WebUserMessageHandlerDescriptorProxy::descriptor):
1297         (WebKit::WebUserMessageHandlerDescriptorProxy::identifier):
1298         (WebKit::WebUserMessageHandlerDescriptorProxy::WebUserMessageHandlerDescriptorProxy):
1299         (WebKit::WebUserContentController::addUserScriptMessageHandlers):
1300         (WebKit::WebUserContentController::removeUserScriptMessageHandler):
1301         * WebProcess/UserContent/WebUserContentController.h:
1302         * WebProcess/UserContent/WebUserContentController.messages.in:
1303
1304 2014-05-18  Rik Cabanier  <cabanier@adobe.com>
1305
1306         support for navigator.hardwareConcurrency
1307         https://bugs.webkit.org/show_bug.cgi?id=132588
1308
1309         Reviewed by Filip Pizlo.
1310
1311         * Configurations/FeatureDefines.xcconfig:
1312
1313 2014-05-18  Anders Carlsson  <andersca@apple.com>
1314
1315         Implement Navigations for all methods declared returning one
1316         https://bugs.webkit.org/show_bug.cgi?id=133048
1317         <rdar://problem/16830064>
1318
1319         Reviewed by Sam Weinig.
1320
1321         * UIProcess/API/Cocoa/WKWebView.mm:
1322         (-[WKWebView goToBackForwardListItem:]):
1323         (-[WKWebView goBack]):
1324         (-[WKWebView goForward]):
1325         (-[WKWebView reload]):
1326         (-[WKWebView reloadFromOrigin]):
1327         Create and return navigations.
1328
1329         (-[WKWebView _reload]):
1330         Call -[WKWebView reload].
1331
1332         * UIProcess/Cocoa/NavigationState.h:
1333         * UIProcess/Cocoa/NavigationState.mm:
1334         (WebKit::NavigationState::createBackForwardNavigation):
1335         Create a back/forward navigation.
1336
1337         (WebKit::NavigationState::createReloadNavigation):
1338         Create a reload navigation.
1339
1340         * UIProcess/WebPageProxy.cpp:
1341         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1342         Generate a navigation ID and send it with the GoToBackForwardItem message.
1343
1344         (WebKit::WebPageProxy::reload):
1345         Return a navigation ID.
1346
1347         (WebKit::WebPageProxy::goForward):
1348         Generate a navigation ID and send it with the GoForward message.
1349         
1350         (WebKit::WebPageProxy::goBack):
1351         Generate a navigation ID and send it with the GoBack message.
1352
1353         (WebKit::WebPageProxy::goToBackForwardItem):
1354         Generate a navigation ID and send it with the GoToBackForwardItem message.
1355
1356         * UIProcess/WebPageProxy.h:
1357         Return navigation IDs where appropriate.
1358
1359         * UIProcess/cf/WebPageProxyCF.cpp:
1360         (WebKit::WebPageProxy::restoreFromSessionStateData):
1361         Generate a navigation ID and send it with the RestoreSessionAndNavigateToCurrentItem message.
1362         
1363         * WebProcess/WebPage/WebPage.cpp:
1364         (WebKit::WebPage::goForward):
1365         (WebKit::WebPage::goBack):
1366         (WebKit::WebPage::goToBackForwardItem):
1367         Set up the pending navigation ID.
1368
1369         (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
1370         Call goToBackForwardItem with a navigation ID.
1371
1372         * WebProcess/WebPage/WebPage.h:
1373         Add navigation IDs.
1374
1375         * WebProcess/WebPage/WebPage.messages.in:
1376         Add navigation IDs.
1377
1378 2014-05-18  Commit Queue  <commit-queue@webkit.org>
1379
1380         Unreviewed, rolling out r169001.
1381         https://bugs.webkit.org/show_bug.cgi?id=133050
1382
1383         We can't expose the C SPI from WKWebView (Requested by
1384         andersca on #webkit).
1385
1386         Reverted changeset:
1387
1388         "Need a way to get a WKPageRef from a WKWebView"
1389         https://bugs.webkit.org/show_bug.cgi?id=133015
1390         http://trac.webkit.org/changeset/169001
1391
1392 2014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1393
1394         [WK2][GTK] Buildfix after r168999.
1395
1396         Reviewed by Csaba Osztrogonác.
1397
1398         * UIProcess/gtk/WebContextGtk.cpp:
1399         (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
1400         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
1401
1402 2014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1403
1404         [WK2][EFL] Buildfix after r168999.
1405
1406         Reviewed by Csaba Osztrogonác.
1407
1408         * UIProcess/efl/WebContextEfl.cpp:
1409         (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
1410         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
1411
1412 2014-05-18  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1413
1414         [WK2][cmake] Buildfix after r168994.
1415
1416         Reviewed by Csaba Osztrogonác.
1417
1418         * CMakeLists.txt: Added new files to the build system introduced in r168994.
1419
1420 2014-05-17  Alexey Proskuryakov  <ap@apple.com>
1421
1422         REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
1423         https://bugs.webkit.org/show_bug.cgi?id=133007
1424         <rdar://problem/13702706>
1425
1426         appcache tests often fail on the Mac WebKit2 bot
1427         https://bugs.webkit.org/show_bug.cgi?id=82061
1428
1429         Reviewed by Maciej Stachowiak.
1430
1431         * WebProcess/Network/WebResourceLoader.cpp:
1432         (WebKit::WebResourceLoader::willSendRequest):
1433         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
1434         (WebKit::WebResourceLoader::didFailResourceLoad):
1435         Perform the same appcache checks that ResourceHandleClient implementation in ResourceLoader
1436         does. We should eventually come up with a way to share the code. Perhaps add a class that
1437         isolates ResourceLoader from networking details? But ResourceLoader was itself supposed
1438         to be the class that isolates DocumentLoader from networking details. So, unsure.
1439
1440 2014-05-17  Jae Hyun Park  <jaepark@webkit.org>
1441
1442         [EFL] Remove m_contentPosition from PageViewportControllerClientEfl
1443         https://bugs.webkit.org/show_bug.cgi?id=132774
1444
1445         Reviewed by Anders Carlsson.
1446
1447         m_contentPosition is not used anywhere. So, this patch removes
1448         m_contentPosition and reduces one unnecessary assignment in
1449         setViewportPosition. Also, it renames contentsPoint to contentsPosition.
1450
1451         * UIProcess/PageViewportControllerClient.h:
1452         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
1453         (WebKit::PageViewportControllerClientEfl::setViewportPosition):
1454         * UIProcess/efl/PageViewportControllerClientEfl.h:
1455
1456 2014-05-17  David Kilzer  <ddkilzer@apple.com>
1457
1458         Need a way to get a WKPageRef from a WKWebView
1459         <http://webkit.org/b/133015>
1460
1461         Reviewed by Benjamin Poulain.
1462
1463         * UIProcess/API/Cocoa/WKWebView.mm:
1464         (-[WKWebView _pageRef]): Added.
1465         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
1466         (-[WKWebView _pageRef]): Added declaration.
1467
1468 2014-05-17  Anders Carlsson  <andersca@apple.com>
1469
1470         Give user scripts custom URLs
1471         https://bugs.webkit.org/show_bug.cgi?id=133035
1472
1473         Reviewed by Beth Dakin.
1474
1475         * UIProcess/API/Cocoa/WKUserContentController.mm:
1476         (-[WKUserContentController addUserScript:]):
1477         Create a user-script:<number> URL for user scripts.
1478
1479         * UIProcess/API/Cocoa/WKUserScript.h:
1480         Move the init method after the properties.
1481
1482 2014-05-17  Anders Carlsson  <andersca@apple.com>
1483
1484         Replace WKContextSetDatabaseDirectory with two WKContextConfiguration parameters
1485         https://bugs.webkit.org/show_bug.cgi?id=133033
1486         <rdar://problem/16830143>
1487
1488         Reviewed by Sam Weinig.
1489
1490         * Shared/WebProcessCreationParameters.cpp:
1491         (WebKit::WebProcessCreationParameters::encode):
1492         (WebKit::WebProcessCreationParameters::decode):
1493         * Shared/WebProcessCreationParameters.h:
1494         Rename databaseDirectory to webSQLDatabaseDirectory to better indicate the directory type.
1495
1496         * UIProcess/API/C/WKContext.cpp:
1497         (WKContextSetDatabaseDirectory): Deleted.
1498         This is no longer needed.
1499
1500         * UIProcess/API/C/WKContextConfigurationRef.cpp:
1501         (WKContextConfigurationCopyIndexedDBDatabaseDirectory):
1502         (WKContextConfigurationSetIndexedDBDatabaseDirectory):
1503         (WKContextConfigurationCopyWebSQLDatabaseDirectory):
1504         (WKContextConfigurationSetWebSQLDatabaseDirectory):
1505         * UIProcess/API/C/WKContextConfigurationRef.h:
1506         Add setters and getters.
1507
1508         * UIProcess/API/C/WKContextPrivate.h:
1509         Remove WKContextSetDatabaseDirectory.
1510
1511         * UIProcess/APIContextConfiguration.cpp:
1512         (API::ContextConfiguration::webContextConfiguration):
1513         Set m_indexedDBDatabaseDirectory and m_webSQLDatabaseDirectory on the configuration.
1514
1515         * UIProcess/APIContextConfiguration.h:
1516         (API::ContextConfiguration::indexedDBDatabaseDirectory):
1517         (API::ContextConfiguration::setIndexedDBDatabaseDirectory):
1518         (API::ContextConfiguration::webSQLDatabaseDirectory):
1519         (API::ContextConfiguration::setWebSQLDatabaseDirectory):
1520         Add getters and setters to the C++ part of WKContextConfigurationRef.
1521
1522         * UIProcess/WebContext.cpp:
1523         (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
1524         Set webSQLDatabaseDirectory and indexedDBDatabaseDirectory.
1525
1526         (WebKit::WebContext::WebContext):
1527         Initialize m_webSQLDatabaseDirectory and m_indexedDBDatabaseDirectory.
1528
1529         (WebKit::WebContext::ensureDatabaseProcess):
1530         Set parameters.indexedDatabaseDirectory from m_indexedDBDatabaseDirectory.
1531
1532         (WebKit::WebContext::createNewWebProcess):
1533         Set parameters.webSQLDatabaseDirectory from m_webSQLDatabaseDirectory.
1534
1535         * UIProcess/mac/WebContextMac.mm:
1536         (WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory):
1537         Rename this to indicate that it's about WebSQL databases.
1538
1539         (WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
1540         Add this.
1541
1542         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1543         (WebKit::WebDatabaseManager::initialize):
1544         Update for WebProcessCreationParameters rename.
1545
1546         * WebProcess/cocoa/WebProcessCocoa.mm:
1547         (WebKit::WebProcess::platformInitializeWebProcess):
1548         Update for WebProcessCreationParameters rename.
1549
1550 2014-05-17  Brent Fulgham  <bfulgham@apple.com>
1551
1552         [Phone Number Detection] drop-down menu in the phone number detection box doesn't appear.
1553         https://bugs.webkit.org/show_bug.cgi?id=133024
1554
1555         Reviewed by Sam Weinig.
1556
1557         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
1558         (WebKit::TelephoneNumberOverlayController::drawRect): Don't clear the set of found phone numbers each
1559         time we call drawRect. This gets called ~9 times per screen refresh, so end up with no active
1560         phone numbers to interact with.
1561
1562 2014-05-17  Alexey Proskuryakov  <ap@apple.com>
1563
1564         NetworkProcess can repeatedly crash handling Blob messages after any unrelated crash
1565         https://bugs.webkit.org/show_bug.cgi?id=133032
1566         <rdar://problem/16951630>
1567
1568         Reviewed by Geoffrey Garen.
1569
1570         Replaced assertions with runtime checks. This can happen if NetworkProcess previously
1571         crashed for any unrelated reason.
1572
1573         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1574         (WebKit::NetworkBlobRegistry::registerBlobURL):
1575         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
1576         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
1577
1578 2014-05-17  Anders Carlsson  <andersca@apple.com>
1579
1580         -[WKWebView dealloc] should close the page
1581         https://bugs.webkit.org/show_bug.cgi?id=133031
1582         <rdar://problem/16929815>
1583
1584         Reviewed by Simon Fraser.
1585
1586         * UIProcess/API/Cocoa/WKWebView.mm:
1587         (-[WKWebView dealloc]):
1588
1589 2014-05-16  Anders Carlsson  <andersca@apple.com>
1590
1591         Expose WKUserScript as API
1592         https://bugs.webkit.org/show_bug.cgi?id=133017
1593         <rdar://problem/16948059>
1594
1595         Reviewed by Sam Weinig.
1596
1597         * DerivedSources.make:
1598         Add WebUserContentController.
1599
1600         * Shared/API/Cocoa/WebKit.h:
1601         Add WKUserScript.h
1602
1603         * Shared/API/c/WKSharedAPICast.h:
1604         (WebKit::toUserScriptInjectionTime):
1605         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1606
1607         * Shared/API/c/WKUserScriptInjectionTime.h:
1608         Rename WKUserScriptInjectionTime to _WKUserScriptInjectionTime to free up the name for the Objective-C API
1609
1610         * Shared/WebPageCreationParameters.cpp:
1611         (WebKit::WebPageCreationParameters::encode):
1612         Encode the user content controller ID.
1613
1614         (WebKit::WebPageCreationParameters::decode):
1615         Decode the user content controller ID.
1616
1617         * Shared/WebPageCreationParameters.h:
1618         Add userContentControllerID.
1619
1620         * UIProcess/API/C/WKPageGroup.cpp:
1621         (WKPageGroupAddUserScript):
1622         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1623
1624         * UIProcess/API/C/WKPageGroup.h:
1625         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1626
1627         * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
1628         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1629
1630         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
1631         (-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]):
1632         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1633
1634         * UIProcess/API/Cocoa/WKUserContentController.h:
1635         Add new methods.
1636
1637         * UIProcess/API/Cocoa/WKUserContentController.mm:
1638         (-[WKUserContentController init]):
1639         Create the WebUserContentControllerProxy object and user scripts array.
1640
1641         (-[WKUserContentController userScripts]):
1642         Return the user scripts array.
1643
1644         (toWebCoreUserScriptInjectionTime):
1645         Helper for converting from a WKUserScriptInjectionTime enum to WebCore::UserScriptInjectionTime.
1646
1647         (-[WKUserContentController addUserScript:]):
1648         Call through to the _userContentControllerProxy object.
1649
1650         (-[WKUserContentController removeAllUserScripts]):
1651         Call through to the _userContentControllerProxy object.
1652         
1653         * UIProcess/API/Cocoa/WKUserContentControllerInternal.h: Added.
1654         Add WebUserContentControllerProxy ivar.
1655
1656         * UIProcess/API/Cocoa/WKUserScript.h: Added.
1657         Add new header.
1658
1659         * UIProcess/API/Cocoa/WKUserScript.mm:
1660         (-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
1661         Initialize the WKUserScript object.
1662
1663         (-[WKUserScript source]):
1664         (-[WKUserScript injectionTime]):
1665         (-[WKUserScript isForMainFrameOnly]):
1666         Add getters.
1667
1668         (-[WKUserScript copyWithZone:]):
1669         Since WKUserScript is immutable, just return a retained object.
1670
1671         * UIProcess/API/Cocoa/WKUserScriptInternal.h:
1672         Add ivars.
1673
1674         * UIProcess/API/Cocoa/WKWebView.mm:
1675         (-[WKWebView initWithFrame:configuration:]):
1676         Set the user content controller from the configuration.
1677
1678         * UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added.
1679         (WebKit::generateIdentifier):
1680         Return a unique identifier.
1681
1682         (WebKit::WebUserContentControllerProxy::create):
1683         Return a new WebUserContentControllerProxy object.
1684
1685         (WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
1686         Initialize m_identifier.
1687
1688         (WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
1689         Add destructor.
1690
1691         (WebKit::WebUserContentControllerProxy::addProcess):
1692         Add the process to the m_processes set. If it's the first time doing so, add the user scripts we know about.
1693
1694         (WebKit::WebUserContentControllerProxy::removeProcess):
1695         Remove the process from m_processes.
1696
1697         (WebKit::WebUserContentControllerProxy::addUserScript):
1698         Add the user script and let all the web processes know that it was added.
1699
1700         (WebKit::WebUserContentControllerProxy::removeAllUserScripts):
1701         Remove all user scripts and tell all the web processes about it.
1702         
1703         * UIProcess/UserContent/WebUserContentControllerProxy.h:
1704         Add new class.
1705
1706         * UIProcess/WebPageProxy.cpp:
1707         (WebKit::WebPageProxy::WebPageProxy):
1708         If the process is already running, add it to the user content controller.
1709
1710         (WebKit::WebPageProxy::close):
1711         If the process is running, remove it from the user content controller.
1712
1713         (WebKit::WebPageProxy::connectionWillOpen):
1714         Add the process to the user content controller.
1715
1716         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1717         Remove the process from the user content controller.
1718
1719         (WebKit::WebPageProxy::creationParameters):
1720         Pass along the user content controller ID when creating the web page.
1721
1722         * UIProcess/WebPageProxy.h:
1723         Add a WebUserContentControllerProxy object to the web page configuration.
1724
1725         * WebKit2.xcodeproj/project.pbxproj:
1726         Add new files.
1727
1728         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1729         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1730         Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
1731         
1732         * WebProcess/UserContent/WebUserContentController.cpp: Added.
1733         New class that manages a WebCore::UserContentController object.
1734
1735         (WebKit::WebUserContentController::getOrCreate):
1736         Look up (or create) a WebUserContentController object given its identifier.
1737
1738         (WebKit::WebUserContentController::WebUserContentController):
1739         Add ourselves as a message receiver.
1740
1741         (WebKit::WebUserContentController::~WebUserContentController):
1742         Remove ourselves as a message receiver.
1743
1744         (WebKit::WebUserContentController::addUserScripts):
1745         Add all passed in user scripts to the WebCore user content controller object.
1746
1747         (WebKit::WebUserContentController::removeAllUserScripts):
1748         Remove all user scripts from the WebCore user content controller object.
1749
1750         * WebProcess/UserContent/WebUserContentController.messages.in: Added.
1751         Add new messages file.
1752
1753         * WebProcess/WebPage/WebPage.cpp:
1754         (WebKit::WebPage::WebPage):
1755         Get a WebUserContentController object and pass it along to WebCore.
1756
1757         * WebProcess/WebPage/WebPage.h:
1758         Add WebUserContentController member.
1759
1760 2014-05-16  Piotr Grad  <p.grad@samsung.com>
1761
1762         [GTK] Build break after 168978.
1763         https://bugs.webkit.org/show_bug.cgi?id=133012.
1764
1765         Reviewed by Simon Fraser.
1766
1767         * UIProcess/API/gtk/WebKitSettings.cpp:
1768         (webKitSettingsConstructed):
1769
1770 2014-05-16  Simon Fraser  <simon.fraser@apple.com>
1771
1772         Put back a symbol removed in r168978 that Safari needs, but deprecate it.
1773
1774         Reviewed by Anders Carlsson.
1775
1776         * Shared/API/c/WKDeprecatedFunctions.cpp:
1777         (WKPreferencesSetRegionBasedColumnsEnabled):
1778         (WKPreferencesGetRegionBasedColumnsEnabled):
1779
1780 2014-05-16  Oliver Hunt  <oliver@apple.com>
1781
1782         Separate enabling sandbox extensions from the WEB_PROCESS_SANDBOX flag
1783         https://bugs.webkit.org/show_bug.cgi?id=133016
1784
1785         Reviewed by Alexey Proskuryakov.
1786
1787         Add a distinct SANDBOX_EXTENSIONS flag to guard sandbox extensions
1788         and switch over to it in the places that extensions are used.
1789
1790         * Shared/SandboxExtension.h:
1791         * Shared/mac/SandboxExtensionMac.mm:
1792         * UIProcess/WebPageProxy.cpp:
1793         (WebKit::WebPageProxy::didChooseFilesForOpenPanel):
1794         * WebKit2Prefix.h:
1795         * WebProcess/WebPage/WebPage.cpp:
1796         * WebProcess/WebPage/WebPage.h:
1797         * WebProcess/WebPage/WebPage.messages.in:
1798         * WebProcess/cocoa/WebProcessCocoa.mm:
1799         (WebKit::WebProcess::platformInitializeWebProcess):
1800
1801 2014-05-16  Benjamin Poulain  <bpoulain@apple.com>
1802
1803         [iOS][WK2] Add a heuristic to set the right horizontal offset on rotation for responsive websites
1804         https://bugs.webkit.org/show_bug.cgi?id=132937
1805         <rdar://problem/16710097>
1806
1807         Reviewed by Simon Fraser.
1808
1809         When responsive websites have the content size lay out larger than the minimal layout size,
1810         we should not keep the relative horizontal position into view,
1811         many of those websites have all the content on the left.
1812
1813         * WebProcess/WebPage/ios/WebPageIOS.mm:
1814         (WebKit::WebPage::dynamicViewportSizeUpdate):
1815
1816 2014-05-16  Benjamin Poulain  <bpoulain@apple.com>
1817
1818         [iOS][WK2] On dynamic resize, the content offset is contrained to the old content size
1819         https://bugs.webkit.org/show_bug.cgi?id=132972
1820
1821         Reviewed by Simon Fraser.
1822
1823         When we set the content offset, UIScrollView limits the value to the current valid range for
1824         content size. Since the content size was only updated after the animation, when the first frame
1825         comes in, the content offset would sometimes be limited to a smaller rect that the actual content.
1826
1827         To fix this, set the expected future content size before changing the offset.
1828
1829         During the animation, the content size could have changed arbitrarily. At the end of the animation,
1830         we take the actual frame and set the definite content size.
1831         Any update after that will be regular updates through didCommitLayer. 
1832
1833         * UIProcess/API/Cocoa/WKWebView.mm:
1834         (-[WKWebView _beginAnimatedResizeWithUpdates:]):
1835         (-[WKWebView _endAnimatedResize]):
1836
1837 2014-05-16  Simon Fraser  <simon.fraser@apple.com>
1838
1839         Remove "region-based columns" prefs
1840         https://bugs.webkit.org/show_bug.cgi?id=133006
1841         <rdar://problem/16945824>
1842
1843         Reviewed by Dave Hyatt.
1844
1845         Remove "region-based columns" prefs and related code, since this is only
1846         way to render columns now.
1847
1848         * Shared/WebPreferencesStore.h:
1849         * UIProcess/API/C/WKPreferences.cpp:
1850         (WKPreferencesSetRegionBasedColumnsEnabled): Deleted.
1851         (WKPreferencesGetRegionBasedColumnsEnabled): Deleted.
1852         * UIProcess/API/C/WKPreferencesRefPrivate.h:
1853         * WebProcess/WebPage/WebPage.cpp:
1854         (WebKit::WebPage::updatePreferences):
1855
1856 2014-05-16  Brent Fulgham  <bfulgham@apple.com>
1857
1858         Work around bug in Silverlight
1859         https://bugs.webkit.org/show_bug.cgi?id=133004
1860
1861         Reviewed by Anders Carlsson.
1862
1863         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
1864         (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Add low-resolution flag
1865         to user defaults prior to NSApplication invocation. This code was moved from
1866         PluginProcess::platformInitializeProcess.
1867         * PluginProcess/mac/PluginProcessMac.mm:
1868         (WebKit::PluginProcess::platformInitializeProcess): Move low-resolution flag
1869         setting to PluginProcessMainDelegate.
1870
1871 2014-05-16  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
1872
1873         [WK2] Change the remaining framework includes from WebKit2 to WebKit
1874         https://bugs.webkit.org/show_bug.cgi?id=132956
1875
1876         Reviewed by Sam Weinig.
1877
1878         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
1879         * NetworkProcess/unix/NetworkProcessMainUnix.h:
1880         * PluginProcess/unix/PluginProcessMainUnix.h:
1881         * Shared/API/c/cairo/WKImageCairo.h:
1882         * Shared/API/c/cf/WKURLRequestCF.h:
1883         * Shared/API/c/cf/WKURLResponseCF.h:
1884         * Shared/API/c/efl/WKArrayEfl.cpp:
1885         * Shared/API/c/efl/WKArrayEfl.h:
1886         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1887         * UIProcess/API/C/WKBatteryManager.h:
1888         * UIProcess/API/C/WKBatteryStatus.h:
1889         * UIProcess/API/C/WKGrammarDetail.h:
1890         * UIProcess/API/C/WKTextChecker.h:
1891         * UIProcess/API/C/WKVibration.h:
1892         * UIProcess/API/C/WKViewportAttributes.h:
1893         * UIProcess/API/C/cairo/WKIconDatabaseCairo.h:
1894         * UIProcess/API/C/efl/WKAPICastEfl.h:
1895         * UIProcess/API/C/efl/WKColorPickerResultListener.h:
1896         * UIProcess/API/C/efl/WKEventEfl.h:
1897         * UIProcess/API/C/efl/WKPageEfl.h:
1898         * UIProcess/API/C/efl/WKPopupItem.h:
1899         * UIProcess/API/C/efl/WKPopupMenuListener.h:
1900         * UIProcess/API/C/efl/WKViewEfl.cpp:
1901         * UIProcess/API/C/efl/WKViewEfl.h:
1902         * UIProcess/API/C/gtk/WKFullScreenClientGtk.h:
1903         * UIProcess/API/C/gtk/WKInspectorClientGtk.h:
1904         * UIProcess/API/C/gtk/WKView.h:
1905         * UIProcess/API/C/gtk/WKViewPrivate.h:
1906         * UIProcess/API/C/soup/WKContextSoup.h:
1907         * UIProcess/API/C/soup/WKCookieManagerSoup.h:
1908         * UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h:
1909         * UIProcess/API/C/soup/WKSoupRequestManager.h:
1910         * UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h:
1911         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
1912         * UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
1913         * UIProcess/API/cpp/efl/WKEinaSharedString.h:
1914         * UIProcess/API/efl/EwkView.cpp:
1915         * UIProcess/API/efl/EwkView.h:
1916         * UIProcess/API/efl/EwkViewCallbacks.h:
1917         * UIProcess/API/efl/GestureRecognizer.h:
1918         * UIProcess/API/efl/ewk_application_cache_manager_private.h:
1919         * UIProcess/API/efl/ewk_auth_request_private.h:
1920         * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
1921         * UIProcess/API/efl/ewk_back_forward_list_private.h:
1922         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1923         * UIProcess/API/efl/ewk_context_private.h:
1924         * UIProcess/API/efl/ewk_cookie_manager_private.h:
1925         * UIProcess/API/efl/ewk_database_manager_private.h:
1926         * UIProcess/API/efl/ewk_error_private.h:
1927         * UIProcess/API/efl/ewk_favicon_database_private.h:
1928         * UIProcess/API/efl/ewk_file_chooser_request_private.h:
1929         * UIProcess/API/efl/ewk_page_group_private.h:
1930         * UIProcess/API/efl/ewk_popup_menu_item_private.h:
1931         * UIProcess/API/efl/ewk_popup_menu_private.h:
1932         * UIProcess/API/efl/ewk_security_origin_private.h:
1933         * UIProcess/API/efl/ewk_settings_private.h:
1934         * UIProcess/API/efl/ewk_storage_manager_private.h:
1935         * UIProcess/API/efl/ewk_view.cpp:
1936         * UIProcess/API/efl/ewk_view_private.h:
1937         * UIProcess/API/efl/ewk_window_features_private.h:
1938         * UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp:
1939         * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
1940         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
1941         * UIProcess/API/gtk/WebKitPrivate.h:
1942         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
1943         * UIProcess/efl/BatteryProvider.h:
1944         * UIProcess/efl/ContextHistoryClientEfl.h:
1945         * UIProcess/efl/DownloadManagerEfl.h:
1946         * UIProcess/efl/FindClientEfl.h:
1947         * UIProcess/efl/FormClientEfl.h:
1948         * UIProcess/efl/PageLoadClientEfl.h:
1949         * UIProcess/efl/PagePolicyClientEfl.h:
1950         * UIProcess/efl/PageUIClientEfl.h:
1951         * UIProcess/efl/RequestManagerClientEfl.h:
1952         * UIProcess/efl/TextCheckerClientEfl.h:
1953         * UIProcess/efl/VibrationClientEfl.h:
1954         * UIProcess/efl/ViewClientEfl.cpp:
1955         * UIProcess/efl/ViewClientEfl.h:
1956         * UIProcess/efl/WebInspectorProxyEfl.cpp:
1957         * WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
1958         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
1959         * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
1960         * WebProcess/efl/SeccompFiltersWebProcessEfl.h:
1961         * WebProcess/efl/WebProcessMainEfl.cpp:
1962         * WebProcess/efl/WebProcessMainEfl.h:
1963         * WebProcess/gtk/WebGtkInjectedBundleMain.cpp:
1964         * WebProcess/gtk/WebProcessMainGtk.cpp:
1965         * WebProcess/gtk/WebProcessMainGtk.h:
1966         * mac/WKPreferences.h:
1967
1968 2014-05-15  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1969
1970         [EFL][WK2] Skip failing unit tests
1971         https://bugs.webkit.org/show_bug.cgi?id=132979
1972
1973         Reviewed by Daniel Bates.
1974
1975         * PlatformEfl.cmake: Skip failing unit tests for now.
1976
1977 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
1978
1979         [iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
1980         https://bugs.webkit.org/show_bug.cgi?id=132978
1981         <rdar://problem/16894428>
1982
1983         Reviewed by Benjamin Poulain.
1984         
1985         Move the static function fixedPositionRectFromExposedRect() to a member function on
1986         WebPageProxy so we can call it from more places. Also never give WebCore a customFixedPosition
1987         rect that extends past the document bounds, but allow rubber-banding/pinching in the UI process to
1988         move fixed elements outside the document.
1989         
1990         * UIProcess/PageClient.h: Need to expose minimumZoomScale() and contentsSize() to WebPageProxy.
1991         * UIProcess/WebPageProxy.h:
1992         * UIProcess/ios/PageClientImplIOS.h:
1993         * UIProcess/ios/PageClientImplIOS.mm:
1994         (WebKit::PageClientImpl::minimumZoomScale):
1995         (WebKit::PageClientImpl::contentsSize):
1996         * UIProcess/ios/WKContentView.mm:
1997         (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
1998         Pass the computeCustomFixedPositionRect(ConstrainedToDocumentRect) to WebCore, but use computeCustomFixedPositionRect()
1999         for the ScrollingCoordinator update.
2000         (adjustedUnexposedEdge): Deleted.
2001         (adjustedUnexposedMaxEdge): Deleted.
2002         (fixedPositionRectFromExposedRect): Deleted.
2003         * UIProcess/ios/WebPageProxyIOS.mm:
2004         (WebKit::adjustedUnexposedEdge):
2005         (WebKit::adjustedUnexposedMaxEdge):
2006         (WebKit::WebPageProxy::computeCustomFixedPositionRect):
2007         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2008         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): This fixes some flashing when the scrolling tree
2009         was being updated while scrolling; we now pass the correct rect.
2010
2011 2014-05-15  Mark Rowe  <mrowe@apple.com>
2012
2013         <https://webkit.org/b/132976> Move discovery of sharing services off the main thread
2014
2015         Discovery of sharing services can require disk access and IPC. Since the interface to
2016         ServicesController is already asynchronous, we can easily perform the discovery on a
2017         background queue. This can eliminate tens to hundreds of milliseconds worth of work
2018         from the main thread when creating the first web process.
2019
2020         Reviewed by Brady Eidson.
2021
2022         * UIProcess/mac/ServicesController.h:
2023         * UIProcess/mac/ServicesController.mm:
2024         (WebKit::ServicesController::ServicesController):
2025         (WebKit::ServicesController::refreshExistingServices): Bail out early if we're already
2026         in the process of refreshing the services. Kick the discovery over to a background queue,
2027         with it hopping back to the main queue to update the actual state and notify any contexts
2028         that were interested.
2029
2030 2014-05-15  Dan Bernstein  <mitz@apple.com>
2031
2032         Fixed a typo in a comment and updated previous change log entry.
2033
2034         * WebProcess/WebPage/ios/WebPageIOS.mm:
2035         (WebKit::WebPage::elementDidFocus):
2036
2037 2014-05-15  Dan Bernstein  <mitz@apple.com>
2038
2039         <rdar://problem/16844952> [iOS] www.wikipedia.org is loading much slower due to FormClient::willBeginInputSession
2040         https://bugs.webkit.org/show_bug.cgi?id=132974
2041
2042         Reviewed by Enrica Casucci.
2043
2044         * WebProcess/WebPage/ios/WebPageIOS.mm:
2045         (WebKit::WebPage::elementDidFocus): Don’t call FormClient::willBeginInputSession if the
2046         focus isn’t user-initiated, because in that case the UI process will bail out of
2047         -_startAssistingNode:userIsInteracting:userObject: before creating an input session and
2048         calling the -_webView:didStartInputSession:.
2049
2050 2014-05-15  Benjamin Poulain  <bpoulain@apple.com>
2051
2052         [iOS][WK2] WKWebView sends invalid content offsets at the end of animated resize
2053         https://bugs.webkit.org/show_bug.cgi?id=132941
2054         <rdar://problem/16921557>
2055
2056         Reviewed by Tim Horton.
2057
2058         Since we cannot change the scale and content inset simultaneously while accounting for the obscured insets,
2059         we end up with invalid contentOffsets.
2060
2061         To work around the problem, change the content scale outside of UIScrollView to ensure none of the side effect
2062         happens.
2063
2064         * UIProcess/API/Cocoa/WKWebView.mm:
2065         (-[WKWebView _endAnimatedResize]):
2066
2067 2014-05-15  Tim Horton  <timothy_horton@apple.com>
2068
2069         WebKit2 View Gestures (Zoom): Document size changes during zoom gesture cause erratic scrolling
2070         https://bugs.webkit.org/show_bug.cgi?id=132944
2071         <rdar://problem/15769454>
2072
2073         Reviewed by Simon Fraser.
2074
2075         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2076         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2077         If a layer flush occurs and we have an active transient zoom,
2078         re-apply the transient zoom to the relevant platform layers, because
2079         WebCore might have overwritten the relevant layer properties.
2080
2081         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
2082         Reset m_transientZoomScale before flushLayers() so that we don't
2083         re-apply the transient zoom when we're actually trying to commit it.
2084
2085 2014-05-15  Alex Christensen  <achristensen@webkit.org>
2086
2087         Add pointer lock to features without enabling it.
2088         https://bugs.webkit.org/show_bug.cgi?id=132961
2089
2090         Reviewed by Sam Weinig.
2091
2092         * Configurations/FeatureDefines.xcconfig:
2093         Added ENABLE_POINTER_LOCK to list of features.
2094
2095 2014-05-15  Simon Fraser  <simon.fraser@apple.com>
2096
2097         [UI-side compositing] Fix copying animations between layers, and pausing them
2098         https://bugs.webkit.org/show_bug.cgi?id=132943
2099         <rdar://problem/16906369&16906541>
2100
2101         Reviewed by Tim Horton.
2102         
2103         Fix PlatformCAAnimationRemote to support animation copying, and to record
2104         the beginTime for implicitly started animations. This fixes animation pausing,
2105         and copying of animations between layers when they go between tiled and non-tiled.
2106         
2107         This requires sending the animation key back through animationDidStart() so that
2108         we can record this beginTime on the PlatformCAAnimationRemote in the web process.
2109         This path doesn't set the "hasExplicitBeginTime" flag.
2110         
2111         PlatformCAAnimationRemote also now stores a hash of active animations, so that
2112         it can implement animationForKey(), and record the beginTime.
2113
2114         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
2115         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
2116         (WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
2117         * UIProcess/mac/RemoteLayerTreeHost.h:
2118         * UIProcess/mac/RemoteLayerTreeHost.mm:
2119         (WebKit::RemoteLayerTreeHost::animationDidStart): Grovel for the key for this
2120         animation; sadly CA doesn't give us an easier way.
2121         * WebProcess/WebPage/DrawingArea.h:
2122         (WebKit::DrawingArea::acceleratedAnimationDidStart):
2123         * WebProcess/WebPage/DrawingArea.messages.in:
2124         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2125         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2126         (-[WKAnimationDelegate animationDidStart:]):
2127         (WebKit::PlatformCAAnimationRemote::copy):
2128         (WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
2129         (WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
2130         (WebKit::PlatformCAAnimationRemote::copyToValueFrom):
2131         (WebKit::PlatformCAAnimationRemote::copyValuesFrom):
2132         (WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
2133         (WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
2134         (WebKit::addAnimationToLayer):
2135         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
2136         (WebKit::PlatformCALayerRemote::addAnimationForKey):
2137         (WebKit::PlatformCALayerRemote::removeAnimationForKey):
2138         (WebKit::PlatformCALayerRemote::animationForKey):
2139         (WebKit::PlatformCALayerRemote::animationStarted):
2140         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2141         * WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
2142         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2143         (WebKit::RemoteLayerTreeContext::animationDidStart):
2144         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2145         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2146         (WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
2147
2148 2014-05-14  Simon Fraser  <simon.fraser@apple.com>
2149
2150         Clean up "has non-zero begin time" terminology in animations
2151         https://bugs.webkit.org/show_bug.cgi?id=132942
2152
2153         Reviewed by Tim Horton.
2154
2155         Change the "non-zero beginTime" terminology in the platform CA animations
2156         code to "explicit beginTime": this flag really means that we explicitly set
2157         the beginTime of the animation, rather than let CA set the beginTime when
2158         committing the animation. This flag is used for animations with negative
2159         delay, and when pausing.
2160
2161         * Shared/mac/RemoteLayerTreeTransaction.mm:
2162         (WebKit::RemoteLayerTreeTextStream::operator<<):
2163         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
2164         * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
2165         (-[WKAnimationDelegate animationDidStart:]):
2166         (WebKit::PlatformCAAnimationRemote::Properties::encode):
2167         (WebKit::PlatformCAAnimationRemote::Properties::decode):
2168         (WebKit::PlatformCAAnimationRemote::setBeginTime):
2169         (WebKit::addAnimationToLayer):
2170
2171 2014-05-15  Tim Horton  <timothy_horton@apple.com>
2172
2173         [iOS] Incremental updates during scroll-to-top shouldn’t count as “stable” updates
2174         https://bugs.webkit.org/show_bug.cgi?id=132934
2175
2176         Reviewed by Simon Fraser.
2177
2178         * UIProcess/API/Cocoa/WKWebView.mm:
2179         (-[WKWebView _updateVisibleContentRects]):
2180         If we're in a scroll-to-top programmatic scroll, the update is not stable.
2181         The last event comes in with _isScrollingToTop false, so we do our stable update.
2182
2183 2014-05-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2184
2185         [GTK] Compile all installed resources as GResources
2186         https://bugs.webkit.org/show_bug.cgi?id=131099
2187
2188         Reviewed by Philippe Normand.
2189
2190         It avoids conflicts with old WebKit versions, and resources are
2191         always found even without installing or using environment variables.
2192
2193         * PlatformGTK.cmake: Add rules to write the xml file with the
2194         resources depending on the configure options and to generate and
2195         build the GResources file.
2196
2197 2014-05-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2198
2199         [EFL][WK2] Fix an unit test of ewk_context_url_scheme_register()
2200         https://bugs.webkit.org/show_bug.cgi?id=132902
2201
2202         Reviewed by Anders Carlsson.
2203
2204         This test can be run when CUSTOM_PROTOCOL is enabled. Besides the test needs 
2205         to check if registered callback function works well.
2206
2207         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2208         (EWK2ContextTest::schemeRequestCallback):
2209         (TEST_F):
2210
2211 2014-05-14  Ryuan Choi  <ryuan.choi@samsung.com>
2212
2213         [EFL][WK2] Use default context for ewk_view_add
2214         https://bugs.webkit.org/show_bug.cgi?id=132936
2215
2216         Reviewed by Gyuyoung Kim.
2217
2218         Since r146265, ewk_view_add created new context and it's regression.
2219         This patch restores the behavior of ewk_view_add to original one.
2220
2221         * UIProcess/API/efl/ewk_view.cpp:
2222         (ewk_view_add):
2223         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2224         (TEST_F):
2225
2226 2014-05-14  Maciej Stachowiak  <mjs@apple.com>
2227
2228         Database Process crashes after loading html5test.com
2229         https://bugs.webkit.org/show_bug.cgi?id=132938
2230         <rdar://problem/16241419>
2231
2232         Reviewed by Ryosuke Niwa.
2233
2234         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
2235         (WebKit::DatabaseProcessIDBConnection::disconnectedFromWebProcess): Expand comment
2236         about the null check.
2237         (WebKit::DatabaseProcessIDBConnection::deleteDatabase): Call disconnectedFromWebProcess
2238         to pick up its null check and to avoid duplicating code.
2239
2240 2014-05-14  Benjamin Poulain  <bpoulain@apple.com>
2241
2242         [iOS][WK2] The top/bottom edges should not be sticky when restoring the scroll position from the dynamic size update history
2243         https://bugs.webkit.org/show_bug.cgi?id=132931
2244
2245         Reviewed by Sam Weinig.
2246
2247         The goal of dynamicSizeUpdateHistory is to make dynamic resize completely reversible.
2248         Because of the stick-to-edges heuristics, this was not true near the top and bottom edges.
2249
2250         For example, start in landscape, scroll the page a bit, then rotate to portrait. Now you have
2251         a lot more vertical space, and the top edge of the document is at the edge of the scrollview.
2252         Rotate back to landscape: the position is restored  correct, but it is then overriden by
2253         the stick-to-edges branch.
2254
2255         When we restore the position from history, we should only put it back in the valid bounds, skipping
2256         stick-to-edges entirely.
2257
2258         * WebProcess/WebPage/ios/WebPageIOS.mm:
2259         (WebKit::WebPage::dynamicViewportSizeUpdate):
2260
2261 2014-05-14  Tim Horton  <timothy_horton@apple.com>
2262
2263         Enable IOSurface view snapshots for 10.9+
2264         https://bugs.webkit.org/show_bug.cgi?id=132932
2265         <rdar://problem/16900619>
2266
2267         Reviewed by Dean Jackson.
2268
2269         * UIProcess/mac/ViewSnapshotStore.h:
2270         r166005 unintentionally worked around <rdar://problem/16734031>.
2271         r168689 fixed another bug that caused sometimes randomly white snapshots.
2272         It's safe to turn on IOSurface view snapshots where purgeability is supported.
2273
2274 2014-05-14  Alexey Proskuryakov  <ap@apple.com>
2275
2276         Use the correct client in WebPageProxy::unwrapCryptoKey
2277         https://bugs.webkit.org/show_bug.cgi?id=132924
2278
2279         Reviewed by Darin Adler.
2280
2281         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::unwrapCryptoKey): Match what
2282         we now do in wrapCryptoKey().
2283
2284 2014-05-14  Zalan Bujtas  <zalan@apple.com>
2285
2286         Subpixel layout: Change Element.offset* client* scroll* return type to double.
2287         https://bugs.webkit.org/show_bug.cgi?id=132895
2288
2289         Reviewed by Simon Fraser.
2290
2291         This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
2292         type from long to double to match the latest CSSOM View Module spec[1].
2293         Element.offset* and Element.client* do return subpixel values from now on.
2294         Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.
2295
2296         subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
2297         from WK2 preferences. It toggles the return value from subpixel to floored integral.
2298         It does not change layout/rendering behavior.
2299
2300         Reference list of what other browsers do:
2301         IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
2302         Blink: http://www.chromestatus.com/features/5497402177880064
2303         Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607
2304
2305         [1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/
2306
2307         * Shared/WebPreferencesStore.h:
2308         * UIProcess/API/C/WKPreferences.cpp:
2309         (WKPreferencesSetSubpixelCSSOMElementMetricsEnabled):
2310         (WKPreferencesGetSubpixelCSSOMElementMetricsEnabled):
2311         * UIProcess/API/C/WKPreferencesRefPrivate.h:
2312         * WebProcess/WebPage/WebPage.cpp:
2313         (WebKit::WebPage::updatePreferences):
2314
2315 2014-05-14  Benjamin Poulain  <bpoulain@apple.com>
2316
2317         [iOS][WK2] Expose the viewport meta tag width on the UIProcess
2318         https://bugs.webkit.org/show_bug.cgi?id=132926
2319         <rdar://problem/16892115>
2320
2321         Reviewed by Sam Weinig.
2322
2323         Safari requires the viewport meta tag width for legacy stuff on WebApps. Just send it
2324         over to the UIProcess when it changes.
2325
2326         * UIProcess/API/Cocoa/WKWebView.mm:
2327         (-[WKWebView initWithFrame:configuration:]):
2328         (-[WKWebView _setViewportMetaTagWidth:]):
2329         (-[WKWebView _viewportMetaTagWidth]):
2330         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2331         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2332         * UIProcess/PageClient.h:
2333         * UIProcess/WebPageProxy.h:
2334         * UIProcess/WebPageProxy.messages.in:
2335         * UIProcess/ios/PageClientImplIOS.h:
2336         * UIProcess/ios/PageClientImplIOS.mm:
2337         (WebKit::PageClientImpl::didChangeViewportMetaTagWidth):
2338         * UIProcess/ios/WebPageProxyIOS.mm:
2339         (WebKit::WebPageProxy::viewportMetaTagWidthDidChange):
2340         * WebProcess/WebPage/ios/WebPageIOS.mm:
2341         (WebKit::WebPage::viewportPropertiesDidChange):
2342
2343 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
2344
2345         [iOS WK2] Make view debugging easier
2346         https://bugs.webkit.org/show_bug.cgi?id=132892
2347
2348         Reviewed by Tim Horton.
2349         
2350         Enhance -[WKCompositingView description] to show WebKit-related information
2351         which is useful when dumping a window's UIView hierarchy.
2352         
2353         Also have WKTransformView and WKRemoteView inherit from WKCompositingView,
2354         and thereby get the hitTest:withEvent: override for free, as well as better dumping.
2355
2356         * UIProcess/ios/RemoteLayerTreeHostIOS.mm:
2357         (-[WKCompositingView description]):
2358         (-[WKTransformView hitTest:withEvent:]): Deleted.
2359         (-[WKRemoteView hitTest:withEvent:]): Deleted.
2360
2361 2014-05-14  Benjamin Poulain  <bpoulain@apple.com>
2362
2363         [iOS][WK2] Fixed positioned element must relayout correctly before sending resize events to the page
2364         https://bugs.webkit.org/show_bug.cgi?id=132920
2365         <rdar://problem/16836866>
2366
2367         Reviewed by Simon Fraser.
2368
2369         During the dynamic resize operation, we do not update the fixed position elements because
2370         it is a very hard problem on the UI Process side.
2371
2372         When the animation finishes, the fixed positioned rect is recomputed on the UIProcess and pushed
2373         to the WebProcess.
2374
2375         The problem is sending the rect after the animation is too late, the content can observe the fixed
2376         elements layout through JavaScript and would get the old size.
2377
2378         This patch fixes the issue updating the CustomFixedPositionLayoutRect on the WebProcess before
2379         notifying the content of the resize.
2380         First, we layout the content to the new fixed layout size to get the new content size.
2381         Then, we compute the new FixedPositionedLayoutRect with FrameView's viewportConstrainedObjectsRect(),
2382         this use the real content size and our estimated unobscured content rect.
2383
2384         * WebProcess/WebPage/ios/WebPageIOS.mm:
2385         (WebKit::WebPage::dynamicViewportSizeUpdate):
2386
2387 2014-05-14  Enrica Casucci  <enrica@apple.com>
2388
2389         REGRESSION(WK2): Many pages have very wrong text size after rotating.
2390         https://bugs.webkit.org/show_bug.cgi?id=132893
2391         <rdar://problem/16806958>
2392
2393         Reviewed by Benjamin Poulain.
2394
2395         Whenever our viewport width changes we must reset text autosizing
2396         on the renderer.
2397
2398         * WebProcess/WebPage/WebPage.h:
2399         * WebProcess/WebPage/ios/WebPageIOS.mm:
2400         (WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
2401         (WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
2402         (WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded):
2403         (WebKit::WebPage::dynamicViewportSizeUpdate):
2404
2405 2014-05-14  Alex Christensen  <achristensen@webkit.org>
2406
2407         Use references instead of pointers with ResourceLoadTiming.
2408         https://bugs.webkit.org/show_bug.cgi?id=132846
2409
2410         Reviewed by Alexey Proskuryakov.
2411
2412         * Shared/WebCoreArgumentCoders.cpp:
2413         (IPC::ArgumentCoder<ResourceResponse>::encode):
2414         (IPC::ArgumentCoder<ResourceResponse>::decode):
2415         Use references instead of pointers and null checks.
2416
2417 2014-05-14  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
2418
2419         Remove CSS_STICKY_POSITION guards
2420         https://bugs.webkit.org/show_bug.cgi?id=132676
2421
2422         Reviewed by Simon Fraser.
2423
2424         * Configurations/FeatureDefines.xcconfig:
2425
2426 2014-05-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2427
2428         [EFL][WK2] Add ewk_view_fixed_layout_size_set|get()
2429         https://bugs.webkit.org/show_bug.cgi?id=132811
2430
2431         Reviewed by Christophe Dumez.
2432
2433         Some EFL applications need to set size of fixed layout when enabling fixed layout.
2434         This APIs can pass ownership regarding the size of fixed layout to application side.
2435
2436         * UIProcess/API/efl/ewk_view.cpp:
2437         (ewk_view_layout_fixed_size_set):
2438         (ewk_view_layout_fixed_size_get):
2439         * UIProcess/API/efl/ewk_view.h:
2440         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2441         (TEST_F):
2442
2443 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
2444
2445         Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
2446         https://bugs.webkit.org/show_bug.cgi?id=132899
2447
2448         Reviewed by Beth Dakin.
2449         
2450         The new InsetClipLayer and ContentShadowLayer members on scrolling nodes
2451         need to be correctly encoded/decoded for UI-side compositing, and dumped
2452         correctly.
2453
2454         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
2455         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
2456         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
2457         (WebKit::RemoteScrollingTreeTextStream::dump):
2458         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2459         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2460
2461 2014-05-13  Anders Carlsson  <andersca@apple.com>
2462
2463         Another build fix.
2464
2465         Reviewed by Dan Bernstein.
2466
2467         * Shared/API/Cocoa/WKFoundation.h:
2468         Make sure to include Availability.h
2469
2470 2014-05-13  Beth Dakin  <bdakin@apple.com>
2471
2472         REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes 
2473         scrolling in News Feed
2474         https://bugs.webkit.org/show_bug.cgi?id=132889
2475         -and corresponding-
2476         <rdar://problem/16715716>
2477
2478         Reviewed by Simon Fraser.
2479
2480         Re-name scrollOffsetRelativeToDocument() to 
2481         documentScrollPositionRelativeToViewOrigin().
2482         * WebProcess/WebPage/FindController.cpp:
2483         (WebKit::FindController::rectsForTextMatches):
2484         * WebProcess/WebPage/WebPage.cpp:
2485         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2486
2487 2014-05-13  Dean Jackson  <dino@apple.com>
2488
2489         [iOS] Page scale update messages for media controls should only fire at the end of zooming
2490         https://bugs.webkit.org/show_bug.cgi?id=132857
2491         <rdar://problem/16631009>
2492
2493         Reviewed by Simon Fraser.
2494
2495         As the user was zooming, the media controls that responded
2496         to the page scale (and resized themselves) would do so
2497         slightly out of sync with the screen refreshes, and it looked
2498         terrible.
2499
2500         We already know if a pageScale change is happening inside
2501         a gesture using the inStableState property of the visibleContentRectUpdateInfo.
2502         Simply pass this along to WebCore::Page.
2503
2504         * WebProcess/WebPage/ios/WebPageIOS.mm:
2505         (WebKit::WebPage::updateVisibleContentRects): Pass inStableState onto the
2506         WebCore::Page. Note that we have to send this message even if the
2507         scale has not changed, since the last changing update might not have
2508         been stable.
2509
2510 2014-05-13  Benjamin Poulain  <bpoulain@apple.com>
2511
2512         [iOS][WK2] When the secondary UIScrollView delegates respond to callbacks, delay the state change until both delegates have finished
2513         https://bugs.webkit.org/show_bug.cgi?id=132849
2514         <rdar://problem/16863716>
2515
2516         Reviewed by Anders Carlsson.
2517
2518         When there are two delegates responding to UIScrollView changes, there was often an intermediate invalid
2519         state forwarded to the UIProcess.
2520
2521         For example, on scroll, WKWebView would update the state based on the current obscured insets in response to
2522         delegate callbacks.
2523         After that update, Safari would modify the insets, thus updating the state again.
2524         The first state changed by WKWebView is incomplete, and should never have been set.
2525
2526         This patch works around the issue by delaying visible update rect in those cases.
2527
2528         When the two delegates of WKScrollView respond to the same selector, WKScrollView invokes 
2529         [UIWebView _willInvokeUIScrollViewDelegateCallback] on entry, and
2530         [UIWebView _didInvokeUIScrollViewDelegateCallback] on exit.
2531
2532         Between those two calls, WKWebView does not forward the new UI state to the WebProcess.
2533
2534         * UIProcess/API/Cocoa/WKWebView.mm:
2535         (-[WKWebView _willInvokeUIScrollViewDelegateCallback]):
2536         (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
2537         (-[WKWebView _updateVisibleContentRects]):
2538         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2539         * UIProcess/API/ios/WKViewIOS.mm:
2540         (-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
2541         * UIProcess/ios/WKScrollView.h:
2542         * UIProcess/ios/WKScrollView.mm:
2543         (-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]):
2544         (-[WKScrollViewDelegateForwarder forwardInvocation:]):
2545         (-[WKScrollView setInternalDelegate:]):
2546
2547 2014-05-13  Benjamin Poulain  <bpoulain@apple.com>
2548
2549         [iOS][WK2] Remove the _extendedBackgroundExclusionInsets SPI
2550         https://bugs.webkit.org/show_bug.cgi?id=132848
2551         <rdar://problem/16875093>
2552
2553         Reviewed by Darin Adler.
2554
2555         The SPI is no longer needed by Safari.
2556
2557         * UIProcess/API/Cocoa/WKWebView.mm:
2558         (-[WKWebView initWithFrame:configuration:]):
2559         (-[WKWebView _updateScrollViewBackground]):
2560         (-[WKWebView _frameOrBoundsChanged]):
2561         (-[WKWebView _setObscuredInsets:]):
2562         (-[WKWebView _endAnimatedResize]):
2563         (updateTopAndBottomExtendedBackgroundExclusionIfNecessary): Deleted.
2564         (-[WKWebView _setExtendedBackgroundExclusionInsets:]): Deleted.
2565         (-[WKWebView _extendedBackgroundExclusionInsets]): Deleted.
2566         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2567
2568 2014-05-13  Samuel White  <samuel_white@apple.com>
2569
2570         AX: Hit testing not accounting for top content inset.
2571         https://bugs.webkit.org/show_bug.cgi?id=132876
2572
2573         Reviewed by Chris Fleizach.
2574
2575         Updated accessibilityHitTest: to account for top content inset when converting from screen coords to WebKit coords.
2576
2577         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
2578         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2579
2580 2014-05-13  Enrica Casucci  <enrica@apple.com>
2581
2582         REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
2583         https://bugs.webkit.org/show_bug.cgi?id=132879
2584         <rdar://problem/16318049>
2585
2586         Reviewed by Benjamin Poulain.
2587
2588         Adds the heuristics to zoom and scroll to ensure the element being focused
2589         is fully visible and its text readable.
2590
2591         * Shared/AssistedNodeInformation.cpp:
2592         (WebKit::AssistedNodeInformation::encode):
2593         (WebKit::AssistedNodeInformation::decode):
2594         * Shared/AssistedNodeInformation.h:
2595         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
2596         * UIProcess/API/Cocoa/WKWebView.mm:
2597         (-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
2598         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2599         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2600         * UIProcess/ios/WKContentView.h:
2601         * UIProcess/ios/WKContentView.mm:
2602         (-[WKContentView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
2603         * UIProcess/ios/WKContentViewInteraction.mm:
2604         (-[WKContentView _displayFormNodeInputView]):
2605         (-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
2606         * WebProcess/WebPage/ios/WebPageIOS.mm:
2607         (WebKit::WebPage::getAssistedNodeInformation):
2608
2609 2014-05-13  Simon Fraser  <simon.fraser@apple.com>
2610
2611         Fix the iOS Simulator build.
2612
2613         * UIProcess/mac/ViewSnapshotStore.h:
2614
2615 2014-05-13  Tim Horton  <timothy_horton@apple.com>
2616
2617         Speculative build fix for iOS.
2618
2619         * UIProcess/ios/WebMemoryPressureHandlerIOS.cpp: Removed.
2620         * UIProcess/ios/WebMemoryPressureHandlerIOS.mm: Added.
2621         (WebKit::WebMemoryPressureHandler::shared):
2622         (WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
2623         * WebKit2.xcodeproj/project.pbxproj:
2624         Make WebMemoryPressureHandlerIOS Obj-C.
2625
2626 2014-05-13  Anders Carlsson  <andersca@apple.com>
2627
2628         Another follow-up build fix.
2629
2630         * Shared/API/Cocoa/WKFoundation.h:
2631
2632 2014-05-13  Anders Carlsson  <andersca@apple.com>
2633
2634         Another follow-up build fix.
2635
2636         * Shared/API/Cocoa/WKFoundation.h:
2637
2638 2014-05-13  Anders Carlsson  <andersca@apple.com>
2639
2640         Follow-up fix.
2641
2642         * UIProcess/API/Cocoa/WKNavigationAction.mm:
2643         (-[WKNavigationAction _initWithNavigationActionData:WebKit::]):
2644         (-[WKNavigationAction _isUserInitiated]):
2645
2646 2014-05-13  Anders Carlsson  <andersca@apple.com>
2647
2648         Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
2649         https://bugs.webkit.org/show_bug.cgi?id=132880
2650         <rdar://problem/16901354>
2651
2652         Reviewed by Dan Bernstein.
2653
2654         * Shared/API/Cocoa/WKFoundation.h:
2655         Add typedef for older systems.
2656
2657         * UIProcess/API/Cocoa/WKNavigationAction.h:
2658         Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
2659
2660         * UIProcess/API/Cocoa/WKNavigationAction.mm:
2661         (toWKNavigationType):
2662         This can be static now.
2663
2664         (toNSEventModifierFlags):
2665         Helper to convert WebEvent::Modifiers to NSEventModifierFlags.
2666
2667         (toNSButtonNumber):
2668         Helper to convert WebMouseEvent::Button to an AppKit button number.
2669
2670         (-[WKNavigationAction initWithNavigationActionData:WebKit::]):
2671         New initializer that takes a NavigationActionData and fills in the relevant ivars from it.
2672
2673         (-[WKNavigationAction _isUserInitiated]):
2674         Return the new ivar.
2675
2676         * UIProcess/API/Cocoa/WKNavigationActionInternal.h:
2677         Remove readwrite overrides.
2678
2679         * UIProcess/Cocoa/NavigationState.mm:
2680         (WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
2681         Use initWithNavigationActionData:
2682
2683         * UIProcess/Cocoa/UIDelegate.mm:
2684         (WebKit::UIDelegate::UIClient::createNewPage):
2685         Use initWithNavigationActionData:
2686
2687 2014-05-13  Tim Horton  <timothy_horton@apple.com>
2688
2689         WebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
2690         https://bugs.webkit.org/show_bug.cgi?id=127788
2691         <rdar://problem/15928241>
2692
2693         Reviewed by Anders Carlsson.
2694
2695         Allow JPEG snapshots. Compression is done asynchronously.
2696         Enable JPEG snapshots (for now) on all PLATFORM(MAC).
2697         We'll switch back to IOSurface snapshots on 10.9+ after <rdar://problem/16734031> is resolved.
2698
2699         * UIProcess/API/Cocoa/WKWebView.mm:
2700         * UIProcess/API/mac/WKView.mm:
2701         (-[WKView _takeViewSnapshot]):
2702         Store the image size on the ViewSnapshot.
2703         Move IOSurface-related code to ViewSnapshotStore.
2704
2705         * UIProcess/ios/ViewGestureControllerIOS.mm:
2706         (WebKit::ViewGestureController::beginSwipeGesture):
2707         Adopt asLayerContents().
2708
2709         * UIProcess/mac/ViewGestureController.h:
2710         * UIProcess/mac/ViewGestureControllerMac.mm:
2711         (WebKit::ViewGestureController::retrieveSnapshotForItem):
2712         (WebKit::ViewGestureController::beginSwipeGesture):
2713         (WebKit::ViewGestureController::removeSwipeSnapshot):
2714         Adopt asLayerContents().
2715         Put the snapshot on the right layer (the parent of the snapshot image layer);
2716         if it's on the snapshot image layer itself, if there is no image, the shadow
2717         is displayed on top of the white placeholder.
2718         Only reset snapshot purgeability if we're using IOSurface snapshots.
2719
2720         * UIProcess/mac/ViewSnapshotStore.h:
2721         Add a bunch of macros to allow us to switch the snapshot backing store implementation.
2722
2723         * UIProcess/mac/ViewSnapshotStore.mm:
2724         (WebKit::ViewSnapshotStore::ViewSnapshotStore):
2725         (WebKit::ViewSnapshotStore::~ViewSnapshotStore):
2726         (WebKit::ViewSnapshotStore::recordSnapshot):
2727         If takeViewSnapshot() fails, don't remove the existing snapshot.
2728
2729         (WebKit::createIOSurfaceFromImage):
2730         (WebKit::compressImageAsJPEG):
2731         (WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost):
2732         (WebKit::ViewSnapshotStore::didCompressSnapshot):
2733         (WebKit::ViewSnapshot::clearImage):
2734         (WebKit::ViewSnapshot::asLayerContents):
2735         Asynchronously compress snapshots - if we're using JPEG snapshots - for a
2736         very large memory win (~20-30x).
2737
2738 2014-05-12  Darin Adler  <darin@apple.com>
2739
2740         Make a few icon database improvements
2741         https://bugs.webkit.org/show_bug.cgi?id=132812
2742
2743         Reviewed by Brady Eidson.
2744
2745         * UIProcess/API/C/WKIconDatabase.cpp:
2746         (WKIconDatabaseCopyIconDataForPageURL): Moved the actual implementation of this
2747         out of the bindings into the WebIconDatabase class.
2748
2749         * UIProcess/API/C/WKIconDatabase.h: Fixed argument names that were inconsistent.
2750
2751         * UIProcess/WebIconDatabase.cpp: Removed unneeded includes.
2752         (WebKit::WebIconDatabase::create): Pass a reference instead of a pointer.
2753         (WebKit::WebIconDatabase::WebIconDatabase): Take a reference instead of a pointer.
2754         (WebKit::WebIconDatabase::invalidate): Use nullptr.
2755         (WebKit::WebIconDatabase::setDatabasePath): Use make_unique.
2756         (WebKit::WebIconDatabase::setIconDataForIconURL): Removed unneeded local variable.
2757         (WebKit::WebIconDatabase::imageForPageURL): Use nullptr.
2758         (WebKit::WebIconDatabase::nativeImageForPageURL): Ditto.
2759         (WebKit::WebIconDatabase::didFinishURLImport): Use a modern for loop.
2760         (WebKit::WebIconDatabase::iconDataForPageURL): Added. Moved this here from
2761         WKIconDatabase.cpp, but also changed to use createWithoutCopying to avoid making
2762         another copy of the data for each icon.
2763
2764         * UIProcess/WebIconDatabase.h: Removed unneeded includes. Derive from
2765         IconDatabaseClient privately. Use nullptr. Added iconDataForPageURL member
2766         function. Use a reference for the constructor argument. Use override for
2767         virtual functions. Use unique_ptr instead of OwnPtr.
2768
2769 2014-05-12  Mark Lam  <mark.lam@apple.com>
2770
2771         WebKit2 on iOS needs to capture the main thread's floating point environment.
2772         <https://webkit.org/b/132755>
2773
2774         Reviewed by Geoffrey Garen.
2775
2776         * Shared/mac/ChildProcessMac.mm:
2777         (WebKit::ChildProcess::platformInitialize):
2778         - Call FloatingPointEnv::enableNeededFloatingPointModes() to initialize
2779           the ARMv7 FP env to support denormalized numbers.
2780         - Call FloatingPointEnv::saveMainThreadEnvironment() to capture the main thread
2781           fp env.
2782
2783 2014-05-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2784
2785         [EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest 
2786         https://bugs.webkit.org/show_bug.cgi?id=132817
2787
2788         Reviewed by Dirk Schulze.
2789
2790         To load test html pages, call ewk_view_uri_set() instead of EWK2UnitTestServer.
2791         Besides this patch adds test html page for ewk_view_navigation unit test.
2792
2793         * UIProcess/API/efl/tests/resources/Page1.html: Added.
2794         * UIProcess/API/efl/tests/resources/Page2.html: Added.
2795         * UIProcess/API/efl/tests/resources/Page3.html: Added.
2796         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2797         (TEST_F):
2798
2799 2014-05-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2800
2801         Unreviewed, EFL build fix since r168625.
2802
2803         * UIProcess/efl/WebContextEfl.cpp:
2804         (WebKit::WebContext::platformDefaultLocalStorageDirectory): Remove const keyword.
2805
2806 2014-05-12  Simon Fraser  <simon.fraser@apple.com>
2807
2808         [iOS WK2] Fuzzy tiles on some sites on loading
2809         https://bugs.webkit.org/show_bug.cgi?id=132847
2810         <rdar://problem/16816178>
2811
2812         Reviewed by Benjamin Poulain.
2813         
2814         PlatformCALayerRemoteTiledBacking overrode setContentsScale() but not contentsScale(),
2815         causing us to early-return from GraphicsLayerCA::updateContentsScale() and leave the
2816         scale wrong. Fix by overriding contentsScale() also.
2817
2818         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
2819         (WebKit::PlatformCALayerRemoteTiledBacking::contentsScale):
2820         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2821
2822 2014-05-12  Tim Horton  <timothy_horton@apple.com>
2823
2824         Triple-buffer RemoteLayerBackingStore
2825         https://bugs.webkit.org/show_bug.cgi?id=132786
2826         <rdar://problem/16877498>
2827
2828         Reviewed by Simon Fraser.
2829
2830         We need three buffers because we're currently unable to synchronize
2831         with the render server to swap when they're not in use, so we were
2832         throwing surfaces away far too frequently.
2833
2834         This hugely reduces time spent in IOSurface::create on various repaint benchmarks.
2835
2836         * Shared/mac/RemoteLayerBackingStore.h:
2837         (WebKit::RemoteLayerBackingStore::hasFrontBuffer):
2838         (WebKit::RemoteLayerBackingStore::volatility): Deleted.
2839         * Shared/mac/RemoteLayerBackingStore.mm:
2840         (WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
2841         (WebKit::RemoteLayerBackingStore::clearBackingStore):
2842         (WebKit::RemoteLayerBackingStore::encode):
2843         (WebKit::RemoteLayerBackingStore::decode):
2844         (WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
2845         (WebKit::RemoteLayerBackingStore::display):
2846         (WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
2847         (WebKit::RemoteLayerBackingStore::setBufferVolatility):
2848         (WebKit::RemoteLayerBackingStore::Buffer::discard):
2849         (WebKit::RemoteLayerBackingStore::setVolatility): Deleted.
2850         * Shared/mac/RemoteLayerBackingStoreCollection.mm:
2851         (WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired):
2852         Put the ShareableBitmap/IOSurface and a volatility bit in a Buffer struct.
2853         Also factor out "throw away this buffer and put it in the pool" into Buffer::discard().
2854         We keep a volatility bit because querying IOSurface purgeability is expensive,
2855         and we have a guarantee that any changes will happen in the Web process
2856         and go through this class (the lack of this guarantee in most cases is why I'm not
2857         putting this bit in WebCore::IOSurface itself).
2858
2859         Make it so that each buffer's volatility can be adjusted individually
2860         by setBufferVolatility(), and adopt in RemoteLayerBackingStoreCollection.
2861
2862         Add a third buffer, m_secondaryBackBuffer, which will swap with the back buffer
2863         before swapping front and back if the back buffer (soon to be the front buffer)
2864         is still in use by the render server. This means that we will almost never
2865         have to throw away a surface because it's in use (and conversely never need
2866         to make a new surface).
2867
2868         Adjust RemoteLayerBackingStoreCollection to make secondary back surfaces purgeable
2869         more aggressively than others.
2870
2871 2014-05-12  Alexey Proskuryakov  <ap@apple.com>
2872
2873         REGRESSION (r165972): Can't type into text fields in Flash
2874         https://bugs.webkit.org/show_bug.cgi?id=132840
2875         <rdar://problem/16671969>
2876
2877         Reviewed by Anders Carlsson.
2878
2879         * UIProcess/API/mac/WKView.mm: (-[WKView inputContext]): Restore a function that
2880         got accidentally lost when adding async text input code.
2881
2882 2014-05-12  Chris Fleizach  <cfleizach@apple.com>
2883
2884         AX: .js dialogs shown in unload while AX is running crash WebKit.
2885         https://bugs.webkit.org/show_bug.cgi?id=123828
2886
2887         Reviewed by Anders Carlsson.
2888
2889         Utilize platform API to inform AX clients when the WebProcess will suspend and resume.
2890         This allows us to avoid having special behavior for accessibility when the WebProcess needs
2891         to wait on a reply.
2892
2893         * Platform/IPC/Connection.cpp:
2894         (IPC::Connection::waitForSyncReply):
2895         * Platform/IPC/Connection.h:
2896         * Platform/IPC/mac/ConnectionMac.cpp:
2897         (IPC::Connection::willSendSyncMessage):
2898         (IPC::Connection::didReceiveSyncReply):
2899         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2900         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
2901         (WebKit::WebChromeClient::runJavaScriptAlert):
2902         (WebKit::WebChromeClient::runJavaScriptConfirm):
2903         (WebKit::WebChromeClient::runJavaScriptPrompt):
2904         (WebKit::WebChromeClient::print):
2905         (WebKit::WebChromeClient::exceededDatabaseQuota):
2906         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2907         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2908
2909 2014-05-12  Alex Christensen  <achristensen@webkit.org>
2910
2911         Progress on web timing.
2912         https://bugs.webkit.org/show_bug.cgi?id=132574
2913
2914         Reviewed by Alexey Proskuryakov.
2915
2916         * Shared/WebCoreArgumentCoders.cpp:
2917         (IPC::ArgumentCoder<ResourceResponse>::encode):
2918         (IPC::ArgumentCoder<ResourceResponse>::decode):
2919         Transfer ResourceLoadTiming values if they exist.
2920
2921 2014-05-12  Dan Bernstein  <mitz@apple.com>
2922
2923         [Cocoa] Expose WebPage::usesEphemeralSession to the bundle
2924         https://bugs.webkit.org/show_bug.cgi?id=132836
2925
2926         Reviewed by Anders Carlsson.
2927
2928         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2929         (-[WKWebProcessPlugInBrowserContextController _usesNonPersistentWebsiteDataStore]):
2930         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
2931
2932 2014-05-12  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2933
2934         REGRESSION(168625): [GTK] build broken due to WKContextSetLocalStorageDirectory
2935         https://bugs.webkit.org/show_bug.cgi?id=132831
2936
2937         Unreviewed GTK build fix.
2938
2939         * UIProcess/gtk/WebContextGtk.cpp:
2940         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
2941         This is now a static member function.
2942
2943 2014-05-12  Anders Carlsson  <andersca@apple.com>
2944
2945         WKWebViewConfiguration should fill in the blanks
2946         https://bugs.webkit.org/show_bug.cgi?id=132832
2947         <rdar://problem/16886408>
2948
2949         Reviewed by Dan Bernstein.
2950
2951         * UIProcess/API/Cocoa/WKWebView.mm:
2952         (-[WKWebView initWithFrame:configuration:]):
2953         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
2954         (-[WKWebViewConfiguration init]):
2955         (-[WKWebViewConfiguration _validate]):
2956         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
2957
2958 2014-05-12  Anders Carlsson  <andersca@apple.com>
2959
2960         WKWebView should default to _backgroundExtendsBeyondPage = YES
2961         https://bugs.webkit.org/show_bug.cgi?id=132829
2962         <rdar://problem/16886364>
2963
2964         Reviewed by Beth Dakin.
2965
2966         * UIProcess/API/Cocoa/WKWebView.mm:
2967         (-[WKWebView initWithFrame:configuration:]):
2968
2969 2014-05-12  Anders Carlsson  <andersca@apple.com>
2970
2971         Pass local storage directory to StorageManager::create
2972         https://bugs.webkit.org/show_bug.cgi?id=132827
2973
2974         Reviewed by Tim Horton.
2975
2976         Since we know the local storage directory at creation time and we know it never changes,
2977         we can get rid of setLocalStorageDirectory and just pass the local storage directory at creation time.
2978
2979         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
2980         (WebKit::LocalStorageDatabaseTracker::create):
2981         (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
2982         (WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
2983         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): Deleted.
2984         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): Deleted.
2985         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
2986         * UIProcess/Storage/StorageManager.cpp:
2987         (WebKit::StorageManager::create):
2988         (WebKit::StorageManager::StorageManager):
2989         (WebKit::StorageManager::setLocalStorageDirectory): Deleted.
2990         * UIProcess/Storage/StorageManager.h:
2991         * UIProcess/WebContext.cpp:
2992         (WebKit::WebContext::WebContext):
2993
2994 2014-05-11  Anders Carlsson  <andersca@apple.com>
2995
2996         Replace WKContextSetLocalStorageDirectory with a context configuration getter/setter
2997         https://bugs.webkit.org/show_bug.cgi?id=132809
2998
2999         Reviewed by Dan Bernstein.
3000
3001         * UIProcess/API/C/WKContext.cpp:
3002         (WKContextSetLocalStorageDirectory): Deleted.
3003
3004         * UIProcess/API/C/WKContextConfigurationRef.cpp:
3005         (WKContextConfigurationCopyLocalStorageDirectory):
3006         (WKContextConfigurationSetLocalStorageDirectory):
3007         * UIProcess/API/C/WKContextConfigurationRef.h:
3008         Add getters and setters for the local storage directory.
3009
3010         * UIProcess/API/C/WKContextPrivate.h:
3011         Remove WKContextSetLocalStorageDirectory.
3012
3013         * UIProcess/API/Cocoa/WKProcessGroup.mm:
3014         (-[WKProcessGroup initWithInjectedBundleURL:]):
3015         Call WebContext::applyPlatformSpecificConfigurationDefaults.
3016
3017         * UIProcess/API/Cocoa/WKProcessPool.mm:
3018         (-[WKProcessPool _initWithConfiguration:]):
3019         Call WebContext::applyPlatformSpecificConfigurationDefaults (for now).
3020
3021         * UIProcess/APIContextConfiguration.cpp:
3022         (API::ContextConfiguration::webContextConfiguration):
3023         Set the local storage. Also, call WebContext::applyPlatformSpecificConfigurationDefaults.
3024
3025         * UIProcess/APIContextConfiguration.h:
3026         (API::ContextConfiguration::injectedBundlePath):
3027         This should be const.
3028
3029         (API::ContextConfiguration::localStorageDirectory):
3030         (API::ContextConfiguration::setLocalStorageDirectory):
3031         Add getter and setter.
3032
3033         * UIProcess/Storage/StorageManager.cpp:
3034         (WebKit::StorageManager::setLocalStorageDirectory):
3035         ASSERT that the path isn't null.
3036
3037         * UIProcess/WebContext.cpp:
3038         (WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
3039         New helper function that will fill in platform specific defaults for empty parameters.
3040
3041         (WebKit::WebContext::WebContext):
3042         Get the local storage directory from the configuration.
3043
3044         (WebKit::WebContext::setLocalStorageDirectory): Deleted.
3045         (WebKit::WebContext::localStorageDirectory): Deleted.
3046         These are no longer needed.
3047
3048         * UIProcess/mac/WebContextMac.mm:
3049         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
3050         This should be a static member function.
3051
3052 2014-05-12  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
3053
3054         Typo fix in generate-forwarding-headers
3055         https://bugs.webkit.org/show_bug.cgi?id=132820
3056
3057         Reviewed by Anders Carlsson.
3058
3059         * Scripts/generate-forwarding-headers.pl:
3060         (collectFrameworkHeaderPaths):
3061         
3062 2014-05-12  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
3063
3064         [EFL] TLSErrors do not cause page load to fail when not ignored
3065         https://bugs.webkit.org/show_bug.cgi?id=131104
3066
3067         Reviewed by Gyuyoung Kim.
3068
3069         Added EFL unit test for the bug https://bugs.webkit.org/show_bug.cgi?id=121548
3070
3071         * UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Added new test: ewk_ssl_bad_cert_redirect_https_to_http
3072
3073 2014-05-11  Gordon Sheridan  <gordon_sheridan@apple.com>
3074
3075         Expose a function to copy favicon data without image conversion.
3076         https://bugs.webkit.org/show_bug.cgi?id=132805
3077
3078         Reviewed by Darin Adler.
3079
3080         * UIProcess/API/C/WKIconDatabase.cpp:
3081         (WKIconDatabaseCopyIconDataForPageURL):
3082         Add a function to copy the data from the image of a favicon for an associated page url.
3083
3084         * UIProcess/API/C/WKIconDatabase.h:
3085         Declare WKIconDatabaseCopyIconDataForPageURL.
3086
3087 2014-05-11  Seongjun Kim  <isAir@company100.com>
3088
3089         REGRESSION(r168603): [GTK] Build broken.
3090         https://bugs.webkit.org/show_bug.cgi?id=132810
3091
3092         Reviewed by Carlos Garcia Campos.
3093
3094         * UIProcess/API/gtk/WebKitWebContext.cpp:
3095         (createDefaultWebContext):
3096         Construct a WebContextConfiguration object and pass it to WebContext::create.
3097
3098 2014-05-11  Anders Carlsson  <andersca@apple.com>
3099
3100         Remove local storage directory and sandbox extension from WebProcessCreationParameters
3101         https://bugs.webkit.org/show_bug.cgi?id=132808
3102
3103         Reviewed by Beth Dakin.
3104
3105         * Shared/WebProcessCreationParameters.cpp:
3106         (WebKit::WebProcessCreationParameters::encode):
3107         (WebKit::WebProcessCreationParameters::decode):
3108         * Shared/WebProcessCreationParameters.h:
3109         * UIProcess/WebContext.cpp:
3110         (WebKit::WebContext::createNewWebProcess):
3111         * WebProcess/cocoa/WebProcessCocoa.mm:
3112         (WebKit::WebProcess::platformInitializeWebProcess):
3113
3114 2014-05-11  Jaehun Lim  <ljaehun.lim@samsung.com>
3115
3116         Unreviewed, CMake build fix after r168603
3117
3118         Add APIContextConfiguration.cpp and WKContextConfigurationRef.cpp to the source list.
3119
3120         * CMakeLists.txt:
3121
3122 2014-05-11  Anders Carlsson  <andersca@apple.com>
3123
3124         Add a WKContextConfigurationRef object and make the injected bundle path part of the configuration
3125         https://bugs.webkit.org/show_bug.cgi?id=132806
3126         <rdar://problem/16830143>
3127
3128         Reviewed by Beth Dakin.
3129
3130         Many setters on WKContextRef really only make sense to set early on, so move to a pattern where we create a
3131         configuration object, a WKContextConfiguration which WKContexts can be created from. Add the injected bundle path
3132         as a configuration property. More setters will follow.
3133
3134         * Shared/API/c/WKBase.h:
3135         Add WKContextConfigurationRef.
3136
3137         * Shared/APIObject.h:
3138         Add ContextConfiguration enum declaration.
3139
3140         * UIProcess/API/C/WKAPICast.h:
3141         Handle WKContextConfigurationRef.
3142
3143         * UIProcess/API/C/WKContext.cpp:
3144         (WKContextCreate):
3145         Create an empty WKContextConfigurationRef object and pass it to WKContextCreateWithConfiguration.
3146
3147         (WKContextCreateWithInjectedBundlePath):
3148         Create a WKContextConfigurationRef object, set its bundle path and pass the configuration to WKContextCreateWithConfiguration.
3149
3150         (WKContextCreateWithConfiguration):
3151         Convert the WKContextConfigurationRef object to a WebContextConfiguration and pass it to WebContext::create.
3152
3153         * UIProcess/API/C/WKContext.h:
3154         Add WKContextCreateWithConfiguration.
3155
3156         * UIProcess/API/C/WKContextConfigurationRef.cpp: Added.
3157         (WKContextConfigurationCreate):
3158         Create an API::ContextConfiguration object.
3159
3160         (WKContextConfigurationCopyInjectedBundlePath):
3161         Return the injected bundle path.
3162
3163         (WKContextConfigurationSetInjectedBundlePath):
3164         Set the injected bundle path.
3165
3166         * UIProcess/API/C/WKContextConfigurationRef.h: Added.
3167         New C SPI header.
3168         
3169         * UIProcess/API/Cocoa/WKProcessGroup.mm:
3170         (-[WKProcessGroup initWithInjectedBundleURL:]):
3171         Construct a WebContextConfiguration object and pass it to WebContext::Create.
3172     
3173         * UIProcess/API/Cocoa/WKProcessPool.mm:
3174         (-[WKProcessPool _initWithConfiguration:]):
3175         Construct a WebContextConfiguration object and pass it to WebContext::Create.
3176
3177         * UIProcess/APIContextConfiguration.cpp: Added.
3178         New API::ContextConfiguration object.
3179
3180         (API::ContextConfiguration::webContextConfiguration):
3181         Construct a WebContextConfiguration struct from our current configuration.
3182
3183         * UIProcess/APIContextConfiguration.h: Added.
3184         
3185         * UIProcess/WebContext.cpp:
3186         (WebKit::WebContext::create):
3187         Pass the WebContextConfiguration to the constructor.
3188
3189         (WebKit::WebContext::WebContext):
3190         Set the injected bundle path from the WebContextConfiguration object.
3191
3192         * UIProcess/WebContext.h:
3193         Change the WebContext constructor and create function to take a WebContextConfiguration object.
3194
3195         * WebKit2.xcodeproj/project.pbxproj:
3196         Add new files.
3197
3198 2014-05-10  Csaba Osztrogonác  <ossy@webkit.org>
3199
3200         [WK2] URTBF after r168585.
3201
3202         * Platform/IPC/Connection.h:
3203         * Shared/ChildProcessProxy.cpp:
3204         (WebKit::ChildProcessProxy::terminate):
3205
3206 2014-05-10  Tim Horton  <timothy_horton@apple.com>
3207
3208         [WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
3209         https://bugs.webkit.org/show_bug.cgi?id=132793
3210         <rdar://problem/16877870>
3211
3212         Reviewed by Dan Bernstein.
3213
3214         * UIProcess/API/Cocoa/WKWebView.mm:
3215         (-[WKWebView _updateScrollViewBackground]):
3216         Don't bypass the cache and make a copy of the CGColor just to set its alpha.
3217         Cache the last color and don't bother creating a UIColor nor updating the
3218         color on our views if it hasn't changed.
3219
3220 2014-05-10  Tim Horton  <timothy_horton@apple.com>
3221
3222         Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
3223         https://bugs.webkit.org/show_bug.cgi?id=132790
3224         <rdar://problem/16877802>
3225
3226         Reviewed by Dan Bernstein.
3227
3228         * UIProcess/ios/WKScrollView.mm:
3229         (-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
3230         If only one of the delegates will respond to a selector,
3231         we can return it from forwardingTargetForSelector: to avoid
3232         NSInvocation overhead.
3233
3234 2014-05-10  Dan Bernstein  <mitz@apple.com>
3235
3236         [Mac] Some targets that link or soft-link WebKit.framework don't depend on it
3237         https://bugs.webkit.org/show_bug.cgi?id=132776
3238
3239         Reviewed by Darin Adler.
3240
3241         * WebKit2.xcodeproj/project.pbxproj:
3242
3243 2014-05-10  Ryuan Choi  <ryuan.choi@samsung.com>
3244
3245         [EFL][WK2] Move the ownership of EwkSettings from EwkView to EwkPageGroup
3246         https://bugs.webkit.org/show_bug.cgi?id=132771
3247
3248         Reviewed by Gyuyoung Kim.
3249
3250         Moved ownership of EwkSettings from EwkView to EwkPageGroup.
3251
3252         * UIProcess/API/efl/EwkView.cpp:
3253         (EwkView::EwkView):
3254         * UIProcess/API/efl/EwkView.h:
3255         (EwkView::settings): Deleted.
3256         * UIProcess/API/efl/ewk_page_group.cpp:
3257         (EwkPageGroup::EwkPageGroup):
3258         * UIProcess/API/efl/ewk_page_group_private.h:
3259         (EwkPageGroup::settings):
3260         * UIProcess/API/efl/ewk_settings_private.h:
3261         * UIProcess/API/efl/ewk_view.cpp:
3262         (ewk_view_settings_get):
3263
3264 2014-05-10  Tim Horton  <timothy_horton@apple.com>
3265
3266         [iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE_ASSERT in RemoteLayerTreeDrawingArea::flushLayers()
3267         https://bugs.webkit.org/show_bug.cgi?id=132783
3268         <rdar://problem/16877326>
3269
3270         Reviewed by Anders Carlsson.
3271
3272         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3273         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
3274         There's a race window between the BackingStoreFlusher sending the new
3275         layer tree to the UI process and updating m_hasFlushed where we can
3276         get a reply back in (on the Web process main thread) from the UI process
3277         that we committed the new layer tree (didUpdate).
3278         This will cause the RELEASE_ASSERT in flushLayers() to fire incorrectly.
3279         Since the RELEASE_ASSERT is there only to avoid painting garbage, move
3280         our code to set m_hasFlushed=true to after we finish calling CGContextFlush
3281         on all of the contexts, instead of after we send the layer tree commit message,
3282         which will remove the race entirely.
3283
3284 2014-05-10  Anders Carlsson  <andersca@apple.com>
3285
3286         ASSERTION FAILED: !m_connection under RunJavaScriptAlert
3287         https://bugs.webkit.org/show_bug.cgi?id=132792
3288         <rdar://problem/16691138>
3289
3290         Reviewed by Dan Bernstein.
3291
3292         Detect if someone implementing a UI delegate method with a completion handler never calls the completion
3293         handler and raise an exception instead of asserting.
3294
3295         * UIProcess/Cocoa/UIDelegate.mm:
3296         (WebKit::CompletionHandlerCallChecker::create):
3297         (WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
3298         (WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
3299         (WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
3300         (WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
3301         (WebKit::UIDelegate::UIClient::runJavaScriptAlert):
3302         (WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
3303         (WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
3304
3305 2014-05-10  Anders Carlsson  <andersca@apple.com>
3306
3307         Use xpc_connection_kill for killing child processes where appropriate
3308         https://bugs.webkit.org/show_bug.cgi?id=132788
3309         <rdar://problem/16664185>
3310
3311         Reviewed by Sam Weinig.
3312
3313         * Platform/IPC/Connection.h:
3314         * Platform/IPC/mac/ConnectionMac.mm:
3315         (IPC::Connection::kill):
3316         * Platform/IPC/mac/XPCPtr.h:
3317         (IPC::XPCPtr::operator bool):
3318         * Shared/ChildProcessProxy.cpp:
3319         (WebKit::ChildProcessProxy::terminate):
3320
3321 2014-05-10  Anders Carlsson  <andersca@apple.com>
3322
3323         WebKit2 is leaking an xpc_connection per web process it creates
3324         https://bugs.webkit.org/show_bug.cgi?id=132785
3325         <rdar://problem/14912160>
3326
3327         Reviewed by Sam Weinig.
3328
3329         Introduce an IPC::XPCPtr smart pointer class and use it for XPC connections inside Connection::Identifier and Connection itself.
3330
3331         Make sure we always adopt any connections that are created.
3332
3333         * DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
3334         (DatabaseServiceInitializer):
3335         * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
3336         (WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
3337         (NetworkServiceInitializer):
3338         * Platform/IPC/Connection.h:
3339         (IPC::Connection::Identifier::Identifier):
3340         (IPC::Connection::xpcConnection):
3341         * Platform/IPC/mac/ConnectionMac.mm:
3342         (IPC::Connection::platformInvalidate):
3343         (IPC::Connection::platformInitialize):
3344         (IPC::Connection::getAuditToken):
3345         * Platform/IPC/mac/XPCPtr.h: Added.
3346         (IPC::XPCPtr::XPCPtr):
3347         (IPC::XPCPtr::~XPCPtr):
3348         (IPC::XPCPtr::get):
3349         (IPC::XPCPtr::operator!):
3350         (IPC::XPCPtr::operator=):
3351         (IPC::adoptXPC):
3352         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
3353         (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
3354         (PluginServiceInitializer):
3355         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
3356         (WebKit::BootstrapMain):
3357         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
3358         (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
3359         (WebKit::XPCServiceInitializer):
3360         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
3361         (WebKit::XPCServiceInitializerDelegate::hasEntitlement):
3362         (WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
3363         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
3364         (WebKit::XPCServiceEventHandler):
3365         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
3366         (WebKit::XPCServiceEventHandler):
3367         * UIProcess/Launcher/ProcessLauncher.cpp:
3368         (WebKit::ProcessLauncher::didFinishLaunchingProcess):
3369         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3370         (WebKit::connectToService):
3371         * WebKit2.xcodeproj/project.pbxproj:
3372         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
3373         (WebContentServiceInitializer):
3374
3375 2014-05-10  Anders Carlsson  <andersca@apple.com>
3376
3377         Simplify createDataAvailableSource
3378         https://bugs.webkit.org/show_bug.cgi?id=132782
3379         <rdar://problem/16815202>
3380
3381         Reviewed by Sam Weinig.
3382
3383         * Platform/IPC/mac/ConnectionMac.mm: Renamed from Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp.
3384         Rename to make this Objective-C++ so we get the lambda-to-block conversion.
3385
3386         (IPC::createDataAvailableSource):
3387         Make this a function template and just pass the function directly to dispatch_source_set_event_handler.
3388
3389         (IPC::Connection::open):
3390         Use lambdas instead of WTF::bind, so we'll make sure the connection is kept alive.
3391
3392         * WebKit2.xcodeproj/project.pbxproj:
3393         Update for ConnectionMac.cpp to ConnectionMac.mm rename.
3394
3395 2014-05-10  Anders Carlsson  <andersca@apple.com>
3396
3397         Follow-up fix.
3398
3399         Reviewed by Darin Adler.
3400
3401         * UIProcess/API/Cocoa/WKNavigationResponse.h:
3402         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
3403         (-[WKNavigationResponse isForMainFrame]):
3404         Use a slightly better name.
3405
3406 2014-05-10  Anders Carlsson  <andersca@apple.com>
3407
3408         Make -[WKNavigationResponse frame] SPI and only expose -[WKNavigationResponse isMainFrame]
3409         https://bugs.webkit.org/show_bug.cgi?id=132781
3410         <rdar://problem/16868319>
3411
3412         Reviewed by Darin Adler.
3413
3414         * UIProcess/API/Cocoa/WKNavigationResponse.h:
3415         * UIProcess/API/Cocoa/WKNavigationResponse.mm:
3416         (-[WKNavigationResponse description]):
3417         (-[WKNavigationResponse isMainFrameNavigation]):
3418         (-[WKNavigationResponse _frame]):
3419         (-[WKNavigationResponse frame]): Deleted.
3420         (-[WKNavigationResponse setFrame:]): Deleted.
3421         * UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
3422         * UIProcess/API/Cocoa/WKNavigationResponsePrivate.h: Added.
3423         * UIProcess/Cocoa/NavigationState.mm:
3424         (WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
3425         * WebKit2.xcodeproj/project.pbxproj:
3426
3427 2014-05-09  Dan Bernstein  <mitz@apple.com>
3428
3429         [Cocoa] Remove a deprecated bundle form delegate method now that no one implements it
3430         https://bugs.webkit.org/show_bug.cgi?id=132769
3431
3432         Reviewed by Sam Weinig.
3433
3434         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
3435         (-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
3436
3437 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
3438
3439         [iOS][WK2] Fix bugs exposed by r168556
3440         https://bugs.webkit.org/show_bug.cgi?id=132768
3441
3442         Reviewed by Ryosuke Niwa.
3443
3444         Fix two bugs exposed by r168556.
3445         1) We were only changing the page scale factor when the scale was not adjusted by live
3446            resize. The idea was that the scale would either be the same (responsive content)
3447            or that it would be defined by the next viewContentRectUpdate.
3448
3449            Now that we also send resize and scroll events, we must always update the scale since
3450            it affects some APIs observable from JavaScript (like scrolling bounds).
3451
3452         2) Internally, Page's scaleFactor is stored as a float and not double. The rounding error
3453            were causing us to send DynamicViewportUpdateChangedTarget() in cases were there is no change
3454            of target.
3455
3456         * WebProcess/WebPage/ios/WebPageIOS.mm:
3457         (WebKit::withinEpsilon):
3458         (WebKit::WebPage::dynamicViewportSizeUpdate):
3459
3460 2014-05-09  Ryuan Choi  <ryuan.choi@samsung.com>
3461
3462         [EFL][WK2] Close icondatabase when EwkFaviconDatabase is destroyed
3463         https://bugs.webkit.org/show_bug.cgi?id=132767
3464
3465         Reviewed by Gyuyoung Kim.
3466
3467         IconDatabase should be closed explicitly.
3468
3469         * UIProcess/API/efl/ewk_favicon_database.cpp:
3470         (EwkFaviconDatabase::~EwkFaviconDatabase):
3471
3472 2014-05-09  Anders Carlsson  <andersca@apple.com>
3473
3474         Another build fix.
3475
3476         * mac/MigrateHeadersToWebKit2.make:
3477         Don't migrate the WKPreferences.h header, WebKit2 provides its own header.
3478
3479 2014-05-09  Benjamin Poulain  <benjamin@webkit.org>
3480
3481         [iOS][WK2] Reset the scroll position on the first frame after didCommitLoad
3482         https://bugs.webkit.org/show_bug.cgi?id=132765
3483
3484         Reviewed by Tim Horton.
3485
3486         Since WebCore does not update our scroll view on load, we need to do that ourself.
3487
3488         In case where we need to restore the state from the history, RemoteLayerTreeDrawingAreaProxy
3489         will always invoke the scrolling after didCommitLayerTree() (since r167916).
3490         Consequently, it is now safe again to reset the scroll position ourself on the first frame.
3491
3492         * UIProcess/API/Cocoa/WKWebView.mm:
3493         (-[WKWebView _didCommitLoadForMainFrame]):
3494         (-[WKWebView _didCommitLayerTree:WebKit::]):
3495         * UIProcess/API/Cocoa/WKWebViewInternal.h:
3496         * UIProcess/ios/WKContentView.mm:
3497         (-[WKContentView _didCommitLoadForMainFrame]):
3498
3499 2014-05-09  Anders Carlsson  <andersca@apple.com>
3500
3501         Update availability macros
3502         https://bugs.webkit.org/show_bug.cgi?id=132763
3503         <rdar://problem/15311800>
3504
3505         Reviewed by Dan Bernstein.
3506
3507         * Configurations/WebKit.xcconfig:
3508         * Shared/API/Cocoa/WKBrowsingContextHandle.h:
3509         * Shared/API/Cocoa/WKFoundation.h:
3510         * Shared/API/Cocoa/_WKFrameHandle.h:
3511         * Shared/API/Cocoa/_WKRemoteObjectInterface.h:
3512         * Shared/API/Cocoa/_WKRemoteObjectRegistry.h:
3513         * UIProcess/API/Cocoa/WKBackForwardList.h:
3514         * UIProcess/API/Cocoa/WKBackForwardListItem.h:
3515         * UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
3516         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
3517         * UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
3518         * UIProcess/API/Cocoa/WKConnection.h:
3519         * UIProcess/API/Cocoa/WKFrameInfo.h:
3520         * UIProcess/API/Cocoa/WKNavigation.h:
3521         * UIProcess/API/Cocoa/WKNavigationAction.h:
3522         (NS_ENUM):
3523         * UIProcess/API/Cocoa/WKNavigationData.h:
3524         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
3525         (NS_ENUM):
3526         * UIProcess/API/Cocoa/WKNavigationResponse.h:
3527         * UIProcess/API/Cocoa/WKPreferences.h:
3528         * UIProcess/API/Cocoa/WKProcessGroup.h:
3529         * UIProcess/API/Cocoa/WKProcessPool.h:
3530         * UIProcess/API/Cocoa/WKScriptMessage.h:
3531         * UIProcess/API/Cocoa/WKScriptMessageHandler.h:
3532         * UIProcess/API/Cocoa/WKTypeRefWrapper.h:
3533         * UIProcess/API/Cocoa/WKUIDelegate.h:
3534         * UIProcess/API/Cocoa/WKUserContentController.h:
3535         * UIProcess/API/Cocoa/WKWebView.h:
3536         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
3537         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
3538         (NS_OPTIONS):
3539         (NS_ENUM):
3540         * UIProcess/API/Cocoa/WKWindowFeatures.h:
3541         * UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
3542         (NS_ENUM):
3543         * UIProcess/API/Cocoa/_WKDownload.h:
3544         * UIProcess/API/Cocoa/_WKElementAction.h:
3545         (NS_ENUM):
3546         * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
3547         * UIProcess/API/Cocoa/_WKScriptWorld.h:
3548         * UIProcess/API/Cocoa/_WKThumbnailView.h:
3549         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
3550         * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
3551         * WebKit2.xcodeproj/project.pbxproj:
3552         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
3553         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h:
3554         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
3555         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
3556         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
3557         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
3558         * WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
3559         * WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
3560         * WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
3561         * WebProcess/InjectedBundle/API/mac/WKDOMText.h:
3562         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
3563         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
3564         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
3565         * mac/rewrite-availability-macros.sh: Added.
3566
3567 2014-05-09  Joseph Pecoraro  <pecoraro@apple.com>
3568
3569         Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
3570         https://bugs.webkit.org/show_bug.cgi?id=132409
3571
3572         Reviewed by Timothy Hatcher.
3573
3574         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3575         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3576         (WebKit::WebInspectorClient::parentProcessIdentifier): Deleted.
3577         pid per debuggable is no longer needed.
3578
3579         * WebProcess/WebProcess.cpp:
3580         (WebKit::WebProcess::initializeWebProcess):
3581         Immediately pass the parent process pid and audit_token on
3582         to the RemoteInspector singleton when the process is created
3583         so that it can be sent to webinspectord.
3584
3585 2014-05-09  Enrica Casucci  <enrica@apple.com>
3586
3587         REGRESSION (WebKit2): Tapping in search field at wikipedia.org doesn’t bring up the keyboard.
3588         https://bugs.webkit.org/show_bug.cgi?id=132761
3589         <rdar://problem/16857491>
3590
3591         Reviewed by Benjamin Poulain.
3592
3593         The interactionAssistant accessor should never create an instance of
3594         UIWKTextInteractionAssistant, but simply return the value of _textInteractionAssistant.
3595         The text interaction assistant should only be created when needed so that the rest of
3596         the code could reliably check if we are interacting with text or not.
3597
3598         * UIProcess/ios/WKContentViewInteraction.mm:
3599         (-[WKContentView interactionAssistant]):
3600
3601 2014-05-09  Simon Fraser  <simon.fraser@apple.com>
3602
3603         Fix some issues with scrolling tree logging
3604         https://bugs.webkit.org/show_bug.cgi?id=132762
3605
3606         Reviewed by Tim Horton.
3607         
3608         Only dump viewport constraints when they change, and dump the primary layer on
3609         scrolling nodes.
3610         
3611         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
3612         (WebKit::RemoteScrollingTreeTextStream::dump): Dump the primary layer.
3613
3614 2014-05-09  Simon Fraser  <simon.fraser@apple.com>
3615
3616         [iOS WK2] Fixed elements can go outside the document on pinching
3617         https://bugs.webkit.org/show_bug.cgi?id=132759
3618         <rdar://problem/16870835>
3619
3620         Reviewed by Benjamin Poulain.
3621         
3622         Constrain the rect used to position fixed position objects when pinching (when
3623         the scale goes below the minimumScale). Do so in such a way that there's a smooth
3624         transition between rubber-banding and pinching.
3625
3626         * UIProcess/API/Cocoa/WKWebView.mm:
3627         (-[WKWebView _updateScrollViewBackground]): Use a nicer form for std::max<>.
3628         (-[WKWebView _updateVisibleContentRects]): Pass the minimum scale.
3629         * UIProcess/API/ios/WKViewIOS.mm:
3630         (-[WKView _updateVisibleContentRects]): Ditto.
3631         * UIProcess/ios/WKContentView.h:
3632         * UIProcess/ios/WKContentView.mm:
3633         (adjustedUnexposedEdge): Helper to adjust the left/top.
3634         (adjustedUnexposedMaxEdge): Helper to adjust the right/bottom.
3635         (fixedPositionRectFromExposedRect):
3636         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:minimumScale:inStableState:]):
3637         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
3638
3639 2014-05-09  Zalan Bujtas  <zalan@apple.com>
3640
3641         Subpixel rendering[iOS]: Top bar on apple.com/support jiggles when the swoosh animates.
3642         https://bugs.webkit.org/show_bug.cgi?id=132750
3643         <rdar://problem/16803281>
3644
3645         Reviewed by Simon Fraser.
3646
3647         This patch ensures that GraphicsLayer and RemoteLayerBackingStore have the same dimensions.
3648         
3649         Remove integral enclosing when we set the size on RemoteLayerBackingStore. It makes the layer's size
3650         different from the backingstore when the passed value is fractional.
3651         We scale and integral round this value to size the shareable bitmap later. Rounding ensures that
3652         the final size value matches what we calculated at GraphicsLayerCA::updateGeometry()
3653
3654         Currently not testable.
3655
3656         * Shared/mac/RemoteLayerBackingStore.h:
3657         (WebKit::RemoteLayerBackingStore::size):
3658         * Shared/mac/RemoteLayerBackingStore.mm:
3659         (WebKit::RemoteLayerBackingStore::ensureBackingStore):
3660         (WebKit::RemoteLayerBackingStore::setNeedsDisplay): use enclosing here to ensure we cover the entire backing store.
3661         (WebKit::RemoteLayerBackingStore::display):
3662         (WebKit::RemoteLayerBackingStore::drawInContext):
3663         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3664         (WebKit::PlatformCALayerRemote::updateBackingStore):
3665
3666 2014-05-09  Benjamin Poulain  <bpoulain@apple.com>
3667
3668         [iOS][WK2] Set up the resize events
3669         https://bugs.webkit.org/show_bug.cgi?id=132726
3670
3671         Reviewed by Darin Adler and Simon Fraser.
3672
3673         Wire the UI Process updates to FrameView to send the resize events appropriately.
3674
3675         * Shared/VisibleContentRectUpdateInfo.cpp:
3676         (WebKit::VisibleContentRectUpdateInfo::encode):
3677         (WebKit::VisibleContentRectUpdateInfo::decode):
3678         * Shared/VisibleContentRectUpdateInfo.h:
3679         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
3680         (WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively):
3681         * UIProcess/API/Cocoa/WKWebView.mm:
3682         (-[WKWebView _updateVisibleContentRects]):
3683         * UIProcess/ios/WKContentView.h:
3684         * UIProcess/ios/WKContentView.mm:
3685         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:isChangingObscuredInsetsInteractively:]):
3686         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
3687         Pass down the status of the content insets with the view update to main frame's FrameView
3688         when needed.
3689
3690         * WebProcess/WebPage/ios/WebPageIOS.mm:
3691         (WebKit::WebPage::dynamicViewportSizeUpdate):
3692         On live resize, send the resize event, then the scroll events (if needed).
3693
3694         Since JavaScript now gets two chances to change the content (resize event + scroll event),
3695         we query the actual scroll offset and scale for the DynamicViewportUpdateChangedTarget.
3696
3697         (WebKit::WebPage::viewportConfigurationChanged):
3698         Define the custom size on load before the app gets a chance to send different rects.
3699         If for some reason the app changes its mind about the insets, the content will be notified with a resize event.
3700
3701         (WebKit::WebPage::updateVisibleContentRects):
3702         Send the resize event when the insets are stable.
3703         Also move the scroll event after the resize event for consistency with live resize.
3704
3705 2014-05-09  Benjamin Poulain  <benjamin@webkit.org>
3706
3707         [iOS] Switch geolocation to an explicit authorization query model
3708         https://bugs.webkit.org/show_bug.cgi?id=132717
3709
3710         Reviewed by Sam Weinig.
3711
3712         Switch WKGeolocationProviderIOS to use the new API of WebGeolocationCoreLocationProvider.
3713
3714         On WebKit2, the whole logic to track requesters is in WebGeolocationManagerProxy.
3715
3716         Without the warmup sequence, WKGeolocationProviderIOS becomes really dumb: it just provides
3717         the two step authorization and forward the start/stop messages to the WebGeolocationCoreLocationProvider.
3718
3719         * UIProcess/ios/WKGeolocationProviderIOS.mm:
3720         (-[WKGeolocationProviderIOS _stopUpdating]):
3721         (-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
3722         (-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
3723         (-[WKGeolocationProviderIOS geolocationAuthorizationDenied]):
3724         (-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
3725         (-[WKWebAllowDenyPolicyListener deny]):
3726         (-[WKGeolocationProviderIOS _stopUpdatingIfPossible]): Deleted.
3727         (-[WKGeolocationProviderIOS geolocationDelegateStarted]): Deleted.
3728         (-[WKGeolocationProviderIOS geolocationDelegateUnableToStart]): Deleted.
3729         (-[WKGeolocationProviderIOS permissionDenied:]): Deleted.
3730         (-[WKWebAllowDenyPolicyListener initWithProvider:permissionRequestProxy:]): Deleted.
3731
3732 2014-05-09  Gordon Sheridan  <gordon_sheridan@apple.com>
3733
3734         Expose functions necessary for copying favicon between IconDatabases.
3735         https://bugs.webkit.org/show_bug.cgi?id=132709
3736
3737         Reviewed by Brady Eidson.
3738
3739         * UIProcess/API/C/WKIconDatabase.cpp:
3740         (WKIconDatabaseSetIconURLForPageURL):
3741         Add C API wrapper for WebIconDatabase::setIconURLForPageURL().
3742
3743         (WKIconDatabaseCopyIconURLForPageURL):
3744         Add C API wrapper for WebIconDatabase::synchronousIconURLForPageURL().
3745
3746         * UIProcess/API/C/WKIconDatabase.h:
3747         Added declarations for wrapper functions above.
3748
3749 2014-05-09  Tim Horton  <timothy_horton@apple.com>
3750
3751         Fix the iOS DRT build by including CG headers in WKPreferences.h, which uses CGFloat.
3752
3753         * UIProcess/API/Cocoa/WKPreferences.h:
3754
3755 2014-05-09  Brent Fulgham  <bfulgham@apple.com>
3756
3757         {TelephoneNumber, Selection}ControllerMac implementations dosn't handle tiled drawing properly.
3758         https://bugs.webkit.org/show_bug.cgi?id=132746
3759         <rdar://problem/16789588>
3760
3761         Reviewed by Tim Horton.
3762
3763         Don't try to draw the detector UI if no part of the selection bounds are inside
3764         the current tile. Don't limit the detector UI to the bounds of this tile, or else
3765         it will attempt to squeeze itself into the possibly small space available. Let it
3766         draw as if it had the whole screen, and rely on the context clip region to
3767         avoid overdrawing.
3768
3769         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
3770         (WebKit::TelephoneNumberOverlayController::drawRect): Correct tiled drawing behavior.
3771         * WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
3772         (WebKit::SelectionOverlayController::drawRect): Ditto.
3773
3774 2014-05-09  Anders Carlsson  <andersca@apple.com>
3775
3776         Production build fix.
3777
3778         Reviewed by Dan Bernstein.
3779
3780         * Configurations/BaseTarget.xcconfig:
3781         Add SDKROOT in front of UMBRELLA_FRAMEWORKS_DIR for OS X Production builds.
3782
3783 2014-05-09  Tim Horton  <timothy_horton@apple.com>
3784
3785         [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
3786         https://bugs.webkit.org/show_bug.cgi?id=132667
3787         <rdar://problem/15349483>
3788
3789         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3790         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
3791         Address a missed review comment about a missing std::move.
3792
3793 2014-05-09  Anders Carlsson  <andersca@apple.com>
3794
3795         Rename WebKit2.framework to WebKit.framework
3796         https://bugs.webkit.org/show_bug.cgi?id=132743
3797         <rdar://problem/15920046>
3798
3799         Reviewed by Dan Bernstein.
3800
3801         * Configurations/BaseLegacyProcess.xcconfig:
3802         Change INSTALL_PATH to WebKit.framework.
3803
3804         * Configurations/BaseTarget.xcconfig:
3805         Change WEBKIT2_FRAMEWORKS_DIR to WEBKIT_FRAMEWORKS_DIR and add WEBKIT_LEGACY_PRIVATE_HEADERS_DIR.
3806
3807         * Configurations/BaseXPCService.xcconfig:
3808         Change WebKit2.framework to WebKit.framework.
3809
3810         * Configurations/WebKit.xcconfig: Copied from Source/WebKit2/Configurations/WebKit2.xcconfig.
3811         New configuration file for WebKit.framework. Re-export WebKitLegacy.framework.
3812
3813         * Configurations/WebKit2.xcconfig:
3814         New configuration file for the WebKit2 shim framework. Re-export WebKit.framework.
3815
3816         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
3817         Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
3818
3819         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
3820         Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
3821         
3822         * Shared/API/Cocoa/WKBrowsingContextHandle.h:
3823         * Shared/API/Cocoa/WKRenderingProgressEvents.h:
3824         Update header imports.
3825
3826         * Shared/API/Cocoa/WebKit.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.h.
3827         New umbrella header. Imports the modern WebKit API as well as the legacy API.
3828
3829         * Shared/API/Cocoa/WebKit.m: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.m.
3830         Export install name symbols on iOS.
3831
3832         * Shared/API/Cocoa/WebKitPrivate.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKitPrivate.h.
3833         New umbrella SPI header. Imports the modern WebKit SPI.
3834
3835         * Many headers:
3836         Change WebKit2 includes to WebKit includes.
3837
3838         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
3839         (WebKit::XPCServiceEventHandler):
3840         Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
3841
3842         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
3843         (WebKit::XPCServiceEventHandler):
3844         Change bundle identifier from com.apple.WebKit2 to com.apple.WebKit.
3845         
3846         * UIProcess/API/Cocoa/WKPreferences.h:
3847         Stop including WKPreferencesRef.h, we have a WebKit2 header that handles this workaround for us now.
3848
3849         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3850         (WebKit::addDYLDEnvironmentAdditions):
3851         (WebKit::connectToService):
3852         (WebKit::createProcess):
3853         (WebKit::ProcessLauncher::launchProcess):
3854         Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
3855
3856         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3857         (WebKit::PluginProcessProxy::createPropertyListFile):
3858         Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
3859
3860         * UIProcess/mac/WebContextMac.mm:
3861         (WebKit::WebContext::platformDefaultDiskCacheDirectory):
3862         Change bundle identifier from com.apple.WebKit2 to com.apple.WebKit.
3863         
3864         * WebKit2.xcodeproj/project.pbxproj:
3865         Copy the python message scripts to the WebKit2 framework.
3866         Rename WebKit2.framework to WebKit.framework everywhere.
3867         Add a new WebKit2 target that builds the shim WebKit2 framework.
3868         Move the build script phase that migrates WebKitLegacy headers to WebKit.
3869         Add a new build script phase that adds forwarding headers from WebKit2 to WebKit.
3870
3871         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
3872         Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
3873
3874         * mac/MigrateHeadersFromWebKitLegacy.make: Renamed from Source/WebKit/mac/WebKitLegacy/MigrateHeadersFromWebKitLegacy.make.
3875         Move the makefile that migrates WebKitLegacy headers here. On OS X, it copies the header contents and on iOS it creates forarding headers.
3876
3877         * mac/MigrateHeadersToWebKit2.make:
3878         New makefile that creates forwarding headers for the WebKit2 shim framework.
3879
3880         * mac/WKPreferences.h: Added.
3881         Add WebKit2/WKPreferences.h header that imports WebKit2/WKPreferencesref.h.
3882
3883         * mac/WebKit2.m:
3884         Skeleton for the WebKit2 shim framework.
3885
3886         * mac/Info-WebKit2.plist: Added.
3887         New Info.plist file for the WebKit2 shim framework.
3888
3889 2014-05-09  Martin Hodovan  <mhodovan.u-szeged@partner.samsung.com>
3890
3891         [WK2] Make generate-forwarding-headers.pl work after WebKit2.framework -> WebKit.framework rename
3892         https://bugs.webkit.org/show_bug.cgi?id=132733
3893
3894         Reviewed by Csaba Osztrogonác.
3895
3896         Rewrite framework's directory name to WebKit2 if the framework is WebKit (former WebKit2)
3897         and then collect headers inside the fixed framework directory and generate forwarding
3898         headers point to the fixed directory.
3899
3900         Leave WebKit2 in @frameworks list during the transition. It can be removed
3901         once <WebKit2/foo.h> style includes were renamed to <WebKit/foo.h> everywhere.
3902
3903         * Scripts/generate-forwarding-headers.pl:
3904         (collectFameworkHeaderPaths):
3905         (createForwardingHeadersForFramework):
3906
3907 2014-05-08  Alexey Proskuryakov  <ap@apple.com>
3908
3909         Automatically zip document bundles used via File API
3910         https://bugs.webkit.org/show_bug.cgi?id=132713
3911         <rdar://problem/13397892>
3912
3913         Reviewed by Anders Carlsson.
3914
3915         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: NetworkProcess
3916         now uses FileCoordination (WebProcess already had this allowed).
3917
3918         * Shared/BlobDataFileReferenceWithSandboxExtension.h: Added final to the class.
3919
3920 2014-05-08  Simon Fraser  <simon.fraser@apple.com>
3921
3922         [iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
3923         https://bugs.webkit.org/show_bug.cgi?id=132719
3924         <rdar://problem/16860837>
3925
3926         Reviewed by Benjamin Poulain.
3927         
3928         If we haven't received visible rects from the web process, compute the
3929         fixed position rect, but only after scale has been set.
3930
3931         * WebProcess/WebPage/ios/WebPageIOS.mm:
3932         (WebKit::WebPage::viewportConfigurationChanged):
3933
3934 2014-05-08  Jer Noble  <jer.noble@apple.com>
3935
3936         [Mac, iOS] Add source application accounting to AVURLAsset.
3937         https://bugs.webkit.org/show_bug.cgi?id=132637
3938
3939         Reviewed by Eric Carlson.
3940
3941         Add accessor for sourceApplicationIdentifier.
3942
3943         * NetworkProcess/RemoteNetworkingContext.h:
3944         * NetworkProcess/mac/RemoteNetworkingContext.mm:
3945         (WebKit::RemoteNetworkingContext::sourceApplicationIdentifier):
3946         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
3947         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
3948         (WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier):
3949
3950 2014-05-08  Tim Horton  <timothy_horton@apple.com>
3951
3952         [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
3953         ​https://bugs.webkit.org/show_bug.cgi?id=132667
3954         <rdar://problem/16861454>
3955
3956         Rubber-stamped by Simon Fraser.
3957
3958         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
3959         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
3960         Add a null check to fix a crash on layers which lose backing store.
3961
3962 2014-05-08  Beth Dakin  <bdakin@apple.com>
3963
3964         REGRESSION (r168053): Phone number detection boxes are wrong when scrolled
3965         https://bugs.webkit.org/show_bug.cgi?id=132706
3966         -and corresponding-
3967         <rdar://problem/16787957>
3968
3969         Reviewed by Tim Horton.
3970
3971         We need to paint the boxes in Document coordinates. Range::boundingRect() was 
3972         giving us a point that took scroll position into account, and that’s not what we 
3973         want. Here we use Range::textQuads() instead so that we can get something in 
3974         Document coordinates, and then we need to convert that up to the main Document’s 
3975         coordinates.
3976         * WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
3977         (WebKit::textQuadsToBoundingRectForRange):
3978         (WebKit::TelephoneNumberOverlayController::drawRect):
3979
3980         The telephone click function wants a point in Window coordinates.
3981         (WebKit::TelephoneNumberOverlayController::mouseEvent):
3982
3983 2014-05-08  Tim Horton  <timothy_horton@apple.com>
3984
3985         [iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
3986         https://bugs.webkit.org/show_bug.cgi?id=132667
3987         <rdar://problem/15349483>
3988
3989         Reviewed by Darin Adler.
3990
3991         * Shared/mac/RemoteLayerBackingStore.h:
3992         * Shared/mac/RemoteLayerBackingStore.mm:
3993         (WebKit::RemoteLayerBackingStore::takeFrontContextPendingFlush):
3994         (WebKit::RemoteLayerBackingStore::flush): Deleted.
3995         Add takeFrontContextPendingFlush, which returns the painted-but-not-yet-flushed front context,
3996         and drops our reference to it. This needs to be called on all backing store between paints.
3997
3998         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
3999         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::hasFlushed):
4000         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
4001         (WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
4002         (WebKit::RemoteLayerTreeDrawingArea::~RemoteLayerTreeDrawingArea):
4003         (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
4004         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
4005         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
4006         (WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
4007         (WebKit::flushBackingStoreChangesInTransaction): Deleted.
4008         Flush backing store and send the layer tree commit to the UI process from a dispatch queue.
4009         We will only ever have a single commit in flight at a time, and there's a new
4010         RELEASE_ASSERT to ensure that is the case.
4011         We package up the commit on the main thread; the queue calls CGContextFlush
4012         on all of the newly painted contexts and then tosses the commit over to the UI process.
4013         This is a win in many cases because the Web process main thread can go ahead
4014         and do other non-painting tasks while the queue is blocked on painting.
4015
4016 2014-05-08  Tim Horton  <timothy_horton@apple.com>
4017
4018         [wk2] Don't use the XPC-based plugin process for Adobe Reader
4019         https://bugs.webkit.org/show_bug.cgi?id=132701
4020         <rdar://problem/16792692>
4021
4022         Reviewed by Anders Carlsson.
4023
4024         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
4025         (WebKit::shouldUseXPC):
4026         Rename the debugging default to a more modern and accurate name.
4027         Don't use XPC for Adobe Reader.
4028
4029         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
4030         Move the check for plugins that need an executable heap into shouldUseXPC.
4031
4032 2014-05-08  Benjamin Poulain  <benjamin@webkit.org>
4033
4034         [iOS][WK2] Remove an incorrect assertion on asynchronous touch dispatch
4035         https://bugs.webkit.org/show_bug.cgi?id=132660
4036
4037         Reviewed by Enrica Casucci.
4038
4039         This assertion no longer make sense after r168393. Now the asynchronous behavior is maintained
4040         until the last finger leaves the screen.
4041
4042         * UIProcess/WebPageProxy.cpp:
4043         (WebKit::WebPageProxy::handleTouchEventAsynchronously):
4044
4045 2014-05-08  Alexey Proskuryakov  <ap@apple.com>
4046
4047         Make BlobDataFileReference manage its sandbox extension
4048         https://bugs.webkit.org/show_bug.cgi?id=132689
4049
4050         Reviewed by Anders Carlsson.
4051
4052         * CMakeLists.txt:
4053         * PlatformGTK.cmake:
4054         * WebKit2.xcodeproj/project.pbxproj:
4055         Added BlobDataFileReferenceWithSandboxExtension.
4056
4057         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
4058         (WebKit::NetworkBlobRegistry::registerFileBlobURL):
4059         (WebKit::NetworkBlobRegistry::registerBlobURL):
4060         (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
4061         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
4062         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
4063         (WebKit::NetworkBlobRegistry::filesInBlob):
4064         (WebKit::NetworkBlobRegistry::sandboxExtensions): Deleted.
4065         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
4066         We no longer track sandbox extensions here. Instead, provide a way to get files
4067         for a blob, which contain extensions and can allow access to themselves.