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