Add prioritization of ad click conversions and cleaning of sent ad click conversions
[WebKit-https.git] / Source / WebKit / ChangeLog-2013-04-24
1 2013-04-24  Claudio Saavedra  <csaavedra@igalia.com>
2
3         Build break after r149004
4         https://bugs.webkit.org/show_bug.cgi?id=115091
5
6         Reviewed by Csaba Osztrogonác.
7
8         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
9         (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged):
10         (WebKit): Add dummy method for new virtual method.
11         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
12         (LayerTreeHostGtk): Ditto.
13
14 2013-04-23  Ryuan Choi  <ryuan.choi@samsung.com>
15
16         [EFL][WK2] Build break after r149004
17         https://bugs.webkit.org/show_bug.cgi?id=115066
18
19         Reviewed by Tim Horton.
20
21         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
22         (WebKit::CoordinatedLayerTreeHost::pageBackgroundTransparencyChanged):
23         Added dummy method for new virtual method.
24         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
25         (CoordinatedLayerTreeHost): Ditto.
26
27 2013-04-23  Simon Fraser  <simon.fraser@apple.com>
28
29         Turn off tiled drawing in the Web Inspector
30         https://bugs.webkit.org/show_bug.cgi?id=115064
31
32         Reviewed by Tim Horton.
33         
34         We get little benefit from making the Web Inspector use tiled drawing;
35         it doesn't scroll the main frame, so doesn't benefit from the ScrollingCoordinator.
36         Not using tiled drawing also means that we won't make compositing
37         layers for position: -webkit-sticky, which avoids a number of issues
38         with compositing layer proliferation in the inspector.
39         
40         Also turn off accelerated drawing, since that pref will force a single
41         compositing layer.
42
43         * UIProcess/WebInspectorProxy.cpp:
44         (WebKit::createInspectorPageGroup):
45         * UIProcess/mac/WebInspectorProxyMac.mm:
46
47 2013-04-23  Simon Fraser  <simon.fraser@apple.com>
48
49         When the web page transparency changes, DrawingAreaImpl needs to know about it
50         https://bugs.webkit.org/show_bug.cgi?id=115062
51
52         Reviewed by Tim Horton.
53         
54         The non-composited contents layer owned by LayerTreeHostMac needs to
55         be marked as opaque or not depending on whether the WebPage draws
56         a background (or transparent background). It computed this at creation,
57         but did not dynamically update the state. Fix it so it does.
58         
59         This fixes cases of garbage pixels in the Web Inspector toolbar area
60         in some configurations.
61
62         * WebProcess/WebPage/DrawingAreaImpl.cpp:
63         (WebKit::DrawingAreaImpl::pageBackgroundTransparencyChanged):
64         * WebProcess/WebPage/DrawingAreaImpl.h:
65         (DrawingAreaImpl):
66         * WebProcess/WebPage/LayerTreeHost.h:
67         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
68         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
69         (WebKit::LayerTreeHostMac::pageBackgroundTransparencyChanged):
70
71 2013-04-23  Anders Carlsson  <andersca@apple.com>
72
73         REGRESSION(r148922): Crash opening web archives or loading web pages
74         https://bugs.webkit.org/show_bug.cgi?id=115061
75         <rdar://problem/13714228>
76
77         Reviewed by Sam Weinig.
78
79         * WebProcess/Network/WebResourceLoader.cpp:
80         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
81         Calling ResourceLoader::didReceiveResponse can cause the WebResourceLoader object to go away,
82         so protect it here and guard against a null core loader.
83
84 2013-04-23  Tim Horton  <timothy_horton@apple.com>
85
86         Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8
87         https://bugs.webkit.org/show_bug.cgi?id=115056
88         <rdar://problem/13719543>
89
90         Reviewed by Simon Fraser.
91
92         Stop the primary plugin detection timer if the WebPage is torn down.
93
94         * WebProcess/WebPage/WebPage.cpp:
95         (WebKit::WebPage::close):
96
97 2013-04-23  Carlos Garcia Campos  <cgarcia@igalia.com>
98
99         [GTK] Add webkit_uri_request_get_http_headers to WebKit2 GTK+ API
100         https://bugs.webkit.org/show_bug.cgi?id=112160
101
102         Reviewed by Andreas Kling.
103
104         It allows to load requests with custom headers, or to update the
105         headers of a request before being sent to the server in the
106         WebKitWebPage::send-request callback.
107
108         * UIProcess/API/gtk/WebKitURIRequest.cpp:
109         (_WebKitURIRequestPrivate): Add SoupMessageHeaders.
110         (webkit_uri_request_get_http_headers): Return the HTTP headers of
111         the request as a SoupMessageHeaders if the request is HTTP. A new
112         SoupMessageHeaders is created on demand using the existing headers
113         of the request.
114         (webkitURIRequestGetResourceRequest): Instead of returning a const
115         reference of the internal ResourceRequest, set a request passed as
116         a reference and update its HTTP headers using the
117         SoupMessageHeaders if present.
118         * UIProcess/API/gtk/WebKitURIRequest.h:
119         * UIProcess/API/gtk/WebKitURIRequestPrivate.h:
120         * UIProcess/API/gtk/WebKitWebView.cpp:
121         (webkit_web_view_load_request): Update to the new
122         webkitURIRequestGetResourceRequest API.
123         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add
124         webkit_uri_request_get_http_headers symbol.
125         * UIProcess/API/gtk/tests/TestLoaderClient.cpp:
126         (testWebPageURI):
127         (testURIRequestHTTPHeaders):
128         (serverCallback):
129         (beforeAll):
130         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
131         (willSendRequestForFrame): Update to the new
132         webkitURIRequestGetResourceRequest API.
133
134 2013-04-23  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
135
136         [WK2] Make EFL WKView API shareable between ports
137         https://bugs.webkit.org/show_bug.cgi?id=114734
138
139         Reviewed by Anders Carlsson.
140
141         EFL-independent part of WKView API (and its implementation) is now
142         shareable between ports that use Coordinated Graphics and put to
143         CoordinatedGraphics folders.
144
145         * PlatformEfl.cmake:
146         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: Renamed from Source/WebKit2/UIProcess/API/C/efl/WKView.cpp.
147         (WKViewCreate):
148         (WKViewInitialize):
149         (WKViewGetSize):
150         (WKViewSetSize):
151         (WKViewSetViewClient):
152         (WKViewIsFocused):
153         (WKViewSetIsFocused):
154         (WKViewIsVisible):
155         (WKViewSetIsVisible):
156         (WKViewGetContentScaleFactor):
157         (WKViewSetContentScaleFactor):
158         (WKViewGetContentPosition):
159         (WKViewSetContentPosition):
160         (WKViewSetUserViewportTranslation):
161         (WKViewUserViewportToContents):
162         (WKViewPaintToCurrentGLContext):
163         (WKViewGetPage):
164         (WKViewSetDrawsBackground):
165         (WKViewGetDrawsBackground):
166         (WKViewSetDrawsTransparentBackground):
167         (WKViewGetDrawsTransparentBackground):
168         (WKViewSetThemePath):
169         (WKViewSuspendActiveDOMObjectsAndAnimations):
170         (WKViewResumeActiveDOMObjectsAndAnimations):
171         (WKViewSetShowsAsSource):
172         (WKViewGetShowsAsSource):
173         (WKViewExitFullScreen):
174         * UIProcess/API/C/CoordinatedGraphics/WKView.h: Renamed from Source/WebKit2/UIProcess/API/C/efl/WKView.h.
175         * UIProcess/API/C/efl/WKViewEfl.cpp: Added.
176         (WKViewPaintToCairoSurface):
177         (WKViewCreateSnapshot):
178         * UIProcess/API/C/efl/WKViewEfl.h: Added.
179         * UIProcess/API/efl/EwkView.cpp:
180         (EwkView::EwkView):
181         * UIProcess/API/efl/EwkView.h:
182         * UIProcess/CoordinatedGraphics/WebView.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebView.cpp.
183         (WebKit):
184         (WebKit::WebView::WebView):
185         (WebKit::WebView::~WebView):
186         (WebKit::WebView::initialize):
187         (WebKit::WebView::setSize):
188         (WebKit::WebView::setFocused):
189         (WebKit::WebView::setVisible):
190         (WebKit::WebView::setUserViewportTranslation):
191         (WebKit::WebView::userViewportToContents):
192         (WebKit::WebView::paintToCurrentGLContext):
193         (WebKit::WebView::setThemePath):
194         (WebKit::WebView::setDrawsBackground):
195         (WebKit::WebView::drawsBackground):
196         (WebKit::WebView::setDrawsTransparentBackground):
197         (WebKit::WebView::drawsTransparentBackground):
198         (WebKit::WebView::suspendActiveDOMObjectsAndAnimations):
199         (WebKit::WebView::resumeActiveDOMObjectsAndAnimations):
200         (WebKit::WebView::setShowsAsSource):
201         (WebKit::WebView::showsAsSource):
202         (WebKit::WebView::exitFullScreen):
203         (WebKit::WebView::initializeClient):
204         (WebKit::WebView::didChangeContentsSize):
205         (WebKit::WebView::transformFromScene):
206         (WebKit::WebView::transformToScene):
207         (WebKit::WebView::coordinatedGraphicsScene):
208         (WebKit::WebView::updateViewportSize):
209         (WebKit::WebView::dipSize):
210         (WebKit::WebView::createDrawingAreaProxy):
211         (WebKit::WebView::setViewNeedsDisplay):
212         (WebKit::WebView::displayView):
213         (WebKit::WebView::scrollView):
214         (WebKit::WebView::viewSize):
215         (WebKit::WebView::isViewWindowActive):
216         (WebKit::WebView::isViewFocused):
217         (WebKit::WebView::isViewVisible):
218         (WebKit::WebView::isViewInWindow):
219         (WebKit::WebView::processDidCrash):
220         (WebKit::WebView::didRelaunchProcess):
221         (WebKit::WebView::pageClosed):
222         (WebKit::WebView::toolTipChanged):
223         (WebKit::WebView::setCursor):
224         (WebKit::WebView::setCursorHiddenUntilMouseMoves):
225         (WebKit::WebView::registerEditCommand):
226         (WebKit::WebView::clearAllEditCommands):
227         (WebKit::WebView::canUndoRedo):
228         (WebKit::WebView::executeUndoRedo):
229         (WebKit::WebView::screenToWindow):
230         (WebKit::WebView::windowToScreen):
231         (WebKit::WebView::doneWithKeyEvent):
232         (WebKit::WebView::doneWithTouchEvent):
233         (WebKit::WebView::createPopupMenuProxy):
234         (WebKit::WebView::createContextMenuProxy):
235         (WebKit::WebView::createColorChooserProxy):
236         (WebKit::WebView::setFindIndicator):
237         (WebKit::WebView::enterAcceleratedCompositingMode):
238         (WebKit::WebView::exitAcceleratedCompositingMode):
239         (WebKit::WebView::updateAcceleratedCompositingMode):
240         (WebKit::WebView::didCommitLoadForMainFrame):
241         (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
242         (WebKit::WebView::customRepresentationZoomFactor):
243         (WebKit::WebView::setCustomRepresentationZoomFactor):
244         (WebKit::WebView::flashBackingStoreUpdates):
245         (WebKit::WebView::findStringInCustomRepresentation):
246         (WebKit::WebView::countStringMatchesInCustomRepresentation):
247         (WebKit::WebView::updateTextInputState):
248         (WebKit::WebView::handleDownloadRequest):
249         (WebKit::WebView::convertToDeviceSpace):
250         (WebKit::WebView::convertToUserSpace):
251         (WebKit::WebView::didChangeViewportProperties):
252         (WebKit::WebView::pageDidRequestScroll):
253         (WebKit::WebView::didRenderFrame):
254         (WebKit::WebView::pageTransitionViewportReady):
255         * UIProcess/CoordinatedGraphics/WebView.h: Renamed from Source/WebKit2/UIProcess/efl/WebView.h.
256         (WebCore):
257         (WebKit):
258         (WebView):
259         (WebKit::WebView::size):
260         (WebKit::WebView::isFocused):
261         (WebKit::WebView::isVisible):
262         (WebKit::WebView::setContentScaleFactor):
263         (WebKit::WebView::contentScaleFactor):
264         (WebKit::WebView::setContentPosition):
265         (WebKit::WebView::contentPosition):
266         (WebKit::WebView::pageRef):
267         (WebKit::WebView::page):
268         * UIProcess/CoordinatedGraphics/WebViewClient.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebViewClient.cpp.
269         (WebKit):
270         (WebKit::WebViewClient::viewNeedsDisplay):
271         (WebKit::WebViewClient::didChangeContentsSize):
272         (WebKit::WebViewClient::webProcessCrashed):
273         (WebKit::WebViewClient::webProcessDidRelaunch):
274         (WebKit::WebViewClient::didChangeContentsPosition):
275         (WebKit::WebViewClient::didRenderFrame):
276         (WebKit::WebViewClient::didCompletePageTransition):
277         (WebKit::WebViewClient::didChangeViewportAttributes):
278         (WebKit::WebViewClient::didChangeTooltip):
279         * UIProcess/CoordinatedGraphics/WebViewClient.h: Renamed from Source/WebKit2/UIProcess/efl/WebViewClient.h.
280         (WebCore):
281         (WebKit):
282         * UIProcess/efl/WebViewEfl.cpp: Added.
283         (WebKit):
284         (WebKit::WebView::create):
285         (WebKit::WebViewEfl::WebViewEfl):
286         (WebKit::WebViewEfl::setEwkView):
287         (WebKit::WebViewEfl::paintToCairoSurface):
288         (WebKit::WebViewEfl::createPopupMenuProxy):
289         (WebKit::WebViewEfl::createContextMenuProxy):
290         (WebKit::WebViewEfl::setCursor):
291         (WebKit::WebViewEfl::updateTextInputState):
292         (WebKit::WebViewEfl::handleDownloadRequest):
293         * UIProcess/efl/WebViewEfl.h: Added.
294         (WebKit):
295         (WebViewEfl):
296         (WebKit::WebViewEfl::ewkView):
297
298 2013-04-23  Antoine Quint  <graouts@apple.com>
299
300         Initial advance of text runs should be taken into account
301         https://bugs.webkit.org/show_bug.cgi?id=114949
302
303         Reviewed by Darin Adler.
304
305         Adding support for new method CTRunGetInitialAdvance in WebKitSystemInterface.
306
307         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
308         (InitWebCoreSystemInterface):
309
310 2013-04-23  Noam Rosenthal  <noam@webkit.org>
311
312         [Coordinated Graphics] Remove the lockAnimations code path
313         https://bugs.webkit.org/show_bug.cgi?id=114899
314
315         Remove locking/unlocking animations and checks for the lock state.
316         The animation locking has been tested to create not-so-smooth animations,
317         while the use case where the composited animations run out of sync from
318         the non-composited animations is very rare and unnoticeable.
319
320         Reviewed by Benjamin Poulain.
321
322         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
323         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
324         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
325         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
326         (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
327         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
328
329 2013-04-22  Sam Weinig  <sam@webkit.org>
330
331         Need WebKit SPI to detect whether a page contains form controls
332         <rdar://problem/13686661>
333         https://bugs.webkit.org/show_bug.cgi?id=115003
334
335         Reviewed by Beth Dakin.
336
337         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
338         (WKBundleFrameContainsAnyFormControls):
339         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
340         * WebProcess/WebPage/WebFrame.cpp:
341         (WebKit::WebFrame::containsAnyFormControls):
342         * WebProcess/WebPage/WebFrame.h:
343
344 2013-04-22  Alexey Proskuryakov  <ap@apple.com>
345
346         [Mac] REGRESSION (r142806): "Just Leaking" Console errors on launch
347         https://bugs.webkit.org/show_bug.cgi?id=115002
348         <rdar://problem/13254212>
349
350         Reviewed by Sam Weinig.
351
352         * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
353         (WebKit::BootstrapMain): Added an autorelease pool for code that uses Objective-C.
354
355 2013-04-22  Anders Carlsson  <andersca@apple.com>
356
357         Web process should decide when to continue main resource loads
358         https://bugs.webkit.org/show_bug.cgi?id=114995
359
360         Reviewed by Sam Weinig.
361
362         Main resource loads can be converted to downloads, so we need the ability to let the web process decide when
363         to continue loading after a response has been received.
364
365         * NetworkProcess/NetworkResourceLoader.cpp:
366         (WebKit::NetworkResourceLoader::didReceiveResponseAsync):
367         For non-main resources, just call continueDidReceiveResponse directly; there's no need to ping-pong to the web process in that case.
368
369         (WebKit::NetworkResourceLoader::continueDidReceiveResponse):
370         Just call ResourceHandle::continueDidReceiveResponse.
371
372         * NetworkProcess/NetworkResourceLoader.messages.in:
373         Add ContinueDidReceiveResponse message.
374         
375         * NetworkProcess/SchedulableLoader.cpp:
376         (WebKit::SchedulableLoader::SchedulableLoader):
377         Initialize m_isLoadingMainResource.
378
379         * NetworkProcess/SchedulableLoader.h:
380         (WebKit::SchedulableLoader::isLoadingMainResource):
381         Add getter.
382
383         (SchedulableLoader):
384         Move m_shouldClearReferrerOnHTTPSToHTTPRedirect next to the rest of the booleans.
385
386         * Shared/Network/NetworkResourceLoadParameters.cpp:
387         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
388         (WebKit::NetworkResourceLoadParameters::encode):
389         (WebKit::NetworkResourceLoadParameters::decode):
390         * Shared/Network/NetworkResourceLoadParameters.h:
391         (NetworkResourceLoadParameters):
392         Add isMainResource flag.
393
394         * WebProcess/Network/WebResourceLoadScheduler.cpp:
395         (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
396         Pass the cached resource to scheduleLoad.
397
398         (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
399         Pass null to scheduleLoad.
400
401         (WebKit::WebResourceLoadScheduler::scheduleLoad):
402         Initialize isMainResource.
403
404         * WebProcess/Network/WebResourceLoader.cpp:
405         (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
406         If this is a main resource load, send back a ContinueDidReceiveResponse message.
407
408 2013-04-22  Tim Horton  <timothy_horton@apple.com>
409
410         Plugin Snapshotting: Don't consume insane amounts of time detecting the primary plugin
411         https://bugs.webkit.org/show_bug.cgi?id=114994
412         <rdar://problem/13696269>
413
414         Reviewed by Anders Carlsson.
415
416         On some pages, we currently waste a lot of time on every subframe load
417         and every addPluginView doing primary plugin detection. This patch
418         attempts to address this via a few minor changes:
419
420         - Only allow detection after the main frame's didFinishLoad comes, instead of the first subframe.
421
422         - Only explicitly detect on the main frame's didFinishLoad (not subframes).
423
424         - Coalesce calls to determinePrimarySnapshottedPlugIn from both addPluginView
425         (in case JS is adding lots of plugins in a loop) and didFinishLoad.
426
427         * WebProcess/WebPage/WebPage.cpp:
428         (WebKit::WebPage::addPluginView): Coalesce calls to determinePrimarySnapshottedPlugIn.
429         (WebKit::WebPage::didFinishLoad):
430         Coalesce calls to determinePrimarySnapshottedPlugIn.
431         Bail on subframe loads, we're only interested in the main frame being complete.
432         (WebKit::WebPage::determinePrimarySnapshottedPlugInTimerFired):
433         Call determinePrimarySnapshottedPlugIn.
434         * WebProcess/WebPage/WebPage.h:
435         Add m_determinePrimarySnapshottedPlugInTimer and determinePrimarySnapshottedPlugInTimerFired
436
437 2013-04-22  Alexey Proskuryakov  <ap@apple.com>
438
439         <rdar://problem/13334446> [Mac] Tweak sandbox profiles.
440
441         Reviewed by Anders Carlsson.
442
443         Unbreak Lion, which doesn't provide detailed control over IPC.
444
445         * WebProcess/com.apple.WebProcess.sb.in:
446
447 2013-04-22  Martin Robinson  <mrobinson@igalia.com>
448
449         [GTK] Enable introspection always for developer builds
450         https://bugs.webkit.org/show_bug.cgi?id=114983
451
452         Reviewed by Gustavo Noronha Silva.
453
454         * GNUmakefile.am: Make warnings during gir scanning cause the build to fail. Eliminate
455         warnings about deprecated API that the g-ir-scanner uses when generating
456         the scanner program. Use --quiet.
457
458 2013-04-22  Anders Carlsson  <andersca@apple.com>
459
460         Make it easier to extend NetworkResourceLoadParameters
461         https://bugs.webkit.org/show_bug.cgi?id=114992
462
463         Reviewed by Sam Weinig.
464
465         Turn NetworkResourceLoadParameters into a struct which matches all our other parameter classes in WebKit2. Fill in the struct manually
466         instead of having a constructor with 9 parameters.
467
468         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
469         (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
470         (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):
471         * NetworkProcess/SchedulableLoader.cpp:
472         (WebKit::SchedulableLoader::SchedulableLoader):
473         * Shared/Network/NetworkResourceLoadParameters.cpp:
474         (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
475         (WebKit::NetworkResourceLoadParameters::encode):
476         (WebKit::NetworkResourceLoadParameters::decode):
477         * Shared/Network/NetworkResourceLoadParameters.h:
478         (NetworkResourceLoadParameters):
479         * WebProcess/Network/WebResourceLoadScheduler.cpp:
480         (WebKit::WebResourceLoadScheduler::scheduleLoad):
481         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
482         (WebKit::WebPlatformStrategies::loadResourceSynchronously):
483
484 2013-04-22  Tim Horton  <timothy_horton@apple.com>
485
486         PDFPlugin: Support unlocking encrypted PDFs
487         https://bugs.webkit.org/show_bug.cgi?id=114938
488         <rdar://problem/12872888>
489
490         Reviewed by Alexey Proskuryakov and Oliver Hunt.
491
492         If we try to load an encrypted PDF, we need to provide a sane mechanism
493         through which the user can provide the password. Add a slightly-below-center
494         password field to match PDFKit's normal behavior.
495
496         * WebKit2.xcodeproj/project.pbxproj: Add PDFPluginPasswordField.{h,mm}
497         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add attemptToUnlockWithPassword:
498         * WebProcess/Plugins/PDF/PDFPlugin.h:
499         Add createPasswordEntryForm, attemptToUnlockPDF, m_passwordField.
500         * WebProcess/Plugins/PDF/PDFPlugin.mm:
501         (annotationStyle): Make #annotationContainer a flexbox that centers its contents.
502         This won't affect the normal absolutely-positioned form fields, but the inline
503         password field will be centered vertically and horizontally.
504
505         (WebKit::PDFPlugin::pdfDocumentDidLoad):
506         If the document is locked when loaded, create a password field.
507
508         (WebKit::PDFPlugin::createPasswordEntryForm):
509         Create a PDFPluginPasswordField and attach it to the document.
510
511         (WebKit::PDFPlugin::attemptToUnlockPDF):
512         Try to unlock the PDF with the given password. If this succeeds, remove
513         the password field and relayout the scroll view.
514
515         (WebKit::PDFPlugin::calculateSizes):
516         Make the document 0x0 if it is locked, preventing scrolling.
517
518         (WebKit::PDFPlugin::handleMouseEvent):
519         Don't pass mouse events to PDFLayerController while it is locked,
520         as it has no useful events to provide, and will try to present a
521         dialog asking for the password if we let a click through.
522
523         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
524         (WebKit::PDFPluginAnnotation::eventListener): Added.
525         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
526         (WebKit::PDFPluginAnnotation::handleEvent):
527         Move event-handling code here from PDFPluginAnnotationEventListener::handleEvent
528         so that subclasses can override this instead of having to have their own
529         event listeners (this is also why we now expose eventListener()).
530
531         (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent):
532         Forward the event to our owning PDFPluginAnnotation.
533
534         * WebProcess/Plugins/PDF/PDFPluginPasswordField.h: Added.
535         (WebKit::PDFPluginPasswordField::PDFPluginPasswordField):
536         * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm: Added.
537         (WebKit::PDFPluginPasswordField::create):
538         (WebKit::PDFPluginPasswordField::~PDFPluginPasswordField):
539         Unregister for keyup.
540
541         (WebKit::PDFPluginPasswordField::createAnnotationElement):
542         Register for keyup, and set our element's class to "password".
543
544         (WebKit::PDFPluginPasswordField::updateGeometry):
545         Added. Override updateGeometry and do nothing, as the password field
546         has a geometry defined by CSS instead of by the PDF content.
547
548         (WebKit::PDFPluginPasswordField::handleEvent):
549         If the enter/return key is pressed, attempt to unlock the PDF. Also,
550         we do not call either of our superclass' implementations of handleEvent,
551         because blurring the password field should not destroy it, and tabbing
552         between fields has no relevance when there can only be one field.
553
554         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
555         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener):
556         Removed. We now share our superclass' event listener.
557
558         (WebKit::PDFPluginTextAnnotation::textAnnotation): Const.
559         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
560         (WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation):
561         PDFPluginTextAnnotation no longer has its own event listener,
562         so there's nothing left to clear here. Just make sure to unregister
563         our event from PDFPluginAnnotation's shared event listener!
564
565         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
566         Ensure that we can create a PDFPluginTextAnnotation with a null annotation.
567
568         (WebKit::PDFPluginTextAnnotation::commit): Use value().
569         (WebKit::PDFPluginTextAnnotation::value):
570         Factor retrieving the value of the form control out of commit().
571
572         (WebKit::PDFPluginTextAnnotation::handleEvent):
573         Call up to PDFPluginAnnotation's handler so that defocus destroys the annotation.
574
575 2013-04-22  Anders Carlsson  <andersca@apple.com>
576
577         Slow/beachballing when using the find bar on a page with plug-ins
578         https://bugs.webkit.org/show_bug.cgi?id=114990
579         <rdar://problem/12832313>
580
581         Reviewed by Tim Horton.
582
583         * WebProcess/Plugins/PluginView.cpp:
584         (WebKit::PluginView::notifyWidget):
585         Call shouldCreateTransientPaintingSnapshot().
586
587         (WebKit::PluginView::shouldCreateTransientPaintingSnapshot):
588         Don't create a painting snapshot if we're asked to paint the find indicator.
589
590         * WebProcess/Plugins/PluginView.h:
591         Add new member function.
592
593 2013-04-22  Alexey Proskuryakov  <ap@apple.com>
594
595         <rdar://problem/13334446> [Mac] Tweak sandbox profiles.
596
597         Reviewed by Sam Weinig.
598
599         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
600         * WebProcess/com.apple.WebProcess.sb.in:
601
602 2013-04-22  Anders Carlsson  <andersca@apple.com>
603
604         Don't kill our XPC services in response to memory pressure
605         https://bugs.webkit.org/show_bug.cgi?id=114985
606         <rdar://problem/13229217>
607
608         Reviewed by Mark Rowe.
609
610         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
611         (WebKit::XPCServiceInitializer):
612         Call xpc_transaction_begin() so we'll never be killed by the kernel when there's memory pressure;
613         we prefer to manage our own lifetime thank you very much!
614
615         * Shared/mac/ChildProcessMac.mm:
616         (WebKit::ChildProcess::platformInitialize):
617         Remove call to disable sudden termination.
618
619 2013-04-22  Alexey Proskuryakov  <ap@apple.com>
620
621         <rdar://problem/13681842> [Mac] Tweak WebProcess sandbox profile to use
622         system-graphics function when available.
623
624         Reviewed by Sam Weinig.
625
626         * WebProcess/com.apple.WebProcess.sb.in:
627
628 2013-04-22  Zan Dobersek  <zdobersek@igalia.com>
629
630         [GTK] Set up libPlatform.la
631         https://bugs.webkit.org/show_bug.cgi?id=114168
632
633         Reviewed by Martin Robinson.
634
635         * GNUmakefile.am: Add the new libPlatform.la library to the libwebkitgtk library. Link the WebKitPluginProcess
636         executable against libPlatform.la as well.
637
638 2013-04-22  Sam Weinig  <sam@webkit.org>
639
640         Hard code plug-in sandbox profile lookup directories and move
641         the profiles to WebKit2.
642
643         Reviewed by Anders Carlsson.
644
645         * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
646         (WebKit::PluginProcessMainDelegate::getExtraInitializationData):
647         * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
648         (WebKit::PluginServiceInitializerDelegate::getExtraInitializationData):
649         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
650         (WebKit::PluginProcessProxy::platformGetLaunchOptions):
651         Stop passing the sandbox-profile-directory-path to the plug-in process.
652
653         * PluginProcess/mac/PluginProcessMac.mm:
654         (WebKit::loadSandboxProfileForDirectory):
655         (WebKit::loadSandboxProfile):
656         (WebKit::PluginProcess::initializeSandbox):
657         Hard code the plug-in sandbox profile lookup to only look in the WebKit2 bundle
658         and /System/Library/Sandbox/Profiles/.
659
660         * Resources/PlugInSandboxProfiles: Added.
661         Add profiles.
662
663         * WebKit2.xcodeproj/project.pbxproj:
664         Copy the profiles to the bundle.
665
666 2013-04-15  Jer Noble  <jer.noble@apple.com>
667
668         Refactor creation of the full screen window into an (overridable) method.
669         https://bugs.webkit.org/show_bug.cgi?id=110369
670
671         Reviewed by Eric Carlson.
672
673         Add a new WKView method -(NSWindow)createFullScreenWindow which can be overridden
674         by subclasses to provide custom full screen windows to the WKFullScreenWindowController.
675
676         * UIProcess/API/mac/WKView.mm:
677         (-[WKView fullScreenWindowController]):
678         (-[WKView createFullScreenWindow]):
679         * UIProcess/API/mac/WKViewPrivate.h:
680         * UIProcess/mac/WKFullScreenWindowController.mm:
681         (-[WKFullScreenWindowController initWithWindow:]):
682
683 2013-04-22  Carlos Garcia Campos  <cgarcia@igalia.com>
684
685         [GTK] Add webkit_web_context_set_disk_cache_directory to WebKit2 GTK+ API
686         https://bugs.webkit.org/show_bug.cgi?id=111848
687
688         Reviewed by Anders Carlsson.
689
690         This allow applications to set a custom directory for the disk
691         cache.
692
693         * UIProcess/API/gtk/WebKitWebContext.cpp:
694         (webkit_web_context_set_disk_cache_directory):
695         * UIProcess/API/gtk/WebKitWebContext.h:
696         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
697         * UIProcess/API/gtk/tests/TestMain.cpp:
698         (removeNonEmptyDirectory):
699         (main): Use a different temporary disk cache directory for every
700         test.
701
702 2013-04-22  Carlos Garcia Campos  <cgarcia@igalia.com>
703
704         [SOUP] Soup disk cache should respect the diskCacheDirectory from the process initial parameters
705         https://bugs.webkit.org/show_bug.cgi?id=111845
706
707         Reviewed by Anders Carlsson.
708
709         Move the cache initialization to platformInitializeWebProcess() to
710         create the cache using the directory received from the UI
711         process. This allows to add public API to set a different disk
712         cache directory from the UI process.
713
714         * UIProcess/efl/WebContextEfl.cpp:
715         (WebKit::WebContext::platformDefaultDiskCacheDirectory): Return
716         default disk cache directory.
717         * UIProcess/gtk/WebContextGtk.cpp:
718         (WebKit::WebContext::platformDefaultDiskCacheDirectory): Ditto.
719         * WebProcess/efl/WebProcessMainEfl.cpp:
720         (WebKit::WebProcessMainEfl): Remove soup cache initialization.
721         * WebProcess/gtk/WebProcessMainGtk.cpp:
722         (WebKit::WebProcessMainGtk): Ditto.
723         * WebProcess/soup/WebProcessSoup.cpp:
724         (WebKit::WebProcess::platformInitializeWebProcess): Initialize
725         soup cache.
726
727 2013-04-22  Krzysztof Wolanski  <k.wolanski@samsung.com>:
728
729         [WK2] Fix build warning when GESTURE_EVENTS is ON.
730         https://bugs.webkit.org/show_bug.cgi?id=114812
731
732         Reviewed by Andreas Kling.
733
734         Handle GestureSingleTap in the event type switch.
735
736         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
737         (WebKit::NetscapePlugin::platformHandleMouseEvent):
738
739 2013-04-21  Carlos Garcia Campos  <cgarcia@igalia.com>
740
741         [WebKit2] Plugins without a MIME Type fail to load
742         https://bugs.webkit.org/show_bug.cgi?id=112834
743
744         Reviewed by Benjamin Poulain.
745
746         The problem is that when the plugin is created and the MIME Type
747         is empty, since the MIME Type guessed in the UI process using the
748         plugin extension is not passed to the WebProcess, when the plugin
749         is instantiated, the value of NPMIMEType parameter passed to
750         NPP_New is NULL, and NPERR_INVALID_INSTANCE_ERROR is returned.
751         GetPluginPath message has been renamed to FindPlugin, since it
752         doesn't only return the path but also the new MIME Type and load
753         policy.
754
755         * UIProcess/WebPageProxy.cpp:
756         (WebKit::WebPageProxy::findPlugin): Receive an output newMIMEType
757         parameter that is passed to PluginModuleInfo::findPlugin() so that
758         in case of guessing the MIME Type, the new one is passed back to
759         the WebProcess.
760         * UIProcess/WebPageProxy.h:
761         (WebPageProxy):
762         * UIProcess/WebPageProxy.messages.in:
763         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
764         (WebKit::WebFrameLoaderClient::createPlugin): Pass the MIME Type
765         from the parameters to WebPage::createPlugin.
766         (WebKit::WebFrameLoaderClient::recreatePlugin): Pass a newMIMEType
767         parameter to WebPage::createPlugin.
768         * WebProcess/WebPage/WebPage.cpp:
769         (WebKit::WebPage::createPlugin): Add newMIMEType out parameter and
770         pass it to the FindPlugin message.
771         (WebKit::WebPage::canPluginHandleResponse): Pass newMIMEType to
772         FindPlugin message.
773         * WebProcess/WebPage/WebPage.h:
774         (WebPage):
775
776 2013-04-21  Carlos Garcia Campos  <cgarcia@igalia.com>
777
778         Widget should not depend on AXObjectCache
779         https://bugs.webkit.org/show_bug.cgi?id=114514
780
781         Reviewed by Chris Fleizach.
782
783         Update to API changes.
784
785         * WebProcess/Plugins/PDF/PDFPlugin.mm:
786         (WebKit::PDFPlugin::createScrollbar):
787         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
788         (WebKit::SimplePDFPlugin::createScrollbar):
789         (WebKit::SimplePDFPlugin::destroyScrollbar):
790
791 2013-04-20  Manuel Rego Casasnovas  <rego@igalia.com>
792
793         [GTK] Fix unit test webkit2/WebKitFindController/hide
794         https://bugs.webkit.org/show_bug.cgi?id=89810
795
796         Reviewed by Carlos Garcia Campos.
797
798         The test had some hacks in order to compare a page with highlighted
799         results after using the find command with the original page. Now it uses
800         the snapshots API that allows to make the test simpler and more
801         reliable.
802
803         * UIProcess/API/gtk/tests/TestMain.h:
804         (Test::cairoSurfacesEqual): Moved helper function to compare two cairo
805         surfaces from TestWebKitWebView.
806         (Test):
807         * UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
808         (testFindControllerHide): Modify test to use snapshots.
809         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
810         (testWebViewSnapshot): Move basic snapshop methods to WebViewTest to
811         share them with TestWebKitFindController test.
812         * UIProcess/API/gtk/tests/WebViewTest.cpp:
813         (WebViewTest::WebViewTest): Initialize cairo surface.
814         (WebViewTest::~WebViewTest): Destroy cairo surface.
815         (onSnapshotReady): Callback to set the cairo surface when the snapshot
816         is ready.
817         (WebViewTest::getSnapshotAndWaitUntilReady): Method that takes a
818         snapshot and returns the cairo surface when it is ready.
819         * UIProcess/API/gtk/tests/WebViewTest.h: Add new method headers and
820         attribute for the cairo surface.
821
822 2013-04-19  Jer Noble  <jer.noble@apple.com>
823
824         Unreviewed, revert r148782. It was not reviewed by a WebKit2 owner.
825
826         * PluginProcess/mac/PluginProcessShim.mm:
827         * Shared/mac/CookieStorageShim.cpp: Removed.
828         * Shared/mac/CookieStorageShim.h: Removed.
829         * Shared/mac/CookieStorageShimLibrary.cpp: Removed.
830         * Shared/mac/CookieStorageShimLibrary.h: Removed.
831         * Shared/mac/DYLDInterpose.h: Removed.
832         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
833         (WebKit::addDYLDEnvironmentAdditions):
834         * WebKit2.xcodeproj/project.pbxproj:
835         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
836         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
837         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
838         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
839         (WebContentServiceInitializer):
840         * WebProcess/WebProcess.cpp:
841         (WebKit::WebProcess::initializeWebProcess):
842         * WebProcess/mac/SecItemShimLibrary.mm:
843         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
844         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
845
846
847 2013-04-19  Jer Noble  <jer.noble@apple.com>
848
849         WWDC session videos don’t play at developer.apple.com
850         https://bugs.webkit.org/show_bug.cgi?id=114858
851
852         Reviewed by Eric Carlson.
853
854         AVFoundation uses CFNetwork to store and retrieve cookies from the global store.
855         However, in the case where network access happens in the NetworkProcess, session
856         cookies are stored in-memory, and are not accessable in the WebProcess. Until such
857         a time as AVFoundation can provide an API which would allow us to provide cookies
858         for a specific request, we will interpose the CFNetwork method which they use to
859         retrieve the cookie string from the cookie store for their pending request.
860
861         Duplicate the previous SecItemShim target to a new, WebProcessShim target. This
862         target includes the SecItemShim functionality, but will add a new shim for cookie
863         retrieval:
864         * Shared/mac/CookieStorageShimLibrary.h: Added
865         (CookieStorageShimCallbacks):
866         * Shared/mac/CookieStorageShimLibrary.cpp: Added.
867         (WebKit::ShimProtector::ShimProtector): A simple stack-based counter class.
868         (WebKit::ShimProtector::~ShimProtector):
869         (WebKit::ShimProtector::count):
870         (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL): Interpose
871             the CFNetwork call, and pass to the registered callback.
872         (WebKit::WebKitCookieStorageShimInitialize): Register the callbacks.
873
874         Add a helper singleton class which will talk to the shim through the 
875         registered callbacks:
876         * Shared/mac/CookieStorageShim.h: Added
877         (WebKit::CookieStorageShim::CookieStorageShim):
878         * Shared/mac/CookieStorageShim.cpp: Added.
879         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Pass the request
880             over to the NetworkProcess.
881         (WebKit::CookieStorageShim::shared): Simple singleton.
882         (WebKit::CookieStorageShim::initialize): Call the library initializer.
883
884         Initialize the shim only when the WebProcess is delegating network loading
885         to the NetworkProcess:
886         * WebProcess/WebProcess.cpp:
887         (WebKit::WebProcess::initializeWebProcess):
888
889         Rename the WebProcess's shim from SecItemShim -> WebProcessShim:
890         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
891         (WebKit::addDYLDEnvironmentAdditions):
892         * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
893         (WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
894         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
895         * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
896         (WebContentServiceInitializer):
897
898         As the DYLD_INTERPOSE macro is used in multiple files now, put it in its
899         own header:
900         * Shared/mac/DYLDInterpose.h: Added.
901         * PluginProcess/mac/PluginProcessShim.mm:
902         * WebProcess/mac/SecItemShimLibrary.mm:
903
904         Add new files to the project:
905         * WebKit2.xcodeproj/project.pbxproj:
906
907 2013-04-19  Brady Eidson  <beidson@apple.com>
908
909         Add JoinExistingSession to the WebContext XPC.
910         <rdar://problem/13541540> and https://bugs.webkit.org/show_bug.cgi?id=114882
911
912         Reviewed by Sam Weinig.
913
914         This fixes <keygen> and maybe other things.
915
916         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
917         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
918
919 2013-04-19  Martin Robinson  <mrobinson@igalia.com>
920
921         [GTK] JSCore.gir.in has a few problems
922         https://bugs.webkit.org/show_bug.cgi?id=114710
923
924         Reviewed by Philippe Normand.
925
926         * GNUmakefile.am: Updated to reflect new location of JavaScriptCore gir file. Share the
927         same autotools data task as the WebKit1 and JavaScriptCore gir installations.
928
929 2013-04-19  Noam Rosenthal  <noam@webkit.org>
930
931         [Texmap] Implementation for pattern compositing
932         https://bugs.webkit.org/show_bug.cgi?id=109588
933
934         Reviewed by Allan Sandfeld Jensen.
935
936         Serialize the two new properties from CoordinatedGraphicsLayer to CoordinatedGraphicsScene.
937
938         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
939         (CoreIPC::::encode):
940         (CoreIPC::::decode):
941             Encode/decode the new tiling properties.
942
943         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
944         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
945             Enable pattern compositing for coordinated graphics.
946             This is needed since we don't want to enable pattern compositing for
947             WebKit1 yet.
948
949 2013-04-18  Tim Horton  <timothy_horton@apple.com>
950
951         PDFPlugin: Update PDFLayerController's scale factors earlier
952         https://bugs.webkit.org/show_bug.cgi?id=114843
953
954         Reviewed by Simon Fraser.
955
956         Inform PDFLayerController of the initial page/device scale factors so that
957         it renders at the correct scale the first time, instead of first rendering
958         at 1x and then flashing to 2x (on 2x devices).
959
960         * WebProcess/Plugins/PDF/PDFPlugin.mm:
961         (WebKit::PDFPlugin::pdfDocumentDidLoad):
962
963 2013-04-18  Tim Horton  <timothy_horton@apple.com>
964
965         PDFPlugin: Hook up the search-in-Spotlight menu item
966         https://bugs.webkit.org/show_bug.cgi?id=114837
967         <rdar://problem/13583591>
968
969         Reviewed by Mark Rowe.
970
971         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
972         Add performSpotlightSearch: delegate callback.
973
974         * WebProcess/Plugins/PDF/PDFPlugin.h:
975         (WebKit::PDFPlugin::performSpotlightSearch):
976         Add performSpotlightSearch() PDFPlugin method.
977
978         * WebProcess/Plugins/PDF/PDFPlugin.mm:
979         (-[WKPDFLayerControllerDelegate performSpotlightSearch:]): Hand the search string to PDFPlugin.
980         (WebKit::PDFPlugin::performSpotlightSearch): Hand the search string to WebPageProxy.
981
982 2013-04-18  Anders Carlsson  <andersca@apple.com>
983
984         Dispatch local storage events
985         https://bugs.webkit.org/show_bug.cgi?id=114838
986
987         Reviewed by Beth Dakin.
988
989         * UIProcess/Storage/StorageManager.cpp:
990         (WebKit::StorageManager::StorageArea::dispatchEvents):
991         Pass 0 as the storage area ID if the event originally comes from another process.
992
993         * WebProcess/Storage/StorageAreaMap.cpp:
994         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
995         Gather all the frames for which we want to dispatch events.
996
997 2013-04-18  Anders Carlsson  <andersca@apple.com>
998
999         Use the page group id from the UI process as the local storage namespace ID
1000         https://bugs.webkit.org/show_bug.cgi?id=114836
1001
1002         Reviewed by Beth Dakin.
1003
1004         The WebCore PageGroup identifier is different across processes, so use the one given to us by the UI process.
1005
1006         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1007         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
1008         * WebProcess/WebPage/WebPageGroupProxy.h:
1009         (WebKit::WebPageGroupProxy::corePageGroup):
1010         * WebProcess/WebProcess.cpp:
1011         (WebKit::WebProcess::webPageGroup):
1012         * WebProcess/WebProcess.h:
1013
1014 2013-04-18  Tim Horton  <timothy_horton@apple.com>
1015
1016         Add a synchronous version of WKView endDeferringViewInWindowChanges
1017         https://bugs.webkit.org/show_bug.cgi?id=114780
1018         <rdar://problem/12821901>
1019
1020         Reviewed by Simon Fraser.
1021
1022         Add new WKView SPI, endDeferringViewInWindowChangesSync, which synchronously
1023         (though with a 250 ms timeout) does the work required to reparent a WKView
1024         without flashing white.
1025
1026         * UIProcess/API/mac/WKView.mm:
1027         (-[WKView beginDeferringViewInWindowChanges]):
1028         (-[WKView endDeferringViewInWindowChanges]):
1029         Make begin/endDeferringViewInWindowChanges not allow nested deferrals,
1030         as we don't need them, and they complicate synchronous-end a lot.
1031
1032         (-[WKView endDeferringViewInWindowChangesSync]):
1033         Add a sync version of endDeferringViewInWindowChanges which waits
1034         for DidUpdateInWindowState.
1035
1036         (-[WKView isDeferringViewInWindowChanges]):
1037
1038         * UIProcess/API/mac/WKViewPrivate.h: Add endDeferringViewInWindowChangesSync.
1039
1040         * UIProcess/WebPageProxy.cpp:
1041         (WebKit::WebPageProxy::waitForDidUpdateInWindowState):
1042         Add waitForDidUpdateInWindowState(), which blocks for
1043         250ms or until the WebProcess reparents all of its layers and spins
1044         the runloop once, to prevent flashing when parenting a WKView.
1045         If we've already timed out waiting for the WebProcess, don't block, as
1046         it's probably quite busy and is likely to time out again.
1047
1048         * UIProcess/WebPageProxy.h:
1049         (WebKit::WebPageProxy::isInWindow): Added.
1050         (WebKit::WebPageProxy::waitForDidUpdateInWindowState): Added.
1051         (WebKit::WebPageProxy::didUpdateInWindowState): Added.
1052
1053         * UIProcess/WebPageProxy.messages.in: Add DidUpdateInWindowState()
1054
1055         * WebProcess/WebPage/WebPage.cpp:
1056         (WebKit::WebPage::didUpdateInWindowStateTimerFired): Send DidUpdateInWindowState to WebPageProxy.
1057         (WebKit::WebPage::setIsInWindow): When setIsInWindow completes, TileController
1058         tiles have been reparented, and the TiledCoreAnimationDrawingArea has
1059         reconnected the layer tree to the context, start a 0-delay runloop timer
1060         to allow painting and layer flushing to finish; when the timer fires,
1061         we'll send the UIProcess a DidUpdateInWindowState so it can stop blocking.
1062
1063         * WebProcess/WebPage/WebPage.h:
1064         (WebPage): Add didUpdateInWindowStateTimerFired and m_sendDidUpdateInWindowStateTimer.
1065
1066 2013-04-18  Anders Carlsson  <andersca@apple.com>
1067
1068         StorageManager should keep track of local storage namespaces
1069         https://bugs.webkit.org/show_bug.cgi?id=114831
1070
1071         Reviewed by Beth Dakin.
1072
1073         * UIProcess/Storage/StorageManager.cpp:
1074         (StorageManager::StorageArea):
1075         Add the local storage namespace, and security origin as member variables.
1076
1077         (StorageManager::LocalStorageNamespace):
1078         New class that represents a local storage namespace.
1079
1080         (WebKit::StorageManager::StorageArea::~StorageArea):
1081         If this storage area belongs to a local storage namespace, notify it that we've been destroyed.
1082
1083         (WebKit::StorageManager::StorageArea::clone):
1084         Assert that we don't have a local storage namespace.
1085
1086         (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea):
1087         If we already have a storage area for the given security origin, return it. Otherwise, create a new storage area.
1088         Note that LocalStorageNamespace does not hold strong references to its StorageArea objects; they are being kept alive
1089         by a mapping inside the StorageManager.
1090
1091         (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea):
1092         Remove the storage area from the map. If there are no more areas, remove the namespace from the manager.
1093
1094         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
1095         StorageArea::create now takes the security origin.
1096
1097         (WebKit::StorageManager::createLocalStorageMap):
1098         Get (or create) the right local storage namespace and then create a storage area.
1099
1100 2013-04-17  Geoffrey Garen  <ggaren@apple.com>
1101
1102         Renamed JSGlobalData to VM
1103         https://bugs.webkit.org/show_bug.cgi?id=114777
1104
1105         Reviewed by Phil Pizlo.
1106
1107         * Shared/linux/WebMemorySamplerLinux.cpp:
1108         (WebKit::WebMemorySampler::sampleWebKit):
1109         * Shared/mac/WebMemorySampler.mac.mm:
1110         (WebKit::WebMemorySampler::sampleWebKit):
1111         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1112         (WebKit::InjectedBundle::javaScriptObjectsCount):
1113         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1114         (WebKit::JSNPMethod::finishCreation):
1115         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1116         (WebKit::JSNPMethod::create):
1117         (JSNPMethod):
1118         (WebKit::JSNPMethod::createStructure):
1119         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1120         (WebKit::JSNPObject::JSNPObject):
1121         (WebKit::JSNPObject::finishCreation):
1122         (WebKit::JSNPObject::callMethod):
1123         (WebKit::JSNPObject::callObject):
1124         (WebKit::JSNPObject::callConstructor):
1125         (WebKit::JSNPObject::put):
1126         (WebKit::JSNPObject::deleteProperty):
1127         (WebKit::JSNPObject::getOwnPropertyNames):
1128         (WebKit::JSNPObject::propertyGetter):
1129         * WebProcess/Plugins/Netscape/JSNPObject.h:
1130         (WebKit::JSNPObject::create):
1131         (WebKit::JSNPObject::createStructure):
1132         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1133         (WebKit::NPJSObject::create):
1134         (WebKit::NPJSObject::initialize):
1135         * WebProcess/Plugins/Netscape/NPJSObject.h:
1136         (JSC):
1137         (NPJSObject):
1138         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1139         (WebKit::NPRuntimeObjectMap::getOrCreateNPObject):
1140         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
1141         (WebKit::NPRuntimeObjectMap::evaluate):
1142         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1143         (JSC):
1144         (NPRuntimeObjectMap):
1145         * WebProcess/Plugins/PluginView.cpp:
1146         (WebKit::PluginView::windowScriptNPObject):
1147         (WebKit::PluginView::pluginElementNPObject):
1148         * WebProcess/WebPage/WebPage.cpp:
1149         (WebKit::WebPage::runJavaScriptInMainFrame):
1150         * WebProcess/WebProcess.cpp:
1151         (WebKit::WebProcess::getWebCoreStatistics):
1152
1153 2013-04-18  Anders Carlsson  <andersca@apple.com>
1154
1155         Differentiate between creating local storage maps and session storage maps
1156         https://bugs.webkit.org/show_bug.cgi?id=114823
1157
1158         Reviewed by Beth Dakin.
1159
1160         * UIProcess/Storage/StorageManager.cpp:
1161         (WebKit::StorageManager::createLocalStorageMap):
1162         (WebKit::StorageManager::createSessionStorageMap):
1163         * UIProcess/Storage/StorageManager.h:
1164         * UIProcess/Storage/StorageManager.messages.in:
1165         * WebProcess/Storage/StorageAreaMap.cpp:
1166         (WebKit::StorageAreaMap::StorageAreaMap):
1167
1168 2013-04-18  Anders Carlsson  <andersca@apple.com>
1169
1170         StorageAreaMaps should not assume that a zero storage namespace ID is used for local storage
1171         https://bugs.webkit.org/show_bug.cgi?id=114822
1172
1173         Reviewed by Beth Dakin.
1174
1175         Store the storage type directly in the storage area map.
1176
1177         * WebProcess/Storage/StorageAreaMap.cpp:
1178         (WebKit::StorageAreaMap::StorageAreaMap):
1179         * WebProcess/Storage/StorageAreaMap.h:
1180         (WebKit::StorageAreaMap::storageType):
1181
1182 2013-04-18  Anders Carlsson  <andersca@apple.com>
1183
1184         Begin fleshing out UI side local storage
1185         https://bugs.webkit.org/show_bug.cgi?id=114820
1186
1187         Reviewed by Beth Dakin.
1188
1189         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1190         (WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
1191         (WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
1192         (WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
1193         (WebKit::StorageNamespaceImpl::~StorageNamespaceImpl):
1194         * WebProcess/Storage/StorageNamespaceImpl.h:
1195         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1196         (WebKit::WebPlatformStrategies::localStorageNamespace):
1197
1198 2013-04-18  Sam Weinig  <sam@webkit.org>
1199
1200         Fix spelling I thought I had fixed.
1201
1202         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
1203         (-[WKBrowsingContextGroup initWithIdentifier:]):
1204
1205 2013-04-18  Sam Weinig  <sam@webkit.org>
1206
1207         WebKit should not write WKPreferences to app user defaults when using the ObjC API
1208         <rdar://problem/13593578>
1209         https://bugs.webkit.org/show_bug.cgi?id=114821
1210
1211         Reviewed by Anders Carlsson.
1212
1213         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
1214         (-[WKBrowsingContextGroup initWithIdentifier:]):
1215         Use a identifier-less preferences for the ObjC-API. I think we will probably want this
1216         to be the default for the C-API at some point as well, but Safari currently uses this
1217         behavior.
1218
1219 2013-04-17  Anders Carlsson  <andersca@apple.com>
1220
1221         Change storage factory functions to take a PageGroup and Page respectively
1222         https://bugs.webkit.org/show_bug.cgi?id=114776
1223
1224         Reviewed by Beth Dakin.
1225
1226         Update for WebCore changes.
1227
1228         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1229         (WebKit::WebPlatformStrategies::localStorageNamespace):
1230         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
1231         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1232         (WebPlatformStrategies):
1233
1234 2013-04-18  Timothy Hatcher  <timothy@apple.com>
1235
1236         Remove an ASSERT that is causing flakeyness in Debug builds.
1237
1238         https://webkit.org/b/113020
1239
1240         Reviewed by Jessie Berlin.
1241
1242         * UIProcess/WebInspectorProxy.cpp:
1243         (WebKit::WebInspectorProxy::open): Removed ASSERT(m_createdInspectorPage).
1244
1245 2013-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1246
1247         [GTK] Add WebKitWebPage::send-request signal to WebKit2 GTK+ API
1248         https://bugs.webkit.org/show_bug.cgi?id=83681
1249
1250         Reviewed by Anders Carlsson.
1251
1252         Add WebKitWebPage::send-request signal emitted in willSendRequest
1253         callback to allow web process extensions to modify requests before
1254         they are sent or cancel the resource load.
1255         This patch makes WebKitURIRequest and WebKitURIResponse objects
1256         shareable between UI process and web extensions APIs. Since both
1257         APIs force single header includes, the WebKitDefines.h header has
1258         been split moving the forward declarations specific to the UI
1259         process API to a new file WebKitForwardDeclarations.h. This way we
1260         can also  share the WebKitDefines.h header and remove the
1261         WebKitWebExtensionDefines.h header used in the web extensions API.
1262
1263         * GNUmakefile.list.am: Add new files to compilation.
1264         * UIProcess/API/gtk/WebKitContextMenu.h: Include WebKitForward.h.
1265         * UIProcess/API/gtk/WebKitContextMenuItem.h: Ditto.
1266         * UIProcess/API/gtk/WebKitDefines.h: Remove forward declarations.
1267         * UIProcess/API/gtk/WebKitDownload.h: Include WebKitForward.h.
1268         * UIProcess/API/gtk/WebKitFindController.h: Ditto.
1269         * UIProcess/API/gtk/WebKitForwardDeclarations.h: Added. Contains
1270         the forward declarations moved from WebKitDefines.h.
1271         * UIProcess/API/gtk/WebKitPrintOperation.h: Include WebKitForward.h.
1272         * UIProcess/API/gtk/WebKitURIRequest.cpp:
1273         (webkitURIRequestSetProperty): Use webkit_uri_request_set_uri() to
1274         set the new URI.
1275         (webkit_uri_request_class_init): Make URI property construct
1276         instead of construct-only, since it can be updated once
1277         constructed. It should never be NULL, so set default value to
1278         about:blank instad of NULL.
1279         (webkit_uri_request_set_uri): New public method to set the URI of
1280         the WebKitURIRequest.
1281         * UIProcess/API/gtk/WebKitURIRequest.h: Allow to include this file
1282         from webkit-web-extension.h.
1283         * UIProcess/API/gtk/WebKitURIResponse.h: Ditto.
1284         * UIProcess/API/gtk/WebKitURISchemeRequest.h: Include
1285         WebKitForward.h.
1286         * UIProcess/API/gtk/WebKitWebView.h: Ditto.
1287         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add
1288         webkit_uri_request_set_uri.
1289         * UIProcess/API/gtk/tests/TestResources.cpp:
1290         (testWebResourceSendRequest):
1291         (serverCallback):
1292         (beforeAll):
1293         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1294         (sendRequestCallback):
1295         (pageCreatedCallback):
1296         * UIProcess/API/gtk/webkit2marshal.list:
1297         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h: Include
1298         WebKitDefines.h instead of WebKitWebExtensionDefines.h.
1299         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1300         (willSendRequestForFrame): Emit WebKitWebPage::send-request and
1301         return early if the load is cancelled.
1302         (webkit_web_page_class_init): Add WebKitWebPage::send-request
1303         signal.
1304         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: Include
1305         WebKitDefines.h instead of WebKitWebExtensionDefines.h.
1306         * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
1307
1308 2013-04-18  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
1309
1310         [WK2] CoordinatedGraphicsLayerState is a struct, not a class
1311         https://bugs.webkit.org/show_bug.cgi?id=108855
1312
1313         Reviewed by Andreas Kling.
1314
1315         Fixes the forward declaration which takes CoordinatedGraphicsLayerState
1316         as a class.
1317
1318         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1319         (WebCore):
1320
1321 2013-04-18  Krzysztof Wolanski  <k.wolanski@samsung.com>:
1322
1323         [EFL][WK2] Change inadequate return value in method setDone().
1324         https://bugs.webkit.org/show_bug.cgi?id=114806
1325
1326         Reviewed by Andreas Kling.
1327
1328         Fix possible warning in EFL port: no return statement in function returning non-void.
1329         Change return value from bool to void in method setDone().
1330
1331         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1332         (EWK2UnitTest::CallbackDataTimer::setDone):
1333
1334 2013-04-18  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1335
1336         [WK2][EFL] Text Checker's settings refactor
1337         https://bugs.webkit.org/show_bug.cgi?id=111713
1338
1339         Reviewed by Andreas Kling.
1340
1341         Use WK2's TextCheckerState object as the store for the text checker settings.
1342         It's shared between the client (Ewk API part) and WebProcess (read only).
1343         Thanks to it, we don't have to keep any additional structure with
1344         the settings on ewk side.
1345
1346         In the consistency with WKTextChecker C API, move the Ewk's text checker settings APIs
1347         to the ewk_text_checker.h/cpp. They're not connected to Ewk_View/Ewk_Settings object to
1348         keep them in ewk_setting.h/cpp.
1349
1350         Introduce a new class to implement WKTextCheckerClient callbacks to call spelling
1351         methods through WK2 C API.
1352         The main purpose of this change is to detach text checker initialization from ewk_context.
1353
1354         * PlatformEfl.cmake:
1355         Add a new files to the build.
1356
1357         * UIProcess/API/efl/ewk_context.cpp:
1358         (EwkContext::EwkContext):
1359         Detach the text checker initialization from context.
1360         There might be more than default context.
1361         There is one text checker object per application.
1362
1363         * UIProcess/API/efl/ewk_settings.cpp:
1364         * UIProcess/API/efl/ewk_settings.h:
1365         Remove the text checker settings.
1366
1367         * UIProcess/API/efl/ewk_text_checker.cpp:
1368         Add the text checker settings to the ewk_text_checker.h/cpp
1369
1370         (convertLanguagesToEinaList):
1371         Add helper function to convert Vector's values to Eina_List.
1372
1373         (clientCallbacks):
1374         Add the client callback responsible for the continuous spell checking
1375         setting change to the struct.
1376
1377         (ewk_text_checker_continuous_spell_checking_enabled_set):
1378         Do not call the client's callback responsible for the setting
1379         change unless WebKit changes the setting (trough the context
1380         'Check Spelling While Typing' option).
1381
1382         * UIProcess/API/efl/ewk_text_checker.h:
1383         Adjust APIs name to the ewk_text_checker syntax.
1384         Update the documentation according to the changes.
1385
1386         * UIProcess/API/efl/ewk_text_checker_private.h:
1387         (ClientCallbacks):
1388         Move ClientCallbacks structure to TextCheckerClientEfl.
1389         The client callbacks (Ewk API) have to be accessible in WKTextCheckerClient callbacks
1390         to choose what implementation will be used - the client's (if definied) or Enchant impl.
1391
1392         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
1393         Update the unit tests according to the APIs change.
1394         Update the test responsible for the notification about the setting change
1395         according to changes in 'ewk_text_checker_continuous_spell_checking_enabled_set'.
1396
1397         * UIProcess/efl/TextCheckerClientEfl.cpp: Added.
1398         Implement WKTextCheckerClient callbacks.
1399
1400         (TextCheckerClientEfl::TextCheckerClientEfl):
1401         (TextCheckerClientEfl::instance):
1402         Allow to get and create TextCheckerClientEfl object.
1403
1404         (TextCheckerClientEfl::isContinuousSpellCheckingEnabled):
1405         Get the setting value based on WK2 C API.
1406
1407         (TextCheckerClientEfl::ensureSpellCheckingLanguage):
1408         Load the default languages if user didn't specify any.
1409
1410         (TextCheckerClientEfl::updateSpellCheckingLanguages):
1411         (TextCheckerClientEfl::languagesUpdateTimerFired):
1412         (TextCheckerClientEfl::availableSpellCheckingLanguages):
1413         (TextCheckerClientEfl::loadedSpellCheckingLanguages):
1414         (TextCheckerClientEfl::availableSpellCheckingLanguages):
1415         (TextCheckerClientEfl::loadedSpellCheckingLanguages):
1416         Provide support for languages.
1417
1418         (TextCheckerClientEfl::spellCheckingSettingChangeTimerFired):
1419         (TextCheckerClientEfl::callContinuousSpellCheckingChangeCallbackAsync):
1420         Notify the client about the setting change.
1421
1422         (TextCheckerClientEfl::isContinuousSpellCheckingEnabledCallback):
1423         (TextCheckerClientEfl::setContinuousSpellCheckingEnabledCallback):
1424         (TextCheckerClientEfl::uniqueSpellDocumentTagCallback):
1425         (TextCheckerClientEfl::closeSpellDocumentWithTagCallback):
1426         (TextCheckerClientEfl::checkSpellingOfStringCallback):
1427         (TextCheckerClientEfl::guessesForWordCallback):
1428         (TextCheckerClientEfl::learnWordCallback):
1429         (TextCheckerClientEfl::ignoreWordCallback):
1430         WKTextCheckerClient callbacks implementation.
1431
1432         * UIProcess/efl/TextCheckerClientEfl.h: Added.
1433         (TextCheckerClientEfl):
1434         (TextCheckerClientEfl::clientCallbacks):
1435         Return the client callbacks to be used in ewk_text_checker.cpp.
1436
1437         * UIProcess/efl/TextCheckerEfl.cpp:
1438         (WebKit::TextChecker::state):
1439         Initialize the TextCheckerState's members to false.
1440
1441         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
1442         Set the default language if user didn't specify any.
1443         Notify the client about the setting change.
1444         This method is called when context menu 'Check Spelling While Typing'
1445         option has been toggled.
1446
1447         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
1448         Set the default language if user didn't specify any.
1449         Called by WKTextChecker's API.
1450
1451 2013-04-18  Manuel Rego Casasnovas  <rego@igalia.com>
1452
1453         [GTK][WK2] Add WebKitWebPage::webkit_web_page_get_uri to WebKit2 GTK+ API
1454         https://bugs.webkit.org/show_bug.cgi?id=111288
1455
1456         Reviewed by Anders Carlsson.
1457
1458         Add new property URI to WebKitWebPage providing a method
1459         webkit_web_page_get_uri to get it and the signal "notify::uri" to
1460         monitor changes in the URI.
1461
1462         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include new method in
1463         GTK+ doc.
1464         * UIProcess/API/gtk/tests/TestLoaderClient.cpp:
1465         (testWebPageURI):
1466         (beforeAll):
1467         (afterAll): Add test to check that WebKitWebPage URI matches with
1468         WebKitWebView value. The tests is listening for changes in WebKitWebPage
1469         URI via D-Bus and checks that value is the same than WebKitWebView URI.
1470         It also checks that the order of the URIs in a redirection is right.
1471         When the test finishes the signals are disconnected properly.
1472         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1473         (uriChangedCallback):
1474         (pageCreatedCallback): Add new D-Bus signal "URIChanged" connected to
1475         "notify::uri" signal of WebKitWebPage.
1476         * UIProcess/API/gtk/tests/WebKitTestBus.cpp:
1477         (WebKitTestBus::getOrCreateConnection): Rename method connection() to
1478         getOrCreateConnection().
1479         (WebKitTestBus::createProxy): Use the new method name.
1480         * UIProcess/API/gtk/tests/WebKitTestBus.h:
1481         (WebKitTestBus::connection): Add public getter for m_connection.
1482         (WebKitTestBus): Add private method header getOrCreateConnection().
1483         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1484         (_WebKitWebPagePrivate): Add new URI attribute.
1485         (webkitWebPageSetURI): Method to set the URI and emit the "notify:uri"
1486         signal if it has changed.
1487         (didStartProvisionalLoadForFrame): At this point it use the unreachable
1488         URL from provisional document loader if any. Otherwise, it uses the URL
1489         from provisional document loader.
1490         (didReceiveServerRedirectForProvisionalLoadForFrame): In the case of
1491         redirections it works like for didStartProvisionalLoadForFrame getting
1492         the unreachable URL if any.
1493         (didSameDocumentNavigationForFrame): In this case it gets the URL from
1494         the document loader.
1495         (webkitWebPageGetProperty): Add code related to URI property.
1496         (webkit_web_page_class_init): Add bits related to URI property.
1497         (webkitWebPageCreate): Implement callbacks to monitor URI changes.
1498         (webkit_web_page_get_uri): Return URI attribute.
1499         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: Add new method
1500         header.
1501
1502 2013-04-18  Xan Lopez  <xan@igalia.com>
1503
1504         [GTK] When the WebProcess crashes, a signal should be emitted
1505         https://bugs.webkit.org/show_bug.cgi?id=105180
1506
1507         Emit a "web-process-crashed" signal when the WebProcess crashes. This
1508         is useful, for example, to show an error page in a web browser
1509         like Chrome does.
1510
1511         Reviewed Carlos Garcia Campos.
1512
1513         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
1514         (processDidCrash):
1515         (attachLoaderClientToView):
1516         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
1517         * UIProcess/API/gtk/WebKitWebView.cpp:
1518         (webkit_web_view_class_init):
1519         (webkitWebViewWebProcessCrashed):
1520         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
1521         (testWebExtensionGetTitle):
1522         (webProcessCrashedCallback):
1523         (testWebKitWebViewProcessCrashed):
1524         (beforeAll):
1525         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1526         (methodCallCallback):
1527
1528 2013-04-18  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1529
1530         [EFL][WK2] Add tooltip API to the WKView client
1531         https://bugs.webkit.org/show_bug.cgi?id=111563
1532
1533         Reviewed by Andreas Kling.
1534
1535         Add tooltip to the barebone Tizen C API, and implement
1536         the method so that the EFL API keeps working.
1537
1538         * UIProcess/API/C/efl/WKView.h:
1539         * UIProcess/efl/ViewClientEfl.cpp:
1540         (WebKit::ViewClientEfl::didChangeTooltip):
1541         (WebKit):
1542         (WebKit::ViewClientEfl::ViewClientEfl):
1543         * UIProcess/efl/ViewClientEfl.h:
1544         (ViewClientEfl):
1545         * UIProcess/efl/WebView.cpp:
1546         (WebKit::WebView::toolTipChanged):
1547         * UIProcess/efl/WebViewClient.cpp:
1548         (WebKit::WebViewClient::didChangeTooltip):
1549         (WebKit):
1550         * UIProcess/efl/WebViewClient.h:
1551
1552 2013-04-17  Joone Hur  <joone.hur@intel.com>
1553
1554         [EFL][AC] m_pendingSurfaceResize needs to be guarded by USE(ACCELERATED_COMPOSITING)
1555         https://bugs.webkit.org/show_bug.cgi?id=114770
1556
1557         AC related code is guarded by USE(ACCELERATED_COMPOSITING) in order to build 
1558         WebKitEfl with no-tiled-backing-store(r147792), but m_pendingSurfaceResize is 
1559         not included. This patch allows m_pendingSurfaceResize to be guarded by 
1560         USE(ACCELERATED_COMPOSITING). 
1561
1562         Reviewed by Simon Fraser.
1563
1564         * UIProcess/API/efl/EwkView.cpp:
1565         (EwkView::EwkView):
1566         (EwkView::displayTimerFired):
1567         (EwkView::handleEvasObjectCalculate):
1568         * UIProcess/API/efl/EwkView.h:
1569         (EwkView):
1570
1571 2013-04-17  Anders Carlsson  <andersca@apple.com>
1572
1573         The storage manager should know the local storage directory
1574         https://bugs.webkit.org/show_bug.cgi?id=114765
1575
1576         Reviewed by Beth Dakin.
1577
1578         * UIProcess/Storage/StorageManager.cpp:
1579         (WebKit::StorageManager::create):
1580         (WebKit::StorageManager::setLocalStorageDirectory):
1581         (WebKit::StorageManager::setLocalStorageDirectoryInternal):
1582         * UIProcess/Storage/StorageManager.h:
1583         * UIProcess/WebContext.cpp:
1584         (WebKit::WebContext::WebContext):
1585         (WebKit::WebContext::setLocalStorageDirectory):
1586         * UIProcess/WebContext.h:
1587
1588 2013-04-17  Joone Hur  <joone.hur@intel.com>
1589
1590         [EFL][AC] MiniBrowser starts with a black empty view before painting a web page
1591         https://bugs.webkit.org/show_bug.cgi?id=103745
1592
1593         Reviewed by Kenneth Rohde Christiansen.
1594
1595         Evas paints empty evas objects before rendering a web page, so it shows 
1596         a black empty view for a moment. This patch prevents from painting the empty 
1597         evas objects until a GL surface is ready for rendering.  
1598
1599         * UIProcess/API/efl/EwkView.cpp:
1600         (showEvasObjectsIfNeeded):
1601         (EwkView::displayTimerFired):
1602         (EwkView::handleEvasObjectShow):
1603
1604 2013-04-16  Carlos Garcia Campos  <cgarcia@igalia.com>
1605
1606         [GTK] Add webkit_web_page_get_id() to WebKit2 GTK+ API
1607         https://bugs.webkit.org/show_bug.cgi?id=111938
1608
1609         Reviewed by Anders Carlsson.
1610
1611         Add API to the web extensions API to get the identifier of a web
1612         page.
1613
1614         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
1615         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
1616         (methodCallCallback): Check the page ID matches the one returned
1617         by webkit_web_page_get_id().
1618         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1619         (webkit_web_page_get_id):
1620         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h:
1621
1622 2013-04-16  Anders Carlsson  <andersca@apple.com>
1623
1624         Clone storage namespaces for window.open
1625         https://bugs.webkit.org/show_bug.cgi?id=114703
1626
1627         Reviewed by Sam Weinig.
1628
1629         * UIProcess/Storage/StorageManager.cpp:
1630         (WebKit::StorageManager::StorageArea::clone):
1631         New helper function for cloning a storage area.
1632
1633         (WebKit::StorageManager::StorageArea::setItem):
1634         Correctly handle the copy-on-write feature of StorageMap if it has multiple storage areas pointing to it.
1635
1636         (WebKit::StorageManager::StorageArea::removeItem):
1637         Ditto.
1638
1639         (WebKit::StorageManager::SessionStorageNamespace::cloneTo):
1640         Add cloned storage areas.
1641
1642         * WebProcess/Storage/StorageNamespaceImpl.cpp:
1643         (WebKit::StorageNamespaceImpl::copy):
1644         Create a new session storage namespace for the new page.
1645
1646 2013-04-16  Beth Dakin  <bdakin@apple.com>
1647
1648         Need a new layout milestone to notify bundle clients when the header has been 
1649         flushed
1650         https://bugs.webkit.org/show_bug.cgi?id=114706
1651         -and corresponding-
1652         <rdar://problem/13657284>
1653
1654         Reviewed by Simon Fraser.
1655
1656         Make this new LayoutMilestone private at the API layer. 
1657         * Shared/API/c/WKPageLoadTypes.h:
1658         * Shared/API/c/WKPageLoadTypesPrivate.h: Added.
1659
1660         Handle the new milestone.
1661         * Shared/API/c/WKSharedAPICast.h:
1662         (WebKit::toWKLayoutMilestones):
1663         (WebKit::toLayoutMilestones):
1664
1665         New file to make the milestone private.
1666         * WebKit2.xcodeproj/project.pbxproj:
1667
1668         Add or remove the DidFirstFlushForHeaderLayer millstone based on whether we just 
1669         added or removed a header.
1670         * WebProcess/WebPage/mac/WebPageMac.mm:
1671         (WebKit::WebPage::setHeaderLayerWithHeight):
1672
1673 2013-04-16  Ryosuke Niwa  <rniwa@webkit.org>
1674
1675         Another EFL build fix.
1676
1677         * WebProcess/WebPage/efl/WebPageEfl.cpp:
1678
1679 2013-04-15  Sam Weinig  <sam@webkit.org>
1680
1681         Remove more #includes from Frame.h
1682         https://bugs.webkit.org/show_bug.cgi?id=114642
1683
1684         Reviewed by Anders Carlsson.
1685
1686         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
1687         * WebProcess/Plugins/PluginView.cpp:
1688         * WebProcess/WebPage/WebFrame.cpp:
1689         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1690         * WebProcess/WebPage/mac/WebPageMac.mm:
1691         * WebProcess/WebPage/qt/WebPageQt.cpp:
1692
1693 2013-04-16  Timothy Hatcher  <timothy@apple.com>
1694
1695         Make resizing the docked Web Inspector stay in sync with the inspected view.
1696
1697         https://webkit.org/b/114682
1698
1699         Reviewed by Joseph Pecoraro.
1700
1701         * UIProcess/mac/WebInspectorProxyMac.mm:
1702         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1703         Disable screen updates to make sure the layers for both views resize in sync.
1704
1705 2013-04-15  Anders Carlsson  <andersca@apple.com>
1706
1707         Remove unneeded headers from ScriptExecutionContext.h
1708         https://bugs.webkit.org/show_bug.cgi?id=114631
1709
1710         Reviewed by Alexey Proskuryakov.
1711
1712         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1713         * WebProcess/WebPage/PageOverlay.cpp:
1714
1715 2013-04-16  Maciej Stachowiak  <mjs@apple.com>
1716
1717         Remove even yet still more traces of v8
1718         https://bugs.webkit.org/show_bug.cgi?id=114693
1719
1720         Reviewed by Anders Carlsson.
1721
1722         * Scripts/generate-forwarding-headers.pl: Remove v8 from list of platforms.
1723
1724 2013-04-16  Alexey Proskuryakov  <ap@apple.com>
1725
1726         Remove unused AlternativeTextClient::dismissDictationAlternativeUI
1727         https://bugs.webkit.org/show_bug.cgi?id=114598
1728
1729         Reviewed by Ryosuke Niwa.
1730
1731         * UIProcess/API/mac/PageClientImpl.h:
1732         * UIProcess/API/mac/PageClientImpl.mm:
1733         (WebKit::PageClientImpl::dictationAlternatives):
1734         * UIProcess/PageClient.h:
1735         * UIProcess/WebPageProxy.cpp:
1736         * UIProcess/WebPageProxy.h:
1737         * UIProcess/WebPageProxy.messages.in:
1738         * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
1739         * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
1740
1741 2013-04-16  Claudio Saavedra  <csaavedra@igalia.com>
1742
1743         [GTK][WK2] Add API to retrieve a snapshot from a webview
1744         https://bugs.webkit.org/show_bug.cgi?id=98270
1745
1746         Reviewed by Anders Carlsson.
1747
1748         This adds the GTK+ API necessary to retrieve a snapshot from a
1749         webview asynchronously. The API uses the injected bundle
1750         internally to get the snapshot from the WebProcess.
1751
1752         * UIProcess/API/gtk/WebKitError.cpp:
1753         (webkit_snapshot_error_quark): Add snapshot API related error
1754         quark.
1755         * UIProcess/API/gtk/WebKitError.h: Add snapshot error handling.
1756         * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
1757         (didReceiveWebViewMessageFromInjectedBundle): Handle the new
1758         "DidGetSnapshot" message.
1759         * UIProcess/API/gtk/WebKitPrivate.h: Add SnapshotRegion enum.
1760         * UIProcess/API/gtk/WebKitWebView.cpp:
1761         (_WebKitWebViewPrivate): Add a map for the snapshot results.
1762         (GetSnapshotAsyncData):
1763         (webKitWebViewDidReceiveSnapshot):
1764         (webKitSnapshotRegionToSnapshotRegion): Helper method for casting
1765         the region option enumeration.
1766         (generateSnapshotCallbackID): Method to generate unique callback
1767         ids.
1768         (webkit_web_view_get_snapshot):
1769         (webkit_web_view_get_snapshot_finish): New snapshotting API.
1770         * UIProcess/API/gtk/WebKitWebView.h: Ditto.
1771         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Add the private method
1772         to handle a received snapshot.
1773         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API
1774         bits.
1775         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1776         (cairoSurfacesEqual): Add helper to compare cairo_surface_t
1777         structs.
1778         (testWebViewSnapshot): New test.
1779         (beforeAll): Add the new test.
1780         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1781         (WebViewTest::selectAll): Add method to help test snapshots
1782         including selection.
1783         * UIProcess/API/gtk/tests/WebViewTest.h: Ditto
1784         * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
1785         (didReceiveMessageToPage): Ditto.
1786         (webkitWebExtensionCreate): Register method above.
1787         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1788         (webkitWebPageDidReceiveMessage): Add this method. It
1789         handles the new message "GetSnapshot".
1790         * WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h:
1791         Add method above.
1792
1793 2013-04-16  Timothy Hatcher  <timothy@apple.com>
1794
1795         Create full rects for the inspector and inspected views when
1796         adjusting to an inspected view frame change. 
1797
1798         This ensures switching dock sides restores the inspected view
1799         and inspector to fill the parent's bounds.
1800
1801         https://webkit.org/b/114666
1802         rdar://problem/13660796
1803
1804         Reviewed by Joseph Pecoraro.
1805
1806         * UIProcess/mac/WebInspectorProxyMac.mm:
1807         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
1808
1809 2013-04-16  Balazs Kelemen  <kbalazs@webkit.org>
1810
1811         Initialize logging channels for web processes
1812         https://bugs.webkit.org/show_bug.cgi?id=114621
1813
1814         Reviewed by Sam Weinig.
1815
1816         Use InitializeWebKit2 for initializing the web and plugin processes.
1817         It handles initializing the logging channels and it's better to have
1818         shared core for this. For the plugin process now we always create
1819         a RunLoop object which is not necessary with the -scanPlugin argument
1820         but it shouldn't be a problem.
1821
1822         * PluginProcess/qt/PluginProcessMainQt.cpp:
1823         (WebKit::PluginProcessMain):
1824         * PluginProcess/unix/PluginProcessMainUnix.cpp:
1825         (WebKit::PluginProcessMainUnix):
1826         * WebProcess/efl/WebProcessMainEfl.cpp:
1827         (WebKit::WebProcessMainEfl):
1828         * WebProcess/gtk/WebProcessMainGtk.cpp:
1829         (WebKit::WebProcessMainGtk):
1830         * WebProcess/qt/WebProcessMainQt.cpp:
1831         (WebKit::WebProcessMainQt):
1832
1833 2013-04-16  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1834
1835         [EFL][WK2] Add an API for getting context menu item's parent menu
1836         https://bugs.webkit.org/show_bug.cgi?id=107510
1837
1838         Reviewed by Kenneth Rohde Christiansen.
1839
1840         Added parent menu support and API for Ewk_Context_Menu_Item, to
1841         allow selecting context menus using Elementary widgets.
1842         Context menu unit test updated with new function. 
1843
1844         * UIProcess/API/efl/ewk_context_menu.cpp:
1845         (EwkContextMenu::EwkContextMenu):
1846         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1847         (EwkContextMenuItem::EwkContextMenuItem):
1848         (ewk_context_menu_item_parent_menu_get):
1849         * UIProcess/API/efl/ewk_context_menu_item.h:
1850         * UIProcess/API/efl/ewk_context_menu_item_private.h:
1851         (EwkContextMenuItem::create):
1852         (EwkContextMenuItem::parentMenu):
1853         (EwkContextMenuItem::setParentMenu):
1854         (EwkContextMenuItem):
1855         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
1856         (showContextMenu):
1857
1858 2013-04-16  Andreas Kling  <akling@apple.com>
1859
1860         Fix release builds with !LOG_DISABLED.
1861
1862         * Platform/mac/Logging.mac.mm:
1863
1864 2013-04-16  Manuel Rego Casasnovas  <rego@igalia.com>
1865
1866         [GTK][EFL] Remove deprecated libsoup API usage
1867         https://bugs.webkit.org/show_bug.cgi?id=104894
1868
1869         Reviewed by Philippe Normand.
1870
1871         Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include
1872         libsoup/soup.h.
1873
1874         * WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h:
1875         * WebProcess/efl/WebProcessMainEfl.cpp:
1876         * WebProcess/gtk/WebProcessMainGtk.cpp:
1877         * WebProcess/soup/WebKitSoupRequestGeneric.h:
1878         * WebProcess/soup/WebProcessSoup.cpp:
1879         * WebProcess/soup/WebSoupRequestManager.cpp:
1880         (WebKit::WebSoupRequestManager::registerURIScheme): Remove requester and
1881         use method soup_session_add_feature_by_type().
1882
1883 2013-04-15  Dean Jackson  <dino@apple.com>
1884
1885         Plugins that resize might need to be snapshotted.
1886         https://bugs.webkit.org/show_bug.cgi?id=102157
1887         <rdar://problem/12696259>
1888
1889         Reviewed by Tim Horton.
1890
1891         Allow a running plugin to be snapshotted. All this
1892         means is that we start the snapshot timer again.
1893
1894         * WebProcess/Plugins/PluginView.cpp:
1895         (WebKit::PluginView::beginSnapshottingRunningPlugin): Restart
1896             the timer.
1897         * WebProcess/Plugins/PluginView.h: Virtual method declaration.
1898
1899 2013-04-15  Seokju Kwon  <seokju.kwon@gmail.com>
1900
1901         [EFL][WK2] build fix after r148434
1902         https://bugs.webkit.org/show_bug.cgi?id=114647
1903
1904         Reviewed by Benjamin Poulain.
1905
1906         * UIProcess/API/efl/EwkView.cpp:
1907         (EwkView::showContextMenu):
1908
1909 2013-04-15  Jer Noble  <jer.noble@apple.com>
1910
1911         After switching to another space and back, video races to catch up with audio
1912         https://bugs.webkit.org/show_bug.cgi?id=114634
1913
1914         Reviewed by Tim Horton.
1915
1916         In Mountain Lion and previous, report that a view is "not visible" when its window
1917         is not in the active space. This causes us to notify AVFoundation that its CAImageQueues
1918         will not be serviced and results in not having the "catch up" behavior when returning
1919         to the browser's space.
1920
1921         * UIProcess/API/mac/PageClientImpl.mm:
1922         (WebKit::PageClientImpl::isViewVisible):
1923
1924 2013-04-15  Seulgi Kim  <seulgikim@company100.net>
1925
1926         Schedule rendering at regular interval (60fps)
1927         https://bugs.webkit.org/show_bug.cgi?id=114617
1928
1929         Reviewed by Martin Robinson.
1930
1931         Schedule rendering reguarly regardless of the time taken to render a
1932         frame. Otherwise, next flush delayed by the amount of the rendering
1933         time.
1934
1935         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1936         (WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
1937         (WebKit::LayerTreeHostGtk::layerFlushTimerFired):
1938         (WebKit::LayerTreeHostGtk::flushAndRenderLayers):
1939         * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
1940
1941 2013-04-15  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
1942
1943         [EFL][WK2] Use C API in ewk_context_menu
1944         https://bugs.webkit.org/show_bug.cgi?id=109698
1945
1946         Reviewed by Andreas Kling.
1947
1948         EFL port unlike others does not handle context menus inside WebKit but exposes an API:
1949         ewk_context_menu and ewk_context_menu_item, and leaves context menu to application.
1950         Currently EFL port's context menu API uses internal C++ classes, while it should use WK2 C API,
1951         to avoid violating layering.
1952         This patch changes EFL context menu API to use only WK2 C API.
1953
1954         * UIProcess/API/efl/EwkView.cpp:
1955         (EwkView::showContextMenu):
1956         * UIProcess/API/efl/EwkView.h:
1957         (WebKit):
1958         (EwkView):
1959         * UIProcess/API/efl/ewk_context_menu.cpp:
1960         (EwkContextMenu::EwkContextMenu):
1961         (EwkContextMenu::contextMenuItemSelected):
1962         (ewk_context_menu_item_select):
1963         (getWKTagFromEwkAction):
1964         * UIProcess/API/efl/ewk_context_menu_item.cpp:
1965         (EwkContextMenuItem::EwkContextMenuItem):
1966         (getEwkActionFromWKTag):
1967         * UIProcess/API/efl/ewk_context_menu_item.h:
1968         * UIProcess/API/efl/ewk_context_menu_item_private.h:
1969         (EwkContextMenuItem::create):
1970         (EwkContextMenuItem):
1971         * UIProcess/API/efl/ewk_context_menu_private.h:
1972         (EwkContextMenu::create):
1973         (EwkContextMenu):
1974         * UIProcess/efl/ContextMenuClientEfl.cpp:
1975         (showContextMenu):
1976         (hideContextMenu):
1977         (ContextMenuClientEfl::ContextMenuClientEfl):
1978         * UIProcess/efl/ContextMenuClientEfl.h:
1979         (WebKit::ContextMenuClientEfl::view):
1980         * UIProcess/efl/WebContextMenuProxyEfl.cpp:
1981         (WebKit::WebContextMenuProxyEfl::showContextMenu):
1982         (WebKit::WebContextMenuProxyEfl::hideContextMenu):
1983         * UIProcess/efl/WebContextMenuProxyEfl.h:
1984         (WebContextMenuProxyEfl):
1985
1986 2013-04-15  Balazs Kelemen  <kbalazs@webkit.org>
1987
1988         [CoordGfx] Background color should not be part of GraphicsLayerState
1989         https://bugs.webkit.org/show_bug.cgi?id=113785
1990
1991         Reviewed by Andreas Kling.
1992
1993         Page background is independent from layer state, send it to the UI
1994         as soon as possible.
1995
1996         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1997         (CoreIPC::::encode):
1998         (CoreIPC::::decode):
1999         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2000         (WebKit::CoordinatedLayerTreeHost::setBackgroundColor):
2001
2002 2013-04-15  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
2003
2004         [WK2] Add new callbacks and a function for WebKit2 context menu API
2005         https://bugs.webkit.org/show_bug.cgi?id=111552
2006
2007         Reviewed by Anders Carlsson.
2008
2009         Add contextMenuHide and contextMenuShow callbacks to WKPageContextMenuClient
2010         and WKPageContextMenuSelected API so context menus can be handled outside
2011         WebKit. API version of this client was bumped so older client version still
2012          can be used
2013
2014         * Shared/APIClientTraits.cpp:
2015         (WebKit):
2016         * Shared/APIClientTraits.h:
2017         * UIProcess/API/C/WKPage.cpp:
2018         (WKPageSelectContextMenuItem):
2019         * UIProcess/API/C/WKPage.h:
2020         * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
2021         (attachContextMenuClientToView):
2022         * UIProcess/WebPageContextMenuClient.cpp:
2023         (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
2024         (WebKit::WebPageContextMenuClient::showContextMenu):
2025         (WebKit):
2026         (WebKit::WebPageContextMenuClient::hideContextMenu):
2027         * UIProcess/WebPageContextMenuClient.h:
2028         (WebPageContextMenuClient):
2029         * UIProcess/WebPageProxy.cpp:
2030         (WebKit::WebPageProxy::internalShowContextMenu):
2031         * UIProcess/efl/ContextMenuClientEfl.cpp:
2032         (ContextMenuClientEfl::ContextMenuClientEfl):
2033
2034 2013-04-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2035
2036         [EFL][WK2] Regression(r148274): Broke rendering in the browser
2037         https://bugs.webkit.org/show_bug.cgi?id=114593
2038
2039         Reviewed by Anders Carlsson.
2040
2041         r148274 added a new "didChangeViewportAttributes" callback to
2042         WKView but did not hook it up in ViewClientEfl. This patch
2043         fixes this and makes rendering work again in the browser.
2044
2045         * UIProcess/efl/ViewClientEfl.cpp:
2046         (WebKit::ViewClientEfl::ViewClientEfl):
2047
2048 2013-04-14  Andreas Kling  <akling@apple.com>
2049
2050         Move CSSOM classes to using MutableStylePropertySet over StylePropertySet.
2051         <http://webkit.org/b/114581>
2052
2053         Reviewed by Anders Carlsson.
2054
2055         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2056         (WebKit::WebEditorClient::shouldApplyStyle):
2057
2058 2013-04-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2059
2060         Unreviewed build fix for WebKit2 EFL after r148373 due to missing
2061         header includes.
2062
2063         * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp:
2064         * UIProcess/efl/InputMethodContextEfl.cpp:
2065
2066 2013-04-13  Sam Weinig  <sam@webkit.org>
2067
2068         Add ObjC API for setting initialization data for the WKWebProcessPlugIn
2069         https://bugs.webkit.org/show_bug.cgi?id=103846
2070
2071         Reviewed by Darin Adler.
2072
2073         * UIProcess/API/mac/WKProcessGroup.h:
2074         Adds a new optional processGroupWillCreateConnectionToWebProcessPlugIn: method for the WKProcessGroupDelegate protocol,
2075         which allows the user to pass (via an autoreleased return value) initialization data to the web process plugin.
2076
2077         * UIProcess/API/mac/WKProcessGroup.mm:
2078         (getInjectedBundleInitializationUserData):
2079         (setUpInectedBundleClient):
2080         (-[WKProcessGroup initWithInjectedBundleURL:]):
2081         (-[WKProcessGroup dealloc]):
2082         Use the existing WKContextInjectedBundleClient infrastructure to pass the initialization data to the bundle
2083         via the new ObjCObjectGraph APIObject.
2084
2085         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
2086         Adds webProcessPlugIn:initializeWithObject: to the WKWebProcessPlugIn protocol, replacing webProcessPlugInInitialize:.
2087
2088         * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2089         (WebKit::InjectedBundle::load):
2090         Pass the initialization data to the web process plugin.
2091
2092 2013-04-13  Sam Weinig  <sam@webkit.org>
2093
2094         Attempt Build Fix.
2095
2096         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2097
2098 2013-04-12  Sam Weinig  <sam@webkit.org>
2099
2100         Make Frame's ScriptController an OwnPtr and remove the #include
2101         https://bugs.webkit.org/show_bug.cgi?id=114105
2102
2103         Reviewed by Dean Jackson.
2104
2105         * Shared/WebHitTestResult.cpp:
2106         * Shared/WebHitTestResult.h:
2107         * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
2108         * UIProcess/WebContext.h:
2109         * UIProcess/WebPageProxy.h:
2110         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2111         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
2112         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2113         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2114         * WebProcess/Plugins/PDF/PDFPlugin.h:
2115         * WebProcess/Plugins/PluginView.cpp:
2116         * WebProcess/Storage/StorageAreaImpl.cpp:
2117         * WebProcess/Storage/StorageAreaMap.cpp:
2118         * WebProcess/WebPage/WebFrame.cpp:
2119         * WebProcess/WebPage/WebPage.cpp:
2120
2121 2013-04-13  Zan Dobersek  <zdobersek@igalia.com>
2122
2123         Unreviewed GTK build fix after r148311.
2124
2125         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2126         (resizeWebKitWebViewBaseFromAllocation): Passing IntSize() as the scroll offset
2127         argument to the DrawingAreaProxy::setSize method.
2128
2129 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
2130
2131         Add private interface to WKView to asynchronously update the drawing area size
2132         https://bugs.webkit.org/show_bug.cgi?id=114549
2133
2134         Reviewed by Simon Fraser.
2135
2136         This will allow a client using the WKView to resize the contents without blocking waiting for the web process to repaint.
2137
2138         * UIProcess/API/mac/WKView.mm:
2139         (-[WKView _setDrawingAreaSize:]):
2140             - if the new size of teh drawing area does not match the frame size, position it according to the contentAnchor.
2141         (-[WKView updateLayer]):
2142             - Don't let a subsequent frame size change block on a prior async resize.
2143         (-[WKView forceAsyncDrawingAreaSizeUpdate:]):
2144             - resize the drawing area asynchronously, even if frame size udpates are disabled.
2145         (-[WKView waitForAsyncDrawingAreaSizeUpdate]):
2146             - wait for asynchronous updates to complete.
2147
2148         * UIProcess/API/mac/WKViewPrivate.h:
2149             - declare new methods.
2150
2151         * UIProcess/DrawingAreaProxy.cpp:
2152         (WebKit):
2153         * UIProcess/DrawingAreaProxy.h:
2154         (DrawingAreaProxy):
2155         (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate):
2156         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2157         (TiledCoreAnimationDrawingAreaProxy):
2158         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2159         (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
2160             - pass timeout for waitForPossibleGeometryUpdate as a parameter.
2161
2162 2013-04-12  Jessie Berlin  <jberlin@apple.com>
2163
2164         32-bit build fix.
2165
2166         * UIProcess/API/mac/WKView.mm:
2167         (-[WKView setFrameSize:]):
2168
2169 2013-04-12  Jeffrey Pfau  <jpfau@apple.com>
2170
2171         Query directly for cache partition names
2172         https://bugs.webkit.org/show_bug.cgi?id=114538
2173
2174         Reviewed by David Kilzer.
2175
2176         Call back into WebKitSystemInterface to ask it for the cache
2177         partition names instead of trying to figure them out.
2178
2179         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2180         (WebKit::WebResourceCacheManager::getCacheOrigins):
2181         (WebKit):
2182         (WebKit::WebResourceCacheManager::returnCacheOrigins):
2183         * WebProcess/ResourceCache/WebResourceCacheManager.h:
2184         (WebResourceCacheManager):
2185         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
2186         (WebKit::WebResourceCacheManager::cfURLCacheHostNames):
2187         (WebKit):
2188         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
2189
2190 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
2191
2192         Build fix - too soon!
2193
2194         * UIProcess/API/mac/WKViewPrivate.h:
2195
2196 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
2197
2198         Build fix - too soon!
2199
2200         * UIProcess/API/mac/WKView.mm:
2201         (-[WKView setFrameSize:]):
2202
2203 2013-04-12  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2204
2205         [WK2] WebPageProxy loadURL() won't work when called just after terminateProcess()
2206         https://bugs.webkit.org/show_bug.cgi?id=110743
2207
2208         Reviewed by Benjamin Poulain.
2209
2210         A call to loadURL() just after terminating WebProcess will fail thanks to
2211         WebPageProxy being in an undefined state since it is in the middle of its own
2212         cleanup after process termination.
2213
2214         To properly fix this, not only WebPageProxy cleanup should be made
2215         at WebProcess termination request, but also WebProcessProxy needs
2216         to only return to its caller after terminating the process and
2217         closing connections. Otherwise, WebPageProxy can even be able to
2218         detect that WebProcess is no longer running, but a call to respawn
2219         the process will fail.
2220
2221         To fix these issues, this patch moves the cleanup code to a shared private function
2222         that is used for both the cases i.e. user termination and real crash. WebProcess
2223         shutdown is done using a new method that ensures that all cleanup was done before
2224         returning.
2225
2226         A last change introduced in this patch is that for user requested termination,
2227         clients are no longer notified of a crash (since it is not a crash).
2228
2229         * UIProcess/WebPageProxy.cpp:
2230         (WebKit::WebPageProxy::terminateProcess):
2231         (WebKit::WebPageProxy::processDidCrash):
2232         (WebKit):
2233         (WebKit::WebPageProxy::resetStateAfterProcessExited):
2234         * UIProcess/WebPageProxy.h:
2235         (WebPageProxy):
2236         * UIProcess/WebProcessProxy.cpp:
2237         (WebKit::WebProcessProxy::userRequestedTerminate):
2238         (WebKit):
2239         * UIProcess/WebProcessProxy.h:
2240         (WebProcessProxy):
2241
2242 2013-04-12  Gavin Barraclough  <barraclough@apple.com>
2243
2244         Add contentAnchor to WKView
2245         http://bugs.webkit.org/show_bug.cgi?id=114469
2246         
2247         Currently if you call setFrameSize: while frame size updates are disabled, or if the geometry
2248         update times out, then the previously rendered page content will be rendered anchored to the
2249         top left corner of the frame.
2250
2251         This is appropriate if the frame is being resized from the bottom right corner. In order to
2252         achieve a more desirable appearance if the frame is being resized from another corner we
2253         should allow the corner at which the content anchors to be specified.
2254
2255         Reviewed by Simon Fraser.
2256
2257         * UIProcess/API/mac/WKView.mm:
2258         (-[WKView setFrameSize:]):
2259             - If the content anchor has been set, then updating the frame size moves the origin within the layer.
2260         (-[WKView _setDrawingAreaSize:]):
2261             - Instruct the drawing area to paint at the correct position within the layer.
2262         (-[WKView _setAcceleratedCompositingModeRootLayer:]):
2263             - If the root layer is cleared this implicitly resets any origin position we had set within it.
2264         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
2265             - initialize new data members.
2266         (-[WKView setContentAnchor:]):
2267         (-[WKView contentAnchor]):
2268             - Accessor implementation for @property contentAnchor.
2269
2270         * UIProcess/API/mac/WKViewPrivate.h:
2271         (NS_ENUM):
2272             - Added WKContentAnchor enum type, and @property contentAnchor.
2273
2274         * UIProcess/DrawingAreaProxy.cpp:
2275         (WebKit::DrawingAreaProxy::setSize):
2276             - Don't suppress geometry updates where the layer poistion has changed.
2277
2278         * UIProcess/DrawingAreaProxy.h:
2279         (DrawingAreaProxy):
2280             - Added m_layerPosition, layerPosition argument to setSize
2281
2282         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2283         (TiledCoreAnimationDrawingAreaProxy):
2284             - Added m_lastSentLayerPosition
2285
2286         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2287         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
2288             - Don't suppress geometry updates where the layer poistion has changed.
2289
2290         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
2291             - Pass layer position in UpdateGeometry message.
2292
2293         * WebProcess/WebPage/DrawingArea.h:
2294         (WebKit::DrawingArea::updateGeometry):
2295             - Added layerPosition argument to updateGeometry
2296
2297         * WebProcess/WebPage/DrawingArea.messages.in:
2298             - Added layerPosition argument to updateGeometry
2299
2300         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2301         (TiledCoreAnimationDrawingArea):
2302             - Added layerPosition argument to updateGeometry
2303
2304         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2305         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
2306             - Added layerPosition argument to updateGeometry
2307
2308 2013-04-12  Commit Queue  <rniwa@webkit.org>
2309
2310         Unreviewed, rolling out r148296 and r148297.
2311         http://trac.webkit.org/changeset/148296
2312         http://trac.webkit.org/changeset/148297
2313         https://bugs.webkit.org/show_bug.cgi?id=114536
2314
2315         Needs more thought (Requested by ap on #webkit).
2316
2317         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2318
2319 2013-04-12  Tim Horton  <timothy_horton@apple.com>
2320
2321         REGRESSION (r138858): GIFs don't start playing when they come out of background tabs
2322         https://bugs.webkit.org/show_bug.cgi?id=108864
2323         <rdar://problem/13140489>
2324
2325         Reviewed by Antti Koivisto.
2326
2327         Don't repaint the world when animations resume; instead, FrameView
2328         will cause all animated images to repaint. This line also had no effect for
2329         TiledCoreAnimationDrawingArea, which does not implement setNeedsDisplay.
2330
2331         * WebProcess/WebPage/WebPage.cpp:
2332         (WebKit::WebPage::resumeActiveDOMObjectsAndAnimations):
2333
2334 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
2335
2336         <rdar://problem/13334446> [Mac] Tweak sandbox profile.
2337
2338         Apply a post-landing review comment.
2339
2340         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2341
2342 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
2343
2344         <rdar://problem/13334446> [Mac] Tweak sandbox profile.
2345
2346         Reviewed by Jessie Berlin.
2347
2348         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2349
2350 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2351
2352         [GTK] Split GtkAuthenticationDialog in two widgets
2353         https://bugs.webkit.org/show_bug.cgi?id=103644
2354
2355         Reviewed by Xan Lopez.
2356
2357         * GNUmakefile.list.am: Add new files to compilation.
2358         * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp: Removed.
2359         * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h: Removed.
2360         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: Added.
2361         (webkitAuthenticationDialogAuthenticate): Use the
2362         AuthenticationChallengeProxy to authenticate and destroy the dialog.
2363         (okButtonClicked): Call webkitAuthenticationDialogAuthenticate()
2364         with the credential.
2365         (cancelButtonClicked): Call
2366         webkitAuthenticationDialogAuthenticate() with a NULL credential to
2367         continue without credential.
2368         (webkitAuthenticationDialogInitialize): Build the UI.
2369         (webkitAuthenticationDialogDraw): Draw a background.
2370         (webkitAuthenticationDialogMap): Grab default button.
2371         (webkitAuthenticationDialogConstructed): Create a GtkStyleContext
2372         with the GtkWindow path to draw the widget background like a real
2373         dialog.
2374         (webkit_authentication_dialog_class_init):
2375         (webkitAuthenticationDialogNew): Create a new
2376         WebKitAuthenticationDialog widget.
2377         * UIProcess/API/gtk/WebKitAuthenticationDialog.h: Added.
2378         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
2379         * UIProcess/API/gtk/WebKitWebView.cpp:
2380         (webkitWebViewHandleAuthenticationChallenge): Create a
2381         WebKitAuthenticationDialog widget and pass add it to the
2382         container.
2383         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2384         (_WebKitWebViewBasePrivate): Updated to use the widget directly.
2385         (webkitWebViewChildIsInternalWidget): Ditto.
2386         (webkitWebViewBaseAddAuthenticationDialog): Ditto.
2387         (webkitWebViewBaseCancelAuthenticationDialog): Ditto.
2388         (webkitWebViewBaseContainerRemove): Ditto.
2389         (webkitWebViewBaseContainerForall): Ditto.
2390         (resizeWebKitWebViewBaseFromAllocation): Ditto.
2391         (webkitWebViewBaseFocus): Ditto.
2392         (webkitWebViewBaseDestroy): Destroy the auth widget is present.
2393         (webkit_web_view_base_class_init): Add implementation for
2394         GtkWidgetClass::destroy.
2395         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2396
2397 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2398
2399         [GTK] Web Process crash when the UI process finishes too early
2400         https://bugs.webkit.org/show_bug.cgi?id=112729
2401
2402         Reviewed by Anders Carlsson.
2403
2404         The problem is when creating the GSocket in the WorkQeue for the
2405         socket descriptor. GLib considers a programmer error to create a
2406         GSocket providing an invalid socket and finishes the process with
2407         g_error(). We are actually providing a valid socket when creating
2408         the GSocket, but it can be invalidated by the worker thread while
2409         the GSocket is being created. This is because
2410         registerEventSourceHandler is called from the main thread and
2411         unregisterEventSourceHandler can be called from the worker
2412         thread. We are currently registering two event handlers, one to
2413         read data from the socket and another one to close the CoreIPC
2414         connection when the socket connection is broken. Every event
2415         source registered uses its own GSocket (even if the file
2416         descriptor is actually the same), so that when the UI process
2417         finishes too early, the first event handler can be executed in the
2418         worker thread, closing the socket descriptor, while the main
2419         thread is creating the GSocket for the second one.
2420         We don't really need to use a separate event handler to monitor
2421         the connection, because GSocket always notifies when condition is
2422         G_IO_HUP and G_IO_ERR even if they haven't been explicitly set in
2423         g_socket_create_source(). We can register socket event sources
2424         differently, providing also a function to be called when the
2425         connection is closed, using a single socket and the same even source.
2426
2427         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
2428         (CoreIPC::Connection::platformInvalidate):
2429         (CoreIPC::Connection::open): Register a single socket event
2430         handler providing also a function to be called when the connection
2431         is closed.
2432         * Platform/WorkQueue.h:
2433         (WorkQueue):
2434         * Platform/gtk/WorkQueueGtk.cpp: The EventSource class has been
2435         split, moving everyting specific to socket event source to a
2436         derived class SocketEventSource.
2437         (WorkQueue::EventSource::EventSource):
2438         (WorkQueue::EventSource::performWork):
2439         (WorkQueue::EventSource::performWorkOnce):
2440         (WorkQueue::EventSource::performWorkOnTermination):
2441         (WorkQueue::EventSource::deleteEventSource):
2442         (WorkQueue::EventSource):
2443         (WorkQueue::SocketEventSource):
2444         (WorkQueue::SocketEventSource::SocketEventSource):
2445         (WorkQueue::SocketEventSource::cancel):
2446         (WorkQueue::SocketEventSource::didClose):
2447         (WorkQueue::SocketEventSource::checkCondition):
2448         (WorkQueue::SocketEventSource::eventCallback):
2449         (WorkQueue::registerSocketEventHandler):
2450         (WorkQueue::unregisterSocketEventHandler):
2451         (WorkQueue::dispatchOnSource):
2452
2453 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
2454
2455         <rdar://problem/13126204> [Mac] Tweak sandbox profile.
2456
2457         Reviewed by Anders Carlsson.
2458
2459         * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
2460         * WebProcess/com.apple.WebProcess.sb.in:
2461
2462 2013-04-12  Manuel Rego Casasnovas  <rego@igalia.com>
2463
2464         [GTK][WK2] Add document-loaded signal to WebKitWebPage
2465         https://bugs.webkit.org/show_bug.cgi?id=110614
2466
2467         Reviewed by Carlos Garcia Campos.
2468
2469         Add a new signal document-loaded to WebKitWebPage that will be emitted
2470         when the DOM document has been loaded for the main frame.
2471
2472         * UIProcess/API/gtk/tests/TestWebExtensions.cpp:
2473         (documentLoadedCallback):
2474         (testDocumentLoadedSignal):
2475         (beforeAll): Add test for document-loaded signal.
2476         * UIProcess/API/gtk/tests/WebExtensionTest.cpp:
2477         (documentLoadedCallback):
2478         (pageCreatedCallback):
2479         (methodCallCallback): Add new D-Bus signal DocumentLoaded in order to
2480         test document-loaded signal.
2481         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
2482         (webkit_web_page_class_init):
2483         (webkitWebPageCreate): Add document-loaded signal and emit it when
2484         didFinishDocumentLoadForFrame is called.
2485
2486 2013-04-12  Hanyee Kim  <choco@company100.net>
2487
2488         [GTK] Webkit fails to build webkit2gtk-tests-resources.gresource.
2489         https://bugs.webkit.org/show_bug.cgi?id=114485
2490
2491         Reviewed by Martin Robinson.
2492
2493         Generating webkit2gtk-tests-resources.gresource can be failed due to
2494         the non-existing target directory.
2495         We need to make target directory before generating it.
2496
2497         * UIProcess/API/gtk/tests/GNUmakefile.am:
2498
2499 2013-04-12  Andreas Kling  <akling@apple.com>
2500
2501         REGRESSION(r145869): Right-click on SWF contents displays the context menu at the wrong place.
2502         <http://webkit.org/b/113836>
2503         <rdar://problem/13587624>
2504
2505         Reviewed by Anders "Wesley Crusher" Carlsson.
2506
2507         Mac plugins expect flipped-Y screen coordinates, while DOM APIs speak in unflipped coordinates,
2508         and we were mixing them up in the window frame caching optimization.
2509
2510         Solve this by having the UIProcess send both flipped and unflipped window frames to the WebProcess.
2511         The flipped frame is passed on to plugins, and the unflipped frame is used for window.screenX/Y etc.
2512
2513         * UIProcess/API/mac/WKView.mm:
2514         (-[WKView _updateWindowAndViewFrames]):
2515
2516             No need to retrieve the window frame here as WebPageProxy::windowAndViewFramesChanged() will
2517             always override it anyway.
2518
2519         * UIProcess/mac/WebPageProxyMac.mm:
2520         (WebKit::WebPageProxy::windowAndViewFramesChanged):
2521         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2522         (WebKit::WebChromeClient::windowRect):
2523         * WebProcess/WebPage/WebPage.cpp:
2524         (WebKit::WebPage::windowAndViewFramesChanged):
2525         * WebProcess/WebPage/WebPage.h:
2526         (WebKit::WebPage::windowFrameInUnflippedScreenCoordinates):
2527         * WebProcess/WebPage/WebPage.messages.in:
2528
2529 2013-04-12  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2530
2531         [WK2][EFL] WebView: Add callbacks to the WKViewClient to handle page viewport update
2532         https://bugs.webkit.org/show_bug.cgi?id=110463
2533
2534         Reviewed by Anders Carlsson.
2535
2536         * UIProcess/efl/ViewClientEfl.h:
2537         (ViewClientEfl):
2538         * UIProcess/efl/WebView.cpp:
2539         (WebKit::WebView::didChangeViewportProperties):
2540         * UIProcess/efl/WebViewClient.cpp:
2541         (WebKit::WebViewClient::didChangeViewportAttributes):
2542         (WebKit):
2543         * UIProcess/efl/WebViewClient.h:
2544
2545             Added didChangeViewportAttributes callback to the WKViewClient to
2546             handle page viewport updates.
2547
2548         * CMakeLists.txt:
2549         * Shared/API/c/WKBase.h:
2550         * Shared/APIObject.h:
2551         * UIProcess/API/C/WKAPICast.h:
2552         (WebKit):
2553         * UIProcess/API/C/WKViewportAttributes.cpp: Added.
2554         (WKViewportAttributesGetTypeID):
2555         * UIProcess/API/C/WKViewportAttributes.h: Added.
2556         * UIProcess/API/C/efl/WKView.h:
2557         * UIProcess/WebViewportAttributes.cpp: Added.
2558         (WebKit):
2559         (WebKit::WebViewportAttributes::WebViewportAttributes):
2560         (WebKit::WebViewportAttributes::~WebViewportAttributes):
2561         * UIProcess/WebViewportAttributes.h: Added.
2562         (WebKit):
2563         (WebViewportAttributes):
2564         (WebKit::WebViewportAttributes::create):
2565         (WebKit::WebViewportAttributes::originalAttributes):
2566         (WebKit::WebViewportAttributes::type):
2567
2568             Added WKViewportAttributesRef - WK2 C API object that is wrapping 
2569             WebCore::ViewportAttributes structure and is passed in didChangeViewportAttributes
2570             WKViewClient callback.
2571
2572         * UIProcess/efl/ViewClientEfl.cpp:
2573         (WebKit::ViewClientEfl::didChangeViewportAttributes):
2574         (WebKit):
2575
2576             Added implementaion of didChangeViewportAttributes WKViewClient 
2577             callback so that existing EFL WK2 funtionality is kept.
2578
2579
2580 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2581
2582         [GTK] The style of visited links doesn't change in WebKit2
2583         https://bugs.webkit.org/show_bug.cgi?id=112175
2584
2585         Reviewed by Benjamin Poulain.
2586
2587         The problem is that visited links were not tracked by the web
2588         process. There's a web process initial parameter to set whether
2589         web process should track visited links or not and it's disabled by
2590         default.
2591
2592         * UIProcess/gtk/WebContextGtk.cpp:
2593         (WebKit::WebContext::platformInitializeWebProcess): Always set
2594         shouldTrackVisitedLinks to true.
2595
2596 2013-04-11  Tim Horton  <timothy_horton@apple.com>
2597
2598         REGRESSION (r146956): ASSERTion failure: WebKit::WebProcess::pageWillLeaveWindow
2599         https://bugs.webkit.org/show_bug.cgi?id=114481
2600         <rdar://problem/13534784>
2601
2602         Reviewed by Simon Fraser.
2603
2604         Inform the WebProcess of WebPages which are already in a window when created.
2605
2606         * WebProcess/WebPage/WebPage.cpp:
2607         (WebKit::WebPage::WebPage):
2608
2609 2013-04-11  Anders Carlsson  <andersca@apple.com>
2610
2611         Add support for clearing storage areas
2612         https://bugs.webkit.org/show_bug.cgi?id=114479
2613
2614         Reviewed by Beth Dakin.
2615
2616         * UIProcess/Storage/StorageManager.cpp:
2617         (WebKit::StorageManager::StorageArea::StorageArea):
2618         Store the quota size so we can recreate the underlying StorageMap when clearing.
2619         
2620         (WebKit::StorageManager::StorageArea::clear):
2621         Create a new storage map and dispatch events.
2622
2623         (WebKit::StorageManager::clear):
2624         Find the right storage area and call clear.
2625
2626         * UIProcess/Storage/StorageManager.messages.in:
2627         Add Clear message.
2628
2629         * WebProcess/Storage/StorageAreaImpl.cpp:
2630         (WebKit::StorageAreaImpl::clear):
2631         Call the storage map.
2632
2633         * WebProcess/Storage/StorageAreaMap.cpp:
2634         (WebKit::StorageAreaMap::clear):
2635         Reset the cached values and send a clear message.
2636
2637         (WebKit::StorageAreaMap::resetValues):
2638         New helper function.
2639
2640         (WebKit::StorageAreaMap::didClear):
2641         New stub.
2642
2643         * WebProcess/Storage/StorageAreaMap.messages.in:
2644         Add DidClear message.
2645
2646 2013-04-11  Beth Dakin  <bdakin@apple.com>
2647
2648         WebKit should set the header and footer layers' contentsScale when the device 
2649         scale factor changes
2650         https://bugs.webkit.org/show_bug.cgi?id=114471
2651         -and corresponding-
2652         <rdar://problem/13621288>
2653
2654         Reviewed by Simon Fraser.
2655
2656         Update the header and footer contentsScale when the device scale factor has 
2657         changed.
2658
2659         * WebProcess/WebPage/WebPage.cpp:
2660         (WebKit::WebPage::setDeviceScaleFactor):
2661         * WebProcess/WebPage/WebPage.h:
2662         * WebProcess/WebPage/mac/WebPageMac.mm:
2663         (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange):
2664
2665 2013-04-11  Anders Carlsson  <andersca@apple.com>
2666
2667         Implement removing storage area items
2668         https://bugs.webkit.org/show_bug.cgi?id=114472
2669
2670         Reviewed by Beth Dakin.
2671
2672         * UIProcess/Storage/StorageManager.cpp:
2673         (StorageManager::StorageArea):
2674         (WebKit::StorageManager::StorageArea::setItem):
2675         Rename connection to sourceConnection.
2676
2677         (WebKit::StorageManager::StorageArea::removeItem):
2678         Remove the item from the map and dispatch events if needed.
2679
2680         (WebKit::StorageManager::removeItem):
2681         Find the right storage area, remove the item and send back a DidRemoveItem message.
2682
2683         * UIProcess/Storage/StorageManager.messages.in:
2684         Add RemoveItem message.
2685
2686         * WebProcess/Storage/StorageAreaImpl.cpp:
2687         (WebKit::StorageAreaImpl::removeItem):
2688         Call StorageAreaMap::removeItem.
2689
2690         * WebProcess/Storage/StorageAreaMap.cpp:
2691         (WebKit::StorageAreaMap::removeItem):
2692         Send a RemoveItem message to the storage manager.
2693         
2694         (WebKit::StorageAreaMap::didRemoveItem):
2695         Add empty stub.
2696
2697         * WebProcess/Storage/StorageAreaMap.messages.in:
2698         Add DidRemoveItem message.
2699
2700 2013-04-11  Tim Horton  <timothy_horton@apple.com>
2701
2702         InjectedBundleNodeHandle::imageForRect doesn't respect device scale factor or highlighting option
2703         https://bugs.webkit.org/show_bug.cgi?id=114466
2704         <rdar://problem/13508513>
2705
2706         Reviewed by Simon Fraser.
2707
2708         Respect the device scale factor when creating the snapshot image.
2709         Clear the snapshot image before drawing into it.
2710         Respect SnapshotOptionsExcludeSelectionHighlighting.
2711
2712         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2713         (WebKit::imageForRect):
2714
2715 2013-04-11  Commit Queue  <rniwa@webkit.org>
2716
2717         Unreviewed, rolling out r148034, r148052, r148097, and
2718         r148194.
2719         http://trac.webkit.org/changeset/148034
2720         http://trac.webkit.org/changeset/148052
2721         http://trac.webkit.org/changeset/148097
2722         http://trac.webkit.org/changeset/148194
2723         https://bugs.webkit.org/show_bug.cgi?id=114463
2724
2725         broke mutiresolution favicons, among other things (Requested
2726         by thorton on #webkit).
2727
2728         * UIProcess/WebIconDatabase.cpp:
2729         (WebKit::WebIconDatabase::setIconDataForIconURL):
2730         * UIProcess/WebIconDatabase.h:
2731         (WebIconDatabase):
2732         * UIProcess/WebIconDatabase.messages.in:
2733         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
2734         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
2735         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2736         (WebKit::PDFPlugin::destroy):
2737
2738 2013-04-11  Anders Carlsson  <andersca@apple.com>
2739
2740         Implement StorageManager::getValues
2741         https://bugs.webkit.org/show_bug.cgi?id=114461
2742
2743         Reviewed by Beth Dakin.
2744
2745         * UIProcess/Storage/StorageManager.cpp:
2746         (WebKit::StorageManager::StorageArea::items):
2747         (WebKit::StorageManager::getValues):
2748         Return the items from the right storage area.
2749
2750 2013-04-11  Anders Carlsson  <andersca@apple.com>
2751
2752         Clean up related storage areas when a connection is destroyed
2753         https://bugs.webkit.org/show_bug.cgi?id=114459
2754
2755         Reviewed by Beth Dakin.
2756
2757         * UIProcess/Storage/StorageManager.cpp:
2758         (WebKit::StorageManager::processWillCloseConnection):
2759         Dispatch invalidateConnectionInternal on the work queue.
2760         
2761         (WebKit::StorageManager::createStorageMap):
2762         (WebKit::StorageManager::destroyStorageMap):
2763         Rename m_storageAreas to m_storageAreasByConnection.
2764
2765         (WebKit::StorageManager::invalidateConnectionInternal):
2766         Go over all known storage areas and remove this connection as a listener.
2767
2768         (WebKit::StorageManager::findStorageArea):
2769         Rename m_storageAreas to m_storageAreasByConnection.
2770
2771         * UIProcess/Storage/StorageManager.h:
2772         Rename m_storageAreas to m_storageAreasByConnection.
2773
2774 2013-04-11  Anders Carlsson  <andersca@apple.com>
2775
2776         Make StorageAreaMap dispatch session storage events
2777         https://bugs.webkit.org/show_bug.cgi?id=114454
2778
2779         Reviewed by Beth Dakin.
2780
2781         * WebProcess/Storage/StorageAreaMap.cpp:
2782         (WebKit::StorageAreaMap::dispatchStorageEvent):
2783         Depending on the storage area type, call dispatchSessionStorageEvent or dispatchLocalStorageEvent.
2784
2785         (WebKit::StorageAreaMap::dispatchSessionStorageEvent):
2786         Enumerate all the frames in our page and dispatch the event to the relevant ones.
2787
2788         (WebKit::StorageAreaMap::dispatchLocalStorageEvent):
2789         Add empty stub for now.
2790
2791 2013-04-11  Anders Carlsson  <andersca@apple.com>
2792
2793         Implement more logic in StorageAreaMap
2794         https://bugs.webkit.org/show_bug.cgi?id=114451
2795
2796         Reviewed by Alexey Proskuryakov.
2797
2798         * Platform/CoreIPC/HandleMessage.h:
2799         (CoreIPC::callMemberFunction):
2800         Add new overload.
2801
2802         * UIProcess/Storage/StorageManager.cpp:
2803         (WebKit::StorageManager::StorageArea::addListener):
2804         (WebKit::StorageManager::StorageArea::removeListener):
2805         These take storage map IDs.
2806
2807         (WebKit::StorageManager::StorageArea::setItem):
2808         Rename storageAreaID to sourceStorageAreaID.
2809
2810         (WebKit::StorageManager::StorageArea::dispatchEvents):
2811         Remove the code that would not dispatch to the source connection, there may still be storage areas interested in those events.
2812
2813         (WebKit::StorageManager::setItem):
2814         This now takes the source storage area ID.
2815
2816         (WebKit::StorageManager::findStorageArea):
2817         This takes a storage map ID.
2818
2819         * UIProcess/Storage/StorageManager.messages.in:
2820         SetItem now takes the source storage area ID as well.
2821
2822         * WebProcess/Storage/StorageAreaImpl.cpp:
2823         (WebKit::StorageAreaImpl::setItem):
2824         Pass the source frame to StorageAreaMap::setItem.
2825
2826         * WebProcess/Storage/StorageAreaMap.cpp:
2827         (WebKit::StorageAreaMap::StorageAreaMap):
2828         Send CreateStorageMap and add the object as a message receiver.
2829
2830         (WebKit::StorageAreaMap::~StorageAreaMap):
2831         Send DestroyStorageMap and remove the object as a message receiver.
2832
2833         (WebKit::StorageAreaMap::length):
2834         (WebKit::StorageAreaMap::key):
2835         (WebKit::StorageAreaMap::item):
2836         (WebKit::StorageAreaMap::contains):
2837         Load values and forward calls to the storage map.
2838
2839         (WebKit::StorageAreaMap::setItem):
2840         This now takes the source frame as well. Update the local storage map and send a SetItem message.
2841         
2842         (WebKit::StorageAreaMap::loadValuesIfNeeded):
2843         Get the values from the storage manager.
2844
2845         (WebKit::StorageAreaMap::dispatchStorageEvent):
2846         This now takes the source storage area ID.
2847
2848         * WebProcess/Storage/StorageAreaMap.messages.in:
2849         DispatchStorageEvent now takes the source storage area ID.
2850
2851 2013-04-10  Brady Eidson  <beidson@apple.com>
2852
2853         Web/Plugin process deadlock initializing async plugins.
2854         <rdar://problem/13525232> and https://bugs.webkit.org/show_bug.cgi?id=114217
2855
2856         Rubberstamped by Anders Carlsson.
2857
2858         Rollout r147953 and r147968 as we identified other causes for this.
2859
2860         * PluginProcess/WebProcessConnection.cpp:
2861         (WebKit::WebProcessConnection::createPluginAsynchronously):
2862         * WebProcess/Plugins/PluginProxy.messages.in:
2863
2864 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
2865
2866         Remove some ResourceHandle.h includes
2867         https://bugs.webkit.org/show_bug.cgi?id=114416
2868
2869         Reviewed by Ryosuke Niwa.
2870
2871         * WebProcess/Network/NetworkProcessConnection.cpp: Added an include that is now
2872         necessary.
2873
2874 2013-04-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2875
2876         [Qt] EventHandler should handle Space and BackSpace 
2877         https://bugs.webkit.org/show_bug.cgi?id=114428
2878
2879         Reviewed by Jocelyn Turcotte.
2880
2881         Remove our own handling of space and backspace.
2882
2883         * WebProcess/WebPage/qt/WebPageQt.cpp:
2884         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
2885
2886 2013-04-11  Csaba Osztrogonác  <ossy@webkit.org>
2887
2888         Unreviewed Qt buildfixes after r148147, r148148 and r148154.
2889
2890         * DerivedSources.pri:
2891         * Target.pri:
2892
2893 2013-04-10  Zan Dobersek  <zdobersek@igalia.com>
2894
2895         Unreviewed GTK build fix, fixing the WebKit2 build.
2896
2897         * GNUmakefile.list.am:
2898
2899 2013-04-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2900
2901         [WK2] Build warning in didReceiveMessage() generated by messages.py
2902         https://bugs.webkit.org/show_bug.cgi?id=112513
2903
2904         Reviewed by Anders Carlsson.
2905
2906         Legacy receiver makes -Wunused-parameter build warnings. This patch is to fix them.
2907
2908         * Scripts/webkit2/messages.py:
2909         (generate_message_handler):
2910
2911 2013-04-10  Jaehun Lim  <ljaehun.lim@samsung.com>
2912
2913         [CMAKE] Build fix after StorageArea refactoring
2914         https://bugs.webkit.org/show_bug.cgi?id=114398
2915
2916         Unreviewed build fix.
2917
2918         Change StorageAreaImpl.messages.in with StorageAreaMap.messages.in.
2919         Add StorageAreaMap.cpp in CMakeLists.txt.
2920
2921         * CMakeLists.txt:
2922
2923 2013-04-10  Anders Carlsson  <andersca@apple.com>
2924
2925         Make StorageAreaImpl a wrapper around StorageAreaMap
2926         https://bugs.webkit.org/show_bug.cgi?id=114404
2927
2928         Reviewed by Oliver Hunt.
2929
2930         Prepare for moving all the code that deals with local storage values to StorageAreaMap,
2931         and make StorageAreaImpl a dumb wrapper that simply calls through to the map.
2932
2933         * WebProcess/Storage/StorageAreaImpl.cpp:
2934         (WebKit::StorageAreaImpl::create):
2935         (WebKit::StorageAreaImpl::StorageAreaImpl):
2936         (WebKit::StorageAreaImpl::~StorageAreaImpl):
2937         (WebKit::StorageAreaImpl::storageType):
2938         (WebKit::StorageAreaImpl::length):
2939         (WebKit::StorageAreaImpl::key):
2940         (WebKit::StorageAreaImpl::getItem):
2941         (WebKit::StorageAreaImpl::setItem):
2942         (WebKit::StorageAreaImpl::contains):
2943         * WebProcess/Storage/StorageAreaImpl.h:
2944         (WebKit::StorageAreaImpl::storageAreaID):
2945         * WebProcess/Storage/StorageAreaMap.cpp:
2946         (WebKit::generateStorageMapID):
2947         (WebKit::StorageAreaMap::create):
2948         (WebKit::StorageAreaMap::StorageAreaMap):
2949         (WebKit::StorageAreaMap::storageType):
2950         (WebKit::StorageAreaMap::length):
2951         (WebKit::StorageAreaMap::key):
2952         (WebKit::StorageAreaMap::item):
2953         (WebKit::StorageAreaMap::setItem):
2954         (WebKit::StorageAreaMap::contains):
2955         (WebKit::StorageAreaMap::didSetItem):
2956         (WebKit::StorageAreaMap::dispatchStorageEvent):
2957         * WebProcess/Storage/StorageAreaMap.h:
2958         * WebProcess/Storage/StorageNamespaceImpl.cpp:
2959         (WebKit::StorageNamespaceImpl::storageArea):
2960         * WebProcess/Storage/StorageNamespaceImpl.h:
2961         (StorageNamespaceImpl):
2962
2963 2013-04-10  Anders Carlsson  <andersca@apple.com>
2964
2965         Rename StorageManager messages to refer to the StorageMap instead of the StorageArea
2966         https://bugs.webkit.org/show_bug.cgi?id=114401
2967
2968         Reviewed by Ryosuke Niwa.
2969
2970         * UIProcess/Storage/StorageManager.cpp:
2971         (WebKit::StorageManager::createStorageMap):
2972         (WebKit::StorageManager::destroyStorageMap):
2973         (WebKit::StorageManager::setItem):
2974         * UIProcess/Storage/StorageManager.h:
2975         * UIProcess/Storage/StorageManager.messages.in:
2976         * WebProcess/Storage/StorageAreaImpl.cpp:
2977         (WebKit::StorageAreaImpl::StorageAreaImpl):
2978         (WebKit::StorageAreaImpl::~StorageAreaImpl):
2979
2980 2013-04-10  Benjamin Poulain  <bpoulain@apple.com>
2981
2982         Mass remove all the empty directories
2983
2984         Rubberstamped by Ryosuke Niwa.
2985
2986         * Platform/CoreIPC/gtk: Removed.
2987         * Platform/CoreIPC/qt: Removed.
2988         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32: Removed.
2989         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64: Removed.
2990         * PluginProcess/gtk: Removed.
2991         * Shared/API/c/win: Removed.
2992         * Shared/Plugins/Netscape/win: Removed.
2993         * Shared/cg/win: Removed.
2994         * Shared/win: Removed.
2995         * UIProcess/API/C/win: Removed.
2996         * UIProcess/API/gtk/webkit: Removed.
2997         * UIProcess/Launcher/win: Removed.
2998         * UIProcess/Plugins/gtk: Removed.
2999         * UIProcess/Plugins/win: Removed.
3000         * UIProcess/texmap: Removed.
3001         * UIProcess/win: Removed.
3002         * WebProcess/Authentication/mac: Removed.
3003         * WebProcess/Cookies/efl: Removed.
3004         * WebProcess/Cookies/gtk: Removed.
3005         * WebProcess/Downloads/cf/win: Removed.
3006         * WebProcess/Downloads/cfnet: Removed.
3007         * WebProcess/Downloads/curl: Removed.
3008         * WebProcess/Downloads/efl: Removed.
3009         * WebProcess/Downloads/gtk: Removed.
3010         * WebProcess/Downloads/mac: Removed.
3011         * WebProcess/Downloads/qt: Removed.
3012         * WebProcess/Downloads/soup: Removed.
3013         * WebProcess/FullScreen/gtk: Removed.
3014         * WebProcess/FullScreen/mac: Removed.
3015         * WebProcess/FullScreen/qt: Removed.
3016         * WebProcess/FullScreen/win: Removed.
3017         * WebProcess/InjectedBundle/API/c/win: Removed.
3018         * WebProcess/InjectedBundle/win: Removed.
3019         * WebProcess/KeyValueStorage: Removed.
3020         * WebProcess/Network/CustomProtocols/mac: Removed.
3021         * WebProcess/Plugins/Netscape/gtk: Removed.
3022         * WebProcess/Plugins/Netscape/win: Removed.
3023         * WebProcess/WebCoreSupport/win: Removed.
3024         * WebProcess/WebPage/LayerTreeCoordinator: Removed.
3025         * WebProcess/WebPage/ca/mac: Removed.
3026         * WebProcess/WebPage/ca/win: Removed.
3027         * WebProcess/WebPage/win: Removed.
3028         * WebProcess/win: Removed.
3029         * qt/Resources: Removed.
3030
3031 2013-04-10  Jaehun Lim  <ljaehun.lim@samsung.com>
3032
3033         [CMAKE] Build fix after r148147, r148148
3034         https://bugs.webkit.org/show_bug.cgi?id=114395
3035
3036         Unreviewed build fix.
3037
3038         Use StorageAreaImpl, StorageNamespaceImpl instead of StorageAreaProxy, StorageNamespaceProxy.
3039
3040         * CMakeLists.txt:
3041
3042 2013-04-10  Anders Carlsson  <andersca@apple.com>
3043
3044         Add a stubbed out StorageAreaMap class
3045         https://bugs.webkit.org/show_bug.cgi?id=114392
3046
3047         Reviewed by Andreas Kling.
3048
3049         The intention is that StorageAreaMap is going to take over responsibility for storing the storage values in the
3050         web process, as well as dispatching events. A StorageAreaMap will be shared between multiple StorageAreaImpl objects,
3051         for example if multiple frames with the same origin use local storage.
3052
3053         * DerivedSources.make:
3054         * UIProcess/Storage/StorageManager.cpp:
3055         (WebKit::StorageManager::StorageArea::dispatchEvents):
3056         (WebKit::StorageManager::setItem):
3057         * WebKit2.xcodeproj/project.pbxproj:
3058         * WebProcess/Storage/StorageAreaImpl.cpp:
3059         (WebKit::StorageAreaImpl::StorageAreaImpl):
3060         (WebKit::StorageAreaImpl::~StorageAreaImpl):
3061         * WebProcess/Storage/StorageAreaMap.cpp: Added.
3062         (WebKit):
3063         (WebKit::StorageAreaMap::create):
3064         (WebKit::StorageAreaMap::StorageAreaMap):
3065         (WebKit::StorageAreaMap::~StorageAreaMap):
3066         (WebKit::StorageAreaMap::didSetItem):
3067         (WebKit::StorageAreaMap::dispatchStorageEvent):
3068         * WebProcess/Storage/StorageAreaMap.h: Added.
3069         (WebKit):
3070         (StorageAreaMap):
3071         * WebProcess/Storage/StorageAreaMap.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaImpl.messages.in.
3072
3073 2013-04-10  Anders Carlsson  <andersca@apple.com>
3074
3075         Rename StorageAreaProxy to StorageAreaImpl.
3076
3077         Rubber-stamped by Beth Dakin.
3078
3079         * DerivedSources.make:
3080         * UIProcess/Storage/StorageManager.cpp:
3081         (WebKit::StorageManager::StorageArea::dispatchEvents):
3082         (WebKit::StorageManager::setItem):
3083         * WebKit2.xcodeproj/project.pbxproj:
3084         * WebProcess/Storage/StorageAreaImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.cpp.
3085         * WebProcess/Storage/StorageAreaImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.h.
3086         * WebProcess/Storage/StorageAreaImpl.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.messages.in.
3087         * WebProcess/Storage/StorageNamespaceImpl.cpp:
3088         (WebKit::StorageNamespaceImpl::storageArea):
3089         * WebProcess/Storage/StorageNamespaceImpl.h:
3090         (WebKit):
3091         (StorageNamespaceImpl):
3092
3093 2013-04-10  Anders Carlsson  <andersca@apple.com>
3094
3095         Rename StorageNamespaceProxy to StorageNamespaceImpl.
3096
3097         Rubber-stamped by Beth Dakin.
3098
3099         * WebKit2.xcodeproj/project.pbxproj:
3100         * WebProcess/Storage/StorageAreaProxy.cpp:
3101         (WebKit::StorageAreaProxy::create):
3102         (WebKit::StorageAreaProxy::StorageAreaProxy):
3103         * WebProcess/Storage/StorageAreaProxy.h:
3104         (StorageAreaProxy):
3105         * WebProcess/Storage/StorageNamespaceImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.cpp.
3106         * WebProcess/Storage/StorageNamespaceImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.h.
3107         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3108         (WebKit::WebPlatformStrategies::sessionStorageNamespace):
3109
3110 2013-04-10  Tim Horton  <timothy_horton@apple.com>
3111
3112         [wk2] Un-pollute TCADA methods with "PageOverlayLayerMap::iterator end"
3113         https://bugs.webkit.org/show_bug.cgi?id=114387
3114
3115         Reviewed by Simon Fraser.
3116
3117         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3118         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
3119         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
3120         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3121         (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
3122         (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
3123         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
3124         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
3125
3126 2013-04-10  Tim Horton  <timothy_horton@apple.com>
3127
3128         [wk2] REGRESSION: Find highlight does not update when the view is resized
3129         https://bugs.webkit.org/show_bug.cgi?id=114382
3130         <rdar://problem/13599797>
3131
3132         Reviewed by Simon Fraser.
3133
3134         Invalidate the page overlays from TiledCoreAnimationDrawingArea::updateGeometry.
3135         This will have no effect if the page overlay hasn't previously asked to be painted
3136         (as drawsContent will remain false on the layer).
3137
3138         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3139         (TiledCoreAnimationDrawingArea): Add invalidateAllPageOverlays.
3140         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3141         (WebKit::TiledCoreAnimationDrawingArea::invalidateAllPageOverlays): Factor this out of didChangeScrollOffsetForAnyFrame.
3142         (WebKit::TiledCoreAnimationDrawingArea::didChangeScrollOffsetForAnyFrame): Call invalidateAllPageOverlays.
3143         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Call invalidateAllPageOverlays.
3144
3145 2013-04-10  Beth Dakin  <bdakin@apple.com>
3146
3147         FindBanner matches are offset when the WKView has a header or footer
3148         https://bugs.webkit.org/show_bug.cgi?id=114314
3149         -and corresponding-
3150         <rdar://problem/13522434>
3151
3152         Reviewed by Simon Fraser.
3153
3154         When calculating the matching rects, also adjust to the scroll offset that is  
3155         relative to the Document.
3156         * WebProcess/WebPage/FindController.cpp:
3157         (WebKit::FindController::rectsForTextMatches):
3158
3159 2013-04-10  Tobias Mueller  <tobiasmue@gnome.org>
3160
3161         Fixed build failure in Plugin.h: FloatPoint was not in namespace WebCore
3162
3163         make[1]: *** Waiting for unfinished jobs....
3164         In file included from Source/WebKit2/PluginProcess/PluginCreationParameters.h:31:0,
3165                          from Source/WebKit2/PluginProcess/PluginCreationParameters.cpp:27:
3166         ./Source/WebKit2/WebProcess/Plugins/Plugin.h:268:58: error: 'FloatPoint' in namespace 'WebCore' does not name a type
3167         ./Source/WebKit2/WebProcess/Plugins/Plugin.h:268:77: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
3168         cc1plus: warning: unrecognized command line option "-Wno-c++11-extensions" [enabled by default]
3169         make[1]: *** [Source/WebKit2/PluginProcess/libwebkit2gtk_3_0_la-PluginCreationParameters.lo] Error 1
3170
3171         It now passes that make target.
3172
3173         https://bugs.webkit.org/show_bug.cgi?id=111862
3174
3175         Reviewed by Darin Adler.
3176
3177         * WebProcess/Plugins/Plugin.h:
3178         (WebCore): Added FloatPoint to the WebCore namespace
3179
3180 2013-04-08  Anders Carlsson  <andersca@apple.com>
3181
3182         Remove unneeded headers from FrameLoader.h
3183         https://bugs.webkit.org/show_bug.cgi?id=114223
3184
3185         Reviewed by Geoffrey Garen.
3186
3187         Include HistoryController.h from WebCore.
3188
3189         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
3190         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3191         * WebProcess/WebPage/WebPage.cpp:
3192
3193 2013-04-09  Geoffrey Garen  <ggaren@apple.com>
3194
3195         Removed bitrotted TimeoutChecker code
3196         https://bugs.webkit.org/show_bug.cgi?id=114336
3197
3198         Reviewed by Alexey Proskuryakov.
3199
3200         This mechanism hasn't worked for a while.
3201
3202         MarkL is working on a new version of this feature with a distinct
3203         implementation.
3204
3205         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3206         (WebKit::NPJSObject::construct):
3207         (WebKit::NPJSObject::invoke):
3208         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3209         (WebKit::NPRuntimeObjectMap::evaluate):
3210
3211 2013-04-09  Mark Rowe  <mrowe@apple.com>
3212
3213         <rdar://problem/13617144> WKNavigationData needs to expose the destination of the navigation
3214
3215         Introduce WKNavigationDataCopyNavigationDestinationURL to access the destination of the navigation.
3216
3217         Reviewed by Dan Bernstein.
3218
3219         * UIProcess/API/C/WKNavigationData.cpp:
3220         (WKNavigationDataCopyURL): Add a note about returning the URL from the original request for sake of
3221         backwards-compatibility.
3222         (WKNavigationDataCopyNavigationDestinationURL): Return the URL from our underlying WebNavigationDataStore.
3223         * UIProcess/API/C/WKNavigationData.h:
3224         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3225         (WebKit::WebFrameLoaderClient::updateGlobalHistory): Store the current URL in to the WebNavigationDataStore
3226         object. WKNavigationData can retrieve the value that we were previously storing here via the originalRequest.
3227
3228 2013-04-09  Mark Rowe  <mrowe@apple.com>
3229
3230         <rdar://problem/13617104> WKPageCopySessionState needs to provide more context to the filter callback
3231
3232         Introduce a new value type for WKPageSessionStateFilterCallback that represents the passing
3233         of whole WKBackForwardListItemRefs to the filter callback. This allows clients to consider
3234         more than the original URL of the item when filtering entries from the session state.
3235
3236         Reviewed by Darin Adler.
3237
3238         * UIProcess/API/C/WKPage.cpp:
3239         (WKPageGetSessionBackForwardListItemValueType): Return a static string representing our new value type.
3240         * UIProcess/API/C/WKPage.h:
3241         * UIProcess/cf/WebBackForwardListCF.cpp:
3242         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Call the filter function with each of the
3243         possible value types in turn, respecting the first false value, if any, that is returned.
3244
3245 2013-04-10  Anton Obzhirov  <a.obzhirov@samsung.com>
3246
3247         [GTK] Add support for Page Visibility
3248         https://bugs.webkit.org/show_bug.cgi?id=97324
3249
3250         Reviewed by Sam Weinig.
3251
3252         Added new unittest to test page visibility using GTK Widget visibility API.
3253
3254         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3255         (testWebViewPageVisibility):
3256         (beforeAll):
3257         * UIProcess/API/gtk/tests/WebViewTest.cpp:
3258         (WebViewTest::showInWindow):
3259         * UIProcess/API/gtk/tests/WebViewTest.h:
3260
3261 2013-04-10  Zan Dobersek  <zdobersek@igalia.com>
3262
3263         REGRESSION (r146518): WebKit2APITests/TestInspector is failing
3264         https://bugs.webkit.org/show_bug.cgi?id=113281
3265
3266         Reviewed by Darin Adler.
3267
3268         Changes to the WebInspectorProxy opening processing in r146518 caused the change in how the GTK-specific
3269         WebInspectorProxy code operates, specifically the 'bring-to-front' signal is not emitted anymore when opening the
3270         inspector due to the WebInspectorProxy::bringToFront method now only bringing the inspector window to front if it exists
3271         and opening it (and thus unable to bring it to front) otherwise.
3272
3273         Closing of the inspector through the didClose method is now done immediately after sending the WebInspector::Close()
3274         message to the WebProcess rather than waiting for the WebProcess to communicate back the order of closing. Due to this
3275         the relevant code in the test cases had to be changed to not run the loop but rather just check that the closing was
3276         successful.
3277
3278         (InspectorTest::InspectorTest): Remove the initialization of the now redundant m_quitOnBringToFront member variable.
3279         (InspectorTest::bringToFront): Quit the loop without checking the removed member variable.
3280         (InspectorTest::closed): Do not quit the loop as it is not run anymore.
3281         (InspectorTest::showIdle): A helper method that asynchronously calls the webkit_web_inspector_show method, removing some
3282         unnecessary complexity about under what exact circumstances to quit the loop in open-window/bring-to-front callbacks.
3283         (InspectorTest::show): Replaces the showAndWaitUntilFinished method, adding an idle invocation of the showIdle helper
3284         method and running the loop.
3285         (InspectorTest::close): Formerly closeAndWaitUntilClosed, now does not run the loop anymore as there's no need for it.
3286         (testInspectorDefault): Only the window opening event is now expected upon showing the inspector for the first time.
3287         Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of
3288         InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished.
3289         (CustomInspectorTest::destroyWindow): Formerly destroyWindowAndWaitUntilClosed, the closing is not asynchronous anymore
3290         so the loop is not run.
3291         (testInspectorManualAttachDetach): Only the window opening event is now expected upon showing the inspector for the first time.
3292         Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of
3293         InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished.
3294         (testInspectorCustomContainerDestroyed): Adjusting callsites to use InspectorTest::show and CustomInspectorTest::destroyWindow
3295         instead of InspectorTest::showAndWaitUntilFinished and CustomInspectorTest::destroyWindowAndWaitUntilClosed.
3296         * UIProcess/WebInspectorProxy.cpp:
3297         (WebKit::WebInspectorProxy::show): When showing a connected WebInspectorProxy, call the bringToFront method which will
3298         open the inspector if it's not yet visible or bring it to the front otherwise. 
3299
3300 2013-04-10  Zan Dobersek  <zandobersek@gmail.com>
3301
3302         [GTK][WK2] Implement WebInspectorProxy::platformInspectedWindowWidth
3303         https://bugs.webkit.org/show_bug.cgi?id=113498
3304
3305         Reviewed by Martin Robinson.
3306
3307         The method was introduced in r147004.
3308
3309         * UIProcess/API/gtk/tests/TestInspector.cpp: Specify the gMinimumAttachedInspectorWidth variable, reflecting the value
3310         of WebInspectorProxy::minimumAttachedWidth. Use it as the width to which the inspected view should be resized in
3311         InspectorTest::resizeViewAndAttach.
3312         * UIProcess/gtk/WebInspectorProxyGtk.cpp:
3313         (WebKit::WebInspectorProxy::platformInspectedWindowHeight): Use the gtk_widget_get_allocated_height method to return the
3314         widget height.
3315         (WebKit::WebInspectorProxy::platformInspectedWindowWidth): Newly implemented, similarly uses the
3316         gtk_widget_get_allocated_width method to return the widget width.
3317
3318 2013-04-09  Antoine Quint  <graouts@apple.com>
3319
3320         WKFrameIsDisplayingMarkupDocument should return true for Web Archives
3321         https://bugs.webkit.org/show_bug.cgi?id=114291
3322
3323         Reviewed by Dean Jackson.
3324
3325         Also return true for the Web Archive MIME type since a Web Archive
3326         is displaying a markup document by nature.
3327
3328         * UIProcess/WebFrameProxy.cpp:
3329         (WebKit::WebFrameProxy::isDisplayingMarkupDocument):
3330
3331 2013-04-09  Anders Carlsson  <andersca@apple.com>
3332
3333         REGRESSION (r147454): Youtube annotation links to new window broken
3334         https://bugs.webkit.org/show_bug.cgi?id=114242
3335         <rdar://problem/13609940>
3336
3337         Reviewed by Beth Dakin.
3338
3339         Set the current user gesture to "DefinitelyProcessingNewUserGesture" if popups are allowed.
3340
3341         * WebProcess/Plugins/PluginView.cpp:
3342         (WebKit::PluginView::performFrameLoadURLRequest):
3343
3344 2013-04-09  Anders Carlsson  <andersca@apple.com>
3345
3346         If we fail to decode a message name, pass the message length as the name
3347         https://bugs.webkit.org/show_bug.cgi?id=114305
3348         <rdar://problem/13605703>
3349
3350         Reviewed by Sam Weinig.
3351
3352         * Platform/CoreIPC/ArgumentDecoder.h:
3353         (CoreIPC::ArgumentDecoder::length):
3354         * Platform/CoreIPC/Connection.cpp:
3355         (CoreIPC::Connection::processIncomingMessage):
3356
3357 2013-04-08  Dean Jackson  <dino@apple.com>
3358
3359         Don't create another plugin process for restarted plugins
3360         https://bugs.webkit.org/show_bug.cgi?id=114233
3361
3362         Reviewed by Geoff Garen.
3363
3364         A snapshotting plugin starts in a separate process from
3365         regular plugins. This can be a little confusing to users
3366         because they might see two plugin processes. We can set
3367         the minimum life and timeout on the snapshotting process
3368         to much smaller values, since the process doesn't need
3369         to live that long. This will reduce some potential
3370         confusion. Also, since there is another plugin process
3371         running real plugins, it should be paged in if it needs
3372         to restart.
3373
3374         There was, however, a bug in the process management. A