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