dbb968eecc089c3b0db420104215ffbbe7ec9b82
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-09-14  Dan Bernstein  <mitz@apple.com>
2
3         Build fix after r155770.
4
5         * UIProcess/API/mac/WKViewPrivate.h: Added WKBase.h import.
6
7 2013-09-14  Dan Bernstein  <mitz@apple.com>
8
9         [mac] Public header WKBase.h imports a private header, WKBaseMac.h
10         https://bugs.webkit.org/show_bug.cgi?id=121216
11
12         Reviewed by Darin Adler.
13
14         * Shared/API/c/WKBase.h: Moved definitions of enums and WK_EXPORT and WK_INLINE macros
15         out of this files.
16         * Shared/API/c/WKDeclarationSpecifiers.h: Copied from Source/WebKit2/Shared/API/c/WKBase.h.
17         Contains definitions of WK_EXPORT and WK_INLINE.
18         * Shared/API/c/WKSharedAPICast.h: Added #includes.
19         * Shared/API/c/WKUserContentInjectedFrames.h: Copied from Source/WebKit2/Shared/API/c/WKBase.h.
20         Contains enum definition.
21         * Shared/API/c/WKUserScriptInjectionTime.h: Copied from Source/WebKit2/Shared/API/c/WKBase.h.
22         Contains enum definition.
23         * UIProcess/API/C/WKPageGroup.h: Added #includes.
24         * UIProcess/API/mac/WKBrowsingContextController.h: Removed WKBase.h import from this public
25         header, replacing it with WKDeclarationSpecifiers.h import.
26         * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h: Added WKBase.h import.
27         * UIProcess/API/mac/WKBrowsingContextGroup.h: Removed WKBase.h import from this public
28         header, added necessary public imports.
29         * UIProcess/API/mac/WKBrowsingContextGroupPrivate.h: Added WKBase.h import.
30         * UIProcess/API/mac/WKBrowsingContextLoadDelegate.h: Removed WKBase.h import from public
31         header.
32         * UIProcess/API/mac/WKConnection.h: Ditto. Added WKDeclarationSpecifiers.h import.
33         * UIProcess/API/mac/WKConnectionInternal.h: Added WKBase.h import.
34         * UIProcess/API/mac/WKProcessGroup.h: Removed WKBase.h import from public header, added
35         WKDeclarationSpecifiers.h import.
36         * UIProcess/API/mac/WKProcessGroupPrivate.h: Added WKBase.h import.
37         * UIProcess/API/mac/WKView.h: Removed WKBase.h import from public header, added
38         WKDeclarationSpecifiers.h import.
39         * WebKit2.xcodeproj/project.pbxproj: Added new public header files, made WKBase.h private.
40         * WebProcess/InjectedBundle/API/mac/WKDOMNode.h: Removed WKBase.h import from public header,
41         added WKDeclarationSpecifiers.h import.
42         * WebProcess/InjectedBundle/API/mac/WKDOMNodePrivate.h: Added WKBase.h import.
43         * WebProcess/InjectedBundle/API/mac/WKDOMRange.h: Removed WKBase.h import from public
44         header, added WKDeclarationSpecifiers.h import.
45         * WebProcess/InjectedBundle/API/mac/WKDOMRangePrivate.h: Added WKBase.h import.
46         * WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h: Removed WKBase.h import from public
47         header, added WKDeclarationSpecifiers.h import.
48         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h: Ditto.
49         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h:
50         Added WKBase.h import.
51
52 2013-09-14  Alberto Garcia  <berto@igalia.com>
53
54         [GTK] WebKitGTK+ is linking against libxslt in too many places
55         https://bugs.webkit.org/show_bug.cgi?id=121356
56
57         Reviewed by Martin Robinson.
58
59         Don't use LIBXSLT_CFLAGS when compiling libWebCoreGtk2, no source
60         files use libxslt there.
61
62         * GNUmakefile.am:
63
64 2013-09-13  Ryuan Choi  <ryuan.choi@samsung.com>
65
66         Unreviewed build fix attempt for WK2 build.
67
68         * WebProcess/Plugins/PluginView.cpp: Changed ScriptState to ExecState.
69         (WebKit::PluginView::performJavaScriptURLRequest):
70
71 2013-09-13  Anders Carlsson  <andersca@apple.com>
72
73         Use nullptr instead of 0 in calls to HashMap::add
74         https://bugs.webkit.org/show_bug.cgi?id=121322
75
76         Reviewed by Sam Weinig.
77
78         * Platform/CoreIPC/Connection.cpp:
79         (CoreIPC::Connection::SyncMessageState::getOrCreate):
80         * UIProcess/Storage/StorageManager.cpp:
81         (WebKit::StorageManager::createLocalStorageMap):
82         (WebKit::StorageManager::createSessionStorageMap):
83         (WebKit::StorageManager::getOrCreateLocalStorageNamespace):
84         * UIProcess/WebProcessProxy.cpp:
85         (WebKit::WebProcessProxy::addBackForwardItem):
86         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
87         (WebKit::InjectedBundleNodeHandle::getOrCreate):
88         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
89         (WebKit::InjectedBundleRangeHandle::getOrCreate):
90         * WebProcess/Storage/StorageNamespaceImpl.cpp:
91         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
92         * WebProcess/WebProcess.cpp:
93         (WebKit::WebProcess::createWebPage):
94         (WebKit::WebProcess::webPageGroup):
95
96 2013-09-13  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
97
98         [GTK] Move to the new web inspector
99         https://bugs.webkit.org/show_bug.cgi?id=120647
100
101         Reviewed by Carlos Garcia Campos.
102
103         * GNUmakefile.am: bundle the remote inspector page list HTML into libwebkit2gtk as a GResource.
104         * UIProcess/API/gtk/tests/GNUmakefile.am: no need to set WEBKIT_INSPECTOR_PATH anymore.
105         * UIProcess/API/gtk/tests/InspectorTestServer.cpp:
106         (main): ditto.
107         * UIProcess/API/gtk/tests/TestInspector.cpp:
108         (beforeAll): ditto.
109         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
110         (testInspectorServerPageList): update paths to the internal resource ones.
111         * UIProcess/InspectorServer/WebInspectorServer.h:
112         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
113         (WebKit::WebInspectorServer::platformResourceForPath): ditto.
114         (WebKit::WebInspectorServer::buildPageList): ditto.
115         * UIProcess/WebInspectorProxy.cpp:
116         (WebKit::isMainInspectorPage): factor out checking for the inspector main resource, to make
117         the code more readable.
118         (WebKit::decidePolicyForNavigationAction): use SchemeRegistry to figure out whether the
119         request is for a local resource instead of KURL::isLocalFile() to allow using schemes
120         other than file:// for the inspector resources.
121         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
122         (WebKit::WebInspectorProxy::inspectorPageURL): use the new internal resource URL; since it's now
123         static we no longer need to generate and store the string.
124         (WebKit::WebInspectorProxy::inspectorBaseURL): ditto.
125         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
126         (WebKit::WebInspector::localizedStringsURL): use the new internal resource URL.
127         * UIProcess/gtk/WebContextGtk.cpp:
128         (WebKit::WebContext::platformInitializeWebProcess): register resource as a local scheme.
129
130 2013-09-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
131
132         Fix build with namespaced Qt.
133
134         Unreviewed build fix.
135
136         One forward declaration of QUrl was missing proper namespace macros.
137
138         * UIProcess/API/qt/qquickurlschemedelegate_p.h:
139
140 2013-09-12  Simon Fraser  <simon.fraser@apple.com>
141
142         Avoid extra scrollbar-related layouts for overlay scrollbars
143         https://bugs.webkit.org/show_bug.cgi?id=121267
144
145         Reviewed by Beth Dakin.
146         
147         view->resize() will call setNeedsLayout() if necessary, and may already have
148         done layout, so the extra setNeedsLayout() here was bad.
149
150         * WebProcess/WebPage/WebPage.cpp:
151         (WebKit::WebPage::setSize):
152
153 2013-09-12  Andre Moreira Magalhaes   <andre.magalhaes@collabora.co.uk>
154
155         Web Inspector: Do not try to parse incomplete HTTP requests
156         https://bugs.webkit.org/show_bug.cgi?id=121123
157
158         Reviewed by Darin Adler.
159
160         When working on a patch for bug #121121 I found an issue with the InspectorServer where it would try
161         to parse an HTTP message before receiving the full message and thus fail connecting with the
162         chromedevtools plugin.
163
164         What happens is that the WebSocketServerConnection receives buffers on
165         WebSocketServerConnection::didReceiveSocketStreamData and calls
166         WebSocketServerConnection::readHTTPMessage which then checks if we have a valid request by calling
167         HTTPRequest::parseHTTPRequestFromBuffer. If the request is valid it tries to parse the message and
168         clears the buffer, otherwise it continues adding data to the internal buffer until we have a valid
169         request.
170
171         The problem is that currently HTTPRequest::parseHTTPRequestFromBuffer considers the request as valid
172         before receiving the full message. To solve this we should make the method check if the request
173         headers end with a blank line otherwise we consider the request as invalid (see also
174         http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html).
175
176         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
177         (sendIncompleteRequest):
178         (beforeAll):
179         Add GTK specific test to check if the inspector server replies to incomplete requests.
180         * UIProcess/InspectorServer/HTTPRequest.cpp:
181         (WebKit::HTTPRequest::parseHeaders):
182         Do not consider request valid if headers didn't end with a blank line.
183
184 2013-09-12  Anders Carlsson  <andersca@apple.com>
185
186         SharedBuffer::createNSData should return a RetainPtr<NSData>
187         https://bugs.webkit.org/show_bug.cgi?id=121237
188
189         Reviewed by Darin Adler.
190
191         Update for WebCore changes.
192
193         * UIProcess/API/mac/WKView.mm:
194         (-[WKView writeSelectionToPasteboard:types:]):
195         (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
196         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
197
198 2013-09-12  Anders Carlsson  <andersca@apple.com>
199
200         SharedBuffer::createCFData should return RetainPtr<CFDataRef>
201         https://bugs.webkit.org/show_bug.cgi?id=121230
202
203         Reviewed by Darin Adler.
204
205         * NetworkProcess/mac/NetworkResourceLoaderMac.mm:
206         (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
207         * Shared/WebArchiveResource.cpp:
208         (WebKit::WebArchiveResource::data):
209
210 2013-09-12  Zalan Bujtas  <zalan@apple.com>
211
212         REGRESSION: Inline PDF that are cached fail to appear in iframe.
213         https://bugs.webkit.org/show_bug.cgi?id=75449
214
215         Reviewed by Darin Adler.
216
217         Make sure 'frame is from page cache' flag is set for subframes too.
218
219         WebFrameLoaderClient::m_frameCameFromPageCache == true forces plugins
220         to be loaded manually. It ensures that the plugin raw data is fetched again
221         while the containing frame is being restored from the page cache.
222         (Plugins get destroyed when the frame goes to page cache.)
223
224         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
225         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
226         This gets called only on the frame where the actual history navigation happens.
227         (WebKit::WebFrameLoaderClient::didRestoreFromPageCache):
228         This gets called for all the restored frames.
229
230 2013-09-11  Simon Fraser  <simon.fraser@apple.com>
231
232         Make sure that layout is up-to-date when moving a WKView into a window, to avoid !needsLayout() assertions in RenderView::paint()
233         https://bugs.webkit.org/show_bug.cgi?id=121196
234
235         Reviewed by Tim Horton.
236         
237         When a WKView was moved into a window, it was possible for us to paint
238         without ensuring that layout is up-to-date. Fix this by having
239         WebPage::setIsInWindow() update layout if we are moving to a window.
240
241         * WebProcess/WebPage/WebPage.cpp:
242         (WebKit::WebPage::setIsInWindow):
243
244 2013-09-11  Mario Sanchez Prada  <mario.prada@samsung.com>
245
246         [GTK] Remove Gail dependency from build system for GTK3
247         https://bugs.webkit.org/show_bug.cgi?id=119673
248
249         Reviewed by Gustavo Noronha Silva.
250
251         * GNUmakefile.am: Removed GAIL_LIBS.
252
253 2013-09-11  Alberto Garcia  <berto@igalia.com>
254
255         [WK2] [GTK] LayerTreeHostGtk: don't set m_isValid to false if glContext() returns null
256         https://bugs.webkit.org/show_bug.cgi?id=120892
257
258         Reviewed by Martin Robinson.
259
260         If the GL context cannot be created then m_isValid is set to false
261         during the initialization of LayerTreeHostGtk.
262
263         This is not really necessary since the rest of the code already
264         deals with that situation, so it doesn't have any effect other
265         than breaking the assertion in invalidate().
266
267         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
268         (WebKit::LayerTreeHostGtk::initialize):
269
270 2013-09-11  Commit Queue  <commit-queue@webkit.org>
271
272         Unreviewed, rolling out r154899.
273         http://trac.webkit.org/changeset/154899
274         https://bugs.webkit.org/show_bug.cgi?id=121162
275
276         It didn't fix the problem and broke other unit tests
277         (Requested by KaL on #webkit).
278
279         * UIProcess/API/gtk/tests/WebViewTest.cpp:
280         (WebViewTest::resizeView):
281
282 2013-09-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
283
284         WTF::OwnPtr should behave similarly with the rest of WTF smart pointers
285         https://bugs.webkit.org/show_bug.cgi?id=120773
286
287         Reviewed by Anders Carlsson.
288
289         Before the change OwnPtr could take either the pointer type or the pointed-to type, which was bad
290         for the following reasons:
291         - It distinguished OwnPtr behaviour from other WTF smart pointer classes behaviour (so it was confusing for the Client).
292         - It was potential error-prone as it actually modified the type given by the Client in opaque way.
293
294         * UIProcess/API/efl/ewk_database_manager.cpp:
295         (getDatabaseOriginsCallback):
296         * UIProcess/API/efl/ewk_storage_manager.cpp:
297         (getStorageOriginsCallback):
298
299 2013-09-11  ChangSeok Oh  <changseok.oh@collabora.com>
300
301         Unreviewed build fix.
302
303         * GNUmakefile.list.am: Duplicated NetscapePluginModuleNone.cpp & NetscapePluginNone.cpp.
304         They cause build breaks of multiple definitions when targeting wayland build.
305
306 2013-09-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
307
308         Generate more HTML type checks and casting
309         https://bugs.webkit.org/show_bug.cgi?id=121080
310
311         Reviewed by Andreas Kling.
312
313         Clean-up remained functions of HTML elements using auto-generated isFooElement(),
314         and replace toFooElement() with ELEMENT_TYPE_CASTS() macro.
315
316         Besides this patch clean-up unnecessary checks which are being supported by
317         auto-generated isFooElement().
318
319         * WebProcess/WebPage/WebFrame.cpp:
320         (WebKit::WebFrame::containsAnyFormControls):
321
322 2013-09-10  Marcelo Morais  <m.morais@samsung.com>
323
324         [EFL] WebInspector: Move to new webinspector
325         https://bugs.webkit.org/show_bug.cgi?id=119559
326
327         Reviewed by Gyuyoung Kim.
328
329         Loading the new Web Inspector page instead of the old inspector.
330         Co-Author: Andre Loureiro <andre.vl@samsung.com>
331
332         * UIProcess/efl/WebInspectorProxyEfl.cpp:
333         (WebKit::WebInspectorProxy::inspectorPageURL):
334
335 2013-09-10  Sergio Villar Senin  <svillar@igalia.com>
336
337         [WK2][GTK] Frequent crashes when showing context menus in Debug builds
338         https://bugs.webkit.org/show_bug.cgi?id=121099
339
340         Reviewed by Carlos Garcia Campos.
341
342         Disconnect signal handlers when destroying the context menu proxy
343         object. This avoids use-after-free crashes when opening several
344         context menus in a row.
345
346         * UIProcess/gtk/WebContextMenuProxyGtk.cpp:
347         (WebKit::WebContextMenuProxyGtk::append):
348         (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk):
349         * UIProcess/gtk/WebContextMenuProxyGtk.h:
350
351 2013-09-10  Allan Sandfeld Jensen  <allan.jensen@digia.com>
352
353         [Qt] make use of qtHaveModule() 
354         https://bugs.webkit.org/show_bug.cgi?id=121090
355
356         Reviewed by Jocelyn Turcotte.
357         Patch by Oswald Buddenhagen <oswald.buddenhagen@digia.com>
358
359         Use qtHaveModule instead of our own haveQtModule.
360
361         * WebProcess.pro:
362
363 2013-09-10  Carlos Garcia Campos  <cgarcia@igalia.com>
364
365         [GTK] /webkit2/WebKitWebView/default-menu fails when GtkSettings:gtk-show-input-method-menu is disabled
366         https://bugs.webkit.org/show_bug.cgi?id=121088
367
368         Reviewed by Xan Lopez.
369
370         * UIProcess/API/gtk/tests/TestContextMenu.cpp: Always check
371         Unicode submenu is present in default context menu for editable
372         content.
373
374 2013-09-09  Dean Jackson  <dino@apple.com>
375
376         [WebGL] Allow multithreaded OpenGL contexts
377         https://bugs.webkit.org/show_bug.cgi?id=121062
378
379         Reviewed by Simon Fraser.
380
381         Expose a new preference "multithreadedWebGLEnabled".
382
383         * Shared/WebPreferencesStore.h:
384         * UIProcess/API/C/WKPreferences.cpp:
385         (WKPreferencesSetMultithreadedWebGLEnabled):
386         (WKPreferencesGetMultithreadedWebGLEnabled):
387         * UIProcess/API/C/WKPreferencesPrivate.h:
388         * WebProcess/WebPage/WebPage.cpp:
389         (WebKit::WebPage::updatePreferences):
390         * mac/WebKit2.order:
391
392 2013-09-09  Dean Jackson  <dino@apple.com>
393
394         Enable WebGL for OS X nightlies
395         https://bugs.webkit.org/show_bug.cgi?id=121040
396
397         Reviewed by Beth Dakin.
398
399         * Shared/WebPreferencesStore.h: Set initial value to true.
400
401 2013-09-08  Anders Carlsson  <andersca@apple.com>
402
403         Begin moving off of TypeTraits.h
404         https://bugs.webkit.org/show_bug.cgi?id=121006
405
406         Reviewed by Darin Adler.
407
408         Convert uses of WTF type traits to STL type traits.
409
410         * Platform/CoreIPC/ArgumentCoder.h:
411         * Platform/CoreIPC/ArgumentCoders.h:
412         * Platform/CoreIPC/ArgumentDecoder.h:
413         * Platform/CoreIPC/ArgumentEncoder.h:
414         * Platform/CoreIPC/Arguments.h:
415         * Shared/API/c/WKSharedAPICast.h:
416         (WebKit::toImpl):
417
418 2013-09-09  Gustavo Noronha Silva  <gns@gnome.org>
419
420         Unreviewed build fix.
421
422         * GNUmakefile.list.am: Typo - left-over \ from a copy/paste, most likely.
423
424 2013-09-09  Anton Obzhirov  <a.obzhirov@samsung.com>
425
426         [GTK] Cancel the current active WebKitAuthenticationRequest on load failed
427         https://bugs.webkit.org/show_bug.cgi?id=120350
428
429         Reviewed by Carlos Garcia Campos.
430
431         The default dialog does not get closed and the authentication is not cancelled
432         if loading fails or is stopped on a page which requires HTTP authentication.
433
434         This patch cancels the authentication request on load failed
435         and adds new authentication cancelled signal in WebKitAuthenticationRequest
436         to allow the application handling of authentication UI.
437
438         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
439         (authenticationCancelled):
440         (webkitAuthenticationDialogInitialize):
441         (webkitAuthenticationDialogDispose):
442         (webkitAuthenticationDialogNew):
443         * UIProcess/API/gtk/WebKitAuthenticationDialog.h:
444         * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
445         (webkit_authentication_request_class_init):
446         (webkit_authentication_request_cancel):
447         * UIProcess/API/gtk/WebKitWebView.cpp:
448         (webkitWebViewAuthenticate):
449         (webkitWebViewLoadFailed):
450         (webkitWebViewHandleAuthenticationChallenge):
451         (webkitWebViewCancelAuthenticationRequest):
452         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
453         (testWebViewAuthenticationLoadCancelled):
454         (beforeAll):
455
456 2013-09-09  Brian Holt  <brian.holt@samsung.com>
457
458         [GTK][WK2] Update ContextMenu Download API
459         https://bugs.webkit.org/show_bug.cgi?id=120763
460
461         Reviewed by Carlos Garcia Campos.
462
463         Mark the new Download items in the Context Menu with the Since
464         tag, and include a unit test for Context Menu audio.
465
466         * UIProcess/API/gtk/WebKitContextMenuActions.h:
467         * UIProcess/API/gtk/tests/TestContextMenu.cpp:
468         (testContextMenuDefaultMenu):
469
470 2013-09-08  Christophe Dumez  <ch.dumez@sisa.samsung.com>
471
472         [wk2] REGRESSION (r154673): PDF scrolling moves very slowly
473         https://bugs.webkit.org/show_bug.cgi?id=120542
474
475         Reviewed by Tim Horton.
476
477         Handle 'wheel' events in addition to 'mousewheel'. This fixes
478         PDF scrolling.
479
480         * WebProcess/Plugins/PluginView.cpp:
481         (WebKit::PluginView::handleEvent):
482
483 2013-09-08  Anders Carlsson  <andersca@apple.com>
484
485         Move WTF::notFound to Vector.h and delete NotFound.h
486         https://bugs.webkit.org/show_bug.cgi?id=120990
487
488         Reviewed by Sam Weinig.
489
490         * Shared/EditorState.h:
491
492 2013-09-07  Anders Carlsson  <andersca@apple.com>
493
494         Get rid of PassOwnArrayPtr
495         https://bugs.webkit.org/show_bug.cgi?id=120964
496
497         Reviewed by Andreas Kling.
498
499         Remove unneeded includes.
500
501         * Shared/ImmutableArray.h:
502         * WebProcess/InjectedBundle/InjectedBundle.cpp:
503
504 2013-09-06  Ryosuke Niwa  <rniwa@webkit.org>
505
506         Range::ownerDocument should return Document&
507         https://bugs.webkit.org/show_bug.cgi?id=120908
508
509         Reviewed by Andreas Kling.
510
511         * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm:
512         (-[WKDOMRange textRects]):
513
514 2013-09-05  Ryuan Choi  <ryuan.choi@samsung.com>
515
516         [CMAKE] Add c++0x into CXX_FLAGS as a default
517         https://bugs.webkit.org/show_bug.cgi?id=120812
518
519         Unreviewed build fix for EFL ports.
520
521         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: Added constexpr for in-class initialization.
522         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: Added space between strings.
523         (EWK2UnitTest::EWK2UnitTestEnvironment::defaultTestPageUrl):
524         (EWK2UnitTest::EWK2UnitTestEnvironment::defaultTheme):
525         (EWK2UnitTest::EWK2UnitTestEnvironment::urlForResource):
526
527 2013-09-05  Alexey Proskuryakov  <ap@apple.com>
528
529         WKFullScreenWindowController extends lifetime of WKView, deleting it at a wrong time
530         https://bugs.webkit.org/show_bug.cgi?id=120792
531         <rdar://problem/14884666>
532
533         Reviewed by Jer Noble.
534
535         * UIProcess/API/mac/WKView.mm: (-[WKView fullScreenWindowController]):
536         Use a newly minted initializer for the controller.
537
538         * UIProcess/mac/WKFullScreenWindowController.h: Removed unused web view accessors.
539         Changed the class to take web view at initialization time.
540
541         * UIProcess/mac/WKFullScreenWindowController.mm:
542         (-[WKFullScreenWindowController initWithWindow:webView:]): Initialize the controller
543         inone step.
544         (-[WKFullScreenWindowController dealloc]): WebView is now a raw pointer, no need
545         to zero it.
546         (-[WKFullScreenWindowController close]): Make sure to not leave a dangling WKView
547         pointer (this method is indirectly but inevitably called when WKView is deallocated).
548
549 2013-09-05  Anders Carlsson  <andersca@apple.com>
550
551         Replace uses of CLANG_PRAGMA with #pragma
552
553         Rubber-stamped by Andreas Kling.
554
555         This file is only compiled by clang anyway.
556
557         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
558         (WebKit::InjectedBundle::load):
559
560 2013-09-05  Anders Carlsson  <andersca@apple.com>
561
562         GCAssertions.h should use STL type traits and static_assert
563         https://bugs.webkit.org/show_bug.cgi?id=120785
564
565         Reviewed by Andreas Kling.
566
567         Update for JavaScriptCore changes.
568
569         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
570
571 2013-09-05  Alberto Garcia  <berto@igalia.com>
572
573         [WK2] [GTK] Remove the test to disable AC under Wayland from WebKitWebViewGroup
574         https://bugs.webkit.org/show_bug.cgi?id=120762
575
576         Reviewed by Gustavo Noronha Silva.
577
578         The code to disable AC under Wayland is not run if we're using
579         WebKitTestRunner, so it would be better to move it to
580         WebKitWebViewBase.
581
582         However it's not really necessary to do that, instead it's much
583         simpler to disable accelerated compositing in all cases unless we
584         know we can support it.
585
586         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
587         (webkitWebViewBaseUpdatePreferences):
588         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
589         (webkitWebViewGroupAttachSettingsToPageGroup):
590
591 2013-09-04  Alberto Garcia  <berto@igalia.com>
592
593         [WK2][GTK] ASSERTION in WebKit::LayerTreeHostGtk::invalidate
594         https://bugs.webkit.org/show_bug.cgi?id=117733
595
596         Reviewed by Martin Robinson.
597
598         If the GL context cannot be created then an invalid
599         LayerTreeHostGtk object will be returned.
600
601         This patch disables accelerated compositing if the system doesn't
602         support it.
603
604         * UIProcess/API/gtk/WebKitWebView.cpp:
605         (webkitWebViewUpdateSettings):
606         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
607         (webkitWebViewBaseUpdatePreferences):
608         (webkitWebViewBaseCreateWebPage):
609         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
610
611 2013-09-04  Commit Queue  <commit-queue@webkit.org>
612
613         Unreviewed, rolling out r154989.
614         http://trac.webkit.org/changeset/154989
615         https://bugs.webkit.org/show_bug.cgi?id=120678
616
617         This patch might broke apps using webkitgtk not from the main
618         thread (Requested by msanchez on #webkit).
619
620         * UIProcess/API/gtk/WebKitWebView.cpp:
621         (webkitWebViewRunAsModal):
622         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
623         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
624
625 2013-09-04  Zan Dobersek  <zdobersek@igalia.com>
626
627         [GTK] Add support for the Wayland build target
628         https://bugs.webkit.org/show_bug.cgi?id=120627
629
630         Reviewed by Gustavo Noronha Silva.
631
632         * GNUmakefile.list.am: Build X11-specific NetscapePluginModule and NetscapePlugin classes if building the X11 target,
633         fall back to the generic, empty classes otherwise.
634         * PluginProcess/unix/PluginProcessMainUnix.cpp:
635         (WebKit::PluginProcessMainUnix): Guard the NetscapePluginModule::scanPlugin() invocation with PLUGIN_ARCHITECTURE(X11),
636         it's at the moment specific to the X11 implementation of the Netscape plugins.
637         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: Guard PluginProcessProxy::scanPlugin() with PLUGIN_ARCHITECTURE(X11),
638         just like it's guarded in the PluginProcessProxy class declaration.
639         * UIProcess/cairo/BackingStoreCairo.cpp: Additionally guard <gdk/gdkx.h> and WidgetBackingStoreGtkX11 inclusion and use
640         with PLATFORM(X11), this code should only be built when building the X11 target.
641         (WebKit::createBackingStoreForGTK):
642         * UIProcess/gtk/WebPageProxyGtk.cpp: Guard the createPluginContainer() and windowedPluginGeometryDidChange() methods and their
643         helper functions and objects with PLUGIN_ARCHITECTURE(X11), just like they're guarded in the WebPageProxy class declaration.
644         * config.h: Only define PLUGIN_ARCHITECTURE_X11 to 1 if we're actually building the X11 target.
645
646 2013-09-03  Darin Adler  <darin@apple.com>
647
648         REGRESSION (r154967) window resize is very choppy
649         https://bugs.webkit.org/show_bug.cgi?id=120653
650
651         Reviewed by Andreas Kling.
652
653         Andreas Kling spotted the bad change.
654
655         * Platform/CoreIPC/Connection.cpp:
656         (CoreIPC::Connection::waitForMessage): Roll out this incorrect change.
657         The code here is not the same as a call to take.
658
659 2013-09-03  Anton Obzhirov  <a.obzhirov@samsung.com>
660
661         [GTK] gdk threads deprecated functions calls should be refactored
662         https://bugs.webkit.org/show_bug.cgi?id=120070
663
664         Reviewed by Mario Sanchez Prada.
665
666         Removed deprecated functions gdk_threads_leave()/gdk_threads_enter() functions since
667         there is no more checks for threads lock in GTK 3.6.
668
669         * UIProcess/API/gtk/WebKitWebView.cpp:
670         (webkitWebViewRunAsModal):
671         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
672         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
673
674 2013-09-03  Brian Holt  <brian.holt@samsung.com>
675
676         [GTK] [WK2] TestContextMenu default-menu fails
677         https://bugs.webkit.org/show_bug.cgi?id=120459
678
679         Reviewed by Gustavo Noronha Silva.
680
681         Add context menu items for downloading media elements.
682
683         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
684         (webkitContextMenuActionGetActionTag):
685         (webkitContextMenuActionGetForContextMenuItem):
686         (webkitContextMenuActionGetLabel):
687         * UIProcess/API/gtk/WebKitContextMenuActions.h:
688         * UIProcess/API/gtk/tests/TestContextMenu.cpp:
689
690 2013-09-02  Darin Adler  <darin@apple.com>
691
692         Cut down on double hashing and code needlessly using hash table iterators
693         https://bugs.webkit.org/show_bug.cgi?id=120611
694
695         Reviewed by Andreas Kling.
696
697         * Platform/CoreIPC/Connection.cpp:
698         (CoreIPC::Connection::waitForMessage): Use take instead of find/remove.
699
700         * UIProcess/WebPreferences.cpp:
701         (WebKit::WebPreferences::removePageGroup): Use the return value from remove
702         instead of find/remove.
703
704         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
705         (WebKit::GeolocationPermissionRequestManager::cancelRequestForGeolocation):
706         (WebKit::GeolocationPermissionRequestManager::didReceiveGeolocationPermissionDecision):
707         Use take instead of find/remove.
708
709         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
710         (WebKit::NetscapePlugin::frameDidFinishLoading): Use take instead of find/remove.
711         (WebKit::NetscapePlugin::frameDidFail): Use take instead of find/remove.
712
713         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
714         (WebKit::WebBackForwardListProxy::removeItem): Use take instead of find/remove.
715
716         * WebProcess/WebPage/WebPage.cpp:
717         (WebKit::WebPage::didFinishCheckingText): Use take instead of get/remove so we
718         hash only once.
719         (WebKit::WebPage::didCancelCheckingText): Ditto.
720         (WebKit::WebPage::stopExtendingIncrementalRenderingSuppression): Use the return
721         value from remove instead of contains/remove so we hash only once.
722
723 2013-09-02  Darin Adler  <darin@apple.com>
724
725         [Mac] No need for HardAutorelease, which is same as CFBridgingRelease
726         https://bugs.webkit.org/show_bug.cgi?id=120569
727
728         Reviewed by Andy Estes.
729
730         * Platform/mac/StringUtilities.mm:
731         (WebKit::nsStringFromWebCoreString): Use CFBridgingRelease. Also
732         changed condition to be a little cleaner and use a constant string for empty
733         strings as well as null strings.
734
735         * UIProcess/API/mac/WKBrowsingContextController.mm:
736         (autoreleased): Switched from autorelease to CFBridgingRelease for strings,
737         which eliminates a type cast and makes this work under GC, although I don't
738         think we should compile WebKit2 for GC.
739
740         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
741         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
742         Use CFBridgingRelease.
743
744 2013-09-02  Csaba Osztrogonác  <ossy@webkit.org>
745
746         REGRESSION(r154909): caused many crashes on Qt WK2, EFL WK2
747         https://bugs.webkit.org/show_bug.cgi?id=120600
748
749         Reviewed by Andreas Kling.
750
751         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
752         (CoreIPC::::decode): keyTime should be double here too.
753
754 2013-09-01  Alexey Proskuryakov  <ap@apple.com>
755
756         [WK2][Mac] Drag and drop tests interfere with user's UI
757         https://bugs.webkit.org/show_bug.cgi?id=120538
758
759         Reviewed by Dan Bernstein.
760
761         * UIProcess/API/mac/WKView.mm: (-[WKView _setDragImage:at:linkDrag:]): Make it possible
762         to override drag initiation in subclasses. It is a bit unfortunate that this exposes
763         a deprecated API that we call, but probably not unfortunate enough to invent a new
764         scary looking name for the same function, and conditionally call that if implemented
765         by subclass.
766
767 2013-08-31  Santosh Mahto  <santosh.ma@samsung.com>
768
769         warning: unused parameter point and area in EwkView.cpp:1390
770         https://bugs.webkit.org/show_bug.cgi?id=120545
771
772         Reviewed by Darin Adler.
773
774         * UIProcess/API/efl/EwkView.cpp:
775         (EwkView::didFindZoomableArea): Added UNUSED_PARAM.
776
777 2013-08-31  Jae Hyun Park  <jae.park@company100.net>
778
779         Remove unused variable in LayerTreeHost
780         https://bugs.webkit.org/show_bug.cgi?id=118950
781
782         Reviewed by Anders Carlsson.
783
784         m_waitingForUIProcess has been renamed to m_isWaitingForRenderer as of
785         r152183, and it is a private variable in CoordinatedLayerTreeHost. Thus,
786         we don't need m_waitingForUIProcess in LayerTreeHost.
787
788         * WebProcess/WebPage/LayerTreeHost.h:
789
790 2013-08-30  Brian Holt  <brian.holt@samsung.com>
791
792         [GTK] [WK2] TestWebKitWebView snapshot fails
793         https://bugs.webkit.org/show_bug.cgi?id=120404
794
795         Reviewed by Darin Adler.
796
797         Fixed the snapshot test failure caused by GTK no longer allowing
798         widgets to resize.  Instead, resize the WebView by resizing the
799         window and waiting for the event to complete asynchronously.
800
801         * UIProcess/API/gtk/tests/WebViewTest.cpp:
802         (WebViewTest::resizeView):
803
804 2013-08-30  Csaba Osztrogonác  <ossy@webkit.org>
805
806         Add USE(PROTECTION_SPACE_AUTH_CALLBACK) guards to canAuthenticateAgainstProtectionSpace()
807         https://bugs.webkit.org/show_bug.cgi?id=120351
808
809         Reviewed by Darin Adler.
810
811         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
812         * NetworkProcess/AsynchronousNetworkLoaderClient.h:
813         * NetworkProcess/NetworkLoaderClient.h:
814         * NetworkProcess/SynchronousNetworkLoaderClient.cpp:
815         * NetworkProcess/SynchronousNetworkLoaderClient.h:
816
817 2013-08-30  Gabor Abraham  <abrhm@inf.u-szeged.hu>
818
819         Fix, remove unused parameter in UIProcess/WebColorPicker.cpp.
820         https://bugs.webkit.org/show_bug.cgi?id=120525
821
822         Reviewed by Darin Adler.
823
824         * UIProcess/WebColorPicker.cpp:
825         (WebKit::WebColorPicker::showColorPicker):
826
827 2013-08-30  Tamas Czene  <tczene@inf.u-szeged.hu>
828
829         Resolve unused parameter warning in WebPlatformStrategies.cpp
830         https://bugs.webkit.org/show_bug.cgi?id=120515
831
832         Reviewed by Darin Adler.
833
834         * WebProcess/WebPage/TapHighlightController.cpp:
835         (WebKit::TapHighlightController::drawRect):
836
837 2013-08-30  Tamas Czene  <tczene@inf.u-szeged.hu>
838
839         Resolve unused parameter warning in FindController.cpp
840         https://bugs.webkit.org/show_bug.cgi?id=120516
841
842         Reviewed by Darin Adler.
843
844         * WebProcess/WebPage/FindController.cpp:
845         (WebKit::FindController::drawRect):
846
847 2013-08-30  Tamas Czene  <tczene@inf.u-szeged.hu>
848
849         Resolve unused parameter warning in WKBundlePageOverlay.cpp
850         https://bugs.webkit.org/show_bug.cgi?id=120521
851
852         Reviewed by Andreas Kling.
853
854         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
855         (WKBundlePageOverlayFractionFadedIn):
856
857 2013-08-30  Antti Koivisto  <antti@apple.com>
858
859         Remove code behind ENABLE(DIALOG_ELEMENT)
860         https://bugs.webkit.org/show_bug.cgi?id=120467
861
862         Reviewed by Darin Adler.
863
864         * Configurations/FeatureDefines.xcconfig:
865
866 2013-08-29  Sam Weinig  <sam@webkit.org>
867
868         Add ENABLE gaurds for Promises
869         https://bugs.webkit.org/show_bug.cgi?id=120488
870
871         Reviewed by Andreas Kling.
872
873         * Configurations/FeatureDefines.xcconfig:
874
875 2013-08-29  Zan Dobersek  <zdobersek@igalia.com>
876
877         [Automake] libWebCoreDOM.la could use a better name
878         https://bugs.webkit.org/show_bug.cgi?id=120232
879
880         Reviewed by Martin Robinson.
881
882         * GNUmakefile.am: libWebCoreDOM has a new name - libGObjectDOMBindings.
883
884 2013-08-29  Joseph Pecoraro  <pecoraro@apple.com>
885
886         Web Inspector: Download Web Archive of Inspected Page
887         https://bugs.webkit.org/show_bug.cgi?id=119774
888
889         Reviewed by Timothy Hatcher.
890
891         Update to support InspectorFrontendHost.save's new base64Encoded
892         parameter. It means the incoming content is binary data, not a string.
893
894         * UIProcess/WebInspectorProxy.cpp:
895         (WebKit::WebInspectorProxy::save):
896         * UIProcess/WebInspectorProxy.h:
897         * UIProcess/WebInspectorProxy.messages.in:
898         * UIProcess/efl/WebInspectorProxyEfl.cpp:
899         (WebKit::WebInspectorProxy::platformSave):
900         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
901         (WebKit::WebInspectorProxy::platformSave):
902         * UIProcess/mac/WebInspectorProxyMac.mm:
903         (WebKit::WebInspectorProxy::platformSave):
904         * UIProcess/qt/WebInspectorProxyQt.cpp:
905         (WebKit::WebInspectorProxy::platformSave):
906         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
907         (WebKit::WebInspectorFrontendClient::save):
908         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
909         * WebProcess/WebPage/WebInspector.cpp:
910         (WebKit::WebInspector::save):
911         * WebProcess/WebPage/WebInspector.h:
912
913 2013-08-29  Brian Holt  <brian.holt@samsung.com>
914
915         [GTK] [WK2] TestWebKitWebView page-visibility fails
916         https://bugs.webkit.org/show_bug.cgi?id=120406
917
918         Reviewed by Gustavo Noronha Silva.
919
920         Removed the webkit prefix for document visibility properties.
921
922         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
923         (testWebViewPageVisibility):
924
925 2013-08-28  Chris Curtis  <chris_curtis@apple.com>
926
927         https://bugs.webkit.org/show_bug.cgi?id=119548
928         Refactoring Exception throws.
929
930         Reviewed by Geoffrey Garen.
931         
932         Moved setting an exception into the vm, These functions changed to use the new functionality.
933
934         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
935         (WebKit::JSNPObject::callMethod):
936         (WebKit::JSNPObject::callObject):
937         (WebKit::JSNPObject::callConstructor):
938         (WebKit::JSNPObject::throwInvalidAccessError):
939         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
940         (WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
941
942 2013-08-28  Anders Carlsson  <andersca@apple.com>
943
944         Allow the Flash plug-in to open its preference pane
945         https://bugs.webkit.org/show_bug.cgi?id=120431
946         <rdar://problem/14857039>
947
948         Reviewed by Andreas Kling.
949
950         Forward the -[NSWorkspace openFile:] call to the UI process and allow opening
951         the Flash preference pane (if Flash asks for it).
952
953         * PluginProcess/PluginProcess.h:
954         * PluginProcess/mac/PluginProcessMac.mm:
955         (WebKit::replacedNSWorkspace_openFile):
956         (WebKit::initializeCocoaOverrides):
957         (WebKit::PluginProcess::openFile):
958         * UIProcess/Plugins/PluginProcessProxy.h:
959         * UIProcess/Plugins/PluginProcessProxy.messages.in:
960         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
961         (WebKit::PluginProcessProxy::openURL):
962         (WebKit::shouldOpenFile):
963         (WebKit::PluginProcessProxy::openFile):
964
965 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
966
967         [wk2] Resolve unused parameters in WebPlatformStrategies.cpp
968         https://bugs.webkit.org/show_bug.cgi?id=120410
969
970         Reviewed by Darin Adler.
971
972         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
973         (WebKit::WebPlatformStrategies::getPluginInfo):
974         (WebKit::WebPlatformStrategies::transientLocalStorageNamespace):
975
976 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
977
978         [wk2] Resolve unused parameter warnings in the WebProcess.cpp
979         https://bugs.webkit.org/show_bug.cgi?id=120412
980
981         Reviewed by Darin Adler.
982
983         * WebProcess/WebProcess.cpp:
984         (WebKit::WebProcess::startMemorySampler):
985
986 2013-08-28  Darin Adler  <darin@apple.com>
987
988         Eliminate Pasteboard::generalPasteboard
989         https://bugs.webkit.org/show_bug.cgi?id=120392
990
991         Reviewed by Anders Carlsson.
992
993         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
994         (WebKit::WebEditorClient::updateGlobalSelection):
995         Use createForGlobalSelection instead of generalPasteboard and setSelectionMode.
996
997 2013-08-28  Ábrahám Gábor  <abrhm@inf.u-szeged.hu>
998
999         Fix unused variable warning.
1000         https://bugs.webkit.org/show_bug.cgi?id=120396
1001
1002         Reviewed by Allan Sandfeld Jensen.
1003
1004         Fix unused variable compiler warning in PageOverlay.h
1005
1006         * WebProcess/WebPage/PageOverlay.h:
1007         (WebKit::PageOverlay::Client::copyAccessibilityAttributeValue):
1008         (WebKit::PageOverlay::Client::copyAccessibilityAttributeNames):
1009
1010
1011 2013-08-28  Zan Dobersek  <zdobersek@igalia.com>
1012
1013         [GTK][WK2] Only set up a RedirectedXCompositeWindow if running under an X11 display
1014         https://bugs.webkit.org/show_bug.cgi?id=120321
1015
1016         Reviewed by Gustavo Noronha Silva.
1017
1018         Only set up the RedirectedXCompositeWindow member of the WebKitWebViewBasePrivate struct
1019         if we're running under an X11 display. This is now done in the webkitWebViewBaseConstructed
1020         function rather than the constructor, which is removed.
1021
1022         This allows for the UIProcess to run in a Wayland environment even when built with accelerated
1023         compositing enabled. Of course, at the moment there's no support yet for accelerated compositing
1024         under Wayland, so we fall back to rendering the backing store. No changes are introduced to
1025         the behavior under X11 - accelerated compositing will be used where possible, if supported.
1026
1027         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1028         (webkitWebViewBaseConstructed):
1029
1030 2013-08-28  Zan Dobersek  <zdobersek@igalia.com>
1031
1032         [GTK][WK2] Disable accelerated compositing under Wayland
1033         https://bugs.webkit.org/show_bug.cgi?id=120347
1034
1035         Reviewed by Martin Robinson.
1036
1037         Accelerated compositing is not yet supported under the Wayland display protocol,
1038         so it should be disabled. Since it is enabled by default and the GTK WK2 API does
1039         not provide any way to change that, it's enough to disable it when attaching the
1040         WebKitSettings object to the WebPageGroup if running under Wayland.
1041
1042         * UIProcess/API/gtk/WebKitWebViewGroup.cpp:
1043         (webkitWebViewGroupAttachSettingsToPageGroup):
1044
1045 2013-08-28  Alexandre Abreu  <alexandre.abreu@canonical.com>
1046
1047         Add a 'isMainFrame' parameter to QWebNavigationRequest.
1048         https://bugs.webkit.org/show_bug.cgi?id=118860
1049
1050         Reviewed by Simon Hausmann.
1051
1052         * UIProcess/API/qt/qwebnavigationrequest.cpp:
1053         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
1054         (QWebNavigationRequest::QWebNavigationRequest):
1055         (QWebNavigationRequest::navigationType):
1056         (QWebNavigationRequest::isMainFrame):
1057         * UIProcess/API/qt/qwebnavigationrequest_p.h:
1058         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
1059         * UIProcess/qt/QtWebPagePolicyClient.cpp:
1060         (WebKit::QtWebPagePolicyClient::decidePolicyForNavigationAction):
1061         * UIProcess/qt/QtWebPagePolicyClient.h:
1062
1063 2013-08-27  Luciano Wolf  <luciano.wolf@openbossa.org>
1064
1065         100% cpu usage for "transition: opacity" animation
1066         https://bugs.webkit.org/show_bug.cgi?id=120012
1067
1068         Reviewed by Noam Rosenthal.
1069
1070         Schedule animation timer after scheduling a layer flush. This way it
1071         won't overwrite animation timer with "0", thus avoiding 100% cpu usage.
1072
1073         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1074         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
1075
1076 2013-08-27  Csaba Osztrogonác  <ossy@webkit.org>
1077
1078         [WK2][Soup] Add WebFrameNetworkingContext::webFrameLoaderClient() after r154490
1079         https://bugs.webkit.org/show_bug.cgi?id=120353
1080
1081         Reviewed by Alexey Proskuryakov.
1082
1083         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1084         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
1085         (WebKit::WebFrameNetworkingContext::webFrameLoaderClient):
1086         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
1087
1088 2013-08-26  Santosh Mahto  <santosh.ma@samsung.com>
1089
1090         Fixing compilation warning "unused parameter" in WebPageProxy.cpp
1091         https://bugs.webkit.org/show_bug.cgi?id=120205
1092
1093         Reviewed by Anders Carlsson.
1094
1095         * UIProcess/WebPageProxy.cpp:
1096         (WebKit::WebPageProxy::findPlugin):
1097         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
1098         Added UNUSED_PARAM to avoid warning.
1099
1100 2013-08-23  Andy Estes  <aestes@apple.com>
1101
1102         Fix issues found by the Clang Static Analyzer
1103         https://bugs.webkit.org/show_bug.cgi?id=120230
1104
1105         Reviewed by Darin Adler.
1106
1107         * UIProcess/API/mac/WKBrowsingContextController.mm:
1108         (autoreleased): Don't leak CFURLs when in Objective-C GC.
1109         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
1110         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
1111         Don't leak CFStrings when in Objective-C GC.
1112
1113 2013-08-26  Csaba Osztrogonác  <ossy@webkit.org>
1114
1115         [WK2] Buildfix for non Mac platforms
1116         https://bugs.webkit.org/show_bug.cgi?id=120294
1117
1118         Reviewed by Darin Adler.
1119
1120         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
1121         (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
1122         * NetworkProcess/NetworkResourceLoader.h:
1123
1124 2013-08-26  Alexey Proskuryakov  <ap@apple.com>
1125
1126         [Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
1127         https://bugs.webkit.org/show_bug.cgi?id=113094
1128
1129         Reviewed by Darin Adler.
1130
1131         Return new pasteboard change count from all functions that change it.
1132
1133         * UIProcess/WebContext.h:
1134         * UIProcess/WebContext.messages.in:
1135         * UIProcess/mac/WebContextMac.mm:
1136         (WebKit::WebContext::pasteboardCopy):
1137         (WebKit::WebContext::addPasteboardTypes):
1138         (WebKit::WebContext::setPasteboardTypes):
1139         (WebKit::WebContext::setPasteboardPathnamesForType):
1140         (WebKit::WebContext::setPasteboardStringForType):
1141         (WebKit::WebContext::setPasteboardBufferForType):
1142         * WebProcess/Plugins/PDF/PDFPlugin.mm:
1143         (WebKit::PDFPlugin::writeItemsToPasteboard):
1144         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1145         (WebKit::WebPlatformStrategies::copy):
1146         (WebKit::WebPlatformStrategies::changeCount):
1147         (WebKit::WebPlatformStrategies::addTypes):
1148         (WebKit::WebPlatformStrategies::setTypes):
1149         (WebKit::WebPlatformStrategies::setBufferForType):
1150         (WebKit::WebPlatformStrategies::setPathnamesForType):
1151         (WebKit::WebPlatformStrategies::setStringForType):
1152         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1153
1154 2013-08-26  Andreas Kling  <akling@apple.com>
1155
1156         Unreviewed build fix.
1157
1158         * WebProcess/WebPage/WebFrame.cpp:
1159         (WebKit::WebFrame::createWithCoreMainFrame):
1160         (WebKit::WebFrame::createSubframe):
1161
1162 2013-08-26  Pratik Solanki  <psolanki@apple.com>
1163
1164         PageGroup::groupSettings() should return a reference
1165         https://bugs.webkit.org/show_bug.cgi?id=120319
1166
1167         Reviewed by Andreas Kling.
1168
1169         PageGroup::m_groupSettings is never NULL so we can just return a reference from groupSettings().
1170
1171         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1172         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
1173
1174 2013-08-26  Andreas Kling  <akling@apple.com>
1175
1176         WebCore: Let Page create the main Frame.
1177         <https://webkit.org/b/119964>
1178
1179         Reviewed by Anders Carlsson.
1180
1181         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1182         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1183         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
1184
1185             This starts out with a null WebFrame* pointer now.
1186
1187         (WebKit::WebFrameLoaderClient::setWebFrame):
1188
1189             WebFrame hooks itself up through this as soon as it's constructed.
1190
1191         (WebKit::WebFrameLoaderClient::frameLoaderDestroyed):
1192
1193             Tweak an out-of-date comment. The ref() we're balancing out comes from
1194             WebFrame::create().
1195
1196         * WebProcess/WebPage/WebFrame.cpp:
1197         (WebKit::WebFrame::createWithCoreMainFrame):
1198
1199             Rewrote createMainFrame() as createWithCoreMainFrame(). The new method wraps
1200             an existing WebCore::Frame instead of creating a new one.
1201
1202         (WebKit::WebFrame::createSubframe):
1203
1204             Merged WebFrame::init() into here since the logic isn't shared with main
1205             Frame creation anymore.
1206
1207         (WebKit::WebFrame::create):
1208         (WebKit::WebFrame::WebFrame):
1209
1210             Call WebFrameLoaderClient::setWebFrame(this).
1211
1212         * WebProcess/WebPage/WebFrame.h:
1213
1214             WebFrame::m_frameLoaderClient is now an OwnPtr rather than an inline member.
1215             This way it can be created before the WebFrame.
1216
1217         * WebProcess/WebPage/WebPage.cpp:
1218         (WebKit::WebPage::WebPage):
1219
1220             Set up a WebFrameLoaderClient and pass it to the Page constructor along with
1221             the other PageClients.
1222
1223 2013-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1224
1225         [GTK] Add WebKit2 API for isolated worlds
1226         https://bugs.webkit.org/show_bug.cgi?id=103377
1227
1228         Reviewed by Anders Carlsson.
1229
1230         * GNUmakefile.list.am: Add new files to compilation.
1231         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
1232         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
1233         (testWebExtensionWindowObjectCleared):
1234         (scriptDialogCallback):
1235         (runJavaScriptInIsolatedWorldFinishedCallback):
1236         (testWebExtensionIsolatedWorld):
1237         (beforeAll):
1238         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1239         (echoCallback):
1240         (windowObjectCleared):
1241         (getWebPage):
1242         (methodCallCallback):
1243         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
1244         (webkit_frame_get_javascript_context_for_script_world): New public
1245         method to tget the JavaScript execution context for a given script
1246         world.
1247         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
1248         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Added.
1249         (scriptWorlds): Global WebKitScriptWorld map.
1250         (_WebKitScriptWorldPrivate::~_WebKitScriptWorldPrivate):
1251         (webkitScriptWorldGet): Get the WebKitScriptWorld wrapping the
1252         given injected bundle script world.
1253         (webkitScriptWorldGetInjectedBundleScriptWorld): Get the injected
1254         bundle script world wrapped by the given WebKitScriptWorld.
1255         (webkitScriptWorldWindowObjectCleared): Emit
1256         WebKitScriptWorld::window-object-cleared signal.
1257         (webkitScriptWorldCreate): Create a new WebKitScriptWorld wrapping
1258         the given injected bundle script world.
1259         (createDefaultScriptWorld): Create the default WebKitScriptWorld
1260         wrapping the normal world.
1261         (webkit_script_world_get_default): Return the default WebKitScriptWorld.
1262         (webkit_script_world_new): Create a new isolated WebKitScriptWorld.
1263         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Added.
1264         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Added.
1265         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1266         (didClearWindowObjectForFrame): Call webkitScriptWorldWindowObjectCleared().
1267         (webkitWebPageCreate): Add implementation for callback
1268         didClearWindowObjectForFrame in injected bundle loader client.
1269         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
1270         Include WebKitScriptWorld.h.
1271
1272 2013-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1273
1274         [WebKit2] Offsets for WKBundlePageLoaderClient in APIClientTraits are wrong
1275         https://bugs.webkit.org/show_bug.cgi?id=120268
1276
1277         Reviewed by Anders Carlsson.
1278
1279         * Shared/APIClientTraits.cpp: Use always the first member of every
1280         version as the offset of the version.
1281
1282 2013-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1283
1284         [GTK] Add missing initializer for pluginLoadPolicy in WKPageLoaderClient
1285         https://bugs.webkit.org/show_bug.cgi?id=120289
1286
1287         Reviewed by Philippe Normand.
1288
1289         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1290         (attachLoaderClientToView): Add initializer for pluginLoadPolicy
1291         and rename the comment of the previous one as
1292         pluginLoadPolicy_deprecatedForUseWithV2.
1293
1294 2013-08-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1295
1296         [GTK] webkitCredentialGetCredential returns a temporary in g_return_val_if_fail
1297         https://bugs.webkit.org/show_bug.cgi?id=120287
1298
1299         Reviewed by Philippe Normand.
1300
1301         * UIProcess/API/gtk/WebKitCredential.cpp:
1302         (webkitCredentialGetCredential): Use ASSERT() instead of
1303         g_return_val_if_fail() since this is a private function.
1304
1305 2013-08-25  Zan Dobersek  <zdobersek@igalia.com>
1306
1307         Unreviewed GTK build fix after r154565.
1308
1309         * UIProcess/API/gtk/tests/TestInspector.cpp: Include the Vector header.
1310         * UIProcess/API/gtk/tests/TestResources.cpp: Ditto.
1311
1312 2013-08-24  Darin Adler  <darin@apple.com>
1313
1314         Frame::tree should return a reference instead of a pointer
1315         https://bugs.webkit.org/show_bug.cgi?id=120259
1316
1317         Reviewed by Andreas Kling.
1318
1319         * WebProcess/Plugins/PluginView.cpp:
1320         (WebKit::PluginView::performJavaScriptURLRequest):
1321         * WebProcess/Storage/StorageAreaMap.cpp:
1322         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
1323         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
1324         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1325         (WebKit::WebFrameLoaderClient::createFrame):
1326         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1327         (WebKit::WebContextMenuClient::searchWithSpotlight):
1328         * WebProcess/WebPage/FindController.cpp:
1329         (WebKit::frameWithSelection):
1330         (WebKit::FindController::rectsForTextMatches):
1331         * WebProcess/WebPage/WebFrame.cpp:
1332         (WebKit::WebFrame::init):
1333         (WebKit::WebFrame::contentsAsString):
1334         (WebKit::WebFrame::name):
1335         (WebKit::WebFrame::childFrames):
1336         * WebProcess/WebPage/WebPage.cpp:
1337         (WebKit::WebPage::clearMainFrameName):
1338         (WebKit::WebPage::setDrawsBackground):
1339         (WebKit::WebPage::setDrawsTransparentBackground):
1340         (WebKit::WebPage::setWindowResizerSize):
1341         (WebKit::frameWithSelection):
1342         (WebKit::WebPage::unmarkAllMisspellings):
1343         (WebKit::WebPage::unmarkAllBadGrammar):
1344         (WebKit::pageContainsAnyHorizontalScrollbars):
1345         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1346         (WebKit::TiledCoreAnimationDrawingArea::forceRepaint):
1347         Use tree(). instead of tree()->.
1348
1349 2013-08-24  Commit Queue  <commit-queue@webkit.org>
1350
1351         Unreviewed, rolling out r154545.
1352         http://trac.webkit.org/changeset/154545
1353         https://bugs.webkit.org/show_bug.cgi?id=120252
1354
1355         Broke WebKit2 API tests (Requested by andersca on #webkit).
1356
1357         * GNUmakefile.list.am:
1358         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
1359         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
1360         (beforeAll):
1361         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1362         (methodCallCallback):
1363         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
1364         (webkit_frame_get_javascript_global_context):
1365         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
1366         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Removed.
1367         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Removed.
1368         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Removed.
1369         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1370         (webkitWebPageCreate):
1371         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
1372
1373 2013-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1374
1375         [GTK] Add WebKit2 API for isolated worlds
1376         https://bugs.webkit.org/show_bug.cgi?id=103377
1377
1378         Reviewed by Anders Carlsson.
1379
1380         * GNUmakefile.list.am: Add new files to compilation.
1381         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
1382         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
1383         (testWebExtensionWindowObjectCleared):
1384         (scriptDialogCallback):
1385         (runJavaScriptInIsolatedWorldFinishedCallback):
1386         (testWebExtensionIsolatedWorld):
1387         (beforeAll):
1388         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1389         (echoCallback):
1390         (windowObjectCleared):
1391         (getWebPage):
1392         (methodCallCallback):
1393         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp:
1394         (webkit_frame_get_javascript_context_for_script_world): New public
1395         method to tget the JavaScript execution context for a given script
1396         world.
1397         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h:
1398         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp: Added.
1399         (scriptWorlds): Global WebKitScriptWorld map.
1400         (_WebKitScriptWorldPrivate::~_WebKitScriptWorldPrivate):
1401         (webkitScriptWorldGet): Get the WebKitScriptWorld wrapping the
1402         given injected bundle script world.
1403         (webkitScriptWorldGetInjectedBundleScriptWorld): Get the injected
1404         bundle script world wrapped by the given WebKitScriptWorld.
1405         (webkitScriptWorldWindowObjectCleared): Emit
1406         WebKitScriptWorld::window-object-cleared signal.
1407         (webkitScriptWorldCreate): Create a new WebKitScriptWorld wrapping
1408         the given injected bundle script world.
1409         (createDefaultScriptWorld): Create the default WebKitScriptWorld
1410         wrapping the normal world.
1411         (webkit_script_world_get_default): Return the default WebKitScriptWorld.
1412         (webkit_script_world_new): Create a new isolated WebKitScriptWorld.
1413         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.h: Added.
1414         * WebProcess/InjectedBundle/API/gtk/WebKitScriptWorldPrivate.h: Added.
1415         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1416         (didClearWindowObjectForFrame): Call webkitScriptWorldWindowObjectCleared().
1417         (webkitWebPageCreate): Add implementation for callback
1418         didClearWindowObjectForFrame in injected bundle loader client.
1419         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
1420         Include WebKitScriptWorld.h.
1421
1422 2013-08-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1423
1424         [GTK] Expose WebKitFrame in WebKit2GTK+ web extensions API
1425         https://bugs.webkit.org/show_bug.cgi?id=119743
1426
1427         Reviewed by Anders Carlsson.
1428
1429         * GNUmakefile.list.am: Add new files to compilation.
1430         * Shared/APIClientTraits.cpp: Update for new interface version.
1431         * Shared/APIClientTraits.h: Ditto.
1432         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add WebKitFrame
1433         section.
1434         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new public
1435         symbols.
1436         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
1437         webkit_frame_get_type.
1438         * UIProcess/API/gtk/tests/FrameTest.cpp: Added.
1439         (WebKitFrameTest::create):
1440         (WebKitFrameTest::webPageFromArgs):
1441         (WebKitFrameTest::testMainFrame):
1442         (WebKitFrameTest::testURI):
1443         (WebKitFrameTest::testJavaScriptContext):
1444         (WebKitFrameTest::runTest):
1445         (registerTests):
1446         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test files.
1447         * UIProcess/API/gtk/tests/TestFrame.cpp: Added.
1448         (webkitFrameTestRun):
1449         (testWebKitFrameMainFrame):
1450         (testWebKitFrameURI):
1451         (testWebKitFrameJavaScriptContext):
1452         (beforeAll):
1453         (afterAll):
1454         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add
1455         willDestroyFrame callback to the injected bundle loader client, to
1456         notify the client when a frame is about to be destroyed.
1457         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Added.
1458         (webkit_frame_class_init):
1459         (webkitFrameCreate):
1460         (webkit_frame_is_main_frame):
1461         (webkit_frame_get_uri):
1462         (webkit_frame_get_javascript_global_context):
1463         * WebProcess/InjectedBundle/API/gtk/WebKitFrame.h: Added.
1464         * WebProcess/InjectedBundle/API/gtk/WebKitFramePrivate.h: Added.
1465         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1466         (webkitFrameGetOrCreate): Helper function to create a WebKitFrame
1467         wrapping the given WebFrame or returning the wrapper if it already
1468         exists.
1469         (willDestroyFrame): Remove the WebKitFrame wrapping the given
1470         WebFrame if it exists.
1471         (webkitWebPageCreate): Add willDestroyFrame implementation to
1472         injected bundle loader client.
1473         (webkit_web_page_get_main_frame): Return the main frame of the
1474         page.
1475         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
1476         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
1477         Include WebKitFrame.h.
1478         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1479         (WebKit::InjectedBundlePageLoaderClient::willDestroyFrame): New
1480         callback to be called when a frame is about to be destroyed.
1481         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1482         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1483         (WebKit::WebFrameLoaderClient::frameLoaderDestroyed): Call
1484         willDestroyFrame callback of injected bundle loader client.
1485         * WebProcess/qt/QtBuiltinBundlePage.cpp:
1486         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): Add
1487         willDestroyFrame callback.
1488
1489 2013-08-24  Antti Koivisto  <antti@apple.com>
1490
1491         Revert accidental change.
1492         
1493         Not reviewed.
1494
1495         * WebProcess/com.apple.WebProcess.sb.in:
1496
1497 2013-08-23  Beth Dakin  <bdakin@apple.com>
1498
1499         REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 
1500         Adobe Reader
1501         https://bugs.webkit.org/show_bug.cgi?id=120240
1502         -and corresponding-
1503         <rdar://problem/14634453>
1504
1505         Reviewed by Anders Carlsson.
1506
1507         Hook up new WebSystemInterface API to find out if the current context is the PDF 
1508         context. 
1509
1510         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1511         (InitWebCoreSystemInterface):
1512
1513 2013-08-23  Alexey Proskuryakov  <ap@apple.com>
1514
1515         [WK2] Assertion failures when loading XSL stylesheets with NetworkProcess
1516         https://bugs.webkit.org/show_bug.cgi?id=120186
1517         <rdar://problem/14080273>
1518
1519         Reviewed by Brady Eidson.
1520
1521         Covered by many existing tests.
1522
1523         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1524         (WebKit::WebPlatformStrategies::loadResourceSynchronously): Pass frame ID and page ID.
1525         They are mostly needed for authentication, which is not supported with sync requests,
1526         but it will be supported some day.
1527
1528         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
1529         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
1530         (WebKit::WebFrameNetworkingContext::webFrameLoaderClient):
1531         Added a way to get frame loader client from WebKit NetworkingContext subclass.
1532
1533 2013-08-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1534
1535         [GTK] Wrong interface version used in WebKitWebPage for loader client
1536         https://bugs.webkit.org/show_bug.cgi?id=120199
1537
1538         Reviewed by Gustavo Noronha Silva.
1539
1540         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1541         (webkitWebPageCreate): Use kWKBundlePageLoaderClientCurrentVersion
1542         instead of kWKBundlePageResourceLoadClientCurrentVersion in loader
1543         client initialization.
1544
1545 2013-08-22  Simon Cooper  <scooper@apple.com>
1546
1547         Need to disable FakeSYSVSHM when sandboxing is not enabled
1548         https://bugs.webkit.org/show_bug.cgi?id=120182
1549         <rdar://problem/14814461>
1550
1551         Reviewed by Alexey Proskuryakov.
1552
1553         When not in a sandbox do not enable the FakeSYSVSHIM. This
1554         allows LocalConnection to work when Flash Player is run in
1555         "Unsafe Mode".
1556
1557         * PluginProcess/mac/PluginProcessShim.mm:
1558         (WebKit::shim_disabled):
1559
1560 2013-08-22  Andy Estes  <aestes@apple.com>
1561
1562         <https://webkit.org/b/120180> Fix issues with OTHER_LDFLAGS in various .xcconfig files
1563
1564         Reviewed by David Kilzer.
1565
1566         Adding ld flags for ASAN overwrote the unexported symbol flags we were
1567         previously specifying. Since the unexported symbol ld flags are only
1568         needed for the framework target, move them to WebKit2.xcconfig where we
1569         can add them to OTHER_LDFLAGS along with the ASAN values inherited from
1570         DebugRelease.xcconfig (and other values).
1571
1572         * Configurations/Base.xcconfig: Removed the unexported symbol ld flags.
1573         * Configurations/WebKit2.xcconfig: ... and moved them here.
1574
1575 2013-08-21  Tim Horton  <timothy_horton@apple.com>
1576
1577         Another null-deref under WebDragClient::startDrag
1578         https://bugs.webkit.org/show_bug.cgi?id=120145
1579         <rdar://problem/14650652>
1580
1581         Reviewed by Simon Fraser.
1582
1583         convertImageToBitmap can legitimately return null, so don't dereference it.
1584
1585         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1586         (WebKit::WebDragClient::startDrag):
1587
1588 2013-08-21  Beth Dakin  <bdakin@apple.com>
1589
1590         <https://webkit.org/b/120140> Clients expect didFirstLayout-related calls to 
1591         happen before didLayout
1592
1593         Reviewed by Anders Carlsson.
1594
1595         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1596         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
1597
1598 2013-08-21  Alexey Proskuryakov  <ap@apple.com>
1599
1600         REGRESSION (r145458?): WebProcess doesn't respect UI process localization
1601         https://bugs.webkit.org/show_bug.cgi?id=120096
1602
1603         Reviewed by Darin Adler.
1604
1605         We used to get into a situation where CFBundle thought that we had no good localization,
1606         and used one passed as default. This is never the case with mixed localizations,
1607         so default is just ignored now.
1608
1609         I think that the previous behavior was a bit of a hack. As WebProcess is not localized,
1610         it's more honest to say that we want mixed localizations, and force the language
1611         to match UI process localization.
1612
1613         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:
1614         (WebKit::ChildProcessMain): Don't set default localization, it's not taken into
1615         consideration unless all other attempts to compute bundle localization fail.
1616
1617         * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::createProcess): Pass
1618         UI process localization as -AppleLanguages argument, so that Core Foundation uses
1619         that instead of actual user languages. We want to match UI process localization.
1620
1621 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
1622
1623         https://bugs.webkit.org/show_bug.cgi?id=120093
1624         Remove getOwnPropertyDescriptor trap
1625
1626         Reviewed by Geoff Garen.
1627
1628         All implementations of this method are now called via the method table, and equivalent in behaviour.
1629         Remove all duplicate implementations (and the method table trap), and add a single member function implementation on JSObject.
1630
1631         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1632         * WebProcess/Plugins/Netscape/JSNPObject.h:
1633             - remove getOwnPropertyDescriptor
1634
1635 2013-08-20  Pratik Solanki  <psolanki@apple.com>
1636
1637         <https://webkit.org/b/120029> Document::markers() should return a reference
1638
1639         Reviewed by Andreas Kling.
1640
1641         Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
1642         m_markers as const and initialize it in member initialization.
1643
1644         * WebProcess/WebPage/FindController.cpp:
1645         (WebKit::FindController::rectsForTextMatches):
1646         * WebProcess/WebPage/WebPage.cpp:
1647         (WebKit::WebPage::unmarkAllMisspellings):
1648         (WebKit::WebPage::unmarkAllBadGrammar):
1649
1650 2013-08-20  Gavin Barraclough  <barraclough@apple.com>
1651
1652         https://bugs.webkit.org/show_bug.cgi?id=120053
1653         Remove custom getOwnPropertyDescriptor for JSNPObject
1654
1655         Reviewed by Oliver Hunt.
1656
1657         Think this is the last one!
1658
1659         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1660             - Remove custom getOwnPropertyDescriptor implementation.
1661
1662 2013-08-20  Anton Obzhirov  <a.obzhirov@samsung.com>
1663
1664         <https://webkit.org/b/119487> [Gtk] Cancel authentication on load failed
1665
1666         Reviewed by Martin Robinson.
1667
1668         Added callback to handle load-failed event in default authentication dialog.
1669         Authentication request gets cancelled and the dialog widget gets destroyed.
1670
1671         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
1672         (pageLoadFailed):
1673         (webkitAuthenticationDialogInitialize):
1674         (webkitAuthenticationDialogDispose):
1675         (webkit_authentication_dialog_class_init):
1676         (webkitAuthenticationDialogNew):
1677         * UIProcess/API/gtk/WebKitAuthenticationDialog.h:
1678         * UIProcess/API/gtk/WebKitWebView.cpp:
1679         (webkitWebViewAuthenticate):
1680
1681 2013-08-20  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1682
1683         [Qt][WK2] Doesn't build without Plugin-process
1684         https://bugs.webkit.org/show_bug.cgi?id=120060
1685
1686         Reviewed by Jocelyn Turcotte.
1687
1688         Disable netscape plugin api in WebKit2 when the plugin architecture is unsupported for WebKit2.
1689
1690         * Target.pri:
1691
1692 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
1693
1694         <https://webkit.org/b/120049> Delete code for Snow Leopard
1695
1696         Reviewed by Benjamin Poulain.
1697
1698         * NetworkProcess/mac/NetworkProcessMac.mm:
1699         (WebKit::overrideSystemProxies):
1700         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1701         * WebKit2Prefix.h:
1702
1703 2013-08-19  Beth Dakin  <bdakin@apple.com>
1704
1705         <https://webkit.org/b/120027> AXObjectCache's 
1706         accessibilityEnhancedUserInterfaceEnabled should be initialized on process 
1707         creation
1708
1709         Reviewed by Sam Weinig.
1710
1711         Right now we only call AXObjectCache::setEnhancedAccessibility() when AppKit sends 
1712         us a notification indicating that the value has changed. We should not have to 
1713         rely on that to properly initialize this value. It should be done with the 
1714         WebProcessCreationParamters. 
1715
1716         * Shared/WebProcessCreationParameters.cpp:
1717         (WebKit::WebProcessCreationParameters::encode):
1718         (WebKit::WebProcessCreationParameters::decode):
1719         * Shared/WebProcessCreationParameters.h:
1720         * UIProcess/mac/WebContextMac.mm:
1721         (WebKit::WebContext::platformInitializeWebProcess):
1722         * WebProcess/mac/WebProcessMac.mm:
1723         (WebKit::WebProcess::platformInitializeWebProcess):
1724
1725 2013-08-19  Pratik Solanki  <psolanki@apple.com>
1726
1727         <https://webkit.org/b/119918> Frame::selection() should return a reference
1728
1729         Reviewed by Darin Adler.
1730
1731         m_selection is never NULL so return a reference from Frame::selection(). Also removed some
1732         unnecessary null checks and assert diff ts exposed as a result.
1733
1734         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1735         (WebKit::WebEditorClient::updateGlobalSelection):
1736         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1737         (WebKit::collapseSelection):
1738         (WebKit::WebEditorClient::updateGlobalSelection):
1739         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1740         (WebKit::WebContextMenuClient::lookUpInDictionary):
1741         (WebKit::WebContextMenuClient::searchWithSpotlight):
1742         * WebProcess/WebPage/FindController.cpp:
1743         (WebKit::frameWithSelection):
1744         (WebKit::FindController::updateFindUIAfterPageScroll):
1745         (WebKit::FindController::getFindIndicatorBitmapAndRect):
1746         (WebKit::FindController::getImageForFindMatch):
1747         (WebKit::FindController::selectFindMatch):
1748         (WebKit::FindController::updateFindIndicator):
1749         (WebKit::FindController::drawRect):
1750         * WebProcess/WebPage/WebPage.cpp:
1751         (WebKit::WebPage::editorState):
1752         (WebKit::WebPage::scaledSnapshotWithOptions):
1753         (WebKit::WebPage::centerSelectionInVisibleArea):
1754         (WebKit::frameWithSelection):
1755         (WebKit::WebPage::clearSelection):
1756         (WebKit::WebPage::confirmComposition):
1757         (WebKit::WebPage::setComposition):
1758         (WebKit::WebPage::currentSelectionAsRange):
1759         * WebProcess/WebPage/mac/WebPageMac.mm:
1760         (WebKit::WebPage::setComposition):
1761         (WebKit::WebPage::insertText):
1762         (WebKit::WebPage::insertDictatedText):
1763         (WebKit::WebPage::getMarkedRange):
1764         (WebKit::WebPage::getSelectedRange):
1765         (WebKit::WebPage::getAttributedSubstringFromRange):
1766         (WebKit::WebPage::characterIndexForPoint):
1767         (WebKit::convertToRange):
1768         (WebKit::WebPage::performDictionaryLookupAtLocation):
1769         (WebKit::WebPage::readSelectionFromPasteboard):
1770         (WebKit::WebPage::getStringSelectionForPasteboard):
1771         (WebKit::WebPage::getDataSelectionForPasteboard):
1772
1773 2013-08-18  Darin Adler  <darin@apple.com>
1774
1775         <https://webkit.org/b/119989> Make use of Node::ownerDocument a compile time error
1776
1777         Reviewed by Sam Weinig.
1778
1779         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
1780         (WebKit::PDFPluginChoiceAnnotation::createAnnotationElement): Use document instead of
1781         ownerDocument.
1782         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1783         (WebKit::PDFPluginTextAnnotation::createAnnotationElement): Ditto.
1784
1785 2013-08-18  Dan Bernstein  <mitz@apple.com>
1786
1787         Fix clean engineering builds after r154251.
1788
1789         * WebKit2.xcodeproj/project.pbxproj: Removed references to the OfflineStorage XPC services
1790         from the “Copy XPC services for engineering builds” build phase.
1791
1792 2013-08-18  Gavin Barraclough  <barraclough@apple.com>
1793
1794         https://bugs.webkit.org/show_bug.cgi?id=119972
1795         Add attributes field to PropertySlot
1796
1797         Reviewed by Geoff Garen.
1798
1799         For all JSC types, this makes getOwnPropertyDescriptor redundant.
1800         There will be a bit more hacking required in WebCore to remove GOPD whilst maintaining current behaviour.
1801         (Current behaviour is in many ways broken, particularly in that GOPD & GOPS are inconsistent, but we should fix incrementally).
1802
1803         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1804         (WebKit::JSNPObject::getOwnPropertySlot):
1805         (WebKit::JSNPObject::getOwnPropertyDescriptor):
1806             - Pass attributes to PropertySlot::set* methods.
1807
1808 2013-08-16  Sam Weinig  <sam@webkit.org>
1809
1810         <https://webkit.org/b/119911> Remove the unused OfflineStorageProcess
1811
1812         Reviewed by Darin Adler.
1813
1814         * Configurations/OfflineStorageProcess.xcconfig: Removed.
1815         * Configurations/OfflineStorageService.Development.xcconfig: Removed.
1816         * Configurations/OfflineStorageService.xcconfig: Removed.
1817         * DerivedSources.make:
1818         * OfflineStorageProcess: Removed.
1819         * OfflineStorageProcess/EntryPoint: Removed.
1820         * OfflineStorageProcess/EntryPoint/mac: Removed.
1821         * OfflineStorageProcess/EntryPoint/mac/LegacyProcess: Removed.
1822         * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/Info.plist: Removed.
1823         * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/OfflineStorageProcessMain.mm: Removed.
1824         * OfflineStorageProcess/EntryPoint/mac/XPCService: Removed.
1825         * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService: Removed.
1826         * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development: Removed.
1827         * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development/Info.plist: Removed.
1828         * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService/Info.plist: Removed.
1829         * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageServiceEntryPoint.mm: Removed.
1830         * OfflineStorageProcess/OfflineStorageProcess.cpp: Removed.
1831         * OfflineStorageProcess/OfflineStorageProcess.h: Removed.
1832         * OfflineStorageProcess/OfflineStorageProcess.messages.in: Removed.
1833         * OfflineStorageProcess/mac: Removed.
1834         * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm: Removed.
1835         * OfflineStorageProcess/mac/com.apple.WebKit.OfflineStorage.sb: Removed.
1836         * Scripts/webkit2/messages.py:
1837         * Shared/OfflineStorage: Removed.
1838         * Shared/OfflineStorage/OfflineStorageProcessCreationParameters.cpp: Removed.
1839         * Shared/OfflineStorage/OfflineStorageProcessCreationParameters.h: Removed.
1840         * WebKit2.xcodeproj/project.pbxproj:
1841         Remove.
1842
1843 2013-08-17  Darin Adler  <darin@apple.com>
1844
1845         <https://webkit.org/b/119941> Make Page::dragController return a reference
1846
1847         Reviewed by Andreas Kling.
1848
1849         * WebProcess/WebPage/WebPage.cpp:
1850         (WebKit::WebPage::performDragControllerAction):
1851         (WebKit::WebPage::dragEnded):
1852         Updated call sites.
1853
1854 2013-08-17  David Kilzer  <ddkilzer@apple.com>
1855
1856         WebKit2 fails to build with trunk clang: error: 'WebPluginSiteDataManagerh' is used as a header guard here, followed by #define of a different macro [-Werror,-Wheader-guard]
1857         <http://webkit.org/b/119935>
1858         <rdar://problem/14764131>
1859
1860         Reviewed by Darin Adler.
1861
1862         * UIProcess/Plugins/WebPluginSiteDataManager.h: Fix typo
1863         introduced in r78647.
1864
1865 2013-08-16  Pratik Solanki  <psolanki@apple.com>
1866
1867         <https://webkit.org/b/119852> Frame::scriptController() should return a reference
1868
1869         Reviewed by Andreas Kling.
1870
1871         m_script is never NULL so we can just return a reference. Also remove some pointless null
1872         checks as a result of doing this.
1873
1874         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1875         (WebKit::NPRuntimeObjectMap::globalObject):
1876         * WebProcess/Plugins/PluginView.cpp:
1877         (WebKit::PluginView::performJavaScriptURLRequest):
1878         (WebKit::PluginView::windowScriptNPObject):
1879         (WebKit::PluginView::pluginElementNPObject):
1880         * WebProcess/WebPage/WebFrame.cpp:
1881         (WebKit::WebFrame::jsContext):
1882         (WebKit::WebFrame::jsContextForWorld):
1883         (WebKit::WebFrame::jsWrapperForWorld):
1884         * WebProcess/WebPage/WebInspector.cpp:
1885         (WebKit::WebInspector::didSave):
1886         (WebKit::WebInspector::didAppend):
1887         * WebProcess/WebPage/WebPage.cpp:
1888         (WebKit::WebPage::runJavaScriptInMainFrame):
1889
1890 2013-08-16  Brady Eidson  <beidson@apple.com>
1891
1892         (NetworkProcess)  Sync XHRs should load using async ResourceHandles, not ResourceHandle::loadResourceSynchronously
1893         https://bugs.webkit.org/show_bug.cgi?id=119493
1894
1895         Reviewed by Alexey Proskuryakov.
1896
1897         This patch does the following:
1898           - Consolidates SchedulableLoader and NetworkResourceLoader into one class.
1899           - Removes SyncNetworkResourceLoader.
1900           - Adds a NetworkLoaderClient interface that customizes certain behaviors of the NetworkResourceLoader.
1901           - Implements a SynchronousNetworkLoaderClient and AsynchronousNetworkLoaderClient for the two different types of loads.
1902
1903         The AsynchronousNetworkLoaderClient results in messaging back progress to the WebProcess as the load progresses.
1904         The SynchronousNetworkLoaderClient accumulates the response, data, and error to be communicated back to the WebProcess
1905         only when the load is complete.
1906
1907         Update small swaths of code to reflect that NetworkResourceLoader is the One True Loader (tm):
1908         * NetworkProcess/HostRecord.cpp:
1909         (WebKit::HostRecord::scheduleResourceLoader):
1910         (WebKit::HostRecord::addLoaderInProgress):
1911         (WebKit::removeLoaderFromQueue):
1912         (WebKit::HostRecord::removeLoader):
1913         (WebKit::HostRecord::servePendingRequestsForQueue):
1914         (WebKit::HostRecord::limitsRequests):
1915         * NetworkProcess/HostRecord.h:
1916
1917         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1918         (WebKit::NetworkConnectionToWebProcess::didClose):
1919         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
1920         (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
1921         * NetworkProcess/NetworkConnectionToWebProcess.h:
1922
1923         * NetworkProcess/NetworkProcess.cpp:
1924         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1925         (WebKit::NetworkResourceLoadScheduler::scheduleLoader):
1926         (WebKit::NetworkResourceLoadScheduler::removeLoader):
1927         (WebKit::NetworkResourceLoadScheduler::receivedRedirect):
1928         (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders):
1929         (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader):
1930         * NetworkProcess/NetworkResourceLoadScheduler.h:
1931
1932         Combine ScheduleableLoader and NetworkResourceLoader into NetworkResourceLoader:
1933         * NetworkProcess/NetworkResourceLoader.cpp:
1934         (WebKit::NetworkResourceLoader::NetworkResourceLoader):
1935         (WebKit::NetworkResourceLoader::~NetworkResourceLoader):
1936         (WebKit::NetworkResourceLoader::isSynchronous):
1937         (WebKit::NetworkResourceLoader::start):
1938         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
1939         (WebKit::NetworkResourceLoader::didReceiveBuffer):
1940         (WebKit::NetworkResourceLoader::didFinishLoading):
1941         (WebKit::NetworkResourceLoader::didFail):
1942         (WebKit::NetworkResourceLoader::willSendRequestAsync):
1943         (WebKit::NetworkResourceLoader::continueWillSendRequest):
1944         (WebKit::NetworkResourceLoader::didSendData):
1945         (WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
1946         (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
1947         (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
1948         (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
1949         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
1950         * NetworkProcess/NetworkResourceLoader.h:
1951         (WebKit::NetworkResourceLoader::create):
1952         (WebKit::NetworkResourceLoader::connectionToWebProcess):
1953         (WebKit::NetworkResourceLoader::priority):
1954         (WebKit::NetworkResourceLoader::request):
1955         (WebKit::NetworkResourceLoader::isLoadingMainResource):
1956         (WebKit::NetworkResourceLoader::setHostRecord):
1957         (WebKit::NetworkResourceLoader::hostRecord):
1958         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
1959
1960         Add an abstract NetworkLoaderClient to adapt a load to be either synchronous or asynchronous:
1961         * NetworkProcess/NetworkLoaderClient.h:
1962         (WebKit::NetworkLoaderClient::~NetworkLoaderClient):
1963         (WebKit::NetworkLoaderClient::isSynchronous):
1964         (WebKit::NetworkLoaderClient::NetworkLoaderClient):
1965
1966         The asynchronous loader client, primarily to message progress back to the WebProcess as it happens:
1967         * NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Added.
1968         (WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient):
1969         (WebKit::AsynchronousNetworkLoaderClient::willSendRequest):
1970         (WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
1971         (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
1972         (WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
1973         (WebKit::AsynchronousNetworkLoaderClient::didSendData):
1974         (WebKit::AsynchronousNetworkLoaderClient::didFinishLoading):
1975         (WebKit::AsynchronousNetworkLoaderClient::didFail):
1976         * NetworkProcess/AsynchronousNetworkLoaderClient.h:
1977         (WebKit::AsynchronousNetworkLoaderClient::create):
1978
1979         The synchronous loader client, primarily to accumulate results of the load to send back to the WebProcess all at once:
1980         * NetworkProcess/SynchronousNetworkLoaderClient.cpp: Added.
1981         (WebKit::SynchronousNetworkLoaderClient::SynchronousNetworkLoaderClient):
1982         (WebKit::SynchronousNetworkLoaderClient::~SynchronousNetworkLoaderClient):
1983         (WebKit::SynchronousNetworkLoaderClient::willSendRequest):
1984         (WebKit::SynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
1985         (WebKit::SynchronousNetworkLoaderClient::didReceiveResponse):
1986         (WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
1987         (WebKit::SynchronousNetworkLoaderClient::didFinishLoading):
1988         (WebKit::SynchronousNetworkLoaderClient::didFail):
1989         (WebKit::SynchronousNetworkLoaderClient::sendDelayedReply):
1990         * NetworkProcess/SynchronousNetworkLoaderClient.h: Added.
1991         (WebKit::SynchronousNetworkLoaderClient::create):
1992
1993         * NetworkProcess/SchedulableLoader.cpp: Removed.
1994         * NetworkProcess/SchedulableLoader.h: Removed.
1995         * NetworkProcess/SyncNetworkResourceLoader.cpp: Removed.
1996         * NetworkProcess/SyncNetworkResourceLoader.h: Removed.
1997
1998         * WebKit2.xcodeproj/project.pbxproj:
1999
2000 2013-08-16  Gabor Rapcsanyi  <rgabor@webkit.org>
2001
2002         [Qt][ARM] Unreviewed buildfix after 154127.
2003
2004         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: Add missing header.
2005
2006 2013-08-15  Ryuan Choi  <ryuan.choi@samsung.com>
2007
2008         [EFL] Unreviewed build fix after r154142 and r154144.
2009
2010         * UIProcess/WebContext.cpp:
2011         (WebKit::WebContext::useTestingNetworkSession):
2012         Fixed build break when NETWORK_PROCESS is disabled after r154144.
2013
2014 2013-08-15  Chris Fleizach  <cfleizach@apple.com>
2015
2016         <https://webkit.org/b/119858> AX: Crash: com.apple.WebKit.WebContent at com.apple.WebKit2: WebKit::WebPage::accessibilityObjectForMainFramePlugin + 8
2017
2018         Reviewed by Tim Horton.
2019
2020         Ensure that the page is available before accessing it.
2021
2022         * WebProcess/WebPage/mac/WebPageMac.mm:
2023         (WebKit::WebPage::accessibilityObjectForMainFramePlugin):
2024
2025 2013-08-15  Alexey Proskuryakov  <ap@apple.com>
2026
2027         [WK2] NetworkProcess should use a temporary storage session for test
2028         https://bugs.webkit.org/show_bug.cgi?id=119855
2029
2030         Reviewed by Darin Adler.
2031
2032         We used to have a bundle API for WebKitTestRunner to do this in injected bundle, but
2033         NetworkProcess has no injected bundle.
2034
2035         Added a WKContext API, sending the information to NetworkProcess with initialization
2036         parameters. Reworked WebProcess path to do the same for consistency - bundle API
2037         is better per se, but not when we also need to have another one.
2038
2039         * NetworkProcess/NetworkProcess.cpp:
2040         (WebKit::NetworkProcess::initializeNetworkProcess):
2041         * Shared/Network/NetworkProcessCreationParameters.cpp:
2042         (WebKit::NetworkProcessCreationParameters::encode):
2043         (WebKit::NetworkProcessCreationParameters::decode):
2044         * Shared/Network/NetworkProcessCreationParameters.h:
2045         * Shared/WebProcessCreationParameters.cpp:
2046         (WebKit::WebProcessCreationParameters::encode):
2047         (WebKit::WebProcessCreationParameters::decode):
2048         * Shared/WebProcessCreationParameters.h:
2049         * UIProcess/API/C/WKContext.cpp:
2050         (WKContextUseTestingNetworkSession):
2051         * UIProcess/API/C/WKContextPrivate.h:
2052         * UIProcess/WebContext.cpp:
2053         (WebKit::WebContext::WebContext):
2054         (WebKit::WebContext::ensureNetworkProcess):
2055         (WebKit::WebContext::createNewWebProcess):
2056         (WebKit::WebContext::useTestingNetworkSession):
2057         * UIProcess/WebContext.h:
2058         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2059         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2060         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2061         * WebProcess/InjectedBundle/InjectedBundle.h:
2062         * WebProcess/WebProcess.cpp:
2063         (WebKit::WebProcess::initializeWebProcess):
2064
2065 2013-08-15  Anders Carlsson  <andersca@apple.com>
2066
2067         <https://webkit.org/b/119859> Frame::loader() should return a reference
2068
2069         Reviewed by Andreas Kling.
2070
2071         * Shared/WebRenderLayer.cpp:
2072         (WebKit::WebRenderLayer::create):
2073         * Shared/WebRenderObject.cpp:
2074         (WebKit::WebRenderObject::create):
2075         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2076         (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
2077         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2078         (WKBundleFrameGetFrameLoadState):
2079         (WKBundleFrameClearOpener):
2080         (WKBundleFrameCallShouldCloseOnWebView):
2081         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2082         (WebKit::InjectedBundleNodeHandle::documentFrame):
2083         (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
2084         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
2085         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2086         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2087         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
2088         (WebKit::InjectedBundleDOMWindowExtension::frame):
2089         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2090         (WebKit::InjectedBundleHitTestResult::frame):
2091         (WebKit::InjectedBundleHitTestResult::targetFrame):
2092         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2093         (WebKit::PDFPlugin::clickedLink):
2094         * WebProcess/Plugins/PluginView.cpp:
2095         (WebKit::webPage):
2096         (WebKit::PluginView::didFailToInitializePlugin):
2097         (WebKit::PluginView::performFrameLoadURLRequest):
2098         (WebKit::PluginView::userAgent):
2099         (WebKit::PluginView::loadURL):
2100         (WebKit::PluginView::cancelManualStreamLoad):
2101         (WebKit::PluginView::proxiesForURL):
2102         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2103         (WebKit::WebChromeClient::focusedElementChanged):
2104         (WebKit::WebChromeClient::focusedFrameChanged):
2105         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
2106         (WebKit::WebChromeClient::closeWindowSoon):
2107         (WebKit::WebChromeClient::runJavaScriptAlert):
2108         (WebKit::WebChromeClient::runJavaScriptConfirm):
2109         (WebKit::WebChromeClient::runJavaScriptPrompt):
2110         (WebKit::WebChromeClient::unavailablePluginButtonClicked):
2111         (WebKit::WebChromeClient::print):
2112         (WebKit::WebChromeClient::exceededDatabaseQuota):
2113         (WebKit::WebChromeClient::runOpenPanel):
2114         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2115         (WebKit::WebContextMenuClient::searchWithGoogle):
2116         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2117         (WebKit::WebEditorClient::textFieldDidBeginEditing):
2118         (WebKit::WebEditorClient::textFieldDidEndEditing):
2119         (WebKit::WebEditorClient::textDidChangeInTextField):
2120         (WebKit::WebEditorClient::textDidChangeInTextArea):
2121         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
2122         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
2123         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2124         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
2125         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
2126         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2127         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2128         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2129         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2130         (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
2131         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
2132         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
2133         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
2134         (WebKit::WebFrameLoaderClient::restoreViewState):
2135         (WebKit::WebFrameLoaderClient::createFrame):
2136         (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
2137         (WebKit::WebFrameLoaderClient::objectContentType):
2138         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2139         (WebKit::WebPlatformStrategies::getPluginInfo):
2140         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2141         (WebKit::WebFrameNetworkingContext::blockedError):
2142         * WebProcess/WebPage/WebFrame.cpp:
2143         (WebKit::WebFrame::didReceivePolicyDecision):
2144         (WebKit::WebFrame::startDownload):
2145         (WebKit::WebFrame::source):
2146         (WebKit::WebFrame::contentsAsString):
2147         (WebKit::WebFrame::url):
2148         (WebKit::WebFrame::parentFrame):
2149         (WebKit::WebFrame::childFrames):
2150         (WebKit::WebFrame::stopLoading):
2151         (WebKit::WebFrame::frameForContext):
2152         (WebKit::WebFrame::provisionalURL):
2153         (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
2154         (WebKit::WebFrame::mimeTypeForResourceWithURL):
2155         (WebKit::WebFrameFilter::shouldIncludeSubframe):
2156         * WebProcess/WebPage/WebPage.cpp:
2157         (WebKit::WebPage::createPlugin):
2158         (WebKit::WebPage::close):
2159         (WebKit::WebPage::tryClose):
2160         (WebKit::WebPage::loadURLRequest):
2161         (WebKit::WebPage::loadDataImpl):
2162         (WebKit::WebPage::linkClicked):
2163         (WebKit::WebPage::stopLoadingFrame):
2164         (WebKit::WebPage::stopLoading):
2165         (WebKit::WebPage::reload):
2166         (WebKit::WebPage::tryRestoreScrollPosition):
2167         (WebKit::WebPage::getMainResourceDataOfFrame):
2168         (WebKit::resourceDataForFrame):
2169         (WebKit::shouldReuseCommittedSandboxExtension):
2170         (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
2171         (WebKit::WebPage::hasLocalDataForURL):
2172         (WebKit::WebPage::setCustomTextEncodingName):
2173         (WebKit::WebPage::canPluginHandleResponse):
2174         (WebKit::WebPage::canShowMIMEType):
2175         (WebKit::WebPage::didCommitLoad):
2176         * WebProcess/WebPage/mac/WebPageMac.mm:
2177         (WebKit::WebPage::platformHasLocalDataForURL):
2178         (WebKit::cachedResponseForURL):
2179         * WebProcess/WebProcess.cpp:
2180         (WebKit::WebProcess::downloadRequest):
2181
2182 2013-08-14  Filip Pizlo  <fpizlo@apple.com>
2183
2184         Typed arrays should be rewritten
2185         https://bugs.webkit.org/show_bug.cgi?id=119064
2186
2187         Reviewed by Oliver Hunt.
2188         
2189         You don't need to include JSUint8Array anymore if you just want to
2190         unwrap one; JSDOMBinding gives you all of the things you need.
2191
2192         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2193
2194 2013-08-15  Eric Carlson  <eric.carlson@apple.com>
2195
2196         [Mac] Remove "legacy" media UI
2197         https://bugs.webkit.org/show_bug.cgi?id=119752
2198
2199         Reviewed by Jer Noble.
2200
2201         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2202         (InitWebCoreSystemInterface): Remove MediaControllerThemeAvailable.
2203
2204 2013-08-14  Dean Jackson  <dino@apple.com>
2205
2206         <https://webkit.org/b/119827> Allow primary plug-in detection to run more than once if necessary
2207
2208         Reviewed by Tim Horton.
2209
2210         We occasionally see cases where the primary plug-in detection runs before the plugins have been added
2211         to the page, especially if they do so in response to a load event. Tweak the algorithm so that it can
2212         run an arbitrary number of times if it fails.
2213
2214         While here, also have the detection run if there has ever been a plugin in the page as opposed to any
2215         current views. We may have snapshotted a plugin by now and deleted its view.
2216
2217         * WebProcess/WebPage/WebPage.cpp:
2218         (WebKit::WebPage::WebPage): initialise new members.
2219         (WebKit::WebPage::addPluginView): Mark that we've seen a plugin.
2220         (WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset new members.
2221         (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Exit early if we've never
2222         seen a plugin, rather than if we don't have any active views. Also, if we didn't find anything set
2223         a timer to run again (maximum of two attempts at the moment).
2224         * WebProcess/WebPage/WebPage.h: New members - m_numberOfPrimarySnapshotDetectionAttempts
2225         and m_hasSeenPlugin.
2226
2227 2013-08-14  Dean Jackson  <dino@apple.com>
2228
2229         <https://webkit.org/b/119820> Add pluginView-related logging to WebPage
2230
2231         Reviewed by Tim Horton.
2232
2233         Add some more diagnostic output to help track down bugs.
2234
2235         * WebProcess/WebPage/WebPage.cpp:
2236         (WebKit::WebPage::addPluginView): More logging.
2237         (WebKit::WebPage::removePluginView): Ditto.
2238
2239 2013-08-14  Alexey Proskuryakov  <ap@apple.com>
2240
2241         [WK2] Sync messages with with non-default timeout sent from secondary threads always time out
2242         https://bugs.webkit.org/show_bug.cgi?id=119767
2243
2244         Fix by Justin Bur.
2245         Reviewed by Darin Adler.
2246
2247         * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
2248         The argument to wait() is absolute time, not a delta. This calculation matches one
2249         in Connection::waitForMessage().
2250
2251 2013-08-14  Tim Horton  <timothy_horton@apple.com>
2252
2253         REGRESSION (r153877): Plugin scanning slows creation of WebViews
2254         https://bugs.webkit.org/show_bug.cgi?id=119665
2255         <rdar://problem/14716549>
2256
2257         Reviewed by Darin Adler.
2258
2259         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2260         (WebKit::WebPlatformStrategies::refreshPlugins):
2261         Don't repopulate the plugin cache in refreshPlugins, just invalidate it.
2262         It will be repopulated the next time something tries to use it.
2263
2264 2013-08-12  Dan Bernstein  <mitz@apple.com>
2265
2266         Fixed an off-by-(sizeof(char*) - 1) bug.
2267
2268         Reviewed by Sam Weinig.
2269
2270         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
2271         (WebKit::XPCServiceEventHandler): Allocate a sufficiently large buffer.
2272
2273 2013-08-12  Beth Dakin  <bdakin@apple.com>
2274
2275         Remove didNewFirstVisuallyNonEmptyLayout from WebKit2
2276         https://bugs.webkit.org/show_bug.cgi?id=119658
2277
2278         Reviewed by Darin Adler.
2279
2280         Removing this function entirely will change some functionality in the Nightlies, 
2281         but we think that is an acceptable difference for the Nightlies. If is does cause 
2282         a problem though, we can roll out this patch and deprecate the function instead.
2283
2284         * UIProcess/API/C/WKPage.h:
2285         * UIProcess/WebLoaderClient.cpp:
2286         * UIProcess/WebLoaderClient.h:
2287         * UIProcess/WebPageProxy.cpp:
2288         (WebKit::WebPageProxy::initializeLoaderClient):
2289         * UIProcess/WebPageProxy.h:
2290         * UIProcess/WebPageProxy.messages.in:
2291         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2292         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2293         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2294         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2295         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
2296         * WebProcess/WebPage/WebPage.cpp:
2297         (WebKit::WebPage::initializeInjectedBundleLoaderClient):
2298
2299 2013-08-12  Arunprasad Rajkumar  <arurajku@cisco.com>
2300
2301         [Qt] [WebKit2] Remove duplicate RAM Size calculation and reuse WTF::ramSize()
2302         https://bugs.webkit.org/show_bug.cgi?id=119663
2303
2304         Reviewed by Sam Weinig.
2305
2306         * WebProcess/qt/WebProcessQt.cpp:
2307         (WebKit::WebProcess::platformSetCacheModel):
2308
2309 2013-08-12  Anton Obzhirov  <a.obzhirov@samsung.com>
2310
2311         [GTK] Don't load GAIL when using GTK 3.2 or greater
2312         https://bugs.webkit.org/show_bug.cgi?id=72735
2313
2314         Reviewed by Carlos Garcia Campos.
2315
2316         * UIProcess/API/gtk/tests/AccessibilityTestServer.cpp:
2317         (main):
2318
2319 2013-08-09  Beth Dakin  <bdakin@apple.com>
2320
2321         AX: Not able to use arrow keys to read text in a WK2 app
2322         https://bugs.webkit.org/show_bug.cgi?id=119605
2323         -and corresponding-
2324         <rdar://problem/14281275>
2325
2326         Reviewed by Darin Adler.
2327
2328         Make all of these scrolling functions actually return the WebCore bools that 
2329         indicate whether or not scrolling happened. 
2330         * WebProcess/WebPage/WebPage.cpp:
2331         (WebKit::WebPage::scroll):
2332         (WebKit::WebPage::logicalScroll):
2333         (WebKit::WebPage::scrollBy):
2334         * WebProcess/WebPage/WebPage.h:
2335         * WebProcess/WebPage/mac/WebPageMac.mm:
2336         (WebKit::WebPage::executeKeypressCommandsInternal):
2337
2338         This function now gives accessibility a chance to handle the event too. And it 
2339         also actually tracks whether or not the event was handled by scrolling instead of 
2340         assuming that it was and universally returning true.
2341         (WebKit::WebPage::performNonEditingBehaviorForSelector):
2342
2343 2013-08-09  Brian Holt  <brian.holt@samsung.com>
2344
2345         [GTK] [WebKit2] Add an 'authenticate' signal to WebKitWebView
2346         https://bugs.webkit.org/show_bug.cgi?id=99352
2347
2348         Reviewed by Carlos Garcia Campos.
2349
2350         Add a new public class to the API, WebKitAuthenticationRequest, to be
2351         emitted along with a new WebKitWebView::authenticate signal to
2352         let client applications to provide their own authentication
2353         when the user is challenged with HTTP authentication. The
2354         credential is exposed through a new class WebKitCredential.
2355
2356         * GNUmakefile.list.am:
2357         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
2358         (okButtonClicked): Use new API for authentication.
2359         (cancelButtonClicked): Ditto.
2360         (webkitAuthenticationDialogInitialize):Get
2361         authenticationChallenge from request object.
2362         (webkitAuthenticationDialogNew): Ditto.
2363         * UIProcess/API/gtk/WebKitAuthenticationDialog.h:
2364         * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp: Added new
2365         class representing a HTTP authentication request.
2366         (webkitAuthenticationRequestDispose):
2367         (webkit_authentication_request_class_init):
2368         (webkitAuthenticationRequestCreate):
2369         (webkitAuthenticationRequestGetAuthenticationChallenge):
2370         (webkit_authentication_request_can_save_credentials):
2371         (webkit_authentication_request_get_proposed_credential):
2372         (webkit_authentication_request_get_host):
2373         (webkit_authentication_request_get_port):
2374         (webkit_authentication_request_get_realm):
2375         (webkit_authentication_request_get_scheme):
2376         (webkit_authentication_request_is_for_proxy):
2377         (webkit_authentication_request_is_retry):
2378         (webkit_authentication_request_authenticate):
2379         (webkit_authentication_request_cancel):
2380         * UIProcess/API/gtk/WebKitAuthenticationRequest.h: Added.
2381         * UIProcess/API/gtk/WebKitAuthenticationRequestPrivate.h: Added.
2382         * UIProcess/API/gtk/WebKitCredential.cpp: Added new class to
2383         support credentials for HTTP authentication.
2384         (_WebKitCredential::_WebKitCredential):
2385         (webkitCredentialCreate):
2386         (webkitCredentialGetCredential):
2387         (webkit_credential_new):
2388         (webkit_credential_copy):
2389         (webkit_credential_free):
2390         (webkit_credential_get_username):
2391         (webkit_credential_get_password):
2392         (webkit_credential_has_password):
2393         (webkit_credential_get_persistence):
2394         * UIProcess/API/gtk/WebKitCredential.h: Added.
2395         * UIProcess/API/gtk/WebKitCredentialPrivate.h: Added.
2396         * UIProcess/API/gtk/WebKitWebView.cpp: Added authenticate signal.
2397         (webkitWebViewAuthenticate): Default signal handler for authenticate.
2398         (webkit_web_view_class_init): Ditto.
2399         (webkitWebViewHandleAuthenticationChallenge): Create an
2400         authentication request and emit it with authenticate signal.
2401         * UIProcess/API/gtk/WebKitWebView.h: Replaced reserved function
2402         pointer slot with for WebViewClass with function pointer to
2403         authenticate signal handler.
2404         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new section for
2405         the authentication request.
2406         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
2407         * UIProcess/API/gtk/docs/webkit2gtk.types: Added authentication
2408         request and credential types.
2409         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: Created a new
2410         unit test for HTTP authentication. A libsoup server callback
2411         handler is installed that creates soup messages with appropriate
2412         headers and body to test HTTP authentication.
2413         (testWebViewAuthenticationRequest): Test the authentication
2414         request and credential API.
2415         (testWebViewAuthenticationCancel): Test cancelled authentication.
2416         (testWebViewAuthenticationFailure): Test repeated authentication failures.
2417         (testWebViewAuthenticationNoCredential): Test continue without
2418         credentials.
2419         (testWebViewAuthenticationStorage): Test credential storage.
2420         (testWebViewAuthenticationSuccess): Test successful authentication.
2421         (beforeAll): Added tests.
2422         * UIProcess/API/gtk/webkit2.h: Added WebKitAuthenticationRequest and
2423         WebKitCredential headers.
2424
2425 2013-08-09  Tim Horton  <timothy_horton@apple.com>
2426
2427         PDFPlugin is disabled by default in nightlies on Mac accidentally
2428         https://bugs.webkit.org/show_bug.cgi?id=119615
2429
2430         Rubber-stamped by Andreas Kling.
2431
2432         Enable PDFPlugin by default on Mac at the WebKit2 level.
2433
2434         * Shared/WebPreferencesStore.h:
2435         * UIProcess/API/C/WKPreferencesPrivate.h:
2436
2437 2013-08-08  Tim Horton  <timothy_horton@apple.com>
2438
2439         navigator.plugins has plugins in it when plugins are disabled
2440         https://bugs.webkit.org/show_bug.cgi?id=119607
2441         <rdar://problem/14678030>
2442
2443         Reviewed by Anders Carlsson.
2444
2445         * UIProcess/WebProcessProxy.cpp:
2446         (WebKit::WebProcessProxy::getPlugins):
2447         Return a list of all plugins, and a list of only application plugins.
2448
2449         * UIProcess/WebProcessProxy.h:
2450         * UIProcess/WebProcessProxy.messages.in:
2451         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2452         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2453         (WebKit::WebPlatformStrategies::getPluginInfo):
2454         Add applicationPlugin parameter to getPlugins, and storage for the returned list.
2455
2456         (WebKit::WebPlatformStrategies::populatePluginCache):
2457         If plugins are disabled for the given page, give WebCore the list that
2458         only includes application plugins. Otherwise, give it the whole list
2459         as we are doing currently.
2460
2461 2013-08-08  Gavin Barraclough  <barraclough@apple.com>
2462
2463         Disable suppression of plugin process for Java
2464         https://bugs.webkit.org/show_bug.cgi?id=119604
2465
2466         Reviewed by Sam Weinig.
2467
2468         Workaround, the Java plugin doesn't like this.
2469
2470         * PluginProcess/mac/PluginProcessMac.mm:
2471         (WebKit::PluginProcess::platformInitializeProcess):
2472             - +1 active task count on the java plugin, to inhibit supression.
2473
2474 2013-08-08  Dean Jackson  <dino@apple.com>
2475
2476         Add logging to the primary plugin detection
2477         https://bugs.webkit.org/show_bug.cgi?id=119594
2478
2479         Reviewed by Tim Horton.
2480
2481         Add some simple logging to our primary plug-in detection.
2482
2483         * WebProcess/WebPage/WebPage.cpp:
2484         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2485
2486 2013-08-08  Alexey Proskuryakov  <ap@apple.com>
2487
2488         WKBundleFrameCopyProvisionalURL crashes when there is no provisional loader
2489         https://bugs.webkit.org/show_bug.cgi?id=119587
2490
2491         Reviewed by Darin Adler.
2492
2493         * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::provisionalURL): Added a null
2494         check, like we already have in WebFrame::url().
2495
2496 2013-08-07  Antti Koivisto  <antti@apple.com>
2497
2498         Try to fix EFL build.
2499         
2500         Not reviewed.
2501
2502         * CMakeLists.txt:
2503
2504 2013-08-06  Jer Noble  <jer.noble@apple.com>
2505
2506         Crash when entering fullscreen video playback from a WebView using WebKit2
2507         https://bugs.webkit.org/show_bug.cgi?id=119531
2508
2509         Reviewed by Tim Horton.
2510
2511         Initialize wkWindowSetScaledFrame and wkWindowSetAlpha when initializing WebCoreSystemInterface.
2512
2513         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2514         (InitWebCoreSystemInterface):
2515
2516 2013-08-06  Stephanie Lewis  <slewis@apple.com>
2517
2518         Update Order Files for Safari
2519         <rdar://problem/14517392>
2520
2521         Unreviewed.
2522
2523         * mac/WebKit2.order:
2524
2525 2013-08-04  Sam Weinig  <sam@webkit.org>
2526
2527         Remove support for HTML5 MicroData
2528         https://bugs.webkit.org/show_bug.cgi?id=119480
2529
2530         Reviewed by Anders Carlsson.
2531
2532         * Configurations/FeatureDefines.xcconfig:
2533
2534 2013-08-06  Eunmi Lee  <eunmi15.lee@samsung.com>
2535
2536         [EFL][WK2] Implement gesture recognizer.
2537         https://bugs.webkit.org/show_bug.cgi?id=102643
2538
2539         Reviewed by Gyuyoung Kim.
2540
2541         Recognize tap, pan and pinch gestures using touch events.
2542         The tap gesture is separated into single tap, double tap and
2543         'tap and hold'.
2544
2545         This patch references the webkit NIX port.
2546         https://github.com/WebKitNix/webkitnix
2547
2548         * PlatformEfl.cmake:
2549         * UIProcess/API/efl/EwkView.cpp:
2550         (EwkView::EwkView):
2551         (EwkView::doneWithTouchEvent):
2552         * UIProcess/API/efl/EwkView.h:
2553         * UIProcess/API/efl/GestureRecognizer.cpp: Added.
2554         (WebKit::GestureHandler::create):
2555         (WebKit::GestureHandler::GestureHandler):
2556         (WebKit::GestureHandler::handleSingleTap):
2557         (WebKit::GestureHandler::handleDoubleTap):
2558         (WebKit::GestureHandler::handleTapAndHold):
2559         (WebKit::GestureHandler::handlePanStarted):
2560         (WebKit::GestureHandler::handlePan):
2561         (WebKit::GestureHandler::handlePanFinished):
2562         (WebKit::GestureHandler::handlePinchStarted):
2563         (WebKit::GestureHandler::handlePinch):
2564         (WebKit::GestureHandler::handlePinchFinished):
2565         (WebKit::GestureRecognizer::GestureRecognizer):
2566         (WebKit::GestureRecognizer::~GestureRecognizer):
2567         (WebKit::GestureRecognizer::processTouchEvent):
2568         (WebKit::GestureRecognizer::doubleTapTimerCallback):
2569         (WebKit::GestureRecognizer::tapAndHoldTimerCallback):
2570         (WebKit::GestureRecognizer::exceedsPanThreshold):
2571         (WebKit::GestureRecognizer::exceedsDoubleTapThreshold):
2572         (WebKit::getPointAtIndex):
2573         (WebKit::createVectorWithWKArray):
2574         (WebKit::GestureRecognizer::noGesture):
2575         (WebKit::GestureRecognizer::singleTapGesture):
2576         (WebKit::GestureRecognizer::doubleTapGesture):
2577         (WebKit::GestureRecognizer::panGesture):
2578         (WebKit::GestureRecognizer::pinchGesture):
2579         (WebKit::GestureRecognizer::reset):
2580         (WebKit::GestureRecognizer::stopTapTimers):
2581         * UIProcess/API/efl/GestureRecognizer.h: Added.
2582         (WebKit::GestureRecognizer::create):
2583
2584 2013-07-23  David Farler  <dfarler@apple.com>
2585
2586         Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
2587         https://bugs.webkit.org/show_bug.cgi?id=117762
2588
2589         Reviewed by Mark Rowe.
2590
2591         * Configurations/DebugRelease.xcconfig:
2592         Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
2593         * Configurations/WebContentProcess.xcconfig:
2594         Add ASAN_OTHER_LDFLAGS.
2595         * Configurations/WebKit2.xcconfig:
2596         Add ASAN_OTHER_LDFLAGS.
2597
2598 2013-08-06  Andreas Kling  <akling@apple.com>
2599
2600         REGRESSION(r151403): Resizing is extremely laggy on many sites when plugins are disallowed.
2601         <http://webkit.org/b/119516>
2602         <rdar://problem/14648086>
2603
2604         Reviewed by Simon Fraser.
2605
2606         The web process relies on the WindowAndViewFramesChanged mechanism for caching a copy
2607         of the window rect for fast access from DOMWindow APIs.
2608
2609         We retain part of the optimization introduced in r151403, namely not computing the
2610         viewFrameInWindowCoordinates and accessibilityPosition unless the web process needs them.
2611
2612         * UIProcess/API/mac/WKView.mm:
2613         (-[WKView _updateWindowAndViewFrames]):
2614
2615 2013-07-26  Mark Rowe  <mrowe@apple.com>
2616
2617         Logging should be configurable using human-readable channel names rather than crazy bitmasks
2618         <http://webkit.org/b/119031>
2619
2620         Implement shared logic for initializing logging channels based on human-readable channel names in WTF,
2621         and rework the WebCore, WebKit and WebKit2 logging initialization on top of it.
2622
2623         Logging channels may now be enabled by providing a comma-separated list of channel names, with the special
2624         "all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel
2625         being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except
2626         for history and loading being enabled.
2627
2628         For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow
2629         the old user defaults to remain set for those people that need to switch between version of WebKit before and
2630         after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel,
2631         the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging.
2632
2633         For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for
2634         consistency with the other platforms and to enable more code sharing.
2635
2636         While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when
2637         adding a new logging channel. Now only the header in the relevant project needs to be updated.
2638
2639         Reviewed by Sam Weinig.
2640
2641         * NetworkProcess/NetworkProcess.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
2642         * Platform/Logging.cpp: Use WEBKIT2_LOG_CHANNELS to define all of the channels.
2643         (WebKit::initializeLogChannelsIfNecessary): Pass the channels and the log level string to the new WTF function
2644         that handles the initialization.
2645         (WebKit::logChannelByName): Renamed to match our naming conventions. Calls through to the new WTF function
2646         to find a log channel rather than repeating the names of the log channels a further two times each.
2647         (WebKit::logLevelString): Provide a no-op implementation.
2648         * Platform/Logging.h: Declare a WEBKIT2_LOG_CHANNELS macro that can be used to apply a preprocessor macro
2649         across the set of all logging channels. Use this macro to declare the logging channels.
2650         * Platform/efl/LoggingEfl.cpp:
2651         (WebKit::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable.
2652         * Platform/gtk/LoggingGtk.cpp:
2653         (WebKit::logLevelString): Ditto.
2654         * Platform/mac/Logging.mac.mm:
2655         (WebKit::logLevelString): Pull the value out of the WebKit2Logging user default key.
2656         * Platform/qt/LoggingQt.cpp:
2657         (WebKit::logLevelString): Pull the value out of the QT_WEBKIT_LOG environment variable.
2658         * Shared/WebKit2Initialize.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
2659         * UIProcess/WebContext.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
2660
2661 2013-08-05  Anders Carlsson  <andersca@apple.com>
2662
2663         Ignore the Apple Java placeholder plug-in
2664         https://bugs.webkit.org/show_bug.cgi?id=119494
2665         <rdar://problem/14610818>
2666
2667         Reviewed by Beth Dakin.
2668
2669         Never attempt to load the Java placeholder plug-in.
2670
2671         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2672         (WebKit::PluginInfoStore::shouldUsePlugin):
2673
2674 2013-08-03  Tim Horton  <timothy_horton@apple.com>
2675
2676         Unreviewed, build and style fix for r153693.
2677
2678         * UIProcess/WebProcessProxy.cpp:
2679         * WebProcess/Plugins/PDF/PDFPlugin.h:
2680         * WebProcess/WebPage/WebPage.cpp:
2681
2682 2013-08-03  Tim Horton  <timothy_horton@apple.com>
2683
2684         Remove SimplePDFPlugin
2685         https://bugs.webkit.org/show_bug.cgi?id=119437
2686
2687         Reviewed by Alexey Proskuryakov.
2688
2689         * UIProcess/WebProcessProxy.cpp:
2690         (WebKit::WebProcessProxy::getPlugins):
2691         * WebProcess/WebPage/WebPage.cpp:
2692         (WebKit::WebPage::createPlugin):
2693         Don't add SimplePDFPlugin, nor try to instantiate it.
2694
2695         * WebProcess/Plugins/PDF/PDFPlugin.h:
2696         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2697         Merge previously inherited behavior in from SimplePDFPlugin.
2698
2699         * WebKit2.xcodeproj/project.pbxproj:
2700         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Removed.
2701         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: Removed.
2702         Remove SimplePDFPlugin.
2703
2704 2013-08-03  Tim Horton  <timothy_horton@apple.com>
2705
2706         Remove pageOverlayShouldApplyFadeWhenPainting() and adopt composited fade for the Mac port
2707         https://bugs.webkit.org/show_bug.cgi?id=119411
2708
2709         Reviewed by Simon Fraser.
2710
2711         Mac is the only holdout that performs non-composited fades of page
2712         overlays. We should adopt that mechanism (as a precursor to doing a
2713         CA-accelerated fade) and remove the now-unnecessary property.
2714
2715         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2716         (WKBundlePageOverlayFractionFadedIn):
2717         Always return 1 (fully-faded-in) so that clients who attempt to use this
2718         to bake the fade opacity into their painting will paint at full opacity,
2719         allowing us to do the composited fade separately.
2720
2721         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2722         * WebProcess/WebPage/DrawingArea.h:
2723         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2724         * WebProcess/WebPage/DrawingAreaImpl.h:
2725         * WebProcess/WebPage/LayerTreeHost.h:
2726         * WebProcess/WebPage/PageOverlay.cpp:
2727         (WebKit::PageOverlay::PageOverlay):
2728         (WebKit::PageOverlay::setPage):
2729         (WebKit::PageOverlay::setNeedsDisplay):
2730         (WebKit::PageOverlay::fadeAnimationTimerFired):
2731         * WebProcess/WebPage/PageOverlay.h:
2732         Remove pageOverlayShouldApplyFadeWhenPainting and fractionFadedIn().
2733
2734         * WebProcess/WebPage/FindController.cpp:
2735         (WebKit::FindController::drawRect):
2736         Draw the find overlay without taking the PageOverlay's fade into account.
2737
2738         * WebProcess/WebPage/TapHighlightController.cpp:
2739         (WebKit::TapHighlightController::drawRect):
2740         Remove pageOverlayShouldApplyFadeWhenPainting. Since it's always
2741         "false" for all ports now, take the second path here.
2742
2743         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
2744         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2745         (WebKit::LayerTreeHostMac::setPageOverlayOpacity):
2746         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2747         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2748         (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayOpacity):
2749         Implement setPageOverlayOpacity for DrawingAreaImpl
2750         and TiledCoreAnimationDrawingArea.
2751
2752 2013-08-02  Gavin Barraclough  <barraclough@apple.com>
2753
2754         Remove no-arguments constructor to PropertySlot
2755         https://bugs.webkit.org/show_bug.cgi?id=119460
2756
2757         Reviewed by Geoff Garen.
2758
2759         This constructor was unsafe if getValue is subsequently called,
2760         and the property is a getter. Simplest to just remove it.
2761
2762         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2763         (WebKit::JSNPObject::getOwnPropertyDescriptor):
2764
2765 2013-08-02  Ruth Fong  <ruth_fong@apple.com>
2766
2767         [Forms: color] WebColorPickerMac deconstructor shouldn't assert a variable
2768         <rdar://problem/14627633> and https://bugs.webkit.org/show_bug.cgi?id=119419
2769
2770         Reviewed by Tim Horton.
2771
2772         * UIProcess/mac/WebColorPickerMac.mm:
2773         (WebKit::WebColorPickerMac::~WebColorPickerMac): If the m_colorPickerUI variable
2774           is not null, then properly destroy it first before destroying WebColorPickerMac object.
2775
2776 2013-08-02  Ruth Fong  <ruth_fong@apple.com>
2777
2778         [Forms: color] The positioning of the popover color well is inverted
2779         <rdar://problem/14635621> and https://bugs.webkit.org/show_bug.cgi?id=119455
2780
2781         Reviewed by Tim Horton.
2782
2783         This patch converts the coordinates of the <input type='color'> element to
2784         the window's base coordinate system.
2785
2786         * UIProcess/mac/WebColorPickerMac.mm:
2787         (-[WKColorPopoverMac initWithFrame:inView:]):
2788
2789 2013-08-01  Ruth Fong  <ruth_fong@apple.com>
2790
2791         [Forms: color] <input type='color'> popover color well implementation
2792         <rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356
2793
2794         Reviewed by Benjamin Poulain.
2795
2796         This patch adds an popover implementation of <input type='color'>.
2797
2798         * Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER.
2799
2800         * UIProcess/API/mac/PageClientImpl.mm:
2801         (WebKit::PageClientImpl::createColorPicker): Updated to pass the 
2802           coordinates of the <input type='color'> element and the WKView 
2803           object for the window.
2804
2805         * UIProcess/WebPageProxy.cpp:
2806         (WebKit::WebPageProxy::viewWillStartLiveResize): Close popover color 
2807           picker when the view is resized.
2808         (WebKit::WebPageProxy::viewInWindowStateDidChange): Close popover color
2809           picker when the view is no longer in the window.
2810         (WebKit::WebPageProxy::showColorPicker): Updated to show either a color panel
2811           or a popover color picker depending on whether INPUT_TYPE_COLOR_POPOVER is enabled.
2812
2813         * UIProcess/mac/WebColorPickerMac.h:
2814         * UIProcess/mac/WebColorPickerMac.mm:
2815         (WebKit::WebColorPickerMac::create):
2816         (WebKit::WebColorPickerMac::~WebColorPickerMac):
2817         (WebKit::WebColorPickerMac::WebColorPickerMac):
2818         (WebKit::WebColorPickerMac::endPicker):
2819         (WebKit::WebColorPickerMac::setSelectedColor):
2820         (WebKit::WebColorPickerMac::showColorPicker):
2821         Methods updated to handle both the color panel implementation and 
2822           the popover implementation; also renamed m_panel to m_colorPickerUI. 
2823
2824         (-[WKColorPopoverMac initWithFrame:WebCore::inView:]):
2825         (-[WKColorPopoverMac setAndShowPicker:WebKit::withColor:]):
2826         (-[WKColorPopoverMac dealloc]):
2827         (-[WKColorPopoverMac invalidate]):
2828         (-[WKColorPopoverMac windowWillClose:]):
2829         (-[WKColorPopoverMac didChooseColor:]):
2830         (-[WKColorPopoverMac setColor:]):
2831         WKColorPopoverMac provides the popover implementation of <input type='color'>.
2832
2833         (-[WKColorPanelMac didChooseColor:]): Updated to match the interface of 
2834           WKColorPickerMac::didChooseColor.
2835
2836 2013-08-01  Anders Carlsson  <andersca@apple.com>
2837
2838         Lots of leaks under WebContext::pluginInfoStoreDidLoadPlugins()
2839         https://bugs.webkit.org/show_bug.cgi?id=119412
2840
2841         Reviewed by Simon Fraser.
2842
2843         For some sick reason, the WKContextClient plugInInformationBecameAvailable callback function
2844         expects a +1 reference to the plug-in array. Isolate that hack to WebContextClient so that
2845         we don't leak the array if there is no WKContextClient.
2846         
2847         * UIProcess/WebContext.cpp:
2848         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
2849         * UIProcess/WebContextClient.cpp:
2850         (WebKit::WebContextClient::plugInInformationBecameAvailable):
2851
2852 2013-08-01  Kwang Yul Seo  <skyul@company100.net>
2853
2854         Remove return statement in void function
2855         https://bugs.webkit.org/show_bug.cgi?id=119379
2856
2857         Reviewed by Darin Adler.
2858
2859         It does not make sense to return a value in void function.
2860
2861         * WebProcess/WebProcess.cpp:
2862         (WebKit::addCaseFoldedCharacters):
2863
2864 2013-08-01  Kwang Yul Seo  <skyul@company100.net>
2865
2866         [WK2] Add USE(SOUP) guard in WebProcess::destroyPrivateBrowsingSession
2867         https://bugs.webkit.org/show_bug.cgi?id=119381
2868
2869         Reviewed by Darin Adler.
2870
2871         The is a followup to r153355. I missed to add USE(SOUP) guard in
2872         WebProcess::destroyPrivateBrowsingSession.
2873
2874         * WebProcess/WebProcess.cpp:
2875         (WebKit::WebProcess::destroyPrivateBrowsingSession):
2876
2877 2013-08-01  Milian Wolff  <milian.wolff@kdab.com>
2878
2879         [Qt] Enable QML handling of crashed/unresponsive QtWebProcess
2880         https://bugs.webkit.org/show_bug.cgi?id=108474
2881
2882         Forward the processDidCrash, didRelaunchProcess, processDidBecomeUnresponsive
2883         and processDidBecomeResponsive signals to QML's WebView.experimental.
2884
2885         Reviewed by Jocelyn Turcotte.
2886
2887         * UIProcess/API/qt/qquickwebview.cpp:
2888         (QQuickWebViewPrivate::processDidCrash):
2889         (QQuickWebViewPrivate::didRelaunchProcess):
2890         (QQuickWebViewPrivate::processDidBecomeUnresponsive):
2891         (QQuickWebViewPrivate::processDidBecomeResponsive):
2892         * UIProcess/API/qt/qquickwebview_p.h:
2893         * UIProcess/API/qt/qquickwebview_p_p.h:
2894         (QQuickWebViewPrivate):
2895
2896 2013-07-31  Kwang Yul Seo  <skyul@company100.net>
2897
2898         Use emptyString instead of String("")
2899         https://bugs.webkit.org/show_bug.cgi?id=119335
2900
2901         Reviewed by Darin Adler.
2902
2903         Use emptyString() instead of String("") because it is better style and
2904         faster. This is a followup to r116908, removing all occurrences of
2905         String("") from WebKit.
2906
2907         * Shared/mac/WebEventFactory.mm:
2908         (WebKit::textFromEvent):
2909         (WebKit::unmodifiedTextFromEvent):
2910
2911 2013-07-31  Ruth Fong  <ruth_fong@apple.com>
2912
2913         <input type=color> Mac UI behaviour
2914         <rdar://problem/10269922> and https://bugs.webkit.org/show_bug.cgi?id=61276
2915
2916         Implemented <input type='color'> on Mac using the native color picker. 
2917
2918         Reviewed by Brady Eidson.
2919
2920         Code for WebColorPickerMac is derived from Chromium's color_chooser_mac.mm:
2921         https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/cocoa/color_chooser_mac.mm
2922
2923         * Configurations/FeatureDefines.xcconfig: Enabled INPUT_TYPE_COLOR.
2924
2925         * UIProcess/API/mac/PageClientImpl.mm:
2926         (WebKit::PageClientImpl::createColorPicker): Replaced stub implementation
2927           and return a WebColorPickerMac object.
2928
2929         * UIProcess/WebColorPicker.cpp:
2930         (WebKit::WebColorPicker::invalidate): Updated to call endChooser().
2931         (WebKit::WebColorPicker::showColorPicker): Added stub implementation.
2932         * UIProcess/WebColorPicker.h:
2933
2934         * UIProcess/WebPageProxy.cpp:
2935         (WebKit::WebPageProxy::close): Removed invalidation of removed color picker objects.
2936         (WebKit::WebPageProxy::showColorPicker): Updated so that it works for
2937           multiple <input type='color'> elements on a page.
2938         (WebKit::WebPageProxy::didEndColorPicker): Removed cleanup of removed color picker objects.
2939         (WebKit::WebPageProxy::resetStateAfterProcessExited): Removed cleanup of removed color picker objects.
2940
2941         * UIProcess/mac/WebColorPickerMac.h: Added.
2942         * UIProcess/mac/WebColorPickerMac.mm: Added.
2943         (WebKit::WebColorPickerMac::create):
2944         (WebKit::WebColorPickerMac::~WebColorPickerMac):
2945         (WebKit::WebColorPickerMac::WebColorPickerMac):
2946         (WebKit::WebColorPickerMac::endPicker):
2947         (WebKit::WebColorPickerMac::setSelectedColor):
2948         (WebKit::WebColorPickerMac::didChooseColor):
2949         (WebKit::WebColorPickerMac::showColorPicker):
2950         WebColorPickerMac contains a reference to a WKColorPanelMac object
2951           and is responsible for maintaining the color picker UI.
2952
2953         (-[WKColorPanelMac setAndShowPicker:withColor:]):
2954         (-[WKColorPanelMac invalidate]):
2955         (-[WKColorPanelMac windowWillClose:]):
2956         (-[WKColorPanelMac didChooseColor:]):
2957         (-[WKColorPanelMac setColor:]):
2958         WKColorPanelMac is a wrapper for a NSColorPanel object and 
2959           is responsible for the color picker UI.
2960
2961         * WebKit2.xcodeproj/project.pbxproj:
2962
2963         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2964         (WebKit::WebChromeClient::createColorChooser): Updated to always create a 
2965           WebColorChooser object.
2966
2967         * WebProcess/WebCoreSupport/WebColorChooser.cpp:
2968         (WebKit::WebColorChooser::reattachColorChooser): Sets the page's 
2969           active color chooser to the current object and pings the UIProcess
2970           to show the color picker.
2971         (WebKit::WebColorChooser::setSelectedColor): Only sets the color in the
2972           color picker if the WebColorChooser object is the active color element.
2973         * WebProcess/WebCoreSupport/WebColorChooser.h:
2974
2975 2013-07-30  Gavin Barraclough  <barraclough@apple.com>
2976
2977         Some cleanup in JSValue::get
2978         https://bugs.webkit.org/show_bug.cgi?id=119343
2979
2980         Reviewed by Geoff Garen.
2981
2982         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2983         (WebKit::JSNPObject::getOwnPropertySlot):
2984         * WebProcess/Plugins/Netscape/JSNPObject.h:
2985             - getOwnPropertySlot, JSCell -> JSObject
2986
2987 2013-07-31  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2988
2989         [Qt] Build WebKit with C++11
2990         https://bugs.webkit.org/show_bug.cgi?id=119337
2991
2992         Reviewed by Csaba Osztrogonác.
2993
2994         We no longer need to enable C++11 specifically for WebKit2.
2995
2996         * WebKit2.pri:
2997
2998 2013-07-30  Tim Horton  <timothy_horton@apple.com>
2999
3000         DHTML drag can result in a null-deref under WebDragClient::startDrag
3001         https://bugs.webkit.org/show_bug.cgi?id=119297
3002         <rdar://problem/14213012>
3003
3004         Reviewed by Simon Fraser.
3005
3006         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3007         (WebKit::convertImageToBitmap):
3008         ShareableBitmap::createShareable can return null, but shouldn't dereference that.
3009
3010 2013-07-30  Ruth Fong  <ruth_fong@apple.com>
3011
3012         Rename <input type='color'> functions in WebPageProxy, WebColorPicker
3013         <rdar://problem/14549771> and https://bugs.webkit.org/show_bug.cgi?id=119097
3014
3015         Reviewed by Tim Horton.
3016
3017         In bug 119025, WebColorChooserProxy was renamed WebColorPicker. This patch makes the UIProcess consistent
3018         by renaming UIProcess INPUT_TYPE_COLOR functions from ...colorChooser to ...colorPicker.
3019
3020         * UIProcess/WebColorPicker.cpp:
3021         (WebKit::WebColorPicker::endPicker):
3022         * UIProcess/WebColorPicker.h:
3023         * UIProcess/WebColorPickerResultListenerProxy.cpp:
3024         (WebKit::WebColorPickerResultListenerProxy::setColor):
3025         * UIProcess/WebPageProxy.cpp:
3026         (WebKit::WebPageProxy::showColorPicker):
3027         (WebKit::WebPageProxy::setColorPickerColor):
3028         (WebKit::WebPageProxy::endColorPicker):
3029         (WebKit::WebPageProxy::didEndColorPicker):
3030         * UIProcess/WebPageProxy.h:
3031         * UIProcess/WebPageProxy.messages.in:
3032         * UIProcess/qt/WebColorPickerQt.cpp:
3033         (WebKit::WebColorPickerQt::createItem):
3034         (WebKit::WebColorPickerQt::notifyColorSelected):
3035         (WebKit::WebColorPickerQt::endPicker):
3036         * UIProcess/qt/WebColorPickerQt.h:
3037         * WebProcess/WebCoreSupport/WebColorChooser.cpp:
3038         (WebKit::WebColorChooser::WebColorChooser):
3039         (WebKit::WebColorChooser::setSelectedColor):
3040         (WebKit::WebColorChooser::endChooser):
3041         * WebProcess/WebPage/WebPage.cpp:
3042         (WebKit::WebPage::didEndColorPicker):
3043         * WebProcess/WebPage/WebPage.h:
3044         * WebProcess/WebPage/WebPage.messages.in:
3045
3046 2013-07-30  Anders Carlsson  <andersca@apple.com>
3047
3048         Speculative fix for crash due to string access on multiple threads
3049         https://bugs.webkit.org/show_bug.cgi?id=119279
3050         <rdar://problem/14267833>
3051
3052         Reviewed by Darin Adler.
3053
3054         We can't use String::isolatedCopy for passing the local storage directory to the storage thread since
3055         that returns a String that's copied and then destroyed after the call to bind returns, leaving a small window
3056         where the refcount can be accessed simultaneously from two threads.
3057
3058         Work around this by passing a PassRefPtr<StringImpl> to bind instead; the act of copying the PassRefPtr will
3059         clear out the original and so when the original is destroyed the underlying StringImpl pointer will be null.
3060
3061         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
3062         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory):
3063         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
3064         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
3065
3066 2013-07-30  Tim Horton  <timothy_horton@apple.com>
3067
3068         Fix typo in enum name ("SelectionInSnaphot" -> "SelectionInSnapshot")
3069         https://bugs.webkit.org/show_bug.cgi?id=119275
3070
3071         Reviewed by Simon Fraser.
3072
3073         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3074         (WebKit::imageForRect):
3075         * WebProcess/WebPage/WebPage.cpp:
3076         (WebKit::WebPage::scaledSnapshotWithOptions):
3077         Fix typo.
3078
3079 2013-07-30  Anders Carlsson  <andersca@apple.com>
3080
3081         Plug-in process crashes if plug-in is destroyed as a result of sending NPObjectMessageReceiver::Deallocate
3082         https://bugs.webkit.org/show_bug.cgi?id=119270
3083         <rdar://problem/13368226>
3084
3085         Reviewed by Darin Adler.
3086
3087         Normally we use the PluginDestructionProtector RAII object to prevent plug-ins from being destroyed while
3088         they're executing code. However, in the case of the NPObjectMessageReceiver::Deallocate message, we can't do this
3089         since we don't know the plug-in or connection. 
3090         
3091         Instead, add a counter to Connection that keeps track of whether sendSync is currently called and defer plug-in
3092         destruction if it is. (This approach is actually more robust and we should investigate getting rid of the destruction protector).
3093
3094         * Platform/CoreIPC/Connection.cpp:
3095         (CoreIPC::Connection::Connection):
3096         (CoreIPC::Connection::sendSyncMessage):
3097         * Platform/CoreIPC/Connection.h:
3098         (CoreIPC::Connection::inSendSync):
3099         * PluginProcess/PluginControllerProxy.cpp:
3100         (WebKit::PluginControllerProxy::destroy):
3101
3102 2013-07-30  Tim Horton  <timothy_horton@apple.com>
3103
3104         Null deref under WebPage::scaledSnapshotWithOptions
3105         https://bugs.webkit.org/show_bug.cgi?id=119243
3106         <rdar://problem/14502050>
3107
3108         Reviewed by Darin Adler.
3109
3110         * WebProcess/WebPage/WebPage.cpp:
3111         (WebKit::WebPage::scaledSnapshotWithOptions):
3112         WebFrame::coreFrame() can be null (if the Frame is already torn down),
3113         so we should check it.
3114
3115 2013-07-30  Tim Horton  <timothy_horton@apple.com>
3116
3117         Null deref under PluginView::handlesPageScaleFactor()
3118         https://bugs.webkit.org/show_bug.cgi?id=119231
3119         <rdar://problem/14440207>
3120
3121         Reviewed by Darin Adler.
3122
3123         Null-check the PluginView in the caller as well.
3124
3125         * WebProcess/WebPage/WebFrame.cpp:
3126         (WebKit::WebFrame::handlesPageScaleGesture):
3127
3128 2013-07-30  Patrick Gansterer  <paroga@webkit.org>
3129
3130         Remove unused Download*.cpp files
3131         https://bugs.webkit.org/show_bug.cgi?id=119248
3132
3133         Reviewed by Anders Carlsson.
3134
3135         * Shared/Downloads/cfnet/DownloadCFNet.cpp: Removed.
3136         * Shared/Downloads/curl/DownloadCurl.cpp: Removed.
3137
3138 2013-07-30  Jeff Miller  <jeffm@apple.com>
3139
3140         Page for WKPageLoaderClient processDidCrash callback always reports a process identifier of 0
3141         https://bugs.webkit.org/show_bug.cgi?id=119269
3142         <rdar://problem/14582393>
3143
3144         Reviewed by Anders Carlsson.
3145
3146         * UIProcess/WebPageProxy.cpp:
3147         (WebKit::WebPageProxy::processIdentifier):
3148         Return 0 if the page is closed instead of requiring isValid().
3149
3150 2013-07-30  Kwang Yul Seo  <skyul@company100.net>
3151
3152         [WK2] Move the implementation of WebEditorClient::checkTextOfParagraph to WebEditorClient.cpp
3153         https://bugs.webkit.org/show_bug.cgi?id=119034
3154
3155         Reviewed by Anders Carlsson.
3156
3157         The Mac and EFL ports use the same implementation of
3158         WebEditorClient::checkTextOfParagraph and GTK will use the same
3159         implementation too. So rather than duplicating the same code in
3160         platform specific files, move the implementation to platform agnostic
3161         WebProcess/WebCoreSupport/WebEditorClient.cpp.
3162
3163         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3164         (WebKit::WebEditorClient::checkTextOfParagraph):
3165         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
3166         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3167
3168 2013-07-30  Brian Holt  <brian.holt@samsung.com>
3169
3170         [WebKit2] [Gtk] WebKitResponsePolicyDecision URI response property incorrect
3171         https://bugs.webkit.org/show_bug.cgi?id=119258
3172
3173         Reviewed by Martin Robinson.
3174
3175         Corrected the installed URI response property from PROP_REQUEST to
3176         PROP_RESPONSE and type from WEBKIT_TYPE_URI_REQUEST to
3177         WEBKIT_TYPE_URI_RESPONSE.
3178
3179         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
3180         (webkit_response_policy_decision_class_init):
3181
3182 2013-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3183
3184         Unreviewed. Fix make distcheck.
3185
3186         * GNUmakefile.list.am: Add missing header file to compilation.
3187
3188 2013-07-29  Tim Horton  <timothy_horton@apple.com>
3189
3190         [wk2] Flush the WebProcess’ implicit transaction when using endDeferringViewInWindowChangesSync
3191         https://bugs.webkit.org/show_bug.cgi?id=119225
3192         <rdar://problem/14568841>
3193
3194         Reviewed by Simon Fraser.
3195
3196         Tell CoreAnimation to flush the implicit transaction before replying
3197         when using endDeferringViewInWindowChangesSync, as that method's contract
3198         is that the WebProcess is totally ready to be in-window when it returns.
3199
3200         * UIProcess/API/mac/WKView.mm:
3201         (-[WKView endDeferringViewInWindowChanges]):
3202         Adopt viewInWindowStateDidChange.
3203
3204         (-[WKView endDeferringViewInWindowChangesSync]):
3205         Adopt viewInWindowStateDidChange, asking it to send a reply only if we're going to wait for one.
3206
3207         * UIProcess/WebPageProxy.cpp:
3208         (WebKit::WebPageProxy::viewInWindowStateDidChange):
3209         (WebKit::WebPageProxy::viewStateDidChange):
3210         Pull viewInWindowStateDidChange out of viewStateDidChange.
3211         Request a reply from SetIsInWindow if we're told to.
3212
3213         * UIProcess/WebPageProxy.h: Add WantsReplyOrNot and viewInWindowStateDidChange.
3214         * WebProcess/WebPage/WebPage.cpp:
3215         (WebKit::WebPage::didUpdateInWindowStateTimerFired):
3216         Don't build this version on Mac, we'll have a WebPageMac version.
3217
3218         (WebKit::WebPage::setIsInWindow):
3219         Only start the timer to send the didUpdateInWindowState reply if we're asked to.
3220
3221         * WebProcess/WebPage/WebPage.h:
3222         * WebProcess/WebPage/WebPage.messages.in:
3223         Add an argument to the SetIsInWindow message for whether the WebProcess
3224         should inform the UIProcess when SetIsInWindow completes or not.
3225
3226         * WebProcess/WebPage/mac/WebPageMac.mm:
3227         (WebKit::WebPage::didUpdateInWindowStateTimerFired):
3228         Tell CA to flush the implicit transaction before telling the UIProcess that
3229         we're finished moving in-window.
3230
3231 2013-07-29  Tim Horton  <timothy_horton@apple.com>
3232
3233         Null deref under PluginView::handlesPageScaleFactor()
3234         https://bugs.webkit.org/show_bug.cgi?id=119231
3235         <rdar://problem/14440207>
3236
3237         Reviewed by Simon Fraser.
3238
3239         * WebProcess/Plugins/PluginView.cpp:
3240         (WebKit::PluginView::handlesPageScaleFactor):
3241         * WebProcess/Plugins/PluginView.h:
3242         Null-check m_plugin and check m_isInitialized.
3243         Make pageScaleFactor() and handlesPageScaleFactor const.
3244
3245 2013-07-29  Anders Carlsson  <andersca@apple.com>
3246
3247         Remove setUnderlayPage() and associated code
3248         https://bugs.webkit.org/show_bug.cgi?id=119220
3249         <rdar://problem/14392426>
3250
3251         Reviewed by Jessie Berlin.
3252
3253         This is dead code, get rid of it.
3254
3255         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3256         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3257         * WebProcess/WebPage/WebPage.cpp:
3258         (WebKit::WebPage::close):
3259         (WebKit::WebPage::layoutIfNeeded):
3260         (WebKit::WebPage::drawRect):
3261         * WebProcess/WebPage/WebPage.h:
3262
3263 2013-07-29  Sergio Correia  <sergio.correia@openbossa.org>
3264
3265         CoordinatedGraphics: Add API to get and set the active state of a WebView
3266         https://bugs.webkit.org/show_bug.cgi?id=119067
3267
3268         Reviewed by Noam Rosenthal.
3269
3270         A view being in the "active" state generally means that it is not in the
3271         "background", although this definition can vary depending on the platform
3272         under consideration.
3273
3274         This patch adds the following APIs to WKView:
3275         - bool WKViewIsActive(WKViewRef)
3276         This API accepts a WKViewRef as parameter and returns a boolean indicating
3277         whether the given view is active.
3278
3279         - void WKViewSetIsActive(WKViewRef, bool)
3280         This API accepts a WKViewRef and a boolean as parameteres, and it sets the
3281         active state of the given view to the given boolean argument.
3282
3283         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3284         (WKViewIsActive): API added.
3285         (WKViewSetIsActive): Ditto.
3286         * UIProcess/API/C/CoordinatedGraphics/WKView.h: Export aforementioned API.
3287         * UIProcess/CoordinatedGraphics/WebView.cpp:
3288         (WebKit::WebView::initialize): Use new setActive method.
3289         (WebKit::WebView::setActive): Added method to set the active state of the
3290         view.
3291         (WebKit::WebView::isActive): Added method to return the active state of
3292         view.
3293         (WebKit::WebView::enterAcceleratedCompositingMode): Use new setActive
3294         method.
3295         (WebKit::WebView::exitAcceleratedCompositingMode): Ditto.
3296         * UIProcess/CoordinatedGraphics/WebView.h: Added declarations of isActive
3297         and setActive.
3298
3299 2013-07-29  Jae Hyun Park  <jae.park@company100.net>
3300
3301         Remove duplicated LayerTreeHost::supportsAcceleratedCompositing
3302         https://bugs.webkit.org/show_bug.cgi?id=118949
3303
3304         Reviewed by Noam Rosenthal.
3305
3306         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3307         * WebProcess/WebPage/LayerTreeHost.h:
3308         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
3309
3310 2013-07-29  Zan Dobersek  <zdobersek@igalia.com>
3311
3312         [Automake] Remove references to non-existent *_CFLAGS and *_LIBS variables
3313         https://bugs.webkit.org/show_bug.cgi?id=119212
3314
3315         Reviewed by Carlos Garcia Campos.
3316
3317         * GNUmakefile.am: Remove references to GLOBALDEPS_(CFLAGS|LIBS) and CLUTTER_(CFLAGS|LIBS)
3318         variables that are not defined during the configuration process.
3319
3320 2013-07-28  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3321
3322         [EFL][WK2] Simplify context_menu_spelling_items_availability unit test
3323         https://bugs.webkit.org/show_bug.cgi?id=119085
3324
3325         Reviewed by Gyuyoung Kim.
3326
3327         Use findContextMenuItem method to check whether the item
3328         appears in context menu.
3329
3330         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
3331         (EWK2TextCheckerTest::findContextMenuItem):
3332         Do not report failure inside the method.
3333         It doesn't allow to test the negative test cases.
3334
3335         (EWK2TextCheckerTest::checkCorrectnessOfSpellingItems):
3336         Use findContextMenuItem method.
3337
3338         (EWK2TextCheckerTest::toogleCheckSpellingWhileTyping):
3339         (EWK2TextCheckerTest::selectLearnSpelling):
3340         (EWK2TextCheckerTest::selectIgnoreSpelling):
3341         Verify the return value of findContextMenuItem.
3342
3343         (TEST_F):
3344         Reset wasContextMenuShown variable, it's needed after r152153.
3345         Use waitUntilTrue method.
3346
3347 2013-07-27  Jacky Jiang  <zhajiang@blackberry.com>
3348
3349         Replace all uses of GraphicsLayer::create function with the one that takes a GraphicsLayerFactory
3350         https://bugs.webkit.org/show_bug.cgi?id=119186
3351
3352         Reviewed by Anders Carlsson.
3353
3354         * UIProcess/mac/RemoteLayerTreeHost.mm:
3355         (WebKit::RemoteLayerTreeHost::getOrCreateLayer):
3356
3357 2013-07-27  Chris Fleizach  <cfleizach@apple.com>
3358
3359         AX: VoiceOver not working with data detection page overlays
3360         https://bugs.webkit.org/show_bug.cgi?id=118680
3361
3362         Reviewed by Sam Weinig.
3363
3364         Expose API in BundlePageOverlay so that accessibility attributes can be retrieved through the overlay.
3365         This requires two methods in a new callback struct. One to copy the attribute names, and the other to 
3366         copy the attribute values. I've folded both parameterized and non-parameterized attribute names into one method
3367         with a boolean to determine which one should be used. The non-parameterized attributes are not used or passed to the
3368         overlay at this time as there are no clients with such a need.
3369
3370         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3371         (PageOverlayClientImpl::setAccessibilityClient):
3372         (PageOverlayClientImpl::PageOverlayClientImpl):
3373         (PageOverlayClientImpl::copyAccessibilityAttributeValue):
3374         (PageOverlayClientImpl::copyAccessibilityAttributeNames):
3375         (WKBundlePageOverlaySetAccessibilityClient):
3376         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
3377         * WebProcess/WebPage/PageOverlay.cpp:
3378         (WebKit::PageOverlay::copyAccessibilityAttributeValue):
3379         (WebKit::PageOverlay::copyAccessibilityAttributeNames):
3380         * WebProcess/WebPage/PageOverlay.h:
3381         (WebKit::PageOverlay::Client::copyAccessibilityAttributeValue):
3382         (WebKit::PageOverlay::Client::copyAccessibilityAttributeNames):
3383         (WebKit::PageOverlay::client):
3384         * WebProcess/WebPage/WebPage.cpp:
3385         (WebKit::WebPage::pageOverlayCopyAccessibilityAttributeValue):
3386         (WebKit::WebPage::pageOverlayCopyAccessibilityAttributesNames):
3387         * WebProcess/WebPage/WebPage.h:
3388         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
3389         (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
3390         (-[WKAccessibilityWebPageObject _convertScreenPointToWindow:]):
3391         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
3392
3393 2013-07-27  Simon Fraser  <simon.fraser@apple.com>
3394
3395         If entering fullscreen for a window fails, don't leave things in a bad state
3396         https://bugs.webkit.org/show_bug.cgi?id=119179
3397
3398         Reviewed by Sam Weinig.
3399         
3400         On Lion, attempting to take a video fullscreen when the Safari window is already
3401         fullscreen can sometimes fail, and AppKit informs us via windowDidFailToEnterFullScreen:
3402         
3403         When this happens we have to undo the work done when entering fullscreen, to
3404         avoid leaving things in a bad state.
3405
3406         * UIProcess/mac/WKFullScreenWindowController.mm:
3407         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
3408
3409 2013-07-26  Tim Horton  <timothy_horton@apple.com>
3410
3411         Add a mode where autosizing fixes the FrameView height to at least the WKView height
3412         https://bugs.webkit.org/show_bug.cgi?id=119104
3413         <rdar://problem/14549021>
3414
3415         Reviewed by Anders Carlsson.
3416
3417         * Shared/WebPageCreationParameters.cpp:
3418         (WebKit::WebPageCreationParameters::encode):
3419         (WebKit::WebPageCreationParameters::decode):
3420         * Shared/WebPageCreationParameters.h:
3421         Add autoSizingShouldExpandToViewHeight parameter.
3422
3423         * UIProcess/API/mac/WKView.mm:
3424         (-[WKView minimumWidthForAutoLayout]):
3425         (-[WKView setMinimumWidthForAutoLayout:]):
3426         Un-deprecate these as they're still useful if not sending a height.
3427
3428         (-[WKView shouldExpandToViewHeightForAutoLayout]):
3429         (-[WKView setShouldExpandToViewHeightForAutoLayout:]):
3430         * UIProcess/API/mac/WKViewPrivate.h:
3431         New property, forward to WebPageProxy.
3432
3433         * UIProcess/WebPageProxy.cpp:
3434         (WebKit::WebPageProxy::WebPageProxy):
3435         (WebKit::WebPageProxy::creationParameters):
3436         (WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight):
3437         * UIProcess/WebPageProxy.h:
3438         (WebKit::WebPageProxy::autoSizingShouldExpandToViewHeight):
3439         New property, forward to WebPage.
3440
3441         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3442         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
3443         If enabled, update the FrameView's autoSizeFixedMinimumHeight.
3444
3445         * WebProcess/WebPage/WebPage.cpp:
3446         (WebKit::WebPage::WebPage):
3447         (WebKit::WebPage::setAutoSizingShouldExpandToViewHeight):
3448         * WebProcess/WebPage/WebPage.h:
3449         (WebKit::WebPage::autoSizingShouldExpandToViewHeight):
3450         New property; if enabled, set FrameView's autoSizeFixedMinimumHeight,
3451         otherwise reset it to 0.
3452
3453         * WebProcess/WebPage/WebPage.messages.in:
3454         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3455         (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired):
3456         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
3457         Retrieve intrinsic content size explicitly from the FrameView, as
3458         it may not have used it as its final contentsSize if
3459         autoSizeFixedMinimumHeight is set.
3460
3461         Set the WebPage's size in case the load is committed so that the
3462         WebFrameLoaderClient doesn't reset us to the wrong size.
3463
3464         Update autoSizeFixedMinimumHeight if enabled when the view size changes.
3465
3466 2013-07-25  Andreas Kling  <akling@apple.com>
3467
3468         ChromeClient::focusedNodeChanged() should be focusedElementChanged().
3469         <http://webkit.org/b/119110>
3470
3471         Reviewed by Anders Carlsson.
3472
3473         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3474         (WebKit::WebChromeClient::focusedElementChanged):
3475         * WebProcess/WebCoreSupport/WebChromeClient.h:
3476
3477 2013-07-25  Kwang Yul Seo  <skyul@company100.net>
3478
3479         [WK2][Soup] Add private browsing support
3480         https://bugs.webkit.org/show_bug.cgi?id=118657
3481
3482         Reviewed by Gustavo Noronha Silva.
3483
3484         Support private browsing in WK2 by implementing private browsing
3485         related methods in WebFrameNetworkingContext.
3486
3487         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3488         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
3489         Add USE(SOUP) guard.
3490
3491         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
3492         Add private browsing support methods. Copied from the Mac port.
3493         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
3494         (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession):
3495         (WebKit::WebFrameNetworkingContext::storageSession):
3496         Check if the frame enables private browsing and return the private
3497         browsing session.
3498         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
3499
3500         * WebProcess/WebProcess.cpp:
3501         (WebKit::WebProcess::ensurePrivateBrowsingSession):
3502         Add USE(SOUP) guard.
3503
3504 2013-07-25  Kwang Yul Seo  <skyul@company100.net>
3505
3506         Build fix: use of long long in CoreIPC::ArgumentEncoder and CoreIPC::ArgumentDecoder
3507         https://bugs.webkit.org/show_bug.cgi?id=118228
3508
3509         Reviewed by Anders Carlsson.
3510
3511         Build fails on some platforms where int64_t and long long are different types.
3512
3513         * Shared/FileAPI/BlobRegistrationData.cpp:
3514         (WebKit::BlobRegistrationData::encode):
3515         Add explicit casts to int64_t.
3516         (WebKit::BlobRegistrationData::decode):
3517         Use int64_t instead of long long.
3518
3519 2013-07-25  Anders Carlsson  <andersca@apple.com>
3520
3521         Remove lastModifiedDate from ResourceResponse
3522         https://bugs.webkit.org/show_bug.cgi?id=119092
3523
3524         Reviewed by Andreas Kling.
3525
3526         Update for WebCore changes.
3527
3528         * WebProcess/Plugins/PluginView.cpp:
3529         (WebKit::lastModifiedDate):
3530         Use ResourceResponse::lastModified() to get the last modified date.
3531
3532         (WebKit::PluginView::Stream::didReceiveResponse):
3533         Call the static lastModified function.
3534
3535         (WebKit::PluginView::manualLoadDidReceiveResponse):
3536         Ditto.
3537
3538 2013-07-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3539
3540         [GTK] Add support for running unit tests in the web process
3541         https://bugs.webkit.org/show_bug.cgi?id=118427
3542
3543         Reviewed by Gustavo Noronha Silva.
3544
3545         Some tests, like GObject DOM bindings API tests, run entirely in
3546         the WebProcess, so we just need to start the test from the UI
3547         process and wait until the test finishes running in the
3548         WebProcess. Tests are split in two files, one containing the
3549         actual test that runs in the WebProcess and another one to add the
3550         tests to the glib test system that works as a
3551         proxy. WebProcessTestRunner class starts a private DBus session
3552         bus and starts the tests sending a message to the WebExtension
3553         waiting until it finishes or fails. WebProcess tests are created
3554         by defining a class derived from WebProcessTest class and
3555         implementing the static create method and the virtual runTest
3556         method. The macro REGISTER_TEST is used by the web process tests
3557         to register their test cases. This patch includes the migration
3558         of the WebKitDOMNode test, all other GObject DOM bindings tests
3559         will be migrated in the same way in follow up patches.
3560
3561         * UIProcess/API/gtk/tests/DOMNodeTest.cpp: Added.
3562         (WebKitDOMNodeTest::create): Create a new WebKitDOMNodeTest.
3563         (WebKitDOMNodeTest::webPageFromArgs): Get the pageID parameter
3564         from the arguments dictionary.
3565         (WebKitDOMNodeTest::testHierarchyNavigation):
3566         (WebKitDOMNodeTest::testInsertion):
3567         (WebKitDOMNodeTest::runTest): Run the given test.
3568         (registerTests): Register test cases.
3569         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to
3570         compilation.
3571         * UIProcess/API/gtk/tests/TestDOMNode.cpp: Added.
3572         (testWebKitDOMNodeHierarchyNavigation):
3573         (testWebKitDOMNodeInsertion):
3574         (beforeAll):
3575         (afterAll):
3576         * UIProcess/API/gtk/tests/TestMain.cpp:
3577         (main): Unset DBUS_SESSION_BUS_ADDRESS environment variable to
3578         make sure that the GLib bus singleton is initialized by the
3579         private DBus session bus created by the tests.
3580         * UIProcess/API/gtk/tests/WebProcessTest.cpp: Added.
3581         (testsMap): Initialize and get the global map of tests.
3582         (WebProcessTest::add): Add a new test to the map, keeping a
3583         function to create the test.
3584         (WebProcessTest::create): Create a test for the given name.
3585         (methodCallCallback): Handle RunTest DBus method. It creates and
3586         runs the given test.
3587         (webkit_web_extension_initialize):Register the DBus service for
3588         this WebExtension.
3589         * UIProcess/API/gtk/tests/WebProcessTest.h: Added.
3590         * UIProcess/API/gtk/tests/WebProcessTestRunner.cpp: Added.
3591         (WebProcessTestRunner::WebProcessTestRunner): Start a private DBus
3592         session bus and get a connection to it.
3593         (WebProcessTestRunner::~WebProcessTestRunner): Stop the private
3594         DBus session bus.
3595         (WebProcessTestRunner::proxyCreatedCallback):
3596         (WebProcessTestRunner::proxy): Create a new proxy to send messages
3597         to the WebExtension if it doesn't exists.
3598         (WebProcessTestRunner::onNameAppeared): Called when the DBus
3599         service has been registered in the WebExtension and it's safe to
3600         create a proxy.
3601         (WebProcessTestRunner::onNameVanished): Called when the DBus
3602         service is unregistered. This happens when the web process crash,
3603         so we just exit here, because the g_asserts in the web process
3604         have already registered the error message.
3605         (WebProcessTestRunner::testFinishedCallback): Called when the
3606         WebProcess tests has finished.
3607         (WebProcessTestRunner::runTest): Send a message to the
3608         WebExtension to start the given test and monitor the service.
3609         (WebProcessTestRunner::finishTest): Save the test result and
3610         finish the main loop.
3611         * UIProcess/API/gtk/tests/WebProcessTestRunner.h: Added.
3612
3613 2013-05-05  Geoffrey Garen  <ggaren@apple.com>
3614
3615         Rolled back in r149527 with crash fixed.
3616
3617         Reviewed by Oliver Hunt.
3618
3619             Rationalized 'this' value conversion
3620             https://bugs.webkit.org/show_bug.cgi?id=115542
3621
3622 2013-07-24  Ruth Fong  <ruth_fong@apple.com>
3623
3624         Rename WebColorChooserProxy
3625         <rdar://problem/14528039> and https://bugs.webkit.org/show_bug.cgi?id=119025
3626
3627         Reviewed by Brady Eidson.
3628
3629         Renamed WebColorChooserProxy to WebColorPicker since the name WebColorChoooserProxy
3630         implies that it represents the same object as WebColorChooser, which is not true.
3631         Also, renamed createColorChooserProxy to createColorPicker in WebPageProxy and 
3632         platform-equivalent versions of it.
3633
3634         * CMakeLists.txt:
3635         * GNUmakefile.list.am:
3636         * Target.pri:
3637         * UIProcess/API/gtk/PageClientImpl.cpp:
3638         (WebKit::PageClientImpl::createColorPicker):
3639         * UIProcess/API/gtk/PageClientImpl.h:
3640         * UIProcess/API/mac/PageClientImpl.h:
3641         * UIProcess/API/mac/PageClientImpl.mm:
3642         (WebKit::PageClientImpl::createColorPicker):
3643         * UIProcess/API/qt/raw/qrawwebview.cpp:
3644         (QRawWebViewPrivate::createColorPicker):
3645         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
3646         * UIProcess/CoordinatedGraphics/WebView.cpp:
3647         (WebKit::WebView::createColorPicker):
3648         * UIProcess/CoordinatedGraphics/WebView.h:
3649         * UIProcess/PageClient.h:
3650         * UIProcess/WebColorChooserProxy.cpp: Removed.
3651         * UIProcess/WebColorChooserProxy.h: Removed.
3652         * UIProcess/WebColorPicker.cpp: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.cpp.
3653         (WebKit::WebColorPicker::WebColorPicker):
3654         (WebKit::WebColorPicker::~WebColorPicker):
3655         (WebKit::WebColorPicker::endChooser):
3656         (WebKit::WebColorPicker::setSelectedColor):
3657         * UIProcess/WebColorPicker.h: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.h.
3658         (WebKit::WebColorPicker::create):
3659         * UIProcess/WebPageProxy.cpp:
3660         (WebKit::WebPageProxy::close):
3661         (WebKit::WebPageProxy::showColorChooser):
3662         (WebKit::WebPageProxy::setColorChooserColor):
3663         (WebKit::WebPageProxy::endColorChooser):
3664         (WebKit::WebPageProxy::didEndColorChooser):
3665         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3666         * UIProcess/WebPageProxy.h: Renamed m_colorChooser to m_colorPicker.
3667         * UIProcess/qt/QtPageClient.cpp:
3668         (WebKit::QtPageClient::createColorPicker):
3669         * UIProcess/qt/QtPageClient.h:
3670         * UIProcess/qt/WebColorChooserProxyQt.cpp: Removed.
3671         * UIProcess/qt/WebColorChooserProxyQt.h: Removed.
3672         * UIProcess/qt/WebColorPickerQt.cpp: Added.
3673         (WebKit::ColorChooserContextObject::ColorChooserContextObject):
3674         (WebKit::ColorChooserContextObject::currentColor):
3675         (WebKit::ColorChooserContextObject::elementRect):
3676         (WebKit::ColorChooserContextObject::accept):
3677         (WebKit::ColorChooserContextObject::reject):
3678         (WebKit::WebColorPickerQt::WebColorPickerQt):
3679         (WebKit::WebColorPickerQt::~WebColorPickerQt):
3680         (WebKit::WebColorPickerQt::createItem):
3681         (WebKit::WebColorPickerQt::createContext):
3682         (WebKit::WebColorPickerQt::setSelectedColor):
3683         (WebKit::WebColorPickerQt::notifyColorSelected):
3684         (WebKit::WebColorPickerQt::endChooser):
3685         * UIProcess/qt/WebColorPickerQt.h: Added.
3686         (WebKit::WebColorPickerQt::create):
3687         * WebKit2.xcodeproj/project.pbxproj:
3688
3689 2013-07-24  Anders Carlsson  <andersca@apple.com>
3690
3691         Crash when calling WKPageGetProcessIdentifier after aborted process launch
3692         https://bugs.webkit.org/show_bug.cgi?id=119069
3693         <rdar://problem/14494064>
3694
3695         Reviewed by Andreas Kling.
3696
3697         * UIProcess/WebPageProxy.cpp:
3698         (WebKit::WebPageProxy::processIdentifier):
3699         Check if the page is closed instead of checking whether we have a process - We'll always have a process.
3700         
3701         (WebKit::WebPageProxy::isValid):
3702         Make this const.
3703
3704         * UIProcess/WebPageProxy.h:
3705
3706 2013-07-24  Kwang Yul Seo  <skyul@company100.net>
3707
3708         [WK2][Soup] Add entry point for network process
3709         https://bugs.webkit.org/show_bug.cgi?id=110136
3710
3711         Reviewed by Gustavo Noronha Silva.
3712
3713         Original patch by Balazs Kelemen <kbalazs@webkit.org>.
3714
3715         Added a common entry point for non-Mac Unix ports.
3716
3717         * NetworkProcess/unix/NetworkProcessMainUnix.cpp: Added.
3718         (WebKit::NetworkProcessMain):
3719         * NetworkProcess/unix/NetworkProcessMainUnix.h: Added.
3720         * unix/NetworkMainUnix.cpp: Added.
3721         (main):
3722
3723 2013-07-24  Jessie Berlin  <jberlin@apple.com>
3724
3725         Remove WKPageGetPlugInInformation - it is not used anymore
3726         https://bugs.webkit.org/show_bug.cgi?id=119047
3727
3728         Reviewed by Alexey Proskuryakov.
3729
3730         Revert r151172, which fixed a crash introduced in r151043, r151054, which fixed some naming
3731         and ref-churn issues introduced in r151043, and r151043, which added
3732         WKPageGetPlugInInformation.
3733
3734         * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
3735         (WKPageIsURLKnownHSTSHost):
3736         * UIProcess/API/C/mac/WKPagePrivateMac.h:
3737         * UIProcess/Plugins/PluginProcessManager.h:
3738         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
3739         * UIProcess/WebPageProxy.cpp:
3740         (WebKit::WebPageProxy::close):
3741         * UIProcess/WebPageProxy.h:
3742         * UIProcess/WebPageProxy.messages.in:
3743         * UIProcess/mac/WebPageProxyMac.mm:
3744         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3745         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
3746         * WebProcess/Plugins/Plugin.h:
3747         * WebProcess/Plugins/PluginProxy.h:
3748         * WebProcess/Plugins/PluginView.h:
3749         * WebProcess/WebPage/WebPage.h:
3750         * WebProcess/WebPage/WebPage.messages.in:
3751         * WebProcess/WebPage/mac/WebPageMac.mm:
3752
3753 2013-07-24  Jessie Berlin  <jberlin@apple.com>
3754
3755         Remove WKPageGetPlugInInformation - it is not used anymore
3756         https://bugs.webkit.org/show_bug.cgi?id=119047
3757
3758         Rubber-stamped by Alexey Proskuryakov.
3759
3760         Revert r152328, which added a key used only in the callback info for
3761         WKPageGetPlugInInformation.
3762
3763         * Shared/API/c/WKPluginInformation.cpp:
3764         * Shared/API/c/WKPluginInformation.h:
3765         * Shared/Plugins/Netscape/PluginInformation.cpp:
3766         * Shared/Plugins/Netscape/PluginInformation.h:
3767         * UIProcess/WebPageProxy.h:
3768         * UIProcess/WebPageProxy.messages.in:
3769         * UIProcess/mac/WebPageProxyMac.mm:
3770         (WebKit::WebPageProxy::containsPlugInCallback):
3771         * WebProcess/WebPage/mac/WebPageMac.mm:
3772         (WebKit::WebPage::containsPluginViewsWithPluginProcessToken):
3773
3774 2013-07-24  Anton Obzhirov  <a.obzhirov@samsung.com>
3775
3776         [GTK] TestInspectorServer unit test is timing out
3777         https://bugs.webkit.org/show_bug.cgi?id=105866
3778
3779         Reviewed by Gustavo Noronha Silva.
3780
3781         The test failed because it couldn't find inspector resources in default folder
3782         (make install step was missing). It uses now resources available in
3783         WebKitBuild folder. WebInspectorServerGtk was refactored as well to make
3784         easier to use WEBKIT_INSPECTOR_SERVER_PATH variable.
3785
3786         * UIProcess/API/gtk/tests/GNUmakefile.am:
3787         * UIProcess/API/gtk/tests/InspectorTestServer.cpp:
3788         (main):
3789         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
3790         (testInspectorServerPageList):
3791         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
3792         (WebKit::WebInspectorServer::platformResourceForPath):
3793         (WebKit::WebInspectorServer::buildPageList):
3794         (WebKit::WebInspectorServer::inspectorServerFilesPath):
3795
3796 2013-07-23  Simon Cooper  <scooper@apple.com>
3797
3798         10.7: Java applets do not work due to sandbox violation/exception
3799         https://bugs.webkit.org/show_bug.cgi?id=118920
3800         <rdar://problem/14471541&12910934&14223830&14260729&14267679>
3801
3802         Reviewed by Alexey Proskuryakov.
3803
3804         Introduce versioning into the common profile and use it to fix
3805         a number of issues with Java on 10.7 and 10.8. Allow writing the
3806         com.apple.java.util.prefs preference file. This change also
3807         introduces a "/Library/Application Support/Java/PublicFiles"
3808         area which Java can read without any restrictions. Files written
3809         to this location will need to be created and written to by
3810         a privileged process.
3811
3812         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3813         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
3814
3815 2013-07-23  Eunmi Lee  <eunmi15.lee@samsung.com>
3816
3817         [EFL][WK2] Add doneWithTouchEvent callback to the WKViewClient.
3818         https://bugs.webkit.org/show_bug.cgi?id=110085
3819
3820         Reviewed by Kenneth Rohde Christiansen.
3821
3822         Add doneWithTouchEvent callback to the WKViewClient in order to get the
3823         result of touch events in the EwkView. The result will be used to
3824         recognize gestures in the Bug 102643.
3825
3826         APIs to get values from WKTouchEventRef and WKTouchPointRef are added
3827         because WKTypeRef is opaque to the applications.
3828
3829         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
3830         * UIProcess/API/C/efl/WKAPICastEfl.h:
3831         (WebKit::toAPI):
3832         * UIProcess/API/C/efl/WKEventEfl.cpp:
3833         (WKTouchEventGetType):
3834         (WKTouchEventGetTouchPoints):
3835         (WKTouchEventGetModifiers):
3836         (WKTouchEventGetTimestamp):
3837         (WKTouchPointGetID):
3838         (WKTouchPointGetState):
3839         (WKTouchPointGetScreenPosition):
3840         (WKTouchPointGetPosition):
3841         (WKTouchPointGetRadius):
3842         (WKTouchPointGetRotationAngle):
3843         (WKTouchPointGetForceFactor):
3844         * UIProcess/API/C/efl/WKEventEfl.h:
3845         * UIProcess/API/efl/EwkView.cpp:
3846         (EwkView::doneWithTouchEvent):
3847         * UIProcess/API/efl/EwkView.h:
3848         * UIProcess/CoordinatedGraphics/WebView.cpp:
3849         (WebKit::WebView::doneWithTouchEvent):
3850         * UIProcess/CoordinatedGraphics/WebViewClient.cpp:
3851         (WebKit::WebViewClient::doneWithTouchEvent):
3852         * UIProcess/CoordinatedGraphics/WebViewClient.h:
3853         * UIProcess/efl/ViewClientEfl.cpp:
3854         (WebKit::ViewClientEfl::doneWithTouchEvent):
3855         (WebKit::ViewClientEfl::ViewClientEfl):
3856         * UIProcess/efl/ViewClientEfl.h:
3857
3858 2013-07-22  Alexey Proskuryakov  <ap@apple.com>
3859
3860         Frequent MESSAGE_CHECK failures in WebPageProxy::didReceiveEvent
3861         https://bugs.webkit.org/show_bug.cgi?id=118976
3862         <rdar://problem/14155030>
3863
3864         Reviewed by Sam Weinig.
3865
3866         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessExited):
3867         Clear m_gestureEventQueue, just like we clear all other event queues here.
3868
3869 2013-07-21  Anders Carlsson  <andersca@apple.com>
3870
3871         Java Updater not launched on Lion and Mountain Lion
3872         https://bugs.webkit.org/show_bug.cgi?id=118953
3873         <rdar://problem/14496721>
3874
3875         Reviewed by Sam Weinig.
3876
3877         On Lion and Mountain Lion, -[NSURL isEqual:] will return NO for two file URLs if one of
3878         them has "localhost" specified, even if the paths are otherwise equal. Work around this by
3879         comparing the paths directly.
3880
3881         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3882         (WebKit::isJavaUpdaterURL):
3883
3884 2013-07-19  Morten Stenshorne  <mstensho@opera.com>
3885
3886         [GTK] Need a way to enable region based columns from the command line
3887         https://bugs.webkit.org/show_bug.cgi?id=116611
3888
3889         Reviewed by Martin Robinson.
3890
3891         Add an environment variable to enable experimental features.
3892
3893         This provides a means to enable experimental features without polluting
3894         the public API.
3895
3896         Environment variable name: WEBKITGTK_EXPERIMENTAL_FEATURES
3897
3898         Format: WEBKITGTK_EXPERIMENTAL_FEATURES="<feature1>=1,<feature2>=1,..."
3899         Or, to enable all experimental features: WEBKITGTK_EXPERIMENTAL_FEATURES=all
3900
3901         So far the only feature is region based columns (implement multicol using
3902         the CSS regions implementation rather than ColumnInfo & co) - REGION_BASED_COLUMNS.
3903
3904         Example: WEBKITGTK_EXPERIMENTAL_FEATURES="REGION_BASED_COLUMNS=1"
3905
3906         * GNUmakefile.list.am:
3907         * PlatformGTK.cmake:
3908         * UIProcess/API/gtk/WebKitSettings.cpp:
3909         (webKitSettingsConstructed):
3910         (webkit_settings_class_init):
3911         * UIProcess/gtk/ExperimentalFeatures.cpp: Added.
3912         (WebKit):
3913         (Setting):
3914         (WebKit::ExperimentalFeatures::ExperimentalFeatures):
3915         (WebKit::ExperimentalFeatures::isEnabled):
3916         (WebKit::ExperimentalFeatures::setEnableByName):
3917         (WebKit::ExperimentalFeatures::parseEnvironment):
3918         * UIProcess/gtk/ExperimentalFeatures.h: Added.
3919         (WebKit):
3920         (ExperimentalFeatures):
3921
3922 2013-07-18  Eunmi Lee  <eunmi15.lee@samsung.com>
3923
3924         [WK2] Share Qt port's codes to find zoomable area with CoordinatedGraphics.
3925         https://bugs.webkit.org/show_bug.cgi?id=118585
3926
3927         Reviewed by Anders Carlsson.
3928
3929         The function to find zoomable area is needed in order to implement the
3930         feature to scale for double-tap gesture. The WK2 EFL and NIX port want
3931         to use that function, so extract the code from the Qt port, make it
3932         usable in the CoordinatedGraphics and add API and callback.
3933
3934         * CMakeLists.txt:
3935         * Target.pri:
3936         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3937         (WKViewFindZoomableAreaForRect):
3938         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
3939         * UIProcess/API/efl/EwkView.cpp:
3940         (EwkView::didFindZoomableArea):
3941         * UIProcess/API/efl/EwkView.h:
3942         * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: Added.
3943         (WebKit::WebPageProxy::findZoomableAreaForPoint):
3944         (WebKit::WebPageProxy::didFindZoomableArea):
3945         * UIProcess/CoordinatedGraphics/WebView.cpp:
3946         (WebKit::WebView::didFindZoomableArea):
3947         (WebKit::WebView::findZoomableAreaForPoint):
3948         * UIProcess/CoordinatedGraphics/WebView.h:
3949         * UIProcess/CoordinatedGraphics/WebViewClient.cpp:
3950         (WebKit::WebViewClient::didFindZoomableArea):
3951         * UIProcess/CoordinatedGraphics/WebViewClient.h:
3952         * UIProcess/PageClient.h:
3953         * UIProcess/WebPageProxy.h:
3954         * UIProcess/WebPageProxy.messages.in:
3955         * UIProcess/efl/ViewClientEfl.cpp:
3956         (WebKit::ViewClientEfl::didFindZoomableArea):
3957         (WebKit::ViewClientEfl::ViewClientEfl):
3958         * UIProcess/efl/ViewClientEfl.h:
3959         * UIProcess/qt/WebPageProxyQt.cpp:
3960         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Added.
3961         (WebKit::WebPage::findZoomableAreaForPoint):
3962         * WebProcess/WebPage/WebPage.cpp:
3963         * WebProcess/WebPage/WebPage.h:
3964         * WebProcess/WebPage/WebPage.messages.in:
3965
3966 2013-07-18  Simon Cooper  <scooper@apple.com>
3967
3968         Flash Player: deny file-read-data /Library/Application Support/Macromedia/FlashAuthor.cfg
3969         https://bugs.webkit.org/show_bug.cgi?id=118874
3970         <rdar://problem/14271327>
3971
3972         Reviewed by Alexey Proskuryakov.
3973
3974         Silently deny access to FlashAuthor.cfg. This location contains
3975         files containing lists of paths that Flash Player will
3976         "allow" access to (without asking the user). Since the plugin
3977         sandbox won't permit the access to the listed paths it is better
3978         to silently block attempts to read this "whitelist".
3979
3980         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
3981
3982 2013-07-18  Tim Horton  <timothy_horton@apple.com>
3983
3984         [wk2] Ensure that the plugin layer is removed completely when the PluginProcess crashes
3985         https://bugs.webkit.org/show_bug.cgi?id=118862
3986
3987         Reviewed by Anders Carlsson.
3988
3989         * WebProcess/Plugins/PluginView.cpp:
3990         (WebKit::PluginView::PluginView):
3991         Add m_pluginProcessHasCrashed.
3992
3993         (WebKit::PluginView::platformLayer):
3994         Don't return the plugin's layer if it has crashed.
3995
3996         (WebKit::PluginView::pluginProcessCrashed):
3997         Set m_pluginProcessHasCrashed.
3998         Cause a style recalc so that we rebuild the layer tree; our layer won't be included.
3999
4000         * WebProcess/Plugins/PluginView.h:
4001         Add m_pluginProcessHasCrashed.
4002
4003 2013-07-18  Alexey Proskuryakov  <ap@apple.com>
4004
4005         <rdar://problem/13886443> Assertion failures in NetworkProcess in SandboxExtension::revoke when aborting SyncNetworkResourceLoader
4006         <rdar://problem/13826348> ASSERT(!m_useCount) fails in NetworkProcess at SandboxExtension::~SandboxExtension
4007         https://bugs.webkit.org/show_bug.cgi?id=118855
4008
4009         Reviewed by Brady Eidson.
4010
4011         * NetworkProcess/NetworkResourceLoader.cpp:
4012         (WebKit::NetworkResourceLoader::cleanup):
4013         (WebKit::NetworkResourceLoader::didFinishLoading):
4014         (WebKit::NetworkResourceLoader::didFail):
4015         Moved sandbox extension invalidation to cleanup() meaning that we won't fail to
4016         do this when aborting a loader that currently loading from network.
4017     
4018         * NetworkProcess/SchedulableLoader.cpp:
4019         (WebKit::SchedulableLoader::SchedulableLoader):
4020         (WebKit::SchedulableLoader::consumeSandboxExtensions):
4021         (WebKit::SchedulableLoader::invalidateSandboxExtensions):
4022         * NetworkProcess/SchedulableLoader.h:
4023         Keep track of whether sandbox extensions are consumed, we don't want to revoke
4024         extensions that were never consumed (as used to be the case with sync loaders,
4025         and would be with async ones after the above fix). Also, get rid of extensions
4026         immediately when invalidating, we won't need them again.
4027
4028 2013-07-18  Tim Horton  <timothy_horton@apple.com>
4029
4030         Remove PDFViewController and WKView "custom representations"
4031         https://bugs.webkit.org/show_bug.cgi?id=118720
4032
4033         Reviewed by Alexey Proskuryakov.
4034
4035         PDFViewController was the only implementation of
4036         a "custom representation" for a WKView. As it has
4037         been superceded by PDFPlugin, we can remove both
4038         PDFViewController and the notion of a WKView custom
4039         representation.
4040
4041         * UIProcess/API/gtk/PageClientImpl.cpp:
4042         * UIProcess/API/gtk/PageClientImpl.h:
4043         * UIProcess/API/mac/PDFViewController.h: Removed.
4044         * UIProcess/API/mac/PDFViewController.mm: Removed.
4045         * UIProcess/API/mac/PageClientImpl.h:
4046         * UIProcess/API/mac/PageClientImpl.mm:
4047         * UIProcess/API/mac/WKView.mm:
4048         (-[WKView accessibilityFocusedUIElement]):
4049         (-[WKView accessibilityHitTest:]):
4050         (-[WKView accessibilityAttributeValue:]):
4051         (-[WKView printOperationWithPrintInfo:forFrame:]):
4052         * UIProcess/API/mac/WKViewInternal.h:
4053         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
4054         * UIProcess/CoordinatedGraphics/WebView.cpp:
4055         * UIProcess/CoordinatedGraphics/WebView.h:
4056         * UIProcess/DrawingAreaProxy.h:
4057         * UIProcess/DrawingAreaProxyImpl.cpp:
4058         * UIProcess/DrawingAreaProxyImpl.h:
4059         * UIProcess/PageClient.h:
4060         * UIProcess/WebPageProxy.cpp:
4061         (WebKit::WebPageProxy::WebPageProxy):
4062         (WebKit::WebPageProxy::supportsTextEncoding):
4063         (WebKit::WebPageProxy::supportsTextZoom):
4064         (WebKit::WebPageProxy::setTextZoomFactor):
4065         (WebKit::WebPageProxy::setPageZoomFactor):
4066         (WebKit::WebPageProxy::setPageAndTextZoomFactors):
4067         (WebKit::WebPageProxy::findString):
4068         (WebKit::WebPageProxy::countStringMatches):
4069         (WebKit::WebPageProxy::didCommitLoadForFrame):
4070         * UIProcess/WebPageProxy.h:
4071         (WebKit::WebPageProxy::textZoomFactor):
4072         (WebKit::WebPageProxy::pageZoomFactor):
4073         * UIProcess/WebPageProxy.messages.in:
4074         * UIProcess/qt/QtPageClient.h:
4075         * WebKit2.xcodeproj/project.pbxproj:
4076         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4077         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
4078         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
4079         (WebKit::WebFrameLoaderClient::committedLoad):
4080         (WebKit::WebFrameLoaderClient::finishedLoading):
4081         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
4082         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
4083         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
4084         * WebProcess/WebPage/DrawingArea.h:
4085         * WebProcess/WebPage/DrawingArea.messages.in:
4086         * WebProcess/WebPage/DrawingAreaImpl.cpp:
4087         (WebKit::DrawingAreaImpl::setNeedsDisplayInRect):
4088         (WebKit::DrawingAreaImpl::scroll):
4089         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
4090         (WebKit::DrawingAreaImpl::display):
4091         * WebProcess/WebPage/DrawingAreaImpl.h:
4092         * WebProcess/WebPage/WebPage.cpp:
4093         * WebProcess/WebPage/WebPage.h:
4094         * WebProcess/WebPage/mac/WebPageMac.mm:
4095         (WebKit::WebPage::platformPreferencesDidChange):
4096         * mac/WebKit2.order:
4097
4098 2013-07-18  Dong-Gwan Kim  <donggwan.kim@samsung.com>
4099
4100         [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_color_picker.cpp