f429699f676398199ff5f89a6d95d5adba07ab21
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-07-18  Tim Horton  <timothy_horton@apple.com>
2
3         Remove PDFViewController and WKView "custom representations"
4         https://bugs.webkit.org/show_bug.cgi?id=118720
5
6         Reviewed by Alexey Proskuryakov.
7
8         PDFViewController was the only implementation of
9         a "custom representation" for a WKView. As it has
10         been superceded by PDFPlugin, we can remove both
11         PDFViewController and the notion of a WKView custom
12         representation.
13
14         * UIProcess/API/gtk/PageClientImpl.cpp:
15         * UIProcess/API/gtk/PageClientImpl.h:
16         * UIProcess/API/mac/PDFViewController.h: Removed.
17         * UIProcess/API/mac/PDFViewController.mm: Removed.
18         * UIProcess/API/mac/PageClientImpl.h:
19         * UIProcess/API/mac/PageClientImpl.mm:
20         * UIProcess/API/mac/WKView.mm:
21         (-[WKView accessibilityFocusedUIElement]):
22         (-[WKView accessibilityHitTest:]):
23         (-[WKView accessibilityAttributeValue:]):
24         (-[WKView printOperationWithPrintInfo:forFrame:]):
25         * UIProcess/API/mac/WKViewInternal.h:
26         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
27         * UIProcess/CoordinatedGraphics/WebView.cpp:
28         * UIProcess/CoordinatedGraphics/WebView.h:
29         * UIProcess/DrawingAreaProxy.h:
30         * UIProcess/DrawingAreaProxyImpl.cpp:
31         * UIProcess/DrawingAreaProxyImpl.h:
32         * UIProcess/PageClient.h:
33         * UIProcess/WebPageProxy.cpp:
34         (WebKit::WebPageProxy::WebPageProxy):
35         (WebKit::WebPageProxy::supportsTextEncoding):
36         (WebKit::WebPageProxy::supportsTextZoom):
37         (WebKit::WebPageProxy::setTextZoomFactor):
38         (WebKit::WebPageProxy::setPageZoomFactor):
39         (WebKit::WebPageProxy::setPageAndTextZoomFactors):
40         (WebKit::WebPageProxy::findString):
41         (WebKit::WebPageProxy::countStringMatches):
42         (WebKit::WebPageProxy::didCommitLoadForFrame):
43         * UIProcess/WebPageProxy.h:
44         (WebKit::WebPageProxy::textZoomFactor):
45         (WebKit::WebPageProxy::pageZoomFactor):
46         * UIProcess/WebPageProxy.messages.in:
47         * UIProcess/qt/QtPageClient.h:
48         * WebKit2.xcodeproj/project.pbxproj:
49         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
50         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
51         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
52         (WebKit::WebFrameLoaderClient::committedLoad):
53         (WebKit::WebFrameLoaderClient::finishedLoading):
54         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
55         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
56         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
57         * WebProcess/WebPage/DrawingArea.h:
58         * WebProcess/WebPage/DrawingArea.messages.in:
59         * WebProcess/WebPage/DrawingAreaImpl.cpp:
60         (WebKit::DrawingAreaImpl::setNeedsDisplayInRect):
61         (WebKit::DrawingAreaImpl::scroll):
62         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
63         (WebKit::DrawingAreaImpl::display):
64         * WebProcess/WebPage/DrawingAreaImpl.h:
65         * WebProcess/WebPage/WebPage.cpp:
66         * WebProcess/WebPage/WebPage.h:
67         * WebProcess/WebPage/mac/WebPageMac.mm:
68         (WebKit::WebPage::platformPreferencesDidChange):
69         * mac/WebKit2.order:
70
71 2013-07-18  Dong-Gwan Kim  <donggwan.kim@samsung.com>
72
73         [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_color_picker.cpp
74         https://bugs.webkit.org/show_bug.cgi?id=118797
75
76         Reviewed by Christophe Dumez.
77
78         Some mouseClick methods are used in test_ewk2_color_picker.cpp.
79         But it is difficult to understand what they mean.
80         So i would like to replace those with more meaningful method for readability.
81
82         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
83         (EWK2ColorPickerTest::clickButton):
84         (TEST_F):
85
86 2013-07-18  Eunmi Lee  <eunmi15.lee@samsung.com>
87
88         [WK2] Replace getRect() to pixelSnappedBoundingBox().
89         https://bugs.webkit.org/show_bug.cgi?id=118588
90
91         Reviewed by Noam Rosenthal.
92
93         The Node::getRect() function was removed in the
94         http://trac.webkit.org/changeset/128006, so use
95         pixelSnappedBoundingBox() instead.
96
97         * WebProcess/WebPage/WebPage.cpp:
98         (WebKit::WebPage::findZoomableAreaForPoint):
99
100 2013-07-18  Dong-Gwan Kim  <donggwan.kim@samsung.com>
101
102         [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_context_menu.cpp
103         https://bugs.webkit.org/show_bug.cgi?id=118796
104
105         Reviewed by Christophe Dumez.
106
107         Some mouseClick methods are used in test_ewk2_context_menu.cpp.
108         But it is difficult to understand what they mean.
109         So i would like to replace those with more meaningful method for readability.
110
111         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
112         (EWK2ContextMenuTest::testContextMenu):
113         (EWK2ContextMenuTest::testContextMenuForRemoveAndAppend):
114         (EWK2ContextMenuTest::testContextMenuForSubmenu):
115         (EWK2ContextMenuTest::finishTest):
116         (EWK2ContextMenuTest::showContextMenu):
117         (TEST_F):
118
119 2013-07-18  Dong-Gwan Kim  <donggwan.kim@samsung.com>
120
121         [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_file_chooser_request.cpp
122         https://bugs.webkit.org/show_bug.cgi?id=118792
123
124         Reviewed by Christophe Dumez.
125
126         Some mouseClick methods are used in test_ewk2_file_chooser_request.cpp.
127         But it is difficult to understand what they mean.
128         So i would like to replace those with more meaningful method for readability.
129
130         * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp:
131         (EWK2FileChooserRequestTest::clickFileInput):
132         (TEST_F):
133
134 2013-07-18  Dong-Gwan Kim  <donggwan.kim@samsung.com>
135
136         [EFL][WK2] Move all the static methods into EWK2TextCheckerTest in test_ewk2_text_checker.cpp
137         https://bugs.webkit.org/show_bug.cgi?id=118790
138
139         Reviewed by Christophe Dumez.
140
141         All the static methods should be moved to EWK2TextCheckerTest.
142
143         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
144         (EWK2TextCheckerTest::resetCallbacksExecutionStats):
145         (EWK2TextCheckerTest::onTimeout):
146         (EWK2TextCheckerTest::onSettingChange):
147         (EWK2TextCheckerTest::onSpellDocumentTag):
148         (EWK2TextCheckerTest::onSpellDocumentTagClose):
149         (EWK2TextCheckerTest::onSpellingCheck):
150         (EWK2TextCheckerTest::onSpellingForKnownWord):
151         (EWK2TextCheckerTest::onWordGuesses):
152         (EWK2TextCheckerTest::onWordLearn):
153         (EWK2TextCheckerTest::onWordIgnore):
154         (EWK2TextCheckerTest::findContextMenuItem):
155         (EWK2TextCheckerTest::checkCorrectnessOfSpellingItems):
156         (EWK2TextCheckerTest::toogleCheckSpellingWhileTyping):
157         (EWK2TextCheckerTest::checkClientSuggestionsForWord):
158         (EWK2TextCheckerTest::selectLearnSpelling):
159         (EWK2TextCheckerTest::selectIgnoreSpelling):
160         (EWK2TextCheckerTest::countContextMenuItems):
161         (EWK2TextCheckerTest::clickButton):
162         (EWK2TextCheckerTest::showContextMenu):
163         (EWK2TextCheckerTest::selectFirstWord):
164
165 2013-07-17  Tim Horton  <timothy_horton@apple.com>
166
167         Update blocked/missing plug-in UI
168         https://bugs.webkit.org/show_bug.cgi?id=118347
169         <rdar://problem/14209318>
170
171         Reviewed by Sam Weinig.
172
173         * Platform/CoreIPC/HandleMessage.h:
174         (CoreIPC::callMemberFunction):
175         Add a 6 argument -> 4 reply message handler.
176         (It seems that FindPlugin is getting a little out of hand.)
177
178         * Shared/APIClientTraits.cpp:
179         * Shared/APIClientTraits.h:
180         * UIProcess/API/C/WKPage.h:
181         * UIProcess/WebLoaderClient.cpp:
182         (WebKit::WebLoaderClient::pluginLoadPolicy):
183         * UIProcess/WebLoaderClient.h:
184         Add an unavailability description out-argument to a new version of
185         pluginLoadPolicy, so clients can override the text of the unavailable
186         plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits.
187
188         * UIProcess/WebPageProxy.cpp:
189         (WebKit::WebPageProxy::findPlugin):
190         * UIProcess/WebPageProxy.h:
191         * UIProcess/WebPageProxy.messages.in:
192         Plumb the unavailability description through to the WebProcess via
193         the FindPlugin message.
194
195         * WebProcess/WebPage/WebPage.cpp:
196         (WebKit::WebPage::createPlugin):
197         Acquire the unavailability description from the client
198         (via FindPlugin) and hand it to the RenderEmbeddedObject.
199
200 2013-07-17  Commit Queue  <commit-queue@webkit.org>
201
202         Unreviewed, rolling out r152701, r152703, r152739, r152754,
203         and r152756.
204         http://trac.webkit.org/changeset/152701
205         http://trac.webkit.org/changeset/152703
206         http://trac.webkit.org/changeset/152739
207         http://trac.webkit.org/changeset/152754
208         http://trac.webkit.org/changeset/152756
209         https://bugs.webkit.org/show_bug.cgi?id=118821
210
211         this was a buggy fix and we're going to try something
212         different (Requested by thorton on #webkit).
213
214         * Platform/CoreIPC/HandleMessage.h:
215         * Shared/APIClientTraits.cpp:
216         * Shared/APIClientTraits.h:
217         * UIProcess/API/C/WKPage.h:
218         * UIProcess/WebLoaderClient.cpp:
219         (WebKit::WebLoaderClient::pluginLoadPolicy):
220         * UIProcess/WebLoaderClient.h:
221         * UIProcess/WebPageProxy.cpp:
222         (WebKit::WebPageProxy::findPlugin):
223         * UIProcess/WebPageProxy.h:
224         * UIProcess/WebPageProxy.messages.in:
225         * WebProcess/Plugins/PluginProcessConnection.cpp:
226         (WebKit::PluginProcessConnection::didClose):
227         * WebProcess/Plugins/PluginView.cpp:
228         (WebKit::PluginView::pluginProcessCrashed):
229         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
230         (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton):
231         * WebProcess/WebCoreSupport/WebChromeClient.h:
232         * WebProcess/WebPage/WebPage.cpp:
233         (WebKit::WebPage::createPlugin):
234         (WebKit::WebPage::canPluginHandleResponse):
235
236 2013-07-17  Alexey Proskuryakov  <ap@apple.com>
237
238         [Mac] Crashes in CFURLGetBytes under WebProcess::updateActivePages()
239         https://bugs.webkit.org/show_bug.cgi?id=118814
240         <rdar://problem/14173389>
241
242         Reviewed by Brady Eidson.
243
244         Speculative fix. It's unclear how we end up with an invalid URL when committing
245         a load.
246
247         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
248         Added a null check.
249
250 2013-07-17  Commit Queue  <commit-queue@webkit.org>
251
252         Unreviewed, rolling out r152786 and r152789.
253         http://trac.webkit.org/changeset/152786
254         http://trac.webkit.org/changeset/152789
255         https://bugs.webkit.org/show_bug.cgi?id=118807
256
257         overly platform specific and dirty API (and Sam says no)
258         (Requested by thorton on #webkit).
259
260         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
261         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
262         * WebProcess/WebPage/PageOverlay.cpp:
263         * WebProcess/WebPage/PageOverlay.h:
264         * WebProcess/WebPage/WebPage.cpp:
265         * WebProcess/WebPage/WebPage.h:
266         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
267
268 2013-07-17  Tim Horton  <timothy_horton@apple.com>
269
270         AX: VoiceOver not working with data detection page overlays
271         https://bugs.webkit.org/show_bug.cgi?id=118680
272
273         Reviewed by Anders Carlsson.
274
275         Bump the API version after r152786.
276
277         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
278
279 2013-07-17  Simon Cooper  <scooper@apple.com>
280
281         YouTube webcam capture (Flash Plug-in) in Safari can't see built-in camera
282         https://bugs.webkit.org/show_bug.cgi?id=118787
283         <rdar://problem/14418799>
284
285         Reviewed by Alexey Proskuryakov.
286
287         Add support for built-in cameras, including the original iSight.
288
289         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
290         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
291
292 2013-07-17  Chris Fleizach  <cfleizach@apple.com>
293
294         AX: VoiceOver not working with data detection page overlays
295         https://bugs.webkit.org/show_bug.cgi?id=118680
296
297         Reviewed by Tim Horton.
298
299         Expose API methods so that a client implementing data detectors is able to respond
300         to the needs of accessibility clients like VoiceOver.
301
302         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
303         (PageOverlayClientImpl::supportsDataDetection):
304         (PageOverlayClientImpl::dataDetectorExistsAtPoint):
305         (PageOverlayClientImpl::dataDetectorCopyTypeAtPoint):
306         (PageOverlayClientImpl::showDataDetectorMenuAtPoint):
307         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
308         * WebProcess/WebPage/PageOverlay.cpp:
309         (WebKit::PageOverlay::supportsDataDetection):
310         (WebKit::PageOverlay::dataDetectorExistsAtPoint):
311         (WebKit::PageOverlay::dataDetectorCopyTypeAtPoint):
312         (WebKit::PageOverlay::dataDetectorOpenMenuAtPoint):
313         * WebProcess/WebPage/PageOverlay.h:
314         (WebKit::PageOverlay::Client::supportsDataDetection):
315         (WebKit::PageOverlay::Client::dataDetectorExistsAtPoint):
316         (WebKit::PageOverlay::Client::dataDetectorCopyTypeAtPoint):
317         (WebKit::PageOverlay::Client::showDataDetectorMenuAtPoint):
318         * WebProcess/WebPage/WebPage.cpp:
319         (WebKit::WebPage::pageOverlayOpenDataDetectorMenuAtPoint):
320         (WebKit::WebPage::pageOverlayDataDetectorCopyTypeAtPoint):
321         (WebKit::WebPage::pageOverlayDataDetectorExistsAtPoint):
322         (WebKit::WebPage::pageOverlaySupportsDataDetection):
323         * WebProcess/WebPage/WebPage.h:
324         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
325         (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
326         (-[WKAccessibilityWebPageObject _convertScreenPointToWindow:]):
327         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
328
329 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
330
331         [EFL][WK2] EWK2CookieManagerTest should be defined by inheriting from EWK2UnitTestBase.
332         https://bugs.webkit.org/show_bug.cgi?id=118721
333
334         Reviewed by Christophe Dumez.
335
336         It should be defined as relevant test class specific to each test file for more readability.
337         It could be helpful to remove unnecessary static methods.
338
339         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
340         (compareHostNames):
341         (onCookiesChanged):
342         (EWK2CookieManagerTest::getAcceptPolicy):
343         (EWK2CookieManagerTest::getHostnamesWithCookies):
344         (EWK2CookieManagerTest::freeHostNames):
345         (EWK2CookieManagerTest::countHostnamesWithCookies):
346         (TEST_F):
347
348 2013-07-16  Balazs Kelemen  <kbalazs@webkit.org>
349
350         [CMake] Undefined references should be detected at build time
351         https://bugs.webkit.org/show_bug.cgi?id=110236
352
353         Reviewed by Christophe Dumez.
354
355         Add library dependencies that were not defined explicitly before.
356
357         * CMakeLists.txt:
358         * PlatformEfl.cmake:
359
360 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
361
362         [EFL][WK2] EWK2WindowFeaturesTest should be defined by inheriting from EWK2UnitTestBase.
363         https://bugs.webkit.org/show_bug.cgi?id=118780
364
365         Reviewed by Christophe Dumez.
366
367         It should be defined as relevant test class specific to each test file for more readability.
368         It could be helpful to remove unnecessary static methods.
369
370         * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
371         (EWK2WindowFeaturesTest::createDefaultWindow):
372         (EWK2WindowFeaturesTest::createWindow):
373         (TEST_F):
374
375 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
376
377         [EFL][WK2] EWK2ViewTest should be defined by inheriting from EWK2UnitTestBase.
378         https://bugs.webkit.org/show_bug.cgi?id=118779
379
380         Reviewed by Christophe Dumez.
381
382         It should be defined as relevant test class specific to each test file for more readability.
383         It could be helpful to remove unnecessary static methods.
384
385         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
386         (EWK2ViewTest::onLoadFinishedForRedirection):
387         (EWK2ViewTest::serverCallbackNavigation):
388         (EWK2ViewTest::onFormAboutToBeSubmitted):
389         (EWK2ViewTest::fullScreenCallback):
390         (EWK2ViewTest::fullScreenExitCallback):
391         (EWK2ViewTest::checkAlert):
392         (EWK2ViewTest::checkConfirm):
393         (EWK2ViewTest::checkPrompt):
394         (EWK2ViewTest::onTextFound):
395         (EWK2ViewTest::onVibrate):
396         (EWK2ViewTest::onCancelVibration):
397         (EWK2ViewTest::loadVibrationHTMLString):
398         (EWK2ViewTest::onContentsSizeChangedPortrait):
399         (EWK2ViewTest::onContentsSizeChangedLandscape):
400         (EWK2ViewTest::PageContentsAsMHTMLCallback):
401         (EWK2ViewTest::PageContentsAsStringCallback):
402         (TEST_F):
403
404 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
405
406         [EFL][WK2] EWK2StorageManagerTest should be defined by inheriting from EWK2UnitTestBase.
407         https://bugs.webkit.org/show_bug.cgi?id=118777
408
409         Reviewed by Christophe Dumez.
410
411         It should be defined as relevant test class specific to each test file for more readability.
412         It could be helpful to remove unnecessary static methods.
413
414         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
415         (EWK2StorageManagerTest::OriginData::OriginData):
416         (EWK2StorageManagerTest::getStorageOriginsCallback):
417         (EWK2StorageManagerTest::timerCallback):
418         (EWK2StorageManagerTest::checkOrigin):
419         (TEST_F):
420
421 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
422
423         [EFL][WK2] EWK2PopupMenuTest should be defined by inheriting from EWK2UnitTestBase.
424         https://bugs.webkit.org/show_bug.cgi?id=118775
425
426         Reviewed by Christophe Dumez.
427
428         It should be defined as relevant test class specific to each test file for more readability.
429         It could be helpful to remove unnecessary static methods.
430
431         * UIProcess/API/efl/tests/test_ewk2_popup_menu.cpp:
432         (EWK2PopupMenuTest::checkBasicPopupMenuItem):
433         (EWK2PopupMenuTest::selectItemAfterDelayed):
434         (EWK2PopupMenuTest::showPopupMenu):
435         (TEST_F):
436
437 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
438
439         [EFL][WK2] EWK2FileChooserRequestTest should be defined by inheriting from EWK2UnitTestBase.
440         https://bugs.webkit.org/show_bug.cgi?id=118773
441
442         Reviewed by Christophe Dumez.
443
444         It should be defined as relevant test class specific to each test file for more readability.
445         It could be helpful to remove unnecessary static methods.
446
447         * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp:
448         (EWK2FileChooserRequestTest::onFileChooserRequest):
449         (EWK2FileChooserRequestTest::compareStrings):
450         (EWK2FileChooserRequestTest::freeStringList):
451         (TEST_F):
452
453 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
454
455         [EFL][WK2] EWK2FaviconDatabaseTest should be defined by inheriting from EWK2UnitTestBase.
456         https://bugs.webkit.org/show_bug.cgi?id=118772
457
458         Reviewed by Christophe Dumez.
459
460         It should be defined as relevant test class specific to each test file for more readability.
461         It could be helpful to remove unnecessary static methods.
462
463         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
464         (EWK2FaviconDatabaseTest::serverCallback):
465         (EWK2FaviconDatabaseTest::requestFaviconData):
466         (TEST_F):
467
468 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
469
470         [EFL][WK2] EWK2EinaSharedStringTest should be defined by inheriting from EWK2UnitTestBase.
471         https://bugs.webkit.org/show_bug.cgi?id=118771
472
473         Reviewed by Christophe Dumez.
474
475         It should be defined as relevant test class specific to each test file for more readability.
476         It could be helpful to remove unnecessary static methods.
477
478         * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
479         (EWK2EinaSharedStringTest::checkString):
480         (TEST_F):
481
482 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
483
484         [EFL][WK2] EWK2DownloadJobTest should be defined by inheriting from EWK2UnitTestBase.
485         https://bugs.webkit.org/show_bug.cgi?id=118769
486
487         Reviewed by Christophe Dumez.
488
489         It should be defined as relevant test class specific to each test file for more readability.
490         It could be helpful to remove unnecessary static methods.
491
492         * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
493         (EWK2DownloadJobTest::fileExists):
494         (EWK2DownloadJobTest::serverCallback):
495         (EWK2DownloadJobTest::on_download_requested):
496         (EWK2DownloadJobTest::on_download_cancelled):
497         (EWK2DownloadJobTest::on_download_failed):
498         (EWK2DownloadJobTest::on_download_finished):
499         (TEST_F):
500
501 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
502
503         [EFL][WK2] EWK2AuthRequestTest should be defined by inheriting from EWK2UnitTestBase.
504         https://bugs.webkit.org/show_bug.cgi?id=118766
505
506         Reviewed by Christophe Dumez.
507
508         It should be defined as relevant test class specific to each test file for more readability.
509         It could be helpful to remove unnecessary static methods.
510
511         * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp:
512         (EWK2AuthRequestTest::serverCallback):
513         (EWK2AuthRequestTest::onAuthenticationRequest):
514         (EWK2AuthRequestTest::onLoadFinished):
515         (TEST_F):
516
517 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
518
519         [EFL][WK2] EWK2ContextMenuTest should be defined by inheriting from EWK2UnitTestBase.
520         https://bugs.webkit.org/show_bug.cgi?id=118767
521
522         Reviewed by Christophe Dumez.
523
524         It should be defined as relevant test class specific to each test file for more readability.
525         It could be helpful to remove unnecessary static methods.
526
527         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
528         (EWK2ContextMenuTest::checkBasicContextMenuItem):
529         (EWK2ContextMenuTest::customItemSelected):
530         (EWK2ContextMenuTest::showContextMenu):
531         (EWK2ContextMenuTest::showContextMenuForRemoveAndAppend):
532         (EWK2ContextMenuTest::showContextMenuForSubmenu):
533         (EWK2ContextMenuTest::hideContextMenu):
534         (TEST_F):
535
536 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
537
538         [EFL][WK2] EWK2ContextTest should be defined by inheriting from EWK2UnitTestBase.
539         https://bugs.webkit.org/show_bug.cgi?id=118763
540
541         Reviewed by Christophe Dumez.
542
543         It should be defined as relevant test class specific to each test file for more readability.
544         It could be helpful to remove unnecessary static methods.
545
546         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
547         (EWK2ContextTest::schemeRequestCallback):
548         (TEST_F):
549
550 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
551
552         [EFL][WK2] EWK2DatabaseManagerTest should be defined by inheriting from EWK2UnitTestBase
553         https://bugs.webkit.org/show_bug.cgi?id=118726
554
555         Reviewed by Christophe Dumez.
556
557         It should be defined as relevant test class specific to each test file for more readability.
558         It could be helpful to remove unnecessary static methods.
559
560         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
561         (EWK2DatabaseManagerTest::OriginData::OriginData):
562         (EWK2DatabaseManagerTest::databaseOriginsCallback):
563         (EWK2DatabaseManagerTest::timerCallback):
564         (TEST_F):
565
566 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
567
568         [EFL][WK2] EWK2ColorPickerTest should be defined by inheriting from EWK2UnitTestBase.
569         https://bugs.webkit.org/show_bug.cgi?id=118762
570
571         Reviewed by Christophe Dumez.
572
573         It should be defined as relevant test class specific to each test file for more readability.
574         It could be helpful to remove unnecessary static methods.
575
576         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
577         (EWK2ColorPickerTest::onColorPickerDone):
578         (EWK2ColorPickerTest::setColorPickerColor):
579         (EWK2ColorPickerTest::showColorPicker):
580         (EWK2ColorPickerTest::hideColorPicker):
581         (EWK2ColorPickerTest::hideColorPickerByRemovingElement):
582         (TEST_F):
583
584 2013-07-16  Gordon Sheridan  <gordon_sheridan@apple.com>
585
586         setPluginUnavailabilityReason can destroy renderObject before obscurity check
587         https://bugs.webkit.org/show_bug.cgi?id=118770
588         <rdar://problem/14462331>
589
590         Reviewed by Tim Horton.
591
592         * WebProcess/WebPage/WebPage.cpp:
593         (WebKit::WebPage::createPlugin):
594         Moved obscurity check to before renderObject is potentially destroyed.
595
596 2013-07-16  Alexey Proskuryakov  <ap@apple.com>
597
598         REGRESSION (r150291): Chinese predictive input pop-up disappears on twitter.com
599         https://bugs.webkit.org/show_bug.cgi?id=118739
600         <rdar://problem/14300350>
601
602         Reviewed by Daniel Bates.
603
604         EditorState tracking on UI side is very fragile. This is a targeted fix just for
605         this specific scenario.
606
607         The issue was that we had a stale m_temporarilyClosedComposition flag, which was
608         making UI process believe that a composition was closed from WebProcess side,
609         and notify input method about that. It shouldn't have been a problem, because there
610         is no composition at this point indeed, but this extra call is a problem for
611         predictive input, which works in a somewhat unconventional way (<rdar://problem/14458297>).
612
613         * UIProcess/mac/WebPageProxyMac.mm:
614         (WebKit::WebPageProxy::insertText): Reset m_temporarilyClosedComposition flag when
615         getting new EditorState in response to performing this action. There is certainly
616         no composition after insertText, and all interested parties are on the same page
617         already.
618
619 2013-07-16  Jessie Berlin  <jberlin@apple.com>
620
621         Fix some NSDictionary misuse pointed out by the clang static analyzer
622         https://bugs.webkit.org/show_bug.cgi?id=118736
623
624         Reviewed by Anders Carlsson.
625
626         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
627         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
628         Do not put a key with a nil value pair into the NSDictionary.
629
630 2013-07-16  Michael Brüning  <michael.bruning@digia.com>
631
632         [Qt] Replace Nokia with Qt Project in service name.
633         https://bugs.webkit.org/show_bug.cgi?id=118729
634
635         Reviewed by Simon Hausmann.
636
637         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
638         (WebKit::ProcessLauncher::launchProcess):
639
640 2013-07-16  Dong-Gwan Kim  <donggwan.kim@samsung.com>
641
642         EWK2BackForwardListTest should be defined by inheriting from EWK2UnitTestBase.
643         https://bugs.webkit.org/show_bug.cgi?id=118717
644
645         Reviewed by Christophe Dumez.
646
647         * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
648         (EWK2BackForwardListTest::checkItem):
649         (EWK2BackForwardListTest::urlFromTitle):
650         (EWK2BackForwardListTest::freeEinaList):
651         (TEST_F):
652
653 2013-07-16  Kangil Han  <kangil.han@samsung.com>
654
655         Use toHTMLSelectElement and dismiss isHTMLSelectElement
656         https://bugs.webkit.org/show_bug.cgi?id=118714
657
658         Reviewed by Ryosuke Niwa.
659
660         To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
661         Additionally, this patch removes isHTMLSelectElement because not all element subclasses can be checked by a combination of tag names.
662
663         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
664         (WebKit::PDFPluginChoiceAnnotation::commit):
665
666 2013-07-16  Dong-Gwan Kim  <donggwan.kim@samsung.com>
667
668         Replace mouseClick with more meaningful method in test_ewk2_text_checker.cpp
669         https://bugs.webkit.org/show_bug.cgi?id=118699
670
671         Reviewed by Christophe Dumez.
672
673         Many mouseClick methods are used in test_ewk2_text_checker.cpp.
674         But it is difficult to understand what they mean.
675         So i would like to replace those with more meaningful method for readability.
676
677         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
678         (EWK2TextCheckerTest::clickSelectAllWordsWithSpellcheckButton):
679         (EWK2TextCheckerTest::clickSelectAllWordsWithoutSpellcheckButton):
680         (EWK2TextCheckerTest::clickSelectSubWordWithSpellcheckButton):
681         (EWK2TextCheckerTest::showContextMenuWithFirstLineText):
682         (EWK2TextCheckerTest::showContextMenuWithSecondLineText):
683         (EWK2TextCheckerTest::selectFirstWordInFirstLineText):
684         (EWK2TextCheckerTest::selectFirstWordInSecondLineText):
685         (TEST_F):
686
687 2013-07-15  Kangil Han  <kangil.han@samsung.com>
688
689         Introduce toHTMLIFrameElement
690         https://bugs.webkit.org/show_bug.cgi?id=118672
691
692         Reviewed by Ryosuke Niwa.
693
694         To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
695
696         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
697         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
698
699 2013-07-15  Tim Horton  <timothy_horton@apple.com>
700
701         Update blocked/missing plug-in UI
702         https://bugs.webkit.org/show_bug.cgi?id=118347
703         <rdar://problem/14209318>
704
705         Reviewed by Sam Weinig.
706         Patch by Antoine Quint, Anders Carlsson, Sam Weinig, and myself.
707
708         * Platform/CoreIPC/HandleMessage.h:
709         (CoreIPC::callMemberFunction):
710         Add a 6 argument -> 4 reply message handler.
711         (It seems that FindPlugin is getting a little out of hand.)
712
713         * Shared/APIClientTraits.cpp:
714         * Shared/APIClientTraits.h:
715         * UIProcess/API/C/WKPage.h:
716         * UIProcess/WebLoaderClient.cpp:
717         (WebKit::WebLoaderClient::pluginLoadPolicy):
718         * UIProcess/WebLoaderClient.h:
719         Add an unavailability description out-argument to a new version of
720         pluginLoadPolicy, so clients can override the text of the unavailable
721         plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits.
722
723         * UIProcess/WebPageProxy.cpp:
724         (WebKit::WebPageProxy::findPlugin):
725         * UIProcess/WebPageProxy.h:
726         * UIProcess/WebPageProxy.messages.in:
727         Plumb the unavailability description through to the WebProcess via
728         the FindPlugin message.
729
730         * WebProcess/Plugins/PluginProcessConnection.cpp:
731         (WebKit::PluginProcessConnection::didClose):
732         Make a strongly referencing copy of the list of PluginProxies, so we can
733         throw them away without the HashMap being mutated underneath us (see the comment).
734
735         * WebProcess/Plugins/PluginView.cpp:
736         (WebKit::PluginView::pluginProcessCrashed):
737         Invalidate the plug-in's widget before setting the plugin unavailability reason,
738         because doing so would cause the plug-in's renderer to be torn down, making
739         invalidate() crash.
740
741         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
742         (WebKit::WebChromeClient::shouldUnavailablePluginMessageIncludeButton):
743         * WebProcess/WebCoreSupport/WebChromeClient.h:
744         Rename from shouldUnavailablePluginMessageBeButton to
745         shouldUnavailablePluginMessageIncludeButton for accuracy.
746
747         * WebProcess/WebPage/WebPage.cpp:
748         (WebKit::WebPage::createPlugin):
749         Acquire the unavailability description from the client
750         (via FindPlugin) and hand it to the RenderEmbeddedObject.
751         (WebKit::WebPage::canPluginHandleResponse):
752         Re-acquire the plugin's renderer, in case setPluginUnavailabilityReason destroyed it.
753
754 2013-07-15  Simon Cooper  <scooper@apple.com>
755
756         PluginProcess deny file-read-data /Library/Application Support/Macromedia/FlashPlayerTrust
757         https://bugs.webkit.org/show_bug.cgi?id=118690
758         <rdar://problem/14255963>
759
760         Reviewed by Dean Jackson.
761
762         Silently deny access to FlashPlayerTrust. This location contains
763         files containing lists of paths that Flash Player will
764         "allow" access to (without asking the user). Since the plugin
765         sandbox won't permit the access to the listed paths it is better
766         to silently block attempts to read these "whitelists". The
767         "whitelists" are created by other Adobe "installer" like
768         applications.
769
770         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
771
772 2013-07-14  Jon Lee  <jonlee@apple.com>
773
774         Calling Notification.requestPermission() without a callback crashes
775         https://bugs.webkit.org/show_bug.cgi?id=118654
776         <rdar://problem/14293352>
777
778         Reviewed by Alexey Proskuryakov.
779
780         When requestPermission() is called, we short-circuit if we know the permission was already set.
781         The callback handler gets invoked. But now that callbacks are optional, we need to check to make
782         sure a callback was provided.
783
784         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
785         (WebKit::NotificationPermissionRequestManager::startRequest): Check for the callback.
786
787 2013-07-15  Anton Obzhirov  <a.obzhirov@samsung.com>
788
789         [GTK] Remote inspector server should send an error page if resources not found
790         https://bugs.webkit.org/show_bug.cgi?id=117137
791
792         Reviewed by Gustavo Noronha Silva.
793
794         Sometimes it is difficult to understand why remote inspector fails to deliver the content.
795         This patch gives an option to show error page with some basic explanation.
796
797         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
798         (WebKit::WebInspectorServer::platformResourceForPath):
799
800 2013-07-15  Simon Pena  <simon.pena@samsung.com>
801
802         [GTK] [WK2] Check if the keyEventQueue is empty in WebPageProxy::getEditorCommandsForKeyEvent
803         https://bugs.webkit.org/show_bug.cgi?id=118530
804
805         Reviewed by Carlos Garcia Campos.
806
807         When a key event is started in the WebProcess (e.g. in the inspector)
808         it doesn't have an associated GdkEvent queued. Adding a check in 
809         WebPageProxy::getEditorCommandsForKeyEvent ensures there's always a queued
810         key event to process.
811
812         In GTK-WK2, inspector-protocol/input/dispatchKeyEvent.html no longer crashes once
813         this fix is in place. 
814
815         * UIProcess/gtk/WebPageProxyGtk.cpp:
816         (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): Ensure m_keyEventQueue is
817         not empty.
818
819 2013-07-15  Alberto Garcia  <berto@igalia.com>
820
821         [WK2][GTK] SIGSEV in webkitWebViewBaseSizeAllocate
822         https://bugs.webkit.org/show_bug.cgi?id=118052
823
824         Reviewed by Carlos Garcia Campos.
825
826         We don't need to check whether the drawing area is empty or not in
827         order to set needsResizeOnMap.
828
829         It can also happen that the drawing area pointer is null (if
830         e.g. the web process crashes), which is the reason for this
831         SIGSEGV.
832
833         A test to prevent this was added in r88646 but was later moved to
834         resizeWebKitWebViewBaseFromAllocation().
835
836         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
837         (webkitWebViewBaseSizeAllocate):
838
839 2013-07-10  Roger Fong  <roger_fong@apple.com>
840
841         Plugins that don't support snapshotting should not all autostart.
842         https://bugs.webkit.org/show_bug.cgi?id=118572
843         <rdar://problem/14324391>.
844
845         Reviewed by Dean Jackson.
846
847         * WebProcess/Plugins/PluginView.cpp:
848         (WebKit::PluginView::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree.
849         It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting.
850         (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin does not support snapshotting go straight 
851         to the the DisplayingSnapshot state.
852         * WebProcess/Plugins/PluginView.h:
853
854 2013-07-11  Jessie Berlin  <jberlin@apple.com>
855
856         WebResourceCacheManager::cfURLCacheHostNamesWithCallback leaks an array (pointed out by the
857         clang static analyzer)
858         https://bugs.webkit.org/show_bug.cgi?id=118533
859
860         Reviewed by Anders Carlsson.
861
862         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
863         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
864
865 2013-07-11  Sergio Correia  <sergio.correia@openbossa.org>
866
867         Use GOwnPtr in PluginProcessProxyUnix to manage stdOut variable
868         https://bugs.webkit.org/show_bug.cgi?id=118568
869
870         Reviewed by Martin Robinson.
871
872         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
873         (WebKit::PluginProcessProxy::scanPlugin):
874
875 2013-07-11  Timothy Hatcher  <timothy@apple.com>
876
877         Revert r152267 and soft link WebInspectorUI.framework again.
878
879         https://bugs.webkit.org/show_bug.cgi?id=118544
880
881         Reviewed by David Kilzer.
882
883         * Configurations/WebKit2.xcconfig:
884         * UIProcess/mac/WebInspectorProxyMac.mm:
885         (WebKit::inspectorReallyUsesWebKitUserInterface):
886         * WebKit2.xcodeproj/project.pbxproj:
887         * WebProcess/WebPage/mac/WebInspectorMac.mm:
888         (WebKit::inspectorReallyUsesWebKitUserInterface):
889
890 2013-07-11  Jae Hyun Park  <jae.park@company100.net>
891
892         [Coordinated Graphics] Parameter of commitSceneState should be const
893         https://bugs.webkit.org/show_bug.cgi?id=118564
894
895         Reviewed by Noam Rosenthal.
896
897         Parameter of commitSceneState should be const as there should not be any
898         modifications to the passed CoordinatedGraphicsState.
899
900         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
901         (WebKit::CoordinatedLayerTreeHost::commitSceneState):
902         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
903
904 2013-07-10  Mark Rowe  <mrowe@apple.com>
905
906         <rdar://problem/14395759> PluginProcess sometimes logs an error about being unable to load WebKit2.framework.
907
908         Reviewed by Alexey Proskuryakov.
909
910         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
911         (WebKit::PluginProcessProxy::createPropertyListFile): Ensure that any environment variables
912         specified in dynamic linker load commands are passed to the subprocess that we spawn to create
913         the MIME type property list.
914
915 2013-07-10  Brady Eidson  <beidson@apple.com>
916
917         Some Java plugin instances can deadlock with the WebProcess on NPP_Destroy.
918         <rdar://problem/14286390> and https://bugs.webkit.org/show_bug.cgi?id=118535
919
920         Reviewed by Alexey Proskuryakov.
921
922         * Shared/Plugins/NPObjectProxy.cpp:
923         (WebKit::NPObjectProxy::~NPObjectProxy): ASSERT this is the main thread.
924         (WebKit::NPObjectProxy::NP_Deallocate): If this isn't the main thread, call it again on the main thread.
925
926 2013-07-10  Sergio Correia  <sergio.correia@openbossa.org>
927
928         Remove the meshType from CoordinatedCustomFilterOperation
929         https://bugs.webkit.org/show_bug.cgi?id=118529
930
931         Reviewed by Noam Rosenthal.
932
933         Following the removal of the meshType from CustomFilterOperation in r149153,
934         remove also the meshType from CoordinatedCustomFilterOperation.
935
936         No new tests, no new functionality.
937
938         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
939         (CoreIPC::::encode): Remove dead comment.
940         (CoreIPC::::decode): Remove meshType from CoordinatedCustomFilterOperation
941         call.
942
943 2013-07-09  Byungwoo Lee  <bw80.lee@samsung.com>
944
945         [EFL] tooltip callback doesn't work.
946         https://bugs.webkit.org/show_bug.cgi?id=118522
947
948         Reviewed by Christophe Dumez.
949
950         Add missing code to connect didChangeTooltip callback.
951
952         * UIProcess/efl/ViewClientEfl.cpp:
953         (WebKit::ViewClientEfl::ViewClientEfl):
954
955 2013-07-09  Jer Noble  <jer.noble@apple.com>
956
957         Reviewed by Simon Fraser.
958
959         Remember the scroll position and restore after exiting full-screen mode.
960         https://bugs.webkit.org/show_bug.cgi?id=61956
961         <rdar://problem/9544461>
962
963         Call into the main FrameView to save the scroll position before swapping the
964         WebView into the full-screen window, and restore the scroll position after 
965         swapping the WebView back into the browser window.
966
967         * UIProcess/mac/WKFullScreenWindowController.mm:
968         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
969         (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
970
971         In WebKit2, this requires some communication between the WebProcess and the
972         UIProcess, so add two new messages to WebFullScreenManager to be called by
973         its proxy.
974
975         * UIProcess/WebFullScreenManagerProxy.h:
976         * UIProcess/WebFullScreenManagerProxy.cpp:
977         (WebKit::WebFullScreenManagerProxy::saveScrollPosition):
978         (WebKit::WebFullScreenManagerProxy::restoreScrollPosition):
979         * WebProcess/FullScreen/WebFullScreenManager.h:
980         * WebProcess/FullScreen/WebFullScreenManager.messages.in:
981         * WebProcess/FullScreen/WebFullScreenManager.cpp:
982         (WebKit::WebFullScreenManager::saveScrollPosition):
983         (WebKit::WebFullScreenManager::restoreScrollPosition):
984
985 2013-07-07  Carlos Garcia Campos  <cgarcia@igalia.com>
986
987         [GTK] Runtime critical warning when unloading a module that failed to load
988         https://bugs.webkit.org/show_bug.cgi?id=118425
989
990         Reviewed by Martin Robinson.
991
992         * Platform/gtk/ModuleGtk.cpp:
993         (WebKit::Module::load): Show an error message when the module
994         fails to load.
995         (WebKit::Module::unload): Check module pointer before calling
996         unload method.
997
998 2013-07-05  Tim Horton  <timothy_horton@apple.com>
999
1000         [wk2] Add API to lock the scroll position at the top or bottom of the page
1001         https://bugs.webkit.org/show_bug.cgi?id=118429
1002         <rdar://problem/14120323>
1003
1004         Reviewed by Anders Carlsson.
1005
1006         * Shared/WebPageCreationParameters.cpp:
1007         (WebKit::WebPageCreationParameters::encode):
1008         (WebKit::WebPageCreationParameters::decode):
1009         * Shared/WebPageCreationParameters.h:
1010         Pass the current ScrollPinningBehavior across to the WebPage upon creation.
1011
1012         * UIProcess/API/C/WKPage.cpp:
1013         (WKPageGetScrollPinningBehavior):
1014         (WKPageSetScrollPinningBehavior):
1015         * UIProcess/API/C/WKPagePrivate.h:
1016         SPI to get/set the WebPageProxy's current ScrollPinningBehavior.
1017         Convert between WK API type and WebCore enum.
1018
1019         * UIProcess/WebPageProxy.cpp:
1020         (WebKit::WebPageProxy::WebPageProxy):
1021         (WebKit::WebPageProxy::creationParameters):
1022         Send ScrollPinningBehavior when creating a WebPage.
1023
1024         (WebKit::WebPageProxy::setScrollPinningBehavior):
1025         Pass ScrollPinningBehavior changes across to the WebProcess (and save it
1026         in WebPageProxy so it can be sent back across if the WebProcess crashes).
1027
1028         * UIProcess/WebPageProxy.h:
1029         (WebKit::WebPageProxy::scrollPinningBehavior):
1030         Getter/setter and storage for m_scrollPinningBehavior.
1031
1032         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1033         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1034         Inform new FrameViews of the current ScrollPinningBehavior.
1035
1036         * WebProcess/WebPage/WebPage.cpp:
1037         (WebKit::WebPage::WebPage):
1038         Set our ScrollPinningBehavior based on our creation parameters.
1039
1040         (WebKit::WebPage::setScrollPinningBehavior):
1041         Inform the FrameView of ScrollPinningBehavior changes.
1042
1043         * WebProcess/WebPage/WebPage.h:
1044         (WebKit::WebPage::scrollPinningBehavior): Added.
1045         (WebKit::WebPage::setScrollPinningBehavior): Added.
1046         Add storage for m_scrollPinningBehavior.
1047
1048         * WebProcess/WebPage/WebPage.messages.in:
1049         Add SetScrollPinningBehavior message.
1050
1051 2013-07-05  Krzysztof Wolanski  <k.wolanski@samsung.com>
1052
1053         [EFL][WK2] Implement unit test callbacks: onWordLearn and onWordIgnore.
1054         https://bugs.webkit.org/show_bug.cgi?id=118392
1055
1056         Reviewed by Christophe Dumez.
1057
1058         Simulate behavior of Learn and Ignore Word in the text field.
1059
1060         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
1061         (EWK2UnitTest::EWK2UnitTestBase::mouseDoubleClick):
1062         Select the entire word in the text field.
1063
1064         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
1065         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
1066         (onSpellingForKnownWord):
1067         (onWordLearn):
1068         (onWordIgnore):
1069         (selectLearnSpelling):
1070         (selectIgnoreSpelling):
1071
1072 2013-07-05  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1073
1074         [GTK] WebKit2 test TestWebKitFaviconDatabase times out with recent glib
1075         https://bugs.webkit.org/show_bug.cgi?id=111434
1076
1077         Reviewed by Carlos Garcia Campos.
1078
1079         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
1080         (testNotInitialized):
1081         (testSetDirectory):
1082         (testClearDatabase):
1083         (testGetFavicon):
1084         (testGetFaviconURI): Removed gconstpointer parameter.
1085         (testWebViewFavicon): Fixed to make it work together with the
1086         other tests and removed gconstpointer parameter.
1087         (testFaviconDatabase): Created to call all tests in the proper
1088         order.
1089         (beforeAll): Changed to call only testFaviconDatabase instead of
1090         the separate tests.
1091
1092 2013-07-05  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1093
1094         TestWebKitFaviconDatabase/clear-database is not testing things properly
1095         https://bugs.webkit.org/show_bug.cgi?id=118404
1096
1097         Reviewed by Carlos Garcia Campos.
1098
1099         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
1100         (testClearDatabase): Check for an existing icon that can make the
1101         test fail if clear database is not working.
1102
1103 2013-07-04  Anders Carlsson  <andersca@apple.com>
1104
1105         Paint the page background if we haven't received our first update
1106         https://bugs.webkit.org/show_bug.cgi?id=118402
1107         <rdar://problem/13893308>
1108
1109         Reviewed by Simon Fraser.
1110
1111         Make sure that we always paint something when we haven't received our first update from the web process.
1112
1113         * UIProcess/API/mac/WKView.mm:
1114         (-[WKView drawRect:]):
1115         * UIProcess/DrawingAreaProxyImpl.h:
1116         (WebKit::DrawingAreaProxyImpl::hasReceivedFirstUpdate):
1117
1118 2013-07-04  Anders Carlsson  <andersca@apple.com>
1119
1120         Crash when createPluginInternal ends up destroying the plug-in
1121         https://bugs.webkit.org/show_bug.cgi?id=118397
1122         <rdar://problem/14155051>
1123
1124         Reviewed by Simon Fraser.
1125
1126         Keep the WebProcessConnection object alive while calling createPluginInternal and handle
1127         the IPC connection going away.
1128
1129         * PluginProcess/WebProcessConnection.cpp:
1130         (WebKit::WebProcessConnection::createPluginAsynchronously):
1131
1132 2013-07-03  Gordon Sheridan  <gordon_sheridan@apple.com>
1133
1134         Implement mechanism to detect (partially) hidden blocked plugins.
1135         https://bugs.webkit.org/show_bug.cgi?id=117998
1136
1137         Reviewed by Dean Jackson.
1138
1139         * Shared/Plugins/Netscape/PluginInformation.h:
1140         * Shared/Plugins/Netscape/PluginInformation.cpp:
1141         (WebKit::plugInInformationReplacementObscuredKey):
1142         Add key for plugInInformation dictionaries.
1143
1144         (WebKit::createPluginInformationDictionary):
1145         Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary.
1146
1147         * Shared/API/c/WKPluginInformation.h:
1148         * Shared/API/c/WKPluginInformation.cpp:
1149         (WKPluginInformationReplacementObscuredKey):
1150         Provide the C API for the plugInInformationReplacementObscuredKey().
1151
1152         * UIProcess/WebPageProxy.h:
1153         * UIProcess/WebPageProxy.cpp:
1154         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
1155         Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary().
1156
1157         * UIProcess/WebPageProxy.messages.in:
1158         Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message.
1159
1160         * WebProcess/WebPage/WebPage.cpp:
1161         (WebKit::WebPage::createPlugin):
1162         Invoke isReplacementObscured() method for blocked plugins.
1163
1164 2013-07-03  Alexey Proskuryakov  <ap@apple.com>
1165
1166         <rdar://problem/14271105> Flash Player: deny ipc-posix-sem 59918130
1167         <rdar://problem/14349560> Flash Player: deny ipc-posix-sem MacromediaSemaphoreDig on many sites
1168
1169         Reviewed by Sam Weinig.
1170
1171         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
1172         semaphore-owner doesn't appear to work the way we need it to, removing it (at least for now).
1173
1174 2013-07-03  Simon Pena  <simon.pena@samsung.com>
1175
1176         WebTextCheckerClient doesn't initialize output arguments.
1177         https://bugs.webkit.org/show_bug.cgi?id=83683
1178
1179         Reviewed by Martin Robinson.
1180
1181         Callers of checkSpellingOfString and checkGrammarOfString expect
1182         certain default values when no misspelled (or bad grammar) string
1183         is found. They try to do that by initialising the reply arguments
1184         that go into the IPC calls, but these values are ultimately ignored (see
1185         HandleMessage.h, where the replyArguments are declared).
1186
1187         In the past, this seems to have led to various issues, (see
1188         TextCheckingHelper::findFirstMisspelling in TextCheckingHelper.cpp),
1189         where these return values are asserted and checked to be in the right range.
1190
1191         This patch initialises the values, so even if no available client
1192         implements the methods (or if the implementation forgets to do it) the callers
1193         will have their expected output.
1194
1195         However, and for a general case, we probably need a way to tell the caller
1196         that any existing value in the output arguments will be ignored.
1197
1198         * UIProcess/WebTextCheckerClient.cpp:
1199         (WebKit::WebTextCheckerClient::checkSpellingOfString):
1200         (WebKit::WebTextCheckerClient::checkGrammarOfString):
1201
1202
1203 2013-07-03  Sergio Villar Senin  <svillar@igalia.com>
1204
1205         [GTK][WK2] SIGSEV in WebKit::WebPageContextMenuClient::customContextMenuItemSelected
1206         https://bugs.webkit.org/show_bug.cgi?id=116867
1207
1208         Reviewed by Anders Carlsson.
1209
1210         We did not reset the clients on WebPageProxy::close(), so right
1211         clicking on a link after starting the navigation to some other
1212         page was causing crashes because code was trying to access an
1213         already freed m_contextMenuClient.
1214
1215         There were some other clients that could potentially trigger the
1216         same issues. Reset them all to null to prevent this situation.
1217
1218         * UIProcess/WebPageProxy.cpp:
1219         (WebKit::WebPageProxy::close):
1220
1221 2013-07-03  Simon Pena  <simon.pena@samsung.com>
1222
1223         Output arguments used in IPC calls should be returned initialised
1224         https://bugs.webkit.org/show_bug.cgi?id=118354
1225
1226         Reviewed by Anders Carlsson.
1227
1228         When Download::shouldDecodeSourceDataOfMIMEType and Download::retrieveDestinationWithSuggestedFilename
1229         call DownloadProxy::shouldDecodeSourceDataOfMIMEType and DownloadProxy::decideDestinationWithSuggestedFilename
1230         through IPC, they assume the output arguments result and allowOverwrite have
1231         been initialised.
1232
1233         This patch initialises these arguments also in the unlikely event that a
1234         m_webContext is not available.
1235
1236         * UIProcess/Downloads/DownloadProxy.cpp:
1237         (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
1238         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
1239
1240 2013-07-03  Sergio Villar Senin  <svillar@igalia.com>
1241
1242         [WK2][GTK] Invalid ASSERTs in WebResources loading code
1243         https://bugs.webkit.org/show_bug.cgi?id=118352
1244
1245         Reviewed by Carlos Garcia Campos.
1246
1247         The WebKitWebView keeps track of the resources being loaded in a
1248         map. A couple of ASSERTs verify that every loaded resource is
1249         stored in that map.
1250
1251         The map that is cleared each time a new load starts so there is a
1252         small chance that we get notifications for resources that
1253         correspond to previous page loads
1254         (and thus are not stored in the map). We should remove the ASSERT
1255         which is not valid anymore.
1256
1257         * UIProcess/API/gtk/WebKitWebView.cpp:
1258         (webkitWebViewGetLoadingWebResource):
1259
1260 2013-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1261
1262         [GTK] Migrate WebKitWebContext to GTask
1263         https://bugs.webkit.org/show_bug.cgi?id=117153
1264
1265         Reviewed by Gustavo Noronha Silva.
1266
1267         * UIProcess/API/gtk/WebKitWebContext.cpp:
1268         (webkitWebContextGetPluginThread):
1269         (webkit_web_context_get_plugins):
1270         (webkit_web_context_get_plugins_finish):
1271
1272 2013-07-02  Zan Dobersek  <zdobersek@igalia.com>
1273
1274         [WK2] Invalidate FontCache before purging MemoryCache upon WebProcess termination/closure
1275         https://bugs.webkit.org/show_bug.cgi?id=118280
1276
1277         Reviewed by Darin Adler.
1278
1279         Invalidate the FontCache before disabling and purging the MemoryCache in WebProcess::didClose
1280         and WebProcess::terminate. This frees up additional references to objects that were held
1281         by the FontCache, reducing the amount of 'LEAK: *' output when exiting MiniBrowser or
1282         WebKitTestRunner in debug builds.
1283
1284         * WebProcess/WebProcess.cpp:
1285         (WebKit::WebProcess::terminate):
1286         (WebKit::WebProcess::didClose):
1287
1288 2013-07-02  Jessie Berlin  <jberlin@apple.com>
1289
1290         The callback for WKPageGetPlugInInformation needs info about whether or not there are any
1291         non-playing instances of the plug-in on the page
1292         https://bugs.webkit.org/show_bug.cgi?id=118330
1293
1294         Reviewed by Anders Carlsson.
1295
1296         Add another key value pair to the dictionary passed to the callback.
1297
1298         * Shared/API/c/WKPluginInformation.cpp:
1299         (WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey):
1300         * Shared/API/c/WKPluginInformation.h:
1301
1302         * Shared/Plugins/Netscape/PluginInformation.cpp:
1303         (WebKit::plugInInformationPageContainsNonPlayingInstanceOfPlugInKey):
1304         (WebKit::createPlugInInformationDictionary):
1305         Add the information about whether or not the page contains a non-playing instance of that
1306         plug-in to the plug-in information dictionary.
1307         * Shared/Plugins/Netscape/PluginInformation.h:
1308
1309         * UIProcess/WebPageProxy.h:
1310         * UIProcess/WebPageProxy.messages.in:
1311         * UIProcess/mac/WebPageProxyMac.mm:
1312         (WebKit::WebPageProxy::containsPlugInCallback):
1313         Check if any of the MIME types of the plug-in instances that are present on the page but are
1314         not playing match the instance of plug-in being searched for.
1315         * WebProcess/WebPage/mac/WebPageMac.mm:
1316         (WebKit::addPlugInMimeTypesFromNodeListForNonPlayingPlugIns):
1317         Based roughly off of addPlugInsFromNodeListMatchingPlugInOrigin in
1318         HTMLPlugInImageElement.cpp.
1319         (WebKit::WebPage::containsPluginViewsWithPluginProcessToken):
1320         Based roughly off of HTMLPlugInImageElement::restartSimilarPlugIns.
1321
1322 2013-07-02  Alexey Proskuryakov  <ap@apple.com>
1323
1324         security/block-test.html fails when NetworkProcess is enabled
1325         https://bugs.webkit.org/show_bug.cgi?id=118320
1326         <rdar://problem/14309423>
1327
1328         Reviewed by Geoff Garen.
1329
1330         * NetworkProcess/NetworkResourceLoader.cpp:
1331         (WebKit::NetworkResourceLoader::wasBlocked):
1332         (WebKit::NetworkResourceLoader::cannotShowURL):
1333         Implemented missing ResourceHandleClient functions.
1334
1335 2013-07-02  Ada Chan  <adachan@apple.com>
1336
1337         Fix crash when PageBanner::detachFromPage() is called from WebPage::~WebPage().
1338         https://bugs.webkit.org/show_bug.cgi?id=118268
1339
1340         Reviewed by Beth Dakin.
1341
1342         * WebProcess/WebPage/mac/PageBannerMac.mm:
1343         (WebKit::PageBanner::detachFromPage): Add some null checks. m_webPage->corePage()
1344         can be null if this method is called after the web page is closed.
1345
1346 2013-07-02  Jae Hyun Park  <jae.park@company100.net>
1347
1348         Implement CoordinatedSurface for Threaded Coordinated Graphics
1349         https://bugs.webkit.org/show_bug.cgi?id=109661
1350
1351         Reviewed by Noam Rosenthal.
1352
1353         This is a preparation patch for Threaded Coordianted Graphics.
1354
1355         This patch implements ThreadSafeCoordinatedSurface using ImageBuffer as a
1356         backend. Also, this patch moves common implementation to CoordinatedSurface to
1357         prevent duplication of code.
1358
1359         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
1360         (WebKit::WebCoordinatedSurface::WebCoordinatedSurface):
1361         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
1362
1363 2013-07-01  Alexey Proskuryakov  <ap@apple.com>
1364
1365         Clean up private browsing session tracking
1366         https://bugs.webkit.org/show_bug.cgi?id=118266
1367         <rdar://problem/13078036>
1368
1369         Reviewed by Brady Eidson.
1370
1371         Instead of counting API calls, we now watch actual WebPreferences objects.
1372
1373         * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPrivateBrowsingEnabled):
1374         Removed code that used to notify WebContext. It's now done by WebPreferences.
1375
1376         * UIProcess/WebContext.h:
1377         * UIProcess/WebContext.cpp:
1378         (WebKit::WebContext::ensureNetworkProcess): Instead of counting the number of times
1379         API was called, rely on WebPreferences tracking.
1380         (WebKit::WebContext::willStartUsingPrivateBrowsing): Ditto. This function is
1381         now only called when we detect a change in private browsing state.
1382         (WebKit::WebContext::willStopUsingPrivateBrowsing): Ditto.
1383         (WebKit::WebContext::createNewWebProcess): Tell the new process to create a private
1384         browsing session if needed.
1385
1386         * UIProcess/WebPreferences.h:
1387         * UIProcess/WebPreferences.cpp:
1388         (WebKit::WebPreferences::addPageGroup): Count how many page groups use private
1389         browsing, and notify WebContext when a session is needed. Note that we don't notify
1390         WebContext about WebPreferences without any page groups, because it's likely
1391         that preferences will be updated by the client before groups are associated.
1392         (WebKit::WebPreferences::removePageGroup): Ditto.
1393         (WebKit::WebPreferences::updateBoolValueForKey): Perform special handling for
1394         private browsing mode changes.
1395         (WebKit::WebPreferences::updatePrivateBrowsingValue): Notify WebContext when
1396         it's time to create or destroy a private browsing session.
1397         (WebKit::WebPreferences::anyPageGroupsAreUsingPrivateBrowsing): A getter for
1398         WebContext to know when any page groups are in private browsing mode.
1399
1400         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences):
1401         Don't create a private browsing session implicitly, UI process takes care of it.
1402
1403 2013-07-01  Timothy Hatcher  <timothy@apple.com>
1404
1405         Link to WebInspectorUI.framework at build time instead of soft linking.
1406
1407         https://bugs.webkit.org/show_bug.cgi?id=118261
1408
1409         Reviewed by Joseph Pecoraro.
1410
1411         * Configurations/WebKit2.xcconfig:
1412         * UIProcess/mac/WebInspectorProxyMac.mm:
1413         (WebKit::inspectorReallyUsesWebKitUserInterface):
1414         * WebKit2.xcodeproj/project.pbxproj:
1415         * WebProcess/WebPage/mac/WebInspectorMac.mm:
1416         (WebKit::inspectorReallyUsesWebKitUserInterface):
1417
1418 2013-07-01  Tim Horton  <timothy_horton@apple.com>
1419
1420         [wk2] TiledCoreAnimationDrawingArea should support scrolling its exposed rect
1421         https://bugs.webkit.org/show_bug.cgi?id=118173
1422         <rdar://problem/14301166>
1423
1424         Reviewed by Anders Carlsson.
1425
1426         Offset the exposed rect passed from the WKView by the main frame's current scroll position
1427         before sending it to our TiledBackings, so that it is in the same coordinate space as their
1428         ordinary visibleRects.
1429
1430         This has the side effect of making clips-to-exposed-rect testable (though useless) in Safari.
1431
1432         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1433         Add updateScrolledExposedRect() and m_scrolledExposedRect.
1434
1435         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1436         (WebKit::TiledCoreAnimationDrawingArea::scroll):
1437         Call updateScrolledExposedRect when the main frame scrolls.
1438
1439         (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
1440         Remove a FIXME about this change.
1441         Call updateScrolledExposedRect instead of passing down the unscrolled rect.
1442
1443         (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
1444         Call updateScrolledExposedRect, because that method will short-circuit if
1445         setClipsToExposedRect is false, so we need to update here for correctness
1446         if we get a setExposedRect(), setClipsToExposedRect(true) pair.
1447
1448         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
1449         Update m_scrolledExposedRect and propagate it to our TiledBackings.
1450
1451         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1452         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
1453         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
1454         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
1455         Use the scrolled exposed rect.
1456
1457 2013-07-01  Ada Chan  <adachan@apple.com>
1458
1459         Properly hide the header and footer banners if they are set to null.
1460         https://bugs.webkit.org/show_bug.cgi?id=118219
1461
1462         Reviewed by Beth Dakin.
1463         
1464         Call Page::addFooterWithHeight(0) to remove the parent layer that hosts the banner when
1465         the footer banner is detached. Similarly for the header banner.
1466
1467         * WebProcess/WebPage/mac/PageBannerMac.mm:
1468         (WebKit::PageBanner::detachFromPage):
1469
1470 2013-07-01  Jochen Eisinger  <jochen@chromium.org>
1471
1472         Remove support for consumable user gestures
1473         https://bugs.webkit.org/show_bug.cgi?id=118247
1474
1475         Reviewed by Geoffrey Garen.
1476
1477         * WebProcess/Notifications/WebNotificationManager.cpp:
1478         (WebKit::WebNotificationManager::didClickNotification):
1479         * WebProcess/Plugins/PluginView.cpp:
1480         (WebKit::PluginView::performFrameLoadURLRequest):
1481         (WebKit::PluginView::evaluate):
1482         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1483         (WebKit::WebContextMenuClient::searchWithGoogle):
1484
1485 2013-06-27  Jer Noble  <jer.noble@apple.com>
1486
1487         Audio in apps which embed WebViews is corrupted.
1488         https://bugs.webkit.org/show_bug.cgi?id=118163
1489
1490         Reviewed by Maciej Stachowiak.
1491
1492         Expose the WebCore lowPowerVideoAudioBufferSizeEnabled setting to WebKit2 clients.
1493
1494         * Shared/WebPreferencesStore.h:
1495         * WebProcess/WebPage/WebPage.cpp:
1496         (WebKit::WebPage::updatePreferences):
1497
1498 2013-07-01  Sam Weinig  <sam@webkit.org>
1499
1500         WKPageLoadDataWithUserData neglects to set the base URL that is passed in
1501         <rdar://problem/14306784>
1502         https://bugs.webkit.org/show_bug.cgi?id=118256
1503
1504         Reviewed by Anders Carlsson.
1505
1506         * WebProcess/WebPage/WebPage.cpp:
1507         (WebKit::WebPage::loadData):
1508         Pass the baseURL, not blankURL(), and remove an unnecessary multiplication by sizeof(uint8_t) which is always 1.
1509
1510 2013-07-01  Kangil Han  <kangil.han@samsung.com>
1511
1512         Adopt toHTMLTextAreaElement for code cleanup
1513         https://bugs.webkit.org/show_bug.cgi?id=118226
1514
1515         Reviewed by Andreas Kling.
1516
1517         To enhance readability, this patch adopts toHTMLTextAreaElement.
1518         This also helps out to reduce duplicated use of static_cast.
1519
1520         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1521         (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
1522         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1523         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
1524         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1525         (WebKit::WebEditorClient::textDidChangeInTextArea):
1526         * WebProcess/WebPage/WebFrame.cpp:
1527         (WebKit::WebFrame::containsAnyFormControls):
1528
1529 2013-06-28  Andreas Kling  <akling@apple.com>
1530
1531         Fix Windows builds after deprecatedCharactersWithNullTermination() removal.
1532
1533         * Platform/CoreIPC/win/ConnectionWin.cpp:
1534         (CoreIPC::Connection::createServerAndClientIdentifiers):
1535
1536 2013-06-28  Tim Horton  <timothy_horton@apple.com>
1537
1538         [wk2] WKView shouldn't force scrolling off if shouldClipToVisibleRect is set
1539         https://bugs.webkit.org/show_bug.cgi?id=118174
1540         <rdar://problem/14301175>
1541
1542         Reviewed by Anders Carlsson.
1543
1544         * UIProcess/API/mac/WKView.mm:
1545         (-[WKView _updateViewExposedRect]):
1546         Pass whether or not clips-to-visibleRect is enabled down to the WebPageProxy.
1547
1548         (-[WKView setMinimumSizeForAutoLayout:]):
1549         Disable scrolling when using autolayout instead of when using clips-to-visibleRect.
1550
1551         (-[WKView setShouldClipToVisibleRect:]):
1552         Clipping to the WKView's visibleRect does not strictly require scrolling to be disabled,
1553         and in fact there are cases (RTL/TB pagination) where we *must* scroll, even when the view
1554         is big enough to fit the content (the case clip-to-visibleRect was added for).
1555
1556         * UIProcess/WebPageProxy.cpp:
1557         (WebKit::WebPageProxy::WebPageProxy):
1558         * UIProcess/WebPageProxy.h:
1559         * UIProcess/mac/WebPageProxyMac.mm:
1560         (WebKit::WebPageProxy::viewExposedRectChanged):
1561         (WebKit::WebPageProxy::exposedRectChangedTimerFired):
1562         Keep track of and forward to the drawing area whether or not clips-to-visibleRect is enabled.
1563
1564         * WebProcess/WebPage/DrawingArea.h:
1565         (WebKit::DrawingArea::setClipsToExposedRect): Added.
1566         (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame): Added a missing space.
1567
1568         * WebProcess/WebPage/WebPage.cpp:
1569         (WebKit::WebPage::viewExposedRectChanged):
1570         * WebProcess/WebPage/WebPage.h:
1571         * WebProcess/WebPage/WebPage.messages.in:
1572         Forward clips-to-visibleRect enabled state to the drawing area.
1573
1574         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
1575         Add storage for m_clipsToExposedRect.
1576
1577         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1578         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
1579         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1580         (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
1581         (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
1582         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
1583         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
1584         Check m_clipsToExposedRect instead of the main-frame's isScrollable() to determine
1585         whether we should tell our TiledBackings to clip to the exposed rect we provide.
1586
1587         We don't need to listen to mainFrameScrollabilityChanged anymore.
1588
1589 2013-06-28  Gavin Barraclough  <barraclough@apple.com>
1590
1591         Stale occlusion state after moving page back into window
1592         https://bugs.webkit.org/show_bug.cgi?id=118202
1593
1594         Reviewed by Anders Carlsson.
1595         
1596         We need to update the occlusion state when the page goes back into the window.
1597
1598         * UIProcess/API/mac/WKView.mm:
1599         (-[WKView viewDidMoveToWindow]):
1600             - update occlusion state.
1601
1602 2013-06-28  Gwang Yoon Hwang  <ryumiel@company100.net>
1603
1604         Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
1605         https://bugs.webkit.org/show_bug.cgi?id=104360
1606
1607         Reviewed by Noam Rosenthal.
1608
1609         The CoordinatedLayerTreeHost has too many responsibilities. It
1610         implements LayerTreeHost, GraphicsLayerClient,
1611         CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
1612         UpdateAtlas::Client, GraphicsLayerFactory and
1613         WebCustomFilterProgramProxyClient.
1614
1615         This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
1616
1617         This patch introduces a new class called CompositingCoordinator, which
1618         takes the responsibility of managing compositing resources in
1619         WebProcess.
1620
1621         CoordinatedLayerTreeHost is responsible only for the scheduling and
1622         IPC-specific stuff, which are relevant only for WebKit2.
1623
1624         No new tests, covered by existing tests.
1625
1626         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1627         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
1628         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1629         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
1630         (WebKit::CoordinatedLayerTreeHost::invalidate):
1631         (WebKit::CoordinatedLayerTreeHost::forceRepaint):
1632         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
1633         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
1634         (WebKit::CoordinatedLayerTreeHost::renderNextFrame):
1635         (WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
1636         (WebKit::CoordinatedLayerTreeHost::willSyncLayerState):
1637         (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesForAnimations):
1638         (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
1639         (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
1640         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
1641         (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
1642         (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer):
1643         (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
1644         (WebKit::CoordinatedLayerTreeHost::commitSceneState):
1645         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
1646         (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory):
1647         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
1648         (WebKit::CoordinatedLayerTreeHost::commitScrollOffset):
1649         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1650         * WebProcess/WebPage/LayerTreeHost.h:
1651
1652 2013-06-28  Anders Carlsson  <andersca@apple.com>
1653
1654         Make the UI process run the Java Updater
1655         https://bugs.webkit.org/show_bug.cgi?id=118197
1656         <rdar://problem/14255677>
1657
1658         Reviewed by Sam Weinig.
1659
1660         Patch the relevant NSWorkspace method and pipe through the request to launch the Java updater to the UI process.
1661
1662         * PluginProcess/PluginProcess.h:
1663         * PluginProcess/mac/PluginProcessMac.mm:
1664         (WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
1665         (WebKit::initializeCocoaOverrides):
1666         (WebKit::PluginProcess::launchApplicationAtURL):
1667         * UIProcess/Plugins/PluginProcessProxy.h:
1668         * UIProcess/Plugins/PluginProcessProxy.messages.in:
1669         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1670         (WebKit::isJavaUpdaterURL):
1671         (WebKit::shouldLaunchApplicationAtURL):
1672         (WebKit::PluginProcessProxy::launchApplicationAtURL):
1673
1674 2013-06-28  Tim Horton  <timothy_horton@apple.com>
1675
1676         WARN_UNUSED_RESULT can't be used in API headers, but WKBundlePageExtendIncrementalRenderingSuppression tries to
1677         https://bugs.webkit.org/show_bug.cgi?id=118196
1678         <rdar://problem/14303613>
1679
1680         Reviewed by Anders Carlsson.
1681
1682         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1683
1684 2013-06-28  Andreas Kling  <akling@apple.com>
1685
1686         Don't fire process-became-responsive callback when disconnecting it.
1687         <http://webkit.org/b/118166>
1688
1689         Reviewed by Anders Carlsson.
1690
1691         When disconnecting from a web process, call ResponsivenessTimer::invalidate() instead of
1692         stop() to avoid firing the didBecomeResponsive() callback.
1693
1694         This lets the UI process react faster to actually unresponsive processes.
1695
1696         * UIProcess/WebProcessProxy.cpp:
1697         (WebKit::WebProcessProxy::disconnect):
1698
1699 2013-06-28  Sergio Villar Senin  <svillar@igalia.com>
1700
1701         [WK2][GTK] 100% CPU usage rendering a page with animations
1702         https://bugs.webkit.org/show_bug.cgi?id=117703
1703
1704         Reviewed by Martin Robinson.
1705
1706         Unconditionally update the value of m_lastFlushTime in
1707         ::flushAndRenderLayers. By doing that we avoid a neverending
1708         sequence of layer flushes that happened when m_lastFlushTime==0
1709         and flushPendingLayerChanges() was false. In that situation the
1710         value m_lastFlushTime was never updated so a new flush was always
1711         rescheduled.
1712
1713         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
1714         (WebKit::LayerTreeHostGtk::flushAndRenderLayers):
1715
1716 2013-06-28  Andres Gomez  <agomez@igalia.com>
1717
1718         [GTK] MiniBrowser doesn't solve the saving location when there are no XDG settings
1719         https://bugs.webkit.org/show_bug.cgi?id=117538
1720
1721         Reviewed by Carlos Garcia Campos.
1722
1723         If the XDG specification is not working for the "Downloads"
1724         directory, let's use HOME as fallback.
1725
1726         * UIProcess/API/gtk/WebKitDownload.cpp:
1727         (webkitDownloadDecideDestination):
1728
1729 2013-06-28  Dariusz Frankiewicz  <d.frankiewic@samsung.com>
1730
1731         [EFL][WK2] Add spellcheck API tests in unit tests.
1732         https://bugs.webkit.org/show_bug.cgi?id=118123
1733
1734         Reviewed by Christophe Dumez.
1735
1736         According to discussion in bug https://bugs.webkit.org/show_bug.cgi?id=113742
1737         we're moving spelling tests from layout tests to unit tests.
1738
1739         * UIProcess/API/efl/tests/resources/spelling_selection_tests.html: Added.
1740         New file is needed to make tests, with and without spellcheck attribute.
1741         File contains basic site with content editable fields and buttons which select
1742         different parts of misspelled words.
1743
1744         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
1745         (countContextMenuItems):
1746         Added method used to count number of items in context menu.
1747
1748 2013-06-27  Kangil Han  <kangil.han@samsung.com>
1749
1750         Adopt is/toHTMLInputElement for code cleanup
1751         https://bugs.webkit.org/show_bug.cgi?id=118130
1752
1753         Reviewed by Antti Koivisto.
1754
1755         To enhance readability, this patch adopts is/toHTMLInputElement.
1756         This also helps out to reduce duplicated use of static_cast.
1757
1758         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1759         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
1760         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
1761         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled):
1762         (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
1763         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
1764         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
1765         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1766         (WebKit::WebChromeClient::focusedNodeChanged):
1767         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1768         (WebKit::WebEditorClient::textFieldDidBeginEditing):
1769         (WebKit::WebEditorClient::textFieldDidEndEditing):
1770         (WebKit::WebEditorClient::textDidChangeInTextField):
1771         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
1772         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
1773         * WebProcess/WebPage/WebFrame.cpp:
1774         (WebKit::WebFrame::containsAnyFormControls):
1775         * WebProcess/WebPage/WebPage.cpp:
1776         (WebKit::WebPage::editorState):
1777
1778 2013-06-27  Eunmi Lee  <eunmi15.lee@samsung.com>
1779
1780         [EFL][WK2] Add WK2 C API to handle touch events.
1781         https://bugs.webkit.org/show_bug.cgi?id=108915
1782
1783         Reviewed by Gyuyoung Kim.
1784
1785         Touch events for our target platforms differ (XInput2, Wayland, Tizen) so
1786         for the EFL port we want to be able to feed events manually.
1787
1788         To keep our current API for desktop EFL/Enlightenment working, we convert
1789         our currently limited EFL events to the new EFL specific C EwkTouchPoint
1790         and EwkTouchEvent type.
1791
1792         EwkTouchPoint and EwkTouchEvent are exposed as WKTouchPointRef and
1793         WKTouchEventRef, so they are opaque in the applications.
1794
1795         The WKViewSendTouchEvent can be used for any use-case (platform/product)
1796         not involving the EFL events.
1797
1798         At the same time we make sure to avoid using WK2 internals in our EFL API
1799         implementation.
1800
1801         * PlatformEfl.cmake:
1802         * Shared/API/c/efl/WKBaseEfl.h:
1803         * Shared/APIObject.h:
1804         * Shared/NativeWebTouchEvent.h:
1805         (WebKit::NativeWebTouchEvent::nativeEvent):
1806         * Shared/efl/NativeWebTouchEventEfl.cpp:
1807         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
1808         * Shared/efl/WebEventFactory.cpp:
1809         (WebKit::toWebPlatformTouchPointState):
1810         (WebKit::toWebEventType):
1811         (WebKit::toWebEventModifiers):
1812         (WebKit::WebEventFactory::createWebTouchEvent):
1813         * Shared/efl/WebEventFactory.h:
1814         * UIProcess/API/C/efl/WKAPICastEfl.h:
1815         * UIProcess/API/C/efl/WKEventEfl.cpp: Added.
1816         (WKTouchPointCreate):
1817         (WKTouchEventCreate):
1818         * UIProcess/API/C/efl/WKEventEfl.h: Added.
1819         * UIProcess/API/C/efl/WKViewEfl.cpp:
1820         (WKViewSendTouchEvent):
1821         * UIProcess/API/C/efl/WKViewEfl.h:
1822         * UIProcess/API/efl/EwkView.cpp:
1823         (toWKTouchPointState):
1824         (toWKEventModifiers):
1825         (EwkView::feedTouchEvent):
1826         (EwkView::feedTouchEvents):
1827         * UIProcess/efl/EwkTouchEvent.cpp: Added.
1828         (WebKit::EwkTouchEvent::EwkTouchEvent):
1829         * UIProcess/efl/EwkTouchEvent.h: Added.
1830         (WebKit::EwkTouchEvent::create):
1831         (WebKit::EwkTouchEvent::eventType):
1832         (WebKit::EwkTouchEvent::touchPoints):
1833         (WebKit::EwkTouchEvent::modifiers):
1834         (WebKit::EwkTouchEvent::timestamp):
1835         (WebKit::EwkTouchEvent::type):
1836         * UIProcess/efl/EwkTouchPoint.cpp: Added.
1837         (WebKit::EwkTouchPoint::EwkTouchPoint):
1838         * UIProcess/efl/EwkTouchPoint.h: Added.
1839         (WebKit::EwkTouchPoint::create):
1840         (WebKit::EwkTouchPoint::id):
1841         (WebKit::EwkTouchPoint::state):
1842         (WebKit::EwkTouchPoint::screenPosition):
1843         (WebKit::EwkTouchPoint::position):
1844         (WebKit::EwkTouchPoint::radius):
1845         (WebKit::EwkTouchPoint::rotationAngle):
1846         (WebKit::EwkTouchPoint::forceFactor):
1847         (WebKit::EwkTouchPoint::type):
1848         * UIProcess/efl/WebViewEfl.cpp:
1849         (WebKit::WebViewEfl::sendTouchEvent):
1850         * UIProcess/efl/WebViewEfl.h:
1851
1852 2013-06-27  Csaba Osztrogonác  <ossy@webkit.org>
1853
1854         Fix cast-align warnings in WebKit2/Platform/CoreIPC
1855         https://bugs.webkit.org/show_bug.cgi?id=117987
1856
1857         Reviewed by Rob Buis, WK2 signed-off by Anders Carlsson.
1858
1859         * Platform/CoreIPC/ArgumentDecoder.cpp:
1860         (CoreIPC::ArgumentDecoder::decode):
1861         * Platform/CoreIPC/ArgumentEncoder.cpp:
1862         (CoreIPC::ArgumentEncoder::encode):
1863
1864 2013-06-27  Commit Queue  <commit-queue@webkit.org>
1865
1866         Unreviewed, rolling out r152074.
1867         http://trac.webkit.org/changeset/152074
1868         https://bugs.webkit.org/show_bug.cgi?id=118137
1869
1870         It caused lots of layout and API test crash on Qt Wk2.
1871         (Requested by kadam on #webkit).
1872
1873         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1874         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
1875         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
1876         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
1877         (WebKit::CoordinatedLayerTreeHost::invalidate):
1878         (WebKit::CoordinatedLayerTreeHost::forceRepaint):
1879         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
1880         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
1881         (WebKit::CoordinatedLayerTreeHost::clearPendingStateChanges):
1882         (WebKit::CoordinatedLayerTreeHost::initializeRootCompositingLayerIfNeeded):
1883         (WebKit::CoordinatedLayerTreeHost::syncLayerState):
1884         (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded):
1885         (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
1886         (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
1887         (WebKit::CoordinatedLayerTreeHost::detachLayer):
1888         (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
1889         (WebKit::CoordinatedLayerTreeHost::syncDisplayState):
1890         (WebKit::CoordinatedLayerTreeHost::didPerformScheduledLayerFlush):
1891         (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer):
1892         (WebKit::CoordinatedLayerTreeHost::createImageBackingIfNeeded):
1893         (WebKit::CoordinatedLayerTreeHost::createImageBacking):
1894         (WebKit::CoordinatedLayerTreeHost::updateImageBacking):
1895         (WebKit::CoordinatedLayerTreeHost::clearImageBackingContents):
1896         (WebKit::CoordinatedLayerTreeHost::removeImageBacking):
1897         (WebKit::CoordinatedLayerTreeHost::flushPendingImageBackingChanges):
1898         (WebKit::CoordinatedLayerTreeHost::notifyAnimationStarted):
1899         (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired):
1900         (WebKit::CoordinatedLayerTreeHost::paintContents):
1901         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
1902         (WebKit::CoordinatedLayerTreeHost::deviceScaleFactor):
1903         (WebKit::CoordinatedLayerTreeHost::pageScaleFactor):
1904         (WebKit::CoordinatedLayerTreeHost::createUpdateAtlas):
1905         (WebKit::CoordinatedLayerTreeHost::removeUpdateAtlas):
1906         (WebKit::CoordinatedLayerTreeHost::visibleContentsRect):
1907         (WebKit::CoordinatedLayerTreeHost::mainContentsLayer):
1908         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
1909         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
1910         (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory):
1911         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
1912         (WebKit::CoordinatedLayerTreeHost::renderNextFrame):
1913         (WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
1914         (WebKit::CoordinatedLayerTreeHost::paintToSurface):
1915         (WebKit::CoordinatedLayerTreeHost::scheduleReleaseInactiveAtlases):
1916         (WebKit::CoordinatedLayerTreeHost::releaseInactiveAtlasesTimerFired):
1917         (WebKit::CoordinatedLayerTreeHost::commitScrollOffset):
1918         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1919         * WebProcess/WebPage/LayerTreeHost.h:
1920         (WebKit::LayerTreeHost::setVisibleContentsRect):
1921         (WebKit::LayerTreeHost::renderNextFrame):
1922         (WebKit::LayerTreeHost::purgeBackingStores):
1923
1924 2013-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1925
1926         Fixing some compiler warnings
1927         https://bugs.webkit.org/show_bug.cgi?id=117791
1928
1929         Reviewed by Martin Robinson.
1930
1931         * UIProcess/API/gtk/tests/WebExtensionTest.cpp: Properly
1932         initialized GDBusInterfaceVTable.
1933         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
1934         (webkitWebPageCreate): Added missing fields to the
1935         WKBundlePageLoaderClient.
1936
1937 2013-06-27  Iago Toral Quiroga  <itoral@igalia.com>
1938
1939         Use consistent file names for WidgetBackingStoreGtkX11 class
1940         https://bugs.webkit.org/show_bug.cgi?id=118124
1941
1942         Reviewed by Carlos Garcia Campos.
1943
1944         * UIProcess/cairo/BackingStoreCairo.cpp:
1945
1946 2013-06-27  Alberto Garcia  <agarcia@igalia.com>
1947
1948         [GTK] [WK2] Check value of WEBKIT_INJECTED_BUNDLE_PATH
1949         https://bugs.webkit.org/show_bug.cgi?id=118055
1950
1951         Reviewed by Carlos Garcia Campos.
1952
1953         If the directory pointed at by WEBKIT_INJECTED_BUNDLE_PATH does
1954         not exist, fall back to the system directory.
1955
1956         This makes MiniBrowser work outside the build tree.
1957
1958         * UIProcess/API/gtk/WebKitWebContext.cpp:
1959         (injectedBundleDirectory):
1960
1961 2013-06-26  Simon Cooper  <scooper@apple.com>
1962
1963         Sometimes the Flash Player plugin cannot make outgoing connections
1964         https://bugs.webkit.org/show_bug.cgi?id=118110
1965         <rdar://problem/14270933>
1966
1967         Reviewed by Alexey Proskuryakov.
1968
1969         Allow outgoing and incoming UDP data. Tidy up the QuickTime
1970         profile as it gets the UDP ability from the common profile.
1971
1972         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
1973         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1974
1975 2013-06-26  Simon Cooper  <scooper@apple.com>
1976
1977         Flash Player: deny ipc-posix-sem 59918130
1978         https://bugs.webkit.org/show_bug.cgi?id=118107
1979         <rdar://problem/14271105>
1980
1981         Reviewed by Alexey Proskuryakov.
1982
1983         Allow same-sandbox scoped semaphores on Mavericks. Permit the
1984         named semaphore for older releases.
1985
1986         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
1987
1988 2013-06-26  Gwang Yoon Hwang  <ryumiel@company100.net>
1989
1990         Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
1991         https://bugs.webkit.org/show_bug.cgi?id=104360
1992
1993         Reviewed by Noam Rosenthal.
1994
1995         The CoordinatedLayerTreeHost has too many responsibilities. It
1996         implements LayerTreeHost, GraphicsLayerClient,
1997         CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
1998         UpdateAtlas::Client, GraphicsLayerFactory and
1999         WebCustomFilterProgramProxyClient.
2000
2001         This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
2002
2003         This patch introduces a new class called CompositingCoordinator, which
2004         takes the responsibility of managing compositing resources in
2005         WebProcess.
2006
2007         CoordinatedLayerTreeHost is responsible only for the scheduling and
2008         IPC-specific stuff, which are relevant only for WebKit2.
2009
2010         No new tests, covered by existing tests.
2011
2012         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2013         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
2014         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2015         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
2016         (WebKit::CoordinatedLayerTreeHost::invalidate):
2017         (WebKit::CoordinatedLayerTreeHost::forceRepaint):
2018         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
2019         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
2020         (WebKit::CoordinatedLayerTreeHost::renderNextFrame):
2021         (WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
2022         (WebKit::CoordinatedLayerTreeHost::willSyncLayerState):
2023         (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesForAnimations):
2024         (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
2025         (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
2026         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
2027         (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
2028         (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer):
2029         (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
2030         (WebKit::CoordinatedLayerTreeHost::commitSceneState):
2031         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
2032         (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory):
2033         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
2034         (WebKit::CoordinatedLayerTreeHost::commitScrollOffset):
2035         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2036         * WebProcess/WebPage/LayerTreeHost.h:
2037
2038 2013-06-26  Simon Cooper  <scooper@apple.com>
2039
2040         Silverlight deny ipc-posix-sem LC_Mutex playing Amazon Prime videos
2041         https://bugs.webkit.org/show_bug.cgi?id=118102
2042         <rdar://problem/14194077>
2043
2044         Reviewed by Alexey Proskuryakov.
2045
2046         Allow same-sandbox scoped semaphores on Mavericks. Permit the
2047         named semaphore for older releases.
2048
2049         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
2050
2051 2013-06-26  Simon Cooper  <scooper@apple.com>
2052
2053         Update ColorSync shared memory names in plug-in sandbox profile
2054         https://bugs.webkit.org/show_bug.cgi?id=118099
2055
2056         Reviewed by Alexey Proskuryakov.
2057
2058         Update the common profile to use the names used in Mavericks
2059
2060         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2061
2062 2013-06-26  Anders Carlsson  <andersca@apple.com>
2063
2064         Deprecate StringImpl::charactersWithNullTermination
2065         https://bugs.webkit.org/show_bug.cgi?id=118108
2066
2067         Reviewed by Beth Dakin.
2068
2069         Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.
2070
2071         * Platform/CoreIPC/win/ConnectionWin.cpp:
2072         (CoreIPC::Connection::createServerAndClientIdentifiers):
2073
2074 2013-06-26  Simon Cooper  <scooper@apple.com>
2075
2076         QuickTime plug-in cannot update com.apple.quicktime.plugin.preferences.plist file
2077         https://bugs.webkit.org/show_bug.cgi?id=118098
2078         <rdar://problem/13888138>
2079
2080         Reviewed by Alexey Proskuryakov.
2081
2082         Allow the preference file to be written
2083
2084         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
2085
2086 2013-06-24  Simon Cooper  <scooper@apple.com>
2087
2088         Silverlight triggers sandbox violations: deny network-bind 0.0.0.0:0
2089         https://bugs.webkit.org/show_bug.cgi?id=117966
2090         <rdar://problem/13927918>
2091
2092         Reviewed by Sam Weinig.
2093
2094         Allow assigning (via bind) an ephemeral port before connecting
2095
2096         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
2097         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2098         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
2099         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
2100
2101 2013-06-24  Simon Cooper  <scooper@apple.com>
2102
2103         PluginProcess deny file-read-data /Network/Library under addVolumeTracker
2104         https://bugs.webkit.org/show_bug.cgi?id=117965
2105         <rdar://problem/14121247>
2106
2107         Reviewed by Alexey Proskuryakov.
2108
2109         Silently deny reading /Network/Applications and 
2110         /Network/Library.
2111
2112         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2113
2114 2013-06-24  Kangil Han  <kangil.han@samsung.com>
2115
2116         Adopt is/toHTMLFormElement for code cleanup
2117         https://bugs.webkit.org/show_bug.cgi?id=117937
2118
2119         Reviewed by Andreas Kling.
2120
2121         This refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152859
2122
2123         To enhance readibility, this patch adopts is/toHTMLFormElement.
2124         This also helps out to reduce duplicated use of static_cast.
2125
2126         * WebProcess/WebPage/WebFrame.cpp:
2127         (WebKit::WebFrame::containsAnyFormElements):
2128
2129 2013-06-24  Simon Cooper  <scooper@apple.com>
2130
2131         deny file-read-data /Library/CoreMediaIO/Plug-Ins/DAL
2132         https://bugs.webkit.org/show_bug.cgi?id=117964
2133         <rdar://problem/14036864>
2134
2135         Reviewed by Alexey Proskuryakov.
2136
2137         Permit reading of the /Library/CoreMediaIO/Plug-Ins/DAL
2138         subdirectory.
2139
2140         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2141
2142 2013-06-24  Simon Cooper  <scooper@apple.com>
2143
2144         Repeating sandbox violations when playing Amazon Prime videos with Flash
2145         https://bugs.webkit.org/show_bug.cgi?id=117953
2146         <rdar://problem/14193693>
2147
2148         Reviewed by Alexey Proskuryakov.
2149
2150         Add some missing "standard" files for network service lookups
2151
2152         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2153
2154 2013-06-24  Simon Cooper  <scooper@apple.com>
2155
2156         Plug-in sandbox violations attempting to access com.apple.CoreGraphics.plist
2157         https://bugs.webkit.org/show_bug.cgi?id=117963
2158         <rdar://problem/14084234>
2159
2160         Reviewed by Alexey Proskuryakov.
2161
2162         Permit the reading of the com.apple.CoreGraphics preference file
2163
2164         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2165
2166 2013-06-24  Simon Cooper  <scooper@apple.com>
2167
2168         com.oracle.javadeployment.plist is not correctly specified in the JavaApplet plugin profile
2169         https://bugs.webkit.org/show_bug.cgi?id=117961
2170         <rdar://problem/14223823>
2171
2172         Reviewed by Alexey Proskuryakov.
2173
2174         Remove the trailing extraneous .plist from the preference file rule
2175
2176         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
2177
2178 2013-06-24  Simon Cooper  <scooper@apple.com>
2179
2180         PluginProcess sandbox violations on com.apple.networkConnect.plist when resetting Safari
2181         https://bugs.webkit.org/show_bug.cgi?id=117958
2182         <rdar://problem/13938149>
2183
2184         Reviewed by Alexey Proskuryakov.
2185
2186         Allow reading the com.apple.networkConnect plist.
2187
2188         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
2189
2190 2013-06-24  Simon Cooper  <scooper@apple.com>
2191
2192         Java sandbox violation ipc-posix-shm-read-data /tmp/com.apple.csseed.67
2193         https://bugs.webkit.org/show_bug.cgi?id=117954
2194         <rdar://problem/14166577>
2195
2196         Reviewed by Alexey Proskuryakov.
2197
2198         Permit read access to this shared memory segment
2199
2200         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2201
2202 2013-06-24  Simon Cooper  <scooper@apple.com>
2203
2204         Plugin Sandbox violation in /Library/Audio/Sounds/Banks
2205         https://bugs.webkit.org/show_bug.cgi?id=117957
2206         <rdar://problem/14163582>
2207
2208         Reviewed by Alexey Proskuryakov.
2209
2210         Permit read access to subdirectories under /Library/Audio/Sounds
2211
2212         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2213
2214 2013-06-24  Nick Diego Yamane  <nick.yamane@openbossa.org>
2215
2216         Make sure m_iconDatabaseImpl is not null before closing it
2217         https://bugs.webkit.org/show_bug.cgi?id=117943
2218
2219         Reviewed by Simon Fraser.
2220
2221         Since r150474 WebIconDatabase is closed unconditionally in
2222         TestController destructor, in that case WebKitTestRunner crashes
2223         when no icon database path is set. This misbehavior was observed in
2224         ports such as efl and nix.
2225         In this patch, WebIconDatabase::close() calls m_iconDatabaseImpl->close()
2226         only if m_iconDatabaseImpl is not null, as it's already being done in other
2227         WebIconDatabase's methods, such as isOpen().
2228
2229         * UIProcess/WebIconDatabase.cpp:
2230         (WebKit::WebIconDatabase::close):
2231
2232 2013-06-24  Ruth Fong  <ruth_fong@apple.com>
2233
2234         Expose the mediaHasAudio() function in WK2
2235         https://bugs.webkit.org/show_bug.cgi?id=117946
2236         <rdar://problem/14250527>
2237
2238         Reviewed by Beth Dakin.
2239
2240         Exposes the WebCore::HTMLMediaElement::mediaHasAudio() function
2241         in WK2.
2242
2243         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2244         (WKBundleHitTestResultMediaHasAudio): Added.
2245         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
2246         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2247         (WebKit::InjectedBundleHitTestResult::mediaHasAudio): Added.
2248         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2249
2250 2013-06-24  Anders Carlsson  <andersca@apple.com>
2251
2252         REGRESSION (r147591): can't type in Adobe Connect
2253         https://bugs.webkit.org/show_bug.cgi?id=117947
2254         <rdar://problem/14223539>
2255
2256         Reviewed by Andreas Kling.
2257
2258         With the change in r147591, it is now possible for a plug-in element to be focused before the plug-in
2259         starts. Handle this by focusing the plug-in right after it's started if necessary.
2260
2261         * WebProcess/Plugins/PluginView.cpp:
2262         (WebKit::PluginView::didInitializePlugin):
2263
2264 2013-06-24  Simon Fraser  <simon.fraser@apple.com>
2265
2266         Move displayID stuff from Widget to Chrome
2267         https://bugs.webkit.org/show_bug.cgi?id=117944
2268
2269         Reviewed by Anders Carlsson.
2270
2271         In r151877 I polluted Widget with displayID-related stuff. This would
2272         be better on HostWindow, so move it there. This is a net code reduction,
2273         and eliminates PlatformScreenMac.h, and the NSScreen category.
2274
2275         * WebProcess/WebPage/WebPage.cpp:
2276         (WebKit::WebPage::windowScreenDidChange): Go via chrome().
2277
2278 2013-06-24  Krzysztof Wolanski  <k.wolanski@samsung.com>
2279
2280         [EFL][WK2] Implement unit test callback: onWordGuesses.
2281         https://bugs.webkit.org/show_bug.cgi?id=117794
2282
2283         Reviewed by Christophe Dumez.
2284
2285         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
2286         (onWordGuesses):
2287         Add client suggestions for the word.
2288
2289         (checkClientSuggestionsForWord):
2290         Verify the suggestions that were given by the client.
2291
2292 2013-06-17  Darin Adler  <darin@apple.com>
2293
2294         Sort all the Xcode project files
2295         https://bugs.webkit.org/show_bug.cgi?id=117696
2296
2297         Reviewed by Anders Carlsson.
2298
2299         * WebKit2.xcodeproj/project.pbxproj: Ran the sort-Xcode-project-file script.
2300
2301 2013-06-22  Dean Jackson  <dino@apple.com>
2302
2303         Slightly reduce width threshold on detection of primary snapshotted Plug-In
2304         https://bugs.webkit.org/show_bug.cgi?id=117914
2305         <rdar://problem/14136687>
2306
2307         Reviewed by Simon Fraser.
2308
2309         We've noticed some content that should be detected as the primary snapshotted plug-in,
2310         but is just a bit smaller than our 450x300 minimum threshold. Reduce the width to 400.
2311
2312         * WebProcess/WebPage/WebPage.cpp: Change primarySnapshottedPlugInMinimumWidth from 450 to 400.
2313
2314 2013-06-22  Simon Fraser  <simon.fraser@apple.com>
2315
2316         screen.availWidth always returns width of primary display
2317         https://bugs.webkit.org/show_bug.cgi?id=117863
2318
2319         Reviewed by Geoffrey Garen.
2320     
2321         In WebKit2, Widgets have no platformWidget, so trying to get to the
2322         NSScreen via the platform widget's window never succeeded, and we always
2323         fell back on getting info for the main display.
2324
2325         However, we were already pushing the WKView's displayID down to the
2326         WebProcess for the requestAnimationFrame infrastructure, so use that.
2327         
2328         The WebProcess would not receive a displayID for a WKView until the window
2329         was activated; fix by calling -doWindowDidChangeScreen when the view
2330         moves to a window, rather than doing it from -_windowDidBecomeKey:.
2331         
2332         * UIProcess/API/mac/WKView.mm:
2333         (-[WKView viewDidMoveToWindow]):
2334         (-[WKView _windowDidBecomeKey:]):
2335
2336 2013-06-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2337
2338         [GTK] Do not try to load videos in unit tests
2339         https://bugs.webkit.org/show_bug.cgi?id=117866
2340
2341         Reviewed by Philippe Normand.
2342
2343         It makes the tests slower, and generates and error because we use
2344         a fake src.
2345
2346         * UIProcess/API/gtk/tests/TestContextMenu.cpp:
2347         (testContextMenuDefaultMenu): Use preload='none' in video tag.
2348         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2349         (testWebViewMouseTarget): Ditto.
2350
2351 2013-06-21  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2352
2353         REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere
2354         https://bugs.webkit.org/show_bug.cgi?id=117825
2355
2356         Reviewed by Kentaro Hara.
2357
2358         Use Settings to enable Web Audio instead of RuntimeEnabledFeatures.
2359
2360         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2361         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
2362         * WebProcess/WebPage/WebPage.cpp:
2363         (WebKit::WebPage::updatePreferences):
2364
2365 2013-06-21  Sergio Correia  <sergio.correia@openbossa.org>
2366
2367         [WK2][EFL]: Invalidate the ProcessLauncher when the process is terminated before it has finished launching
2368         https://bugs.webkit.org/show_bug.cgi?id=117865
2369
2370         Reviewed by Christophe Dumez.
2371
2372         Original patch from Carlos Garcia Campos for the Gtk port.
2373
2374         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
2375         (WebKit::ProcessLauncher::terminateProcess): If process is still
2376         launching, just invalidate the launcher. Reset the process
2377         identifier after killing the process.
2378
2379 2013-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2380
2381         [GTK] Migrate WebKitWebResource to GTask
2382         https://bugs.webkit.org/show_bug.cgi?id=117152
2383
2384         Reviewed by Gustavo Noronha Silva.
2385
2386         * UIProcess/API/gtk/WebKitWebResource.cpp:
2387         (resourceDataCallback):
2388         (webkit_web_resource_get_data):
2389         (webkit_web_resource_get_data_finish):
2390
2391 2013-06-20  Sergio Correia  <sergio.correia@openbossa.org>
2392
2393         [WK2] Looping for EINTR on close() is incorrect for Linux, at least
2394         https://bugs.webkit.org/show_bug.cgi?id=117266
2395
2396         Reviewed by Darin Adler.
2397
2398         Call closeWithRetry() to work around a difference in how the retry needs to
2399         be done on Linux.
2400
2401         * Platform/CoreIPC/unix/AttachmentUnix.cpp:
2402         (CoreIPC::Attachment::dispose):
2403         * Platform/CoreIPC/unix/ConnectionUnix.cpp:
2404         (CoreIPC::Connection::platformInvalidate):
2405         * Platform/unix/SharedMemoryUnix.cpp:
2406         (WebKit::SharedMemory::Handle::~Handle):
2407         (WebKit::SharedMemory::create):
2408         (WebKit::SharedMemory::~SharedMemory):
2409         (WebKit::SharedMemory::createHandle):
2410         * PluginProcess/PluginProcess.cpp:
2411         (WebKit::PluginProcess::createWebProcessConnection):
2412         * SharedWorkerProcess/SharedWorkerProcess.cpp:
2413         (WebKit::SharedWorkerProcess::createWebProcessConnection):
2414         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2415         (WebKit::ProcessLauncher::launchProcess): All these places had
2416         ``close-followed-by-EINTR-handling'' replaced with the new closeWithRetry()
2417         function added in this commit.
2418
2419 2013-06-20  Brady Eidson  <beidson@apple.com>
2420
2421         WebProcess hangs loading eff.org (Waiting forever on a sync XHR, NetworkProcess unable to service it).
2422         <rdar://problem/14112329> and https://bugs.webkit.org/show_bug.cgi?id=117842
2423
2424         Reviewed by Alexey Proskuryakov.
2425
2426         * NetworkProcess/HostRecord.cpp:
2427         (WebKit::removeLoaderFromQueue): Utility to clear a Loader out of a LoaderQueue.
2428         (WebKit::HostRecord::removeLoader): Use removeLoaderFromQueue, and also try to clear the loader from m_syncLoadersPending.
2429         (WebKit::HostRecord::servePendingRequestsForQueue): Small refactoring/cleanup.
2430         (WebKit::HostRecord::limitsRequests): Change so that if the number of loaders in flight is exactly equal to the limit, then
2431           allow serving a synchronous loader to go exactly one beyond the limit.
2432         * NetworkProcess/HostRecord.h:
2433
2434         Make the static maxRequestsInFlightPerHost a member of the NetworkResourceLoadScheduler, instead:
2435         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
2436         (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
2437         (WebKit::NetworkResourceLoadScheduler::hostForURL):
2438         * NetworkProcess/NetworkResourceLoadScheduler.h:
2439
2440         * NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
2441         (WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Tell CFNetwork to allow
2442           7 connections per host instead of 6, but tell the scheduler that 6 is still the normal limit.
2443
2444 2013-06-20  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2445
2446         [EFL][WK2] Update text checker documentation.
2447         https://bugs.webkit.org/show_bug.cgi?id=117828
2448
2449         Reviewed by Christophe Dumez.
2450
2451         * UIProcess/API/efl/ewk_text_checker.h:
2452         The client is not responsible for destroying the memory.
2453
2454 2013-06-19  Sam Weinig  <sam@webkit.org>
2455
2456         Expose plug-ins CFBundleShortVersionString in the WKPluginInformation dictionary
2457         https://bugs.webkit.org/show_bug.cgi?id=117816
2458
2459         Reviewed by Geoffrey Garen.
2460
2461         - Adds a new key for the WKPluginInformation dictionary: WKPluginInformationBundleShortVersionKey().
2462
2463         * Shared/API/c/WKPluginInformation.cpp:
2464         (WKPluginInformationBundleShortVersionKey):
2465         * Shared/API/c/WKPluginInformation.h:
2466         * Shared/Plugins/Netscape/PluginInformation.cpp:
2467         (WebKit::pluginInformationBundleShortVersionKey):
2468         * Shared/Plugins/Netscape/PluginInformation.h:
2469         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2470         (WebKit::NetscapePluginModule::getPluginInfo):
2471         * Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
2472         (WebKit::getPlatformPluginModuleInformation):
2473         * Shared/Plugins/PluginModuleInfo.h:
2474
2475 2013-06-19  Ruth Fong  <ruth_fong@apple.com>
2476
2477         <rdar://problem/14197983> Rename functions from Bug 117667 and add safeguards for !ENABLE(VIDEO) platforms (117765)
2478         https://bugs.webkit.org/show_bug.cgi?id=117765
2479
2480         Patch by Ruth Fong <ruth_fong@apple.com>.
2481         Reviewed by Brady Eidson.
2482
2483         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2484         (WKBundleHitTestResultGetMediaType): Updated to use mediaType().
2485
2486         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2487         (WebKit::InjectedBundleHitTestResult::mediaType): Updated.
2488         Renamed getMediaType() to mediaType() and now handles !ENABLE(VIDEO) platforms.
2489
2490         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2491
2492 2013-06-19  Benjamin Poulain  <bpoulain@apple.com>
2493
2494         Use the PlatformEvent timestamp when creating a DOM Event
2495         https://bugs.webkit.org/show_bug.cgi?id=117179
2496
2497         Reviewed by Darin Adler.
2498
2499         * Shared/mac/WebEventFactory.mm:
2500         (WebKit::WebEventFactory::createWebMouseEvent):
2501         (WebKit::WebEventFactory::createWebWheelEvent):
2502         (WebKit::WebEventFactory::createWebKeyboardEvent):
2503         (WebKit::WebEventFactory::createWebGestureEvent):
2504
2505 2013-06-19  Anders Carlsson  <andersca@apple.com>
2506
2507         REGRESSION: Cannot open Silverlight preferences via context menu
2508         https://bugs.webkit.org/show_bug.cgi?id=117806
2509         <rdar://problem/14166644>
2510
2511         Reviewed by Beth Dakin.
2512
2513         Hook the LSOpenCFURLRef function and make the UI process open the URL if it's the URL for the
2514         Silverlight Preferences application. This is what we do for the Flash updater.
2515
2516         * PluginProcess/PluginProcess.h:
2517         * PluginProcess/mac/PluginProcessMac.mm:
2518         (WebKit::openCFURLRef):
2519         (WebKit::initializeShim):
2520         (WebKit::PluginProcess::openURL):
2521         * PluginProcess/mac/PluginProcessShim.h:
2522         * PluginProcess/mac/PluginProcessShim.mm:
2523         (WebKit::shimLSOpenCFURLRef):
2524         * UIProcess/Plugins/PluginProcessProxy.h:
2525         * UIProcess/Plugins/PluginProcessProxy.messages.in:
2526         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2527         (WebKit::isSilverlightPreferencesURL):
2528         (WebKit::shouldOpenURL):
2529         (WebKit::PluginProcessProxy::openURL):
2530
2531 2013-06-19  Krzysztof Wolanski  <k.wolanski@samsung.com>
2532
2533         [EFL][WK2] Implement unit test callback: onSettingChange.
2534         https://bugs.webkit.org/show_bug.cgi?id=117728
2535
2536         Reviewed by Christophe Dumez.
2537
2538         It is finally possible to implement missing unit tests as WebKit2-EFL
2539         has delivered sub menu (r150254).
2540         Add two unit tests for checking onSettingChange callback behaviour,
2541         when toggling "Check Spelling While Typing" in context menu.
2542
2543         Changed types inside callbacksExecutionStats struct from bit field to bool,
2544         because casting from bit field to &bool is invalid (in using waitUntilTrue method).
2545
2546         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
2547         (resetCallbacksExecutionStats):
2548         (onSettingChange):
2549         (findContextMenuItem):
2550         Get determined option from context menu.
2551
2552         (checkCorrectnessOfSpellingItems):
2553         Changed the name of onContextMenuShow method to be consistent with new methods.
2554
2555         (toogleCheckSpellingWhileTyping):
2556         Select "Check Spelling While Typing" in context menu to test whether
2557         onSettingChange is called.
2558
2559 2013-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2560
2561         [GTK][SOUP] Migrate SoupRequestManager to GTask
2562         https://bugs.webkit.org/show_bug.cgi?id=117157
2563
2564         Reviewed by Gustavo Noronha Silva.
2565
2566         GSimpleAsyncResult has been deprecated in favour of GTask.
2567
2568         * WebProcess/soup/WebKitSoupRequestGeneric.cpp:
2569         (webkitSoupRequestGenericSendAsync):
2570         (webkitSoupRequestGenericSendFinish):
2571         * WebProcess/soup/WebSoupRequestManager.cpp:
2572         (WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData):
2573         (WebKit::WebSoupRequestAsyncData::releaseTask):
2574         (WebKit::WebSoupRequestManager::didHandleURIRequest):
2575         (WebKit::WebSoupRequestManager::didFailURIRequest):
2576         (WebKit::WebSoupRequestManager::send):
2577         (WebKit::WebSoupRequestManager::finish):
2578         * WebProcess/soup/WebSoupRequestManager.h:
2579
2580 2013-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2581
2582         [GTK] Migrate WebKitFaviconDatabase to GTask
2583         https://bugs.webkit.org/show_bug.cgi?id=117156
2584
2585         Reviewed by Gustavo Noronha Silva.
2586
2587         * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
2588         (processPendingIconsForPageURL):
2589         (webkit_favicon_database_get_favicon):
2590         (webkit_favicon_database_get_favicon_finish):
2591
2592 2013-06-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2593
2594         [GTK] Migrate WebKitWebView to GTask
2595         https://bugs.webkit.org/show_bug.cgi?id=117154
2596
2597         Reviewed by Gustavo Noronha Silva.
2598
2599         * UIProcess/API/gtk/WebKitWebView.cpp:
2600         (didValidateCommand):
2601         (webkit_web_view_can_execute_editing_command):
2602         (webkit_web_view_can_execute_editing_command_finish):
2603         (webkitWebViewRunJavaScriptCallback):
2604         (webkit_web_view_run_javascript):
2605         (webkit_web_view_run_javascript_finish):
2606         (resourcesStreamReadCallback):
2607         (webkit_web_view_run_javascript_from_gresource):
2608         (webkit_web_view_run_javascript_from_gresource_finish):
2609         (fileReplaceContentsCallback):
2610         (getContentsAsMHTMLDataCallback):
2611         (webkit_web_view_save):
2612         (webkit_web_view_save_finish):
2613         (webkit_web_view_save_to_file):
2614         (webkit_web_view_save_to_file_finish):
2615         (webKitWebViewDidReceiveSnapshot):
2616         (webkit_web_view_get_snapshot):
2617         (webkit_web_view_get_snapshot_finish):
2618
2619 2013-06-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2620
2621         [GTK] Migrate WebKitCookieManager to GTask
2622         https://bugs.webkit.org/show_bug.cgi?id=117150
2623
2624         Reviewed by Gustavo Noronha Silva.
2625
2626         Don't use helper structs for async data since the cancellable is
2627         now accessible from the GTask.
2628
2629         * UIProcess/API/gtk/WebKitCookieManager.cpp:
2630         (webkitCookieManagerGetAcceptPolicyCallback):
2631         (webkit_cookie_manager_get_accept_policy):
2632         (webkit_cookie_manager_get_accept_policy_finish):
2633         (webkitCookieManagerGetDomainsWithCookiesCallback):
2634         (webkit_cookie_manager_get_domains_with_cookies):
2635         (webkit_cookie_manager_get_domains_with_cookies_finish):
2636
2637 2013-06-18  Roger Fong  <roger_fong@apple.com>
2638
2639         Unreviewed. Fix a typo that may be causing some test failures.
2640
2641         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2642         (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs):
2643
2644 2013-06-18  Anders Carlsson  <andersca@apple.com>
2645
2646         Make it possible to set a minimum height for auto-layout
2647         https://bugs.webkit.org/show_bug.cgi?id=117758
2648         <rdar://problem/12849080>
2649
2650         Reviewed by Tim Horton.
2651
2652         Change a bunch of minimumLayoutWidth declarations to minimumLayoutSize and add a new minimumLayoutSize property.
2653         If minimumLayoutSize.height is greater than zero, use it to set the minimum layout size on the frame view.
2654
2655         * Shared/WebPageCreationParameters.cpp:
2656         (WebKit::WebPageCreationParameters::encode):
2657         (WebKit::WebPageCreationParameters::decode):
2658         * Shared/WebPageCreationParameters.h:
2659         * UIProcess/API/mac/WKView.mm:
2660         (-[WKView _setIntrinsicContentSize:]):
2661         (-[WKView minimumLayoutWidth]):
2662         (-[WKView setMinimumLayoutWidth:]):
2663         (-[WKView minimumWidthForAutoLayout]):
2664         (-[WKView setMinimumWidthForAutoLayout:]):
2665         (-[WKView minimumSizeForAutoLayout]):
2666         (-[WKView setMinimumSizeForAutoLayout:]):
2667         * UIProcess/API/mac/WKViewPrivate.h:
2668         * UIProcess/DrawingAreaProxy.h:
2669         (WebKit::DrawingAreaProxy::minimumLayoutSizeDidChange):
2670         * UIProcess/WebPageProxy.cpp:
2671         (WebKit::WebPageProxy::WebPageProxy):
2672         (WebKit::WebPageProxy::creationParameters):
2673         (WebKit::WebPageProxy::setMinimumLayoutSize):
2674         * UIProcess/WebPageProxy.h:
2675         (WebKit::WebPageProxy::minimumLayoutSize):
2676         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2677         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2678         (WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
2679         (WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange):
2680         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
2681         (WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange):
2682         (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
2683         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2684         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2685         * WebProcess/WebPage/WebPage.cpp:
2686         (WebKit::WebPage::WebPage):
2687         (WebKit::WebPage::setMinimumLayoutSize):
2688         * WebProcess/WebPage/WebPage.h:
2689         (WebKit::WebPage::minimumLayoutSize):
2690         * WebProcess/WebPage/WebPage.messages.in:
2691         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2692         (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
2693         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
2694
2695 2013-06-18  Simon Cooper  <scooper@apple.com>
2696
2697         sandbox violation when Flash runs for the first time
2698         https://bugs.webkit.org/show_bug.cgi?id=117753
2699         <rdar://problem/14165466>
2700
2701         Reviewed by Alexey Proskuryakov.
2702
2703         Allow flash to try and change the ownership of directories it has just created.
2704
2705         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2706
2707 2013-06-18  Ruth Fong  <ruth_fong@apple.com>
2708
2709         Expose a getMediaType method in WebKit
2710         https://bugs.webkit.org/show_bug.cgi?id=117667
2711
2712         Reviewed by Brady Eidson.
2713
2714         * GNUmakefile.list.am:
2715         * Target.pri:
2716         Updated to include the added header file InjectedBundleHitTestResultMediaType.h
2717         
2718         * UIProcess/API/C/WKAPICast.h:
2719         (WebKit::toBundleHitTestResultMediaType):
2720         (WebKit::toAPI):
2721         Added methods to convert between BundleHitTestResultMediaType
2722         and WKBundleHitTestResultMediaType.
2723
2724         * WebKit2.xcodeproj/project.pbxproj: Updated to include
2725         InjectedBundleHitTestResultMediaType.h in the WebKit2 project.
2726
2727         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2728         (WKBundleHitTestResultGetMediaType): Exposes the method getMediaType and
2729         hooks into InjectedBundleHitTestResult::getMediaType.
2730
2731         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
2732
2733         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2734         (WebKit::InjectedBundleHitTestResult::getMediaType): Added to return 
2735         what type, if any, a media element is.
2736
2737         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2738
2739         * WebProcess/InjectedBundle/InjectedBundleHitTestResultMediaType.h: Added
2740         to contain new BundleHitTestResultMediaType enums.
2741
2742 2013-06-18  Roger Fong  <roger_fong@apple.com>
2743
2744         Re-implement WebFrameNetworkingContext.
2745         <rdar://problem/13174821>.
2746
2747         Reviewed by Alexey Proskuryakov.
2748
2749         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Added.
2750         (WebKit::WebFrameNetworkingContext::create):
2751         (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):
2752         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Added.
2753         (WebKit::WebFrameNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase):
2754         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2755         (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession):
2756         (WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
2757         (WebKit::WebFrameNetworkingContext::needsSiteSpecificQuirks):
2758         (WebKit::WebFrameNetworkingContext::localFileContentSniffingEnabled):
2759         (WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs):
2760         (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
2761         (WebKit::WebFrameNetworkingContext::blockedError):
2762         (WebKit::WebFrameNetworkingContext::storageSession):
2763
2764 2013-06-18  Alexey Proskuryakov  <ap@apple.com>
2765
2766         <rdar://problem/13174821> Remove files with an incorrect license.
2767
2768         Rubber-stamped by Maciej Stachowiak.
2769
2770         This will break the build, stay tuned for a fix coming soon.
2771
2772         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: Removed.
2773         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: Removed.
2774
2775 2013-06-17  Santosh Mahto  <santosh.ma@samsung.com>
2776
2777         Extra whitespace in blank line in PlatformPopupMenuData.cpp
2778         https://bugs.webkit.org/show_bug.cgi?id=117627
2779
2780         Reviewed by Brent Fulgham.
2781
2782         * Shared/PlatformPopupMenuData.cpp:
2783         (WebKit::PlatformPopupMenuData::decode):
2784         Removing extra space
2785
2786 2013-06-17  Beth Dakin  <bdakin@apple.com>
2787
2788         PageBanners appear over HTML5 video when media element is in full screen mode
2789         https://bugs.webkit.org/show_bug.cgi?id=117721
2790         -and corresponding-
2791         <rdar://problem/13686998>
2792
2793         Reviewed by Sam Weinig.
2794
2795         When an element enters fullscreen, hide the banners. Show them again when the 
2796         element exits fullscreen.
2797         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2798         (WebKit::WebFullScreenManager::willEnterFullScreen):
2799         (WebKit::WebFullScreenManager::willExitFullScreen):
2800
2801         Handle hiding and showing by removing or re-creating a parent layer for m_layer.
2802         * WebProcess/WebPage/PageBanner.cpp:
2803         (WebKit::PageBanner::hide):
2804         (WebKit::PageBanner::showIfHidden):
2805         * WebProcess/WebPage/PageBanner.h:
2806         * WebProcess/WebPage/mac/PageBannerMac.mm:
2807         (WebKit::PageBanner::PageBanner):
2808         (WebKit::PageBanner::hide):
2809         (WebKit::PageBanner::showIfHidden):
2810         (WebKit::PageBanner::mouseEvent):
2811         * WebProcess/WebPage/WebPage.cpp:
2812         (WebKit::WebPage::hidePageBanners):
2813         (WebKit::WebPage::showPageBanners):
2814         * WebProcess/WebPage/WebPage.h:
2815
2816 2013-06-17  Ruth Fong  <ruth_fong@apple.com>
2817
2818         REGRESSION: Important controls are missing from <video> element UI, when compared to QuickTime
2819         https://bugs.webkit.org/show_bug.cgi?id=20599
2820
2821         Add a "Download Video"/"Download Audio" context menu item to download media
2822         elements.
2823
2824         Reviewed by Beth Dakin.
2825
2826         * Shared/API/c/WKContextMenuItemTypes.h: Updated to include
2827         an enum type for the "Download Video/Audio" context menu item.
2828
2829         * Shared/API/c/WKSharedAPICast.h: Updated to associate
2830         the enums in WebKit and WebCore that handle the "Download Video/Audio"
2831         context menu item.
2832
2833         * UIProcess/API/efl/ewk_context_menu.cpp:
2834         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2835         * UIProcess/API/efl/ewk_context_menu_item.h:
2836         Updated to include new EWK enum type for "Download Video/Audio" context menu item.
2837
2838         * UIProcess/WebPageProxy.cpp: Updated to 
2839         handle the "Download Video/Audio" context menu item mouse click
2840         and download the media item in the UI process.
2841
2842 2013-06-17  Ralph Thomas  <ralpht@gmail.com>
2843
2844         [CoordinatedGraphics][CSS Shaders] Use forwarding header for TextureMapperPlatformCompiledProgram.h
2845         https://bugs.webkit.org/show_bug.cgi?id=117712
2846
2847         Reviewed by Noam Rosenthal.
2848
2849         * Shared/CoordinatedGraphics/WebCustomFilterProgramProxy.h:
2850
2851 2013-06-17  Mark Rowe  <mrowe@apple.com>
2852
2853         <rdar://problem/13145014> Allow CoreIPC messages to transmit importance boosts
2854
2855         Transmitting the importance boost from the UI process to the web process is particularly
2856         important when disabling process suppression on a web process, as it will minimize the
2857         delays that can occur before the message instructing process suppression to be disabled
2858         is processed by the web process.
2859
2860         We keep the importance boost alive for the duration of the CoreIPC message handler. We
2861         achieve this by having an ImportanceAssertion object that owns the assertion, and whose
2862         lifetime is tied to that of the MessageDecoder.
2863
2864         Reviewed by Anders Carlsson.
2865
2866         * Platform/CoreIPC/MessageDecoder.cpp:
2867         (CoreIPC::MessageDecoder::setImportanceAssertion): Associate an importance assertion
2868         with this message.
2869         * Platform/CoreIPC/MessageDecoder.h:
2870         * Platform/CoreIPC/mac/ConnectionMac.cpp:
2871         (CoreIPC::Connection::open): Mark our receive port as allowing importance boosts to be received.
2872         (CoreIPC::Connection::receiveSourceEventHandler):
2873         * Platform/CoreIPC/mac/ImportanceAssertion.h:
2874         (CoreIPC::ImportanceAssertion::create):
2875         (CoreIPC::ImportanceAssertion::~ImportanceAssertion): Release the assertion.
2876         (CoreIPC::ImportanceAssertion::ImportanceAssertion): Take an assertion if a boost was present in
2877         the Mach message.
2878
2879 2013-06-17  Mark Rowe  <mrowe@apple.com>
2880
2881         <rdar://problem/14051357> Web processes sometimes remain in a suppressed
2882         state after their window is unoccluded.
2883
2884         The code in WKView that responds to occlusion notifications was incorrectly
2885         treating the window's occlusion state as being an enum rather than the set of
2886         flags that it is.
2887
2888         Reviewed by Oliver Hunt.
2889
2890         * UIProcess/API/mac/WKView.mm:
2891         (-[WKView _windowDidChangeOcclusionState:]): Test only the visibility state.
2892         (-[WKView setWindowOcclusionDetectionEnabled:]): Ditto.
2893
2894 2013-06-17  Michael Brüning  <michael.bruning@digia.com>
2895
2896         [Qt] Remove Qt specific QTKIT flagged code.
2897         https://bugs.webkit.org/show_bug.cgi?id=117635
2898
2899         Reviewed by Simon Hausmann.
2900
2901         Due to disabling QTKIT for Qt in r151546, the
2902         code the flags that are not taken into account
2903         anymore and the code that has been rendered
2904         unreachable by this are removed.
2905
2906         * Target.pri:
2907         * UIProcess/qt/WebContextQt.cpp:
2908         (WebKit::WebContext::platformInitializeWebProcess):
2909         * WebProcess/WebCoreSupport/qt/WebSystemInterface.h: Removed.
2910         * WebProcess/WebCoreSupport/qt/WebSystemInterface.mm: Removed.
2911         * WebProcess/WebPage/WebPage.cpp:
2912         (WebKit::WebPage::updatePreferences):
2913         * WebProcess/qt/WebProcessMainQt.cpp:
2914         (WebKit::WebProcessMainQt):
2915
2916 2013-06-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2917
2918         Unreviewed, rolling out r151632.
2919         http://trac.webkit.org/changeset/151632
2920         https://bugs.webkit.org/show_bug.cgi?id=117585
2921
2922         Debug build error ASSERT(WTF_USE_GRAMMAR_CHECKING) for non MAC
2923         platforms
2924
2925         * Shared/API/c/WKSharedAPICast.h:
2926         (WebKit::toAPI):
2927         (WebKit::toImpl):
2928         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2929         (getEwkActionFromWKTag):
2930         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
2931         (onContextMenuShow):
2932         (TEST_F):
2933         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
2934         (webkitContextMenuActionGetActionTag):
2935         (webkitContextMenuActionGetForContextMenuItem):
2936         (webkitContextMenuActionGetLabel):
2937         * UIProcess/WebPageProxy.cpp:
2938         (WebKit::WebPageProxy::contextMenuItemSelected):
2939
2940 2013-06-14  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2941
2942         Context menu grammar checking items are available when GRAMMAR_CHECKING macro is off
2943         https://bugs.webkit.org/show_bug.cgi?id=117585
2944
2945         Reviewed by Anders Carlsson.
2946
2947         Add GRAMMAR_CHECKING guard to the context menu grammar items.
2948
2949         * Shared/API/c/WKSharedAPICast.h:
2950         (WebKit::toAPI):
2951         (WebKit::toImpl):
2952         * UIProcess/API/efl/ewk_context_menu_item.cpp:
2953         (getEwkActionFromWKTag):
2954         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
2955         (checkSpellingItemsAvailability):
2956         Change callback name, to be consistent with a newly added.
2957
2958         (checkSpellingAndGrammarSubmenuAvailability):
2959         (checkGrammarWithSpellingItemAvailability):
2960         Add two unit tests for EFL to check whether context menu grammar items are
2961         available only when GRAMMAR_CHECKING macro is enabled.
2962
2963         * UIProcess/API/gtk/WebKitContextMenuActions.cpp:
2964         (webkitContextMenuActionGetActionTag):
2965         (webkitContextMenuActionGetForContextMenuItem):
2966         (webkitContextMenuActionGetLabel):
2967         * UIProcess/WebPageProxy.cpp:
2968         (WebKit::WebPageProxy::contextMenuItemSelected):
2969
2970 2013-06-14  Dean Jackson  <dino@apple.com>
2971
2972         Crash in supportsSnapshotting
2973         https://bugs.webkit.org/show_bug.cgi?id=117670
2974         <rdar://problem/14059711>
2975
2976         Reviewed by Darin Adler.
2977
2978         Speculative fix for deferencing a null RefPtr in supportsSnapshotting.
2979         It seems like it was possible to get in a state where the plugin machinery
2980         would fire up and attempt to get a screenshot before there was an active
2981         connection to the plugin process (usually under periods of high load, such
2982         as opening a lot of tabs at once). In this case we're now returning false
2983         from supportsSnapshotting, which will trigger the plugin to restart, but
2984         that's better than requesting a snapshot on something that doesn't yet exist.
2985
2986         * WebProcess/Plugins/PluginProxy.cpp:
2987         (WebKit::PluginProxy::supportsSnapshotting): Guard for an empty connection object.
2988
2989 2013-06-14  Enrica Casucci  <enrica@apple.com>
2990
2991         WKPageFindStringMatches ignores the kWKFindOptionsBackwards option.
2992         https://bugs.webkit.org/show_bug.cgi?id=117647
2993         <rdar://problem/13881024>
2994
2995         Reviewed by Darin Adler.
2996         
2997         The API returns the matched ranges in the DOM order regardless of the
2998         find direction, but the index of the first match after the user selection
2999         should take the find direction into account.
3000
3001         Extended existing test in TestWebKitAPI.
3002
3003         * Shared/API/c/WKFindOptions.h: Added enum for the case where there are
3004         no matches after the user selection in the direction of the find.
3005
3006 2013-06-14  Andres Gomez  <agomez@igalia.com>
3007
3008         [GTK] Compilation problems - hb.h not found
3009         https://bugs.webkit.org/show_bug.cgi?id=117636
3010
3011         Unreviewed GTK+ build fix.
3012
3013         * GNUmakefile.am: Added freetype cflags for WebKit2 GTK+ Platform
3014         library.
3015
3016 2013-06-13  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3017
3018         [EFL][WK2] Wrong context menu and popup menu positions when scroll is applied
3019         https://bugs.webkit.org/show_bug.cgi?id=116610
3020
3021         Reviewed by Noam Rosenthal.
3022
3023         WebKit2 EFL uses fixed layout - because of this ScrollView::contentsToWindow, does
3024         not take scroll into account, as it is meant to be handled by UI application.
3025         When popup and context menu are created, after calling contentsToWindow their position
3026         are not adjusted to page scroll.
3027         Added two functions to EwkView and WKView, converting contents position to user viewport
3028         coordinates, to adjust popup and context menu positions.
3029
3030         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
3031         (WKViewContentsToUserViewport):
3032         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
3033         * UIProcess/API/efl/EwkView.cpp:
3034         (EwkView::showContextMenu):
3035         (EwkView::requestPopupMenu):
3036         * UIProcess/CoordinatedGraphics/WebView.cpp:
3037         (WebKit::WebView::contentsToUserViewport):
3038         * UIProcess/CoordinatedGraphics/WebView.h:
3039
3040 2013-06-12  Anders Carlsson  <andersca@apple.com>
3041
3042         Remove the notion of inactive plug-ins
3043         https://bugs.webkit.org/show_bug.cgi?id=117570
3044         <rdar://problem/13484213>
3045
3046         Reviewed by Tim Horton.
3047
3048         Remove code that deals with inactive plug-ins. We still keep around the kWKPluginLoadPolicyInactive API enum for now.
3049
3050         * Shared/Plugins/PluginModuleInfo.h:
3051         * UIProcess/API/C/WKAPICast.h:
3052         (WebKit::toWKPluginLoadPolicy):
3053         (WebKit::toPluginModuleLoadPolicy):
3054         * UIProcess/Plugins/PluginInfoStore.cpp:
3055         * UIProcess/Plugins/PluginInfoStore.h:
3056         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3057         (WebKit::PluginInfoStore::shouldUsePlugin):
3058         (WebKit::PluginInfoStore::defaultLoadPolicyForPlugin):
3059         * UIProcess/WebPageProxy.cpp:
3060         (WebKit::WebPageProxy::findPlugin):
3061         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
3062         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3063         (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton):
3064         (WebKit::WebChromeClient::unavailablePluginButtonClicked):
3065         * WebProcess/WebPage/WebPage.cpp:
3066         (WebKit::WebPage::createPlugin):
3067
3068 2013-06-12  Hugo Parente Lima  <hugo.lima@openbossa.org>
3069
3070         [GTK] Explicit include glib.h to avoid compilation errors if libsoup isn't used.
3071         https://bugs.webkit.org/show_bug.cgi?id=117564
3072
3073         Reviewed by Martin Robinson.
3074
3075         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
3076
3077 2013-06-12  Zan Dobersek  <zdobersek@igalia.com>
3078
3079         [GTK] Move more build targets for source code that's free of layer violations into libPlatform
3080         https://bugs.webkit.org/show_bug.cgi?id=115936
3081
3082         Reviewed by Martin Robinson.
3083
3084         * GNUmakefile.am: Add GStreamer dependency's CFLAGS to the list of libPlatformGtk2 CPPFLAGS.
3085
3086 2013-06-12  Ruth Fong  <ruth_fong@apple.com>
3087
3088         "Open Video in New Window" doesn't make sense in fullscreen
3089         https://bugs.webkit.org/show_bug.cgi?id=117556
3090
3091         Reviewed by Beth Dakin.
3092
3093         Adds method mediaIsInFullscreen() that checks if a media element is in
3094         fullscreen mode, which is needed to decide when to display the
3095         "Open Video in New Window" context menu item.
3096
3097         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
3098         (WKBundleHitTestResultMediaIsInFullscreen): Added.
3099         Hooks into new InjectedBundleHitTestResult::mediaIsInFullscreen() method.
3100         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
3101         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
3102         (WebKit::InjectedBundleHitTestResult::mediaIsInFullscreen): Added.
3103         Checks if media element is in fullscreen.
3104         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
3105
3106 2013-06-12  Ruth Fong  <ruth_fong@apple.com>
3107
3108         Allow for toggling fullscreen on <video> elements
3109         https://bugs.webkit.org/show_bug.cgi?id=117220
3110
3111         Reviewed by Dean Jackson.
3112
3113         * Shared/API/c/WKContextMenuItemTypes.h:
3114         * Shared/API/c/WKSharedAPICast.h:
3115         Added variables to support the toggle-ability of the fullscreen
3116         video context menu item.
3117
3118 2013-06-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3119
3120         [GTK] Invalidate the ProcessLauncher when the process is terminated before it has finished launching
3121         https://bugs.webkit.org/show_bug.cgi?id=117412
3122
3123         Reviewed by Anders Carlsson.
3124
3125         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
3126         (WebKit::ProcessLauncher::terminateProcess): If process is still
3127         launching just invalidate the launcher. Reset the process
3128         identifier after killing the process.
3129
3130 2013-06-12  Jae Hyun Park  <jae.park@company100.net>
3131
3132         [Coordinated Graphics] Remove unused headers in CoordinatedLayerTreeHostProxy
3133         https://bugs.webkit.org/show_bug.cgi?id=117539
3134
3135         Reviewed by Noam Rosenthal.
3136
3137         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
3138         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
3139
3140 2013-06-12  Zan Dobersek  <zdobersek@igalia.com>
3141
3142         [GTK] Remove the WebCoreLayer(Gtk2).a archives before regenerating them
3143         https://bugs.webkit.org/show_bug.cgi?id=116723
3144
3145         Reviewed by Carlos Garcia Campos.
3146
3147         * GNUmakefile.am: When generating the WebCoreLayerGtk2.a archive from all the dependency archives, remove the
3148         current archive (if any). Updating an existent archive in an incremental build is not bulletproof and can lead
3149         to corrupt archives and subsequent build failures. On the other hand, the archive generation is not expensive
3150         and produces a working archive without problems even on incremental builds.
3151
3152 2013-06-12  Zan Dobersek  <zdobersek@igalia.com>
3153
3154         Unreviewed GTK build fix.
3155
3156         * GNUmakefile.list.am: Adding missing build targets to the plugin process after r151480.
3157
3158 2013-06-11  Gavin Barraclough  <barraclough@apple.com>
3159
3160         Add NSSupportsAppNap keys to WebProcess, PluginProcess
3161         https://bugs.webkit.org/show_bug.cgi?id=117528
3162
3163         Reviewed by Mark Rowe.
3164
3165         * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3166         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
3167         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
3168         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3169         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
3170         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
3171             - add NSSupportsAppNap key.
3172
3173 2013-06-11  Oliver Hunt  <oliver@apple.com>
3174
3175         Make sure we aren't throttling plugin timers during initialisation and destruction
3176         https://bugs.webkit.org/show_bug.cgi?id=117522
3177
3178         Reviewed by Darin Adler.
3179
3180         Add a new ActivityAssertion RAII class to handle allowing/disallowing
3181         timer throttling.  Then make use of it during plugin initialisation
3182         and destruction, as well as any synchronous messages (on the basis
3183         that if another process is waiting for the plugin we shouldn't be
3184         throttling timers).
3185
3186         * CMakeLists.txt:
3187         * GNUmakefile.list.am:
3188         * PluginProcess/WebProcessConnection.cpp:
3189         (WebKit::WebProcessConnection::didReceiveSyncMessage):
3190         (WebKit::WebProcessConnection::destroyPlugin):
3191         (WebKit::WebProcessConnection::createPlugin):
3192         * Shared/ActivityAssertion.cpp: Added.
3193         (WebKit::ActivityAssertion::ActivityAssertion):
3194         (WebKit::ActivityAssertion::~ActivityAssertion):
3195         * Shared/ActivityAssertion.h: Added.
3196         * Target.pri:
3197         * WebKit2.xcodeproj/project.pbxproj:
3198
3199 2013-06-06  Timothy Hatcher  <timothy@apple.com>
3200
3201         Update the framework bundle identifier for the Web Inspector.
3202
3203         Reviewed by Mark Rowe.
3204
3205         * UIProcess/mac/WebInspectorProxyMac.mm:
3206         (WebKit::inspectorReallyUsesWebKitUserInterface):
3207         (WebKit::WebInspectorProxy::inspectorPageURL):
3208         (WebKit::WebInspectorProxy::inspectorBaseURL):
3209         * WebProcess/WebPage/mac/WebInspectorMac.mm:
3210         (WebKit::inspectorReallyUsesWebKitUserInterface):
3211         (WebKit::WebInspector::localizedStringsURL):
3212
3213 2013-06-11  Jer Noble  <jer.noble@apple.com>
3214
3215         Do not filter cookies requested through the CookieStorageShim.
3216         https://bugs.webkit.org/show_bug.cgi?id=117511
3217         <rdar://problem/13603433>
3218
3219         Reviewed by Beth Dakin.
3220
3221         Since the shim function is called when the underlying media engine is
3222         creating an HTTPRequest, use CookieRequestHeaderFieldValue (which does
3223         not filter out HTTP-only cookies) rather than CookiesForDOM (which does).
3224
3225         * Shared/mac/CookieStorageShim.cpp:
3226         (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
3227
3228 2013-06-11  Seokju Kwon  <seokju.kwon@gmail.com>
3229
3230         Remove leftover wxWebkit code
3231         https://bugs.webkit.org/show_bug.cgi?id=117471
3232
3233         Reviewed by Andreas Kling.
3234
3235         * Scripts/generate-forwarding-headers.pl:
3236
3237 2013-06-11  Changhyup Jwa  <ch.jwa@samsung.com>
3238
3239         [EFL][WK2] Add fallback for EWK2UnitTestBase if opengl is not available.
3240         https://bugs.webkit.org/show_bug.cgi?id=117504
3241
3242         Reviewed by Christophe Dumez.
3243
3244         There're many fails on efl webkit2 unit test if opengl is not available.
3245         So, add fallback to non-opengl evas engine.
3246
3247         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
3248         (EWK2UnitTest::EWK2UnitTestBase::SetUp):
3249
3250 2013-06-11  Csaba Osztrogonác  <ossy@webkit.org>
3251
3252         Make WTR use its own temporary directory for application cache
3253         https://bugs.webkit.org/show_bug.cgi?id=117143
3254
3255         Reviewed by Alexey Proskuryakov.
3256
3257         * UIProcess/API/C/WKContext.cpp:
3258         (WKContextSetApplicationCacheDirectory):
3259         * UIProcess/API/C/WKContextPrivate.h:
3260         * UIProcess/WebContext.cpp:
3261         (WebKit::WebContext::applicationCacheDirectory):
3262         * UIProcess/WebContext.h:
3263         (WebKit::WebContext::setApplicationCacheDirectory):
3264         * UIProcess/efl/WebContextEfl.cpp:
3265         (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
3266         * UIProcess/gtk/WebContextGtk.cpp:
3267         (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
3268         * UIProcess/mac/WebContextMac.mm:
3269         (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
3270         * UIProcess/qt/WebContextQt.cpp:
3271         (WebKit::WebContext::platformDefaultApplicationCacheDirectory):
3272
3273 2013-06-11  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3274
3275         [EFL][WK2] Fix test_ewk2_context_menu
3276         https://bugs.webkit.org/show_bug.cgi?id=116601
3277
3278         Reviewed by Gyuyoung Kim.
3279
3280         test_ewk2_context_menu is always passing, it does not test any context menu feature
3281         as it ends before context menu is called.
3282         One single test was divided into two tests: testing WebKit2 created context menu and
3283         testing menus and items created by application.
3284
3285         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
3286         (EWK2UnitTest::EWK2UnitTestBase::waitUntilTrue): added function introducing internal loop until boolean value is changed to true
3287         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
3288         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
3289         (customItemSelected):
3290         (showContextMenu):
3291         (showContextMenuForRemoveAndAppend):
3292         (showContextMenuForSubmenu):
3293         (hideContextMenu):
3294         (TEST_F):
3295
3296 2013-06-11  Ryuan Choi  <ryuan.choi@samsung.com>
3297
3298         [EFL][WK2] Add ewk_view_navigate API
3299         https://bugs.webkit.org/show_bug.cgi?id=117467
3300
3301         Reviewed by Christophe Dumez.
3302
3303         The applications will use this API to navigate history more than one step.
3304
3305         * UIProcess/API/efl/ewk_back_forward_list_item_private.h:
3306         (EwkBackForwardListItem::wkItem): Return WKBackForwardListItemRef for page to navigate.
3307         * UIProcess/API/efl/ewk_view.cpp:
3308         (ewk_view_navigate_to): Added new API.
3309         * UIProcess/API/efl/ewk_view.h:
3310         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3311         (TEST_F): Added more test case for navigation.
3312
3313 2013-06-10  Jae Hyun Park  <jae.park@company100.net>
3314
3315         [CoordinatedGraphics] Typos in custom shader support
3316         https://bugs.webkit.org/show_bug.cgi?id=117413
3317
3318         Reviewed by Noam Rosenthal.
3319
3320         Wrong keyframe is passed when assigning filterValue.
3321
3322         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3323         (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded):
3324
3325 2013-06-10  Seokju Kwon  <seokju.kwon@gmail.com>
3326
3327         [Qt][GTK] Build fix after r151403
3328         https://bugs.webkit.org/show_bug.cgi?id=117452
3329
3330         Reviewed by Csaba Osztrogonác.
3331
3332         * UIProcess/API/gtk/PageClientImpl.cpp:
3333         (WebKit::PageClientImpl::preferencesDidChange):
3334         * UIProcess/API/gtk/PageClientImpl.h:
3335         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
3336         (QRawWebViewPrivate::preferencesDidChange):
3337         * UIProcess/qt/QtPageClient.h:
3338         (WebKit::QtPageClient::preferencesDidChange):
3339
3340 2013-06-10  Commit Queue  <commit-queue@webkit.org>
3341
3342         Unreviewed, rolling out r151411.
3343         http://trac.webkit.org/changeset/151411
3344         https://bugs.webkit.org/show_bug.cgi?id=117453
3345
3346         because it is duplicated with Bug 117441 (Requested by
3347         gyuyoung_ on #webkit).
3348
3349         * UIProcess/efl/WebViewEfl.cpp:
3350         * UIProcess/efl/WebViewEfl.h:
3351
3352 2013-06-10  Jaehun Lim  <ljaehun.lim@samsung.com>
3353
3354         Fix build error and warning
3355         https://bugs.webkit.org/show_bug.cgi?id=117441
3356
3357         Reviewed by Anders Carlsson.
3358
3359         * UIProcess/CoordinatedGraphics/WebView.cpp:
3360         (WebKit::WebView::preferencesDidChange): Added.
3361         (WebKit::WebView::createPopupMenuProxy): Remove 'page'.
3362         * UIProcess/CoordinatedGraphics/WebView.h:
3363
3364 2013-06-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3365
3366         Unreviewed, EFL Build fix after r151403.
3367
3368         Added preferencesDidChange to WebViewEfl.
3369
3370         * UIProcess/efl/WebViewEfl.cpp:
3371         (WebKit::WebViewEfl::preferencesDidChange):
3372         * UIProcess/efl/WebViewEfl.h:
3373
3374 2013-06-10  Anders Carlsson  <andersca@apple.com>
3375
3376         Crash in StorageAreaMap::applyChange when clearing local storage in another web process
3377         https://bugs.webkit.org/show_bug.cgi?id=117440
3378         <rdar://problem/13961548>
3379
3380         Reviewed by Tim Horton.
3381
3382         Add an early return so we won't try to look up a null key in the m_pendingValueChanges map.
3383         Also, fix an assertion - it's fine for m_storageMap to be null in applyChange.
3384
3385         * WebProcess/Storage/StorageAreaMap.cpp:
3386         (WebKit::StorageAreaMap::applyChange):
3387
3388 2013-06-10  Sergio Correia  <sergio.correia@openbossa.org>
3389
3390         [WK2][CoordinatedGraphics] Add default case to switches to fix strict build
3391         https://bugs.webkit.org/show_bug.cgi?id=117416
3392
3393         Reviewed by Noam Rosenthal.
3394
3395         This patch fixes a strict build by asserting on the default case of two
3396         switch statements where gcc was previously complaining of unhandled cases.
3397
3398         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3399         (CoreIPC::::encode):
3400         (CoreIPC::::decode):
3401
3402 2013-06-10  Anders Carlsson  <andersca@apple.com>
3403
3404         -[WKView _updateWindowAndViewFrames] should avoid updating the view frame in window coordinates if we don't have plugins
3405         https://bugs.webkit.org/show_bug.cgi?id=117420
3406         <rdar://problem/14073034>
3407
3408         Reviewed by Tim Horton.
3409
3410         If plug-ins are disabled there's no need for the web process to know about the view frame in window coordinates so only
3411         send it when plug-ins are enabled. In addition, if accessibility is disabled we don't need to send a message at all.
3412
3413         * UIProcess/API/mac/PageClientImpl.h:
3414         * UIProcess/API/mac/PageClientImpl.mm:
3415         (WebKit::PageClientImpl::preferencesDidChange):
3416         Call through to -[WKView _preferencesDidChange].
3417
3418         * UIProcess/API/mac/WKView.mm:
3419         (-[WKView _updateWindowAndViewFrames]):
3420         Don't compute viewFrameInWindowCoordinates or accessibilityPosition unless they're required. If neither are required,
3421         don't even send a message to the web process.
3422
3423         (-[WKView _preferencesDidChange]):
3424         Update _needsViewFrameInWindowCoordinates and call -[WKView _updateWindowAndViewFrames] if needed.
3425
3426         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
3427         Set _needsViewFrameInWindowCoordinates based on whether plug-ins are enabled or not.
3428
3429         * UIProcess/WebPageProxy.cpp:
3430         (WebKit::WebPageProxy::preferencesDidChange):
3431         Call the page client.
3432
3433 2013-06-10  Bear Travis  <betravis@adobe.com>
3434
3435         [CSS Shapes][CSS Exclusions] Split CSS Exclusions and CSS Shapes code
3436         https://bugs.webkit.org/show_bug.cgi?id=117162
3437
3438         Reviewed by Alexandru Chiculita.
3439
3440         Adding the WebCore/rendering/shapes directory to the include list.
3441
3442         * CMakeLists.txt:
3443
3444 2013-06-10  Iago Toral Quiroga  <itoral@igalia.com>
3445
3446         Use Cairo implementation of the WidgetBackingStore instead of X11 when running on Wayland
3447         https://bugs.webkit.org/show_bug.cgi?id=116717
3448
3449         Reviewed by Martin Robinson.
3450
3451         Decide which implementation of WidgetBackingStore to use (X11 or Cairo)
3452         depending on whether we are running on X11 or not. Select Cairo
3453         implementation when not running in X11.
3454
3455         * UIProcess/cairo/BackingStoreCairo.cpp:
3456         (WebKit):
3457         (WebKit::createBackingStoreForGTK):
3458         (WebKit::BackingStore::incorporateUpdate):
3459
3460 2013-06-09  Jae Hyun Park  <jae.park@company100.net>
3461
3462         [CoordinatedGraphics] Typo in argument decoder for CoordinatedGraphicsState
3463         https://bugs.webkit.org/show_bug.cgi?id=117384
3464
3465         Reviewed by Noam Rosenthal.
3466
3467         For CSS Shaders, it must decode state.customFiltersToRemove instead of
3468         state.updateAtlasesToRemove.
3469
3470         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3471         (CoreIPC::::decode):
3472
3473 2013-06-08  Jae Hyun Park  <jae.park@company100.net>
3474
3475         [Coordinated Graphics] Pass the ownership of GraphicsSurface explicitly
3476         https://bugs.webkit.org/show_bug.cgi?id=117379
3477
3478         Reviewed by Noam Rosenthal.
3479
3480         When creating WebCoordinatedSurface with GraphicsSurface, it is clearer
3481         to pass the ownership of the created GraphicsSurface explicitly.
3482
3483         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
3484         (WebKit::WebCoordinatedSurface::create):
3485
3486 2013-06-07  Anders Carlsson  <andersca@apple.com>
3487
3488         Coalesce multiple calls to WebPageProxy::windowAndViewFramesChanged
3489         https://bugs.webkit.org/show_bug.cgi?id=117364
3490         <rdar://problem/14042099>
3491
3492         Reviewed by Geoffrey Garen.
3493
3494         -[WKView _updateWindowAndViewFrames] can be called many times per run loop iteration so coalesce calls
3495         to WebPageProxy::windowAndViewFrames using dispatch_async.
3496
3497         * UIProcess/API/mac/WKView.mm:
3498         (-[WKView _updateWindowAndViewFrames]):
3499
3500 2013-06-07  Thomas Deniau  <deniau@apple.com>
3501
3502         Reproducible crash with triple-finger-tap "define word" gesture on a Netflix video
3503         https://bugs.webkit.org/show_bug.cgi?id=117020
3504
3505         Reviewed by Ryosuke Niwa.
3506
3507         * WebProcess/WebPage/mac/WebPageMac.mm:
3508         (WebKit::WebPage::performDictionaryLookupAtLocation):
3509         Don't invoke the Dictionary lookup when we failed to extract the range of the token
3510         surrounding the tapped position.
3511
3512 2013-06-07  Enrique Ocana Gonzalez  <eocanha@igalia.com>
3513
3514         [GTK] Weird behaviour and no clues to the user when the shared memory file can't be opened
3515         https://bugs.webkit.org/show_bug.cgi?id=117063
3516
3517         Reviewed by Anders Carlsson.
3518
3519         Log error message when the shared memory file can't be opened in
3520         Unix platform using a release build
3521
3522         * Platform/unix/SharedMemoryUnix.cpp:
3523         (WebKit::SharedMemory::create):
3524
3525 2013-06-07  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
3526
3527         [EFL][WK2] Context menu spellchecking items are not available when "Check Spelling While Typing" is off
3528         https://bugs.webkit.org/show_bug.cgi?id=117190
3529
3530         Reviewed by Christophe Dumez.
3531
3532         Context menu items (suggestions, learn and ignore word) are not available
3533         due to missing dictionary. To get the suggestions for the misspelled word,
3534         the dictionary has to be loaded first.
3535
3536         WebKit loads the default dictionary when check spelling while typing is being enabled.
3537         However, context menu spellchecking items should be present even if this setting is off.
3538
3539         * UIProcess/API/efl/ewk_context.cpp:
3540         (EwkContext::EwkContext):
3541         Load the user's default dictionary to ensure context menu spellchecking items.
3542         The dictionary is loaded asynchronously so it shouldn't delay application.
3543
3544         * UIProcess/API/efl/ewk_text_checker.h:
3545         Update doc. Spelling suggestions, learn and ignore word should be available
3546         independently of checking spelling while typing setting.
3547
3548         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
3549         (onContextMenuShow):
3550         (TEST_F):
3551         Add two unit tests to check whether the default dictionary is loaded and
3552         whether the context menu spelling items are available.
3553
3554         * UIProcess/efl/TextCheckerEfl.cpp:
3555         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
3556         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
3557         Not set the default dictionary while enabling the setting, it's already loaded.
3558
3559 2013-06-07  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3560
3561         [EFL][WK2] Implement customContextMenuItemSelected
3562         https://bugs.webkit.org/show_bug.cgi?id=117298
3563
3564         Reviewed by Christophe Dumez.
3565
3566         When custom context menu item is selected using ewk API, the feedback is not
3567         sent back to application, as customContextMenuItemSelected was unimplemented in
3568         contextMenuClientEfl.
3569
3570         * UIProcess/API/efl/EwkView.cpp:
3571         (EwkView::customContextMenuItemSelected):
3572         * UIProcess/API/efl/EwkView.h:
3573         * UIProcess/API/efl/ewk_view.h: added custom_item_selected callback.
3574         * UIProcess/efl/ContextMenuClientEfl.cpp:
3575         (customContextMenuItemSelected):
3576         (ContextMenuClientEfl::ContextMenuClientEfl):
3577
3578 2013-06-06  Oliver Hunt  <oliver@apple.com>
3579
3580         Completely initialize ChildProcess state on launch
3581         https://bugs.webkit.org/show_bug.cgi?id=117328
3582
3583         Reviewed by Sam Weinig.
3584
3585         Use setProcessSuppressionEnabledInternal to avoid setProcessSuppressionEnabled
3586         "optimizing" our initialization away.
3587
3588         * Shared/mac/ChildProcessMac.mm:
3589         (WebKit::ChildProcess::platformInitialize):
3590
3591 2013-06-06  Rafael Brandao  <rafael.lobo@openbossa.org>
3592
3593         [Gtk] Connection is leaking when WebProcess is terminated
3594         https://bugs.webkit.org/show_bug.cgi?id=117293
3595
3596         Reviewed by Martin Robinson.
3597
3598         Connection is leaking because WorkQueue::SocketEventSource inherits from
3599         WorkQueue::EventSource but when it is destroyed, the actual destructor running
3600         is the one from base class; however, subclass contains a function binded from
3601         Connection (m_closeFunction) and we need to do this extra cleanup, otherwise
3602         WorkQueue will keep Connection alive. A better explanation of this fix is provided
3603         on http://stackoverflow.com/questions/461203/when-to-use-virtual-destructors
3604
3605         A quick way to see the leak is to change WK2 test "ReloadPageAfterCrash" to terminate
3606         WebProcess N times and add a printf on Connection destructor.
3607
3608         * Platform/gtk/WorkQueueGtk.cpp:
3609         (WorkQueue::EventSource::~EventSource): Adds a virtual destructor to enable
3610         the subclass to do its own cleanup.
3611
3612 2013-06-06  Jae Hyun Park  <jae.park@company100.net>
3613
3614         Coordinated Graphics : Refactor CoordinatedSurface to manage the lifecycle of GraphicsContext
3615         https://bugs.webkit.org/show_bug.cgi?id=108899
3616
3617         Reviewed by Noam Rosenthal.
3618
3619         This is a preparation patch for Threaded Coordinated Graphics.
3620
3621         This patch changes CoordinatedSurface to be responsible for the
3622         lifecycle of GraphicsContext used in Coordinated Graphics System.
3623         CoordinatedImageBacking and UpdateAtlas do not ask for the ownership
3624         of GraphicsContext anymore. Instead, those classes use client pattern to
3625         ask the CoordiantedSurface to paint to the GraphicsContext.
3626
3627         This refactoring is needed to implement CoordinatedSurface for Threaded
3628         Coordinated Graphics.
3629
3630         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
3631         (WebKit::WebCoordinatedSurface::paintToSurface):
3632         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
3633         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3634         (WebKit::CoordinatedLayerTreeHost::paintToSurface):
3635         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3636
3637 2013-06-05  Kangil Han  <kangil.han@samsung.com>
3638
3639         [EFL][WK2] Fix test_ewk2_view unit test timed out issue
3640         https://bugs.webkit.org/show_bug.cgi?id=117251
3641
3642         Reviewed by Christophe Dumez.
3643
3644         'ewk_view_contents_size_changed' unit test case has been timed out since r150802 because
3645         same size is filtered by WebView class. So create one different test html string that has
3646         different size to continue unit tests.
3647
3648         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
3649         (onContentsSizeChangedPortrait):
3650         (onContentsSizeChangedLandscape):
3651         (TEST_F):
3652
3653 2013-06-05  Bear Travis  <betravis@adobe.com>
3654
3655         [CSS Exclusions][CSS Shapes] Split CSS Exclusions & Shapes compile & runtime flags
3656         https://bugs.webkit.org/show_bug.cgi?id=117172
3657
3658         Reviewed by Alexandru Chiculita.
3659
3660         Adding the CSS_SHAPES compile flag.
3661
3662         * Configurations/FeatureDefines.xcconfig:
3663
3664 2013-06-05  Anders Carlsson  <andersca@apple.com>
3665
3666         Crash if an IPC connection is invalidated before it's completely set up
3667         https://bugs.webkit.org/show_bug.cgi?id=117274
3668         <rdar://problem/13319035>
3669
3670         Reviewed by Andreas Kling.
3671
3672         Resume our dispatch sources on the connection queue so we won't get invalidation callbacks before
3673         all sources have been set up.
3674
3675         * Platform/CoreIPC/mac/ConnectionMac.cpp:
3676         (CoreIPC::Connection::open):
3677         (CoreIPC::Connection::sendOutgoingMessage):
3678         (CoreIPC::Connection::initializeDeadNameSource):
3679         (CoreIPC::Connection::receiveSourceEventHandler):
3680
3681 2013-06-05  Tim Horton  <timothy_horton@apple.com>
3682
3683         [wk2] WebProcess' page-in-window count can be wrong
3684         https://bugs.webkit.org/show_bug.cgi?id=117106
3685         <rdar://problem/14040991>
3686
3687         Reviewed by Anders Carlsson.
3688
3689         If we're using a single WebProcess and a window is closed, we were
3690         not decrementing the page-in-window count (because we apparently don't
3691         setIsInWindow(false) a WebPage in a closing window before tearing it down).
3692
3693         Turn the page-in-window count into a HashSet of pageIDs instead.
3694
3695         * WebProcess/WebPage/WebPage.cpp:
3696         (WebKit::WebPage::WebPage):
3697         (WebKit::WebPage::setIsInWindow):
3698         Send the pageID instead (this change is just so that I don't need to
3699         fetch the WebPage in WebProcess::removeWebPage).
3700
3701         * WebProcess/WebProcess.cpp:
3702         (WebKit::WebProcess::WebProcess):
3703         Remove m_inWindowPageCount.
3704
3705         (WebKit::WebProcess::removeWebPage):
3706         Ensure that WebPages being torn-down are removed from the in-window WebPage set.
3707
3708         (WebKit::WebProcess::pageDidEnterWindow):
3709         (WebKit::WebProcess::pageWillLeaveWindow):
3710         Use our new HashSet instead of a count.
3711
3712         (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired):
3713         Make sure that we don't have any visible pages before doing cleanup.
3714
3715         * WebProcess/WebProcess.h:
3716         Remove m_inWindowPageCount.
3717         Add m_inWindowPageSet.
3718         Make pageDidEnterWindow/pageWillLeaveWindow take pageID instead of WebPage.
3719
3720 2013-06-05  Tim Horton  <timothy_horton@apple.com>
3721
3722         REGRESSION (r148713): Crash under waitForDidUpdateInWindowState
3723         https://bugs.webkit.org/show_bug.cgi?id=117268
3724         <rdar://problem/13822353>
3725
3726         Reviewed by Anders Carlsson.
3727
3728         Check if the WebProcess is valid before waiting for a message from it.
3729         Reset the bool that tells us that we have an outstanding didUpdateInWindowState message if the WebProcess quits.
3730
3731         * UIProcess/WebPageProxy.cpp:
3732         (WebKit::WebPageProxy::waitForDidUpdateInWindowState):
3733         (WebKit::WebPageProxy::resetStateAfterProcessExited):
3734
3735 2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>
3736
3737         [Coordinated Graphics] Prevent a recursive painting in CoordinatedGraphicsLayer
3738         https://bugs.webkit.org/show_bug.cgi?id=117222
3739
3740         Reviewed by Noam Rosenthal.
3741
3742         CoordinatedGraphicsLayer::flushCompositingState() will cross frame
3743         boundaries if the GraphicsLayers are connected. In this case,
3744         updateContentBuffers will invoke a painting of a sub-frame that causes
3745         flushCompositingState recursively.
3746
3747         To prevent this behavior this patch extracts updateContentBuffers from
3748         flushCompositingState, and places it in
3749         updateContentBuffersIncludeSublayers, which traverses the tree
3750         separately from flushing the state for painting.
3751
3752         No new tests, covered by existing tests.
3753
3754         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3755         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
3756
3757 2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>
3758
3759         [Coordinated Graphics] Rename client classes for CoordinatedImageBacking and UpdateAtlas.
3760         https://bugs.webkit.org/show_bug.cgi?id=111948
3761
3762         Reviewed by Noam Rosenthal.
3763
3764         This patch renames CoordinatedImageBacking::Coordinator to
3765         CoordinatedImageBacking::Client, and UpdateAtlasClient to
3766         UpdateAtlas::Client for naming consistency and clarification.
3767
3768         No new tests, covered by existing tests.
3769
3770         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3771
3772 2013-06-05  Gwang Yoon Hwang  <ryumiel@company100.net>
3773
3774         [Coordinated Graphics] Unify messages related object's lifecycles into CoordinatedGraphicsState.
3775         https://bugs.webkit.org/show_bug.cgi?id=111919
3776
3777         Reviewed by Noam Rosenthal.
3778
3779         CoordinatedLayerTreeHostProxy has several methods, which simply passes
3780         these calls to CoordinatedGraphicsScene.
3781
3782         This patch removes methods in CoordinatedLayerTreeHostProxy just for
3783         message chaining. Instead of that, messages for creation/deletion of objects
3784         (Layers, CustomFilters, UpdateAtlas, and ImageBacking) are unified into
3785         CommitCoordinatedGraphicsState.
3786
3787         And this patch also removes codes for WebCoordinatedSurface in
3788         CoordinatedLayerTreeHost, except for a factory method.
3789         CoordinatedGraphicsArgumentCoders [en|de]codes CoordinatedSurface itself
3790         using WebCoordinatedSurface.
3791
3792         No new tests, covered by existing tests.
3793
3794         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
3795         (CoreIPC::encodeCoordinatedSurface):
3796         (CoreIPC::decodeCoordinatedSurface):
3797         (CoreIPC::::encode):
3798         (CoreIPC::::decode):
3799         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
3800         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
3801         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
3802         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3803         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
3804         (WebKit::CoordinatedLayerTreeHost::clearPendingStateChanges):
3805         (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
3806         (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
3807         (WebKit::CoordinatedLayerTreeHost::detachLayer):
3808         (WebKit::CoordinatedLayerTreeHost::createImageBacking):
3809         (WebKit::CoordinatedLayerTreeHost::updateImageBacking):
3810         (WebKit::CoordinatedLayerTreeHost::clearImageBackingContents):
3811         (WebKit::CoordinatedLayerTreeHost::removeImageBacking):
3812         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
3813         (WebKit::CoordinatedLayerTreeHost::createUpdateAtlas):
3814         (WebKit::CoordinatedLayerTreeHost::removeUpdateAtlas):
3815         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3816
3817 2013-06-04  Simon Cooper  <scooper@apple.com>
3818
3819         Tighten plugin sandbox profiles against symlink attacks
3820         https://bugs.webkit.org/show_bug.cgi?id=117219
3821         <rdar://problem/13044569>
3822
3823         Reviewed by Sam Weinig.
3824
3825         This inserts deny rules for creating symbolic links. The rules are
3826         inserted at the end of sandbox profile compilation by overriding the
3827         finalizer.  The initial value of %finalize must be the last function
3828         called.
3829
3830         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3831
3832 2013-06-04  Chris Fleizach  <cfleizach@apple.com>
3833
3834         AX: WK2: accessibility position is calculated every time window frame is updated
3835         https://bugs.webkit.org/show_bug.cgi?id=117201
3836
3837         Reviewed by Tim Horton.
3838
3839         Only calculate the AX position if AX has already been enabled when updating the
3840         WKView's window and frame.
3841
3842         * UIProcess/API/mac/WKView.mm:
3843         (-[WKView _updateWindowAndViewFrames]):
3844         (-[WKView _accessibilityRegisterUIProcessTokens]):
3845             Don't call accessibilityAttributeValue: here because it could enable accessibility prematurely.
3846         (-[WKView enableAccessibilityIfNecessary]):
3847             After enabling AX for the first time, also update the frame so that the AX position is correct.
3848         (-[WKView accessibilityFocusedUIElement]):
3849         (-[WKView accessibilityHitTest:]):
3850         (-[WKView accessibilityAttributeValue:]):
3851             Tell the AXObjectCache that AX is now enabled.
3852
3853 2013-06-04  Mark Rowe  <mrowe@apple.com>
3854
3855         REGRESSION (r151043): Frequent crashes inside WebPageProxy::getPlugInInformation
3856         <http://webkit.org/b/117180>
3857
3858         Reviewed by Brady Eidson.
3859
3860         * UIProcess/mac/WebPageProxyMac.mm:
3861         (WebKit::WebPageProxy::getPlugInInformation): Return early when plugInProcessProxy is null
3862         since there's nothing we can do.
3863
3864 2013-06-04  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3865
3866         [EFl][WK2] Sub menu items should be of EWK_SUBMENU_TYPE and not checkable
3867         https://bugs.webkit.org/show_bug.cgi?id=116959
3868
3869         Reviewed by Gyuyoung Kim.
3870
3871         Currently using ewk API it is possible to create a sub menu item which is not an EWK_SUBMENU_TYPE
3872         or set checkable flag for it, while it is not possible for items created by WebKit. 
3873         This patch changes ewk context menu API to match WebKit2 behaviour, by creating sub menus with
3874         proper type and checkable flags.
3875
3876         * UIProcess/API/efl/ewk_context_menu_item.cpp:
3877         (ewk_context_menu_item_new_with_submenu):
3878         * UIProcess/API/efl/ewk_context_menu_item.h:
3879         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
3880         (showContextMenu):
3881
3882 2013-06-04  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3883
3884         [EFL][WK2] Custom context menu items cannot be selected
3885         https://bugs.webkit.org/show_bug.cgi?id=116830
3886
3887         Reviewed by Gyuyoung Kim.
3888
3889         Custom item added using ewk_context_menu_item_append had no
3890         pointer to parent menu, and custom submenu added using with the
3891         the same function had no pointer to EwkView. Both issues
3892         prevented items to be selected.
3893
3894         * UIProcess/API/efl/ewk_context_menu.cpp:
3895         (EwkContextMenu::appendItem):
3896         (EwkContextMenu::contextMenuItemSelected):
3897         (ewk_context_menu_item_append):
3898         (ewk_context_menu_item_select):
3899         * UIProcess/API/efl/ewk_context_menu_private.h:
3900         (EwkContextMenu):
3901         (EwkContextMenu::setEwkView):
3902
3903 2013-06-03  Simon Cooper  <scooper@apple.com>
3904
3905         Unable to play videos in Safari using QuickTime plug-in until I've played those videos in Chrome first
3906         https://bugs.webkit.org/show_bug.cgi?id=117174
3907         <rdar://problem/13711687>
3908
3909         Reviewed by Alexey Proskuryakov.
3910
3911         Pull in fixes that allow https connections within the plugin
3912         environment.
3913
3914         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3915
3916 2013-06-03  Marcelo Lira  <marcelo.lira@openbossa.org>
3917
3918         [WK2] REGRESSION(r150798): scrolling coordinator is not being enabled when WebPage is set to use fixed layout
3919         https://bugs.webkit.org/show_bug.cgi?id=117163
3920
3921         Reviewed by Darin Adler.
3922
3923         Moved call to WebPage::settings()->setScrollingCoordinatorEnabled()
3924         from CoordinatedLayerTreeHost constructor to WebPage::setUseFixedLayout().
3925         The scrolling coordinator must be enabled or disabled following the
3926         WebPage's use of fixed layout.
3927
3928         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3929         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3930         * WebProcess/WebPage/WebPage.cpp:
3931         (WebKit::WebPage::setUseFixedLayout):
3932
3933 2013-06-03  Anders Carlsson  <andersca@apple.com>
3934
3935         Send mouse events to the banner for as long as the mouse button is down
3936         https://bugs.webkit.org/show_bug.cgi?id=117161
3937         <rdar://problem/13821220>
3938
3939         Reviewed by Beth Dakin.
3940
3941         Keep track of whether the mouse was pressed in a banner and keep sending mouse events to it,
3942         even if they are outside the banner's bounds for as long as the mouse is down.
3943
3944         * WebProcess/WebPage/PageBanner.h:
3945         * WebProcess/WebPage/mac/PageBannerMac.mm:
3946         (WebKit::PageBanner::PageBanner):
3947         (WebKit::PageBanner::mouseEvent):
3948
3949 2013-06-03  Sergio Correia  <sergio.correia@openbossa.org>
3950
3951         [EFL][WK2] Process launcher uses system() for wrapping the WebProcess when using WEB_PROCESS_CMD_PREFIX
3952         https://bugs.webkit.org/show_bug.cgi?id=105156
3953
3954         Reviewed by Christophe Dumez.
3955
3956         When using WEB_PROCESS_CMD_PREFIX - which allows us for instance to analyze
3957         WebProcess under tools like valgrind or gdb -, the ProcessLauncher would
3958         spawn the new process using system(), which would, among other things, keep
3959         an extra UIProcess waiting and executing the shell.
3960
3961         This patch handles the normal case and the case where we have something to
3962         prefix WebProcess (i.e., by using WEB_PROCESS_CMD_PREFIX in a debug build)
3963         the same way, through a call to execvp().
3964
3965         To achieve this a function was introduced to create an array with the given
3966         arguments to the full command to be executed, to be used by execvp(). We use
3967         a Vector<OwnArrayPtr<char>>, so that we can take advantage of the destructor
3968         of OwnArrayPtr to handle the memory deallocation when it goes out of scope.
3969
3970         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
3971         (WebKit::createArgsArray):  This function creates the array to be used by
3972         execvp(), out of the Strings given as arguments.
3973         (WebKit::ProcessLauncher::launchProcess): Rework the logic to accomodate
3974         both the cases with and without WEB_PROCESS_CMD_PREFIX. The execl() call
3975         was replaced with an execvp() call, since now we should deal with having
3976         a variable number of arguments (WEB_PROCESS_CMD_PREFIX) as well.
3977
3978 2013-06-02  Arunprasad Rajkumar  <arurajku@cisco.com>
3979
3980         [Qt] Move Qt port off legacy clipboard
3981         https://bugs.webkit.org/show_bug.cgi?id=116416
3982
3983         Reviewed by Darin Adler.
3984
3985         * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp:
3986         (WebKit::WebDragClient::startDrag):
3987
3988 2013-06-02  Sergio Correia  <sergio.correia@openbossa.org>
3989
3990         [WK2][CoordinatedGraphics]: Use a properly initialized WebPage when creating a PageClient
3991         https://bugs.webkit.org/show_bug.cgi?id=117116
3992
3993         Reviewed by Tim Horton.
3994
3995         Valgrind reported a "conditional jump or move depends on uninitialised value"
3996         at WebPageProxy constructor, when checking the m_isVisible variable inside
3997         the ENABLE(PAGE_VISIBILITY_API) guard.
3998
3999         The issue was tracked down to the WebView constructor, which was creating a
4000         WebKit::PageClient* making use of `this' before having initialized all of its
4001         attributes.
4002
4003         The solution was to move the initialization of the `page' member to inside the
4004         constructor itself - out of the initialization list -, where we can guarantee
4005         all the relevant stuff has already been properly initialized.
4006
4007         Here's the relevant valgrind trace for reference:
4008
4009         Conditional jump or move depends on uninitialised value(s)
4010             at 0x65A35A4: WebKit::WebPageProxy::WebPageProxy(WebKit::PageClient*,
4011                           WTF::PassRefPtr<WebKit::WebProcessProxy>,
4012                           WebKit::WebPageGroup*, unsigned long) (WebPageProxy.cpp:322)
4013             by 0x65A2BA2: WebKit::WebPageProxy::create(WebKit::PageClient*,
4014                           WTF::PassRefPtr<WebKit::WebProcessProxy>,
4015                           WebKit::WebPageGroup*, unsigned long) (WebPageProxy.cpp:233)
4016             by 0x65E94BB: WebKit::WebProcessProxy::createWebPage(WebKit::PageClient*,
4017                           WebKit::WebContext*, WebKit::WebPageGroup*)
4018                           (WebProcessProxy.cpp:172)
4019             by 0x6570957: WebKit::WebContext::createWebPage(WebKit::PageClient*,
4020                           WebKit::WebPageGroup*, WebKit::WebPageProxy*)
4021                           (WebContext.cpp:735)
4022             by 0x67673E3: WebKit::WebView::WebView(WebKit::WebContext*,
4023                           WebKit::WebPageGroup*) (WebView.cpp:52)
4024             by 0x6775F18: WebKit::WebViewEfl::WebViewEfl(WebKit::WebContext*,
4025                           WebKit::WebPageGroup*) (WebViewEfl.cpp:54)
4026             by 0x6775EB4: WebKit::WebView::create(WebKit::WebContext*,
4027                           WebKit::WebPageGroup*) (WebViewEfl.cpp:49)
4028             by 0x673E13D: WKViewCreate (WKView.cpp:33)
4029             by 0x6763ECE: EWKViewCreate (ewk_view.cpp:92)
4030
4031         * UIProcess/CoordinatedGraphics/WebView.cpp:
4032         (WebKit::WebView::WebView):
4033
4034 2013-05-31  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
4035
4036         [EFL][WK2] Add a null checking condition to in hide() of EwkContextMenu
4037         https://bugs.webkit.org/show_bug.cgi?id=117014
4038
4039         Reviewed by Christophe Dumez.
4040
4041         m_viewImpl is able to be null. So, we need to protect this function against such case.
4042
4043         * UIProcess/API/efl/ewk_context_menu.cpp:
4044         (EwkContextMenu::hide):
4045         (ewk_context_menu_hide):
4046         * UIProcess/API/efl/ewk_context_menu_private.h:
4047         (EwkContextMenu):
4048
4049 2013-05-31  Oliver Hunt  <oliver@apple.com>
4050
4051         Fix bug in active page tracking that lead to plugins hanging during destruction
4052         https://bugs.webkit.org/show_bug.cgi?id=117099
4053
4054         Reviewed by Anders Carlsson.
4055
4056         NPRuntimeObjectMap no longer keeps its own reference to the
4057         throttler, and no longer reports activity during destruction.
4058
4059         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
4060         (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap):
4061         (WebKit::NPRuntimeObjectMap::evaluate):
4062         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
4063         * WebProcess/Plugins/PluginView.cpp:
4064         (WebKit::PluginView::PluginView):
4065
4066 2013-05-31  Tim Horton  <timothy_horton@apple.com>
4067
4068         [wk2] All intrinsic content size changes should go through the 0-delay timer
4069         https://bugs.webkit.org/show_bug.cgi?id=117058
4070         <rdar://problem/13935042>
4071
4072         Reviewed by Anders Carlsson.
4073
4074         In r146913, I added a 0-delay timer so that we'd coalesce intrinsic
4075         content size changes. However, didUpdateGeometry was still immediately
4076         invalidating the intrinsic content size without coalescing.
4077
4078         Move that update to the WebProcess to share the timer.
4079
4080         * UIProcess/DrawingAreaProxy.h:
4081         (WebKit::DrawingAreaProxy::didUpdateGeometry):
4082         * UIProcess/DrawingAreaProxy.messages.in:
4083         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
4084         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
4085         (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
4086         Remove the newIntrinsicContentSize argument, and don't invalidate intrinsic
4087         content size inside didUpdateGeometry.
4088
4089         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
4090         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
4091         Start the intrinsic content size update timer when we finish updateGeometry.
4092
4093 2013-05-31  Alexey Proskuryakov  <ap@apple.com>
4094
4095         Sandbox violations when trying to access fonts in non-standard locations
4096         https://bugs.webkit.org/show_bug.cgi?id=117097
4097         <rdar://problem/9264746>
4098
4099         Reviewed by Anders Carlsson.
4100
4101         The issue was that lack of a main xib was resulting in font machinery being
4102         initialized too early, before we entered sandbox.
4103
4104         * Resources/WebContentProcess.xib: Added.
4105         * WebKit2.xcodeproj/project.pbxproj:
4106         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
4107         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
4108         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
4109
4110 2013-05-31  Alexey Proskuryakov  <ap@apple.com>
4111
4112         <rdar://problem/14036464> Sandbox violation when using Web SpeechSynthesis
4113
4114         Reviewed by Anders Carlsson
4115
4116         * WebProcess/com.apple.WebProcess.sb.in: Allow com.apple.speech.synthesis.console.
4117
4118 2013-05-31  Jessie Berlin  <jberlin@apple.com>
4119
4120         Need the ability to get the information for a plug-in with a particular process id that may
4121         be running on a page
4122         https://bugs.webkit.org/show_bug.cgi?id=117090
4123
4124         Rubber-stamped by Anders Carlsson.
4125
4126         Follow-up to r151043 incorprating some feedback I got from Darin after I had already
4127         committed the patch.
4128