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