Remove all uses of deprecatedCharacters from WebKit2
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2014-03-15  Darin Adler  <darin@apple.com>
2
3         Remove all uses of deprecatedCharacters from WebKit2
4         https://bugs.webkit.org/show_bug.cgi?id=130197
5
6         Reviewed by Andreas Kling.
7
8         * Shared/APIString.h: Rewrote getCharacters to use StringView,
9         substring, and getCharactersWithUpconvert. Added an 8-bit case
10         to getUTF8CString.
11
12         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
13         (WebKit::writeByte): Added.
14         (WebKit::writeCharacter): Added.
15         (WebKit::writeLine): Added. Uses operator[] instead of characters16 to get
16         the UTF-16 characters out of the string.
17         (WebKit::NetscapePluginModule::scanPlugin): Replaced code that writes out
18         text to stdout with much simpler version using the functions above.
19
20         * UIProcess/TextChecker.h: Changed text arguments to use StringView instead
21         of UChar/int pairs.
22
23         * UIProcess/WebPageProxy.cpp:
24         (WebKit::WebPageProxy::internalShowContextMenu): Updated to pass StringView.
25
26         * UIProcess/efl/TextCheckerEfl.cpp:
27         (WebKit::nextWordOffset): Changed function to use StringView and unsigned.
28         (WebKit::TextChecker::checkTextOfParagraph): Changed to use StringView and
29         substring.
30         (WebKit::TextChecker::checkSpellingOfString): Ditto.
31         (WebKit::TextChecker::checkGrammarOfString): Ditto.
32         (WebKit::TextChecker::requestCheckingOfString): Pass in a StringView, so no
33         need to call deprecatedCharacters.
34
35         * UIProcess/ios/TextCheckerIOS.mm:
36         (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView.
37         (WebKit::TextChecker::checkSpellingOfString): Ditto.
38         (WebKit::TextChecker::checkGrammarOfString): Ditto.
39
40         * UIProcess/mac/TextCheckerMac.mm:
41         (WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView and
42         use StringView::createNSStringWithoutCopying.
43         (WebKit::TextChecker::checkSpellingOfString): CHanged to take StringView.
44         (WebKit::TextChecker::checkGrammarOfString): Ditto.
45
46         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
47         (WebKit::convertStringToKeyCodes): Changed to take StringView and use
48         upconvertedCharacters instead of deprecatedCharacters. Also use move instead
49         of swap.
50         (WebKit::NetscapePlugin::sendComplexTextInput): Updated to new style for loop.
51
52         * WebProcess/WebPage/EncoderAdapter.cpp:
53         (WebKit::EncoderAdapter::encodeString): Use StringView::upconvertedCharacters
54         instead of String::deprecatedCharacters.
55
56 2014-03-15  David Kilzer  <ddkilzer@apple.com>
57
58         [iOS] Define SYSTEM_VERSION_PREFIX consistently
59         <http://webkit.org/b/130293>
60         <rdar://problem/15926359>
61
62         Reviewed by Dan Bernstein.
63
64         * Configurations/Version.xcconfig:
65         (SYSTEM_VERSION_PREFIX): Sync with
66         Source/WebKit/mac/Version.xcconfig.
67
68 2014-03-14  Alexey Proskuryakov  <ap@apple.com>
69
70         [Mac] Sync extended attribute related rules with AppSandbox profile
71         https://bugs.webkit.org/show_bug.cgi?id=130263
72         <rdar://problem/16318965>
73
74         Reviewed by Sam Weinig.
75
76         Update the fix to use a different syntax in some OS versions.
77
78         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
79         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
80         * WebProcess/com.apple.WebProcess.sb.in:
81
82 2014-03-14  Ryosuke Niwa  <rniwa@webkit.org>
83
84         Revert erroneous changes made to UIProcess/API/Cocoa in r165676.
85
86         * UIProcess/API/Cocoa/WKBackForwardList.h:
87         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h.
88         * UIProcess/API/Cocoa/WKNavigation.h:
89         * UIProcess/API/Cocoa/WKNavigationAction.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h.
90         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
91         (NS_ENUM):
92         * UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h.
93         * UIProcess/API/Cocoa/WKNavigationTrigger.h: Removed.
94         * UIProcess/API/Cocoa/WKWebView.h:
95
96 2014-03-14  Mark Rowe  <mrowe@apple.com>
97
98         Fix the production build.
99
100         Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
101         be at the expected relative path when working from installed source.
102
103         * Configurations/Base.xcconfig:
104
105 2014-03-14  Maciej Stachowiak  <mjs@apple.com>
106
107         Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
108         https://bugs.webkit.org/show_bug.cgi?id=130276
109         <rdar://problem/16266927>
110         
111         Reviewed by Simon Fraser.
112
113         * Shared/AsyncRequest.cpp:
114         * Shared/AsyncRequest.h:
115         * Shared/ContextMenuContextData.cpp:
116         * Shared/ContextMenuContextData.h:
117         * Shared/Databases/DatabaseProcessCreationParameters.h:
118         * Shared/Databases/IndexedDB/IDBUtilities.cpp:
119         * Shared/Databases/IndexedDB/IDBUtilities.h:
120         * Shared/mac/RemoteLayerBackingStore.h:
121         * Shared/mac/RemoteLayerBackingStore.mm:
122         * UIProcess/API/Cocoa/WKBackForwardList.h:
123         * UIProcess/API/Cocoa/WKBackForwardListItem.h: Removed.
124         * UIProcess/API/Cocoa/WKNavigation.h:
125         * UIProcess/API/Cocoa/WKNavigationAction.h: Removed.
126         * UIProcess/API/Cocoa/WKNavigationDelegate.h:
127         * UIProcess/API/Cocoa/WKNavigationResponse.h: Removed.
128         * UIProcess/API/Cocoa/WKNavigationTrigger.h: Added.
129         (NS_ENUM):
130         * UIProcess/API/Cocoa/WKWebView.h:
131         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
132         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
133         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
134         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
135         * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
136         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
137         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
138         * WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
139         * WebProcess/Databases/WebToDatabaseProcessConnection.h:
140         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
141         * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
142         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
143         * WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
144         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
145         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
146         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
147         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
148         * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
149         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
150         * WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
151
152 2014-03-14  Simon Fraser  <simon.fraser@apple.com>
153
154         [iOS WK2] background-attachment: fixed renders oddly, moves around
155         https://bugs.webkit.org/show_bug.cgi?id=130277
156         <rdar://problem/16332883>
157
158         Reviewed by Tim Horton.
159         
160         Actually send scrolling and counter-scrolling layers to the UI process!
161
162         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
163         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
164         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
165
166 2014-03-14  Anders Carlsson  <andersca@apple.com>
167
168         Try to fix the iOS build.
169
170         * UIProcess/mac/WebContextMac.mm:
171
172 2014-03-14  Anders Carlsson  <andersca@apple.com>
173
174         Begin work on the bundle parameter API
175         https://bugs.webkit.org/show_bug.cgi?id=130267
176
177         Reviewed by Dan Bernstein.
178
179         * Shared/WebProcessCreationParameters.cpp:
180         (WebKit::WebProcessCreationParameters::encode):
181         (WebKit::WebProcessCreationParameters::decode):
182         * Shared/WebProcessCreationParameters.h:
183         * UIProcess/API/Cocoa/WKProcessPool.mm:
184         (-[WKProcessPool _objectForBundleParameter:]):
185         (-[WKProcessPool _setObject:forBundleParameter:]):
186         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
187         * UIProcess/WebContext.h:
188         (WebKit::WebContext::bundleParameters):
189         * UIProcess/mac/WebContextMac.mm:
190         (WebKit::WebContext::ensureBundleParameters):
191         (WebKit::WebContext::platformInitializeWebProcess):
192
193 2014-03-14  Alexey Proskuryakov  <ap@apple.com>
194
195         [Mac] Sync extended attribute related rules with AppSandbox profile
196         https://bugs.webkit.org/show_bug.cgi?id=130263
197         <rdar://problem/16318965>
198
199         Reviewed by Sam Weinig.
200
201         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
202         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
203         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
204         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
205         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
206         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
207         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
208         * WebProcess/com.apple.WebProcess.sb.in:
209
210 2014-03-14  Simon Fraser  <simon.fraser@apple.com>
211
212         [iOS WK2] Improve behavior of fixed elments on zooming
213         https://bugs.webkit.org/show_bug.cgi?id=130253
214
215         Reviewed by Beth Dakin.
216
217         Correctly reposition right- and bottom-relative position:fixed
218         elements on zooming in WK2 iOS by telling the scrolling tree
219         about zoom-related viewport changes.
220
221         * Shared/mac/RemoteLayerTreeTransaction.h:
222         (WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged):
223         Drive-by cleanup; typedef the flags field to an unsigned, to avoid ugly casting.
224         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
225         (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Pass out a flag to say
226         if the update contained a new fixed or sticky layer.
227         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
228         (WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
229         Call into the new ScrolingTree::viewportChangedViaDelegatedScrolling().
230         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
231         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: If we got a new fixed
232         or sticky layer, set fixedOrStickyLayerChanged to true.
233         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto.
234         * UIProcess/ios/WKContentView.mm:
235         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
236         Remember both the old zoomScale and the filteredScale, since the fixed position rect
237         should be computed using the unfiltered scale.
238         Some FloatRect -> CGRect changes.
239         Now call viewportChangedViaDelegatedScrolling() on the scrolling coordinator.
240         (-[WKContentView fixedPositionRectFromExposedRect:scale:]): Call the
241         FrameView function to compute the iOS fixed position rect.
242         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
243         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): If the update
244         got a new fixed or sticky layer, run the scrolling tree logic to make sure
245         it gets into the right place.
246         * UIProcess/mac/RemoteLayerTreeHost.mm:
247         (WebKit::RemoteLayerTreeHost::updateLayerTree): If we logged here,
248         we'd log twice if the tiled scrolling indicator was enabled, so 
249         hoisted the logging out into the caller.
250
251 2014-03-14  Landry Breuil  <landry@openbsd.org>
252
253         Use the correct type in webkitSoupRequestInputStreamNew()'s declaration.
254         Nhttps://bugs.webkit.org/show_bug.cgi?id=129974
255
256         Reviewed by Andreas Kling.
257
258         * WebProcess/soup/WebKitSoupRequestInputStream.h:
259
260 2014-03-14  Anders Carlsson  <andersca@apple.com>
261
262         Fix crash when resizing the visited link table
263         https://bugs.webkit.org/show_bug.cgi?id=130257
264         <rdar://problem/16328177>
265
266         Reviewed by Dan Bernstein.
267
268         We're iterating over the old table, so use currentTableSize in the loop termination condition.
269
270         * UIProcess/VisitedLinkProvider.cpp:
271         (WebKit::VisitedLinkProvider::resizeTable):
272
273 2014-03-14  Dan Bernstein  <mitz@apple.com>
274
275         [Cocoa] Expose a way to set the cookie accept policy
276         https://bugs.webkit.org/show_bug.cgi?id=130251
277
278         Reviewed by Anders Carlsson.
279
280         * UIProcess/API/Cocoa/WKProcessPool.mm:
281         (toHTTPCookieAcceptPolicy): Added a helper function that maps from NSHTTPCookieAcceptPolicy
282         values to WebKit::HTTPCookieAcceptPolicy values.
283         (-[WKProcessPool _setCookieAcceptPolicy:]): Added. Calls
284         WebCookieManagerProxy::setHTTPCookieAcceptPolicy. 
285         * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared new method.
286
287 2014-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>
288
289         [GTK] WebKit2WebExtension GIR can't be used in vala
290         https://bugs.webkit.org/show_bug.cgi?id=127179
291
292         Reviewed by Martin Robinson.
293
294         Do not include all WebKit2 gir symbols from WebKit2WebExtension gir
295         file.
296
297         * GNUmakefile.am:
298         * PlatformGTK.cmake:
299
300 2014-03-14  Csaba Osztrogonác  <ossy@webkit.org>
301
302         [CMake] URTBF after r165619.
303
304         * CMakeLists.txt: Add new files.
305
306 2014-03-14  Anders Carlsson  <andersca@apple.com>
307
308         Remove WebContext::addVisitedLink
309         https://bugs.webkit.org/show_bug.cgi?id=130242
310
311         Reviewed by Dan Bernstein.
312
313         Fold the function into WKContextAddVisitedLink instead.
314
315         * UIProcess/API/C/WKContext.cpp:
316         (WKContextAddVisitedLink):
317         * UIProcess/WebContext.cpp:
318         * UIProcess/WebContext.h:
319         (WebKit::WebContext::visitedLinkProvider):
320
321 2014-03-13  Anders Carlsson  <andersca@apple.com>
322
323         Move visited link handling to VisitedLinkTableController and VisitedLinkProvider
324         https://bugs.webkit.org/show_bug.cgi?id=130223
325         <rdar://problem/16315792>
326
327         Reviewed by Dan Bernstein.
328
329         * DerivedSources.make:
330         Generate messages for VisitedLinkProvider and VisitedLinkTableController.
331         
332         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
333         (-[WKWebViewConfiguration copyWithZone:]):
334         Set the visited link provider.
335
336         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
337         Add addVisitedLinkWithURL: method.
338
339         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
340         (-[_WKVisitedLinkProvider addVisitedLinkWithURL:]):
341         Compute a link hash from the absolute URL string and pass it to the underlying VisitedLinkProvider object.
342
343         * UIProcess/VisitedLinkProvider.cpp:
344         (WebKit::VisitedLinkProvider::addProcess):
345         Add the process to the m_processes HashCountedSet. If it's the first time we're adding the process, 
346         add the VisitedLinkProvider object as a message receiver and send the visited link table to the process.
347
348         (WebKit::VisitedLinkProvider::removeProcess):
349         Remove the process from the m_processes HashCountedSet. If we're removing the last reference to the process,
350         remove ourselves as a  message receiver.
351
352         (WebKit::VisitedLinkProvider::addVisitedLinkHash):
353         Rename this from addVisitedLink to better indicate what it's doing.
354
355         (WebKit::tableSizeForKeyCount):
356         Update for constant rename.
357
358         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
359         Compute the new pending visited links table size. If it's bigger than our current table, resize the table
360         by calling resizeTable. Otherwise, simply try to add the pending hashes to our shared hash table. If successful,
361         add the link hash to the addedVisitedLinks table and eventually send it to all processes associated with the visited link provider.
362
363         (WebKit::VisitedLinkProvider::resizeTable):
364         Create a new shared memory segment, Set it as the table backing store and add all visited links from the old table. Finally,
365         add our pending visited link hashes and send the new table memory to all processes associated with the visited link provider.
366
367         (WebKit::VisitedLinkProvider::sendTable):
368         Helper function that creates a shared memory handle and sends it to a given web process.
369
370         * UIProcess/VisitedLinkProvider.h:
371         Add new members.
372
373         * UIProcess/VisitedLinkProvider.messages.in:
374         Add messages.
375
376         * UIProcess/WebContext.cpp:
377         (WebKit::WebContext::processDidFinishLaunching):
378         (WebKit::WebContext::disconnectProcess):
379         The WebContext no longer needs to inform the visited link provider about the processes coming and going, that's already handled
380         by the WebPageProxy objects.
381
382         (WebKit::WebContext::addVisitedLink):
383         Call addVisitedLinkHash on the visited link provider.
384
385         * UIProcess/WebContext.h:
386         * UIProcess/WebContext.messages.in:
387         Remove a message that is now implemented by the visited link provider.
388
389         * WebKit2.xcodeproj/project.pbxproj:
390         Add new files.
391
392         * WebProcess/WebPage/VisitedLinkTableController.cpp:
393         (WebKit::VisitedLinkTableController::VisitedLinkTableController):
394         Add the table controller as a message receiver.
395
396         (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
397         Remove the table controller as a message receiver.
398
399         (WebKit::VisitedLinkTableController::isLinkVisited):
400         Check if the link is visited according to the visited link table.
401
402         (WebKit::VisitedLinkTableController::addVisitedLink):
403         Send the link hash to the UI process if it's not already visited.
404
405         (WebKit::VisitedLinkTableController::setVisitedLinkTable):
406         Set the backing store memory and invalidate all styles.
407
408         (WebKit::VisitedLinkTableController::visitedLinkStateChanged):
409         Invalidate the styles for the given links.
410
411         (WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
412         Invalidate the styles for all links.
413
414         * WebProcess/WebPage/VisitedLinkTableController.h:
415         Add new members.
416
417         * WebProcess/WebPage/VisitedLinkTableController.messages.in:
418         Add new messages.
419
420         * WebProcess/WebProcess.cpp:
421         Remove unused functions; these are handled by VisitedLinkTableController now.
422
423         * WebProcess/WebProcess.h:
424         (WebKit::WebProcess::shouldTrackVisitedLinks):
425         Add getter.
426
427         * WebProcess/WebProcess.messages.in:
428         Remove messages.
429
430 2014-03-12  Sergio Villar Senin  <svillar@igalia.com>
431
432         Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL
433         https://bugs.webkit.org/show_bug.cgi?id=129612
434
435         Reviewed by Darin Adler.
436
437         For new code use static NeverDestroyed<T> instead.
438
439         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
440         (WebKit::getIndexStatement):
441         (WebKit::getObjectStoreStatement):
442         * Shared/linux/SeccompFilters/SeccompBroker.cpp:
443         (WebKit::SeccompBrokerClient::shared):
444         * UIProcess/InspectorServer/WebInspectorServer.cpp:
445         (WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest):
446
447 2014-03-14  Dan Bernstein  <mitz@apple.com>
448
449         <rdar://problem/16319722> [Cocoa] WKHistoryDelegate is being called for subframes
450         https://bugs.webkit.org/show_bug.cgi?id=130228
451
452         Reviewed by Mark Rowe.
453
454         * UIProcess/Cocoa/HistoryClient.mm:
455         (WebKit::HistoryClient::didNavigateWithNavigationData): Bail out if the frame is not the
456         main frame.
457         (WebKit::HistoryClient::didPerformClientRedirect): Ditto.
458         (WebKit::HistoryClient::didPerformServerRedirect): Ditto.
459         (WebKit::HistoryClient::didUpdateHistoryTitle): Ditto.
460
461 2014-03-13  Jinwoo Jeong  <jw00.jeong@samsung.com>
462
463         Refactor Vibration algorithm to use only one timer.
464         https://bugs.webkit.org/show_bug.cgi?id=130059
465
466         Reviewed by Darin Adler.
467
468         This patch adds a vibration unit test regression after r161257.
469         It consists of two short term requests to check
470         that Vibration could work properly by sequential requests.
471
472         Indeed this patch tightens condition of existing tests.
473
474         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
475         (TEST_F):
476
477 2014-03-13  Paul Hankes Drielsma  <phd@apple.com>
478
479         Add SPI to set a custom user agent on WKWebView
480         https://bugs.webkit.org/show_bug.cgi?id=130164
481
482         Reviewed by Dan Bernstein.
483
484         * UIProcess/API/Cocoa/WKWebView.mm:
485         (-[WKWebView _customUserAgent]):
486         (-[WKWebView _setCustomUserAgent:]):
487         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
488
489 2014-03-13  Paul Hankes Drielsma  <phd@apple.com>
490
491         Add SPI to run javascript in main frame on WKWebView
492         https://bugs.webkit.org/show_bug.cgi?id=130047
493
494         Reviewed by Anders Carlsson.
495
496         * UIProcess/API/Cocoa/WKWebView.mm:
497         (-[WKWebView _runJavaScriptInMainFrame:]):
498
499 2014-03-13  Benjamin Poulain  <bpoulain@apple.com>
500
501         The viewport code should not depend on WebKitSystemInterface
502         https://bugs.webkit.org/show_bug.cgi?id=130218
503
504         Reviewed by Tim Horton.
505
506         Get the viewport size from the UIProcess when creating a new WebProcess.
507         From there, the value is stored in WebPage and used whenever we need to update
508         the viewport parameters.
509
510         * Shared/WebPageCreationParameters.cpp:
511         (WebKit::WebPageCreationParameters::encode):
512         (WebKit::WebPageCreationParameters::decode):
513         * Shared/WebPageCreationParameters.h:
514         * UIProcess/WebPageProxy.cpp:
515         (WebKit::WebPageProxy::internalShowContextMenu):
516         * UIProcess/WebPageProxy.h:
517         * UIProcess/ios/WebPageProxyIOS.mm:
518         (WebKit::WebPageProxy::viewportScreenSize):
519         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
520         (WebKit::WebChromeClient::viewportScreenSize):
521         * WebProcess/WebCoreSupport/WebChromeClient.h:
522         * WebProcess/WebPage/WebPage.cpp:
523         (WebKit::WebPage::WebPage):
524         * WebProcess/WebPage/WebPage.h:
525         * WebProcess/WebPage/ios/WebPageIOS.mm:
526         (WebKit::WebPage::viewportScreenSize):
527
528 2014-03-13  Beth Dakin  <bdakin@apple.com>
529
530         Do not show extended background during a pinch gesture on iOS
531         https://bugs.webkit.org/show_bug.cgi?id=130152
532         -and corresponding-
533         <rdar://problem/16303819>
534
535         Reviewed by Simon Fraser.
536
537         This patch refactors the backgroundColor-setting logic into its own method so that 
538         it can be called from both _didCommitLayerTree and scrollViewDidZoom.
539
540         Only set the UIScrollView’s background color when the zoomScale is greater than or 
541         equal to the minimumZoomScale. Also do not set it during the zoom bounce 
542         animation. Otherwise, clear the background color by setting it to nil.
543         * UIProcess/API/Cocoa/WKWebView.mm:
544         (-[WKWebView updateScrollViewBackground]):
545         (-[WKWebView _didCommitLayerTree:WebKit::]):
546         (-[WKWebView scrollViewDidZoom:]):
547
548 2014-03-13  Enrica Casucci  <enrica@apple.com>
549
550         [iOS WebKit2] block selection should avoid large blocks.
551         https://bugs.webkit.org/show_bug.cgi?id=130208
552         <rdar://problem/16251785>
553
554         Reviewed by Benjamin Poulain.
555
556         When creating a block selection, we should discard blocks that
557         are larger than most of the visible portion of the document.
558         This prevents the accidental selection the entire document, which
559         is fairly common when tapping over empty areas.
560
561         * Shared/InteractionInformationAtPosition.cpp:
562         (WebKit::InteractionInformationAtPosition::encode):
563         (WebKit::InteractionInformationAtPosition::decode):
564         * Shared/InteractionInformationAtPosition.h: Removed selectionRects that was not really needed and
565         added isSelectable to indicate whether the selection can start.
566         (WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
567         * UIProcess/ios/WKContentViewInteraction.mm:
568         (-[WKContentView hasSelectablePositionAtPoint:]): Now uses isSelectable.
569         * WebProcess/WebPage/ios/WebPageIOS.mm:
570         (WebKit::WebPage::getPositionInformation): Takes into account the userSelect property
571         to figure out if the element can be selected and discards blocks that are
572         larger than 97% of the visible area of the document.
573
574 2014-03-13  Anders Carlsson  <andersca@apple.com>
575
576         Rename WKVisitedLinkProvider to _WKVisitedLinkProvider and make it private
577         https://bugs.webkit.org/show_bug.cgi?id=130207
578
579         Reviewed by Dan Bernstein.
580
581         * UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Removed.
582         * UIProcess/API/Cocoa/WKWebView.mm:
583         (-[WKWebView initWithFrame:configuration:]):
584         * UIProcess/API/Cocoa/WKWebViewConfiguration.h:
585         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
586         (-[WKWebViewConfiguration _visitedLinkProvider]):
587         (-[WKWebViewConfiguration _setVisitedLinkProvider:]):
588         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
589         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.h.
590         * UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.mm.
591         (-[_WKVisitedLinkProvider init]):
592         * UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h.
593         * WebKit2.xcodeproj/project.pbxproj:
594
595 2014-03-13  Anders Carlsson  <andersca@apple.com>
596
597         Remove a commented out member function
598         https://bugs.webkit.org/show_bug.cgi?id=130204
599
600         Reviewed by Tim Horton.
601
602         * Shared/ChildProcessProxy.h:
603         (WebKit::ChildProcessProxy::canSendMessage):
604
605 2014-03-13  Enrica Casucci  <enrica@apple.com>
606
607         [iOS WebKit2] Crash on iPad when displaying a select element with options.
608         https://bugs.webkit.org/show_bug.cgi?id=130200
609         <rdar://problem/16316187>
610
611         Reviewed by Simon Fraser.
612
613         _singleSelectionIndex should be initialized to NSNotFound for multiSelect elements.
614
615         * UIProcess/ios/forms/WKFormSelectPopover.mm:
616         (-[WKSelectTableViewController initWithView:hasGroups:]):
617
618 2014-03-13  Carlos Garcia Campos  <cgarcia@igalia.com>
619
620         [GTK] Close the connection when we fail to read from the socket for any unhandled error
621         https://bugs.webkit.org/show_bug.cgi?id=130191
622
623         Reviewed by Martin Robinson.
624
625         We currently show an error message, but we should close the
626         connection avoid entering an infinite loop. Also provide more
627         information in the error message to help when debugging the issue.
628
629         * Platform/IPC/unix/ConnectionUnix.cpp:
630         (IPC::Connection::readyReadHandler):
631
632 2014-03-13  Radu Stavila  <stavila@adobe.com>
633
634         Webkit not building on XCode 5.1 due to garbage collection no longer being supported
635         https://bugs.webkit.org/show_bug.cgi?id=130087
636
637         Reviewed by Mark Rowe.
638
639         Disable garbage collection on macosx when not using internal SDK.
640
641         * Configurations/Base.xcconfig:
642
643 2014-03-10  Darin Adler  <darin@apple.com>
644
645         Avoid copy-prone idiom "for (auto item : collection)"
646         https://bugs.webkit.org/show_bug.cgi?id=129990
647
648         Reviewed by Geoffrey Garen.
649
650         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
651         (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Use auto&.
652
653         * Shared/mac/RemoteLayerTreeTransaction.mm:
654         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Use auto&
655         even though the type is a scalar. This does no harm and makes it easier
656         to spot uses that trigger unnecessary copying with grep.
657         (WebKit::RemoteLayerTreeTransaction::decode): Ditto.
658         (WebKit::dumpChangedLayers): Ditto.
659         * UIProcess/mac/RemoteLayerTreeHost.mm:
660         (WebKit::RemoteLayerTreeHost::updateLayerTree): Ditto.
661         * WebProcess/WebProcess.cpp:
662         (WebKit::WebProcess::visitedLinkStateChanged): Ditto.
663
664 2014-03-12  Brian Burg  <bburg@apple.com>
665
666         Web Inspector: Remove unused callId parameter from evaluateInWebInspector
667         https://bugs.webkit.org/show_bug.cgi?id=129744
668
669         Reviewed by Timothy Hatcher.
670
671         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
672         (WKBundleInspectorEvaluateScriptForTest):
673         * WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
674         * WebProcess/WebPage/WebInspector.cpp:
675         (WebKit::WebInspector::evaluateScriptForTest):
676         * WebProcess/WebPage/WebInspector.h:
677
678 2014-03-13  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
679
680         Fix the !ENABLE(SQL_DATABASE) build
681         https://bugs.webkit.org/show_bug.cgi?id=130130
682
683         Reviewed by Csaba Osztrogonác.
684
685         Add missing #ifdef guard to typedef.
686
687         * UIProcess/API/C/WKDatabaseManager.cpp:
688
689 2014-03-12  Dean Jackson  <dino@apple.com>
690
691         [WebGL] WebKit1 + WebKit2 iOS clients should check load policy
692         https://bugs.webkit.org/show_bug.cgi?id=130162
693
694         Reviewed by Simon Fraser.
695
696         Implement webGLPolicyForURL() methods for iOS.
697
698         * Configurations/WebContent-iOS.entitlements: Add the MobileAsset asset type.
699         * Configurations/WebKit2.xcconfig: Add MobileAsset to iOS link list.
700         * WebProcess/WebPage/WebPage.cpp: Exclude iOS.
701         * WebProcess/WebPage/ios/WebPageIOS.mm:
702         (WebKit::WebPage::webGLPolicyForURL): Call into WKSI.
703         (WebKit::WebPage::resolveWebGLPolicyForURL):
704
705 2014-03-12  Joseph Pecoraro  <pecoraro@apple.com>
706
707         Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
708         https://bugs.webkit.org/show_bug.cgi?id=130118
709
710         Reviewed by Timothy Hatcher.
711
712         * Configurations/FeatureDefines.xcconfig:
713
714 2014-03-12  Enrica Casucci  <enrica@apple.com>
715
716         [iOS WebKit2] Crash when trying to select inside a video element with longpress..
717         https://bugs.webkit.org/show_bug.cgi?id=130095
718         <rdar://problem/16294534>
719
720         Reviewed by Benjamin Poulain.
721
722         We only need to set the assisted node for nodes that will receive an
723         input peripheral (keyboard, picker, popover, etc.).
724
725         * WebProcess/WebPage/ios/WebPageIOS.mm:
726         (WebKit::WebPage::rangeForWebSelectionAtPosition):
727         (WebKit::WebPage::elementDidFocus):
728
729 2014-03-12  Simon Fraser  <simon.fraser@apple.com>
730
731         Have the scrolling tree track the viewport size, not the viewport rect
732         https://bugs.webkit.org/show_bug.cgi?id=130141
733
734         Reviewed by Beth Dakin.
735
736         The scrolling tree only needs to know the size of the viewport, not its
737         origin, since the origin is deduced from the updated scroll position.
738
739         * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
740         (ArgumentCoder<ScrollingStateScrollingNode>::encode):
741         (ArgumentCoder<ScrollingStateScrollingNode>::decode):
742
743 2014-03-12  Commit Queue  <commit-queue@webkit.org>
744
745         Unreviewed, rolling out r165481.
746         https://bugs.webkit.org/show_bug.cgi?id=130151
747
748         That didn't go well. (Requested by kling on #webkit).
749
750         Reverted changeset:
751
752         https://bugs.webkit.org/show_bug.cgi?id=130140
753         http://trac.webkit.org/changeset/165481
754
755 2014-03-12  Carlos Garcia Campos  <cgarcia@igalia.com>
756
757         [GTK] Runtime error when page is closed while print operation is in progress
758         https://bugs.webkit.org/show_bug.cgi?id=129869
759
760         Reviewed by Anders Carlsson.
761
762         Sometimes when the page is closed right after printing the web
763         process aborts with the runtime message "pure virtual method
764         called terminate called without an active exception".
765         This happens because the page is closed when the pages have been
766         printed, but print job is still ongoing sending the data to the
767         printer. When print job finishes, we try to notify the UI process
768         sending the print callback message using WebPage::send(), but the
769         web page object has been destroyed. The virtual method it complains
770         about is probably MessageSender::messageSenderDestinationID() used
771         by send(). Since our print operation is always asynchronous, we
772         need a way to notify the web page when the print operation has
773         actually finished to clean it up, but also notify the print
774         operation when the page has been closed to not try to notify the
775         UI process in that case.
776
777         * WebProcess/WebPage/WebPage.cpp:
778         (WebKit::WebPage::close): Call disconnectFromPage to notify the
779         print operation in case there's an ongoing print job.
780         (WebKit::WebPage::endPrinting): Do not cleanup the print operation
781         here, since the print opertation might not have finished yet.
782         (WebKit::WebPage::didFinishPrintOperation): Send
783         PrintFinishedCallback message to the Ui process and cleanup the
784         print operation.
785         * WebProcess/WebPage/WebPage.h:
786         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
787         (WebKit::WebPrintOperationGtk::disconnectFromPage): Set m_webPage
788         to nullptr.
789         (WebKit::WebPrintOperationGtk::printDone): Call
790         didFinishPrintOperation() is the web page hasn't been closed.
791         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
792
793 2014-03-12  Andreas Kling  <akling@apple.com>
794
795         BundlePageDiagnosticLoggingClient leaks every string passing through it.
796         <https://webkit.org/b/130140>
797         <rdar://problem/15416838>
798
799         Use toAPI() instead of toCopiedAPI() so the receiving end doesn't need
800         to worry about adopting the WKStringRef.
801
802         Reviewed by Anders Carlsson.
803
804         * WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
805         (WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
806
807 2014-03-12  Tim Horton  <timothy_horton@apple.com>
808
809         Hook up image controls for WebKit1
810         https://bugs.webkit.org/show_bug.cgi?id=130062
811         <rdar://problem/15964809>
812
813         Reviewed by Brady Eidson.
814
815         * Shared/ContextMenuContextData.cpp:
816         (WebKit::ContextMenuContextData::ContextMenuContextData):
817
818 2014-03-11  Alexey Proskuryakov  <ap@apple.com>
819
820         REGRESSION (r165356): [Mac] Multi-part key bindings don't work
821         https://bugs.webkit.org/show_bug.cgi?id=130100
822
823         Reviewed by Darin Adler.
824
825         Restore the previous behavior, where we only interpreted keydowns (including those
826         coming through performKeyEquivalent).
827
828         In the future, we might send all events to input methods, but not to key bindings.
829
830         * UIProcess/API/mac/WKView.mm:
831         (-[WKView keyUp:]):
832         (-[WKView flagsChanged:]):
833
834 2014-03-11  Beth Dakin  <bdakin@apple.com>
835
836         _pageExtendedBackgroundColor should not be exposed on WKWebView
837         https://bugs.webkit.org/show_bug.cgi?id=130093
838
839         Reviewed by Simon Fraser.
840
841         Added comment indicating that _pageExtendedBackgroundColor is deprecated.
842         * UIProcess/API/Cocoa/WKViewPrivate.h:
843
844         _pageExtendedBackgroundColor now returns nil, but the conversation functionality 
845         is maintained with a convenience method pageExtendedBackgroundColor.
846         * UIProcess/API/Cocoa/WKWebView.mm:
847         (-[WKWebView pageExtendedBackgroundColor]):
848         (-[WKWebView _didCommitLayerTree:WebKit::]):
849         (-[WKWebView _pageExtendedBackgroundColor]):
850
851         Added comment indicating that _pageExtendedBackgroundColor is deprecated.
852         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
853
854         Return nil.
855         * UIProcess/API/ios/WKViewIOS.mm:
856         (-[WKView _pageExtendedBackgroundColor]):
857
858 2014-03-11  Jae Hyun Park  <jaepark@webkit.org>
859
860         [GTK][CMake] Add HARFBUZZ_INCLUDE_DIRS to WebKit and WebKit2
861         https://bugs.webkit.org/show_bug.cgi?id=130070
862
863         Reviewed by Martin Robinson.
864
865         * PlatformGTK.cmake:
866
867 2014-03-10  Dan Bernstein  <mitz@apple.com>
868
869         [Cocoa] Expose WebPageProxy::close
870         https://bugs.webkit.org/show_bug.cgi?id=130068
871
872         Reviewed by Adele Peterson.
873
874         * UIProcess/API/Cocoa/WKWebView.mm:
875         (-[WKWebView _close]):
876         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
877
878 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
879
880         [iOS][WebKit 2] Wire the unobscured rect in the WebProcess
881         https://bugs.webkit.org/show_bug.cgi?id=130058
882
883         Reviewed by Simon Fraser.
884
885         * WebProcess/WebPage/ios/WebPageIOS.mm:
886         (WebKit::WebPage::updateVisibleContentRects):
887
888 2014-03-10  Simon Fraser  <simon.fraser@apple.com>
889
890         Fix three leaks
891         https://bugs.webkit.org/show_bug.cgi?id=130048
892
893         Reviewed by Anders Carlsson.
894
895         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
896         (decodeObject): Code is simpler and less leaky without the RetainPtr.
897         * UIProcess/API/Cocoa/WKNavigationAction.mm: Fix _originalURL leak
898         by making it a RetainPtr and implementing the getter and setter.
899         (-[WKNavigationAction _setOriginalURL:]):
900         (-[WKNavigationAction _originalURL]):
901
902 2014-03-10  Beth Dakin  <bdakin@apple.com>
903
904         Set background color of WK2's UIScrollView to the pageExtendedBackgroundColor
905         https://bugs.webkit.org/show_bug.cgi?id=129919
906
907         Reviewed by Benjamin Poulain.
908
909         Make the pageExtendedBackgroundColor part of a RemoteLayerTreeTransaction.
910         * Shared/mac/RemoteLayerTreeTransaction.h:
911         (WebKit::RemoteLayerTreeTransaction::pageExtendedBackgroundColor):
912         (WebKit::RemoteLayerTreeTransaction::setPageExtendedBackgroundColor):
913         * Shared/mac/RemoteLayerTreeTransaction.mm:
914         (WebKit::RemoteLayerTreeTransaction::encode):
915         (WebKit::RemoteLayerTreeTransaction::decode):
916
917         Set the background color of the UIScrollView based on the 
918         pageExtendedBackgroundColor.
919         * UIProcess/API/Cocoa/WKWebView.mm:
920         (-[WKWebView _didCommitLayerTree:WebKit::]):
921
922         For the sake of PLATFORM(MAC), continue to support the fact that this color can be 
923         set via a message from the WebProcess or the new RemoteLayerTreeTransaction.
924         * UIProcess/WebPageProxy.h:
925
926         Cache the pageExtendedBackgroundColor as provided by the 
927         RemoteLayerTreeTransaction.
928         * UIProcess/ios/WebPageProxyIOS.mm:
929         (WebKit::WebPageProxy::didCommitLayerTree):
930
931         It’s not necessary to do anything here in non-Mac platforms anymore.
932         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
933         (WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
934
935         Include the pageExtendedBackgroundColor in the RemoteLayerTreeTransaction.
936         * WebProcess/WebPage/WebPage.cpp:
937         (WebKit::WebPage::willCommitLayerTree):
938
939 2014-03-10  Benjamin Poulain  <bpoulain@apple.com>
940
941         Generalize unobscured rect to all ports
942         https://bugs.webkit.org/show_bug.cgi?id=130036
943
944         Reviewed by Simon Fraser.
945
946         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
947         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
948         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
949         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
950         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
951
952 2014-03-10  Dan Bernstein  <mitz@apple.com>
953
954         <rdar://problem/16278716> [Cocoa] Allow setting a custom group identifier on a WKWebView
955         https://bugs.webkit.org/show_bug.cgi?id=130033
956
957         Reviewed by Tim Horton.
958
959         * UIProcess/API/Cocoa/WKWebView.mm:
960         (-[WKWebView initWithFrame:configuration:]): Create a page group with the group identifier
961         from the configuration, if it’s non-empty.
962         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
963         (-[WKWebViewConfiguration _groupIdentifier]): Added this accessor.
964         (-[WKWebViewConfiguration _setGroupIdentifier:]): Ditto.
965         * UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared _groupIdentifier property.
966
967 2014-03-10  Enrica Casucci  <enrica@apple.com>
968
969         WebKit2: Crash in WebPage::getPositionInformation.
970         https://bugs.webkit.org/show_bug.cgi?id=129936
971         <rdar://problem/16264550>
972  
973         Reviewed by Eric Carlson.
974  
975         Missing null check on the node renderer in one code path.
976         If the page body is smaller than the document, hit testing
977         will return HTMLHtmlElement that has no renderer.
978
979         * WebProcess/WebPage/ios/WebPageIOS.mm:
980         (WebKit::WebPage::getPositionInformation):
981
982 2014-03-10  Martin Robinson  <mrobinson@igalia.com>
983
984         [GTK] [CMake] Clean up library linking
985         https://bugs.webkit.org/show_bug.cgi?id=129782
986
987         Reviewed by Philippe Normand.
988
989         * PlatformGTK.cmake: Use the new macro.
990
991 2014-03-10  Carlos Garcia Campos  <cgarcia@igalia.com>
992
993         [GTK] The web process can finish while a print operation is still ongoing
994         https://bugs.webkit.org/show_bug.cgi?id=129871
995
996         Reviewed by Martin Robinson.
997
998         This can happen when the last page is closed while the print job
999         is sending data to the printer.
1000
1001         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Disable web
1002         process termination when the print job is sending data to the
1003         printer and enable it again when job finishes.
1004
1005 2014-03-09  Jeong Yong-uk  <yong@company100.com>
1006
1007         Update comment in NetworkResourceLoader
1008         https://bugs.webkit.org/show_bug.cgi?id=129997
1009
1010         Reviewed by Andreas Kling.
1011
1012         NetworkResourceLoader::resourceHandleStopped() has been renamed to
1013         NetworkResourceLoader::cleanup() but the comment is not updated.
1014
1015         * NetworkProcess/NetworkResourceLoader.cpp:
1016         (WebKit::NetworkResourceLoader::start):
1017
1018 2014-03-09  Alexey Proskuryakov  <ap@apple.com>
1019
1020         iOS build fix.
1021
1022         * WebProcess/WebPage/ios/WebPageIOS.mm: Include WebCore/KeyboardEvent.h.
1023
1024 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
1025
1026         [Mac] Don't perform a round-trip through WebProcess before interpreting key events
1027         https://bugs.webkit.org/show_bug.cgi?id=129812
1028
1029         Reviewed by Darin Adler.
1030
1031         * Shared/NativeWebKeyboardEvent.h:
1032         * Shared/WebEvent.h:
1033         (WebKit::WebKeyboardEvent::handledByInputMethod):
1034         (WebKit::WebKeyboardEvent::commands):
1035         * Shared/WebEventConversion.cpp:
1036         (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
1037         * Shared/WebKeyboardEvent.cpp:
1038         (WebKit::WebKeyboardEvent::WebKeyboardEvent):
1039         (WebKit::WebKeyboardEvent::~WebKeyboardEvent):
1040         (WebKit::WebKeyboardEvent::encode):
1041         (WebKit::WebKeyboardEvent::decode):
1042         * Shared/mac/NativeWebKeyboardEventMac.mm:
1043         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1044         * Shared/mac/WebEventFactory.h:
1045         * Shared/mac/WebEventFactory.mm:
1046         (WebKit::WebEventFactory::createWebKeyboardEvent):
1047         Keyboard events now carry results of interpretation with them.
1048         Ideally, mouse events should also have a handledByInputMethod member, because IMs
1049         can handle events, but that can wait until we have actual bugs caused by not diabling
1050         default processing for these.
1051
1052         * UIProcess/API/mac/WKView.mm:
1053         (-[WKView becomeFirstResponder]): Updated for new NativeWebKeyboardEvent contructor
1054         signature. We don't interpret the event in this code path.
1055         (-[WKView doCommandBySelector:]): Added logging.
1056         (-[WKView performKeyEquivalent:]): Reimplemented Esc and Cmd+period handling to avoid
1057         infinite loops and re-entrancy. These two work in a unique way in AppKit.
1058         Interpret key event before sending it down to WebProcess.
1059         (-[WKView keyUp:]): Interpret key event before sending it down to WebProcess.
1060         We need to tell IMs about the event, but key binding processing is moot, all commands
1061         are executed on keydown.
1062         (-[WKView keyDown:]): Interpret the event.
1063         (-[WKView flagsChanged:]): Ditto.
1064         (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]): Added an assertion in
1065         consumedByIM code path.
1066         (-[WKView _executeSavedCommandBySelector:]): Added logging.
1067
1068         * UIProcess/PageClient.h:
1069         * UIProcess/ios/PageClientImplIOS.h:
1070         * UIProcess/ios/PageClientImplIOS.mm:
1071         * UIProcess/mac/PageClientImpl.h:
1072         * UIProcess/mac/PageClientImpl.mm:
1073         * UIProcess/WebPageProxy.h:
1074         * UIProcess/WebPageProxy.messages.in:
1075         * UIProcess/ios/WebPageProxyIOS.mm:
1076         * UIProcess/mac/WebPageProxyMac.mm:
1077         Removed interpretQueuedKeyEvent/interpretKeyEvent, WebProcess no longer asks UIProcess to do this.
1078
1079         * WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
1080         (WebKit::WebEditorClient::handleKeyboardEvent):
1081         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1082         (WebKit::WebEditorClient::handleKeyboardEvent):
1083         (WebKit::WebEditorClient::handleInputMethodKeydown):
1084         WebPage::handleEditingKeyboardEvent is now one function instead of two with a boolean
1085         switch between two behaviors.
1086
1087         * WebProcess/WebPage/WebPage.cpp:(WebKit::WebPage::WebPage):
1088         * WebProcess/WebPage/WebPage.h:
1089         Removed m_keyboardEventBeingInterpreted, as we no longer send the event for interpretation.
1090         This means that we sometimes have to pass a null event down to WebCore, but I wasn't
1091         able to find any behavior differences from us doing so.
1092
1093         * WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent):
1094         Added a FIXME.
1095
1096         * WebProcess/WebPage/mac/WebPageMac.mm:
1097         (WebKit::WebPage::executeKeypressCommandsInternal): When we don't have an event,
1098         use current frame as a target, just like input method messages do.
1099         (WebKit::WebPage::handleEditingKeyboardEvent): This function no longer saves commands,
1100         it only interprets them.
1101         Added a check for Esc, as we don't want to handle it in keydown event handler.
1102         (WebKit::WebPage::insertText): Pass 0 instead of m_keyboardEventBeingInterpreted.
1103         (WebKit::WebPage::insertDictatedText): Ditto.
1104         (WebKit::WebPage::executeKeypressCommands): Ditto.
1105
1106 2014-03-09  Zalan Bujtas  <zalan@apple.com>
1107
1108         Subpixel rendering: Pass FloatSize boxsize to transform animations to support device pixel sizing.
1109         https://bugs.webkit.org/show_bug.cgi?id=129985
1110
1111         Reviewed by Simon Fraser.
1112
1113         This is in preparation to stop passing integral positioned boxes to transform animations.
1114
1115         No change in behavior.
1116
1117         * WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
1118
1119 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
1120
1121         [iOS Wk2] Can't scroll after going back to page in page cache
1122         https://bugs.webkit.org/show_bug.cgi?id=129989
1123         <rdar://problem/16217588>
1124
1125         Reviewed by Dan Bernstein.
1126
1127         iOS has a special FrameLoader::forceLayoutWithoutRecalculatingStyle()
1128         function that is called instead of FrameView::forceLayout(). This was unimplemented
1129         for the WK2 FrameLoaderClient, so no layout was forced, with the result
1130         that the contentSize was never updated and scrolling was broken.
1131         
1132         Fix by renaming the client function to forceLayoutOnRestoreFromPageCache()
1133         and having it return a bool to say whether the default forceLayout()
1134         should be done. WK1 can then continue to have its custom behavior,
1135         and Wk2 will simply do a forceLayout().
1136         
1137         Also remove FrameLaoderClient::forceLayout(), which was never called.
1138
1139         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1140         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1141         * WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
1142         (WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache):
1143
1144 2014-03-08  Simon Fraser  <simon.fraser@apple.com>
1145
1146         [iOS WK2] Get position:fixed working slighlty better
1147         https://bugs.webkit.org/show_bug.cgi?id=129988
1148
1149         Reviewed by Dan Bernstein.
1150         
1151         iOS uses fixed layout, but does not want fixed elements laid
1152         out relative to the frame.
1153
1154         * WebProcess/WebPage/WebPage.cpp:
1155         (WebKit::WebPage::setUseFixedLayout):
1156
1157 2014-03-08  Jon Lee  <jonlee@apple.com>
1158
1159         iOS broken after r165342
1160         https://bugs.webkit.org/show_bug.cgi?id=129987
1161
1162         Reviewed by Simon Fraser.
1163
1164         * NetworkProcess/ios/NetworkProcessIOS.mm:
1165         (WebKit::NetworkProcess::platformLowMemoryHandler): Add missing stub implementation for
1166         platformLowMemoryHandler().
1167
1168 2014-03-08  Eric Carlson  <eric.carlson@apple.com>
1169
1170         [iOS] media preferences not initialized correctly in WebKit2
1171         https://bugs.webkit.org/show_bug.cgi?id=129983
1172
1173         Reviewed by Dan Bernstein.
1174
1175         * Shared/WebPreferencesStore.h: Initialize mediaPlaybackAllowsInline and 
1176         mediaPlaybackRequiresUserGesture correctly for iOS.
1177
1178 2014-03-08  Jeremy Jones  <jeremyj@apple.com>
1179
1180         Allow media element to supply the video layer after fullscreen transition has already begun.
1181         https://bugs.webkit.org/show_bug.cgi?id=129870
1182
1183         Reviewed by Eric Carlson.
1184
1185         WebVideoFullscreenManager and WebVideoFullscreenManagerProxy do their own remote hosting of the video layer instead of needing the video layer to have already been hosted elsewhere. This allows the removal of the coordination with WebPageProxy via a RemoteLayerTreeTransaction.
1186
1187         * Shared/mac/RemoteLayerTreeTransaction.h:
1188         Remove m_videoLayerIDsPendingFullscreen and accessors.
1189
1190         * Shared/mac/RemoteLayerTreeTransaction.mm:
1191         (WebKit::RemoteLayerTreeTransaction::encode):
1192         Don't encode m_videoLayerIDsPendingFullscreen
1193
1194         (WebKit::RemoteLayerTreeTransaction::decode):
1195         Don't decode m_videoLayerIDsPendingFullscreen
1196
1197         * UIProcess/ios/WebPageProxyIOS.mm:
1198         (WebKit::WebPageProxy::didCommitLayerTree):
1199         Don't forward didCommitLayerTree to m_videoFullscreenManager.
1200
1201         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
1202         Remove code for synchronizing with the RenderTree.
1203         Add a hosting layer and methods to keep video layer frame and video gravity synchronized.
1204
1205         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
1206         Change IPC interface to fascilitate rehosting video layer with a instead of coordinating with the RenderTree by PlatformLayerID.
1207
1208         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
1209         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
1210         Remove initialization for removed members.
1211
1212         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID):
1213         Rehost the video layer by id and pass on the layer.
1214         This replaces didCommitLayerTree() and  willLendVideoLayerWithID(). 
1215
1216         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
1217         Cleanup the hosting layer.
1218
1219         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
1220         Forward on the video layer's frame to keep the hosted layer in sync with the interface.
1221
1222         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
1223         Forward the videolayer gravity.
1224
1225         * WebKit2.xcodeproj/project.pbxproj:
1226         Rename WebVideoFullscreenManager.cpp to WebVideoFullscreenManager.mm
1227
1228         * WebProcess/WebPage/WebPage.cpp:
1229         (WebKit::WebPage::willCommitLayerTree):
1230         Don't invovle the m_videoFullscreenManager in layer tree transactions.
1231
1232         * WebProcess/ios/WebVideoFullscreenManager.h:
1233         Remove code that synchronizes with the render tree via RemoteLayerTreeTransaction.
1234         Instead rehost the video layer directly.
1235         Instead of hoping the WebVideoFullscreenModel has a videoLayer, supply one into which
1236         it can add whatever it likes as needed.
1237
1238         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
1239         No more explicit borrowing and returning video layers.
1240         Add functions to keep video layer bounds and gravity in sync with the UI. 
1241
1242         * WebProcess/ios/WebVideoFullscreenManager.mm: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.cpp.
1243         Removed code for synchronizing via RemoteLAyerTreeTransaction.
1244
1245         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
1246         Remove initialization for removed memeber m_sendUnparentVideoLayerTransaction.
1247
1248         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
1249         Creates a fullscreen layer, gives it to the WebVideoFullscreenModel to fill in,
1250         and hosts it in a context to send to the UIProcess.
1251
1252         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
1253         remove enterFullscreen() and just directly send the IPC message. 
1254
1255         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
1256         Clean up the hosting context.
1257
1258         (WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
1259         Forward on the video gravity. Type convert from unsigned to MediaPlayer::VideoGravity.
1260
1261 2014-03-08  Andreas Kling  <akling@apple.com>
1262
1263         [WK2] Improve the network process low memory handler.
1264         <https://webkit.org/b/129977>
1265
1266         Split the network process low memory handler into platform-specific
1267         and shared parts. The shared part tells FastMalloc to release freed
1268         pages back to the OS.
1269
1270         For Mac, added a call to purge the in-memory part of CFURLCache.
1271         Remove the malloc_zone_pressure_relief() since that is now taken care
1272         of by the shared MemoryPressureHandler code.
1273
1274         Reviewed by Darin Adler.
1275
1276         * NetworkProcess/NetworkProcess.cpp:
1277         (WebKit::NetworkProcess::initializeNetworkProcess):
1278         (WebKit::NetworkProcess::lowMemoryHandler):
1279         (WebKit::NetworkProcess::platformLowMemoryHandler):
1280         * NetworkProcess/NetworkProcess.h:
1281         * NetworkProcess/mac/NetworkProcessMac.mm:
1282         (WebKit::NetworkProcess::platformLowMemoryHandler):
1283         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1284
1285 2014-03-08  Jae Hyun Park  <jaepark@webkit.org>
1286
1287         Remove unnecessary casting in NetworkProcessMainUnix.cpp
1288         https://bugs.webkit.org/show_bug.cgi?id=129968
1289
1290         Reviewed by Andreas Kling.
1291
1292         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
1293         Since socket is an int, int casting is not necessary.
1294
1295         (WebKit::NetworkProcessMain):
1296
1297 2014-03-08  Aaron Golden  <golden@inkling.com>
1298
1299         Prevent processes spawned by WebProcess from trying to insert the SecItem shim.
1300         https://bugs.webkit.org/show_bug.cgi?id=129864
1301
1302         Reviewed by Anders Carlsson.
1303
1304         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
1305         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
1306
1307 2014-03-07  Tim Horton  <timothy_horton@apple.com>
1308
1309         [WebKit2][iOS] PDF
1310         https://bugs.webkit.org/show_bug.cgi?id=129600
1311         <rdar://problem/15260216>
1312
1313         Reviewed by Anders Carlsson.
1314
1315         Add a single custom content provider which installs a very primitive PDF view
1316         in place of the WKContentView if a PDF is loaded in the main frame.
1317
1318         * Configurations/WebKit2.xcconfig:
1319         Link against CorePDF, for UIPDFPageView.
1320
1321         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
1322         (-[WKWebViewContentProviderRegistry init]):
1323         Initialize the registry, using WKPDFView for all PDF MIME types.
1324
1325         * WebKit2.xcodeproj/project.pbxproj:
1326         * UIProcess/ios/WKPDFView.h: Added.
1327         * UIProcess/ios/WKPDFView.mm: Added.
1328         Add a very simple PDF view based on UIPDFPageView. Additional functionality
1329         can come in the future; right now, we just create one view for each page, and
1330         depend on CATiledLayer to only paint the pages that are being displayed.
1331
1332 2014-03-07  Andreas Kling  <akling@apple.com>
1333
1334         ArgumentEncoder and ArgumentDecoder should be fastmalloced.
1335         <https://webkit.org/b/129960>
1336
1337         Reviewed by Ryosuke Niwa.
1338
1339         * Platform/IPC/ArgumentDecoder.h:
1340         * Platform/IPC/ArgumentEncoder.h:
1341
1342 2014-03-07  Martin Robinson  <mrobinson@igalia.com>
1343
1344         Fix the GTK+ build after the recent iOS merge.
1345
1346         * UIProcess/API/gtk/PageClientImpl.cpp: Make some methods available to non-Cocoa ports and fix some signatures.
1347         * UIProcess/WebPageProxy.h: Ditto.
1348
1349 2014-03-07  Ryuan Choi  <ryuan.choi@samsung.com>
1350
1351         Unreviewed. Fix build on the EFL port after r165303
1352
1353         * UIProcess/CoordinatedGraphics/WebView.cpp:
1354         (WebKit::WebView::didCommitLoadForMainFrame): Added new parameters.
1355         * UIProcess/CoordinatedGraphics/WebView.h: Ditto.
1356         * UIProcess/WebPageProxy.h:
1357         * UIProcess/efl/WebViewEfl.cpp: Added dummy didFinishLoadingDataForCustomContentProvider()
1358         (WebKit::WebViewEfl::exitFullScreen):
1359         (WebKit::WebViewEfl::didFinishLoadingDataForCustomContentProvider):
1360         * UIProcess/efl/WebViewEfl.h: Ditto.
1361
1362 2014-03-07  Enrica Casucci  <enrica@apple.com>
1363
1364         [iOS WebKit2] Keyboard accessory comes up when I click a link.
1365         https://bugs.webkit.org/show_bug.cgi?id=129949
1366         <rdar://problem/16265305>
1367
1368         Reviewed by Simon Fraser.
1369
1370         We need to create the accessory view only when needed.
1371
1372         * UIProcess/ios/WKContentViewInteraction.mm:
1373         (-[WKContentView requiresAccessoryView]):
1374         (-[WKContentView inputAccessoryView]):
1375
1376 2014-03-07  Enrica Casucci  <enrica@apple.com>
1377
1378         [iOS WebKit2] Long-press on a link shows just "Copy".
1379         https://bugs.webkit.org/show_bug.cgi?id=129938
1380         <rdar://problem/16266054>
1381
1382         Reviewed by Benjamin Poulain.
1383
1384         When adding a FIXME comment, I accidentally removed the ! on
1385         the if (!element) condition.
1386
1387         * WebProcess/WebPage/ios/WebPageIOS.mm:
1388         (WebKit::WebPage::getPositionInformation):
1389
1390 2014-03-07  Tim Horton  <timothy_horton@apple.com>
1391
1392         [WebKit2][iOS] Main-frame custom content providers
1393         https://bugs.webkit.org/show_bug.cgi?id=129809
1394
1395         Reviewed by Dan Bernstein.
1396
1397         Re-introduce custom content providers to WebKit2 (removed in r152841), but
1398         for iOS this time.
1399
1400         * UIProcess/API/Cocoa/WKWebView.mm:
1401         (-[WKWebView initWithFrame:configuration:]):
1402         Send the initial MIME types that have custom content providers to the WebProcess.
1403
1404         (-[WKWebView dealloc]):
1405         Unregister our page from the content provider registry.
1406         
1407         (-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
1408         Install/uninstall the custom content provider. Create a view, if needed,
1409         based on the class that the registry has associated with the given MIME type.
1410         We unparent the WKContentView while the custom content provider is active,
1411         and re-use the existing WKScrollView to contain the custom content provider.
1412
1413         (-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:dataReference:]):
1414         Forward loaded data on to the custom content provider for display.
1415
1416         (-[WKWebView _didCommitLayerTree:WebKit::]):
1417         Assert that we aren't getting layer tree commits while using a custom content provider.
1418
1419         (-[WKWebView viewForZoomingInScrollView:]):
1420         If we're using a custom content provider, its view should be used for zooming
1421         instead of the (unparented) web content view.
1422
1423         (-[WKWebView hasContentView]):
1424         (-[WKWebView scrollViewWillBeginZooming:withView:]):
1425         (-[WKWebView scrollViewWillBeginDragging:]):
1426         (-[WKWebView _didFinishScrolling]):
1427         (-[WKWebView _updateVisibleContentRects]):
1428         If we do not have a parented WKContentView because we are using a custom
1429         content provider, we should not forward scroll view related changes to it.
1430
1431         (-[WKWebView _frameOrBoundsChanged]):
1432         Update the minimum size of the custom content provider if the web view size changes.
1433
1434         * UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
1435         (-[WKWebViewConfiguration copyWithZone:]):
1436         (-[WKWebViewConfiguration _contentProviderRegistry]):
1437         (-[WKWebViewConfiguration _setContentProviderRegistry:]):
1438         * UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h: Added.
1439         Add an internal WKWebViewConfiguration property, the WKWebViewContentProviderRegistry.
1440
1441         * UIProcess/API/Cocoa/WKWebViewInternal.h:
1442
1443         * UIProcess/Cocoa/WKWebViewContentProvider.h: Added.
1444         A minimal protocol for informing custom content providers of changes to
1445         the size of the view, the represented data, and the owning scroll view.
1446
1447         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.h: Added.
1448         * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Added.
1449         (-[WKWebViewContentProviderRegistry addPage:]):
1450         (-[WKWebViewContentProviderRegistry removePage:]):
1451         (-[WKWebViewContentProviderRegistry registerProvider:forMIMEType:]):
1452         (-[WKWebViewContentProviderRegistry providerForMIMEType:]):
1453         (-[WKWebViewContentProviderRegistry mimeTypesWithContentProviders]):
1454         New class, keeps track of a mapping from MIME types to UIViews that
1455         conform to the WKWebViewContentProvider protocol.
1456
1457         * UIProcess/WebPageProxy.cpp:
1458         (WebKit::WebPageProxy::WebPageProxy):
1459         (WebKit::WebPageProxy::didCommitLoadForFrame):
1460         * UIProcess/WebPageProxy.h:
1461         * UIProcess/WebPageProxy.messages.in:
1462
1463         * UIProcess/PageClient.h:
1464         * UIProcess/ios/PageClientImplIOS.h:
1465         * UIProcess/ios/PageClientImplIOS.mm:
1466         (WebKit::PageClientImpl::PageClientImpl):
1467         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
1468         (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
1469         * UIProcess/mac/PageClientImpl.h:
1470         * UIProcess/mac/PageClientImpl.mm:
1471         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
1472         (WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
1473         Add parameters to didCommitLoadForMainFrame, indicating if we should use
1474         a custom content provider to display the main frame, and what MIME type
1475         was loaded in said frame, and add didFinishLoadingDataForCustomContentProvider.
1476         On iOS, forward these to the WKWebView.
1477         Also, give PageClientImplIOS a reference to the WKWebView.
1478         
1479         * UIProcess/ios/WKContentView.mm:
1480         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
1481         
1482         * WebKit2.xcodeproj/project.pbxproj:
1483         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
1484         (-[WKWebProcessPlugInFrame _hasCustomContentProvider]):
1485         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
1486         Expose whether or not a given frame has a custom content provider to the plug-in.
1487
1488         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1489         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
1490         (WebKit::WebFrameLoaderClient::hasHTMLView):
1491         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1492         (WebKit::WebFrameLoaderClient::committedLoad):
1493         (WebKit::WebFrameLoaderClient::finishedLoading):
1494         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
1495         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1496         (WebKit::WebFrameLoaderClient::canCachePage):
1497         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1498         (WebKit::WebFrameLoaderClient::frameHasCustomContentProvider):
1499         Restore WebFrameLoaderClient custom representation code, which ensures
1500         that data is routed correctly (to the UI process, and not to WebCore) and
1501         that we don't try to use the page cache for frames with content providers.
1502
1503         * WebProcess/WebPage/WebPage.cpp:
1504         (WebKit::WebPage::mainFrameHasCustomContentProvider):
1505         (WebKit::WebPage::addMIMETypeWithCustomContentProvider):
1506         (WebKit::WebPage::shouldUseCustomContentProviderForResponse):
1507         (WebKit::WebPage::canShowMIMEType):
1508         * WebProcess/WebPage/WebPage.h:
1509         * WebProcess/WebPage/WebPage.messages.in:
1510         Keep a list of MIME types which can be displayed via custom content providers
1511         in WebPage, which will be pushed down from the registry as new providers
1512         are added. Plug-ins still take precendence over custom content providers.
1513
1514 2014-03-07  Anders Carlsson  <andersca@apple.com>
1515
1516         MigrateHeaders.make should remove C SPI includes from WebKit2 headers
1517         https://bugs.webkit.org/show_bug.cgi?id=129937
1518         <rdar://problem/15920020>
1519
1520         Reviewed by Tim Horton.
1521
1522         * WebKit2.xcodeproj/project.pbxproj:
1523         Make WKPreferences.h and all headers it includes public. Update the post processing of WKBase.h
1524         to account for WKBase.h now being a public header again.
1525
1526 2014-03-07  Alexey Proskuryakov  <ap@apple.com>
1527
1528         REGRESSION (r164847): Pressing the command key while hovering an element causes it to un-hover
1529         https://bugs.webkit.org/show_bug.cgi?id=129872
1530
1531         Reviewed by Tim Horton.
1532
1533         * UIProcess/API/Cocoa/WKViewPrivate.h: Changes in performDictionaryLookupAtCurrentMouseLocation
1534         were also not correct, because the current event could be a keyboard one (Cmd+Ctrl+D).
1535         But this SPI is unused, and can be simply removed.
1536
1537         * UIProcess/API/mac/WKView.mm: (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
1538         locationInWindow is undefined for keyboard events, so we have to use current location.
1539         Thankfully, there is a method that returns the location in appropriate coordinate
1540         space, unlike +[NSEvent mouseLocation] that we used before.
1541
1542 2014-03-07  Andy Estes  <aestes@apple.com>
1543
1544         [iOS] Install WebKit2 XPC services to the correct place during iOS Simulator builds
1545         https://bugs.webkit.org/show_bug.cgi?id=129914
1546
1547         Reviewed by Dan Bernstein.
1548
1549         We weren't specifying INSTALL_PATH for iOS Simulator builds in
1550         BaseXPCService.xcconfig, and r164576 changed INSTALL_PATH to
1551         INSTALL_PATH_ACTUAL. This caused XPC services to start being installed
1552         to the root of the iOS Simulator SDK. Fix this by setting
1553         INSTALL_PATH_ACTUAL for iphonesimulator.
1554
1555         * Configurations/BaseXPCService.xcconfig:
1556
1557 2014-03-07  Andreas Kling  <akling@apple.com>
1558
1559         [Mac] Notify system malloc of fake memory pressure.
1560         <https://webkit.org/b/129908>
1561
1562         Reviewed by Anders Carlsson.
1563
1564         * NetworkProcess/mac/NetworkProcessMac.mm:
1565         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1566
1567             Listen for the fake memory pressure notification and respond by
1568             just forwarding to system malloc. We don't do the full WebCore
1569             memory pressure handling here, since that will cause stuff that
1570             the network process doesn't need to get instantiated.
1571
1572 2014-03-07  Dean Jackson  <dino@apple.com>
1573
1574         Attempt to fix the iOS build.
1575
1576         * Configurations/WebKit2.xcconfig: Add -framework OpenGLES to linking.
1577
1578 2014-03-07  Simon Fraser  <simon.fraser@apple.com>
1579
1580         [iOS] Add an updateID to visibleContentRect updates which is passed back in layer transactions, so we know whether transactions are stale
1581         https://bugs.webkit.org/show_bug.cgi?id=129897
1582
1583         Reviewed by Benjamin Poulain.
1584
1585         In WebKit2 on iOS we need to know when layer updates from the web process
1586         are stale with respect to visible rect updates from the UI process. Do so
1587         by adding an updateID to VisibleContentRectUpdateInfo, and storing it
1588         on each side, returning it in RemoteLayerTreeTransaction.
1589         
1590         Did some re-ordering of members and encoding order in RemoteLayerTreeTransaction
1591         to group like data members together.
1592         
1593         * Shared/VisibleContentRectUpdateInfo.cpp:
1594         (WebKit::VisibleContentRectUpdateInfo::encode):
1595         (WebKit::VisibleContentRectUpdateInfo::decode):
1596         * Shared/VisibleContentRectUpdateInfo.h:
1597         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1598         (WebKit::VisibleContentRectUpdateInfo::updateID):
1599         (WebKit::operator==):
1600         * Shared/mac/RemoteLayerTreeTransaction.h:
1601         (WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID):
1602         (WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID):
1603         * Shared/mac/RemoteLayerTreeTransaction.mm:
1604         (WebKit::RemoteLayerTreeTransaction::encode):
1605         (WebKit::RemoteLayerTreeTransaction::decode):
1606         * UIProcess/WebPageProxy.h:
1607         (WebKit::WebPageProxy::nextVisibleContentRectUpdateID):
1608         (WebKit::WebPageProxy::lastVisibleContentRectUpdateID):
1609         * UIProcess/ios/WKContentView.mm:
1610         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1611         * WebProcess/WebPage/WebPage.cpp:
1612         (WebKit::WebPage::WebPage):
1613         (WebKit::WebPage::willCommitLayerTree):
1614         * WebProcess/WebPage/WebPage.h:
1615         * WebProcess/WebPage/ios/WebPageIOS.mm:
1616         (WebKit::WebPage::updateVisibleContentRects):
1617
1618 2014-03-07  Roger Fong  <roger_fong@apple.com>
1619
1620         Replace setSystemWebGLLoadPolicy API with methods to query for WebGL blocking policy.
1621         https://bugs.webkit.org/show_bug.cgi?id=129873.
1622
1623         Reviewed by Dean Jackson.
1624
1625         Remove setSystemWebGLLoadPolicy API.
1626         * UIProcess/API/APILoaderClient.h:
1627         (API::LoaderClient::resolveWebGLLoadPolicy):
1628         * UIProcess/API/C/WKPage.cpp:
1629         (WKPageSetPageLoaderClient):
1630         * UIProcess/API/C/WKPageLoaderClient.h:
1631         * UIProcess/WebPageProxy.cpp:
1632         (WebKit::WebPageProxy::resolveWebGLPolicyForURL):
1633         * UIProcess/WebPageProxy.h:
1634         * UIProcess/WebPageProxy.messages.in:
1635         * WebProcess/WebPage/mac/WebPageMac.mm:
1636         (WebKit::WebPage::webGLPolicyForURL):
1637
1638         Add API to directly query the WebGL blocking policies from WKSI.
1639         * UIProcess/API/C/mac/WKContextPrivateMac.h:
1640         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
1641         (WKContextShouldBlockWebGL):
1642         (WKContextShouldSuggestBlockWebGL):
1643
1644 2014-03-07  Eric Carlson  <eric.carlson@apple.com>
1645
1646         Initialize new WKSI functions for WebKit2
1647         https://bugs.webkit.org/show_bug.cgi?id=129889
1648
1649         Reviewed by Simon Fraser.
1650
1651         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1652         (InitWebCoreSystemInterface):
1653
1654 2014-03-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1655
1656         [GTK] Use final and override in WebPrintOperationGtk
1657         https://bugs.webkit.org/show_bug.cgi?id=129868
1658
1659         Reviewed by Sergio Villar Senin.
1660
1661         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1662
1663 2014-03-06  Alexey Proskuryakov  <ap@apple.com>
1664
1665         [Mac] Allow com.apple.GSSCred in WebKit sandbox profiles
1666         https://bugs.webkit.org/show_bug.cgi?id=129777
1667         <rdar://problem/16050832>
1668
1669         Reviewed by Anders Carlsson.
1670
1671         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
1672         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
1673         * WebProcess/com.apple.WebProcess.sb.in:
1674
1675 2014-03-06  Filip Pizlo  <fpizlo@apple.com>
1676
1677         If the FTL is build-time enabled then it should be run-time enabled.
1678
1679         Rubber stamped by Geoffrey Garen.
1680
1681         * Shared/WebProcessCreationParameters.cpp:
1682         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
1683         (WebKit::WebProcessCreationParameters::encode):
1684         (WebKit::WebProcessCreationParameters::decode):
1685         * Shared/WebProcessCreationParameters.h:
1686         * UIProcess/mac/WebContextMac.mm:
1687         (WebKit::registerUserDefaultsIfNeeded):
1688         (WebKit::WebContext::platformInitializeWebProcess):
1689         * WebProcess/cocoa/WebProcessCocoa.mm:
1690         (WebKit::WebProcess::platformInitializeWebProcess):
1691
1692 2014-03-06  Hyowon Kim  <hw1008.kim@samsung.com>
1693
1694         [EFL] Move EvasGL classes from WebKit to WebCore namespace.
1695         https://bugs.webkit.org/show_bug.cgi?id=129797
1696
1697         Reviewed by Gyuyoung Kim.
1698
1699         * UIProcess/API/efl/EwkView.h: namespace changes for EvasGLContext/Surface.
1700
1701 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
1702
1703         Remove one more setCustomFixedPositionRect() that I missed.
1704
1705         * UIProcess/DrawingAreaProxy.h:
1706
1707 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
1708
1709         Send the fixed position rect to the WebProcess along with the other rects
1710         https://bugs.webkit.org/show_bug.cgi?id=129856
1711
1712         Reviewed by Benjamin Poulain.
1713         
1714         Remove the functions that pass the custom fixed position rect through
1715         the DrawingArea, and replace them by adding this rect to the
1716         VisibleContentRectUpdateInfo, along with the "is stable" flag. We
1717         then set the custom fixed position rect in the web process for
1718         stable updates.
1719
1720         * Shared/VisibleContentRectUpdateInfo.cpp:
1721         (WebKit::VisibleContentRectUpdateInfo::encode):
1722         (WebKit::VisibleContentRectUpdateInfo::decode):
1723         * Shared/VisibleContentRectUpdateInfo.h:
1724         (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
1725         (WebKit::VisibleContentRectUpdateInfo::customFixedPositionRect):
1726         (WebKit::VisibleContentRectUpdateInfo::inStableState):
1727         (WebKit::operator==):
1728         * UIProcess/DrawingAreaProxy.cpp:
1729         * UIProcess/ios/WKContentView.mm:
1730         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1731         * WebProcess/WebPage/DrawingArea.h:
1732         * WebProcess/WebPage/DrawingArea.messages.in:
1733         * WebProcess/WebPage/ios/WebPageIOS.mm:
1734         (WebKit::WebPage::updateVisibleContentRects):
1735         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1736         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1737         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1738
1739 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
1740
1741         Remove empty class extension in WKContentViewInteraction
1742         https://bugs.webkit.org/show_bug.cgi?id=129849
1743
1744         Reviewed by Enrica Casucci.
1745         
1746         This empty class extension is cruft left over from refactoring.
1747         It can be removed.
1748
1749         * UIProcess/ios/WKContentViewInteraction.mm:
1750
1751 2014-03-06  Simon Fraser  <simon.fraser@apple.com>
1752
1753         [iOS] didUpdateVisibleRect: should use fabs, not abs
1754         https://bugs.webkit.org/show_bug.cgi?id=129843
1755
1756         Reviewed by Benjamin Poulain.
1757         
1758         When zooming we sent messages to the web process with an unchanging
1759         zoom scale because of use of abs() rather than fabs().
1760
1761         * UIProcess/ios/WKContentView.mm:
1762         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
1763
1764 2014-03-06  Anders Carlsson  <andersca@apple.com>
1765
1766         Remove WebKit1 header includes from WebKit2
1767         https://bugs.webkit.org/show_bug.cgi?id=129824
1768
1769         Reviewed by Dan Bernstein.
1770
1771         * UIProcess/mac/WKFullScreenWindowController.mm:
1772         (makeResponderFirstResponderIfDescendantOfView):
1773         Add a new function instead of calling an NSWindow category method that's defined in WebKit1.
1774
1775         (-[WKFullScreenWindowController enterFullScreen:]):
1776         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
1777         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
1778         Call makeResponderFirstResponderIfDescendantOfView.
1779
1780         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1781         Remove unused WebKit1 header import.
1782
1783         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1784         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
1785         Change a category to be on NSObject instead of WebResource.
1786
1787 2014-03-06  Jon Lee  <jonlee@apple.com>
1788
1789         iOS build fix.
1790
1791         Reviewed by Simon Fraser.
1792
1793         * UIProcess/ios/SmartMagnificationController.mm:
1794
1795 2014-03-06  Joseph Pecoraro  <pecoraro@apple.com>
1796
1797         Web Inspector: Expose the console object in JSContexts to interact with Web Inspector
1798         https://bugs.webkit.org/show_bug.cgi?id=127944
1799
1800         Reviewed by Geoffrey Garen.
1801
1802         * WebProcess/WebCoreSupport/WebChromeClient.h:
1803         Update namespaces.
1804
1805 2014-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1806
1807         [GTK] Close the page when the view is disposed instead of when finalized
1808         https://bugs.webkit.org/show_bug.cgi?id=129783
1809
1810         Reviewed by Sergio Villar Senin.
1811
1812         When a GtkWidget is destroyed, the GObject is disposed, but not
1813         finalized if it has additional references. When the destroyed
1814         widget is leaked by the application, we leak the page proxy and
1815         what is more important the web process in multi-process mode.
1816
1817         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1818         (webkitWebViewBaseDispose): Close the WebPageProxy.
1819
1820 2014-03-05  Chris Fleizach  <cfleizach@apple.com>
1821
1822         AX: Support IOS Accessibility in WK2
1823         https://bugs.webkit.org/show_bug.cgi?id=129527
1824
1825         Build fix.
1826
1827         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
1828         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
1829
1830 2014-03-05  Chris Fleizach  <cfleizach@apple.com>
1831
1832         AX: Support IOS Accessibility in WK2
1833         https://bugs.webkit.org/show_bug.cgi?id=129527
1834
1835         Address review comments from Simon noted in bug.
1836
1837         * UIProcess/ios/WKContentView.mm:
1838         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
1839         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
1840         (-[WKAccessibilityWebPageObject init]):
1841         (-[WKAccessibilityWebPageObject dealloc]):
1842         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h:
1843         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
1844         (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
1845         (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
1846         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
1847         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
1848         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
1849
1850 2014-03-05  Dean Jackson  <dino@apple.com>
1851
1852         [WebGL] Use WKSI to see what the system policy for WebGL is
1853         https://bugs.webkit.org/show_bug.cgi?id=129722
1854         <rdar://problem/15790542>
1855
1856         Reviewed by Tim Horton.
1857
1858         Use the WebKitSystemInterface methods WKShouldBlockWebGL
1859         and WKShouldSuggestBlockingWebGL to query what the host
1860         system thinks about the hardware. Tell the client about
1861         the result in a new WebPage method setSystemWebGLPolicy.
1862
1863         * UIProcess/API/APILoaderClient.h:
1864         (API::LoaderClient::setSystemWebGLLoadPolicy): New empty definition.
1865         * UIProcess/API/C/WKAPICast.h:
1866         (WebKit::toAPI): Convert a WebGLLoadPolicy into a WKWebGLLoadPolicy.
1867         * UIProcess/API/C/WKPage.cpp: Call setSystemWebGLLoadPolicy.
1868         (WKPageSetPageLoaderClient):
1869         * UIProcess/API/C/WKPageLoaderClient.h: New typedef and entry in client structure.
1870         * UIProcess/WebPageProxy.cpp:
1871         (WebKit::WebPageProxy::setSystemWebGLPolicy):
1872         * UIProcess/WebPageProxy.h:
1873         * UIProcess/WebPageProxy.messages.in: Add SetSystemWebGLPolicy.
1874         * Source/WebKit2/Configurations/WebKit2.xcconfig: We have to link against OpenGL now, because WKSI
1875         uses it for hardware detection.
1876         * WebProcess/WebPage/WebPage.cpp: Remove the implementation here, but leave
1877         empty methods for non-Apple platforms.
1878         (WebKit::WebPage::WebPage):
1879         (WebKit::WebPage::webGLPolicyForURL):
1880         (WebKit::WebPage::resolveWebGLPolicyForURL):
1881         * WebProcess/WebPage/WebPage.h: Add m_systemWebGLPolicy.
1882         * WebProcess/WebPage/mac/WebPageMac.mm:
1883         (WebKit::WebPage::webGLPolicyForURL): Moved in from WebPage, but now they call
1884         into WKSI and send the result to the client if necessary.
1885         (WebKit::WebPage::resolveWebGLPolicyForURL):
1886
1887 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
1888
1889         Fix a stupid error in r165118 that caused userVisibleString()
1890         to call itself recursively.
1891
1892         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1893         (WebKit::WebEditorClient::userVisibleString):
1894
1895 2014-03-05  Benjamin Poulain  <bpoulain@apple.com>
1896
1897         [iOS] Rename the various VisibleExtent variations to exposedContentRect
1898         https://bugs.webkit.org/show_bug.cgi?id=129728
1899
1900         Reviewed by Simon Fraser.
1901
1902         * WebProcess/WebPage/DrawingArea.h:
1903         * WebProcess/WebPage/ios/WebPageIOS.mm:
1904         (WebKit::WebPage::updateVisibleContentRects):
1905         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
1906         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
1907         (WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
1908
1909 2014-03-05  Dean Jackson  <dino@apple.com>
1910
1911         Unreviewed. Fix the Apple-internal builds.
1912
1913         * Configurations/WebKit2.xcconfig: Add -framework OpenGL.
1914
1915 2014-03-05  Simon Fraser  <simon.fraser@apple.com>
1916
1917         ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
1918         https://bugs.webkit.org/show_bug.cgi?id=129752
1919
1920         Reviewed by Enrica Casucci.
1921         
1922         Get WebDragClientMac off of all WebKit headers, and WebEditorClientMac off
1923         all but one by using C functions from WebCoreNSURLExtras.h rather than
1924         the NSURL category.
1925
1926         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1927         (WebKit::WebDragClient::declareAndWriteDragImage):
1928         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1929         (WebKit::WebEditorClient::userVisibleString):
1930         (WebKit::WebEditorClient::canonicalizeURL):
1931         (WebKit::WebEditorClient::canonicalizeURLString):
1932
1933 2014-03-05  Martin Hock  <mhock@apple.com>
1934
1935         Add support for sessions to MemoryCache.
1936         https://bugs.webkit.org/show_bug.cgi?id=127794
1937
1938         Reviewed by Sam Weinig.
1939
1940         * NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
1941         (WebKit::NetworkResourceLoader::sessionID):
1942         * NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
1943         * NetworkProcess/mac/DiskCacheMonitor.mm:
1944         (WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
1945         * WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
1946         (WebKit::NetworkProcessConnection::didCacheResource):
1947         * WebProcess/Network/NetworkProcessConnection.h: Ditto.
1948         * WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
1949
1950 2014-03-05  Enrica Casucci  <enrica@apple.com>
1951
1952         [iOS WebKit2] support multi-select and select with groups for iPhone.
1953         https://bugs.webkit.org/show_bug.cgi?id=129344
1954         <rdar://problem/16206928>
1955
1956         Reviewed by Simon Fraser.
1957
1958         This is the remaining work on select element support on iOS.
1959         This adds multi-select and select with group support with UI
1960         for iPhone that uses UIPickerView.
1961
1962         * UIProcess/ios/WKContentViewInteraction.mm:
1963         (-[WKContentView resignFirstResponder]):
1964         (-[WKContentView inputAccessoryView]): Removed incorrect early return.
1965         (-[WKContentView _stopAssistingNode]):
1966         * UIProcess/ios/forms/WKFormSelectControl.h:
1967         * UIProcess/ios/forms/WKFormSelectControl.mm:
1968         (adjustedFontSize): Moved here to make it available to both picker and
1969         popover based implementations.
1970         (-[WKFormSelectControl initWithView:]):
1971         * UIProcess/ios/forms/WKFormSelectPicker.mm:
1972         (-[WKOptionPickerCell _isSelectable]):
1973         (-[WKOptionPickerCell initCommon]):
1974         (-[WKOptionPickerCell initWithOptionItem:]):
1975         (-[WKOptionGroupPickerCell initWithOptionItem:]):
1976         (-[WKOptionGroupPickerCell labelWidthForBounds:]):
1977         (-[WKOptionGroupPickerCell layoutSubviews]):
1978         (-[WKMultipleSelectPicker initWithView:]):
1979         (-[WKMultipleSelectPicker dealloc]):
1980         (-[WKMultipleSelectPicker controlView]):
1981         (-[WKMultipleSelectPicker controlBeginEditing]):
1982         (-[WKMultipleSelectPicker controlEndEditing]):
1983         (-[WKMultipleSelectPicker layoutSubviews]):
1984         (-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
1985         (-[WKMultipleSelectPicker numberOfComponentsInPickerView:]):
1986         (-[WKMultipleSelectPicker pickerView:numberOfRowsInComponent:]):
1987         (-[WKMultipleSelectPicker findItemIndexAt:]):
1988         (-[WKMultipleSelectPicker pickerView:row:column:checked:]):
1989         (-[WKSelectSinglePicker initWithView:]):
1990         (-[WKSelectSinglePicker controlEndEditing]):
1991         * UIProcess/ios/forms/WKFormSelectPopover.mm:
1992
1993 2014-03-03  Martin Robinson  <mrobinson@igalia.com>
1994
1995         [GTK][CMake] Generate documentation for the DOM bindings
1996         https://bugs.webkit.org/show_bug.cgi?id=126211
1997
1998         Reviewed by Carlos Garcia Campos.
1999
2000         * PlatformGTK.cmake: The list of headers for GIR generation has a better name now.
2001
2002 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
2003
2004         Fix the build after r165095
2005
2006         * UIProcess/API/Cocoa/WKWebView.mm:
2007         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2008
2009 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
2010
2011         [iOS][WK2] Account for the keyboard when computing the unobscuredRect
2012         https://bugs.webkit.org/show_bug.cgi?id=129660
2013
2014         Reviewed by Enrica Casucci.
2015
2016         Adjust the unobscuredRect when a docked keyboard is on screen.
2017
2018         * UIProcess/API/Cocoa/WKWebView.mm:
2019         (-[WKWebView _updateVisibleContentRectsWithStableState:]):
2020         (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2021
2022 2014-03-04  Andy Estes  <aestes@apple.com>
2023
2024         [iOS][WebKit2] Exclude plug-in sandbox profiles from the build
2025         https://bugs.webkit.org/show_bug.cgi?id=129719
2026
2027         Reviewed by Simon Fraser.
2028
2029         * Configurations/WebKit2.xcconfig:
2030
2031 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
2032
2033         [iOS][WK2] WKScrollView should be able to cancel touches in content view
2034         https://bugs.webkit.org/show_bug.cgi?id=129711
2035
2036         Reviewed by Simon Fraser.
2037
2038         * UIProcess/ios/WKScrollView.mm:
2039         We should not override UIWebScrollView behavior regarding touch cancellation otherwise we force
2040         other gesture recognizers to fail if delayed touches have been dispatched.
2041
2042 2014-03-04  Benjamin Poulain  <bpoulain@apple.com>
2043
2044         [iOS][WK2] Consider the entire view state on update to find if a change is stable or not
2045         https://bugs.webkit.org/show_bug.cgi?id=129721
2046
2047         Reviewed by Simon Fraser.
2048
2049         Changes in scroll, zoom and obscuredRect can happen simultaneously. To compute if the current state
2050         is stable or not, we should consider the complete picture from all the type of updates.
2051
2052         * UIProcess/API/Cocoa/WKWebView.mm:
2053         (-[WKWebView _didFinishScrolling]):
2054         (-[WKWebView scrollViewDidScroll:]):
2055         (-[WKWebView scrollViewDidZoom:]):
2056         (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
2057         (-[WKWebView _frameOrBoundsChanged]):
2058         (-[WKWebView _updateVisibleContentRects]):
2059         (-[WKWebView _setObscuredInsets:]):
2060         (-[WKWebView _endInteractiveObscuredInsetsChange]):
2061
2062 2014-03-04  Jeremy Jones  <jeremyj@apple.com>
2063
2064         WebVideoFullscreen, should make the hand off of the video layer explicit.
2065         https://bugs.webkit.org/show_bug.cgi?id=128844
2066
2067         Reviewed by Simon Fraser.
2068
2069         This change introduces a more explicit hand-off of the video layer and fullscreen transition.
2070         This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
2071         WebVideoFullscreenModel <-> WebVideoFullscreenInterface
2072               enterFullScreen(*) ->
2073                                 <- borrowVideoLayer
2074               willLendVideoLayer ->
2075                didLendVideoLayer ->
2076                                 <- didEnterFullscreen
2077                                 ...
2078                                 <- requestExitFullscreen
2079                   exitFullscreen ->
2080                                 <- returnVideoLayer
2081                                 <- didExitFullscreen
2082         (*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.
2083
2084         * UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2085         Implement WebVideoFullscreenChangeObserver.
2086         Add support for explicit video layer hand-off.
2087         Add m_videoView to retain the videoLayer's UIView.
2088
2089         * UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
2090         WillLendVideoLayerWithID replaces SetVideoLayerID
2091
2092         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2093         Adopt new methods for explicit video layer hand-off.
2094
2095         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
2096         Observe fullscreen changes.
2097
2098         (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
2099         Pending fullscreen transition now does didLendVideoLayer instead of calling enter fullscreen.
2100         It also removes the videoView from it's super view now that it is safe to do so.
2101
2102         (WebKit::WebVideoFullscreenManagerProxy::willLendVideoLayerWithID):
2103         This replaces setVideoLayerID. It retains the UIView for the layer to keep it alive before it is unparented.
2104
2105         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
2106         Adopt more explicit fullscreen transition.
2107
2108         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
2109         Adopt more explicit fullscreen transition.
2110
2111         (WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
2112         Adopt more explicit fullscreen transition.
2113
2114         (WebKit::WebVideoFullscreenManagerProxy::borrowVideoLayer):
2115         Adopt more explicit video layer hand-off.
2116
2117         (WebKit::WebVideoFullscreenManagerProxy::returnVideoLayer):
2118         Adopt more explicit video layer hand-off.
2119
2120         * WebProcess/ios/WebVideoFullscreenManager.cpp:
2121         Manage state of fullscreen transition more competently. Wait till an animation is complete to begin the next one.
2122
2123         (WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
2124         Init three new state members.
2125
2126         (WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
2127         Update animation state. Don't procede if animation is in progress.
2128
2129         (WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
2130         Update animation state. Don't procede if animation is in progress.
2131
2132         (WebKit::WebVideoFullscreenManager::willLendVideoLayer):
2133         Adopt more explicit video layer hand-off.
2134         This replaces SetVideoLayer.
2135
2136         (WebKit::WebVideoFullscreenManager::didLendVideoLayer):
2137         This is a no-op as this will be sent through a RemoteLayerTreeTransaction.
2138
2139         (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
2140         Adopt more explicit fullscreen transition.
2141
2142         (WebKit::WebVideoFullscreenManager::didExitFullscreen):
2143         Adopt more explicit fullscreen transition.
2144
2145         * WebProcess/ios/WebVideoFullscreenManager.h:
2146         Adopt more explicit fullscreen transition.
2147
2148         * WebProcess/ios/WebVideoFullscreenManager.messages.in:
2149         Adopt more explicit fullscreen/video layer transition.
2150
2151 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2152
2153         Get position:fixed working slightly better on iOS WK2
2154         https://bugs.webkit.org/show_bug.cgi?id=129714
2155
2156         Reviewed by Benjamin Poulain.
2157         
2158         Start telling the RemoteScrollingCoordinatorProxy about scroll position changes
2159         again, so it can update fixed and sticky layers.
2160         
2161         Send the scroll position as a FloatPoint, rather than an IntPoint.
2162
2163         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
2164         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling):
2165         (WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
2166         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
2167         * UIProcess/WebPageProxy.h:
2168         * UIProcess/ios/WKContentView.mm:
2169         (-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2170         Tell the RemoteScrollingCoordinatorProxy about the scroll update.
2171         Only update the customFixedPositionRect if we've finished scrolling or zooming.
2172         * UIProcess/ios/WebPageProxyIOS.mm:
2173         (WebKit::WebPageProxy::updateVisibleContentRects): Return a bool indicating
2174         whether the visible rects changed.
2175
2176 2014-03-04  Conrad Shultz  <conrad_shultz@apple.com>
2177
2178         WKPage's pageExtendedBackgroundColor API exposed through WKView/WKWebView should support NSColor
2179         https://bugs.webkit.org/show_bug.cgi?id=129704
2180
2181         Reviewed by Beth Dakin.
2182
2183         Add NSColor-returning methods to complement the existing UIColor-returning methods.
2184
2185         * UIProcess/API/Cocoa/WKViewPrivate.h:
2186         Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
2187
2188         * UIProcess/API/Cocoa/WKWebView.mm:
2189         (-[WKWebView _pageExtendedBackgroundColor]):
2190         Return an NSColor created from the pageExtendedBackgroundColor.
2191
2192         * UIProcess/API/Cocoa/WKWebViewPrivate.h:
2193         Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
2194
2195         * UIProcess/API/mac/WKView.mm:
2196         (-[WKView _pageExtendedBackgroundColor]):
2197         Return an NSColor created from the pageExtendedBackgroundColor.
2198
2199 2014-03-04  Joseph Pecoraro  <pecoraro@apple.com>
2200
2201         Web Inspector: Give WebProcess private RWI entitlement
2202         https://bugs.webkit.org/show_bug.cgi?id=129710
2203
2204         Reviewed by Timothy Hatcher.
2205
2206         * Configurations/WebContent-iOS.entitlements:
2207         Add entitlements to "WebProcess" when code signing.
2208
2209         * Configurations/WebContentProcess.xcconfig:
2210         Add the private RWI entitlement.
2211
2212 2014-03-04  Enrica Casucci  <enrica@apple.com>
2213
2214         [iOS WebKit2]: Next/Prev button in the accessory bar do not work.
2215         https://bugs.webkit.org/show_bug.cgi?id=129690
2216         <rdar://problem/16073569>
2217
2218         Reviewed by Simon Fraser.
2219
2220         Adding support for Next and Previous buttons in the accessory bar.
2221         When the request is processed by the WebProcess, we identify the next
2222         focusable node that needs to be assisted and we call focus() on the element
2223         letting the focus changing machinery take care of updating the assisted node.
2224         This change also add support for the Clear button, when appropriate and hooks up
2225         the call to the WebProcess.
2226
2227         * UIProcess/WebPageProxy.h:
2228         * UIProcess/ios/WKContentViewInteraction.mm:
2229         (-[WKContentView accessoryTab:]):
2230         (-[WKContentView accessoryClear]):
2231         (-[WKContentView _updateAccessory]):
2232         * UIProcess/ios/WebPageProxyIOS.mm:
2233         (WebKit::WebPageProxy::focusNextAssistedNode):
2234         * WebProcess/WebPage/WebPage.h:
2235         * WebProcess/WebPage/WebPage.messages.in:
2236         * WebProcess/WebPage/ios/WebPageIOS.mm:
2237         (WebKit::nextFocusableElement):
2238         (WebKit::hasFocusableElement):
2239         (WebKit::WebPage::focusNextAssistedNode):
2240         (WebKit::WebPage::getAssistedNodeInformation):
2241
2242 2014-03-04  Simon Fraser  <simon.fraser@apple.com>
2243
2244         Allow iOS DumpRenderTree crashes to show application-specific information
2245         https://bugs.webkit.org/show_bug.cgi?id=129705
2246
2247         Reviewed by David Kilzer.
2248         
2249         Make the WKSI function SetCrashReportApplicationSpecificInformation available
2250         in iOS simulator builds.
2251
2252         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2253         (InitWebCoreSystemInterface):
2254
2255 2014-03-04  Mark Hahnenberg  <mhahnenberg@apple.com>
2256
2257         Merge API shims and JSLock
2258         https://bugs.webkit.org/show_bug.cgi?id=129650
2259
2260         Reviewed by Mark Lam.
2261
2262         JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason 
2263         to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.
2264
2265         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
2266         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
2267         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
2268
2269 2014-03-03  Enrica Casucci  <enrica@apple.com>
2270
2271         [WK2] Selection remains after reload.
2272         https://bugs.webkit.org/show_bug.cgi?id=129648
2273         <rdar://problem/16207547>
2274
2275         Reviewed by Sam Weinig.
2276
2277         We normally clear the selection when resigninig first responder but
2278         that doesn't get called when reloading the page or when navigating with
2279         back/forward buttons. The correct place to do this is when we get
2280         _didCommitLoadForMainFrame where we already stop assisting the node.
2281         The method we call into webselectionassistant is resignedFirstResponder
2282         which takes care of clearing the selection and removing the selection view.
2283
2284         * UIProcess/ios/WKContentViewInteraction.mm:
2285         (-[WKContentView _stopAssistingNode]):
2286
2287 2014-03-04  Hyowon Kim  <hw1008.kim@samsung.com>
2288
2289         Move EvasGLContext and EvasGLSurface files into the efl common directory.
2290         https://bugs.webkit.org/show_bug.cgi?id=129603
2291
2292         Reviewed by Gyuyoung Kim.
2293
2294         * PlatformEfl.cmake: Update for removed files.
2295
2296 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
2297
2298         [iOS][WK2] WebPage::updateVisibleContentRects can set the position directly instead of using programmatic scrolling
2299         https://bugs.webkit.org/show_bug.cgi?id=129649
2300
2301         Reviewed by Sam Weinig.
2302
2303         * WebProcess/WebPage/ios/WebPageIOS.mm:
2304         (WebKit::WebPage::updateVisibleContentRects):
2305         Update my workaround from r165003. We should not use programmatic scrolling when the scroll position is changed
2306         from the UI.
2307
2308 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
2309
2310         [iOS][WK2] Update UIScrollView's contentSize when a new layer tree is committed
2311         https://bugs.webkit.org/show_bug.cgi?id=129641
2312
2313         Reviewed by Sam Weinig.
2314
2315         * UIProcess/API/Cocoa/WKWebView.mm:
2316         (-[WKWebView _didCommitLayerTree:WebKit::]):
2317         Previously, we relied on [UIScrollView setZoomScale:] to reset the contentSize for us.
2318         In the cases where we would not go through [UIScrollView setZoomScale:], the UIScrollView's contentSize
2319         did not match the actual WKContentView's area on screen.
2320
2321 2014-03-03  Jeremy Jones  <jeremyj@apple.com>
2322
2323         Forward application suspend resume notifications to the web process.
2324         https://bugs.webkit.org/show_bug.cgi?id=129356
2325
2326         Reviewed by Eric Carlson.
2327
2328         Repost UIApplicationWillEnterForegroundNotification,
2329         UIApplicationDidBecomeActiveNotification and 
2330         UIApplicationWillResignActiveNotification from UIProcess to WebProcess.
2331         As WebUIApplicationWillEnterForegroundNotification,
2332         WebUIApplicationDidBecomeActiveNotification, and
2333         WebUIApplicationWillResignActiveNotification
2334
2335         * UIProcess/WebPageProxy.h:
2336         Add applicationWillEnterForeground()
2337         applicationWillResignActive()
2338         applicationDidBecomeActive()
2339
2340         * UIProcess/ios/WKContentView.mm:
2341         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
2342         Observe notifications.
2343
2344         (-[WKContentView dealloc]):
2345         Stop observing notifications.
2346
2347         (-[WKContentView _applicationWillResignActive:]):
2348         Notify WebPageProxy of the event.
2349
2350         (-[WKContentView _applicationWillEnterForeground:]):
2351         Notify WebPageProxy of the event.
2352
2353         (-[WKContentView _applicationDidBecomeActive:]):
2354         Notify WebPageProxy of the event.
2355
2356         * UIProcess/ios/WebPageProxyIOS.mm:
2357         (WebKit::WebPageProxy::applicationWillEnterForeground):
2358         Send corresponding Message to WebPage.
2359
2360         (WebKit::WebPageProxy::applicationWillResignActive):
2361         Send corresponding Message to WebPage.
2362
2363         (WebKit::WebPageProxy::applicationDidBecomeActive):
2364         Send corresponding Message to WebPage.
2365
2366         * WebProcess/WebPage/WebPage.h:
2367         Add applicationWillEnterForeground()
2368         applicationWillResignActive()
2369         applicationDidBecomeActive()
2370
2371         * WebProcess/WebPage/WebPage.messages.in:
2372         Add applicationWillEnterForeground()
2373         applicationWillResignActive()
2374         applicationDidBecomeActive()
2375
2376         * WebProcess/WebPage/ios/WebPageIOS.mm:
2377         (WebKit::WebPage::applicationWillResignActive):
2378         Post corresponding NSNotification.
2379
2380         (WebKit::WebPage::applicationWillEnterForeground):
2381         Post corresponding NSNotification.
2382
2383         (WebKit::WebPage::applicationDidBecomeActive):
2384         Post corresponding NSNotification.
2385
2386 2014-03-03  Commit Queue  <commit-queue@webkit.org>
2387
2388         Unreviewed, rolling out r165013.
2389         http://trac.webkit.org/changeset/165013
2390         https://bugs.webkit.org/show_bug.cgi?id=129646
2391
2392         New code is not thread safe, asserting on a worker test
2393         (Requested by ap on #webkit).
2394
2395         * NetworkProcess/NetworkResourceLoader.h:
2396         * NetworkProcess/mac/DiskCacheMonitor.h:
2397         * NetworkProcess/mac/DiskCacheMonitor.mm:
2398         (WebKit::DiskCacheMonitor::DiskCacheMonitor):
2399         * WebProcess/Network/NetworkProcessConnection.cpp:
2400         (WebKit::NetworkProcessConnection::didCacheResource):
2401         * WebProcess/Network/NetworkProcessConnection.h:
2402         * WebProcess/Network/NetworkProcessConnection.messages.in:
2403
2404 2014-03-03  Enrica Casucci  <enrica@apple.com>
2405
2406         [iOS WebKit2]: Text fields don't zoom in when focused
2407         https://bugs.webkit.org/show_bug.cgi?id=129632
2408         <rdar://problem/16185230>
2409
2410         Reviewed by Benjamin Poulain.
2411
2412         When focusing the node we need to zoom and center it and possibly
2413         scroll to make it visible.
2414         On iPad we only scroll, without zooming.
2415
2416         * Shared/AssistedNodeInformation.cpp:
2417         (WebKit::AssistedNodeInformation::encode):
2418         (WebKit::AssistedNodeInformation::decode):
2419         * Shared/AssistedNodeInformation.h:
2420         (WebKit::AssistedNodeInformation::AssistedNodeInformation):
2421         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2422         * UIProcess/ios/WKContentView.h:
2423         * UIProcess/ios/WKContentView.mm:
2424         (-[WKContentView _scrollToRect:withOrigin:minimumScrollDistance:]):
2425         * UIProcess/ios/WKContentViewInteraction.mm:
2426         (-[WKContentView _displayFormNodeInputView]):
2427         (-[WKContentView _startAssistingNode:]):
2428         * WebProcess/WebPage/ios/WebPageIOS.mm:
2429         (WebKit::WebPage::getAssistedNodeInformation):
2430
2431 2014-03-03  Sam Weinig  <sam@webkit.org>
2432
2433         Fix ASSERT and leaks introduced in recent "Support IOS Accessibility in WK2" patch
2434
2435         Reviewed by Simon Fraser.
2436
2437         * UIProcess/ios/WKContentView.mm:
2438         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
2439         * WebProcess/WebPage/ios/WebPageIOS.mm:
2440         (WebKit::WebPage::platformInitializeAccessibility):
2441
2442 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
2443
2444         Composited masks not working on iOS after r164890 
2445         https://bugs.webkit.org/show_bug.cgi?id=129630
2446
2447         Reviewed by Jer Noble.
2448         
2449         Fix typo in UIView-related masks code; set the mask layer
2450         on the view, not the maskView.
2451
2452         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2453         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
2454
2455 2014-02-28  Chris Fleizach  <cfleizach@apple.com>
2456
2457         AX: Support IOS Accessibility in WK2
2458         https://bugs.webkit.org/show_bug.cgi?id=129527
2459
2460         Reviewed by Sam Weinig.
2461
2462         Implement enough AX hooks so that accessibility can work in WebKit2.
2463
2464         * Platform/IPC/Connection.h:
2465         * Platform/IPC/mac/ConnectionMac.cpp:
2466         (IPC::Connection::identifier):
2467         * UIProcess/ios/PageClientImplIOS.mm:
2468         (WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
2469         * UIProcess/ios/WKContentView.h:
2470         * UIProcess/ios/WKContentView.mm:
2471         (-[WKContentView _updateForScreen:]):
2472         (-[WKContentView _setAccessibilityWebProcessToken:]):
2473         (-[WKContentView _accessibilityRegisterUIProcessTokens]):
2474         (-[WKContentView _didRelaunchProcess]):
2475         * UIProcess/ios/WebPageProxyIOS.mm:
2476         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
2477         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
2478         * WebKit2.xcodeproj/project.pbxproj:
2479         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2480         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h: Added.
2481         * WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm: Added.
2482         (-[WKAccessibilityWebPageObject init]):
2483         (-[WKAccessibilityWebPageObject _accessibilityCategoryInstalled:]):
2484         (-[WKAccessibilityWebPageObject pageScale]):
2485         (-[WKAccessibilityWebPageObject dealloc]):
2486         * WebProcess/WebPage/WebPage.h:
2487         * WebProcess/WebPage/ios/WebPageIOS.mm:
2488         (WebKit::WebPage::platformInitialize):
2489         (WebKit::WebPage::platformInitializeAccessibility):
2490         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
2491         (WebKit::WebPage::registerUIProcessAccessibilityTokens):
2492         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h.
2493         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm.
2494         (-[WKAccessibilityWebPageObjectBase accessibilityFocusedUIElement]):
2495         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h: Added.
2496         * WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Added.
2497         (-[WKAccessibilityWebPageObject accessibilityIsIgnored]):
2498         (-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
2499         (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
2500         (-[WKAccessibilityWebPageObject accessibilityIsAttributeSettable:]):
2501         (-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
2502         (-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
2503         (-[WKAccessibilityWebPageObject accessibilityActionNames]):
2504         (-[WKAccessibilityWebPageObject accessibilityChildren]):
2505         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
2506         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
2507         (-[WKAccessibilityWebPageObject accessibilityShouldUseUniqueId]):
2508         (-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2509         * WebProcess/WebPage/mac/WebPageMac.mm:
2510         * WebProcess/cocoa/WebProcessCocoa.mm:
2511         (WebKit::WebProcess::platformInitializeProcess):
2512
2513 2014-03-03  Martin Hock  <mhock@apple.com>
2514
2515         Add support for sessions to MemoryCache.
2516         https://bugs.webkit.org/show_bug.cgi?id=127794
2517
2518         Reviewed by Sam Weinig.
2519
2520         * NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
2521         (WebKit::NetworkResourceLoader::sessionID):
2522         * NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
2523         * NetworkProcess/mac/DiskCacheMonitor.mm:
2524         (WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
2525         * WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
2526         (WebKit::NetworkProcessConnection::didCacheResource):
2527         * WebProcess/Network/NetworkProcessConnection.h: Ditto.
2528         * WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
2529
2530 2014-03-03  Benjamin Poulain  <bpoulain@apple.com>
2531
2532         [iOS][WK2] Regression: ScrollView's scroll offset is never set after r164702
2533         https://bugs.webkit.org/show_bug.cgi?id=129620
2534
2535         Reviewed by Simon Fraser.
2536
2537         * WebProcess/WebPage/ios/WebPageIOS.mm:
2538         (WebKit::WebPage::updateVisibleContentRects):
2539
2540 2014-03-03  Simon Fraser  <simon.fraser@apple.com>
2541
2542         Crash when going into video fullscreen on iOS
2543         https://bugs.webkit.org/show_bug.cgi?id=129613
2544
2545         Reviewed by Dean Jackson.
2546         
2547         We shouldn't reparent a UIView's layer without unparenting
2548         the view first.
2549
2550         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
2551         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
2552
2553 2014-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2554
2555         [GTK] WebKit2WebExtension GIR can't be used in vala
2556         https://bugs.webkit.org/show_bug.cgi?id=127179
2557
2558         Reviewed by Martin Robinson.
2559
2560         Add a different pkg-config file for the web extensions API.
2561
2562         * GNUmakefile.am:
2563         * PlatformGTK.cmake:
2564         * webkit2gtk-web-extension.pc.in: Added.
2565
2566 2014-03-02  Darin Adler  <darin@apple.com>
2567
2568         Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
2569         https://bugs.webkit.org/show_bug.cgi?id=129592
2570
2571         Reviewed by Sam Weinig.
2572
2573         * UIProcess/WebPageProxy.cpp: Added now-needed include.
2574         * WebProcess/WebPage/WebPage.cpp: Ditto.
2575
2576 2014-03-02  Enrica Casucci  <enrica@apple.com>
2577
2578         [iOS WebKit2] Keyboard deadlock when accepting/dismissing autocorrection.
2579         https://bugs.webkit.org/show_bug.cgi?id=129594
2580         <rdar://problem/16168978>
2581
2582         Reviewed by Sam Weinig.
2583
2584         As a temporary fix, we are using a synchronous
2585         message to accept autocorrection until we implement
2586         a solution that processes these requests on a thread that
2587         is not the main thread.
2588
2589         * UIProcess/WebPageProxy.h:
2590         * UIProcess/ios/WKContentViewInteraction.mm:
2591         (-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
2592         (-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
2593         * UIProcess/ios/WebPageProxyIOS.mm:
2594         (WebKit::WebPageProxy::applyAutocorrection):
2595         * WebProcess/WebPage/WebPage.h:
2596         * WebProcess/WebPage/WebPage.messages.in:
2597         * WebProcess/WebPage/ios/WebPageIOS.mm:
2598         (WebKit::WebPage::applyAutocorrection):
2599         (WebKit::WebPage::syncApplyAutocorrection):
2600
2601 2014-03-02  Dan Bernstein  <mitz@apple.com>
2602
2603         Try to fix the 32-bit build.
2604
2605         * UIProcess/ios/forms/WKFormSelectPopover.mm:
2606         (adjustedFontSize):
2607
2608 2014-03-02  Sam Weinig  <sam@webkit.org>
2609
2610         Page Cache is not enabled when using the modern WebKit2 API
2611         https://bugs.webkit.org/show_bug.cgi?id=129585
2612
2613         Reviewed by Dan Bernstein.
2614
2615         * UIProcess/API/Cocoa/WKProcessPool.mm:
2616         (-[WKProcessPool initWithConfiguration:]):
2617         Default to CacheModelPrimaryWebBrowser until there is a way to configure it.
2618
2619 2014-03-02  Enrica Casucci  <enrica@apple.com>
2620
2621         [iOS WebKit2] Form controls handling
2622         https://bugs.webkit.org/show_bug.cgi?id=129344
2623         <rdar://problem/16053643>
2624
2625         Reviewed by Simon Fraser.
2626
2627         Adding support for select elements on iOS.
2628         There is full support on iPad, while on iPhone it is
2629         still limited to single select with no groups.
2630         The change also fixes the issue of the keyboard appearing
2631         on screen for types of elements that are implemented with
2632         a popover or a picker.
2633
2634         * Scripts/webkit2/messages.py:
2635         * Shared/AssistedNodeInformation.cpp:
2636         (WebKit::WKOptionItem::encode):
2637         (WebKit::WKOptionItem::decode):
2638         (WebKit::AssistedNodeInformation::encode):
2639         (WebKit::AssistedNodeInformation::decode):
2640         * Shared/AssistedNodeInformation.h:
2641         (WebKit::WKOptionItem::WKOptionItem):
2642         * UIProcess/WebPageProxy.h:
2643         * UIProcess/ios/WKContentViewInteraction.h:
2644         * UIProcess/ios/WKContentViewInteraction.mm:
2645         (-[WKContentView inputView]):
2646         (-[WKContentView assistedNodeSelectOptions]):
2647         (-[WKContentView _startAssistingNode:]):
2648         * UIProcess/ios/WebPageProxyIOS.mm:
2649         (WebKit::WebPageProxy::setAssistedNodeSelectedIndex):
2650         * UIProcess/ios/forms/WKFormSelectControl.h:
2651         * UIProcess/ios/forms/WKFormSelectControl.mm: Added.
2652         (-[WKFormSelectControl initWithView:]):
2653         (+[WKFormSelectControl createPeripheralWithView:]):
2654         (-[WKFormSelectControl assistantView]):
2655         (-[WKFormSelectControl beginEditing]):
2656         (-[WKFormSelectControl endEditing]):
2657         * UIProcess/ios/forms/WKFormSelectPicker.mm: Added.
2658         (-[WKSelectSinglePicker initWithView:]):
2659         (-[WKSelectSinglePicker dealloc]):
2660         (-[WKSelectSinglePicker controlView]):
2661         (-[WKSelectSinglePicker controlBeginEditing]):
2662         (-[WKSelectSinglePicker controlEndEditing]):
2663         (-[WKSelectSinglePicker numberOfComponentsInPickerView:]):
2664         (stringByTrimmingWhitespaceAndNewlines):
2665         (-[WKSelectSinglePicker pickerView:numberOfRowsInComponent:]):
2666         (-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
2667         (-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
2668         * UIProcess/ios/forms/WKFormSelectPopover.mm: Added.
2669         (stringWithWritingDirection):
2670         (adjustedFontSize):
2671         (-[WKSelectTableViewController initWithView:hasGroups:]):
2672         (-[WKSelectTableViewController viewWillAppear:]):
2673         (-[WKSelectTableViewController numberOfSectionsInTableView:]):
2674         (-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
2675         (-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
2676         (-[WKSelectTableViewController populateCell:withItem:]):
2677         (-[WKSelectTableViewController findItemIndexAt:]):
2678         (-[WKSelectTableViewController findItemAt:]):
2679         (-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
2680         (-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
2681         (-[WKSelectTableViewController hasText]):
2682         (-[WKSelectTableViewController insertText:]):
2683         (-[WKSelectTableViewController deleteBackward]):
2684         (-[WKSelectPopover initWithView:hasGroups:]):
2685         (-[WKSelectPopover dealloc]):
2686         (-[WKSelectPopover controlView]):
2687         (-[WKSelectPopover controlBeginEditing]):
2688         (-[WKSelectPopover controlEndEditing]):
2689         (-[WKSelectPopover _userActionDismissedPopover:]):
2690         * WebKit2.xcodeproj/project.pbxproj:
2691         * WebProcess/WebPage/WebPage.h:
2692         * WebProcess/WebPage/WebPage.messages.in:
2693         * WebProcess/WebPage/ios/WebPageIOS.mm:
2694         (WebKit::WebPage::setAssistedNodeSelectedIndex):
2695         (WebKit::innerFrameQuad):
2696         (WebKit::WebPage::getPositionInformation):
2697         (WebKit::hasFocusableNode):
2698         (WebKit::WebPage::getAssistedNodeInformation):
2699         (WebKit::WebPage::elementDidFocus):
2700
2701 2014-03-02  Benjamin Poulain  <bpoulain@apple.com>
2702
2703         [iOS][WK2] Pages using tiled compositing layers allocate too many tiles on zoom
2704         https://bugs.webkit.org/show_bug.cgi?id=129471
2705
2706         Reviewed by Simon Fraser.
2707
2708         * WebProcess/WebPage/DrawingArea.h:
2709         * WebProcess/WebPage/ios/WebPageIOS.mm:
2710         (WebKit::WebPage::updateVisibleContentRects):
2711         A few interesting changes here:
2712         -Now that we do not use setExposedRect, we can pass the exposed area directly
2713          to the drawing area since everything is now in content coordinates :)
2714         -The scale is now converted to float before being compared to the Page's scaleFactor.
2715          The page's scalefactor being a float, the comparison was failing most of the time.
2716
2717         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2718         * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
2719         (WebKit::RemoteLayerTreeDrawingArea::setVisibleExtentContentRect):
2720
2721 2014-03-02  Darin Adler  <darin@apple.com>
2722
2723         Change public text iterator API implementations to not depend on 16-bit character pointers
2724         https://bugs.webkit.org/show_bug.cgi?id=129566
2725
2726         Reviewed by Anders Carlsson.
2727
2728         * WebView/WebTextIterator.mm:
2729         (-[WKDOMTextIterator initWithRange:]): Use make_unique instead of adoptPtr.
2730         (-[WKDOMTextIterator advance]): Clear out the upconverted text since we are moving on to the
2731         next text.
2732         (-[WKDOMTextIterator currentTextPointer]): Upconvert if we have 8-bit text.
2733         (-[WKDOMTextIterator currentTextLength]): Call TextIterator::text().length() since we will
2734         probably be removing TextIterator::length eventually.
2735
2736         * WebProcess/WebCoreSupport/WebEditorClient.cpp: Removed unneded include of TextIterator.h.
2737         * WebProcess/WebPage/WebPage.cpp: Ditto.
2738
2739 2014-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2740
2741         [GTK] Make impossible to build with <webkit2/webkit2.h> and <webkit2/webkit-web-extension.h> included together
2742         https://bugs.webkit.org/show_bug.cgi?id=129549
2743
2744         Reviewed by Martin Robinson.
2745
2746         Add a compile error to prevent mixing the UI and web process APIs.
2747
2748         * UIProcess/API/gtk/webkit2.h:
2749         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2750
2751 2014-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2752
2753         [GTK] Remove the include dir of the C API from the WebKit2 pkg-config file
2754         https://bugs.webkit.org/show_bug.cgi?id=129543
2755
2756         Reviewed by Martin Robinson.
2757
2758         We are not installing the C API headers anymore.
2759
2760         * webkit2gtk.pc.in:
2761
2762 2014-03-01  Tim Horton  <timothy_horton@apple.com>
2763
2764         Fix the Mac build.
2765
2766         * UIProcess/mac/ViewGestureController.messages.in:
2767
2768 2014-03-01  Tim Horton  <timothy_horton@apple.com>
2769
2770         WebKit2 View Gestures (Smart Magnification): Support for iOS
2771         https://bugs.webkit.org/show_bug.cgi?id=129146
2772         <rdar://problem/16032668>
2773
2774         Reviewed by Benjamin Poulain.
2775
2776         Add support for double-tap smart magnification on iOS.
2777
2778         * DerivedSources.make:
2779         * UIProcess/API/Cocoa/WKWebView.mm:
2780         (-[WKWebView initWithFrame:configuration:]):
2781         WKContentView is no longer API, so it can know about WKWebView
2782         and will always have one.
2783
2784         (-[WKWebView contentView:didCommitLayerTree:WebKit::]):
2785         Don't replace the zoom scale if we're currently animating.
2786
2787         (-[WKWebView _takeViewSnapshot]):
2788         Rename.
2789
2790         (-[WKWebView _zoomToPoint:WebCore::atScale:]):
2791         (-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
2792         (constrainContentOffset):
2793         (-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
2794         (-[WKWebView _zoomOutWithOrigin:]):
2795         (-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
2796         Add _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:
2797         and _zoomOutWithOrigin: as internal API, for use by SmartMagnificationController via WKContentView.
2798         These will use some heuristics to generally center the target rect in the view
2799         in a way that should match WebKit1 fairly closely.
2800
2801         * UIProcess/API/Cocoa/WKWebViewInternal.h:
2802         Don't use the WKContentViewDelegate protocol for things that don't belong there.
2803
2804         * UIProcess/ios/SmartMagnificationController.h: Added.
2805         * UIProcess/ios/SmartMagnificationController.messages.in: Added.
2806         * UIProcess/ios/SmartMagnificationController.mm: Added.
2807         (WebKit::SmartMagnificationController::SmartMagnificationController):
2808         (WebKit::SmartMagnificationController::~SmartMagnificationController):
2809         (WebKit::SmartMagnificationController::handleSmartMagnificationGesture):
2810         (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
2811         SmartMagnificationController sits off of WKContentView, and sends/receives
2812         messages to the WebProcess to do the smart magnification hit-testing.
2813
2814         * UIProcess/ios/WKContentView.h:
2815         * UIProcess/ios/WKContentView.mm:
2816         (-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
2817         As before, teach WKContentView about its owning WKWebView.
2818
2819         (-[WKContentView _takeViewSnapshot]):
2820         Rename.
2821
2822         (-[WKContentView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
2823         (-[WKContentView _zoomOutWithOrigin:]):
2824         Forward _zoomToRect:::::: and _zoomOutWithOrigin: to WKWebView.
2825
2826         * UIProcess/ios/WKContentViewInteraction.h:
2827         * UIProcess/ios/WKContentViewInteraction.mm:
2828         (-[WKContentView setupInteraction]):
2829         (-[WKContentView _doubleTapRecognized:]):
2830         (-[WKContentView _twoFingerDoubleTapRecognized:]):
2831         Forward double tap to the SmartMagnificationController.
2832
2833         * UIProcess/mac/ViewGestureController.h:
2834         * UIProcess/mac/ViewGestureController.messages.in:
2835         * UIProcess/mac/ViewGestureControllerMac.mm:
2836         (WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
2837         Retrieve the minimum/maximum viewport scale from the WebProcess.
2838
2839         * WebKit2.xcodeproj/project.pbxproj:
2840         Add new files.
2841
2842         * WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
2843         (WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
2844         (WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
2845         (WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
2846         (WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
2847         Factor out code to send the geometry back to the UI process.
2848
2849         * WebProcess/WebPage/ViewGestureGeometryCollector.h:
2850         * WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
2851         * WebProcess/WebPage/WebPage.cpp:
2852         (WebKit::WebPage::WebPage):
2853         * WebProcess/WebPage/WebPage.h:
2854         We should have a ViewGestureGeometryCollector on iOS too.
2855
2856 2014-03-01  Zan Dobersek  <zdobersek@igalia.com>
2857
2858         Unreviewed follow-up to r164905 and r164912.
2859
2860         * Platform/IPC/Connection.h: Only declare setShouldCloseConnectionOnMachExceptions() for the Mac port.
2861         * UIProcess/Plugins/PluginProcessProxy.cpp:
2862         (WebKit::PluginProcessProxy::didFinishLaunching): Only call setShouldCloseConnectionOnMachExceptions() on the Mac port.
2863
2864 2014-03-01  Gavin Barraclough  <barraclough@apple.com>
2865
2866         Split UserActivity/CountedUserActivity
2867         https://bugs.webkit.org/show_bug.cgi?id=129520
2868
2869         Reviewed by Sam Weinig.
2870
2871         UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
2872         In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
2873
2874         * PluginProcess/PluginProcess.h:
2875         (WebKit::PluginProcess::connectionActivity):
2876             - UserActivity->CountedUserActivity
2877         * PluginProcess/mac/PluginProcessMac.mm:
2878         (WebKit::PluginProcess::platformInitializeProcess):
2879             - beginActivity->start
2880         * Shared/ActivityAssertion.cpp:
2881         (WebKit::ActivityAssertion::ActivityAssertion):
2882         (WebKit::ActivityAssertion::~ActivityAssertion):
2883             - beginActivity->increment, endActivity->decrement.
2884         * Shared/ActivityAssertion.h:
2885             - UserActivity->CountedUserActivity
2886         * Shared/ChildProcess.cpp:
2887         (WebKit::ChildProcess::setProcessSuppressionEnabled):
2888             - beginActivity->start, endActivity->stop.
2889         * Shared/ChildProcess.h:
2890             - removed processSuppressionEnabled()
2891         * WebProcess/WebPage/WebPage.cpp:
2892         (WebKit::WebPage::updatePreferences):
2893             - beginActivity->start, endActivity->stop.
2894
2895 2014-03-01  Csaba Osztrogonác  <ossy@webkit.org>
2896
2897         Unreviewed trivial Linux buildfix after r164905.
2898
2899         setShouldCloseConnectionOnMachExceptions() is defined in the Mac only
2900         Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp inside !PLATFORM(IOS)
2901         which means PLATFORM(MAC), because nobody else uses this source file.
2902
2903         But ChildProcessProxy.cpp is used by Linux ports too, so we have to
2904         use the most specific #if guard here, which is PLATFORM(MAC).
2905
2906         * Shared/ChildProcessProxy.cpp:
2907         (WebKit::ChildProcessProxy::didFinishLaunching):
2908
2909 2014-02-28  Simon Fraser  <simon.fraser@apple.com>
2910
2911         [iOS] Assertions and bad behavior when zooming into an iframe containing apple.com
2912         https://bugs.webkit.org/show_bug.cgi?id=129537
2913
2914         Reviewed by Benjamin Poulain.
2915         
2916         When building RemoteLayerTreeTransactions, the ordering of setting created
2917         layers and doing the recursive tree walk was wrong, such that we failed
2918         to noticed layers created during the recursiveBuildTransaction().
2919         
2920         Also harden the UI-side code against Obj-C exceptions thrown when layers
2921         are missing.
2922
2923         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
2924         (WebKit::RemoteLayerTreePropertyApplier::applyProperties): Assert when 
2925         children are not found, and protect against Obj-C exceptions.
2926         * Shared/mac/RemoteLayerTreeTransaction.mm:
2927         (WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties):
2928         Initialize the members.
2929         * WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
2930         (WebKit::RemoteLayerTreeContext::buildTransaction): Do the recursive walk
2931         before setting created and destroyed layers, since the walk can create
2932         layers (especially when swapping into tiled layers).
2933
2934 2014-02-28  Jinwoo Song  <jinwoo7.song@samsung.com>
2935
2936         Fix WebKit2 build after r164890
2937         https://bugs.webkit.org/show_bug.cgi?id=129533
2938
2939         Reviewed by Simon Fraser.
2940
2941         LayerRepresentation.h is included to WebPageProxy.h in r164890
2942         but it is not used in non Mac or iOS port.
2943
2944         * UIProcess/WebPageProxy.h:
2945
2946 2014-02-28  Alexey Proskuryakov  <ap@apple.com>
2947
2948         [Mac] Extract _data->_thumbnailView checks into a helper function
2949         https://bugs.webkit.org/show_bug.cgi?id=129517
2950
2951         Reviewed by Sam Weinig.
2952
2953         * UIProcess/API/mac/WKView.mm:
2954         (-[WKView shouldIgnoreMouseEvents]):
2955         (-[WKView scrollWheel:]):
2956         (-[WKView mouseMoved:]):
2957         (-[WKView mouseDown:]):
2958         (-[WKView mouseUp:]):
2959         (-[WKView mouseDragged:]):
2960
2961 2014-02-28  Pratik Solanki  <psolanki@apple.com>
2962
2963         [iOS][WebKit2] Don't use any of the mach exception handling code on iOS
2964         https://bugs.webkit.org/show_bug.cgi?id=129516
2965
2966         Reviewed by Sam Weinig.
2967
2968         This code is not used on iOS after my fix in r164883. We can just move it all under
2969         !PLATFORM(IOS).
2970
2971         * Platform/IPC/Connection.h:
2972         * Platform/IPC/mac/ConnectionMac.cpp:
2973         (IPC::Connection::platformInvalidate):
2974         (IPC::Connection::platformInitialize):
2975         (IPC::Connection::open):
2976         * Shared/ChildProcessProxy.cpp:
2977         (WebKit::ChildProcessProxy::didFinishLaunching):
2978
2979 2014-02-28  Benjamin Poulain  <bpoulain@apple.com>
2980
2981         [iOS][WK2] highlight rects should never big bigger than the view
2982         https://bugs.webkit.org/show_bug.cgi?id=129472
2983         <rdar://problem/15673655>
2984
2985         Reviewed by Enrica Casucci.
2986
2987         The unobscuredRect on WebPageProxy is the "true" view rect as seen by the user.
2988         Use that to constrain our highlight rects.
2989
2990         * UIProcess/ios/WKContentViewInteraction.mm:
2991         (highlightedQuadsFitInRect):
2992         (-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
2993
2994 2014-02-28  Simon Fraser  <simon.fraser@apple.com>
2995
2996         Make UIViews for compositing layers in the UI process on iOS
2997         https://bugs.webkit.org/show_bug.cgi?id=129508
2998
2999         Reviewed by Sam Weinig.
3000         
3001         In order to parent UIScrollViews for -webkit-overflow-scrolling:touch,
3002         we need to use UIViews in the compositing layer hierarchy on iOS.
3003         
3004         Make much of the code that currently uses CALayers layer-or-view
3005         agnostic by using a typedef LayerOrView.
3006         
3007         Fix RemoteLayerTreePropertyApplier to apply properties to UIViews
3008         or CALayers; on iOS, we need both paths because we have to set properties
3009         on CALayer for remotely hosted content.
3010         
3011         Add iOS-specific implementation files for RemoteLayerTreeHost and RemoteScrollingCoordinatorProxy,
3012         since these need to see the UIView implementation. WebVideoFullscreenManagerProxy.cpp also needs
3013         to be come a .mm file.
3014
3015         * Shared/mac/RemoteLayerTreePropertyApplier.h:
3016         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
3017         (-[UIView setSubviews:]):
3018         (WebKit::applyPropertiesToLayer):
3019         (WebKit::RemoteLayerTreePropertyApplier::applyProperties):
3020         * UIProcess/Cocoa/LayerRepresentation.h: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
3021         (asLayer):
3022         * UIProcess/PageClient.h:
3023         * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
3024         * UIProcess/WebPageProxy.h:
3025         * UIProcess/ios/LayerRepresentation.mm: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
3026         (asLayer):
3027         * UIProcess/ios/PageClientImplIOS.h:
3028         * UIProcess/ios/PageClientImplIOS.mm:
3029         (WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
3030         (WebKit::PageClientImpl::acceleratedCompositingRootLayer):
3031         * UIProcess/ios/RemoteLayerTreeHostIOS.mm: Added.
3032         (+[WKTransformView layerClass]):
3033         (-[WKRemoteView initWithFrame:contextID:]):
3034         (+[WKRemoteView layerClass]):
3035         (WebKit::RemoteLayerTreeHost::createLayer):
3036         * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: Added.
3037         (WebKit::layerRepresentationFromLayerOrView):
3038         (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
3039         * UIProcess/ios/WKContentView.h:
3040         * UIProcess/ios/WKContentView.mm:
3041         (-[WKContentView _setAcceleratedCompositingRootView:]):
3042         * UIProcess/ios/WebPageProxyIOS.mm:
3043         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
3044         * UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.cpp.
3045         (WebKit::WebVideoFullscreenManagerProxy::create):
3046         (WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
3047         (WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
3048         (WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
3049         (WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
3050         (WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
3051         (WebKit::WebVideoFullscreenManagerProxy::requestExitFullScreen):
3052         (WebKit::WebVideoFullscreenManagerProxy::play):
3053         (WebKit::WebVideoFullscreenManagerProxy::pause):
3054         (WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
3055         (WebKit::WebVideoFullscreenManagerProxy::seekToTime):
3056         (WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
3057         * UIProcess/mac/PageClientImpl.h:
3058         * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
3059         (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
3060         (WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
3061         * UIProcess/mac/RemoteLayerTreeHost.h:
3062         (WebKit::RemoteLayerTreeHost::rootLayer):
3063         * UIProcess/mac/RemoteLayerTreeHost.mm:
3064         (WebKit::RemoteLayerTreeHost::updateLayerTree):
3065         (WebKit::RemoteLayerTreeHost::getLayer):
3066         (WebKit::RemoteLayerTreeHost::createLayer):
3067         * UIProcess/mac/WebPageProxyMac.mm:
3068         (WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
3069         (WebKit::WebPageProxy::acceleratedCompositingRootLayer):
3070         * WebKit2.xcodeproj/project.pbxproj:
3071         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
3072         (PlatformCALayerRemote::recursiveBuildTransaction):
3073
3074 2014-02-28  Anders Carlsson  <andersca@apple.com>
3075
3076         WebKit2.TerminateTwice test is failing.
3077
3078         * UIProcess/WebPageProxy.cpp:
3079         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3080         Turns out this can be called even when we're in the launching state so don't try to
3081         remove the process from the visited link provider when in that state.
3082
3083 2014-02-28  Chris Fleizach  <cfleizach@apple.com>
3084
3085         AX: Crash in WebKit::WebPageProxy::registerWebProcessAccessibilityToken
3086         https://bugs.webkit.org/show_bug.cgi?id=127387
3087
3088         Reviewed by Alexey Proskuryakov.
3089
3090         Speculative fix for crasher. We should check if the connection is still valid before proceeding.
3091
3092         * UIProcess/mac/WebPageProxyMac.mm:
3093         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
3094
3095 2014-02-28  Timothy Hatcher  <timothy@apple.com>
3096
3097         Properly handle when Test.html is not present in Production builds.
3098
3099         https://bugs.webkit.org/show_bug.cgi?id=129506
3100
3101         Reviewed by Joseph Pecoraro.
3102
3103         * UIProcess/WebInspectorProxy.cpp:
3104         (WebKit::isMainOrTestInspectorPage):
3105         * UIProcess/mac/WebInspectorProxyMac.mm:
3106         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3107
3108 2014-02-28  Pratik Solanki  <psolanki@apple.com>
3109
3110         [iOS][WebKit2] Don't grab mach exception port on iOS
3111         https://bugs.webkit.org/show_bug.cgi?id=129505
3112         <rdar://problem/15972749>
3113
3114         Reviewed by Anders Carlsson.
3115
3116         Don't grab the mach exception port on iOS so we get crash logs for web process and network
3117         process.
3118
3119         * Shared/ChildProcessProxy.cpp:
3120         (WebKit::ChildProcessProxy::didFinishLaunching):
3121
3122 2014-02-28  Brent Fulgham  <bfulgham@apple.com>
3123
3124         Unreviewed build fix after r164832.
3125
3126         * UIProcess/ios/WebProcessProxyIOS.mm:
3127         (WebKit::WebProcessProxy::updateProcessState): Switch from removed
3128         'isValid' to 'state() != State::Running'
3129
3130 2014-02-28  Anders Carlsson  <andersca@apple.com>
3131
3132         VisitedLinkProvider should keep track of processes, not pages
3133         https://bugs.webkit.org/show_bug.cgi?id=129497
3134
3135         Reviewed by Dan Bernstein.
3136
3137         Use a counted set of WebProcessProxy pointers instead of a set of pages.
3138
3139         * UIProcess/VisitedLinkProvider.cpp:
3140         (WebKit::VisitedLinkProvider::~VisitedLinkProvider):
3141         Assert that m_processes is null.
3142
3143         (WebKit::VisitedLinkProvider::addProcess):
3144         Add the process to the set.
3145
3146         (WebKit::VisitedLinkProvider::removeProcess):
3147         Remove the process from the set.
3148
3149         * UIProcess/VisitedLinkProvider.h:
3150         
3151         * UIProcess/WebPageProxy.cpp:
3152         (WebKit::WebPageProxy::WebPageProxy):
3153         If our process is currently running, add it to the visited link provider.
3154         Otherwise it will be added in connectionWillOpen.
3155
3156         (WebKit::WebPageProxy::close):
3157         If our process is running, remove it from the visited link provider. 
3158         Otherwise it's either crashed or not yet launched and will not have been added.
3159
3160         (WebKit::WebPageProxy::connectionWillOpen):
3161         Add the process to the visited link provider.
3162
3163         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3164         Remove the process from the visited link provider.
3165
3166 2014-02-27  Alexey Proskuryakov  <ap@apple.com>
3167
3168         [Mac] Stop using some deprecated functions in WKView.mm
3169         https://bugs.webkit.org/show_bug.cgi?id=129455
3170
3171         Reviewed by Anders Carlsson.
3172
3173         * UIProcess/API/mac/WKView.mm:
3174         (-[WKView firstRectForCharacterRange:actualRange:]): Use convertRectToScreen,
3175         which is a replacement for convertBaseToScreen. Don't check for window being null,
3176         because isn't that crazy talk?
3177         (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Use event's location
3178         in window instead of current mouse location. Using location that is not synced to
3179         event stream rarely makes sense, and it doesn't look like this is one of those cases.
3180         (-[WKView performDictionaryLookupAtCurrentMouseLocation]): Ditto.
3181
3182 2014-02-27  Jaehun Lim  <ljaehun.lim@samsung.com>
3183
3184         Unreviewed. Fix build after r164832
3185
3186         * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
3187         (WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
3188
3189 2014-02-27  Martin Robinson  <mrobinson@igalia.com>
3190
3191         Fix build after r164832
3192
3193         * UIProcess/DrawingAreaProxyImpl.cpp:
3194         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState): WebProcessProxy::isLaunching() has been replaced
3195         by WebProcessProxy::state().
3196
3197 2014-02-27  Tim Horton  <timothy_horton@apple.com>
3198
3199         Crash in RemoteLayerTreePropertyApplier::applyPropertiesToLayer
3200         https://bugs.webkit.org/show_bug.cgi?id=129456
3201         <rdar://problem/16182676>
3202
3203         Reviewed by Simon Fraser.
3204
3205         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
3206         (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
3207         We were dereferencing the RemoteLayerBackingStore without checking if it exists,
3208         in the accelerated drawing codepath. This case will occur if a layer
3209         previously drew contents, but now does not.
3210
3211 2014-02-27  Anders Carlsson  <andersca@apple.com>
3212
3213         Simplify WebProcessProxy state accessors
3214         https://bugs.webkit.org/show_bug.cgi?id=129453
3215
3216         Reviewed by Andreas Kling.
3217
3218         Replace WebProcessProxy::isLaunching() and WebProcessProxy::isValid() with a single
3219         WebProcessProxy::state() that return one of three values: Launching, Running or Terminated.
3220
3221         * Shared/ChildProcessProxy.cpp:
3222         (WebKit::ChildProcessProxy::state):
3223         (WebKit::ChildProcessProxy::sendMessage):
3224         (WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
3225         * Shared/ChildProcessProxy.h:
3226         (WebKit::ChildProcessProxy::canSendMessage):
3227         * UIProcess/Databases/DatabaseProcessProxy.cpp:
3228         (WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
3229         * UIProcess/Network/NetworkProcessProxy.cpp:
3230         (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
3231         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
3232         (WebKit::NetworkProcessProxy::setProcessSuppressionEnabled):
3233         * UIProcess/Plugins/PluginProcessProxy.cpp:
3234         (WebKit::PluginProcessProxy::getPluginProcessConnection):
3235         (WebKit::PluginProcessProxy::getSitesWithData):
3236         (WebKit::PluginProcessProxy::clearSiteData):
3237         * UIProcess/WebPageProxy.cpp:
3238         (WebKit::WebPageProxy::WebPageProxy):
3239         (WebKit::WebPageProxy::reattachToWebProcess):
3240         (WebKit::WebPageProxy::waitForDidUpdateViewState):
3241         * UIProcess/WebProcessProxy.cpp:
3242         (WebKit::WebProcessProxy::requestTermination):
3243         (WebKit::WebProcessProxy::enableSuddenTermination):
3244         (WebKit::WebProcessProxy::disableSuddenTermination):
3245         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
3246         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
3247         * UIProcess/mac/WebPageProxyMac.mm:
3248         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
3249         * UIProcess/mac/WebProcessProxyMac.mm:
3250         (WebKit::WebProcessProxy::updateProcessSuppressionState):
3251
3252 2014-02-27  Simon Fraser  <simon.fraser@apple.com>
3253
3254         Crash tapping on play button on video on iOS
3255         https://bugs.webkit.org/show_bug.cgi?id=129452
3256
3257         Reviewed by Benjamin Poulain.
3258         
3259         node->computedStyle() can return null. Just use
3260         renderer->style() to get the tap highlight color.
3261
3262         * WebProcess/WebPage/ios/WebPageIOS.mm:
3263         (WebKit::WebPage::tapHighlightAtPosition):
3264
3265 2014-02-27  Brian Burg  <bburg@apple.com>
3266
3267         Web Inspector: model tests should use a special Test.html inspector page
3268         https://bugs.webkit.org/show_bug.cgi?id=129190
3269
3270         Reviewed by Timothy Hatcher.
3271
3272         Support creating a separate test inspector page, based on the value of
3273         InspectorController::isUnderTest(). Add this as a separate API call for
3274         WebInspectorProxy. Modify the navigation policy to check the URL against
3275         both normal and test inspector pages.
3276
3277         * UIProcess/WebInspectorProxy.cpp:
3278         (WebKit::isMainOrTestInspectorPage):
3279         (WebKit::decidePolicyForNavigationAction):
3280         (WebKit::WebInspectorProxy::createInspectorPageForTest):
3281         * UIProcess/WebInspectorProxy.h:
3282         * UIProcess/WebInspectorProxy.messages.in:
3283         * UIProcess/efl/WebInspectorProxyEfl.cpp:
3284         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3285         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3286         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3287         * UIProcess/ios/WebInspectorProxyIOS.mm:
3288         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3289         * UIProcess/mac/WebInspectorProxyMac.mm:
3290         (WebKit::WebInspectorProxy::inspectorTestPageURL):
3291         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3292         (WebKit::WebInspectorClient::openInspectorFrontend):
3293         * WebProcess/WebPage/WebInspector.cpp: Some drive-by nullptr refactorings.
3294         (WebKit::WebInspector::WebInspector):
3295         (WebKit::WebInspector::createInspectorPage):
3296         (WebKit::WebInspector::createInspectorPageForTest):
3297         (WebKit::WebInspector::destroyInspectorPage):
3298         * WebProcess/WebPage/WebInspector.h:
3299
3300 2014-02-27  Anders Carlsson  <andersca@apple.com>
3301
3302         Make WebProcessProxy::pages() return an IteratorRange
3303         https://bugs.webkit.org/show_bug.cgi?id=129440
3304
3305         Reviewed by Dan Bernstein.
3306
3307         * UIProcess/API/C/WKPage.cpp:
3308         (WKPageCopyRelatedPages):
3309         Move the implementation of WebPageProxy::relatedPages here.
3310
3311         * UIProcess/WebContext.cpp:
3312         (WebKit::WebContext::createNewWebProcessRespectingProcessCountLimit):
3313         Use std::min_element here instead of a manual loop.
3314
3315         * UIProcess/WebPageProxy.cpp:
3316         Remove WebPageProxy::relatedPages().
3317
3318         * UIProcess/WebProcessProxy.cpp:
3319         Remove WebProcessProxy::pages().
3320
3321         * UIProcess/WebProcessProxy.h:
3322         (WebKit::WebProcessProxy::pages):
3323         Make this return an IteratorRange.
3324
3325         (WebKit::WebProcessProxy::pageCount):
3326         New function that returns the page count.
3327
3328 2014-02-27  Alexey Proskuryakov  <ap@apple.com>
3329
3330         [Mac][WK2] Remove hardcoded Cmd+B and Cmd+I from WKView.mm
3331         https://bugs.webkit.org/show_bug.cgi?id=129436
3332
3333         Reviewed by Darin Adler.
3334
3335         * UIProcess/API/mac/WKView.mm: Removed a historic WebKit1 behavior that we don't
3336         need to preserve in WebKit2.
3337
3338 2014-02-27  Alexey Proskuryakov  <ap@apple.com>
3339
3340         [Mac] Remove unused SPI declarations from WKView.mm
3341         https://bugs.webkit.org/show_bug.cgi?id=129434
3342
3343         Reviewed by Sam Weinig.
3344
3345         * UIProcess/API/mac/WKView.mm:
3346
3347 2014-02-26  Michael Saboff  <msaboff@apple.com>
3348
3349         Auto generate bytecode information for bytecode parser and LLInt
3350         https://bugs.webkit.org/show_bug.cgi?id=129181
3351
3352         Reviewed by Mark Lam.
3353
3354         Added ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} to WebKit2_INCLUDE_DIRECTORIES due to new
3355         generated Bytecodes.h include file.
3356
3357         * CMakeLists.txt:
3358
3359 2014-02-27  Anders Carlsson  <andersca@apple.com>
3360
3361         Look up already existing VisitedLinkTableController objects by identifier
3362         https://bugs.webkit.org/show_bug.cgi?id=129431
3363
3364         Reviewed by Dan Bernstein.
3365
3366         * WebProcess/WebPage/VisitedLinkTableController.cpp:
3367         (WebKit::visitedLinkTableControllers):
3368         (WebKit::VisitedLinkTableController::getOrCreate):
3369         (WebKit::VisitedLinkTableController::VisitedLinkTableController):
3370         (WebKit::VisitedLinkTableController::~VisitedLinkTableController):
3371         * WebProcess/WebPage/VisitedLinkTableController.h:
3372         * WebProcess/WebPage/WebPage.cpp:
3373         (WebKit::WebPage::WebPage):
3374
3375 2014-02-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3376
3377         [GTK][WK2] Blocks when fetching plugins information
3378         https://bugs.webkit.org/show_bug.cgi?id=115650
3379
3380         Reviewed by Gustavo Noronha Silva.
3381
3382         Use a persistent cache to store the plugins metadata to avoid
3383         having to load all the plugins everytime a plugin is used for the
3384         first time.
3385
3386         * GNUmakefile.am:
3387         * GNUmakefile.list.am:
3388         * PlatformGTK.cmake:
3389         * Shared/Plugins/Netscape/NetscapePluginModule.h:
3390         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
3391         (WebKit::NetscapePluginModule::parseMIMEDescription): Make this
3392         method public.
3393         (WebKit::NetscapePluginModule::buildMIMEDescription): Added this
3394         helper to build the MIME description string.
3395         * UIProcess/Plugins/gtk/PluginInfoCache.cpp: Added.
3396         (WebKit::PluginInfoCache::shared):
3397         (WebKit::PluginInfoCache::PluginInfoCache):
3398         (WebKit::PluginInfoCache::~PluginInfoCache):
3399         (WebKit::PluginInfoCache::saveToFileIdleCallback):
3400         (WebKit::PluginInfoCache::saveToFile):
3401         (WebKit::PluginInfoCache::getPluginInfo):
3402         (WebKit::PluginInfoCache::updatePluginInfo):
3403         * UIProcess/Plugins/gtk/PluginInfoCache.h: Added.
3404         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
3405         (WebKit::PluginInfoStore::getPluginInfo): Check first if we have
3406         metadata of the plugin in the cache and update the cache if we
3407         loaded the plugin to get its metadata.
3408
3409 2014-02-27  Ryan Lortie  <desrt@desrt.ca>
3410
3411         need to #include <libgen.h> for basename
3412         https://bugs.webkit.org/show_bug.cgi?id=128597
3413
3414         Reviewed by Carlos Garcia Campos.
3415
3416         * PluginProcess/unix/PluginProcessMainUnix.cpp: include <libgen.h> as required by POSIX for basename
3417
3418 2014-02-27  Carlos Garcia Campos  <cgarcia@igalia.com>
3419
3420         [GTK] Web Inspector doesn't work with network process enabled
3421         https://bugs.webkit.org/show_bug.cgi?id=127651
3422
3423         Reviewed by Sergio Villar Senin.
3424
3425         The problem is that the web inspector loads so many resources,
3426         that when using the network process, a lot of IPC traffic is
3427         generated causing the send buffer of the socket to be full. When
3428         that happens sendmsg() fails with EAGAIN, because we are using non
3429         blocking sockets, and we are not handling neither EAGAIN nor
3430         EWOULDBLOCK errors (we do when reading from the socket, though).
3431
3432         * Platform/IPC/unix/ConnectionUnix.cpp:
3433         (IPC::Connection::readyReadHandler): Add a log message to know
3434         when reading from the socket fails for any unhandled error.
3435         (IPC::Connection::sendOutgoingMessage): Handle EAGAIN and
3436         EWOULDBLOCK errors to try again in those cases. Also add a log
3437         message for unhandled errors.
3438
3439 2014-02-26  Philippe Normand  <pnormand@igalia.com>
3440
3441         Unreviewed GTK build fix after r164751.
3442
3443         * GNUmakefile.list.am:
3444
3445 2014-02-26  Dan Bernstein  <mitz@apple.com>
3446
3447         iOS build fix.
3448
3449         * UIProcess/ios/forms/WKFormPopover.h:
3450         * UIProcess/ios/forms/WKFormPopover.mm:
3451
3452 2014-02-26  Dan Bernstein  <mitz@apple.com>
3453
3454         Replaced use of the EXCLUDED_SOURCE_FILE_NAMES build setting with #if PLATFORM(…) guards in
3455         the files themselves.
3456
3457         Rubber-stamped by Sam Weinig.
3458
3459         * Configurations/WebKit2.xcconfig: Cleared out EXCLUDED_SOURCE_FILE_NAMES_macosx, and left
3460         EXCLUDED_SOURCE_FILE_NAMES_iphoneos containing just the names of resources the should be
3461         excluded from Copy Files build phases.
3462         * NetworkProcess/ios/NetworkProcessIOS.mm:
3463         * NetworkProcess/mac/NetworkProcessMac.mm:
3464         * Shared/Downloads/ios/DownloadIOS.mm:
3465         * Shared/Downloads/mac/DownloadMac.mm:
3466         * Shared/NativeWebTouchEvent.h:
3467         * Shared/WebPlatformTouchPoint.cpp:
3468         * Shared/WebTouchEvent.cpp:
3469         * Shared/ios/NativeWebKeyboardEventIOS.mm:
3470         * Shared/ios/NativeWebTouchEventIOS.mm:
3471         * Shared/ios/WebIOSEventFactory.h:
3472         * Shared/ios/WebIOSEventFactory.mm:
3473         * Shared/mac/PasteboardTypes.h:
3474         * Shared/mac/PasteboardTypes.mm:
3475         * Shared/mac/PrintInfoMac.mm:
3476         * UIProcess/API/C/WKInspector.cpp:
3477         * UIProcess/API/Cocoa/WKThumbnailView.h:
3478         * UIProcess/API/Cocoa/WKThumbnailView.mm:
3479         * UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
3480         * UIProcess/API/ios/WKViewIOS.mm:
3481         * UIProcess/API/mac/WKView.mm:
3482         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3483         * UIProcess/ios/PageClientImplIOS.h:
3484         * UIProcess/ios/PageClientImplIOS.mm:
3485         * UIProcess/ios/TextCheckerIOS.mm:
3486         * UIProcess/ios/ViewGestureControllerIOS.mm:
3487         * UIProcess/ios/WKActionSheet.h:
3488         * UIProcess/ios/WKActionSheet.mm:
3489         * UIProcess/ios/WKActionSheetAssistant.h:
3490         * UIProcess/ios/WKActionSheetAssistant.mm:
3491         * UIProcess/ios/WKContentView.mm:
3492         * UIProcess/ios/WKContentViewInteraction.h:
3493         * UIProcess/ios/WKContentViewInteraction.mm: