[GTK] [CMake] Build the plugin process against GTK+ 2
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-12-12  Martin Robinson  <mrobinson@igalia.com>
2
3         [GTK] [CMake] Build the plugin process against GTK+ 2
4         https://bugs.webkit.org/show_bug.cgi?id=116374
5
6         Reviewed by Gustavo Noronha Silva.
7
8         * CMakeLists.txt: Use the new GENERATE_WEBKIT2_MESSAGE_SOURCES macro so we
9         can share messaging file generation with the plugin process.
10         * PlatformGTK.cmake: Add more files to the plugin process source list. Properly
11         generate message sources, add the appropriate include paths, defines, and libraries
12         for the plugin process.
13
14 2013-12-17  Anders Carlsson  <andersca@apple.com>
15
16         Back out r159982
17         https://bugs.webkit.org/show_bug.cgi?id=125870
18         <rdar://problem/15598485>
19
20         Reviewed by Dan Bernstein.
21
22         Looks like r159982 caused intermittent crashes. Back it out for now.
23
24         * UIProcess/WebContextUserMessageCoders.h:
25         (WebKit::WebContextUserMessageEncoder::encode):
26         (WebKit::WebContextUserMessageDecoder::decode):
27         * UIProcess/WebPageGroup.cpp:
28         * UIProcess/WebPageGroup.h:
29         (WebKit::WebPageGroup::sendToAllProcessesInGroup):
30         * UIProcess/WebPageProxy.cpp:
31         (WebKit::WebPageProxy::initializeWebPage):
32         * UIProcess/WebProcessProxy.cpp:
33         (WebKit::WebProcessProxy::disconnect):
34         * UIProcess/WebProcessProxy.h:
35
36 2013-12-17  Dan Bernstein  <mitz@apple.com>
37
38         Fixed an assertion failure seen running some mixed-content tests.
39         https://bugs.webkit.org/show_bug.cgi?id=125862
40
41         Reviewed by Alexey Proskuryakov.
42
43         * UIProcess/PageLoadState.cpp:
44         (WebKit::PageLoadState::didDisplayOrRunInsecureContent): Removed an assertion about the URL
45         of the main frame when dealing with a notification that could have come from any frame.
46
47 2013-12-17  Dan Bernstein  <mitz@apple.com>
48
49         [Cocoa] Add properties related to the user agent string
50         https://bugs.webkit.org/show_bug.cgi?id=125856
51
52         Reviewed by Anders Carlsson.
53
54         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Declared new properties.
55         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
56         (-[WKBrowsingContextController applicationNameForUserAgent]): Added accessor.
57         (-[WKBrowsingContextController setApplicationNameForUserAgent:]): Ditto.
58         (-[WKBrowsingContextController customUserAgent]): Ditto.
59         (-[WKBrowsingContextController setCustomUserAgent:]): Ditto.
60
61 2013-12-16  Gavin Barraclough  <barraclough@apple.com>
62
63         Add layer hosting mode to ViewState
64         https://bugs.webkit.org/show_bug.cgi?id=125803
65
66         Unreviewed - reverting last commit - might have broken tests. :-(
67
68         * Shared/ViewState.h:
69         * Shared/WebPageCreationParameters.cpp:
70         (WebKit::WebPageCreationParameters::encode):
71         (WebKit::WebPageCreationParameters::decode):
72         * Shared/WebPageCreationParameters.h:
73         * UIProcess/API/mac/PageClientImpl.h:
74         * UIProcess/API/mac/PageClientImpl.mm:
75         (WebKit::PageClientImpl::PageClientImpl):
76         (WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
77         (WebKit::PageClientImpl::viewLayerHostingMode):
78         * UIProcess/DrawingAreaProxy.h:
79         (WebKit::DrawingAreaProxy::layerHostingModeDidChange):
80         * UIProcess/PageClient.h:
81         (WebKit::PageClient::viewLayerHostingMode):
82         * UIProcess/WebPageProxy.cpp:
83         (WebKit::WebPageProxy::WebPageProxy):
84         (WebKit::WebPageProxy::updateViewState):
85         (WebKit::WebPageProxy::viewStateDidChange):
86         (WebKit::WebPageProxy::initializeCreationParameters):
87         * UIProcess/WebPageProxy.h:
88         (WebKit::WebPageProxy::layerHostingMode):
89         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
90         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
91         (WebKit::TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange):
92         * WebProcess/WebPage/DrawingArea.h:
93         (WebKit::DrawingArea::resumePainting):
94         (WebKit::DrawingArea::setLayerHostingMode):
95         * WebProcess/WebPage/DrawingArea.messages.in:
96         * WebProcess/WebPage/WebPage.cpp:
97         (WebKit::WebPage::WebPage):
98         (WebKit::WebPage::~WebPage):
99         (WebKit::WebPage::scalePage):
100         (WebKit::WebPage::setDeviceScaleFactor):
101         (WebKit::WebPage::setActive):
102         (WebKit::WebPage::setViewState):
103         (WebKit::WebPage::setWindowIsVisible):
104         (WebKit::WebPage::windowAndViewFramesChanged):
105         * WebProcess/WebPage/WebPage.h:
106         (WebKit::WebPage::layerHostingMode):
107         * WebProcess/WebPage/ios/WebPageIOS.mm:
108         (WebKit::WebPage::setLayerHostingMode):
109         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
110         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
111         (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
112         * WebProcess/WebPage/mac/WebPageMac.mm:
113         (WebKit::WebPage::sendComplexTextInputToPlugin):
114         (WebKit::WebPage::setLayerHostingMode):
115
116 2013-12-13  Gavin Barraclough  <barraclough@apple.com>
117
118         Add layer hosting mode to ViewState
119         https://bugs.webkit.org/show_bug.cgi?id=125803
120
121         Reviewed by Anders Carlsson.
122
123         When the view state of the page is updated the layer mode may also
124         change. Currently this is passed by a separate message, remove this
125         and fold it into ViewState.
126         
127         Previously the setLayerHostingMode message would be passed to the
128         DrawingArea, which would inform the WebPage. Since the WebPage is
129         passed the SetVisibilityState messgae reverse this.
130
131         WebPageProxy had a policy of only updating the hosting mode when
132         visible - the value is sticky whilst the view is not visible. Make
133         this policy explicit in the PageClientImpl, rather then implicit
134         from the flow control.
135
136         * Shared/ViewState.h:
137             - Added ViewState::IsLayerWindowServerHosted.
138         * Shared/WebPageCreationParameters.cpp:
139         (WebKit::WebPageCreationParameters::encode):
140         (WebKit::WebPageCreationParameters::decode):
141         * Shared/WebPageCreationParameters.h:
142             - removed layerHostingMode.
143         * UIProcess/API/mac/PageClientImpl.h:
144         * UIProcess/API/mac/PageClientImpl.mm:
145         (WebKit::PageClientImpl::PageClientImpl):
146         (WebKit::PageClientImpl::isLayerWindowServerHosted):
147         (WebKit::PageClientImpl::viewWillMoveToAnotherWindow):
148             - viewLayerHostingMode -> isLayerWindowServerHosted, added m_layerHostingMode.
149         * UIProcess/DrawingAreaProxy.h:
150             - removed layerHostingModeDidChange.
151         * UIProcess/PageClient.h:
152             - viewLayerHostingMode -> isLayerWindowServerHosted.
153         * UIProcess/WebPageProxy.cpp:
154         (WebKit::WebPageProxy::WebPageProxy):
155             - removed m_layerHostingMode.
156         (WebKit::WebPageProxy::updateViewState):
157             - added IsLayerWindowServerHosted.
158         (WebKit::WebPageProxy::viewStateDidChange):
159             - changes to ViewState::IsInWindow implies ViewState::IsLayerWindowServerHosted may change too.
160             - remove special handling (separate message) for LayerHostingMode.
161         (WebKit::WebPageProxy::initializeCreationParameters):
162             - removed m_layerHostingMode.
163         * UIProcess/WebPageProxy.h:
164             - removed m_layerHostingMode.
165         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
166         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
167             - removed layerHostingModeDidChange.
168         * WebProcess/WebPage/DrawingArea.h:
169         (WebKit::DrawingArea::setLayerHostingMode):
170         (WebKit::DrawingArea::didUpdate):
171             - setLayerHostingMode takes a LayerHostingMode.
172         * WebProcess/WebPage/DrawingArea.messages.in:
173             - SetLayerHostingMode is no longer a message.
174         * WebProcess/WebPage/WebPage.cpp:
175         (WebKit::WebPage::WebPage):
176             - removed m_layerHostingMode.
177         (WebKit::WebPage::setViewState):
178             - handle ViewState::IsLayerWindowServerHosted.
179         (WebKit::WebPage::setLayerHostingMode):
180             - moved from ~Mac.mm (matching other ViewState setters), calls to DrawingArea.
181         * WebProcess/WebPage/WebPage.h:
182         (WebKit::WebPage::layerHostingMode):
183             - layerHostingMode queries m_viewState, removed m_layerHostingMode.
184         * WebProcess/WebPage/ios/WebPageIOS.mm:
185             - removed setLayerHostingMode.
186         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
187         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
188         (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
189             - setLayerHostingMode takes a LayerHostingMode, WebPage now calls to DrawingArea.
190         * WebProcess/WebPage/mac/WebPageMac.mm:
191             - removed setLayerHostingMode.
192
193 2013-12-16  Sam Weinig  <sam@webkit.org>
194
195         [Cocoa] Remove unused contentAnchor SPI from WKView
196         https://bugs.webkit.org/show_bug.cgi?id=125826
197
198         Reviewed by Tim Horton.
199
200         * UIProcess/API/Cocoa/WKViewPrivate.h:
201         * UIProcess/API/mac/WKView.mm:
202         (-[WKView setFrameSize:]):
203         (-[WKView _setDrawingAreaSize:]):
204         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
205         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
206
207 2013-12-16  Tim Horton  <timothy_horton@apple.com>
208
209         WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
210         https://bugs.webkit.org/show_bug.cgi?id=125750
211
212         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
213         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
214         Remove some accidentally included commented out code.
215
216 2013-12-16  Tim Horton  <timothy_horton@apple.com>
217
218         WebKit2 View Gestures: Pinching beyond the extremes doesn't animate back to the min/max
219         https://bugs.webkit.org/show_bug.cgi?id=125750
220
221         Reviewed by Simon Fraser.
222
223         When you let go of a pinch where you exceeded the maximum or minimum scale,
224         the view should animate back to the limit instead of snapping back.
225
226         * UIProcess/mac/ViewGestureController.cpp:
227         (WebKit::ViewGestureController::endMagnificationGesture):
228         Unscrolling the scaled origin here is wrong; we should send the same
229         value for 'origin' for commitTransientZoom that we do for adjustTransientZoom.
230         The drawing area can deal with transforming that however it needs to call scalePage().
231
232         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
233         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
234         (WebKit::TiledCoreAnimationDrawingArea::beginTransientZoom):
235         Drive-by use WebPage::mainFrameView().
236
237         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
238         Update the shadow layer's bounds, position, and shadow path while zooming,
239         instead of hiding it.
240
241         (WebKit::transientZoomSnapAnimationForKeyPath):
242         Create a CABasicAnimation that stays applied to its target when it finishes,
243         lasts for a quarter second, and uses the ease-in-ease-out timing function.
244
245         (WebKit::constrainZoomOriginForFrameView):
246         When we land a transient zoom, there may be overhang areas (linen, in the case of Mac)
247         visible. During the commit animation, we should move the RenderView layer appropriately
248         so that the page covers the entire view and there are no overhang areas visible.
249         Adapt some code from ScrollableArea to constrain the zoom origin to do so.
250
251         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
252         Animate the RenderView layer's transform, and the shadow layer's bounds, position, and path.
253         When they complete, apply the zoom via scalePage() and flush the layer tree (otherwise there
254         can be a flash between removing the animations and the next flush with the new scale).
255
256         (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
257         Move the code to land the transient zoom (via scalePage) and to put the shadow back
258         in the state WebCore left it out into its own function, so it can be called both from the
259         animation completion callback and from the short-circuit in the case where we don't need to animate.
260
261 2013-12-16  Ryuan Choi  <ryuan.choi@samsung.com>
262
263         Unreviewed. Fix GTK+ build after r160653.
264
265         Renamed WebData to API::Data
266
267         * GNUmakefile.list.am: Added APIData.cpp and APIData.h
268         * UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
269         (webkitURISchemeRequestReadCallback):
270         * UIProcess/API/gtk/WebKitWebResource.cpp:
271         * UIProcess/API/gtk/WebKitWebView.cpp:
272
273 2013-12-16  Benjamin Poulain  <bpoulain@apple.com>
274
275         [WK2][iOS] WKView sends unscaled scroll position to WKContentView
276         https://bugs.webkit.org/show_bug.cgi?id=125819
277
278         Reviewed by Anders Carlsson.
279
280         WKView was sending untransformed scroll coordinates to WKContentView. The scroll position
281         seen by WebKit was wrong when the content is scaled.
282
283         * UIProcess/API/ios/WKView.mm:
284         (-[WKView _didScroll]):
285         (-[WKView scrollViewDidEndDragging:willDecelerate:]):
286         (-[WKView scrollViewDidEndDecelerating:]):
287         (-[WKView scrollViewDidScrollToTop:]):
288
289 2013-12-16  Brady Eidson  <beidson@apple.com>
290
291         DatabaseProcess: Plumb through messaging for the 4 basic transaction operations
292         https://bugs.webkit.org/show_bug.cgi?id=125816
293
294         Reviewed by Alexey Proskuryakov.
295
296         The messaging begins and ends in the WebProcess:
297         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
298         (WebKit::WebIDBServerConnection::beginTransaction):
299         (WebKit::WebIDBServerConnection::didBeginTransaction):
300         (WebKit::WebIDBServerConnection::commitTransaction):
301         (WebKit::WebIDBServerConnection::didCommitTransaction):
302         (WebKit::WebIDBServerConnection::resetTransaction):
303         (WebKit::WebIDBServerConnection::didResetTransaction):
304         (WebKit::WebIDBServerConnection::rollbackTransaction):
305         (WebKit::WebIDBServerConnection::didRollbackTransaction):
306         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
307         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
308
309         It travels from the WebProcess to the DatabaseProcess connection:
310         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
311         (WebKit::DatabaseProcessIDBConnection::beginTransaction):
312         (WebKit::DatabaseProcessIDBConnection::commitTransaction):
313         (WebKit::DatabaseProcessIDBConnection::resetTransaction):
314         (WebKit::DatabaseProcessIDBConnection::rollbackTransaction):
315         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
316         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
317
318         It travels from the connection to the appropriate UniqueIDBDatabase:
319         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
320         (WebKit::UniqueIDBDatabase::openTransaction):
321         (WebKit::UniqueIDBDatabase::beginTransaction):
322         (WebKit::UniqueIDBDatabase::commitTransaction):
323         (WebKit::UniqueIDBDatabase::resetTransaction):
324         (WebKit::UniqueIDBDatabase::rollbackTransaction):
325         (WebKit::UniqueIDBDatabase::postTransactionOperation):
326         (WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
327         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
328         (WebKit::UniqueIDBDatabase::beginBackingStoreTransaction):
329         (WebKit::UniqueIDBDatabase::commitBackingStoreTransaction):
330         (WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
331         (WebKit::UniqueIDBDatabase::rollbackBackingStoreTransaction):
332         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
333
334         The UniqueIDBDatabase object performs the operation with the backing store:
335         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
336         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
337         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
338         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::beginTransaction):
339         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::commitTransaction):
340         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::resetTransaction):
341         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
342         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
343
344         And the SQLite backing store calls the appropriate method on the SQLite transaction:
345         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
346         (WebKit::SQLiteIDBTransaction::begin): Stubbed for now.
347         (WebKit::SQLiteIDBTransaction::commit): Ditto.
348         (WebKit::SQLiteIDBTransaction::reset): Ditto.
349         (WebKit::SQLiteIDBTransaction::rollback): Ditto.
350         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
351
352 2013-12-16  Ryuan Choi  <ryuan.choi@samsung.com>
353
354         Unreviewed build fix on EFL port after r160653
355
356         Rename WebData to API::Data
357
358         * CMakeLists.txt: Added APIData.cpp to include list.
359         * UIProcess/WebPageProxy.cpp:
360         (WebKit::WebPageProxy::sessionStateData):
361         (WebKit::WebPageProxy::restoreFromSessionStateData):
362         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
363         (WebKit::WebSoupRequestManagerProxy::didHandleURIRequest):
364         (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequestData):
365         (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest):
366         * UIProcess/soup/WebSoupRequestManagerProxy.h:
367
368 2013-12-16  Tim Horton  <timothy_horton@apple.com>
369
370         WKView.magnification should include magnification due to the active gesture
371         https://bugs.webkit.org/show_bug.cgi?id=125813
372
373         Reviewed by Simon Fraser.
374
375         Make WKView.magnification respect active pinch-zoom gestures.
376
377         * UIProcess/API/mac/WKView.mm:
378         (-[WKView magnification]):
379         If we have a ViewGestureController, defer to it for the current magnification.
380
381         * UIProcess/mac/ViewGestureController.cpp:
382         (WebKit::ViewGestureController::magnification):
383         Return either the current pinch-zoom magnification, if we're in the middle of a gesture,
384         or the pageScaleFactor, if we're not.
385
386         * UIProcess/mac/ViewGestureController.h:
387
388 2013-12-16  Benjamin Poulain  <bpoulain@apple.com>
389
390         [WK2] Remove the constraint that highlight rects must be smaller than the scrollview bounds
391         https://bugs.webkit.org/show_bug.cgi?id=125812
392
393         Reviewed by Dan Bernstein.
394
395         Currently, _scrollView is never set on WKInteractionView and all highlight rects are discarded.
396
397         Eventually, the constraint rect should be computed from the useful area of ScrollView and the scale
398         of the document. In the meantime, the constraint code is just causing troubles.
399
400         The issue is tracked by <rdar://problem/15673655>.
401
402         * UIProcess/API/ios/WKInteractionView.mm:
403         (-[WKInteractionView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
404
405 2013-12-16  Simon Fraser  <simon.fraser@apple.com>
406
407         Apply overhang shadow and linen to UI-side layers
408         https://bugs.webkit.org/show_bug.cgi?id=125807
409
410         Reviewed by Tim Horton.
411
412         With UI-side compositing, we need to apply the overhang shadow and linen
413         background to layers in the UI process. Achieve this by setting a "custom
414         appearance" flag on layers that need a shadow or linen background, and
415         migrating this flag to the UI process. Static functions on ScrollbarThemeMac
416         are exposed to do the actual setting.
417
418         * Shared/mac/RemoteLayerTreePropertyApplier.mm:
419         (WebKit::updateCustomAppearance): Use ScrollbarThemeMac to update the
420         appearance.
421         (WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
422         * Shared/mac/RemoteLayerTreeTransaction.h:
423         * Shared/mac/RemoteLayerTreeTransaction.mm:
424         (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
425         (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
426         (WebKit::dumpChangedLayers):
427         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
428         (PlatformCALayerRemote::setBounds): If the bounds change, also set the
429         CustomAppearanceChanged bit so that the UI side updates the shadow bounds
430         (done here because the UI side is not stateful).
431         (PlatformCALayerRemote::requiresCustomAppearanceUpdateOnBoundsChange):
432         (PlatformCALayerRemote::customAppearance):
433         (PlatformCALayerRemote::updateCustomAppearance):
434         * WebProcess/WebPage/mac/PlatformCALayerRemote.h:
435
436 2013-12-16  Brady Eidson  <beidson@apple.com>
437
438         DatabaseProcess: Implement openTransaction()
439         https://bugs.webkit.org/show_bug.cgi?id=125794
440
441         Reviewed by Darin Adler.
442
443         This patch hooks up all of the necessary infrastructure to open a uniquely
444         identified transaction in the DatabaseProcess backing store.
445
446         The transaction itself is not yet functional.
447
448         Add openTransaction messaging to the WebProcess side:
449         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
450         (WebKit::WebIDBServerConnection::isClosed):
451         (WebKit::WebIDBServerConnection::getOrEstablishIDBDatabaseMetadata):
452         (WebKit::WebIDBServerConnection::didGetOrEstablishIDBDatabaseMetadata):
453         (WebKit::WebIDBServerConnection::openTransaction):
454         (WebKit::WebIDBServerConnection::didOpenTransaction):
455         (WebKit::WebIDBServerConnection::deleteObjectStore):
456         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
457         * WebProcess/Databases/IndexedDB/WebIDBServerConnection.messages.in:
458
459         Add openTransaction messaging to the DatabaseProcess side:
460         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
461         (WebKit::DatabaseProcessIDBConnection::openTransaction):
462         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
463         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
464
465         Add a hashable identifier that represents a connection/transactionID pair:
466         * DatabaseProcess/IndexedDB/IDBTransactionIdentifier.h: Added.
467         (WebKit::IDBTransactionIdentifier::IDBTransactionIdentifier):
468         (WebKit::IDBTransactionIdentifier::isolatedCopy):
469         (WebKit::IDBTransactionIdentifier::isEmpty):
470         (WebKit::IDBTransactionIdentifier::hash):
471         (WebKit::IDBTransactionIdentifier::operator==):
472         (WebKit::IDBTransactionIdentifier::isHashTableDeletedValue):
473         (WebKit::IDBTransactionIdentifierHash::hash):
474         (WebKit::IDBTransactionIdentifierHash::equal):
475         (WebKit::IDBTransactionIdentifierHashTraits::isEmptyValue):
476
477         Allow that identifier to be cross-thread copied:
478         * Shared/WebCrossThreadCopier.cpp:
479         (WebCore::::copy):
480         * Shared/WebCrossThreadCopier.h:
481
482         Ask the backing store to open this uniquely identified transaction:
483         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
484         (WebKit::UniqueIDBDatabase::openTransaction):
485         (WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
486         (WebKit::UniqueIDBDatabase::didOpenBackingStoreTransaction):
487         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
488
489         Add the backing store implementation for opening a transaction:
490         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
491         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
492         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
493         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::establishTransaction):
494         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
495
496         Object to represent the backing store transaction itself, to be used in future patches:
497         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
498         (WebKit::SQLiteIDBTransaction::SQLiteIDBTransaction):
499         * DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:
500         (WebKit::SQLiteIDBTransaction::create):
501         (WebKit::SQLiteIDBTransaction::identifier):
502
503         * WebKit2.xcodeproj/project.pbxproj:
504
505 2013-12-16  Anders Carlsson  <andersca@apple.com>
506
507         Fix crash when trying to load a null HTML string
508         https://bugs.webkit.org/show_bug.cgi?id=125801
509
510         Reviewed by Dan Bernstein.
511
512         * WebProcess/WebPage/WebPage.cpp:
513         (WebKit::WebPage::loadString):
514         Check that the string is not null before calling is8Bit(). Also, Use the latin1 encoding for
515         8-bit strings, since Latin 1 strings are not necessarily valid UTF-8 strings.
516
517 2013-12-16  Dan Bernstein  <mitz@apple.com>
518
519         [Cocoa] Expose whether the page contains only secure content
520         https://bugs.webkit.org/show_bug.cgi?id=125758
521
522         Reviewed by Anders Carlsson.
523
524         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
525         (-[WKBrowsingContextController hasOnlySecureContent]): Added a getter that calls
526         PageLoadState::hasOnlySecureContent.
527         * UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h: Declared new property.
528
529         * UIProcess/PageLoadState.cpp:
530         (WebKit::PageLoadState::commitChanges): Notify observers of hasOnlySecureContent() changes.
531         (WebKit::PageLoadState::reset): Reset hasInsecureContent in the uncommitted state.
532         (WebKit::PageLoadState::hasOnlySecureContent): Added. Returns true if there is no insecure
533         content and the URL is an HTTPS URL.
534         (WebKit::PageLoadState::didCommitLoad): Set hasInsecureContent to false in the uncommitted
535         state.
536         (WebKit::PageLoadState::didDisplayOrRunInsecureContent): Set hasInsecureContent to true in
537         the uncommitted state.
538         * UIProcess/PageLoadState.h:
539         (WebKit::PageLoadState::Data::Data): Added hasInsecureContent member.
540
541         * UIProcess/WebPageProxy.cpp:
542         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame): Call
543         PageLoadState::didDisplayOrRunInsecureContent and commit the change before calling out to
544         the client.
545         (WebKit::WebPageProxy::didRunInsecureContentForFrame): Ditto.
546
547 2013-12-16  Benjamin Poulain  <bpoulain@apple.com>
548
549         [WK2] The NetworkProcess tries to load SecItemShim.dylib on iOS
550         https://bugs.webkit.org/show_bug.cgi?id=125800
551
552         Reviewed by Dan Bernstein.
553
554         Give the NetworkService its own Info.plist configured without the Shim.
555
556         * Configurations/NetworkService.xcconfig:
557         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist.
558         * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist: Renamed from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist.
559         * WebKit2.xcodeproj/project.pbxproj:
560
561 2013-12-16  Brady Eidson  <beidson@apple.com>
562
563         DatabaseProcess: Fix a few bugs with opening an IDB connection
564         https://bugs.webkit.org/show_bug.cgi?id=125798
565
566         Reviewed by Alexey Proskuryakov.
567
568         Database metadata always needs a non-zero database identifier, unique at runtime.
569
570         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
571         (WebKit::generateDatabaseId):
572         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
573
574 2013-12-16  Anders Carlsson  <andersca@apple.com>
575
576         UserData should encode and decode API::Data objects
577         https://bugs.webkit.org/show_bug.cgi?id=125799
578
579         Reviewed by Beth Dakin.
580
581         * Shared/APIData.cpp: Added.
582         (API::Data::encode):
583         (API::Data::decode):
584         * Shared/APIData.h:
585         * Shared/UserData.cpp:
586         (WebKit::UserData::encode):
587         (WebKit::UserData::decode):
588         * WebKit2.xcodeproj/project.pbxproj:
589
590 2013-12-16  Anders Carlsson  <andersca@apple.com>
591
592         Rename WebData to API::Data
593         https://bugs.webkit.org/show_bug.cgi?id=125797
594
595         Reviewed by Beth Dakin.
596
597         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
598         (-[WKRemoteObjectEncoder encodeBytes:length:forKey:]):
599         (-[WKRemoteObjectDecoder decodeBytesForKey:returnedLength:]):
600         * Shared/API/c/WKData.cpp:
601         (WKDataGetTypeID):
602         (WKDataCreate):
603         * Shared/API/c/WKSharedAPICast.h:
604         * Shared/API/c/mac/WKWebArchive.cpp:
605         (WKWebArchiveCopyData):
606         * Shared/API/c/mac/WKWebArchiveResource.cpp:
607         (WKWebArchiveResourceCopyData):
608         * Shared/APIData.h: Renamed from Source/WebKit2/Shared/WebData.h.
609         (API::Data::createWithoutCopying):
610         (API::Data::create):
611         (API::Data::~Data):
612         (API::Data::bytes):
613         (API::Data::size):
614         (API::Data::dataReference):
615         (API::Data::Data):
616         (API::Data::fastFreeBytes):
617         * Shared/Cocoa/WKNSData.h:
618         (WebKit::wrapper):
619         * Shared/Cocoa/WKNSData.mm:
620         (-[WKNSData dealloc]):
621         * Shared/UserMessageCoders.h:
622         (WebKit::UserMessageEncoder::baseEncode):
623         (WebKit::UserMessageDecoder::baseDecode):
624         * Shared/WebArchive.cpp:
625         (WebKit::WebArchive::create):
626         (WebKit::WebArchive::WebArchive):
627         (WebKit::WebArchive::data):
628         * Shared/WebArchive.h:
629         * Shared/WebArchiveResource.cpp:
630         (WebKit::WebArchiveResource::create):
631         (WebKit::WebArchiveResource::WebArchiveResource):
632         (WebKit::WebArchiveResource::data):
633         * Shared/WebArchiveResource.h:
634         * UIProcess/API/C/WKPage.cpp:
635         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
636         (-[WKBrowsingContextController loadData:MIMEType:textEncodingName:baseURL:userData:]):
637         * UIProcess/API/mac/WKPrintingView.mm:
638         (pageDidDrawToPDF):
639         * UIProcess/Downloads/DownloadProxy.cpp:
640         (WebKit::createData):
641         (WebKit::DownloadProxy::didFail):
642         (WebKit::DownloadProxy::didCancel):
643         * UIProcess/Downloads/DownloadProxy.h:
644         (WebKit::DownloadProxy::resumeData):
645         * UIProcess/WebPageProxy.cpp:
646         (WebKit::WebPageProxy::loadData):
647         (WebKit::WebPageProxy::loadWebArchiveData):
648         (WebKit::WebPageProxy::dataCallback):
649         (WebKit::WebPageProxy::saveDataToFileInDownloadsFolder):
650         (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder):
651         * UIProcess/WebPageProxy.h:
652         * UIProcess/WebUIClient.cpp:
653         (WebKit::WebUIClient::saveDataToFileInDownloadsFolder):
654         * UIProcess/WebUIClient.h:
655         * UIProcess/cf/WebPageProxyCF.cpp:
656         (WebKit::WebPageProxy::sessionStateData):
657         (WebKit::WebPageProxy::restoreFromSessionStateData):
658         * WebKit2.xcodeproj/project.pbxproj:
659         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
660         (WKBundleCreateWKDataFromUInt8Array):
661         * WebProcess/InjectedBundle/InjectedBundle.cpp:
662         (WebKit::InjectedBundle::createWebDataFromUint8Array):
663         * WebProcess/InjectedBundle/InjectedBundle.h:
664         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
665         (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange):
666         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
667         (WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
668         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
669         * WebProcess/WebPage/WebPage.cpp:
670         (WebKit::WebPage::loadDataImpl):
671
672 2013-12-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
673
674         Fix build warning in files including DrawingAreaProxy.h
675         https://bugs.webkit.org/show_bug.cgi?id=125778
676
677         Reviewed by Anders Carlsson.
678
679         Remove unused parameters from method declaration.
680
681         * UIProcess/DrawingAreaProxy.h:
682         (WebKit::DrawingAreaProxy::adjustTransientZoom):
683         (WebKit::DrawingAreaProxy::commitTransientZoom):
684
685 2013-12-16  Carlos Garcia Campos  <cgarcia@igalia.com>
686
687         Unreviewed. Fix GTK+ build after r160549.
688
689         * GNUmakefile.am: Fix the include paths to make sure we include
690         the WebKit2 config.h file when building libWebKit2Platform.
691
692 2013-12-16  Sergio Villar Senin  <svillar@igalia.com>
693
694         [GTK] can't build from trunk: WebKitCookieManager: 'WebString' was not declared in this scope
695         https://bugs.webkit.org/show_bug.cgi?id=125759
696
697         Reviewed by Carlos Garcia Campos.
698
699         Renamed WebString to API::String after r160608.
700
701         * UIProcess/API/gtk/WebKitCookieManager.cpp:
702         (webkitCookieManagerGetDomainsWithCookiesCallback):
703         * UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
704         (webkit_file_chooser_request_get_mime_types):
705         (webkit_file_chooser_request_get_mime_types_filter):
706         (webkit_file_chooser_request_get_selected_files):
707         * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:
708         (webkit_form_submission_request_get_text_fields):
709         * UIProcess/API/gtk/WebKitWebContext.cpp:
710         (webkit_web_context_set_web_extensions_directory):
711         (webkit_web_context_prefetch_dns):
712         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
713         (toAPIArray):
714         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
715         (webkitWebExtensionDidReceiveMessage):
716
717 2013-12-15  Tim Horton  <timothy_horton@apple.com>
718
719         WebKit2 View Gestures: Can't pinch in past the maximum scale
720         https://bugs.webkit.org/show_bug.cgi?id=125749
721
722         Reviewed by Anders Carlsson.
723
724         Pinching in past the maximum scale should result in the zoom resisting, but continuing.
725
726         * UIProcess/mac/ViewGestureController.cpp:
727         (WebKit::resistanceForDelta):
728         Clean up the logic and apply resistance to pinching in past the maximum.
729
730         (WebKit::ViewGestureController::handleMagnificationGesture):
731         (WebKit::ViewGestureController::endMagnificationGesture):
732         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
733         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
734
735 2013-12-15  Dan Bernstein  <mitz@apple.com>
736
737         [Cocoa] Expose the certificate chain for the main frame
738         https://bugs.webkit.org/show_bug.cgi?id=125760
739
740         Reviewed by Sam Weinig.
741
742         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Declared certificateChain property.
743         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
744         (-[WKBrowsingContextController certificateChain]): Added this getter, which calls through
745         to WebFrameProxy::certificateInfo.
746
747 2013-12-15  Andy Estes  <aestes@apple.com>
748
749         [iOS] Upstream changes to FeatureDefines.xcconfig
750         https://bugs.webkit.org/show_bug.cgi?id=125742
751
752         Reviewed by Dan Bernstein.
753
754         * Configurations/FeatureDefines.xcconfig:
755
756 2013-12-15  Dan Bernstein  <mitz@apple.com>
757
758         Build fix for 32-bit clients.
759
760         * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h:
761
762 2013-12-15  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
763
764         Unreviewed EFL build fix after r160608.
765
766         * UIProcess/WebGrammarDetail.cpp:
767         (WebKit::WebGrammarDetail::WebGrammarDetail):
768         (WebKit::WebGrammarDetail::guesses):
769         * UIProcess/WebTextCheckerClient.cpp:
770         (WebKit::WebTextCheckerClient::guessesForWord):
771
772 2013-12-14  Yongjun Zhang  <yongjun_zhang@apple.com>
773
774         Add page load delegate for WebProcessPlugInBrowsingContextController.
775         https://bugs.webkit.org/show_bug.cgi?id=125697
776
777         Add page load delegate for WebProcessPlugInBrowsingContextController so that a
778         WebProcess injected bundle can listen to page load events.
779
780         Reviewed by Sam Weinig.
781
782         * WebKit2.xcodeproj/project.pbxproj:
783         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h: Added.
784         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
785         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
786         (didStartProvisionalLoadForFrame):
787         (didFinishLoadForFrame):
788         (globalObjectIsAvailableForFrame):
789         (setUpPageLoaderClient):
790         (-[WKWebProcessPlugInBrowserContextController loadDelegate]):
791         (-[WKWebProcessPlugInBrowserContextController setLoadDelegate:]):
792
793 2013-12-14  Dan Bernstein  <mitz@apple.com>
794
795         [iOS] Implement NetworkProcess::allowSpecificHTTPSCertificateForHost
796         https://bugs.webkit.org/show_bug.cgi?id=125744
797
798         Reviewed by Sam Weinig.
799
800         * NetworkProcess/ios/NetworkProcessIOS.mm:
801         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost): Implemented by calling
802         +[NSURLRequest setAllowsSpecificHTTPSCertificate:forHost:].
803
804 2013-12-13  Sam Weinig  <sam@webkit.org>
805
806         [WK2] Rename WebString to API::String
807         https://bugs.webkit.org/show_bug.cgi?id=125726
808
809         Reviewed by Anders Carlsson.
810
811         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
812         * Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
813         * Shared/API/c/WKPluginInformation.cpp:
814         * Shared/API/c/WKSharedAPICast.h:
815         * Shared/API/c/WKString.cpp:
816         * Shared/API/c/cf/WKStringCF.mm:
817         * Shared/APIArray.cpp:
818         * Shared/APIArray.h:
819         * Shared/APIString.h: Copied from Source/WebKit2/Shared/WebString.h.
820         * Shared/Cocoa/WKNSString.h:
821         * Shared/Cocoa/WKNSString.mm:
822         * Shared/ImmutableDictionary.cpp:
823         * Shared/Plugins/Netscape/PluginInformation.cpp:
824         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
825         * Shared/UserData.cpp:
826         * Shared/UserMessageCoders.h:
827         * Shared/WebArchiveResource.h:
828         * Shared/WebOpenPanelParameters.cpp:
829         * Shared/WebRenderLayer.cpp:
830         * Shared/WebRenderObject.cpp:
831         * Shared/WebString.h: Removed.
832         * UIProcess/API/C/WKCredential.cpp:
833         * UIProcess/API/C/WKDatabaseManager.cpp:
834         * UIProcess/API/C/WKPage.cpp:
835         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
836         * UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
837         * UIProcess/APINavigationData.h:
838         * UIProcess/Authentication/WebCredential.h:
839         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
840         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
841         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
842         * UIProcess/WebContext.cpp:
843         * UIProcess/WebDatabaseManagerProxy.cpp:
844         * UIProcess/WebFormClient.cpp:
845         * UIProcess/WebLoaderClient.cpp:
846         * UIProcess/WebPageGroup.cpp:
847         * UIProcess/WebUIClient.cpp:
848         * WebKit2.xcodeproj/project.pbxproj:
849         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
850         * WebProcess/InjectedBundle/InjectedBundle.cpp:
851         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
852         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
853         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
854         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
855
856 2013-12-14  Andy Estes  <aestes@apple.com>
857
858         Unify FeatureDefines.xcconfig
859         https://bugs.webkit.org/show_bug.cgi?id=125741
860
861         Rubber-stamped by Dan Bernstein.
862
863         * Configurations/FeatureDefines.xcconfig: Remove a space in
864         FEATURE_DEFINES and fix a typo in ENABLE_CSS3_TEXT_DECORATION.
865
866 2013-12-14  Dan Bernstein  <mitz@apple.com>
867
868         iOS build fix.
869
870         * UIProcess/API/Cocoa/WKBrowsingContextController.h: Declared
871         observedRenderingProgressEvents as nonatomic.
872
873 2013-12-14  Dan Bernstein  <mitz@apple.com>
874
875         [Cocoa] Expose WebContext::allowSpecificHTTPSCertificateForHost
876         https://bugs.webkit.org/show_bug.cgi?id=125738
877
878         Reviewed by Mark Rowe.
879
880         * UIProcess/API/Cocoa/WKProcessGroup.mm:
881         (-[WKProcessGroup _setAllowsSpecificHTTPSCertificate:forHost:]): Added. Calls through to
882         WebContext::allowSpecificHTTPSCertificateForHost.
883         * UIProcess/API/Cocoa/WKProcessGroupPrivate.h: Declared new method.
884
885 2013-12-14  Dan Bernstein  <mitz@apple.com>
886
887         [Cocoa] Expose some layout milestones
888         https://bugs.webkit.org/show_bug.cgi?id=125721
889
890         Reviewed by Sam Weinig.
891
892         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
893         (WKRenderingProgressEvents): Declared new enum.
894         (@interface WKBrowsingContextController): Declared new observedRenderingProgressEvents
895         property.
896         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
897         (layoutMilestones): Added helper to translate rendering progress events into layout
898         milestones.
899         (-[WKBrowsingContextController setObservedRenderingProgressEvents:]): Added this setter.
900         Sets the ivar and calls WebPageProxy::listenForLayoutMilestones.
901         (renderingProgressEvents): Added helper to translate layout milestones into rendering
902         progress events.
903         (didLayout): Implemented this WKPageLoaderClient callback by calling the load delegate.
904         (setUpPageLoaderClient): Set the above callback in the client structure.
905         * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegate.h: Declared new delegate method.
906
907 2013-12-14  Dan Bernstein  <mitz@apple.com>
908
909         Clarify Owners’ role
910         https://bugs.webkit.org/show_bug.cgi?id=125739
911
912         Reviewed by Anders Carlsson.
913
914         * Owners: Clarify that a patch authored by an Owner does not have to be reviewed by one, as
915         decided during the 2013 WebKit Contributors Meeting.
916
917 2013-12-13  Benjamin Poulain  <bpoulain@apple.com>
918
919         [WK2] Fix the build and enable the NetworkProcess by default on iOS
920         https://bugs.webkit.org/show_bug.cgi?id=125723
921
922         Reviewed by Sam Weinig.
923
924         * Configurations/WebKit2.xcconfig:
925         Fix the list of excluded file to get the processes building.
926
927         * NetworkProcess/ios/NetworkProcessIOS.mm:
928         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHosAt):
929         Update PlatformCertificateInfo->CertificateInfo match the new name after r159647.
930
931         * UIProcess/API/Cocoa/WKProcessGroup.mm:
932         (-[WKProcessGroup initWithInjectedBundleURL:]):
933         Enable the NetworkProcess by default.
934
935         * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
936         (WebKit::shouldUseXPC):
937         Use the right macro.
938
939         * WebKit2Prefix.h:
940         Eanble the flags NETWORK_PROCESS and CUSTOM_PROTOCOLS.
941
942 2013-12-13  Dan Bernstein  <mitz@apple.com>
943
944         Demoted ActivityAssertion.h to a project header.
945
946         Rubber-stamped by Sam Weinig.
947
948         * WebKit2.xcodeproj/project.pbxproj:
949
950 2013-12-13  Sam Weinig  <sam@webkit.org>
951
952         [WK2] Start removing calls to String::characters()
953         https://bugs.webkit.org/show_bug.cgi?id=125699
954
955         Reviewed by Anders Carlsson.
956
957         * Shared/mac/WebCoreArgumentCodersMac.mm:
958         (CoreIPC::::decodePlatformData):
959         * UIProcess/Plugins/PluginInfoStore.cpp:
960         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
961         (WebKit::PluginInfoStore::findPlugin):
962         * UIProcess/Plugins/PluginInfoStore.h:
963         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
964         (WebKit::PluginInfoStore::pluginsDirectories):
965         (WebKit::PluginInfoStore::pluginPathsInDirectory):
966         * UIProcess/cf/WebPreferencesCF.cpp:
967         (WebKit::makeKey):
968         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
969         (WebKit::InjectedBundle::load):
970         * WebProcess/WebPage/WebPage.cpp:
971         (WebKit::WebPage::loadStringImpl):
972         (WebKit::WebPage::loadHTMLString):
973         (WebKit::WebPage::loadAlternateHTMLString):
974         (WebKit::WebPage::loadPlainTextString):
975         (WebKit::WebPage::loadWebArchiveData):
976         * WebProcess/WebPage/WebPage.h:
977
978 2013-12-13  Enrica Casucci  <enrica@apple.com>
979
980         WK2: Add support for inline candidates on iOS.
981         https://bugs.webkit.org/show_bug.cgi?id=125667
982
983         Reviewed by Benjamin Poulain.
984
985         The state required to support inline candidates is cached in the UI process.
986         Asynchronous messages are used to set and confirm the composition.
987
988         * Shared/EditorState.cpp:
989         (WebKit::EditorState::encode):
990         (WebKit::EditorState::decode):
991         * Shared/EditorState.h:
992         * UIProcess/API/ios/WKInteractionView.mm:
993         (-[WKInteractionView textFirstRect]):
994         (-[WKInteractionView textLastRect]):
995         (-[WKInteractionView hasMarkedText]):
996         (-[WKInteractionView markedText]):
997         (-[WKInteractionView setMarkedText:selectedRange:]):
998         (-[WKInteractionView unmarkText]):
999         (-[WKInteractionView _selectionChanged]):
1000         * UIProcess/WebPageProxy.cpp:
1001         (WebKit::WebPageProxy::editorStateChanged):
1002         * UIProcess/WebPageProxy.h:
1003         * UIProcess/WebPageProxy.messages.in:
1004         * UIProcess/ios/WebPageProxyIOS.mm:
1005         (WebKit::WebPageProxy::setComposition):
1006         (WebKit::WebPageProxy::confirmComposition):
1007         (WebKit::WebPageProxy::notifyRevealedSelection):
1008         * WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
1009         (WebKit::WebChromeClient::notifyRevealedSelectionByScrollingFrame):
1010         * WebProcess/WebPage/WebPage.cpp:
1011         (WebKit::WebPage::editorState):
1012         * WebProcess/WebPage/WebPage.h:
1013         * WebProcess/WebPage/WebPage.messages.in:
1014         * WebProcess/WebPage/ios/WebPageIOS.mm:
1015         (WebKit::WebPage::setComposition):
1016         (WebKit::WebPage::confirmComposition):
1017
1018 2013-12-13  Anders Carlsson  <andersca@apple.com>
1019
1020         Fix the build.
1021
1022         Work around a problem in Functional.h by making the DatabaseProcess destructor public.
1023
1024         * DatabaseProcess/DatabaseProcess.h:
1025
1026 2013-12-13  Tim Horton  <timothy_horton@apple.com>
1027
1028         [wk2] Handle pinch-to-zoom gesture
1029         https://bugs.webkit.org/show_bug.cgi?id=125604
1030
1031         Reviewed by Sam Weinig.
1032
1033         * UIProcess/API/mac/WKView.mm:
1034         (-[WKView magnifyWithEvent:]):
1035         (-[WKView endGestureWithEvent:]):
1036         Forward the event up the chain if we're not going to handle it.
1037
1038 2013-12-12  Anders Carlsson  <andersca@apple.com>
1039
1040         Put classes in the IPC directory in the IPC namespace
1041         https://bugs.webkit.org/show_bug.cgi?id=125665
1042
1043         Reviewed by Sam Weinig.
1044
1045         Also add a hack to config.h that lets us use CoreIPC and IPC interchangeably.
1046         
1047         * Platform/IPC/DataReference.cpp:
1048         * Platform/IPC/DataReference.h:
1049         * Platform/IPC/MessageSender.cpp:
1050         * Platform/IPC/MessageSender.h:
1051         * Platform/IPC/StringReference.cpp:
1052         * Platform/IPC/StringReference.h:
1053         * config.h:
1054
1055 2013-12-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1056
1057         [GTK] Add a unit tests to WebKit2 to test node names
1058         https://bugs.webkit.org/show_bug.cgi?id=125686
1059
1060         Reviewed by Gustavo Noronha Silva.
1061
1062         * UIProcess/API/gtk/tests/DOMNodeTest.cpp:
1063         (WebKitDOMNodeTest::testTagNames):
1064         (WebKitDOMNodeTest::runTest):
1065         (registerTests):
1066         * UIProcess/API/gtk/tests/TestDOMNode.cpp:
1067         (testWebKitDOMNodeTagNames):
1068         (beforeAll):
1069
1070 2013-12-13  Zan Dobersek  <zdobersek@igalia.com>
1071
1072         Unreviewed. Further GTK WK2 build fixes after r160504.
1073
1074         * UIProcess/API/gtk/WebKitWebView.cpp:
1075         (webkit_web_view_get_snapshot):
1076         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1077         (didInitiateLoadForResource):
1078         (willSendRequestForFrame):
1079         (didReceiveResponseForResource):
1080         (didReceiveContentLengthForResource):
1081         (didFinishLoadForResource):
1082         (didFailLoadForResource):
1083         (webkitWebPageDidReceiveMessage):
1084
1085 2013-12-13  Zan Dobersek  <zdobersek@igalia.com>
1086
1087         Unreviewed GTK build fix after r160509.
1088
1089         * GNUmakefile.list.am: MessageSender.(cpp|h) files were moved to Platform/IPC.
1090
1091 2013-12-13  Dániel Bátyai  <Batyai.Daniel@stud.u-szeged.hu>
1092
1093         GTK buildfix after r160504.
1094
1095         Reviewed by Csaba Osztrogonác.
1096
1097         * UIProcess/API/gtk/WebKitWebContext.cpp:
1098         (webkit_web_context_prefetch_dns):
1099
1100 2013-12-12  Yongjun Zhang  <yongjun_zhang@apple.com>
1101
1102         Need ObjC APIs for some InjectedBundle classes.
1103         https://bugs.webkit.org/show_bug.cgi?id=125600
1104
1105         Add ObjC API classes for WebFrame, InjectedBundleScriptWorld, InjectedBundleHitTestResult and InjectedBundleNodeHandle.
1106
1107         Reviewed by Dan Bernstein.
1108
1109         * Shared/Cocoa/APIObject.mm: creates API wrapper for WebFrame, InjectedBundleScriptWorld, InjectedBundleHitTestResult
1110              and InjectedBundleNodeHandle.
1111         (API::Object::newObject):
1112         * WebKit2.xcodeproj/project.pbxproj:
1113         * WebProcess/InjectedBundle/API/Cocoa: Added.
1114         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h: Added.
1115         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm: Added.
1116         (-[WKWebProcessPlugInFrame dealloc]):
1117         (-[WKWebProcessPlugInFrame jsContextForWorld:]): returns the JSContextRef for a ScriptWorld in frame.
1118         (-[WKWebProcessPlugInFrame hitTest:]): returns hitTestResult (with API type) from a hitTest.
1119         (-[WKWebProcessPlugInFrame jsWrapperForNodeHandle:inWorld:]):
1120         (-[WKWebProcessPlugInFrame API::]):
1121         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrameInternal.h: Added.
1122         (WebKit::wrapper):
1123         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h: Added.
1124         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm: Added.
1125         (-[WKWebProcessPlugInHitTestResult dealloc]):
1126         (-[WKWebProcessPlugInHitTestResult nodeHandle]):
1127         (-[WKWebProcessPlugInHitTestResult API::]):
1128         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResultInternal.h: Added.
1129         (WebKit::wrapper):
1130         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h: Added.
1131         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm: Added.
1132         (-[WKWebProcessPlugInNodeHandle dealloc]):
1133         (-[WKWebProcessPlugInNodeHandle API::]):
1134         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h: Added.
1135         (WebKit::wrapper):
1136         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h: Added.
1137         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm: Added.
1138         (+[WKWebProcessPlugInScriptWorld world]): returns a new isolated world.
1139         (+[WKWebProcessPlugInScriptWorld normalWorld]): returns the mainThread normal world. 
1140         (-[WKWebProcessPlugInScriptWorld dealloc]):
1141         (-[WKWebProcessPlugInScriptWorld API::]):
1142         * WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorldInternal.h: Added.
1143         (WebKit::wrapper):
1144
1145 2013-12-12  Benjamin Poulain  <bpoulain@apple.com>
1146
1147         Fix unsafe memory load/store from the argument encoder/decoder affecting ARM
1148         https://bugs.webkit.org/show_bug.cgi?id=125674
1149
1150         Reviewed by Darin Adler.
1151
1152         Depending on the CPU and CPU config, load and store may have to be aligned.
1153         The argument buffer has no particular alignment which can cause problems.
1154
1155         In this case, on ARMv7, strd and ldrd can have alignment restriction on 16 bytes.
1156         The code encoding double and 64 bits integers was causing bugs.
1157
1158         To avoid problems, the encoders/decoders are modified to just use memcpy. The compiler optimizes
1159         it away for the right instructions (clang uses two ldr/str in the case of 64bits values on ARMv7).
1160
1161         * Platform/CoreIPC/ArgumentDecoder.cpp:
1162         (CoreIPC::decodeValueFromBuffer):
1163         (CoreIPC::ArgumentDecoder::decode):
1164         * Platform/CoreIPC/ArgumentEncoder.cpp:
1165         (CoreIPC::copyValueToBuffer):
1166         (CoreIPC::ArgumentEncoder::encode):
1167
1168 2013-12-12  Tim Horton  <timothy_horton@apple.com>
1169
1170         Build fix for 32-bit.
1171
1172         There was no reason for these to be CGFloat.
1173
1174         * UIProcess/mac/ViewGestureController.cpp:
1175
1176 2013-12-12  Tim Horton  <timothy_horton@apple.com>
1177
1178         [wk2] Handle pinch-to-zoom gesture
1179         https://bugs.webkit.org/show_bug.cgi?id=125604
1180
1181         Reviewed by Simon Fraser.
1182
1183         Add the concept of a "transient" zoom to DrawingArea, which is a zoom
1184         that affects the content, but does not cause repaint, as would be used
1185         for a live pinch-zoom gesture.
1186
1187         Add ViewGestureController, which currently only handles magnification 
1188         gestures, and keeps track of the current gesture's scale and origin, and
1189         forwards relevant events on to the DrawingArea via the transient zoom mechanism.
1190
1191         * DerivedSources.make:
1192         Add ViewGestureController to the list of message receivers.
1193
1194         * UIProcess/API/Cocoa/WKViewPrivate.h:
1195         Add shouldHandleMagnificationGesture property, which controls whether WKView will
1196         attempt to handle magnifyWithEvent:.
1197
1198         * UIProcess/API/mac/WKView.mm:
1199         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
1200         Fix a typo.
1201
1202         (-[WKView _ensureGestureController]):
1203         Create our ViewGestureController if it doesn't already exist.
1204
1205         (-[WKView setAllowsMagnification:]):
1206         (-[WKView allowsMagnification]):
1207         SPI to enable/disable handling the magnification gesture.
1208
1209         (-[WKView setMagnification:centeredAtPoint:]):
1210         (-[WKView setMagnification:]):
1211         (-[WKView magnification]):
1212         Adjust or retrieve the current page scale.
1213         The variant of setMagnification that does not take an origin uses the view's center.
1214
1215         (-[WKView magnifyWithEvent:]):
1216         (-[WKView endGestureWithEvent:]):
1217         Forward gesture methods to ViewGestureController.
1218
1219         * UIProcess/mac/ViewGestureController.cpp: Added.
1220         (WebKit::ViewGestureController::create):
1221         (WebKit::ViewGestureController::ViewGestureController):
1222         (WebKit::ViewGestureController::~ViewGestureController):
1223         (WebKit::resistanceForDelta):
1224         Compute a resistance factor, which makes it feel "hard" to zoom out past
1225         scale=1, and accelerates scaling out before you hit scale=1.
1226
1227         (WebKit::ViewGestureController::scaledMagnificationOrigin):
1228         Compute the origin of the magnification gesture with the transient zoom unapplied.
1229
1230         (WebKit::ViewGestureController::handleMagnificationGesture):
1231         The first magnification gesture will send a message to the WebProcess
1232         to retrieve the visible content rect. Subsequent gestures will
1233         hand the new magnification and origin to the DrawingArea to apply.
1234
1235         (WebKit::ViewGestureController::didBeginTransientZoom):
1236         Callback from the WebProcess, with the current visible content rect.
1237         Subsequent magnification gestures will forward the scale and origin to the DrawingArea.
1238         
1239         (WebKit::ViewGestureController::endMagnificationGesture):
1240         Commit the current transient scale as the actual page scale, which will cause
1241         a repaint and bring in all the tiles.
1242
1243         (WebKit::ViewGestureController::endActiveGesture):
1244         If we have an active gesture, call its end function.
1245
1246         * UIProcess/mac/ViewGestureController.h: Added.
1247         * UIProcess/mac/ViewGestureController.messages.in: Added.
1248
1249         * WebKit2.xcodeproj/project.pbxproj:
1250         Add new files.
1251
1252         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1253         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1254         (WebKit::TiledCoreAnimationDrawingArea::beginTransientZoom):
1255         Call back to ViewGestureController with the visibleContentRect.
1256
1257         (WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
1258         Scale and translate the RenderView's PlatformCALayer.
1259         Reaching into the layer tree like this is scary, we should consider
1260         teaching RenderLayerCompositor about transient zoom.
1261         Hide the content shadow layer for now.
1262
1263         (WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
1264         Clear our custom transform on the RenderView's layer, and
1265         change the actual page scale, causing a repaint.
1266         Un-hide the shadow layer.
1267
1268         * UIProcess/DrawingAreaProxy.h:
1269         (WebKit::DrawingAreaProxy::beginTransientZoom):
1270         (WebKit::DrawingAreaProxy::adjustTransientZoom):
1271         (WebKit::DrawingAreaProxy::commitTransientZoom):
1272         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
1273         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
1274         (WebKit::TiledCoreAnimationDrawingAreaProxy::beginTransientZoom):
1275         (WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
1276         (WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
1277         * WebProcess/WebPage/DrawingArea.h:
1278         (WebKit::DrawingArea::beginTransientZoom):
1279         (WebKit::DrawingArea::adjustTransientZoom):
1280         (WebKit::DrawingArea::commitTransientZoom):
1281         * WebProcess/WebPage/DrawingArea.messages.in:
1282         Generic plumbing for {begin, adjust, end}TransientZoom.
1283
1284 2013-12-12  Brady Eidson  <beidson@apple.com>
1285
1286         DatabaseProcess IndexedDB: Establish a metadata backing store on disk
1287         https://bugs.webkit.org/show_bug.cgi?id=125258
1288
1289         Reviewed by Alexey Proskuryakov, Anders Carlsson, and Tim Horton.
1290
1291         The DatabaseProcess already has an "Indexed Database path".
1292         Each SecurityOrigin with indexed databases will have a subdirectory under the path.
1293         Each indexed database will have a subdirectory under its SecurityOrigin's path.
1294         Inside that directory will exist (1) metadata database, and 0-N ObjectStore databases.
1295
1296         This patch establishes the directory structure and the (1) metadata database.
1297
1298         * DatabaseProcess/DatabaseProcess.cpp:
1299         (WebKit::DatabaseProcess::initializeDatabaseProcess): Asynchronously ensure the indexed database directory exists.
1300         (WebKit::DatabaseProcess::ensureIndexedDatabaseRelativePathExists): Allow anyone to make necessary directories relative to
1301           the indexed database directory.
1302         (WebKit::DatabaseProcess::ensurePathExists):
1303         (WebKit::DatabaseProcess::absoluteIndexedDatabasePathFromDatabaseRelativePath): Instead of exposing the indexed database directory, 
1304           give DatabaseProcess a method to allow others to compute a path relative to the indexed database directory.
1305         (WebKit::DatabaseProcess::postDatabaseTask):
1306         (WebKit::DatabaseProcess::performNextDatabaseTask):
1307         * DatabaseProcess/DatabaseProcess.h:
1308         (WebKit::DatabaseProcess::queue):
1309
1310         * DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
1311         (WebKit::DatabaseProcessIDBConnection::getOrEstablishIDBDatabaseMetadata):
1312
1313         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
1314         (WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
1315         (WebKit::UniqueIDBDatabase::filenameForDatabaseName):
1316         (WebKit::UniqueIDBDatabase::databaseFilenameIdentifier):
1317         (WebKit::UniqueIDBDatabase::canShareDatabases):
1318         (WebKit::UniqueIDBDatabase::shutdown): Method to cleanly shutdown a database, emptying its task and request queues.
1319         (WebKit::UniqueIDBDatabase::getOrEstablishIDBDatabaseMetadata):
1320         (WebKit::UniqueIDBDatabase::openBackingStoreAndReadMetadata): To be run on the database work queue, establishes a backing store
1321           and extracts metadata from it.
1322         (WebKit::UniqueIDBDatabase::didOpenBackingStoreAndReadMetadata): Callback once metadata from the backing store is ready for use.
1323         (WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
1324         (WebKit::UniqueIDBDatabase::postMainThreadTask): Add a main thread task for this database.
1325         (WebKit::UniqueIDBDatabase::performNextMainThreadTask):
1326         (WebKit::UniqueIDBDatabase::postDatabaseTask): Add a database queue task for this database.
1327         (WebKit::UniqueIDBDatabase::performNextDatabaseTask):
1328         * DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
1329
1330         Add a virtual backing store interface:
1331         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
1332         (WebKit::UniqueIDBDatabaseBackingStore::~UniqueIDBDatabaseBackingStore):
1333
1334         Add a SQLite implementation of that interface:
1335         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp: Added.
1336         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::UniqueIDBDatabaseBackingStoreSQLite):
1337         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::createAndPopulateInitialMetadata):
1338         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::extractExistingMetadata):
1339         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::openSQLiteDatabaseAtPath):
1340         (WebKit::UniqueIDBDatabaseBackingStoreSQLite::getOrEstablishMetadata):
1341         * DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
1342
1343         Add a general purpose asynchronous task that does cross thread copying:
1344         * Shared/AsyncTask.h: Added.
1345         (WebKit::AsyncTask::~AsyncTask):
1346         (WebKit::AsyncTask::AsyncTask):
1347         (WebKit::createAsyncTask):
1348
1349         Add more isolated copiers and introduce WebKit CrossThreadCopier specializations:
1350         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.cpp:
1351         (WebKit::UniqueIDBDatabaseIdentifier::isolatedCopy):
1352         * DatabaseProcess/IndexedDB/UniqueIDBDatabaseIdentifier.h:
1353
1354         * Shared/SecurityOriginData.cpp:
1355         (WebKit::SecurityOriginData::isolatedCopy):
1356         * Shared/SecurityOriginData.h:
1357
1358         * Shared/WebCrossThreadCopier.cpp:
1359         (WebCore::::copy):
1360         * Shared/WebCrossThreadCopier.h:
1361
1362         * WebKit2.xcodeproj/project.pbxproj:
1363
1364 2013-12-12  Chris Fleizach  <cfleizach@apple.com>
1365
1366         AX: HANG: virginamerica.com: Pressing the print button on the boarding pass page locks up VoiceOver and Safari.
1367         https://bugs.webkit.org/show_bug.cgi?id=125603
1368
1369         Reviewed by Anders Carlsson.
1370
1371         Allow the print dialog to spin its run loop while accessibility is enabled so that VoiceOver does not hang on the WebProcess.
1372
1373         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1374         (WebKit::WebChromeClient::print):
1375
1376 2013-12-12  Jaehun Lim  <ljaehun.lim@samsung.com>
1377
1378         Unreviewed CMake build fix after r160509
1379
1380         * CMakeLists.txt: Apply MessageSender's changes
1381
1382 2013-12-12  Dan Bernstein  <mitz@apple.com>
1383
1384         [Cocoa] Let the load delegate know when the Web process crashes
1385         https://bugs.webkit.org/show_bug.cgi?id=125660
1386
1387         Reviewed by Sam Weinig.
1388
1389         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1390         (processDidCrash):  Implemented this WKPageLoaderClient callback by calling the load
1391         delegate.
1392         (setUpPageLoaderClient): Set the above callback in the client structure
1393         * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h: Declare new delegate method.
1394
1395 2013-12-12  Anders Carlsson  <andersca@apple.com>
1396
1397         Move MessageSender to Platform/IPC.
1398
1399         Rubber-stamped by Andreas Kling.
1400
1401         * Platform/IPC/MessageSender.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/MessageSender.cpp.
1402         * Platform/IPC/MessageSender.h: Renamed from Source/WebKit2/Platform/CoreIPC/MessageSender.h.
1403         * WebKit2.xcodeproj/project.pbxproj:
1404
1405 2013-12-12  Anders Carlsson  <andersca@apple.com>
1406
1407         WebPageProxy should be a MessageSender
1408         https://bugs.webkit.org/show_bug.cgi?id=125654
1409
1410         Reviewed by Sam Weinig.
1411
1412         * Platform/CoreIPC/MessageSender.cpp:
1413         (CoreIPC::MessageSender::sendMessage):
1414         * Platform/CoreIPC/MessageSender.h:
1415         (CoreIPC::MessageSender::send):
1416         * Shared/ChildProcessProxy.h:
1417         * Shared/WebConnection.cpp:
1418         (WebKit::WebConnection::postMessage):
1419         * UIProcess/WebPageProxy.cpp:
1420         (WebKit::WebPageProxy::initializeWebPage):
1421         (WebKit::WebPageProxy::sendMessage):
1422         (WebKit::WebPageProxy::messageSenderConnection):
1423         (WebKit::WebPageProxy::messageSenderDestinationID):
1424         * UIProcess/WebPageProxy.h:
1425
1426 2013-12-12  Anders Carlsson  <andersca@apple.com>
1427
1428         Clean up dictionary handling a little
1429         https://bugs.webkit.org/show_bug.cgi?id=125644
1430
1431         Reviewed by Dan Bernstein.
1432
1433         Add a WKDictionaryCreate function as a first step towards eliminating WKMutableDictionaryRef,
1434         (in the same way we've eliminated WKMutableArrayRef). Also, rename adopt to create and make it take a Map by value
1435         so we can use std::move where appropriate.
1436
1437         * Shared/API/c/WKDictionary.cpp:
1438         (WKDictionaryCreate):
1439         * Shared/API/c/WKDictionary.h:
1440         * Shared/Cocoa/WKNSDictionary.mm:
1441         (-[WKNSDictionary copyWithZone:]):
1442         * Shared/ImmutableDictionary.cpp:
1443         (WebKit::ImmutableDictionary::create):
1444         (WebKit::ImmutableDictionary::ImmutableDictionary):
1445         * Shared/ImmutableDictionary.h:
1446         * Shared/MutableDictionary.cpp:
1447         (WebKit::MutableDictionary::MutableDictionary):
1448         * Shared/Plugins/Netscape/PluginInformation.cpp:
1449         (WebKit::createPluginInformationDictionary):
1450         * Shared/UserData.cpp:
1451         (WebKit::UserData::transform):
1452         (WebKit::UserData::decode):
1453         * Shared/UserMessageCoders.h:
1454         (WebKit::UserMessageDecoder::baseDecode):
1455         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
1456         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
1457         * UIProcess/WebContext.cpp:
1458         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
1459         * UIProcess/WebDatabaseManagerProxy.cpp:
1460         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
1461         * UIProcess/WebFormClient.cpp:
1462         (WebKit::WebFormClient::willSubmitForm):
1463         * UIProcess/WebUIClient.cpp:
1464         (WebKit::WebUIClient::createNewPage):
1465         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1466         (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
1467         (WebKit::InjectedBundlePageFormClient::willSubmitForm):
1468
1469 2013-12-12  Dan Bernstein  <mitz@apple.com>
1470
1471         [Cocoa] Navigation action information for policy decisions is missing the original request
1472         https://bugs.webkit.org/show_bug.cgi?id=125612
1473
1474         Reviewed by Anders Carlsson.
1475
1476         * Platform/CoreIPC/HandleMessage.h:
1477         (CoreIPC::callMemberFunction): Added template with additional message parameter.
1478         * UIProcess/API/C/WKPagePolicyClientInternal.h: Added. Defines a new version of the client
1479         interface with a new version of the policy decision callback.
1480         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1481         (setUpPagePolicyClient): Use the new internal version of the client. Pass the original
1482         request in the action information dictionary under a new key.
1483         * UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h: Declared new action information
1484         key.
1485         * UIProcess/WebPageProxy.cpp:
1486         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Added originalRequest parameter,
1487         which is passed to the policy client.
1488         * UIProcess/WebPageProxy.h:
1489         * UIProcess/WebPageProxy.messages.in: Added originalRequest parameter in
1490         DecidePolicyForNavigationAction.
1491         * UIProcess/WebPolicyClient.cpp:
1492         (WebKit::WebPolicyClient::decidePolicyForNavigationAction): Pass the original request to
1493         the client.
1494         * UIProcess/WebPolicyClient.h:
1495         * WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
1496         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1497         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the original
1498         request from the navigation action to the UI process.
1499
1500 2013-12-12  Zan Dobersek  <zdobersek@igalia.com>
1501
1502         [Autotools] Prepend the WebCore layer archives' names with 'lib'
1503         https://bugs.webkit.org/show_bug.cgi?id=125627
1504
1505         Reviewed by Martin Robinson.
1506
1507         * GNUmakefile.am: Libtool can complain about the WebCore layer archives not being prepended with 'lib'
1508         when they are used during linking, so the prefix is now added to avoid such issues.
1509
1510 2013-12-12  Csaba Osztrogonác  <ossy@webkit.org>
1511
1512         Move CertificateInfo to WebCore
1513         https://bugs.webkit.org/show_bug.cgi?id=124720
1514
1515         Reviewed by Darin Adler.
1516
1517         Based on the patch by Kwang Yul Seo <skyul@company100.net>
1518
1519         * GNUmakefile.list.am:
1520         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
1521         * NetworkProcess/NetworkProcess.h:
1522         * NetworkProcess/NetworkProcess.messages.in:
1523         * NetworkProcess/NetworkResourceLoader.cpp:
1524         * NetworkProcess/mac/NetworkProcessMac.mm:
1525         * PlatformEfl.cmake:
1526         * PlatformGTK.cmake:
1527         * Shared/API/c/mac/WKCertificateInfoMac.mm:
1528         * Shared/Authentication/AuthenticationManager.h:
1529         * Shared/Authentication/AuthenticationManager.messages.in:
1530         * Shared/Authentication/mac/AuthenticationManager.mac.mm:
1531         * Shared/UserMessageCoders.h:
1532         (WebKit::UserMessageDecoder::baseDecode):
1533         * Shared/WebCertificateInfo.h:
1534         (WebKit::WebCertificateInfo::create):
1535         (WebKit::WebCertificateInfo::certificateInfo):
1536         * Shared/WebCoreArgumentCoders.cpp:
1537         * Shared/WebCoreArgumentCoders.h:
1538         * Shared/mac/WebCoreArgumentCodersMac.mm:
1539         (CoreIPC::ArgumentCoder<CertificateInfo>::encode):
1540         (CoreIPC::ArgumentCoder<CertificateInfo>::decode):
1541         * Shared/soup/CertificateInfo.cpp: Removed.
1542         * Shared/soup/WebCoreArgumentCodersSoup.cpp:
1543         (CoreIPC::ArgumentCoder<CertificateInfo>::encode):
1544         (CoreIPC::ArgumentCoder<CertificateInfo>::decode):
1545         * UIProcess/API/gtk/WebKitCertificateInfoPrivate.h:
1546         * UIProcess/API/gtk/WebKitWebView.cpp:
1547         (webkit_web_view_get_tls_info):
1548         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
1549         (WebKit::AuthenticationChallengeProxy::useCredential):
1550         * UIProcess/WebFrameProxy.cpp:
1551         (WebKit::WebFrameProxy::didCommitLoad):
1552         * UIProcess/WebFrameProxy.h:
1553         * UIProcess/WebPageProxy.cpp:
1554         (WebKit::WebPageProxy::didCommitLoadForFrame):
1555         * UIProcess/WebPageProxy.h:
1556         * UIProcess/WebPageProxy.messages.in:
1557         * WebKit2.xcodeproj/project.pbxproj:
1558         * WebProcess/Network/WebResourceLoader.cpp:
1559         * WebProcess/Network/WebResourceLoader.h:
1560         * WebProcess/Network/WebResourceLoader.messages.in:
1561         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1562         * WebProcess/WebProcess.h:
1563         * WebProcess/WebProcess.messages.in:
1564         * WebProcess/soup/WebProcessSoup.cpp:
1565         (WebKit::WebProcess::allowSpecificHTTPSCertificateForHost):
1566
1567 2013-12-12  Zan Dobersek  <zdobersek@igalia.com>
1568
1569         Use of ar T option not supported by older binutils
1570         https://bugs.webkit.org/show_bug.cgi?id=118732
1571
1572         Reviewed by Gustavo Noronha Silva.
1573
1574         * GNUmakefile.am: To support non-thin archives when generating the WebCoreLayerGtk2 archive,
1575         switch to using the AR_FLAGS variable (which can be overridden) for providing the ar flags for the
1576         new archive. Non-thin archives also pose the problem as their members are only noted by the basename
1577         of the member's object file, and not the full path to it. To work around that, all the object files
1578         under the build directory are listed by their relative paths. The members of various archives then have
1579         the basenames of their paths grepped against that list, with the found path correlating to the member
1580         finally added as the new member of the WebCoreLayerGtk2 archive.
1581
1582 2013-12-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1583
1584         [GTK] WebProcess tests are failing with newer glib
1585         https://bugs.webkit.org/show_bug.cgi?id=125621
1586
1587         Reviewed by Martin Robinson.
1588
1589         Newer versions of glib unset the DISPLAY env variable in
1590         g_test_dbus_up(). The WebProcess needs the DISPLAY variable to
1591         work, and it's important to keep its value when running the tests
1592         under Xvfb.
1593
1594         * UIProcess/API/gtk/tests/WebProcessTestRunner.cpp:
1595         (WebProcessTestRunner::WebProcessTestRunner): Restore the DISPLAY
1596         env variable after calling g_test_dbus_up().
1597
1598 2013-12-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1599
1600         [GTK] Make sure unit tests don't use GVFS and dconf
1601         https://bugs.webkit.org/show_bug.cgi?id=125620
1602
1603         Reviewed by Martin Robinson.
1604
1605         They should use the local vfs and the gsettings memory backend.
1606
1607         * UIProcess/API/gtk/tests/TestMain.cpp:
1608         (main):
1609
1610 2013-12-11  KyungTae Kim  <ktf.kim@samsung.com>
1611
1612         [WK2] Build fix after r160464
1613         https://bugs.webkit.org/show_bug.cgi?id=125615
1614
1615         Reviewed by Gyuyoung Kim.
1616
1617         Modify the 2nd parameter for calling WebContext::addMessageReceiver from "this" to "*this"
1618         because the parameter type is modified from CoreIPC::MessageReceiver* to CoreIPC::MessageReceiver&
1619
1620         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1621         (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
1622         * UIProcess/WebBatteryManagerProxy.cpp:
1623         (WebKit::WebBatteryManagerProxy::WebBatteryManagerProxy):
1624         * UIProcess/WebNetworkInfoManagerProxy.cpp:
1625         (WebKit::WebNetworkInfoManagerProxy::WebNetworkInfoManagerProxy):
1626         * UIProcess/WebVibrationProxy.cpp:
1627         (WebKit::WebVibrationProxy::WebVibrationProxy):
1628         * UIProcess/soup/WebSoupRequestManagerProxy.cpp:
1629         (WebKit::WebSoupRequestManagerProxy::WebSoupRequestManagerProxy):
1630         * WebProcess/Battery/WebBatteryManager.cpp:
1631         (WebKit::WebBatteryManager::WebBatteryManager):
1632         * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
1633         (WebKit::WebNetworkInfoManager::WebNetworkInfoManager):
1634         * WebProcess/soup/WebSoupRequestManager.cpp:
1635         (WebKit::WebSoupRequestManager::WebSoupRequestManager):
1636
1637 2013-12-11  Anders Carlsson  <andersca@apple.com>
1638
1639         MessageReceiverMap should take MessageReceiver objects by reference
1640         https://bugs.webkit.org/show_bug.cgi?id=125605
1641
1642         Reviewed by Tim Horton.
1643
1644         * Platform/CoreIPC/MessageReceiverMap.cpp:
1645         (CoreIPC::MessageReceiverMap::addMessageReceiver):
1646         * Platform/CoreIPC/MessageReceiverMap.h:
1647         * Shared/Authentication/AuthenticationManager.cpp:
1648         (WebKit::AuthenticationManager::AuthenticationManager):
1649         * Shared/ChildProcess.cpp:
1650         (WebKit::ChildProcess::addMessageReceiver):
1651         * Shared/ChildProcess.h:
1652         * Shared/ChildProcessProxy.cpp:
1653         (WebKit::ChildProcessProxy::addMessageReceiver):
1654         * Shared/ChildProcessProxy.h:
1655         * UIProcess/Downloads/DownloadProxyMap.cpp:
1656         (WebKit::DownloadProxyMap::createDownloadProxy):
1657         * UIProcess/DrawingAreaProxy.cpp:
1658         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1659         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
1660         (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy):
1661         * UIProcess/WebApplicationCacheManagerProxy.cpp:
1662         (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy):
1663         * UIProcess/WebConnectionToWebProcess.cpp:
1664         (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess):
1665         * UIProcess/WebContext.cpp:
1666         (WebKit::WebContext::WebContext):
1667         (WebKit::WebContext::addMessageReceiver):
1668         * UIProcess/WebContext.h:
1669         * UIProcess/WebCookieManagerProxy.cpp:
1670         (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
1671         * UIProcess/WebDatabaseManagerProxy.cpp:
1672         (WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy):
1673         * UIProcess/WebFullScreenManagerProxy.cpp:
1674         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
1675         * UIProcess/WebGeolocationManagerProxy.cpp:
1676         (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
1677         * UIProcess/WebIconDatabase.cpp:
1678         (WebKit::WebIconDatabase::WebIconDatabase):
1679         * UIProcess/WebInspectorProxy.cpp:
1680         (WebKit::WebInspectorProxy::WebInspectorProxy):
1681         * UIProcess/WebMediaCacheManagerProxy.cpp:
1682         (WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy):
1683         * UIProcess/WebOriginDataManagerProxy.cpp:
1684         (WebKit::WebOriginDataManagerProxy::WebOriginDataManagerProxy):
1685         * UIProcess/WebPageProxy.cpp:
1686         (WebKit::WebPageProxy::WebPageProxy):
1687         (WebKit::WebPageProxy::reattachToWebProcess):
1688         * UIProcess/WebResourceCacheManagerProxy.cpp:
1689         (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy):
1690         * UIProcess/mac/RemoteLayerTreeHost.mm:
1691         (WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
1692         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
1693         (WebKit::WebApplicationCacheManager::WebApplicationCacheManager):
1694         * WebProcess/Cookies/WebCookieManager.cpp:
1695         (WebKit::WebCookieManager::WebCookieManager):
1696         * WebProcess/Geolocation/WebGeolocationManager.cpp:
1697         (WebKit::WebGeolocationManager::WebGeolocationManager):
1698         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
1699         (WebKit::WebIconDatabaseProxy::WebIconDatabaseProxy):
1700         * WebProcess/MediaCache/WebMediaCacheManager.cpp:
1701         (WebKit::WebMediaCacheManager::WebMediaCacheManager):
1702         * WebProcess/Notifications/WebNotificationManager.cpp:
1703         (WebKit::WebNotificationManager::WebNotificationManager):
1704         * WebProcess/OriginData/WebOriginDataManager.cpp:
1705         (WebKit::WebOriginDataManager::WebOriginDataManager):
1706         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1707         (WebKit::WebResourceCacheManager::WebResourceCacheManager):
1708         * WebProcess/Storage/StorageAreaMap.cpp:
1709         (WebKit::StorageAreaMap::StorageAreaMap):
1710         * WebProcess/WebConnectionToUIProcess.cpp:
1711         (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess):
1712         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1713         (WebKit::WebDatabaseManager::WebDatabaseManager):
1714         * WebProcess/WebPage/WebPage.cpp:
1715         (WebKit::WebPage::WebPage):
1716
1717 2013-12-11  Joseph Pecoraro  <pecoraro@apple.com>
1718
1719         Web Inspector: Push More Inspector Required Classes Down into JavaScriptCore
1720         https://bugs.webkit.org/show_bug.cgi?id=125324
1721
1722         Reviewed by Timothy Hatcher.
1723
1724         * WebProcess/Plugins/PluginView.cpp:
1725         (WebKit::PluginView::performJavaScriptURLRequest):
1726         * WebProcess/WebPage/WebInspector.cpp:
1727         * WebProcess/WebPage/WebInspector.h:
1728         * WebProcess/WebPage/WebPage.cpp:
1729
1730 2013-12-11  Anders Carlsson  <andersca@apple.com>
1731
1732         Remove platform specific gunk from WebURLRequest and WebURLResponse
1733         https://bugs.webkit.org/show_bug.cgi?id=125589
1734
1735         Reviewed by Andreas Kling.
1736
1737         * Shared/API/c/WKURLRequest.cpp:
1738         (WKURLRequestCopyURL):
1739         * Shared/API/c/mac/WKURLRequestNS.mm:
1740         (WKURLRequestCopyNSURLRequest):
1741         * Shared/API/c/mac/WKURLResponseNS.mm:
1742         (WKURLResponseCopyNSURLResponse):
1743         * Shared/WebURLRequest.cpp:
1744         * Shared/WebURLRequest.h:
1745         * Shared/WebURLResponse.h:
1746         * Shared/mac/WebURLRequestMac.mm: Removed.
1747         * Shared/mac/WebURLResponseMac.mm: Removed.
1748         * UIProcess/WebInspectorProxy.cpp:
1749         (WebKit::isMainInspectorPage):
1750         * WebKit2.xcodeproj/project.pbxproj:
1751
1752 2013-12-11  José Dapena Paz  <jdapena@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
1753
1754         [GTK][WK2] Add the WebKitBatteryProvider class
1755         https://bugs.webkit.org/show_bug.cgi?id=115720
1756
1757         Reviewed by Martin Robinson.
1758
1759         This patch adds the WebKitBatteryProvider class which sets up a BatteryProviderUPower instance,
1760         controlling the provider's activity when instrumented to do so by the WebBatteryManagerProxy
1761         and relaying the battery status updates from the battery provider to the battery manager.
1762
1763         * GNUmakefile.list.am: Add the build targets for the new source files.
1764         * UIProcess/API/gtk/WebKitBatteryProvider.cpp: Added.
1765         (toBatteryProvider): A helper inline method that casts the client info to the battery provider instance.
1766         (startUpdatingCallback): Relays the instruction to the WebKitBattery instance.
1767         (stopUpdatingCallback): Ditto.
1768         (WebKitBatteryProvider::create):
1769         (WebKitBatteryProvider::WebKitBatteryProvider): Set up a WKBatteryProvider and set it to the passed-in battery manager.
1770         (WebKitBatteryProvider::~WebKitBatteryProvider): Force the BatteryProviderUPower to stop updating.
1771         (WebKitBatteryProvider::startUpdating): Relays the instruction to the BatteryProviderUPower instance.
1772         (WebKitBatteryProvider::stopUpdating): Ditto.
1773         (WebKitBatteryProvider::notifyBatteryStatusUnavailable): Update the battery manager with the new status that
1774         has the default values that are to be used when the implementation cannot determine the battery status (as per
1775         the Battery Status API specification).
1776         (WebKitBatteryProvider::notifyBatteryStatusUpdated): Update the battery status.
1777         * UIProcess/API/gtk/WebKitBatteryProvider.h: Added.
1778         (WebKitBatteryProvider): Define the WebKitBatteryProvider reference-counted interface that also inherits from the
1779         BatteryProviderUPowerClient interface.
1780         * UIProcess/API/gtk/WebKitWebContext.cpp:
1781         (_WebKitWebContextPrivate): Add a WebKitBatteryProvider member variable to the struct.
1782         (createDefaultWebContext): Create a new battery provider when initializing the default web context.
1783
1784 2013-12-11  José Dapena Paz  <jdapena@igalia.com> and Zan Dobersek  <zdobersek@igalia.com>
1785
1786         [GTK] Add a UPower-based BatteryProvider
1787         https://bugs.webkit.org/show_bug.cgi?id=115719
1788
1789         Reviewed by Martin Robinson.
1790
1791         * GNUmakefile.am: Link the libwebkit2gtk library against the upower-glib library.
1792
1793 2013-12-11  Gustavo Noronha Silva  <gns@gnome.org>
1794
1795         [GTK] Support right-side attachment of the inspector
1796         https://bugs.webkit.org/show_bug.cgi?id=124126
1797
1798         Reviewed by Carlos Garcia Campos.
1799
1800         * UIProcess/API/C/gtk/WKInspectorClientGtk.h: add changed attached width callback.
1801         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1802         (webkitWebViewBaseAddWebInspector): take attachment side parameter into account when adding the
1803         inspector view.
1804         (webkitWebViewBaseContainerRemove): renamed inspectorViewHeight to inspectorViewSize.
1805         (resizeWebKitWebViewBaseFromAllocation): take attachment side into account when allocating the
1806         sizes for the inspector view and the inspected view.
1807         (webkitWebViewBaseSetInspectorViewSize): renamed from webkitWebViewBaseSetInspectorViewHeight.
1808         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
1809         * UIProcess/gtk/WebInspectorClientGtk.cpp:
1810         (WebKit::WebInspectorClientGtk::didChangeAttachedWidth): notify client that view width has changed.
1811         * UIProcess/gtk/WebInspectorClientGtk.h:
1812         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
1813         (WebKit::WebInspectorProxy::platformAttach): use attachment side for setting the default size
1814         for the inspector view.
1815         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): use the new generic SetInspectorViewSize.
1816         (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth): allow setting the inspector view width.
1817
1818 2013-12-11  Brendan Long  <b.long@cablelabs.com>
1819
1820         [GTK] Add "enable-mediasource" property to WebKitWebSettings
1821         https://bugs.webkit.org/show_bug.cgi?id=125566
1822
1823         Reviewed by Philippe Normand.
1824
1825         * UIProcess/API/gtk/WebKitSettings.cpp:
1826         (webKitSettingsSetProperty):
1827         (webKitSettingsGetProperty):
1828         (webkit_settings_class_init):
1829         (webkit_settings_get_enable_mediasource):
1830         (webkit_settings_set_enable_mediasource):
1831         * UIProcess/API/gtk/WebKitSettings.h:
1832         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1833         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
1834         (testWebKitSettings):
1835
1836 2013-12-11  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1837
1838         [EFL] Fix build with CONTEXT_MENUS flag set OFF
1839         https:///bugs.webkit.org/show_bug.cgi?id=125572
1840
1841         Reviewed by Gyuyoung Kim.
1842
1843         Fix EFL build by adding necessary guard, also UNUSED_PARAM macros where added.
1844
1845         * Shared/API/c/WKContextMenuItem.cpp: Added UNUSED_PARAM macros.
1846         (WKContextMenuItemCreateAsAction):
1847         (WKContextMenuItemCreateAsCheckableAction):
1848         (WKContextMenuItemCreateAsSubmenu):
1849         (WKContextMenuItemGetTag):
1850         (WKContextMenuItemGetType):
1851         (WKContextMenuItemCopyTitle):
1852         (WKContextMenuItemGetEnabled):
1853         (WKContextMenuItemGetChecked):
1854         (WKContextMenuCopySubmenuItems):
1855         (WKContextMenuItemGetUserData):
1856         (WKContextMenuItemSetUserData):
1857         * UIProcess/API/C/WKPage.cpp: Ditto.
1858         (WKPageSetPageContextMenuClient):
1859         (WKPageSelectContextMenuItem):
1860         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: Ditto.
1861         (WKBundlePageSetContextMenuClient):
1862         (WKBundlePageClickMenuItem):
1863         (WKBundlePageCopyContextMenuItems):
1864         (WKBundlePageCopyContextMenuAtPointInWindow)
1865         * UIProcess/efl/WebViewEfl.cpp: Guard createContextMenuProxy method.
1866         * UIProcess/efl/WebViewEfl.h: Ditto.
1867
1868 2013-12-11  Kwang Yul Seo  <skyul@company100.net>
1869
1870         [WK2][Soup] Implement NetworkProcess::allowSpecificHTTPSCertificateForHost
1871         https://bugs.webkit.org/show_bug.cgi?id=125557
1872
1873         Reviewed by Carlos Garcia Campos.
1874
1875         Do what WebProcess::allowSpecificHTTPSCertificateForHost does.
1876
1877         * NetworkProcess/soup/NetworkProcessSoup.cpp:
1878         (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
1879
1880 2013-12-10  Mark Rowe  <mrowe@apple.com>
1881
1882         <http://webkit.org/b/125556> WebKit doesn't deal with longer bundle versions correctly
1883         <rdar://problem/15634192>
1884
1885         Reviewed by Dan Bernstein.
1886
1887         * UIProcess/mac/WebPageProxyMac.mm:
1888         (WebKit::userVisibleWebKitVersionString): Strip as many leading digits as is necessary to
1889         bring the major component of the version down to 3 digits.
1890
1891 2013-12-10  Ryuan Choi  <ryuan.choi@samsung.com>
1892
1893         Unreviewed GTK build fix attempt after r160395 (second)
1894
1895         * GNUmakefile.list.am:
1896         Added new files for UserData, APIFrameHandle, APIGeometry and APIPageHandle.
1897
1898 2013-12-10  Ryuan Choi  <ryuan.choi@samsung.com>
1899
1900         Unreviewed GTK build fix attempt after r160395
1901
1902         Renamed WebUInt64 to API::UInt64, WebDouble to API::Double, WebBoolean
1903         to API::Boolean.
1904
1905         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
1906         (didReceiveWebViewMessageFromInjectedBundle):
1907         * UIProcess/API/gtk/WebKitWebView.cpp:
1908         (webkit_web_view_get_snapshot):
1909         * UIProcess/API/gtk/WebKitWindowProperties.cpp: Included APINumber.h instead of WebNumber.h
1910         (webkitWindowPropertiesUpdateFromWebWindowFeatures):
1911         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1912         (didInitiateLoadForResource):
1913         (willSendRequestForFrame):
1914         (didReceiveResponseForResource):
1915         (didReceiveContentLengthForResource):
1916         (didFinishLoadForResource):
1917         (didFailLoadForResource):
1918         (webkitWebPageDidReceiveMessage):
1919
1920 2013-12-10  Dan Bernstein  <mitz@apple.com>
1921
1922         All observable PageLoadState properties should change in an atomic fashion, with properly nested change notifications
1923         https://bugs.webkit.org/show_bug.cgi?id=125431
1924
1925         Reviewed by Anders Carlsson.
1926
1927         Made PageLoadState maintain two copies of its state data members, one representing the
1928         committed state and one possibly containing uncommitted changes. When changes are committed,
1929         change notifications are sent and the uncommitted state is copied into the committed state.
1930         Changes can be committed explicitly at any time, but are also committed when the last
1931         outstanding transaction ends. Transactions are RAII objects vended by the PageLoadState.
1932         Mutating the PageLoadState requires holding a Transaction, which is enforced by making all
1933         the mutating member functions take a Transaction::Token. Passing a Token also marks the
1934         PageLoadState as possibly having uncommitted changes.
1935
1936         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
1937         Added PageLoadStateObserver::{will,did}ChangeActiveURL overrides that call
1938         -{will,did}ChangeValueForKey:.
1939
1940         * UIProcess/PageLoadState.cpp:
1941         Moved constant from the middle of the file to the beginning and reworded comment.
1942         (WebKit::PageLoadState::PageLoadState): Added initializers for new member variables, removed
1943         initialization of members that are not part of Data, which initializes them in its
1944         constructor.
1945         (WebKit::PageLoadState::endTransaction): Added. Calles when a Transaction is destructed.
1946         Decrements the outstanding transaction count, and if it is zero, commits changes.
1947         (WebKit::PageLoadState::commitChanges): Added. Checks for differences in observable
1948         properties between the committed state and the uncommitted state, then makes appropriate
1949         willChange Observer callbacks, then copies the uncommitted state into the committed state,
1950         then makes appropriate didChange Observer callbacks in reverse order. Also added active URL
1951         to the set of observable properties.
1952         (WebKit::PageLoadState::reset): Changed to take a transaction token, act on
1953         m_uncommittedState, and not make observer callbacks.
1954         (WebKit::PageLoadState::isLoading): Changed to access m_committedState.
1955         (WebKit::PageLoadState::activeURL): Changed to call a static function factored out of this.
1956         (WebKit::PageLoadState::estimatedProgress): Ditto.
1957         (WebKit::PageLoadState::pendingAPIRequestURL): Changed to access m_committedState.
1958         (WebKit::PageLoadState::setPendingAPIRequestURL): Changed to take a transaction token, act
1959         on m_uncommittedState, and not make observer callbacks.
1960         (WebKit::PageLoadState::clearPendingAPIRequestURL): Ditto.
1961         (WebKit::PageLoadState::didStartProvisionalLoad): Ditto.
1962         (WebKit::PageLoadState::didReceiveServerRedirectForProvisionalLoad): Ditto.
1963         (WebKit::PageLoadState::didFailProvisionalLoad): Ditto.
1964         (WebKit::PageLoadState::didCommitLoad): Ditto.
1965         (WebKit::PageLoadState::didFinishLoad): Ditto.
1966         (WebKit::PageLoadState::didFailLoad): Ditto.
1967         (WebKit::PageLoadState::didSameDocumentNavigation): Ditto.
1968         (WebKit::PageLoadState::setUnreachableURL): Ditto.
1969         (WebKit::PageLoadState::title): Changed to access m_committedState.
1970         (WebKit::PageLoadState::setTitle): Changed to take a transaction token, act on
1971         m_uncommittedState, and not make observer callbacks.
1972         (WebKit::PageLoadState::didStartProgress): Ditto.
1973         (WebKit::PageLoadState::didChangeProgress): Ditto.
1974         (WebKit::PageLoadState::didFinishProgress): Ditto.
1975         * UIProcess/PageLoadState.h:
1976         (WebKit::PageLoadState::Transaction::Transaction): Added. Calls
1977         PageLoadState::beginTransaction.
1978         (WebKit::PageLoadState::Transaction::~Transaction): Added. Calls
1979         PageLoadState::endTransaction.
1980         (WebKit::PageLoadState::Transaction::Token::Token): Added. Sets m_mayHaveUncommittedChanges.
1981         (WebKit::PageLoadState::transaction): Added. Returns a Transaction for this PageLoadState.
1982         (WebKit::PageLoadState::provisionalURL): Changed to access m_committedState.
1983         (WebKit::PageLoadState::url): Ditto.
1984         (WebKit::PageLoadState::unreachableURL): Ditto.
1985         (WebKit::PageLoadState::beginTransaction): Added. Increments the outstanding transaction
1986         count.
1987         (WebKit::PageLoadState::Data::Data): Added. Moved internal state members into this struct
1988         and made its constructor initialize state and estimatedProgress.
1989
1990         * UIProcess/WebPageProxy.cpp:
1991         (WebKit::WebPageProxy::loadURL): Changed to create a PageLoadState::Transaction and pass it
1992         along.
1993         (WebKit::WebPageProxy::loadURLRequest): Ditto.
1994         (WebKit::WebPageProxy::loadAlternateHTMLString): Ditto.
1995         (WebKit::WebPageProxy::reload): Ditto.
1996         (WebKit::WebPageProxy::goForward): Ditto.
1997         (WebKit::WebPageProxy::goBack): Ditto.
1998         (WebKit::WebPageProxy::goToBackForwardItem): Ditto.
1999         (WebKit::WebPageProxy::receivedPolicyDecision): Ditto.
2000         (WebKit::WebPageProxy::didStartProgress): Ditto. Also added a call to
2001         PageLoadState::commitChanges before calling the client, so that the client sees the updated
2002         state.
2003         (WebKit::WebPageProxy::didChangeProgress): Ditto.
2004         (WebKit::WebPageProxy::didFinishProgress): Ditto.
2005         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Ditto.
2006         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
2007         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame): Ditto.
2008         (WebKit::WebPageProxy::didCommitLoadForFrame): Ditto.
2009         (WebKit::WebPageProxy::didFinishLoadForFrame): Ditto.
2010         (WebKit::WebPageProxy::didFailLoadForFrame): Ditto.
2011         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.
2012         (WebKit::WebPageProxy::didReceiveTitleForFrame): Ditto.
2013         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Changed to create a
2014         PageLoadState::Transaction and pass it along.
2015         (WebKit::WebPageProxy::processDidCrash): Ditto. This addressed a FIXME about the client not
2016         seeing the state prior to the crash, because now the changes cuased by reset() aren’t
2017         committed until after the client callback.
2018
2019         * UIProcess/cf/WebPageProxyCF.cpp:
2020         (WebKit::WebPageProxy::restoreFromSessionStateData): Changed to create a
2021         PageLoadState::Transaction and pass it along.
2022
2023 2013-12-10  Ryuan Choi  <ryuan.choi@samsung.com>
2024
2025         Unreviewed EFL build fix attempt
2026
2027         * CMakeLists.txt: Added APIGeometry.cpp to source lists.
2028
2029 2013-12-10  Anders Carlsson  <andersca@apple.com>
2030
2031         Move number and geometry classes into the API namespace
2032         https://bugs.webkit.org/show_bug.cgi?id=125549
2033
2034         Reviewed by Geoffrey Garen.
2035
2036         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2037         (-[WKRemoteObjectEncoder encodeBool:forKey:]):
2038         (-[WKRemoteObjectEncoder encodeInt64:forKey:]):
2039         (-[WKRemoteObjectEncoder encodeDouble:forKey:]):
2040         (-[WKRemoteObjectDecoder decodeBoolForKey:]):
2041         (-[WKRemoteObjectDecoder decodeInt64ForKey:]):
2042         (-[WKRemoteObjectDecoder decodeDoubleForKey:]):
2043         * Shared/API/c/WKGeometry.cpp:
2044         (WKSizeGetTypeID):
2045         (WKPointGetTypeID):
2046         (WKRectGetTypeID):
2047         (WKPointCreate):
2048         (WKSizeCreate):
2049         (WKRectCreate):
2050         * Shared/API/c/WKNumber.cpp:
2051         (WKBooleanGetTypeID):
2052         (WKBooleanCreate):
2053         (WKDoubleGetTypeID):
2054         (WKDoubleCreate):
2055         (WKUInt64GetTypeID):
2056         (WKUInt64Create):
2057         * Shared/API/c/WKSharedAPICast.h:
2058         * Shared/APIGeometry.cpp:
2059         (API::Point::encode):
2060         (API::Point::decode):
2061         (API::Size::encode):
2062         (API::Size::decode):
2063         (API::Rect::encode):
2064         (API::Rect::decode):
2065         * Shared/APIGeometry.h:
2066         (API::Size::create):
2067         (API::Size::Size):
2068         (API::Point::create):
2069         (API::Point::Point):
2070         (API::Rect::create):
2071         (API::Rect::Rect):
2072         * Shared/APINumber.h:
2073         (API::Number::create):
2074         (API::Number::decode):
2075         (API::Number::Number):
2076         * Shared/APIObject.h:
2077         * Shared/Plugins/Netscape/PluginInformation.cpp:
2078         (WebKit::getPluginModuleInformation):
2079         (WebKit::createPluginInformationDictionary):
2080         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
2081         (WebKit::getPlatformPluginModuleInformation):
2082         * Shared/UserData.cpp:
2083         (WebKit::UserData::encode):
2084         (WebKit::UserData::decode):
2085         * Shared/UserMessageCoders.h:
2086         (WebKit::UserMessageEncoder::baseEncode):
2087         (WebKit::UserMessageDecoder::baseDecode):
2088         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2089         (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
2090         (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications):
2091         * UIProcess/Notifications/WebNotificationProvider.cpp:
2092         (WebKit::WebNotificationProvider::clearNotifications):
2093         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
2094         (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
2095         (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable):
2096         * UIProcess/StatisticsRequest.cpp:
2097         (WebKit::addToDictionaryFromHashMap):
2098         * UIProcess/WebDatabaseManagerProxy.cpp:
2099         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
2100         * UIProcess/WebPageProxy.cpp:
2101         (WebKit::WebPageProxy::didFindStringMatches):
2102         * UIProcess/WebUIClient.cpp:
2103         (WebKit::WebUIClient::createNewPage):
2104         * WebProcess/WebPage/WebPage.cpp:
2105         (WebKit::WebPage::trackedRepaintRects):
2106         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
2107         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
2108
2109 2013-12-10  Anders Carlsson  <andersca@apple.com>
2110
2111         Add encode and decode functions to WebNumber
2112         https://bugs.webkit.org/show_bug.cgi?id=125547
2113
2114         Reviewed by Beth Dakin.
2115
2116         * Shared/APINumber.h:
2117         (WebKit::WebNumber::encode):
2118         (WebKit::WebNumber::decode):
2119         * Shared/UserData.cpp:
2120         (WebKit::UserData::encode):
2121         (WebKit::UserData::decode):
2122
2123 2013-12-10  Nick Diego Yamane  <nick.yamane@openbossa.org>
2124
2125         [EFL] One more WK2 build fix
2126         https://bugs.webkit.org/show_bug.cgi?id=125544
2127
2128         API::TypedObject has been renamed to API::ObjectImpl
2129
2130         Reviewed by Tim Horton.
2131
2132         * Shared/WebBatteryStatus.h:
2133         * Shared/WebNetworkInfo.h:
2134         * UIProcess/CoordinatedGraphics/WebView.h:
2135         * UIProcess/WebBatteryManagerProxy.h:
2136         * UIProcess/WebNetworkInfoManagerProxy.h:
2137         * UIProcess/WebTextChecker.h:
2138         * UIProcess/WebVibrationProxy.h:
2139         * UIProcess/WebViewportAttributes.h:
2140         * UIProcess/efl/WebPopupItemEfl.h:
2141         * UIProcess/soup/WebSoupRequestManagerProxy.h:
2142
2143 2013-12-10  Anders Carlsson  <andersca@apple.com>
2144
2145         Rename WebNumber.h to APINumber.h
2146         https://bugs.webkit.org/show_bug.cgi?id=125545
2147
2148         Reviewed by Beth Dakin.
2149
2150         * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
2151         * Shared/API/c/WKNumber.cpp:
2152         * Shared/API/c/WKSharedAPICast.h:
2153         * Shared/APINumber.h: Renamed from Source/WebKit2/Shared/WebNumber.h.
2154         * Shared/Plugins/Netscape/PluginInformation.cpp:
2155         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
2156         * Shared/UserData.cpp:
2157         * Shared/UserMessageCoders.h:
2158         * UIProcess/API/C/mac/WKContextPrivateMac.mm:
2159         * UIProcess/Notifications/WebNotificationProvider.cpp:
2160         * UIProcess/WebUIClient.cpp:
2161         * WebKit2.xcodeproj/project.pbxproj:
2162
2163 2013-12-10  Anders Carlsson  <andersca@apple.com>
2164
2165         UserData should handle geometry types
2166         https://bugs.webkit.org/show_bug.cgi?id=125542
2167
2168         Reviewed by Andreas Kling.
2169
2170         Rename WebGeometry.h to APIGeometry.h in preparation for moving the classes into the API namespace.
2171         Add encode/decode functions to geometry classes. Use them in UserData::encode and UserData::decode.
2172
2173         * Shared/API/c/WKGeometry.cpp:
2174         * Shared/APIGeometry.cpp: Added.
2175         * Shared/APIGeometry.h: Renamed from Source/WebKit2/Shared/WebGeometry.h.
2176         (WebKit::UserData::encode):
2177         (WebKit::UserData::decode):
2178         * Shared/UserMessageCoders.h:
2179         * WebKit2.xcodeproj/project.pbxproj:
2180         * WebProcess/WebPage/WebPage.cpp:
2181
2182 2013-12-10  Beth Dakin  <bdakin@apple.com>
2183
2184         https://bugs.webkit.org/show_bug.cgi?id=125533
2185         BackgroundExtendsBeyondPage setting should be switchable per WKView
2186         -and corresponding-
2187         <rdar://problem/15571310>
2188
2189         Reviewed by Anders Carlsson.
2190
2191         This patch removes the WKPreferences API and adds WKPage API in its place. To 
2192         ensure that the setting sticks after a crash, it is also now a creation parameter.
2193
2194         * Shared/WebPageCreationParameters.cpp:
2195         (WebKit::WebPageCreationParameters::encode):
2196         (WebKit::WebPageCreationParameters::decode):
2197         * Shared/WebPageCreationParameters.h:
2198         * UIProcess/API/C/WKPage.cpp:
2199         (WKPageSetBackgroundExtendsBeyondPage):
2200         (WKPageBackgroundExtendsBeyondPage):
2201         * UIProcess/API/C/WKPage.h:
2202         * UIProcess/API/C/WKPreferences.cpp:
2203         * UIProcess/API/C/WKPreferencesPrivate.h:
2204         * UIProcess/WebPageProxy.cpp:
2205         (WebKit::WebPageProxy::WebPageProxy):
2206         (WebKit::WebPageProxy::setBackgroundExtendsBeyondPage):
2207         (WebKit::WebPageProxy::backgroundExtendsBeyondPage):
2208         (WebKit::WebPageProxy::initializeCreationParameters):
2209         * UIProcess/WebPageProxy.h:
2210         * WebProcess/WebPage/WebPage.cpp:
2211         (WebKit::WebPage::WebPage):
2212         (WebKit::WebPage::setBackgroundExtendsBeyondPage):
2213         (WebKit::WebPage::updatePreferences):
2214         * WebProcess/WebPage/WebPage.h:
2215         * WebProcess/WebPage/WebPage.messages.in:
2216
2217 2013-12-10  Anders Carlsson  <andersca@apple.com>
2218
2219         Rename API::TypedObject to API::ObjectImpl
2220         https://bugs.webkit.org/show_bug.cgi?id=125539
2221
2222         Reviewed by Tim Horton.
2223
2224         All API::Objects are by definition typed, so ObjectImpl makes more sense as a name.
2225
2226         * Shared/APIArray.h:
2227         * Shared/APIFrameHandle.h:
2228         * Shared/APIObject.h:
2229         (API::ObjectImpl::~ObjectImpl):
2230         (API::ObjectImpl::ObjectImpl):
2231         * Shared/APIPageHandle.h:
2232         * Shared/ImmutableDictionary.h:
2233         * Shared/WebArchive.h:
2234         * Shared/WebArchiveResource.h:
2235         * Shared/WebBackForwardListItem.h:
2236         * Shared/WebCertificateInfo.h:
2237         * Shared/WebConnection.h:
2238         * Shared/WebContextMenuItem.h:
2239         * Shared/WebData.h:
2240         * Shared/WebError.h:
2241         * Shared/WebGeolocationPosition.h:
2242         * Shared/WebGeometry.h:
2243         * Shared/WebHitTestResult.h:
2244         * Shared/WebImage.h:
2245         * Shared/WebNumber.h:
2246         * Shared/WebOpenPanelParameters.h:
2247         * Shared/WebRenderLayer.h:
2248         * Shared/WebRenderObject.h:
2249         * Shared/WebSecurityOrigin.h:
2250         * Shared/WebSerializedScriptValue.h:
2251         * Shared/WebString.h:
2252         * Shared/WebURL.h:
2253         * Shared/WebURLRequest.h:
2254         * Shared/WebURLResponse.h:
2255         * Shared/WebUserContentURLPattern.h:
2256         * Shared/mac/ObjCObjectGraph.h:
2257         * UIProcess/APINavigationData.h:
2258         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2259         * UIProcess/Authentication/AuthenticationDecisionListener.h:
2260         * UIProcess/Authentication/WebCredential.h:
2261         * UIProcess/Authentication/WebProtectionSpace.h:
2262         * UIProcess/Downloads/DownloadProxy.h:
2263         * UIProcess/GeolocationPermissionRequestProxy.h:
2264         * UIProcess/Notifications/NotificationPermissionRequest.h:
2265         * UIProcess/Notifications/WebNotification.h:
2266         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2267         * UIProcess/Plugins/WebPluginSiteDataManager.h:
2268         * UIProcess/WebApplicationCacheManagerProxy.h:
2269         * UIProcess/WebBackForwardList.h:
2270         * UIProcess/WebColorPickerResultListenerProxy.h:
2271         * UIProcess/WebContext.h:
2272         * UIProcess/WebCookieManagerProxy.h:
2273         * UIProcess/WebDatabaseManagerProxy.h:
2274         * UIProcess/WebEditCommandProxy.h:
2275         * UIProcess/WebFrameProxy.h:
2276         * UIProcess/WebGeolocationManagerProxy.h:
2277         * UIProcess/WebGrammarDetail.h:
2278         * UIProcess/WebIconDatabase.h:
2279         * UIProcess/WebInspectorProxy.h:
2280         * UIProcess/WebKeyValueStorageManager.h:
2281         * UIProcess/WebMediaCacheManagerProxy.h:
2282         * UIProcess/WebOpenPanelResultListenerProxy.h:
2283         * UIProcess/WebOriginDataManagerProxy.h:
2284         * UIProcess/WebPageGroup.h:
2285         * UIProcess/WebPageProxy.h:
2286         * UIProcess/WebPreferences.h:
2287         * UIProcess/WebResourceCacheManagerProxy.h:
2288         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2289         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
2290         * WebProcess/InjectedBundle/InjectedBundle.h:
2291         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
2292         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
2293         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h:
2294         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2295         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
2296         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
2297         * WebProcess/WebPage/PageBanner.h:
2298         * WebProcess/WebPage/PageOverlay.h:
2299         * WebProcess/WebPage/WebFrame.h:
2300         * WebProcess/WebPage/WebInspector.h:
2301         * WebProcess/WebPage/WebPage.h:
2302         * WebProcess/WebPage/WebPageGroupProxy.h:
2303
2304 2013-12-10  Nick Diego Yamane  <nick.yamane@openbossa.org>
2305
2306         [EFL] Fix WK2 build after r160341
2307         https://bugs.webkit.org/show_bug.cgi?id=125529
2308
2309         Reviewed by Anders Carlsson.
2310
2311         * CMakeLists.txt: Added new files UserData.cpp, APIFrameHandle.cpp and APIPageHandle.cpp.
2312
2313 2013-12-10  Anders Carlsson  <andersca@apple.com>
2314
2315         Add more API object types to UserData
2316         https://bugs.webkit.org/show_bug.cgi?id=125532
2317
2318         Reviewed by Beth Dakin.
2319
2320         * Shared/UserData.cpp:
2321         (WebKit::UserData::transform):
2322         Handle dictionaries.
2323
2324         (WebKit::UserData::encode):
2325         (WebKit::UserData::decode):
2326         Handle more API::Objects.
2327
2328 2013-12-10  Anders Carlsson  <andersca@apple.com>
2329
2330         More UserData work
2331         https://bugs.webkit.org/show_bug.cgi?id=125524
2332
2333         Reviewed by Dan Bernstein.
2334
2335         * Shared/APIObject.h:
2336         * Shared/UserData.cpp:
2337         (WebKit::UserData::transform):
2338         New helper function that takes an API::Object and returns a new API::Object with all "sub-objects" (arrays etc)
2339         transformed by calling the transformer.
2340
2341         * Shared/UserData.h:
2342         (WebKit::UserData::object):
2343         New getter.
2344
2345         * UIProcess/WebProcessProxy.cpp:
2346         (WebKit::WebProcessProxy::apiObjectByConvertingToHandles):
2347         Helper function that creates a new API::Object graph by converting WebFrameProxy objects to FrameHandles.
2348
2349         * WebProcess/WebProcess.cpp:
2350         (WebKit::WebProcess::apiObjectByConvertingFromHandles):
2351         Helper function that creates a new API::Object graph by converting FrameHandles to WebFrame objects.
2352
2353 2013-12-10  Alberto Garcia  <berto@igalia.com>
2354
2355         [WK2] [SOUP] Allow running the network process with an arbitrary prefix command
2356         https://bugs.webkit.org/show_bug.cgi?id=125520
2357
2358         Reviewed by Carlos Garcia Campos.
2359
2360         Launch the network process using NETWORK_PROCESS_CMD_PREFIX as a
2361         prefix. Useful for debugging the web process with gdb, valgrind,
2362         etc.
2363
2364         * UIProcess/Network/soup/NetworkProcessProxySoup.cpp:
2365         (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
2366
2367 2013-12-10  Kwang Yul Seo  <skyul@company100.net>
2368
2369         Allow us to use network process with a single process model
2370         https://bugs.webkit.org/show_bug.cgi?id=125507
2371
2372         Reviewed by Brady Eidson.
2373
2374         Currently, WebContext::sendToNetworkingProcess and
2375         WebContext::sendToNetworkingProcessRelaunchingIfNecessary assume that
2376         network process is not used when the given process model is
2377         ProcessModelSharedSecondaryProcess. This is not consistent with
2378         WebContext::networkingProcessConnection which returns the networking
2379         process connection for ProcessModelSharedSecondaryProcess.
2380
2381         * UIProcess/WebContext.h:
2382         (WebKit::WebContext::sendToNetworkingProcess):
2383         (WebKit::WebContext::sendToNetworkingProcessRelaunchingIfNecessary):
2384
2385 2013-12-10  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2386
2387         Unreviewed EFL build fix
2388
2389         * CMakeLists.txt: Remove UIProcess/DrawingAreaProxy.cpp.
2390         * PlatformGTK.cmake: Add the file above.
2391
2392 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
2393
2394         [GTK] [CMake] Add support for building the WebKit injected bundle
2395         https://bugs.webkit.org/show_bug.cgi?id=116373
2396
2397         Reviewed by Gustavo Noronha Silva.
2398
2399         * PlatformGTK.cmake: Add support for building the InjectedBundle and link the WebKit2
2400         shared library against the GObject DOM bindings.
2401         * WebProcess/gtk/WebGtkExtensionManager.h: Properly export symbols used by the InjectedBundle.
2402
2403 2013-12-10  Kwang Yul Seo  <skyul@company100.net>
2404
2405         [WK2][SOUP] WebContext::setIgnoreTLSErrors should send SetIgnoreTLSErrors to the network process when network process is enabled
2406         https://bugs.webkit.org/show_bug.cgi?id=125505
2407
2408         Reviewed by Carlos Garcia Campos.
2409
2410         This is a follow-up patch for r160355.
2411
2412         * UIProcess/gtk/WebContextGtk.cpp:
2413         (WebKit::WebContext::setIgnoreTLSErrors):
2414
2415 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
2416
2417         Try to fix the EFL build
2418
2419         * CMakeLists.txt: Remove DrawingAreaImpl.cpp from the global list.
2420         * PlatformGTK.cmake: Move it to the GTK+ specific list.
2421
2422 2013-12-10  Martin Robinson  <mrobinson@igalia.com>
2423
2424         Various fixes for the CMake GTK+ build
2425
2426         Reviewed by Gustavo Noronha.
2427
2428         * CMakeLists.txt: Update the source lists.
2429         * PlatformGTK.cmake: Ditto.
2430
2431 2013-12-10  Alberto Garcia  <berto@igalia.com>
2432
2433         [WK2] [GTK] Enable the network process in the WebContext
2434         https://bugs.webkit.org/show_bug.cgi?id=125494
2435
2436         Reviewed by Carlos Garcia Campos.
2437
2438         This should be initialized using the setUsesNetworkProcess() API.
2439
2440         * UIProcess/API/gtk/WebKitWebContext.cpp:
2441         (createDefaultWebContext):
2442         * UIProcess/gtk/WebContextGtk.cpp:
2443         (WebKit::WebContext::platformInitializeWebProcess):
2444
2445 2013-12-10  Brian Holt  <brian.holt@samsung.com>
2446
2447         [WK2][SOUP] initialise the Network Process with ignoreTLSErrors
2448         https://bugs.webkit.org/show_bug.cgi?id=125490
2449
2450         ResourceHandleSoup in the Network Process and is not initialised with
2451         a policy on ignoring TLS errors.  This simply requires that the
2452         appropriate message is created for the Network Process and the
2453         parameter created for initialisation.
2454
2455         Reviewed by Gustavo Noronha Silva.
2456
2457         * NetworkProcess/NetworkProcess.h:
2458         * NetworkProcess/NetworkProcess.messages.in:
2459         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2460         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2461         (WebKit::NetworkProcess::setIgnoreTLSErrors):
2462         * Shared/Network/NetworkProcessCreationParameters.cpp:
2463         (WebKit::NetworkProcessCreationParameters::encode):
2464         (WebKit::NetworkProcessCreationParameters::decode):
2465         * Shared/Network/NetworkProcessCreationParameters.h:
2466         * UIProcess/gtk/WebContextGtk.cpp:
2467         (WebKit::WebContext::platformInitializeWebProcess):
2468         * UIProcess/soup/WebContextSoup.cpp:
2469         (WebKit::WebContext::platformInitializeNetworkProcess):
2470
2471 2013-12-09  Anders Carlsson  <andersca@apple.com>
2472
2473         Begin working on a UserData class intended to replace UserMessageCoders
2474         https://bugs.webkit.org/show_bug.cgi?id=125471
2475
2476         Reviewed by Sam Weinig.
2477
2478         * Shared/APIFrameHandle.cpp: Added.
2479         * Shared/APIFrameHandle.h: Added.
2480         Add a new API::FrameHandle class that represents a frame.
2481
2482         * Shared/APIObject.h:
2483         * Shared/APIPageHandle.cpp: Added.
2484         * Shared/APIPageHandle.h: Added.
2485         Add a new API::PageHandle class that represents a page.
2486
2487         * Shared/UserData.cpp: Added.
2488         (WebKit::UserData::UserData):
2489         (WebKit::UserData::~UserData):
2490         (WebKit::UserData::encode):
2491         (WebKit::UserData::decode):
2492         * Shared/UserData.h: Added.
2493         Add a UserData class that can be encoded and decoded. This will be used for sending data
2494          between the web process and UI process without doing any of the Page -> BundlePage etc conversions.
2495         * WebKit2.xcodeproj/project.pbxproj:
2496
2497 2013-12-09  Ryuan Choi  <ryuan.choi@samsung.com>
2498
2499         [EFL][WK2] LayoutTests are broken after r160301
2500         https://bugs.webkit.org/show_bug.cgi?id=125447
2501
2502         Reviewed by Darin Adler.
2503
2504         r160301 moved FullScreenManagerProxyClient logic to WebViewEfl, child class
2505         of CoordinatedGraphics::WebView, because implementations are EFL specific.
2506         However, CoordinatedGraphics::WebView creates WebPageProxy in constructor and
2507         WebPageProxy requires FullScreenManagerProxyClient in constructor.
2508         So, All WK2/Efl based applications got crashed
2509
2510         This patch adds virtual methods for FullScreenManagerProxyClient to CoordinatedGraphics::WebView
2511         so that WebPageProxy can get FullScreenManagerProxyClient instance without
2512         pure viertual methods.
2513
2514         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
2515         (WKViewExitFullScreen):
2516         * UIProcess/CoordinatedGraphics/WebView.cpp:
2517         (WebKit::WebView::fullScreenManagerProxyClient):
2518         (WebKit::WebView::requestExitFullScreen):
2519         renamed from exitFullScreen not to conflict with methods of FullScreenManagerProxyClient.
2520         * UIProcess/CoordinatedGraphics/WebView.h:
2521         * UIProcess/efl/WebViewEfl.cpp:
2522         * UIProcess/efl/WebViewEfl.h:
2523
2524 2013-12-09  Sergio Villar Senin  <svillar@igalia.com>
2525
2526         [WK2] Add UNIX_DOMAIN_SOCKETS specific bits for supporting NetworkProcess
2527         https://bugs.webkit.org/show_bug.cgi?id=110093
2528
2529         Reviewed by Martin Robinson.
2530
2531         Original patch by Balazs Kelemen <kbalazs@webkit.org>.
2532
2533         Adds the UNIX specific bits to support connections to the
2534         NetworkProcess. Since the process of creating the pair of sockets
2535         is exactly the same as in the PluginProcess, I've decided to
2536         refactor it in ConnectionUnix::createPlatformConnection(). This
2537         can be reused later to create a cross-platform solution and remove
2538         all the ifdefs (see bug 110978).
2539
2540         * NetworkProcess/NetworkProcess.cpp:
2541         (WebKit::NetworkProcess::createNetworkConnectionToWebProcess):
2542         * Platform/CoreIPC/Connection.h:
2543         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
2544         (CoreIPC::Connection::createPlatformConnection):
2545         * PluginProcess/PluginProcess.cpp:
2546         (WebKit::PluginProcess::createWebProcessConnection):
2547         * UIProcess/Network/NetworkProcessProxy.cpp:
2548         (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch):
2549         (WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):
2550         * WebProcess/WebProcess.cpp:
2551         (WebKit::WebProcess::ensureNetworkProcessConnection):
2552
2553 2013-12-09  Kwang Yul Seo  <skyul@company100.net>
2554
2555         [WK2][Soup] Support cache model in NetworkProcess
2556         https://bugs.webkit.org/show_bug.cgi?id=118343
2557
2558         Reviewed by Carlos Garcia Campos.
2559
2560         Original patch by Kwang Yul Seo <skyul@company100.net> and Csaba Osztrogonác <ossy@webkit.org>.
2561
2562         Copied cache model code from WebProcess.
2563         NetworkProcess is configured not to use the WebCore memory cache.
2564
2565         * NetworkProcess/soup/NetworkProcessSoup.cpp:
2566         (WebKit::getCacheDiskFreeSize):
2567         (WebKit::getMemorySize):
2568         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
2569         Initialize soup cache.
2570         (WebKit::NetworkProcess::platformSetCacheModel):
2571         Copied code from WebProcess::platformSetCacheModel but removed
2572         WebCore memory cache initialization because NetworkProcess does not use
2573         the WebCore memory cache.
2574         (WebKit::NetworkProcess::clearCacheForAllOrigins):
2575         Copied code from WebProcess::clearCacheForAllOrigins.
2576         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
2577         Copied initialization code from WebProcessMainGtk.cpp.
2578         (WebKit::NetworkProcessMain):
2579         * WebProcess/soup/WebProcessSoup.cpp:
2580         (WebKit::WebProcess::platformSetCacheModel):
2581         Don't set the disk cache if NetworkProcess is used.
2582         (WebKit::WebProcess::platformClearResourceCaches):
2583         Don't clear the non-existing disk cache. (if NetworkProcess is used)
2584         (WebKit::WebProcess::platformInitializeWebProcess):
2585         Don't initialize the disk cache if NetworkProcess is used.
2586
2587 2013-12-09  Gustavo Noronha Silva  <gns@gnome.org>
2588
2589         [GTK] run-webkit-tests may DOS the system, specially in debug builds
2590         https://bugs.webkit.org/show_bug.cgi?id=125436
2591
2592         Reviewed by Martin Robinson.
2593
2594         * GNUmakefile.am: use -no-fast-install for WebKitWebProcess and WebKitPluginProcess so
2595         they do not need to be relinked the first time they are executed in-tree.
2596
2597 2013-12-09  Zan Dobersek  <zdobersek@igalia.com>
2598
2599         [GTK][WK2] Move WebFullScreenManagerProxyGtk logic to PageClientImpl
2600         https://bugs.webkit.org/show_bug.cgi?id=125440
2601
2602         Reviewed by Martin Robinson.
2603
2604         Make PageClientImpl a WebFullScreenManagerProxyClient. This brings the GTK port in line
2605         with changes in r160296 and fixes the WK2 build for that port.
2606
2607         * GNUmakefile.list.am:
2608         * UIProcess/API/gtk/PageClientImpl.cpp:
2609         (WebKit::PageClientImpl::fullScreenManagerProxyClient):
2610         (WebKit::PageClientImpl::closeFullScreenManager):
2611         (WebKit::PageClientImpl::isFullScreen):
2612         (WebKit::PageClientImpl::enterFullScreen):
2613         (WebKit::PageClientImpl::exitFullScreen):
2614         (WebKit::PageClientImpl::beganEnterFullScreen):
2615         (WebKit::PageClientImpl::beganExitFullScreen):
2616         * UIProcess/API/gtk/PageClientImpl.h:
2617         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2618         (webkitWebViewBaseCreateWebPage):
2619         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
2620
2621 2013-12-09  Brian Holt  <brian.holt@samsung.com>
2622
2623         [WK2][Gtk] Add support for ENABLE_NETWORK_PROCESS to the build system
2624         https://bugs.webkit.org/show_bug.cgi?id=118231
2625
2626         Reviewed by Martin Robinson.
2627
2628         Original patch by Kwang Yul Seo  <skyul@company100.net>.
2629
2630         Add source files to the build system and build NetworkProcess executable.
2631
2632         * GNUmakefile.am:
2633         * GNUmakefile.list.am:
2634         * NetworkProcess/unix/NetworkProcessMainUnix.cpp:
2635         * UIProcess/gtk/WebContextGtk.cpp:
2636         (WebKit::WebContext::platformInitializeWebProcess):
2637
2638 2013-12-08  Ryuan Choi  <ryuan.choi@samsung.com>
2639
2640         [EFL][WK2] Move FullScreenManager logic to WebViewEfl
2641         https://bugs.webkit.org/show_bug.cgi?id=125438
2642
2643         Reviewed by Gyuyoung Kim.
2644
2645         This patch fixed build break on EFL port Since r160296.
2646
2647         * PlatformEfl.cmake: Removed WebFullScreenManagerProxyEfl.cpp.
2648         * UIProcess/WebFullScreenManagerProxy.cpp: Removed EFL specific code.
2649         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
2650         * UIProcess/WebFullScreenManagerProxy.h: Ditto.
2651         * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: Removed file and moved logic to WebViewEfl.
2652         * UIProcess/efl/WebViewEfl.cpp:
2653         (WebKit::WebViewEfl::WebViewEfl):
2654         (WebKit::WebViewEfl::setEwkView): Removed call to setWebView().
2655         (WebKit::WebViewEfl::fullScreenManagerProxyClient):
2656         (WebKit::WebViewEfl::isFullScreen):
2657         (WebKit::WebViewEfl::enterFullScreen):
2658         (WebKit::WebViewEfl::exitFullScreen):
2659         * UIProcess/efl/WebViewEfl.h:
2660
2661 2013-12-08  Sam Weinig  <sam@webkit.org>
2662
2663         Remove WebContext::sharedProcessContext()
2664         https://bugs.webkit.org/show_bug.cgi?id=125437
2665
2666         Reviewed by Dan Bernstein.
2667
2668         * UIProcess/API/ios/WKGeolocationProviderIOS.mm:
2669         * UIProcess/WebContext.cpp:
2670         * UIProcess/WebContext.h:
2671
2672 2013-12-08  Sam Weinig  <sam@webkit.org>
2673
2674         Fix the iOS build.
2675
2676         * UIProcess/API/ios/PageClientImplIOS.h:
2677         * UIProcess/API/ios/PageClientImplIOS.mm:
2678         * UIProcess/ios/WebFullScreenManagerProxyIOS.mm: Removed.
2679
2680 2013-12-08  Sam Weinig  <sam@webkit.org>
2681
2682         [Cocoa] Remove knowledge of the WKView from the WebFullScreenManagerProxy by adding a proper client
2683         https://bugs.webkit.org/show_bug.cgi?id=125427
2684
2685         Reviewed by Dan Bernstein.
2686
2687         * UIProcess/API/mac/PageClientImpl.h:
2688         * UIProcess/API/mac/PageClientImpl.mm:
2689         (WebKit::PageClientImpl::fullScreenManagerProxyClient):
2690         (WebKit::PageClientImpl::closeFullScreenManager):
2691         (WebKit::PageClientImpl::isFullScreen):
2692         (WebKit::PageClientImpl::enterFullScreen):
2693         (WebKit::PageClientImpl::exitFullScreen):
2694         (WebKit::PageClientImpl::beganEnterFullScreen):
2695         (WebKit::PageClientImpl::beganExitFullScreen):
2696         Implement the new client.
2697
2698         * UIProcess/API/mac/WKView.mm:
2699         Remove call to setWebView() and do some cleanup.
2700
2701         * UIProcess/API/mac/WKViewInternal.h:
2702         Convert to property syntax and re-arrange.
2703
2704         * UIProcess/PageClient.h:
2705         Expose access to the new client.
2706
2707         * UIProcess/WebFullScreenManagerProxy.cpp:
2708         (WebKit::WebFullScreenManagerProxy::create):
2709         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy):
2710         (WebKit::WebFullScreenManagerProxy::invalidate):
2711         (WebKit::WebFullScreenManagerProxy::close):
2712         (WebKit::WebFullScreenManagerProxy::isFullScreen):
2713         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
2714         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
2715         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
2716         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
2717         * UIProcess/WebFullScreenManagerProxy.h:
2718         Use the new client.
2719
2720         * UIProcess/WebPageProxy.cpp:
2721         Pass the new client.
2722
2723         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
2724         Removed. Now goes through the client.
2725
2726         * WebKit2.xcodeproj/project.pbxproj:
2727         Remove WebFullScreenManagerProxyMac.mm.
2728
2729 2013-12-07  Sam Weinig  <sam@webkit.org>
2730
2731         [Cocoa] Remove webProcessPlugInInitialize: from the WKWebProcessPlugIn protocol
2732         https://bugs.webkit.org/show_bug.cgi?id=125405
2733
2734         Reviewed by Dan Bernstein.
2735
2736         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
2737         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2738         (WebKit::InjectedBundle::load):
2739
2740 2013-12-08  Brian Holt  <brian.holt@samsung.com>
2741
2742         [WK2] Guard include of SecItemShim.h with ENABLE(SEC_ITEM_SHIM)
2743         https://bugs.webkit.org/show_bug.cgi?id=125415
2744
2745         Reviewed by Gustavo Noronha Silva.
2746
2747         * NetworkProcess/NetworkProcess.cpp:
2748         * UIProcess/Network/NetworkProcessProxy.cpp:
2749
2750 2013-12-07  Sam Weinig  <sam@webkit.org>
2751
2752         [Cocoa] Make WKWebProcessPlugInController work with WKObject wrapping
2753         https://bugs.webkit.org/show_bug.cgi?id=125404
2754
2755         Reviewed by Dan Bernstein.
2756
2757         * Shared/Cocoa/APIObject.mm:
2758         (API::Object::newObject):
2759         * Shared/mac/ObjCObjectGraphCoders.mm:
2760         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
2761         (-[WKWebProcessPlugInController dealloc]):
2762         (didCreatePage):
2763         (willDestroyPage):
2764         (-[WKWebProcessPlugInController _setPrincipalClassInstance:]):
2765         (-[WKWebProcessPlugInController API::]):
2766         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
2767         (WebKit::wrapper):
2768         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInPrivate.h:
2769         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2770         (WebKit::InjectedBundle::load):
2771
2772 2013-12-07  Dan Bernstein  <mitz@apple.com>
2773
2774         [Cocoa] WebData has a generic wrapper
2775         https://bugs.webkit.org/show_bug.cgi?id=125402
2776
2777         Reviewed by Sam Weinig.
2778
2779         Added WKNSData, an NSData subclass that conforms to WKObject and wraps a WebData.
2780
2781         * Shared/Cocoa/APIObject.mm:
2782         (API::Object::newObject): Allocate a WKNSData if the API::Object is data.
2783         * Shared/Cocoa/WKNSData.h: Added.
2784         (WebKit::wrapper): Added. Returns a WebData’s wrapper as an NSData.
2785         * Shared/Cocoa/WKNSData.mm: Added.
2786         (-[WKNSData dealloc]): Calls the WebData destructor.
2787         (-[WKNSData length]): Added.
2788         (-[WKNSData bytes]): Added.
2789         (-[WKNSData copyWithZone:]): Retains self.
2790         (-[WKNSData _apiObject]): Returns the wrapped WebData.
2791         * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
2792
2793 2013-12-07  Sam Weinig  <sam@webkit.org>
2794
2795         [Cocoa] Make WKWebProcessPlugInBrowserContextController work with WKObject wrapping
2796         https://bugs.webkit.org/show_bug.cgi?id=125403
2797
2798         Reviewed by Dan Bernstein.
2799
2800         * Shared/Cocoa/APIObject.mm:
2801         (API::Object::newObject):
2802         * Shared/mac/ObjCObjectGraphCoders.mm:
2803         (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode):
2804         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
2805         (didCreatePage):
2806         (willDestroyPage):
2807         (setUpBundleClient):
2808         (-[WKWebProcessPlugInController _initWithPrincipalClassInstance:bundle:]):
2809         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2810         (-[WKWebProcessPlugInBrowserContextController dealloc]):
2811         (-[WKWebProcessPlugInBrowserContextController mainFrameDocument]):
2812         (-[WKWebProcessPlugInBrowserContextController selectedRange]):
2813         (-[WKWebProcessPlugInBrowserContextController API::]):
2814         (-[WKWebProcessPlugInBrowserContextController _bundlePageRef]):
2815         (-[WKWebProcessPlugInBrowserContextController handle]):
2816         (+[WKWebProcessPlugInBrowserContextController lookUpBrowsingContextFromHandle:]):
2817         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h:
2818         (WebKit::wrapper):
2819         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
2820         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2821         (WebKit::InjectedBundle::load):
2822
2823 2013-12-07  Gustavo Noronha Silva  <gns@gnome.org>
2824
2825         Fix API test expectation following 160220.
2826
2827         Rubber-stamped by Martin Robinson.
2828
2829         * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp:
2830         (testAtspiBasicHierarchy): check for ATK_ROLE_DOCUMENT_WEB instead of ATK_ROLE_DOCUMENT_FRAME.
2831
2832 2013-12-06  Enrica Casucci  <enrica@apple.com>
2833
2834         Make insertText message asynchronous for iOS.
2835
2836         Reviewed by Benjamin Poulain.
2837
2838         * UIProcess/ios/WebPageProxyIOS.mm:
2839         (WebKit::WebPageProxy::insertText):
2840         * WebProcess/WebPage/WebPage.h:
2841         * WebProcess/WebPage/WebPage.messages.in:
2842         * WebProcess/WebPage/ios/WebPageIOS.mm:
2843         (WebKit::WebPage::insertText):
2844
2845 2013-12-05  Jer Noble  <jer.noble@apple.com>
2846
2847         [MSE] Add a runtime-setting for the MediaSource constructor.
2848         https://bugs.webkit.org/show_bug.cgi?id=125336
2849
2850         Reviewed by Eric Carlson.
2851
2852         Add a private WKPreferences API to control the WebCore mediaSourceEnabled setting.
2853
2854         * Shared/WebPreferencesStore.h:
2855         * UIProcess/API/C/WKPreferences.cpp:
2856         (WKPreferencesSetMediaSourceEnabled):
2857         (WKPreferencesGetMediaSourceEnabled):
2858         * UIProcess/API/C/WKPreferencesPrivate.h:
2859         * WebProcess/WebPage/WebPage.cpp:
2860         (WebKit::WebPage::updatePreferences):
2861
2862 2013-12-06  Dan Bernstein  <mitz@apple.com>
2863
2864         <rdar://problem/15606872> REGRESSION (r160148): Mail throws an exception during launch
2865         https://bugs.webkit.org/show_bug.cgi?id=125362
2866
2867         Reviewed by Sam Weinig.
2868
2869         There were two problems in how WKConnection was made to work with WKObject: first,
2870         API::Object::newObject() was not updated to allocate the correct wrapper class, and second,
2871         WebConnection has subclasses with additional data members, which don’t fit in the object
2872         storage ivar.
2873
2874         * Shared/Cocoa/APIObject.mm:
2875         (API::Object::newObject): Changed to allocate a WKConnection of the required size.
2876         * UIProcess/API/Cocoa/WKConnection.mm:
2877         Removed _connection ivar.
2878         (-[WKConnection dealloc]): Changed to use -_connection accessor instead of ivar.
2879         (-[WKConnection setDelegate:]): Ditto.
2880         (-[WKConnection sendMessageWithName:body:]): Ditto.
2881         (-[WKConnection remoteObjectRegistry]): Ditto.
2882         (-[WKConnection _connection]): Added.
2883         (-[WKConnection _apiObject]): Changed to return the object in the instance extra storage.
2884
2885 2013-12-06  Dan Bernstein  <mitz@apple.com>
2886
2887         [Cocoa] Add load delegate methods for responding to authentication challenges
2888         https://bugs.webkit.org/show_bug.cgi?id=125333
2889
2890         Reviewed by Darin Adler.
2891
2892         * Shared/Cocoa/APIObject.mm:
2893         (API::Object::newObject): Allocate a WKNSURLAuthenticationChallenge if the object is an
2894         AuthenticationChallengeProxy.
2895
2896         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
2897         (canAuthenticateAgainstProtectionSpaceInFrame): Implemented this WKPageLoaderClient callback
2898         by calling the load delegate.
2899         (didReceiveAuthenticationChallengeInFrame): Ditto.
2900         (setUpPageLoaderClient): Set the above callbacks in the client structure.
2901
2902         * UIProcess/API/Cocoa/WKBrowsingContextLoadDelegatePrivate.h: Added. Declares two new
2903         delegate methods.
2904
2905         * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.h: Added.
2906         (WebKit::wrapper): Added. Returns an AuthenticationChallengeProxy’s wrapper as an
2907         NSURLAuthenticationChallenge.
2908         * UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm: Added.
2909         (-[WKNSURLAuthenticationChallenge _web_createTarget]): Override this WKObject method to
2910         return a copy of the challenge with the sender set to a shared instance of
2911         WKNSURLAuthenticationChallengeSender.
2912         (-[WKNSURLAuthenticationChallenge _web_authenticationChallengeProxy]): Added. Returns the
2913         wrapped object.
2914         (-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]): Added. Calls
2915         AuthenticationDecisionListener::cancel.
2916         (-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]):
2917         Added. Calls AuthenticationDecisionListener::useCredential, passing nullptr.
2918         (-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Added.
2919         Calls AuthenticationDecisionListener::useCredential, passing the credential.
2920
2921         * WebKit2.xcodeproj/project.pbxproj: Added references to new files.
2922
2923 2013-12-05  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2924
2925         Introduce IMAGE_TYPE_CASTS, and use it
2926         https://bugs.webkit.org/show_bug.cgi?id=125330
2927
2928         Reviewed by Ryosuke Niwa.
2929
2930         As a step to use TYPE_CASTS_BASE, this cl introduce IMAGE_TYPE_CASTS.
2931         BitmapImage, SVGImage can use it to generate toFoo() type case helper functions.
2932
2933         * WebProcess/Plugins/PluginView.cpp:
2934         (WebKit::PluginView::pluginSnapshotTimerFired):
2935
2936 2013-12-05  Mark Lam  <mark.lam@apple.com>
2937
2938         C Loop LLINT layout test regressions.
2939         https://bugs.webkit.org/show_bug.cgi?id=125314.
2940
2941         Reviewed by Geoffrey Garen.
2942
2943         The regression was due to the ENABLE_LLINT_C_LOOP flag not being included
2944         in the build of the WebKit and WebKit2 components. As a result, some fields
2945         in JSC::VM were ifdef'ed out in WebCore and JSC, but not in WebKit and
2946         WebKit2. This resulted in VM::m_initializingObjectClass having 2 different
2947         offsets depending on whether it is accessed from WebCore and JSC or from
2948         WebKit and WebKit2, and chaos ensued.
2949
2950         This issue will manifest when we pass --cloop to build-webkit.
2951         The fix is simply to add ENABLE_LLINT_C_LOOP to FEATURE_DEFINES for WebKit
2952         and WebKit2.
2953
2954         * Configurations/FeatureDefines.xcconfig:
2955
2956 2013-12-04  Oliver Hunt  <oliver@apple.com>
2957
2958         Refactor static getter function prototype to include thisValue in addition to the base object
2959         https://bugs.webkit.org/show_bug.cgi?id=124461
2960
2961         Reviewed by Geoffrey Garen.
2962
2963         Update the WK2 JSC usage to the new static getter API
2964
2965         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2966         (WebKit::callMethod):
2967         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2968         (WebKit::callNPJSObject):
2969         (WebKit::constructWithConstructor):
2970         (WebKit::JSNPObject::propertyGetter):
2971         (WebKit::JSNPObject::methodGetter):
2972         * WebProcess/Plugins/Netscape/JSNPObject.h:
2973         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2974         (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
2975         (WebKit::NPRuntimeObjectMap::finalize):
2976         * WebProcess/WebPage/WebFrame.cpp:
2977         (WebKit::WebFrame::frameForContext):
2978         (WebKit::WebFrame::counterValue):
2979
2980 2013-12-05  Commit Queue  <commit-queue@webkit.org>
2981
2982         Unreviewed, rolling out r160133.
2983         http://trac.webkit.org/changeset/160133
2984         https://bugs.webkit.org/show_bug.cgi?id=125325
2985
2986         broke bindings tests on all the bots (Requested by thorton on
2987         #webkit).
2988
2989         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2990         (WebKit::callMethod):
2991         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2992         (WebKit::callNPJSObject):
2993         (WebKit::constructWithConstructor):
2994         (WebKit::JSNPObject::propertyGetter):
2995         (WebKit::JSNPObject::methodGetter):
2996         * WebProcess/Plugins/Netscape/JSNPObject.h:
2997         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2998         (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
2999         (WebKit::NPRuntimeObjectMap::finalize):
3000         * WebProcess/WebPage/WebFrame.cpp:
3001         (WebKit::WebFrame::counterValue):
3002
3003 2013-12-05  Chris Fleizach  <cfleizach@apple.com>
3004
3005         AX: Seed: safari extension installation crashes safari under voice over and freezes voice over
3006         https://bugs.webkit.org/show_bug.cgi?id=125308
3007
3008         Reviewed by Anders Carlsson.
3009
3010         Much like Javascript alerts, we need to allow accessibility clients to continue to interact with the WebProcess thread
3011         when using dispatchDecidePolicyResponses.
3012
3013         * Platform/CoreIPC/MessageSender.h:
3014         (CoreIPC::MessageSender::sendSync):
3015         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3016         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
3017
3018 2013-12-05  Anders Carlsson  <andersca@apple.com>
3019
3020         "Use Selection for Find" doesn't work in PDF viewed in Safari
3021         https://bugs.webkit.org/show_bug.cgi?id=125319
3022         <rdar://problem/15486983>
3023
3024         Reviewed by Tim Horton.
3025
3026         * WebProcess/Plugins/PDF/PDFPlugin.h:
3027         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3028         (-[WKPDFLayerControllerDelegate writeItemsToPasteboard:withTypes:]):
3029         Pass NSGeneralPboard to writeItemsToPasteboard.
3030
3031         (WebKit::PDFPlugin::handleEditingCommand):
3032         Handle takeFindStringFromSelection by getting the current selection string and writing it to the find pasteboard.
3033
3034         (WebKit::PDFPlugin::isEditingCommandEnabled):
3035         Handle takeFindStringFromSelection.
3036
3037         (WebKit::PDFPlugin::writeItemsToPasteboard):
3038         Update this to take a pasteboard name.
3039
3040 2013-12-05  Anders Carlsson  <andersca@apple.com>
3041
3042         WebKit2 API should use weak ownership for delegate properties rather than assign
3043         https://bugs.webkit.org/show_bug.cgi?id=125316
3044         <rdar://problem/15560614>
3045
3046         Reviewed by Dan Bernstein.
3047
3048         Use WeakObjCPtr for the delegates.
3049
3050         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
3051         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3052         (didStartProvisionalLoadForFrame):
3053         (didReceiveServerRedirectForProvisionalLoadForFrame):
3054         (didFailProvisionalLoadWithErrorForFrame):
3055         (didCommitLoadForFrame):
3056         (didFinishLoadForFrame):
3057         (didFailLoadWithErrorForFrame):
3058         (didStartProgress):
3059         (didChangeProgress):
3060         (didFinishProgress):
3061         (didChangeBackForwardList):
3062         (setUpPagePolicyClient):
3063         (-[WKBrowsingContextController loadDelegate]):
3064         (-[WKBrowsingContextController setLoadDelegate:]):
3065         (-[WKBrowsingContextController policyDelegate]):
3066         (-[WKBrowsingContextController setPolicyDelegate:]):
3067         (-[WKBrowsingContextController historyDelegate]):
3068         (-[WKBrowsingContextController setHistoryDelegate:]):
3069         * UIProcess/API/Cocoa/WKBrowsingContextControllerInternal.h:
3070         * UIProcess/API/Cocoa/WKConnection.mm:
3071         (didReceiveMessage):
3072         (didClose):
3073         (-[WKConnection delegate]):
3074         (-[WKConnection setDelegate:]):
3075         * UIProcess/API/Cocoa/WKProcessGroup.mm:
3076         (didCreateConnection):
3077         (getInjectedBundleInitializationUserData):
3078         (didNavigateWithNavigationData):
3079         (didPerformClientRedirect):
3080         (didPerformServerRedirect):
3081         (didUpdateHistoryTitle):
3082         (-[WKProcessGroup delegate]):
3083         (-[WKProcessGroup setDelegate:]):
3084
3085 2013-12-05  Anders Carlsson  <andersca@apple.com>
3086
3087         Tweak WeakObjCPtr
3088         https://bugs.webkit.org/show_bug.cgi?id=125311
3089
3090         Reviewed by Darin Adler.
3091
3092         Make it possible to use WeakObjCPtr with pointer types such as id. Also,
3093         add a getAutoreleased() member that will load the weak pointer and retain + autorelease it.
3094
3095         * Shared/mac/WeakObjCPtr.h:
3096         (WebKit::WeakObjCPtr::WeakObjCPtr):
3097         (WebKit::WeakObjCPtr::operator=):
3098         (WebKit::WeakObjCPtr::get):
3099         (WebKit::WeakObjCPtr::getAutoreleased):
3100
3101 2013-12-05  Zan Dobersek  <zdobersek@igalia.com>
3102
3103         [GTK][WK2] Clean up WorkQueueGtk
3104         https://bugs.webkit.org/show_bug.cgi?id=125177
3105
3106         Reviewed by Carlos Garcia Campos.
3107
3108         Clean up the GTK implementation of the WorkQueue class a bit.
3109         - registerSocketEventHandler doesn't take a condition argument anymore -- G_IO_IN was the only condition ever passed into
3110         that method so that is now the hard-coded default.
3111         - Clean up the declarations of GTK-specific bits in the WorkQueue header file. SocketEventSourceIterator typedef is removed
3112         and auto will be used instead.
3113         - WorkQueue::dispatchOnTermination and WorkQueue::SocketEventSource::performWorkOnTermination methods were unused and now removed.
3114         - WorkQueue::SocketEventSource doesn't expect a GIO condition anymore, and WorkQueue::SocketEventSource::checkCondition is removed.
3115         G_IO_IN condition was the only one used is now hard-coded into the check in WorkQueue::SocketEventSource::eventCallback.
3116         - Removed an unnecessary non-null assertion for the heap-allocated SocketEventSource.
3117         - Removed a technically duplicated assertion that a file descriptor is already present in the event sources map. Moved the
3118         assertion before the HashMap::find() call.
3119         - Removed two unnecessary assertions that non-null values are being returned by g_idle_source_new() and g_timeout_source_new().
3120         Both functions are guaranteed to return non-null values.
3121
3122         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
3123         (CoreIPC::Connection::open):
3124         * Platform/WorkQueue.h:
3125         * Platform/gtk/WorkQueueGtk.cpp:
3126         (WorkQueue::SocketEventSource::SocketEventSource):
3127         (WorkQueue::SocketEventSource::eventCallback):
3128         (WorkQueue::registerSocketEventHandler):
3129         (WorkQueue::unregisterSocketEventHandler):
3130         (WorkQueue::dispatch):
3131         (WorkQueue::dispatchAfterDelay):
3132
3133 2013-12-04  Gergo Balogh  <geryxyz@inf.u-szeged.hu>
3134
3135         Report error when #else is used in message receiver generator's input.
3136         https://bugs.webkit.org/show_bug.cgi?id=124147
3137
3138         Reviewed by Csaba Osztrogonác.
3139
3140         * Scripts/webkit2/messages_unittest.py:
3141         (UnsupportedPrecompilerDirectiveTest):
3142         (UnsupportedPrecompilerDirectiveTest.test_error_at_else):
3143         (UnsupportedPrecompilerDirectiveTest.test_error_at_elif):
3144         * Scripts/webkit2/parser.py:
3145         (parse):
3146
3147 2013-12-04  Sam Weinig  <sam@webkit.org>
3148
3149         [Cocoa] Make WKConnection work with WKObject wrapping
3150         https://bugs.webkit.org/show_bug.cgi?id=125266
3151
3152         Reviewed by Dan Bernstein.
3153
3154         * UIProcess/API/Cocoa/WKConnection.mm:
3155         (-[WKConnection dealloc]):
3156         (didReceiveMessage):
3157         (didClose):
3158         (setUpClient):
3159         (-[WKConnection delegate]):
3160         (-[WKConnection setDelegate:]):
3161         (-[WKConnection sendMessageWithName:body:]):
3162         (-[WKConnection remoteObjectRegistry]):
3163         (-[WKConnection API::]):
3164         * UIProcess/API/Cocoa/WKConnectionInternal.h:
3165         (WebKit::wrapper):
3166         * UIProcess/API/Cocoa/WKProcessGroup.mm:
3167         (didCreateConnection):
3168         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
3169         (-[WKWebProcessPlugInController _initWithPrincipalClassInstance:bundleRef:]):
3170         (-[WKWebProcessPlugInController connection]):
3171         (-[WKWebProcessPlugInController _bundleRef]):
3172
3173 2013-12-04  Anders Carlsson  <andersca@apple.com>
3174
3175         Add a WeakObjCPtr class
3176         https://bugs.webkit.org/show_bug.cgi?id=125267
3177
3178         Reviewed by Geoffrey Garen.
3179
3180         WeakObjCPtr is a zeroing weak reference class template that will be used for delegates.
3181
3182         * Shared/mac/WeakObjCPtr.h: Added.
3183         (WebKit::WeakObjCPtr::WeakObjCPtr):
3184         (WebKit::WeakObjCPtr::~WeakObjCPtr):
3185         (WebKit::WeakObjCPtr::operator=):
3186         (WebKit::WeakObjCPtr::get):
3187         * WebKit2.xcodeproj/project.pbxproj:
3188
3189 2013-12-04  Ryuan Choi  <ryuan.choi@samsung.com>
3190
3191         Unreviewed EFL build fix after r160135
3192
3193         * CMakeLists.txt: Added rendering/line to include lists.
3194
3195 2013-12-04  Anders Carlsson  <andersca@apple.com>
3196
3197         Make the estimatedProgress property observable using KVO
3198         https://bugs.webkit.org/show_bug.cgi?id=125259
3199
3200         Reviewed by Dan Bernstein.
3201
3202         * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
3203         * UIProcess/PageLoadState.cpp:
3204         (WebKit::PageLoadState::PageLoadState):
3205         (WebKit::PageLoadState::reset):
3206         (WebKit::PageLoadState::activeURL):
3207         (WebKit::PageLoadState::estimatedProgress):
3208         (WebKit::PageLoadState::setPendingAPIRequestURL):
3209         (WebKit::PageLoadState::clearPendingAPIRequestURL):
3210         (WebKit::PageLoadState::didStartProgress):
3211         (WebKit::PageLoadState::didChangeProgress):
3212         (WebKit::PageLoadState::didFinishProgress):
3213         * UIProcess/PageLoadState.h:
3214         Move m_estimatedProgress to the page load state and call the observers when it changes.
3215
3216         * UIProcess/WebPageProxy.cpp:
3217         (WebKit::WebPageProxy::WebPageProxy):
3218         (WebKit::WebPageProxy::estimatedProgress):
3219         (WebKit::WebPageProxy::didStartProgress):
3220         (WebKit::WebPageProxy::didChangeProgress):
3221         (WebKit::WebPageProxy::didFinishProgress):
3222         (WebKit::WebPageProxy::resetState):
3223         Call through to m_pageLoadState.
3224
3225         * UIProcess/WebPageProxy.h:
3226
3227 2013-12-04  Nick Diego Yamane  <nick.yamane@openbossa.org>
3228
3229         [WK2] Including SecItemShim.h should be guarded by ENABLE(SEC_ITEM_SHIM)
3230         https://bugs.webkit.org/show_bug.cgi?id=125255
3231
3232         Reviewed by Anders Carlsson.
3233
3234         * UIProcess/WebProcessProxy.cpp:
3235         * WebProcess/WebProcess.cpp:
3236
3237 2013-12-04  Oliver Hunt  <oliver@apple.com>
3238
3239         Refactor static getter function prototype to include thisValue in addition to the base object
3240         https://bugs.webkit.org/show_bug.cgi?id=124461
3241
3242         Reviewed by Geoffrey Garen.
3243
3244         Update the WK2 JSC usage to the new static getter API
3245
3246         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
3247         (WebKit::callMethod):
3248         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3249         (WebKit::callNPJSObject):
3250         (WebKit::constructWithConstructor):
3251         (WebKit::JSNPObject::propertyGetter):
3252         (WebKit::JSNPObject::methodGetter):
3253         * WebProcess/Plugins/Netscape/JSNPObject.h:
3254         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3255         (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
3256         (WebKit::NPRuntimeObjectMap::finalize):
3257         * WebProcess/WebPage/WebFrame.cpp:
3258         (WebKit::WebFrame::frameForContext):
3259         (WebKit::WebFrame::counterValue):
3260
3261 2013-12-04  Anders Carlsson  <andersca@apple.com>
3262
3263         Add a loading property to WKBrowsingContextController
3264         https://bugs.webkit.org/show_bug.cgi?id=125256
3265
3266         Reviewed by Dan Bernstein.
3267
3268         * UIProcess/API/Cocoa/WKBrowsingContextController.h:
3269         Add loading property.
3270
3271         * UIProcess/API/Cocoa/WKBrowsingContextConteroller.mm:
3272         Implement willChangeIsLoading and didChangeIsLoading and call the relevant KVO methods.
3273
3274         (-[WKBrowsingContextController isLoading]):
3275         Call through to the PageLoadState.
3276
3277         * UIProcess/PageLoadState.cpp:
3278         (WebKit::PageLoadState::reset):
3279         Use setState.
3280
3281         (WebKit::PageLoadState::isLoading):
3282         Call isLoadingState.
3283
3284         (WebKit::PageLoadState::didStartProvisionalLoad):
3285         Use setState.
3286
3287         (WebKit::PageLoadState::didFailProvisionalLoad):
3288         Use setState.
3289
3290         (WebKit::PageLoadState::didCommitLoad):
3291         Use setState.
3292
3293         (WebKit::PageLoadState::didFinishLoad):
3294         Use setState.
3295
3296         (WebKit::PageLoadState::didFailLoad):
3297         Use setState.
3298
3299         (WebKit::PageLoadState::isLoadingState):
3300         Helper function for determining whether a state is a loading state or not.
3301
3302         (WebKit::PageLoadState::setState):
3303         If setting the state will cause "isLoading" to change, call out to the observers.
3304
3305         * UIProcess/PageLoadState.h:
3306
3307 2013-12-04  Nick Diego Yamane  <nick.yamane@openbossa.org>
3308
3309         [EFL][GTK][WK2] Remove unnecessary reinterpret_casts when setting API clients
3310         https://bugs.webkit.org/show_bug.cgi?id=125231
3311
3312         Reviewed by Anders Carlsson.
3313
3314         After r159988, WKClients have to be instantiated with a specific
3315         version of that client and its Base field has to used when setting it.
3316         Eg:
3317
3318             WKFullScreenClientV0 wkClient = {
3319                 {
3320                     0, // version
3321                     this, // clientInfo
3322                 },
3323                     willEnterFullScreen,
3324                     willExitFullScreen
3325             };
3326             WKViewSetFullScreenClientGtk(this, &wkClient.base);
3327
3328         So we don't need the reinterpret_casts introduced in r160075.
3329
3330         * UIProcess/API/gtk/WebKitFullscreenClient.cpp:
3331         (attachFullScreenClientToView): reinterpret_cast<WKFooClientBase*>(&client) -> &client.base
3332         * UIProcess/API/gtk/WebKitRequestManagerClient.cpp:
3333         (attachRequestManagerClientToContext): Ditto.
3334         * UIProcess/API/gtk/WebKitTextChecker.cpp:
3335         (WebKitTextChecker::WebKitTextChecker): Ditto.
3336         * UIProcess/API/gtk/WebKitWebInspector.cpp:
3337         (webkitWebInspectorCreate): Ditto.
3338         * UIProcess/efl/BatteryProvider.cpp:
3339         (BatteryProvider::BatteryProvider): Ditto.
3340         * UIProcess/efl/NetworkInfoProvider.cpp:
3341         (NetworkInfoProvider::NetworkInfoProvider): Ditto.
3342         * UIProcess/efl/PageUIClientEfl.cpp:
3343         (WebKit::PageUIClientEfl::PageUIClientEfl): Ditto.
3344         * UIProcess/efl/RequestManagerClientEfl.cpp:
3345         (WebKit::RequestManagerClientEfl::RequestManagerClientEfl): Ditto.
3346         * UIProcess/efl/TextCheckerClientEfl.cpp:
3347         (TextCheckerClientEfl::TextCheckerClientEfl): Ditto.
3348         * UIProcess/efl/VibrationClientEfl.cpp:
3349         (VibrationClientEfl::VibrationClientEfl): Ditto.
3350         * UIProcess/efl/ViewClientEfl.cpp:
3351         (WebKit::ViewClientEfl::ViewClientEfl): Ditto.
3352
3353 2013-12-04  Nick Diego Yamane  <nick.yamane@openbossa.org>
3354
3355         [GTK][WK2] Fix build after r160104
3356         https://bugs.webkit.org/show_bug.cgi?id=125240
3357
3358         Reviewed by Anders Carlsson.
3359
3360         Using specific version of API client when instantiating them.
3361         Applied that same change to the following files:
3362
3363         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
3364         * UIProcess/API/gtk/WebKitCookieManager.cpp:
3365         * UIProcess/API/gtk/WebKitDownloadClient.cpp:
3366         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
3367         * UIProcess/API/gtk/WebKitFindController.cpp:
3368         * UIProcess/API/gtk/WebKitFormClient.cpp:
3369         * UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
3370         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
3371         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
3372         * UIProcess/API/gtk/WebKitPolicyClient.cpp:
3373         * UIProcess/API/gtk/WebKitUIClient.cpp:
3374         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
3375         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3376
3377 2013-12-04  Dan Bernstein  <mitz@apple.com>
3378
3379         Fixed the 32-bit Mac build.
3380
3381         * Shared/mac/WebCoreArgumentCodersMac.mm:
3382         (CoreIPC::::encodePlatformData):
3383
3384 2013-12-04  Dan Bernstein  <mitz@apple.com>
3385
3386         [Mac] When NSError user info is missing NSErrorPeerCertificateChainKey, ArgumentCoder should extract it from NSURLErrorFailingURLPeerTrustErrorKey
3387         https://bugs.webkit.org/show_bug.cgi?id=125251
3388
3389         Reviewed by Anders Carlsson.
3390
3391         * Shared/mac/WebCoreArgumentCodersMac.mm:
3392         (CoreIPC::::encodePlatformData): If the user info doesn’t include
3393         NSURLErrorFailingURLPeerTrustErrorKey, copy the peer certificate chain from the peer trust
3394         under NSURLErrorFailingURLPeerTrustErrorKey. On the decoding side, it will appear under the
3395         NSURLErrorFailingURLPeerTrustErrorKey, because a trust object can’t be fully serialized.
3396
3397 2013-12-04  Dan Bernstein  <mitz@apple.com>
3398
3399         Replace USE(SECURITY_FRAMEWORK) with finer-grained defines
3400         https://bugs.webkit.org/show_bug.cgi?id=125242
3401
3402         Reviewed by Sam Weinig.
3403
3404         * Configurations/WebKit2.xcconfig: Removed “-framework Security” from the linker flags, now
3405         that it’s included in the target’s Link Binary with Libraries build phase.
3406         * NetworkProcess/NetworkProcess.cpp:
3407         (WebKit::NetworkProcess::initializeConnection): Changed to use ENABLE(SEC_ITEM_SHIM).
3408         * NetworkProcess/mac/NetworkProcessMac.mm:
3409         (WebKit::NetworkProcess::platformInitializeNetworkProcess): Ditto.
3410         * Shared/Authentication/AuthenticationManager.cpp: Changed to use HAVE(SEC_IDENTITY).
3411         * Shared/Authentication/mac/AuthenticationManager.mac.mm: Ditto.
3412         * Shared/cf/ArgumentCodersCF.cpp:
3413         (CoreIPC::typeFromCFTypeRef): Removed use of USE(SECURITY_FRAMEWORK) since all CF platforms
3414         use it. Added HAVE(SEC_KEYCHAIN) where needed.
3415         (CoreIPC::encode): Ditto.
3416         (CoreIPC::decode): Ditto.
3417         * Shared/cf/ArgumentCodersCF.h: Ditto.
3418         * Shared/mac/SecItemShim.cpp: Chanegd to use ENABLE(SEC_ITEM_SHIM).
3419         * Shared/mac/SecItemShim.h: Ditto.
3420         * Shared/mac/SecItemShim.messages.in: Ditto.
3421         * UIProcess/Network/NetworkProcessProxy.cpp:
3422         (WebKit::NetworkProcessProxy::connectionWillOpen): Ditto.
3423         * UIProcess/WebProcessProxy.cpp:
3424         (WebKit::WebProcessProxy::connectionWillOpen): Ditto.
3425         * UIProcess/mac/SecItemShimProxy.cpp: Ditto.
3426         * UIProcess/mac/SecItemShimProxy.h: Ditto,
3427         * UIProcess/mac/SecItemShimProxy.messages.in: Ditto.
3428         * WebKit2.xcodeproj/project.pbxproj: Link Security.framework unconditionally.
3429         * WebProcess/WebProcess.cpp:
3430         (WebKit::WebProcess::initializeConnection): Changed to use ENABLE(SEC_ITEM_SHIM).
3431         * WebProcess/mac/WebProcessMac.mm:
3432         (WebKit::WebProcess::platformInitializeProcess): Ditto.
3433         * config.h: Defined ENABLE_SEC_ITEM_SHIM.
3434
3435 2013-12-04  Csaba Osztrogonác  <ossy@webkit.org>
3436
3437         [EFL][WK2] Buildfix after r160104
3438         https://bugs.webkit.org/show_bug.cgi?id=125233
3439
3440         Reviewed by Anders Carlsson.
3441
3442         * UIProcess/API/efl/ewk_cookie_manager.cpp:
3443         (EwkCookieManager::EwkCookieManager):
3444         * UIProcess/API/efl/ewk_favicon_database.cpp:
3445         (EwkFaviconDatabase::EwkFaviconDatabase):
3446         * UIProcess/efl/ContextHistoryClientEfl.cpp:
3447         (WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl):
3448         * UIProcess/efl/ContextMenuClientEfl.cpp:
3449         (ContextMenuClientEfl::ContextMenuClientEfl):
3450         * UIProcess/efl/DownloadManagerEfl.cpp:
3451         (WebKit::DownloadManagerEfl::DownloadManagerEfl):
3452         * UIProcess/efl/FindClientEfl.cpp:
3453         (WebKit::FindClientEfl::FindClientEfl):
3454         * UIProcess/efl/FormClientEfl.cpp:
3455         (WebKit::FormClientEfl::FormClientEfl):
3456         * UIProcess/efl/PageLoadClientEfl.cpp:
3457         (WebKit::PageLoadClientEfl::PageLoadClientEfl):
3458         * UIProcess/efl/PagePolicyClientEfl.cpp:
3459         (WebKit::PagePolicyClientEfl::PagePolicyClientEfl):
3460         * UIProcess/efl/PageUIClientEfl.cpp:
3461         (WebKit::PageUIClientEfl::PageUIClientEfl):
3462
3463 2013-12-03  Anders Carlsson  <andersca@apple.com>
3464
3465         Deprecate all unversioned client structs in favor of having explicit versioned structs
3466         https://bugs.webkit.org/show_bug.cgi?id=125203
3467
3468         Reviewed by Dan Bernstein.
3469
3470         Deprecate all the "current version" enums and unversioned client structs.