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