27195ea85ae7389844918cfe1b6a5349e83b021c
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-08-14  Tim Horton  <timothy_horton@apple.com>
2
3         REGRESSION (r153877): Plugin scanning slows creation of WebViews
4         https://bugs.webkit.org/show_bug.cgi?id=119665
5         <rdar://problem/14716549>
6
7         Reviewed by Darin Adler.
8
9         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
10         (WebKit::WebPlatformStrategies::refreshPlugins):
11         Don't repopulate the plugin cache in refreshPlugins, just invalidate it.
12         It will be repopulated the next time something tries to use it.
13
14 2013-08-12  Dan Bernstein  <mitz@apple.com>
15
16         Fixed an off-by-(sizeof(char*) - 1) bug.
17
18         Reviewed by Sam Weinig.
19
20         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
21         (WebKit::XPCServiceEventHandler): Allocate a sufficiently large buffer.
22
23 2013-08-12  Beth Dakin  <bdakin@apple.com>
24
25         Remove didNewFirstVisuallyNonEmptyLayout from WebKit2
26         https://bugs.webkit.org/show_bug.cgi?id=119658
27
28         Reviewed by Darin Adler.
29
30         Removing this function entirely will change some functionality in the Nightlies, 
31         but we think that is an acceptable difference for the Nightlies. If is does cause 
32         a problem though, we can roll out this patch and deprecate the function instead.
33
34         * UIProcess/API/C/WKPage.h:
35         * UIProcess/WebLoaderClient.cpp:
36         * UIProcess/WebLoaderClient.h:
37         * UIProcess/WebPageProxy.cpp:
38         (WebKit::WebPageProxy::initializeLoaderClient):
39         * UIProcess/WebPageProxy.h:
40         * UIProcess/WebPageProxy.messages.in:
41         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
42         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
43         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
44         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
45         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
46         * WebProcess/WebPage/WebPage.cpp:
47         (WebKit::WebPage::initializeInjectedBundleLoaderClient):
48
49 2013-08-12  Arunprasad Rajkumar  <arurajku@cisco.com>
50
51         [Qt] [WebKit2] Remove duplicate RAM Size calculation and reuse WTF::ramSize()
52         https://bugs.webkit.org/show_bug.cgi?id=119663
53
54         Reviewed by Sam Weinig.
55
56         * WebProcess/qt/WebProcessQt.cpp:
57         (WebKit::WebProcess::platformSetCacheModel):
58
59 2013-08-12  Anton Obzhirov  <a.obzhirov@samsung.com>
60
61         [GTK] Don't load GAIL when using GTK 3.2 or greater
62         https://bugs.webkit.org/show_bug.cgi?id=72735
63
64         Reviewed by Carlos Garcia Campos.
65
66         * UIProcess/API/gtk/tests/AccessibilityTestServer.cpp:
67         (main):
68
69 2013-08-09  Beth Dakin  <bdakin@apple.com>
70
71         AX: Not able to use arrow keys to read text in a WK2 app
72         https://bugs.webkit.org/show_bug.cgi?id=119605
73         -and corresponding-
74         <rdar://problem/14281275>
75
76         Reviewed by Darin Adler.
77
78         Make all of these scrolling functions actually return the WebCore bools that 
79         indicate whether or not scrolling happened. 
80         * WebProcess/WebPage/WebPage.cpp:
81         (WebKit::WebPage::scroll):
82         (WebKit::WebPage::logicalScroll):
83         (WebKit::WebPage::scrollBy):
84         * WebProcess/WebPage/WebPage.h:
85         * WebProcess/WebPage/mac/WebPageMac.mm:
86         (WebKit::WebPage::executeKeypressCommandsInternal):
87
88         This function now gives accessibility a chance to handle the event too. And it 
89         also actually tracks whether or not the event was handled by scrolling instead of 
90         assuming that it was and universally returning true.
91         (WebKit::WebPage::performNonEditingBehaviorForSelector):
92
93 2013-08-09  Brian Holt  <brian.holt@samsung.com>
94
95         [GTK] [WebKit2] Add an 'authenticate' signal to WebKitWebView
96         https://bugs.webkit.org/show_bug.cgi?id=99352
97
98         Reviewed by Carlos Garcia Campos.
99
100         Add a new public class to the API, WebKitAuthenticationRequest, to be
101         emitted along with a new WebKitWebView::authenticate signal to
102         let client applications to provide their own authentication
103         when the user is challenged with HTTP authentication. The
104         credential is exposed through a new class WebKitCredential.
105
106         * GNUmakefile.list.am:
107         * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
108         (okButtonClicked): Use new API for authentication.
109         (cancelButtonClicked): Ditto.
110         (webkitAuthenticationDialogInitialize):Get
111         authenticationChallenge from request object.
112         (webkitAuthenticationDialogNew): Ditto.
113         * UIProcess/API/gtk/WebKitAuthenticationDialog.h:
114         * UIProcess/API/gtk/WebKitAuthenticationRequest.cpp: Added new
115         class representing a HTTP authentication request.
116         (webkitAuthenticationRequestDispose):
117         (webkit_authentication_request_class_init):
118         (webkitAuthenticationRequestCreate):
119         (webkitAuthenticationRequestGetAuthenticationChallenge):
120         (webkit_authentication_request_can_save_credentials):
121         (webkit_authentication_request_get_proposed_credential):
122         (webkit_authentication_request_get_host):
123         (webkit_authentication_request_get_port):
124         (webkit_authentication_request_get_realm):
125         (webkit_authentication_request_get_scheme):
126         (webkit_authentication_request_is_for_proxy):
127         (webkit_authentication_request_is_retry):
128         (webkit_authentication_request_authenticate):
129         (webkit_authentication_request_cancel):
130         * UIProcess/API/gtk/WebKitAuthenticationRequest.h: Added.
131         * UIProcess/API/gtk/WebKitAuthenticationRequestPrivate.h: Added.
132         * UIProcess/API/gtk/WebKitCredential.cpp: Added new class to
133         support credentials for HTTP authentication.
134         (_WebKitCredential::_WebKitCredential):
135         (webkitCredentialCreate):
136         (webkitCredentialGetCredential):
137         (webkit_credential_new):
138         (webkit_credential_copy):
139         (webkit_credential_free):
140         (webkit_credential_get_username):
141         (webkit_credential_get_password):
142         (webkit_credential_has_password):
143         (webkit_credential_get_persistence):
144         * UIProcess/API/gtk/WebKitCredential.h: Added.
145         * UIProcess/API/gtk/WebKitCredentialPrivate.h: Added.
146         * UIProcess/API/gtk/WebKitWebView.cpp: Added authenticate signal.
147         (webkitWebViewAuthenticate): Default signal handler for authenticate.
148         (webkit_web_view_class_init): Ditto.
149         (webkitWebViewHandleAuthenticationChallenge): Create an
150         authentication request and emit it with authenticate signal.
151         * UIProcess/API/gtk/WebKitWebView.h: Replaced reserved function
152         pointer slot with for WebViewClass with function pointer to
153         authenticate signal handler.
154         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new section for
155         the authentication request.
156         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
157         * UIProcess/API/gtk/docs/webkit2gtk.types: Added authentication
158         request and credential types.
159         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: Created a new
160         unit test for HTTP authentication. A libsoup server callback
161         handler is installed that creates soup messages with appropriate
162         headers and body to test HTTP authentication.
163         (testWebViewAuthenticationRequest): Test the authentication
164         request and credential API.
165         (testWebViewAuthenticationCancel): Test cancelled authentication.
166         (testWebViewAuthenticationFailure): Test repeated authentication failures.
167         (testWebViewAuthenticationNoCredential): Test continue without
168         credentials.
169         (testWebViewAuthenticationStorage): Test credential storage.
170         (testWebViewAuthenticationSuccess): Test successful authentication.
171         (beforeAll): Added tests.
172         * UIProcess/API/gtk/webkit2.h: Added WebKitAuthenticationRequest and
173         WebKitCredential headers.
174
175 2013-08-09  Tim Horton  <timothy_horton@apple.com>
176
177         PDFPlugin is disabled by default in nightlies on Mac accidentally
178         https://bugs.webkit.org/show_bug.cgi?id=119615
179
180         Rubber-stamped by Andreas Kling.
181
182         Enable PDFPlugin by default on Mac at the WebKit2 level.
183
184         * Shared/WebPreferencesStore.h:
185         * UIProcess/API/C/WKPreferencesPrivate.h:
186
187 2013-08-08  Tim Horton  <timothy_horton@apple.com>
188
189         navigator.plugins has plugins in it when plugins are disabled
190         https://bugs.webkit.org/show_bug.cgi?id=119607
191         <rdar://problem/14678030>
192
193         Reviewed by Anders Carlsson.
194
195         * UIProcess/WebProcessProxy.cpp:
196         (WebKit::WebProcessProxy::getPlugins):
197         Return a list of all plugins, and a list of only application plugins.
198
199         * UIProcess/WebProcessProxy.h:
200         * UIProcess/WebProcessProxy.messages.in:
201         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
202         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
203         (WebKit::WebPlatformStrategies::getPluginInfo):
204         Add applicationPlugin parameter to getPlugins, and storage for the returned list.
205
206         (WebKit::WebPlatformStrategies::populatePluginCache):
207         If plugins are disabled for the given page, give WebCore the list that
208         only includes application plugins. Otherwise, give it the whole list
209         as we are doing currently.
210
211 2013-08-08  Gavin Barraclough  <barraclough@apple.com>
212
213         Disable suppression of plugin process for Java
214         https://bugs.webkit.org/show_bug.cgi?id=119604
215
216         Reviewed by Sam Weinig.
217
218         Workaround, the Java plugin doesn't like this.
219
220         * PluginProcess/mac/PluginProcessMac.mm:
221         (WebKit::PluginProcess::platformInitializeProcess):
222             - +1 active task count on the java plugin, to inhibit supression.
223
224 2013-08-08  Dean Jackson  <dino@apple.com>
225
226         Add logging to the primary plugin detection
227         https://bugs.webkit.org/show_bug.cgi?id=119594
228
229         Reviewed by Tim Horton.
230
231         Add some simple logging to our primary plug-in detection.
232
233         * WebProcess/WebPage/WebPage.cpp:
234         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
235
236 2013-08-08  Alexey Proskuryakov  <ap@apple.com>
237
238         WKBundleFrameCopyProvisionalURL crashes when there is no provisional loader
239         https://bugs.webkit.org/show_bug.cgi?id=119587
240
241         Reviewed by Darin Adler.
242
243         * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::provisionalURL): Added a null
244         check, like we already have in WebFrame::url().
245
246 2013-08-07  Antti Koivisto  <antti@apple.com>
247
248         Try to fix EFL build.
249         
250         Not reviewed.
251
252         * CMakeLists.txt:
253
254 2013-08-06  Jer Noble  <jer.noble@apple.com>
255
256         Crash when entering fullscreen video playback from a WebView using WebKit2
257         https://bugs.webkit.org/show_bug.cgi?id=119531
258
259         Reviewed by Tim Horton.
260
261         Initialize wkWindowSetScaledFrame and wkWindowSetAlpha when initializing WebCoreSystemInterface.
262
263         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
264         (InitWebCoreSystemInterface):
265
266 2013-08-06  Stephanie Lewis  <slewis@apple.com>
267
268         Update Order Files for Safari
269         <rdar://problem/14517392>
270
271         Unreviewed.
272
273         * mac/WebKit2.order:
274
275 2013-08-04  Sam Weinig  <sam@webkit.org>
276
277         Remove support for HTML5 MicroData
278         https://bugs.webkit.org/show_bug.cgi?id=119480
279
280         Reviewed by Anders Carlsson.
281
282         * Configurations/FeatureDefines.xcconfig:
283
284 2013-08-06  Eunmi Lee  <eunmi15.lee@samsung.com>
285
286         [EFL][WK2] Implement gesture recognizer.
287         https://bugs.webkit.org/show_bug.cgi?id=102643
288
289         Reviewed by Gyuyoung Kim.
290
291         Recognize tap, pan and pinch gestures using touch events.
292         The tap gesture is separated into single tap, double tap and
293         'tap and hold'.
294
295         This patch references the webkit NIX port.
296         https://github.com/WebKitNix/webkitnix
297
298         * PlatformEfl.cmake:
299         * UIProcess/API/efl/EwkView.cpp:
300         (EwkView::EwkView):
301         (EwkView::doneWithTouchEvent):
302         * UIProcess/API/efl/EwkView.h:
303         * UIProcess/API/efl/GestureRecognizer.cpp: Added.
304         (WebKit::GestureHandler::create):
305         (WebKit::GestureHandler::GestureHandler):
306         (WebKit::GestureHandler::handleSingleTap):
307         (WebKit::GestureHandler::handleDoubleTap):
308         (WebKit::GestureHandler::handleTapAndHold):
309         (WebKit::GestureHandler::handlePanStarted):
310         (WebKit::GestureHandler::handlePan):
311         (WebKit::GestureHandler::handlePanFinished):
312         (WebKit::GestureHandler::handlePinchStarted):
313         (WebKit::GestureHandler::handlePinch):
314         (WebKit::GestureHandler::handlePinchFinished):
315         (WebKit::GestureRecognizer::GestureRecognizer):
316         (WebKit::GestureRecognizer::~GestureRecognizer):
317         (WebKit::GestureRecognizer::processTouchEvent):
318         (WebKit::GestureRecognizer::doubleTapTimerCallback):
319         (WebKit::GestureRecognizer::tapAndHoldTimerCallback):
320         (WebKit::GestureRecognizer::exceedsPanThreshold):
321         (WebKit::GestureRecognizer::exceedsDoubleTapThreshold):
322         (WebKit::getPointAtIndex):
323         (WebKit::createVectorWithWKArray):
324         (WebKit::GestureRecognizer::noGesture):
325         (WebKit::GestureRecognizer::singleTapGesture):
326         (WebKit::GestureRecognizer::doubleTapGesture):
327         (WebKit::GestureRecognizer::panGesture):
328         (WebKit::GestureRecognizer::pinchGesture):
329         (WebKit::GestureRecognizer::reset):
330         (WebKit::GestureRecognizer::stopTapTimers):
331         * UIProcess/API/efl/GestureRecognizer.h: Added.
332         (WebKit::GestureRecognizer::create):
333
334 2013-07-23  David Farler  <dfarler@apple.com>
335
336         Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
337         https://bugs.webkit.org/show_bug.cgi?id=117762
338
339         Reviewed by Mark Rowe.
340
341         * Configurations/DebugRelease.xcconfig:
342         Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
343         * Configurations/WebContentProcess.xcconfig:
344         Add ASAN_OTHER_LDFLAGS.
345         * Configurations/WebKit2.xcconfig:
346         Add ASAN_OTHER_LDFLAGS.
347
348 2013-08-06  Andreas Kling  <akling@apple.com>
349
350         REGRESSION(r151403): Resizing is extremely laggy on many sites when plugins are disallowed.
351         <http://webkit.org/b/119516>
352         <rdar://problem/14648086>
353
354         Reviewed by Simon Fraser.
355
356         The web process relies on the WindowAndViewFramesChanged mechanism for caching a copy
357         of the window rect for fast access from DOMWindow APIs.
358
359         We retain part of the optimization introduced in r151403, namely not computing the
360         viewFrameInWindowCoordinates and accessibilityPosition unless the web process needs them.
361
362         * UIProcess/API/mac/WKView.mm:
363         (-[WKView _updateWindowAndViewFrames]):
364
365 2013-07-26  Mark Rowe  <mrowe@apple.com>
366
367         Logging should be configurable using human-readable channel names rather than crazy bitmasks
368         <http://webkit.org/b/119031>
369
370         Implement shared logic for initializing logging channels based on human-readable channel names in WTF,
371         and rework the WebCore, WebKit and WebKit2 logging initialization on top of it.
372
373         Logging channels may now be enabled by providing a comma-separated list of channel names, with the special
374         "all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel
375         being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except
376         for history and loading being enabled.
377
378         For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow
379         the old user defaults to remain set for those people that need to switch between version of WebKit before and
380         after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel,
381         the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging.
382
383         For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for
384         consistency with the other platforms and to enable more code sharing.
385
386         While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when
387         adding a new logging channel. Now only the header in the relevant project needs to be updated.
388
389         Reviewed by Sam Weinig.
390
391         * NetworkProcess/NetworkProcess.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
392         * Platform/Logging.cpp: Use WEBKIT2_LOG_CHANNELS to define all of the channels.
393         (WebKit::initializeLogChannelsIfNecessary): Pass the channels and the log level string to the new WTF function
394         that handles the initialization.
395         (WebKit::logChannelByName): Renamed to match our naming conventions. Calls through to the new WTF function
396         to find a log channel rather than repeating the names of the log channels a further two times each.
397         (WebKit::logLevelString): Provide a no-op implementation.
398         * Platform/Logging.h: Declare a WEBKIT2_LOG_CHANNELS macro that can be used to apply a preprocessor macro
399         across the set of all logging channels. Use this macro to declare the logging channels.
400         * Platform/efl/LoggingEfl.cpp:
401         (WebKit::logLevelString): Pull the value out of the WEBKIT_DEBUG environment variable.
402         * Platform/gtk/LoggingGtk.cpp:
403         (WebKit::logLevelString): Ditto.
404         * Platform/mac/Logging.mac.mm:
405         (WebKit::logLevelString): Pull the value out of the WebKit2Logging user default key.
406         * Platform/qt/LoggingQt.cpp:
407         (WebKit::logLevelString): Pull the value out of the QT_WEBKIT_LOG environment variable.
408         * Shared/WebKit2Initialize.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
409         * UIProcess/WebContext.cpp: Switch from WebCore's InitializeLogging.h to Logging.h.
410
411 2013-08-05  Anders Carlsson  <andersca@apple.com>
412
413         Ignore the Apple Java placeholder plug-in
414         https://bugs.webkit.org/show_bug.cgi?id=119494
415         <rdar://problem/14610818>
416
417         Reviewed by Beth Dakin.
418
419         Never attempt to load the Java placeholder plug-in.
420
421         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
422         (WebKit::PluginInfoStore::shouldUsePlugin):
423
424 2013-08-03  Tim Horton  <timothy_horton@apple.com>
425
426         Unreviewed, build and style fix for r153693.
427
428         * UIProcess/WebProcessProxy.cpp:
429         * WebProcess/Plugins/PDF/PDFPlugin.h:
430         * WebProcess/WebPage/WebPage.cpp:
431
432 2013-08-03  Tim Horton  <timothy_horton@apple.com>
433
434         Remove SimplePDFPlugin
435         https://bugs.webkit.org/show_bug.cgi?id=119437
436
437         Reviewed by Alexey Proskuryakov.
438
439         * UIProcess/WebProcessProxy.cpp:
440         (WebKit::WebProcessProxy::getPlugins):
441         * WebProcess/WebPage/WebPage.cpp:
442         (WebKit::WebPage::createPlugin):
443         Don't add SimplePDFPlugin, nor try to instantiate it.
444
445         * WebProcess/Plugins/PDF/PDFPlugin.h:
446         * WebProcess/Plugins/PDF/PDFPlugin.mm:
447         Merge previously inherited behavior in from SimplePDFPlugin.
448
449         * WebKit2.xcodeproj/project.pbxproj:
450         * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Removed.
451         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: Removed.
452         Remove SimplePDFPlugin.
453
454 2013-08-03  Tim Horton  <timothy_horton@apple.com>
455
456         Remove pageOverlayShouldApplyFadeWhenPainting() and adopt composited fade for the Mac port
457         https://bugs.webkit.org/show_bug.cgi?id=119411
458
459         Reviewed by Simon Fraser.
460
461         Mac is the only holdout that performs non-composited fades of page
462         overlays. We should adopt that mechanism (as a precursor to doing a
463         CA-accelerated fade) and remove the now-unnecessary property.
464
465         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
466         (WKBundlePageOverlayFractionFadedIn):
467         Always return 1 (fully-faded-in) so that clients who attempt to use this
468         to bake the fade opacity into their painting will paint at full opacity,
469         allowing us to do the composited fade separately.
470
471         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
472         * WebProcess/WebPage/DrawingArea.h:
473         * WebProcess/WebPage/DrawingAreaImpl.cpp:
474         * WebProcess/WebPage/DrawingAreaImpl.h:
475         * WebProcess/WebPage/LayerTreeHost.h:
476         * WebProcess/WebPage/PageOverlay.cpp:
477         (WebKit::PageOverlay::PageOverlay):
478         (WebKit::PageOverlay::setPage):
479         (WebKit::PageOverlay::setNeedsDisplay):
480         (WebKit::PageOverlay::fadeAnimationTimerFired):
481         * WebProcess/WebPage/PageOverlay.h:
482         Remove pageOverlayShouldApplyFadeWhenPainting and fractionFadedIn().
483
484         * WebProcess/WebPage/FindController.cpp:
485         (WebKit::FindController::drawRect):
486         Draw the find overlay without taking the PageOverlay's fade into account.
487
488         * WebProcess/WebPage/TapHighlightController.cpp:
489         (WebKit::TapHighlightController::drawRect):
490         Remove pageOverlayShouldApplyFadeWhenPainting. Since it's always
491         "false" for all ports now, take the second path here.
492
493         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
494         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
495         (WebKit::LayerTreeHostMac::setPageOverlayOpacity):
496         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
497         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
498         (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayOpacity):
499         Implement setPageOverlayOpacity for DrawingAreaImpl
500         and TiledCoreAnimationDrawingArea.
501
502 2013-08-02  Gavin Barraclough  <barraclough@apple.com>
503
504         Remove no-arguments constructor to PropertySlot
505         https://bugs.webkit.org/show_bug.cgi?id=119460
506
507         Reviewed by Geoff Garen.
508
509         This constructor was unsafe if getValue is subsequently called,
510         and the property is a getter. Simplest to just remove it.
511
512         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
513         (WebKit::JSNPObject::getOwnPropertyDescriptor):
514
515 2013-08-02  Ruth Fong  <ruth_fong@apple.com>
516
517         [Forms: color] WebColorPickerMac deconstructor shouldn't assert a variable
518         <rdar://problem/14627633> and https://bugs.webkit.org/show_bug.cgi?id=119419
519
520         Reviewed by Tim Horton.
521
522         * UIProcess/mac/WebColorPickerMac.mm:
523         (WebKit::WebColorPickerMac::~WebColorPickerMac): If the m_colorPickerUI variable
524           is not null, then properly destroy it first before destroying WebColorPickerMac object.
525
526 2013-08-02  Ruth Fong  <ruth_fong@apple.com>
527
528         [Forms: color] The positioning of the popover color well is inverted
529         <rdar://problem/14635621> and https://bugs.webkit.org/show_bug.cgi?id=119455
530
531         Reviewed by Tim Horton.
532
533         This patch converts the coordinates of the <input type='color'> element to
534         the window's base coordinate system.
535
536         * UIProcess/mac/WebColorPickerMac.mm:
537         (-[WKColorPopoverMac initWithFrame:inView:]):
538
539 2013-08-01  Ruth Fong  <ruth_fong@apple.com>
540
541         [Forms: color] <input type='color'> popover color well implementation
542         <rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356
543
544         Reviewed by Benjamin Poulain.
545
546         This patch adds an popover implementation of <input type='color'>.
547
548         * Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER.
549
550         * UIProcess/API/mac/PageClientImpl.mm:
551         (WebKit::PageClientImpl::createColorPicker): Updated to pass the 
552           coordinates of the <input type='color'> element and the WKView 
553           object for the window.
554
555         * UIProcess/WebPageProxy.cpp:
556         (WebKit::WebPageProxy::viewWillStartLiveResize): Close popover color 
557           picker when the view is resized.
558         (WebKit::WebPageProxy::viewInWindowStateDidChange): Close popover color
559           picker when the view is no longer in the window.
560         (WebKit::WebPageProxy::showColorPicker): Updated to show either a color panel
561           or a popover color picker depending on whether INPUT_TYPE_COLOR_POPOVER is enabled.
562
563         * UIProcess/mac/WebColorPickerMac.h:
564         * UIProcess/mac/WebColorPickerMac.mm:
565         (WebKit::WebColorPickerMac::create):
566         (WebKit::WebColorPickerMac::~WebColorPickerMac):
567         (WebKit::WebColorPickerMac::WebColorPickerMac):
568         (WebKit::WebColorPickerMac::endPicker):
569         (WebKit::WebColorPickerMac::setSelectedColor):
570         (WebKit::WebColorPickerMac::showColorPicker):
571         Methods updated to handle both the color panel implementation and 
572           the popover implementation; also renamed m_panel to m_colorPickerUI. 
573
574         (-[WKColorPopoverMac initWithFrame:WebCore::inView:]):
575         (-[WKColorPopoverMac setAndShowPicker:WebKit::withColor:]):
576         (-[WKColorPopoverMac dealloc]):
577         (-[WKColorPopoverMac invalidate]):
578         (-[WKColorPopoverMac windowWillClose:]):
579         (-[WKColorPopoverMac didChooseColor:]):
580         (-[WKColorPopoverMac setColor:]):
581         WKColorPopoverMac provides the popover implementation of <input type='color'>.
582
583         (-[WKColorPanelMac didChooseColor:]): Updated to match the interface of 
584           WKColorPickerMac::didChooseColor.
585
586 2013-08-01  Anders Carlsson  <andersca@apple.com>
587
588         Lots of leaks under WebContext::pluginInfoStoreDidLoadPlugins()
589         https://bugs.webkit.org/show_bug.cgi?id=119412
590
591         Reviewed by Simon Fraser.
592
593         For some sick reason, the WKContextClient plugInInformationBecameAvailable callback function
594         expects a +1 reference to the plug-in array. Isolate that hack to WebContextClient so that
595         we don't leak the array if there is no WKContextClient.
596         
597         * UIProcess/WebContext.cpp:
598         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins):
599         * UIProcess/WebContextClient.cpp:
600         (WebKit::WebContextClient::plugInInformationBecameAvailable):
601
602 2013-08-01  Kwang Yul Seo  <skyul@company100.net>
603
604         Remove return statement in void function
605         https://bugs.webkit.org/show_bug.cgi?id=119379
606
607         Reviewed by Darin Adler.
608
609         It does not make sense to return a value in void function.
610
611         * WebProcess/WebProcess.cpp:
612         (WebKit::addCaseFoldedCharacters):
613
614 2013-08-01  Kwang Yul Seo  <skyul@company100.net>
615
616         [WK2] Add USE(SOUP) guard in WebProcess::destroyPrivateBrowsingSession
617         https://bugs.webkit.org/show_bug.cgi?id=119381
618
619         Reviewed by Darin Adler.
620
621         The is a followup to r153355. I missed to add USE(SOUP) guard in
622         WebProcess::destroyPrivateBrowsingSession.
623
624         * WebProcess/WebProcess.cpp:
625         (WebKit::WebProcess::destroyPrivateBrowsingSession):
626
627 2013-08-01  Milian Wolff  <milian.wolff@kdab.com>
628
629         [Qt] Enable QML handling of crashed/unresponsive QtWebProcess
630         https://bugs.webkit.org/show_bug.cgi?id=108474
631
632         Forward the processDidCrash, didRelaunchProcess, processDidBecomeUnresponsive
633         and processDidBecomeResponsive signals to QML's WebView.experimental.
634
635         Reviewed by Jocelyn Turcotte.
636
637         * UIProcess/API/qt/qquickwebview.cpp:
638         (QQuickWebViewPrivate::processDidCrash):
639         (QQuickWebViewPrivate::didRelaunchProcess):
640         (QQuickWebViewPrivate::processDidBecomeUnresponsive):
641         (QQuickWebViewPrivate::processDidBecomeResponsive):
642         * UIProcess/API/qt/qquickwebview_p.h:
643         * UIProcess/API/qt/qquickwebview_p_p.h:
644         (QQuickWebViewPrivate):
645
646 2013-07-31  Kwang Yul Seo  <skyul@company100.net>
647
648         Use emptyString instead of String("")
649         https://bugs.webkit.org/show_bug.cgi?id=119335
650
651         Reviewed by Darin Adler.
652
653         Use emptyString() instead of String("") because it is better style and
654         faster. This is a followup to r116908, removing all occurrences of
655         String("") from WebKit.
656
657         * Shared/mac/WebEventFactory.mm:
658         (WebKit::textFromEvent):
659         (WebKit::unmodifiedTextFromEvent):
660
661 2013-07-31  Ruth Fong  <ruth_fong@apple.com>
662
663         <input type=color> Mac UI behaviour
664         <rdar://problem/10269922> and https://bugs.webkit.org/show_bug.cgi?id=61276
665
666         Implemented <input type='color'> on Mac using the native color picker. 
667
668         Reviewed by Brady Eidson.
669
670         Code for WebColorPickerMac is derived from Chromium's color_chooser_mac.mm:
671         https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/cocoa/color_chooser_mac.mm
672
673         * Configurations/FeatureDefines.xcconfig: Enabled INPUT_TYPE_COLOR.
674
675         * UIProcess/API/mac/PageClientImpl.mm:
676         (WebKit::PageClientImpl::createColorPicker): Replaced stub implementation
677           and return a WebColorPickerMac object.
678
679         * UIProcess/WebColorPicker.cpp:
680         (WebKit::WebColorPicker::invalidate): Updated to call endChooser().
681         (WebKit::WebColorPicker::showColorPicker): Added stub implementation.
682         * UIProcess/WebColorPicker.h:
683
684         * UIProcess/WebPageProxy.cpp:
685         (WebKit::WebPageProxy::close): Removed invalidation of removed color picker objects.
686         (WebKit::WebPageProxy::showColorPicker): Updated so that it works for
687           multiple <input type='color'> elements on a page.
688         (WebKit::WebPageProxy::didEndColorPicker): Removed cleanup of removed color picker objects.
689         (WebKit::WebPageProxy::resetStateAfterProcessExited): Removed cleanup of removed color picker objects.
690
691         * UIProcess/mac/WebColorPickerMac.h: Added.
692         * UIProcess/mac/WebColorPickerMac.mm: Added.
693         (WebKit::WebColorPickerMac::create):
694         (WebKit::WebColorPickerMac::~WebColorPickerMac):
695         (WebKit::WebColorPickerMac::WebColorPickerMac):
696         (WebKit::WebColorPickerMac::endPicker):
697         (WebKit::WebColorPickerMac::setSelectedColor):
698         (WebKit::WebColorPickerMac::didChooseColor):
699         (WebKit::WebColorPickerMac::showColorPicker):
700         WebColorPickerMac contains a reference to a WKColorPanelMac object
701           and is responsible for maintaining the color picker UI.
702
703         (-[WKColorPanelMac setAndShowPicker:withColor:]):
704         (-[WKColorPanelMac invalidate]):
705         (-[WKColorPanelMac windowWillClose:]):
706         (-[WKColorPanelMac didChooseColor:]):
707         (-[WKColorPanelMac setColor:]):
708         WKColorPanelMac is a wrapper for a NSColorPanel object and 
709           is responsible for the color picker UI.
710
711         * WebKit2.xcodeproj/project.pbxproj:
712
713         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
714         (WebKit::WebChromeClient::createColorChooser): Updated to always create a 
715           WebColorChooser object.
716
717         * WebProcess/WebCoreSupport/WebColorChooser.cpp:
718         (WebKit::WebColorChooser::reattachColorChooser): Sets the page's 
719           active color chooser to the current object and pings the UIProcess
720           to show the color picker.
721         (WebKit::WebColorChooser::setSelectedColor): Only sets the color in the
722           color picker if the WebColorChooser object is the active color element.
723         * WebProcess/WebCoreSupport/WebColorChooser.h:
724
725 2013-07-30  Gavin Barraclough  <barraclough@apple.com>
726
727         Some cleanup in JSValue::get
728         https://bugs.webkit.org/show_bug.cgi?id=119343
729
730         Reviewed by Geoff Garen.
731
732         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
733         (WebKit::JSNPObject::getOwnPropertySlot):
734         * WebProcess/Plugins/Netscape/JSNPObject.h:
735             - getOwnPropertySlot, JSCell -> JSObject
736
737 2013-07-31  Allan Sandfeld Jensen  <allan.jensen@digia.com>
738
739         [Qt] Build WebKit with C++11
740         https://bugs.webkit.org/show_bug.cgi?id=119337
741
742         Reviewed by Csaba Osztrogonác.
743
744         We no longer need to enable C++11 specifically for WebKit2.
745
746         * WebKit2.pri:
747
748 2013-07-30  Tim Horton  <timothy_horton@apple.com>
749
750         DHTML drag can result in a null-deref under WebDragClient::startDrag
751         https://bugs.webkit.org/show_bug.cgi?id=119297
752         <rdar://problem/14213012>
753
754         Reviewed by Simon Fraser.
755
756         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
757         (WebKit::convertImageToBitmap):
758         ShareableBitmap::createShareable can return null, but shouldn't dereference that.
759
760 2013-07-30  Ruth Fong  <ruth_fong@apple.com>
761
762         Rename <input type='color'> functions in WebPageProxy, WebColorPicker
763         <rdar://problem/14549771> and https://bugs.webkit.org/show_bug.cgi?id=119097
764
765         Reviewed by Tim Horton.
766
767         In bug 119025, WebColorChooserProxy was renamed WebColorPicker. This patch makes the UIProcess consistent
768         by renaming UIProcess INPUT_TYPE_COLOR functions from ...colorChooser to ...colorPicker.
769
770         * UIProcess/WebColorPicker.cpp:
771         (WebKit::WebColorPicker::endPicker):
772         * UIProcess/WebColorPicker.h:
773         * UIProcess/WebColorPickerResultListenerProxy.cpp:
774         (WebKit::WebColorPickerResultListenerProxy::setColor):
775         * UIProcess/WebPageProxy.cpp:
776         (WebKit::WebPageProxy::showColorPicker):
777         (WebKit::WebPageProxy::setColorPickerColor):
778         (WebKit::WebPageProxy::endColorPicker):
779         (WebKit::WebPageProxy::didEndColorPicker):
780         * UIProcess/WebPageProxy.h:
781         * UIProcess/WebPageProxy.messages.in:
782         * UIProcess/qt/WebColorPickerQt.cpp:
783         (WebKit::WebColorPickerQt::createItem):
784         (WebKit::WebColorPickerQt::notifyColorSelected):
785         (WebKit::WebColorPickerQt::endPicker):
786         * UIProcess/qt/WebColorPickerQt.h:
787         * WebProcess/WebCoreSupport/WebColorChooser.cpp:
788         (WebKit::WebColorChooser::WebColorChooser):
789         (WebKit::WebColorChooser::setSelectedColor):
790         (WebKit::WebColorChooser::endChooser):
791         * WebProcess/WebPage/WebPage.cpp:
792         (WebKit::WebPage::didEndColorPicker):
793         * WebProcess/WebPage/WebPage.h:
794         * WebProcess/WebPage/WebPage.messages.in:
795
796 2013-07-30  Anders Carlsson  <andersca@apple.com>
797
798         Speculative fix for crash due to string access on multiple threads
799         https://bugs.webkit.org/show_bug.cgi?id=119279
800         <rdar://problem/14267833>
801
802         Reviewed by Darin Adler.
803
804         We can't use String::isolatedCopy for passing the local storage directory to the storage thread since
805         that returns a String that's copied and then destroyed after the call to bind returns, leaving a small window
806         where the refcount can be accessed simultaneously from two threads.
807
808         Work around this by passing a PassRefPtr<StringImpl> to bind instead; the act of copying the PassRefPtr will
809         clear out the original and so when the original is destroyed the underlying StringImpl pointer will be null.
810
811         * UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
812         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory):
813         (WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal):
814         * UIProcess/Storage/LocalStorageDatabaseTracker.h:
815
816 2013-07-30  Tim Horton  <timothy_horton@apple.com>
817
818         Fix typo in enum name ("SelectionInSnaphot" -> "SelectionInSnapshot")
819         https://bugs.webkit.org/show_bug.cgi?id=119275
820
821         Reviewed by Simon Fraser.
822
823         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
824         (WebKit::imageForRect):
825         * WebProcess/WebPage/WebPage.cpp:
826         (WebKit::WebPage::scaledSnapshotWithOptions):
827         Fix typo.
828
829 2013-07-30  Anders Carlsson  <andersca@apple.com>
830
831         Plug-in process crashes if plug-in is destroyed as a result of sending NPObjectMessageReceiver::Deallocate
832         https://bugs.webkit.org/show_bug.cgi?id=119270
833         <rdar://problem/13368226>
834
835         Reviewed by Darin Adler.
836
837         Normally we use the PluginDestructionProtector RAII object to prevent plug-ins from being destroyed while
838         they're executing code. However, in the case of the NPObjectMessageReceiver::Deallocate message, we can't do this
839         since we don't know the plug-in or connection. 
840         
841         Instead, add a counter to Connection that keeps track of whether sendSync is currently called and defer plug-in
842         destruction if it is. (This approach is actually more robust and we should investigate getting rid of the destruction protector).
843
844         * Platform/CoreIPC/Connection.cpp:
845         (CoreIPC::Connection::Connection):
846         (CoreIPC::Connection::sendSyncMessage):
847         * Platform/CoreIPC/Connection.h:
848         (CoreIPC::Connection::inSendSync):
849         * PluginProcess/PluginControllerProxy.cpp:
850         (WebKit::PluginControllerProxy::destroy):
851
852 2013-07-30  Tim Horton  <timothy_horton@apple.com>
853
854         Null deref under WebPage::scaledSnapshotWithOptions
855         https://bugs.webkit.org/show_bug.cgi?id=119243
856         <rdar://problem/14502050>
857
858         Reviewed by Darin Adler.
859
860         * WebProcess/WebPage/WebPage.cpp:
861         (WebKit::WebPage::scaledSnapshotWithOptions):
862         WebFrame::coreFrame() can be null (if the Frame is already torn down),
863         so we should check it.
864
865 2013-07-30  Tim Horton  <timothy_horton@apple.com>
866
867         Null deref under PluginView::handlesPageScaleFactor()
868         https://bugs.webkit.org/show_bug.cgi?id=119231
869         <rdar://problem/14440207>
870
871         Reviewed by Darin Adler.
872
873         Null-check the PluginView in the caller as well.
874
875         * WebProcess/WebPage/WebFrame.cpp:
876         (WebKit::WebFrame::handlesPageScaleGesture):
877
878 2013-07-30  Patrick Gansterer  <paroga@webkit.org>
879
880         Remove unused Download*.cpp files
881         https://bugs.webkit.org/show_bug.cgi?id=119248
882
883         Reviewed by Anders Carlsson.
884
885         * Shared/Downloads/cfnet/DownloadCFNet.cpp: Removed.
886         * Shared/Downloads/curl/DownloadCurl.cpp: Removed.
887
888 2013-07-30  Jeff Miller  <jeffm@apple.com>
889
890         Page for WKPageLoaderClient processDidCrash callback always reports a process identifier of 0
891         https://bugs.webkit.org/show_bug.cgi?id=119269
892         <rdar://problem/14582393>
893
894         Reviewed by Anders Carlsson.
895
896         * UIProcess/WebPageProxy.cpp:
897         (WebKit::WebPageProxy::processIdentifier):
898         Return 0 if the page is closed instead of requiring isValid().
899
900 2013-07-30  Kwang Yul Seo  <skyul@company100.net>
901
902         [WK2] Move the implementation of WebEditorClient::checkTextOfParagraph to WebEditorClient.cpp
903         https://bugs.webkit.org/show_bug.cgi?id=119034
904
905         Reviewed by Anders Carlsson.
906
907         The Mac and EFL ports use the same implementation of
908         WebEditorClient::checkTextOfParagraph and GTK will use the same
909         implementation too. So rather than duplicating the same code in
910         platform specific files, move the implementation to platform agnostic
911         WebProcess/WebCoreSupport/WebEditorClient.cpp.
912
913         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
914         (WebKit::WebEditorClient::checkTextOfParagraph):
915         * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
916         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
917
918 2013-07-30  Brian Holt  <brian.holt@samsung.com>
919
920         [WebKit2] [Gtk] WebKitResponsePolicyDecision URI response property incorrect
921         https://bugs.webkit.org/show_bug.cgi?id=119258
922
923         Reviewed by Martin Robinson.
924
925         Corrected the installed URI response property from PROP_REQUEST to
926         PROP_RESPONSE and type from WEBKIT_TYPE_URI_REQUEST to
927         WEBKIT_TYPE_URI_RESPONSE.
928
929         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
930         (webkit_response_policy_decision_class_init):
931
932 2013-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>
933
934         Unreviewed. Fix make distcheck.
935
936         * GNUmakefile.list.am: Add missing header file to compilation.
937
938 2013-07-29  Tim Horton  <timothy_horton@apple.com>
939
940         [wk2] Flush the WebProcess’ implicit transaction when using endDeferringViewInWindowChangesSync
941         https://bugs.webkit.org/show_bug.cgi?id=119225
942         <rdar://problem/14568841>
943
944         Reviewed by Simon Fraser.
945
946         Tell CoreAnimation to flush the implicit transaction before replying
947         when using endDeferringViewInWindowChangesSync, as that method's contract
948         is that the WebProcess is totally ready to be in-window when it returns.
949
950         * UIProcess/API/mac/WKView.mm:
951         (-[WKView endDeferringViewInWindowChanges]):
952         Adopt viewInWindowStateDidChange.
953
954         (-[WKView endDeferringViewInWindowChangesSync]):
955         Adopt viewInWindowStateDidChange, asking it to send a reply only if we're going to wait for one.
956
957         * UIProcess/WebPageProxy.cpp:
958         (WebKit::WebPageProxy::viewInWindowStateDidChange):
959         (WebKit::WebPageProxy::viewStateDidChange):
960         Pull viewInWindowStateDidChange out of viewStateDidChange.
961         Request a reply from SetIsInWindow if we're told to.
962
963         * UIProcess/WebPageProxy.h: Add WantsReplyOrNot and viewInWindowStateDidChange.
964         * WebProcess/WebPage/WebPage.cpp:
965         (WebKit::WebPage::didUpdateInWindowStateTimerFired):
966         Don't build this version on Mac, we'll have a WebPageMac version.
967
968         (WebKit::WebPage::setIsInWindow):
969         Only start the timer to send the didUpdateInWindowState reply if we're asked to.
970
971         * WebProcess/WebPage/WebPage.h:
972         * WebProcess/WebPage/WebPage.messages.in:
973         Add an argument to the SetIsInWindow message for whether the WebProcess
974         should inform the UIProcess when SetIsInWindow completes or not.
975
976         * WebProcess/WebPage/mac/WebPageMac.mm:
977         (WebKit::WebPage::didUpdateInWindowStateTimerFired):
978         Tell CA to flush the implicit transaction before telling the UIProcess that
979         we're finished moving in-window.
980
981 2013-07-29  Tim Horton  <timothy_horton@apple.com>
982
983         Null deref under PluginView::handlesPageScaleFactor()
984         https://bugs.webkit.org/show_bug.cgi?id=119231
985         <rdar://problem/14440207>
986
987         Reviewed by Simon Fraser.
988
989         * WebProcess/Plugins/PluginView.cpp:
990         (WebKit::PluginView::handlesPageScaleFactor):
991         * WebProcess/Plugins/PluginView.h:
992         Null-check m_plugin and check m_isInitialized.
993         Make pageScaleFactor() and handlesPageScaleFactor const.
994
995 2013-07-29  Anders Carlsson  <andersca@apple.com>
996
997         Remove setUnderlayPage() and associated code
998         https://bugs.webkit.org/show_bug.cgi?id=119220
999         <rdar://problem/14392426>
1000
1001         Reviewed by Jessie Berlin.
1002
1003         This is dead code, get rid of it.
1004
1005         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1006         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1007         * WebProcess/WebPage/WebPage.cpp:
1008         (WebKit::WebPage::close):
1009         (WebKit::WebPage::layoutIfNeeded):
1010         (WebKit::WebPage::drawRect):
1011         * WebProcess/WebPage/WebPage.h:
1012
1013 2013-07-29  Sergio Correia  <sergio.correia@openbossa.org>
1014
1015         CoordinatedGraphics: Add API to get and set the active state of a WebView
1016         https://bugs.webkit.org/show_bug.cgi?id=119067
1017
1018         Reviewed by Noam Rosenthal.
1019
1020         A view being in the "active" state generally means that it is not in the
1021         "background", although this definition can vary depending on the platform
1022         under consideration.
1023
1024         This patch adds the following APIs to WKView:
1025         - bool WKViewIsActive(WKViewRef)
1026         This API accepts a WKViewRef as parameter and returns a boolean indicating
1027         whether the given view is active.
1028
1029         - void WKViewSetIsActive(WKViewRef, bool)
1030         This API accepts a WKViewRef and a boolean as parameteres, and it sets the
1031         active state of the given view to the given boolean argument.
1032
1033         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1034         (WKViewIsActive): API added.
1035         (WKViewSetIsActive): Ditto.
1036         * UIProcess/API/C/CoordinatedGraphics/WKView.h: Export aforementioned API.
1037         * UIProcess/CoordinatedGraphics/WebView.cpp:
1038         (WebKit::WebView::initialize): Use new setActive method.
1039         (WebKit::WebView::setActive): Added method to set the active state of the
1040         view.
1041         (WebKit::WebView::isActive): Added method to return the active state of
1042         view.
1043         (WebKit::WebView::enterAcceleratedCompositingMode): Use new setActive
1044         method.
1045         (WebKit::WebView::exitAcceleratedCompositingMode): Ditto.
1046         * UIProcess/CoordinatedGraphics/WebView.h: Added declarations of isActive
1047         and setActive.
1048
1049 2013-07-29  Jae Hyun Park  <jae.park@company100.net>
1050
1051         Remove duplicated LayerTreeHost::supportsAcceleratedCompositing
1052         https://bugs.webkit.org/show_bug.cgi?id=118949
1053
1054         Reviewed by Noam Rosenthal.
1055
1056         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1057         * WebProcess/WebPage/LayerTreeHost.h:
1058         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
1059
1060 2013-07-29  Zan Dobersek  <zdobersek@igalia.com>
1061
1062         [Automake] Remove references to non-existent *_CFLAGS and *_LIBS variables
1063         https://bugs.webkit.org/show_bug.cgi?id=119212
1064
1065         Reviewed by Carlos Garcia Campos.
1066
1067         * GNUmakefile.am: Remove references to GLOBALDEPS_(CFLAGS|LIBS) and CLUTTER_(CFLAGS|LIBS)
1068         variables that are not defined during the configuration process.
1069
1070 2013-07-28  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1071
1072         [EFL][WK2] Simplify context_menu_spelling_items_availability unit test
1073         https://bugs.webkit.org/show_bug.cgi?id=119085
1074
1075         Reviewed by Gyuyoung Kim.
1076
1077         Use findContextMenuItem method to check whether the item
1078         appears in context menu.
1079
1080         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
1081         (EWK2TextCheckerTest::findContextMenuItem):
1082         Do not report failure inside the method.
1083         It doesn't allow to test the negative test cases.
1084
1085         (EWK2TextCheckerTest::checkCorrectnessOfSpellingItems):
1086         Use findContextMenuItem method.
1087
1088         (EWK2TextCheckerTest::toogleCheckSpellingWhileTyping):
1089         (EWK2TextCheckerTest::selectLearnSpelling):
1090         (EWK2TextCheckerTest::selectIgnoreSpelling):
1091         Verify the return value of findContextMenuItem.
1092
1093         (TEST_F):
1094         Reset wasContextMenuShown variable, it's needed after r152153.
1095         Use waitUntilTrue method.
1096
1097 2013-07-27  Jacky Jiang  <zhajiang@blackberry.com>
1098
1099         Replace all uses of GraphicsLayer::create function with the one that takes a GraphicsLayerFactory
1100         https://bugs.webkit.org/show_bug.cgi?id=119186
1101
1102         Reviewed by Anders Carlsson.
1103
1104         * UIProcess/mac/RemoteLayerTreeHost.mm:
1105         (WebKit::RemoteLayerTreeHost::getOrCreateLayer):
1106
1107 2013-07-27  Chris Fleizach  <cfleizach@apple.com>
1108
1109         AX: VoiceOver not working with data detection page overlays
1110         https://bugs.webkit.org/show_bug.cgi?id=118680
1111
1112         Reviewed by Sam Weinig.
1113
1114         Expose API in BundlePageOverlay so that accessibility attributes can be retrieved through the overlay.
1115         This requires two methods in a new callback struct. One to copy the attribute names, and the other to 
1116         copy the attribute values. I've folded both parameterized and non-parameterized attribute names into one method
1117         with a boolean to determine which one should be used. The non-parameterized attributes are not used or passed to the
1118         overlay at this time as there are no clients with such a need.
1119
1120         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
1121         (PageOverlayClientImpl::setAccessibilityClient):
1122         (PageOverlayClientImpl::PageOverlayClientImpl):
1123         (PageOverlayClientImpl::copyAccessibilityAttributeValue):
1124         (PageOverlayClientImpl::copyAccessibilityAttributeNames):
1125         (WKBundlePageOverlaySetAccessibilityClient):
1126         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
1127         * WebProcess/WebPage/PageOverlay.cpp:
1128         (WebKit::PageOverlay::copyAccessibilityAttributeValue):
1129         (WebKit::PageOverlay::copyAccessibilityAttributeNames):
1130         * WebProcess/WebPage/PageOverlay.h:
1131         (WebKit::PageOverlay::Client::copyAccessibilityAttributeValue):
1132         (WebKit::PageOverlay::Client::copyAccessibilityAttributeNames):
1133         (WebKit::PageOverlay::client):
1134         * WebProcess/WebPage/WebPage.cpp:
1135         (WebKit::WebPage::pageOverlayCopyAccessibilityAttributeValue):
1136         (WebKit::WebPage::pageOverlayCopyAccessibilityAttributesNames):
1137         * WebProcess/WebPage/WebPage.h:
1138         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
1139         (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
1140         (-[WKAccessibilityWebPageObject _convertScreenPointToWindow:]):
1141         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
1142
1143 2013-07-27  Simon Fraser  <simon.fraser@apple.com>
1144
1145         If entering fullscreen for a window fails, don't leave things in a bad state
1146         https://bugs.webkit.org/show_bug.cgi?id=119179
1147
1148         Reviewed by Sam Weinig.
1149         
1150         On Lion, attempting to take a video fullscreen when the Safari window is already
1151         fullscreen can sometimes fail, and AppKit informs us via windowDidFailToEnterFullScreen:
1152         
1153         When this happens we have to undo the work done when entering fullscreen, to
1154         avoid leaving things in a bad state.
1155
1156         * UIProcess/mac/WKFullScreenWindowController.mm:
1157         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
1158
1159 2013-07-26  Tim Horton  <timothy_horton@apple.com>
1160
1161         Add a mode where autosizing fixes the FrameView height to at least the WKView height
1162         https://bugs.webkit.org/show_bug.cgi?id=119104
1163         <rdar://problem/14549021>
1164
1165         Reviewed by Anders Carlsson.
1166
1167         * Shared/WebPageCreationParameters.cpp:
1168         (WebKit::WebPageCreationParameters::encode):
1169         (WebKit::WebPageCreationParameters::decode):
1170         * Shared/WebPageCreationParameters.h:
1171         Add autoSizingShouldExpandToViewHeight parameter.
1172
1173         * UIProcess/API/mac/WKView.mm:
1174         (-[WKView minimumWidthForAutoLayout]):
1175         (-[WKView setMinimumWidthForAutoLayout:]):
1176         Un-deprecate these as they're still useful if not sending a height.
1177
1178         (-[WKView shouldExpandToViewHeightForAutoLayout]):
1179         (-[WKView setShouldExpandToViewHeightForAutoLayout:]):
1180         * UIProcess/API/mac/WKViewPrivate.h:
1181         New property, forward to WebPageProxy.
1182
1183         * UIProcess/WebPageProxy.cpp:
1184         (WebKit::WebPageProxy::WebPageProxy):
1185         (WebKit::WebPageProxy::creationParameters):
1186         (WebKit::WebPageProxy::setAutoSizingShouldExpandToViewHeight):
1187         * UIProcess/WebPageProxy.h:
1188         (WebKit::WebPageProxy::autoSizingShouldExpandToViewHeight):
1189         New property, forward to WebPage.
1190
1191         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1192         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1193         If enabled, update the FrameView's autoSizeFixedMinimumHeight.
1194
1195         * WebProcess/WebPage/WebPage.cpp:
1196         (WebKit::WebPage::WebPage):
1197         (WebKit::WebPage::setAutoSizingShouldExpandToViewHeight):
1198         * WebProcess/WebPage/WebPage.h:
1199         (WebKit::WebPage::autoSizingShouldExpandToViewHeight):
1200         New property; if enabled, set FrameView's autoSizeFixedMinimumHeight,
1201         otherwise reset it to 0.
1202
1203         * WebProcess/WebPage/WebPage.messages.in:
1204         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1205         (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired):
1206         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
1207         Retrieve intrinsic content size explicitly from the FrameView, as
1208         it may not have used it as its final contentsSize if
1209         autoSizeFixedMinimumHeight is set.
1210
1211         Set the WebPage's size in case the load is committed so that the
1212         WebFrameLoaderClient doesn't reset us to the wrong size.
1213
1214         Update autoSizeFixedMinimumHeight if enabled when the view size changes.
1215
1216 2013-07-25  Andreas Kling  <akling@apple.com>
1217
1218         ChromeClient::focusedNodeChanged() should be focusedElementChanged().
1219         <http://webkit.org/b/119110>
1220
1221         Reviewed by Anders Carlsson.
1222
1223         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1224         (WebKit::WebChromeClient::focusedElementChanged):
1225         * WebProcess/WebCoreSupport/WebChromeClient.h:
1226
1227 2013-07-25  Kwang Yul Seo  <skyul@company100.net>
1228
1229         [WK2][Soup] Add private browsing support
1230         https://bugs.webkit.org/show_bug.cgi?id=118657
1231
1232         Reviewed by Gustavo Noronha Silva.
1233
1234         Support private browsing in WK2 by implementing private browsing
1235         related methods in WebFrameNetworkingContext.
1236
1237         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1238         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
1239         Add USE(SOUP) guard.
1240
1241         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
1242         Add private browsing support methods. Copied from the Mac port.
1243         (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
1244         (WebKit::WebFrameNetworkingContext::destroyPrivateBrowsingSession):
1245         (WebKit::WebFrameNetworkingContext::storageSession):
1246         Check if the frame enables private browsing and return the private
1247         browsing session.
1248         * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
1249
1250         * WebProcess/WebProcess.cpp:
1251         (WebKit::WebProcess::ensurePrivateBrowsingSession):
1252         Add USE(SOUP) guard.
1253
1254 2013-07-25  Kwang Yul Seo  <skyul@company100.net>
1255
1256         Build fix: use of long long in CoreIPC::ArgumentEncoder and CoreIPC::ArgumentDecoder
1257         https://bugs.webkit.org/show_bug.cgi?id=118228
1258
1259         Reviewed by Anders Carlsson.
1260
1261         Build fails on some platforms where int64_t and long long are different types.
1262
1263         * Shared/FileAPI/BlobRegistrationData.cpp:
1264         (WebKit::BlobRegistrationData::encode):
1265         Add explicit casts to int64_t.
1266         (WebKit::BlobRegistrationData::decode):
1267         Use int64_t instead of long long.
1268
1269 2013-07-25  Anders Carlsson  <andersca@apple.com>
1270
1271         Remove lastModifiedDate from ResourceResponse
1272         https://bugs.webkit.org/show_bug.cgi?id=119092
1273
1274         Reviewed by Andreas Kling.
1275
1276         Update for WebCore changes.
1277
1278         * WebProcess/Plugins/PluginView.cpp:
1279         (WebKit::lastModifiedDate):
1280         Use ResourceResponse::lastModified() to get the last modified date.
1281
1282         (WebKit::PluginView::Stream::didReceiveResponse):
1283         Call the static lastModified function.
1284
1285         (WebKit::PluginView::manualLoadDidReceiveResponse):
1286         Ditto.
1287
1288 2013-07-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1289
1290         [GTK] Add support for running unit tests in the web process
1291         https://bugs.webkit.org/show_bug.cgi?id=118427
1292
1293         Reviewed by Gustavo Noronha Silva.
1294
1295         Some tests, like GObject DOM bindings API tests, run entirely in
1296         the WebProcess, so we just need to start the test from the UI
1297         process and wait until the test finishes running in the
1298         WebProcess. Tests are split in two files, one containing the
1299         actual test that runs in the WebProcess and another one to add the
1300         tests to the glib test system that works as a
1301         proxy. WebProcessTestRunner class starts a private DBus session
1302         bus and starts the tests sending a message to the WebExtension
1303         waiting until it finishes or fails. WebProcess tests are created
1304         by defining a class derived from WebProcessTest class and
1305         implementing the static create method and the virtual runTest
1306         method. The macro REGISTER_TEST is used by the web process tests
1307         to register their test cases. This patch includes the migration
1308         of the WebKitDOMNode test, all other GObject DOM bindings tests
1309         will be migrated in the same way in follow up patches.
1310
1311         * UIProcess/API/gtk/tests/DOMNodeTest.cpp: Added.
1312         (WebKitDOMNodeTest::create): Create a new WebKitDOMNodeTest.
1313         (WebKitDOMNodeTest::webPageFromArgs): Get the pageID parameter
1314         from the arguments dictionary.
1315         (WebKitDOMNodeTest::testHierarchyNavigation):
1316         (WebKitDOMNodeTest::testInsertion):
1317         (WebKitDOMNodeTest::runTest): Run the given test.
1318         (registerTests): Register test cases.
1319         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to
1320         compilation.
1321         * UIProcess/API/gtk/tests/TestDOMNode.cpp: Added.
1322         (testWebKitDOMNodeHierarchyNavigation):
1323         (testWebKitDOMNodeInsertion):
1324         (beforeAll):
1325         (afterAll):
1326         * UIProcess/API/gtk/tests/TestMain.cpp:
1327         (main): Unset DBUS_SESSION_BUS_ADDRESS environment variable to
1328         make sure that the GLib bus singleton is initialized by the
1329         private DBus session bus created by the tests.
1330         * UIProcess/API/gtk/tests/WebProcessTest.cpp: Added.
1331         (testsMap): Initialize and get the global map of tests.
1332         (WebProcessTest::add): Add a new test to the map, keeping a
1333         function to create the test.
1334         (WebProcessTest::create): Create a test for the given name.
1335         (methodCallCallback): Handle RunTest DBus method. It creates and
1336         runs the given test.
1337         (webkit_web_extension_initialize):Register the DBus service for
1338         this WebExtension.
1339         * UIProcess/API/gtk/tests/WebProcessTest.h: Added.
1340         * UIProcess/API/gtk/tests/WebProcessTestRunner.cpp: Added.
1341         (WebProcessTestRunner::WebProcessTestRunner): Start a private DBus
1342         session bus and get a connection to it.
1343         (WebProcessTestRunner::~WebProcessTestRunner): Stop the private
1344         DBus session bus.
1345         (WebProcessTestRunner::proxyCreatedCallback):
1346         (WebProcessTestRunner::proxy): Create a new proxy to send messages
1347         to the WebExtension if it doesn't exists.
1348         (WebProcessTestRunner::onNameAppeared): Called when the DBus
1349         service has been registered in the WebExtension and it's safe to
1350         create a proxy.
1351         (WebProcessTestRunner::onNameVanished): Called when the DBus
1352         service is unregistered. This happens when the web process crash,
1353         so we just exit here, because the g_asserts in the web process
1354         have already registered the error message.
1355         (WebProcessTestRunner::testFinishedCallback): Called when the
1356         WebProcess tests has finished.
1357         (WebProcessTestRunner::runTest): Send a message to the
1358         WebExtension to start the given test and monitor the service.
1359         (WebProcessTestRunner::finishTest): Save the test result and
1360         finish the main loop.
1361         * UIProcess/API/gtk/tests/WebProcessTestRunner.h: Added.
1362
1363 2013-05-05  Geoffrey Garen  <ggaren@apple.com>
1364
1365         Rolled back in r149527 with crash fixed.
1366
1367         Reviewed by Oliver Hunt.
1368
1369             Rationalized 'this' value conversion
1370             https://bugs.webkit.org/show_bug.cgi?id=115542
1371
1372 2013-07-24  Ruth Fong  <ruth_fong@apple.com>
1373
1374         Rename WebColorChooserProxy
1375         <rdar://problem/14528039> and https://bugs.webkit.org/show_bug.cgi?id=119025
1376
1377         Reviewed by Brady Eidson.
1378
1379         Renamed WebColorChooserProxy to WebColorPicker since the name WebColorChoooserProxy
1380         implies that it represents the same object as WebColorChooser, which is not true.
1381         Also, renamed createColorChooserProxy to createColorPicker in WebPageProxy and 
1382         platform-equivalent versions of it.
1383
1384         * CMakeLists.txt:
1385         * GNUmakefile.list.am:
1386         * Target.pri:
1387         * UIProcess/API/gtk/PageClientImpl.cpp:
1388         (WebKit::PageClientImpl::createColorPicker):
1389         * UIProcess/API/gtk/PageClientImpl.h:
1390         * UIProcess/API/mac/PageClientImpl.h:
1391         * UIProcess/API/mac/PageClientImpl.mm:
1392         (WebKit::PageClientImpl::createColorPicker):
1393         * UIProcess/API/qt/raw/qrawwebview.cpp:
1394         (QRawWebViewPrivate::createColorPicker):
1395         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
1396         * UIProcess/CoordinatedGraphics/WebView.cpp:
1397         (WebKit::WebView::createColorPicker):
1398         * UIProcess/CoordinatedGraphics/WebView.h:
1399         * UIProcess/PageClient.h:
1400         * UIProcess/WebColorChooserProxy.cpp: Removed.
1401         * UIProcess/WebColorChooserProxy.h: Removed.
1402         * UIProcess/WebColorPicker.cpp: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.cpp.
1403         (WebKit::WebColorPicker::WebColorPicker):
1404         (WebKit::WebColorPicker::~WebColorPicker):
1405         (WebKit::WebColorPicker::endChooser):
1406         (WebKit::WebColorPicker::setSelectedColor):
1407         * UIProcess/WebColorPicker.h: Copied from Source/WebKit2/UIProcess/WebColorChooserProxy.h.
1408         (WebKit::WebColorPicker::create):
1409         * UIProcess/WebPageProxy.cpp:
1410         (WebKit::WebPageProxy::close):
1411         (WebKit::WebPageProxy::showColorChooser):
1412         (WebKit::WebPageProxy::setColorChooserColor):
1413         (WebKit::WebPageProxy::endColorChooser):
1414         (WebKit::WebPageProxy::didEndColorChooser):
1415         (WebKit::WebPageProxy::resetStateAfterProcessExited):
1416         * UIProcess/WebPageProxy.h: Renamed m_colorChooser to m_colorPicker.
1417         * UIProcess/qt/QtPageClient.cpp:
1418         (WebKit::QtPageClient::createColorPicker):
1419         * UIProcess/qt/QtPageClient.h:
1420         * UIProcess/qt/WebColorChooserProxyQt.cpp: Removed.
1421         * UIProcess/qt/WebColorChooserProxyQt.h: Removed.
1422         * UIProcess/qt/WebColorPickerQt.cpp: Added.
1423         (WebKit::ColorChooserContextObject::ColorChooserContextObject):
1424         (WebKit::ColorChooserContextObject::currentColor):
1425         (WebKit::ColorChooserContextObject::elementRect):
1426         (WebKit::ColorChooserContextObject::accept):
1427         (WebKit::ColorChooserContextObject::reject):
1428         (WebKit::WebColorPickerQt::WebColorPickerQt):
1429         (WebKit::WebColorPickerQt::~WebColorPickerQt):
1430         (WebKit::WebColorPickerQt::createItem):
1431         (WebKit::WebColorPickerQt::createContext):
1432         (WebKit::WebColorPickerQt::setSelectedColor):
1433         (WebKit::WebColorPickerQt::notifyColorSelected):
1434         (WebKit::WebColorPickerQt::endChooser):
1435         * UIProcess/qt/WebColorPickerQt.h: Added.
1436         (WebKit::WebColorPickerQt::create):
1437         * WebKit2.xcodeproj/project.pbxproj:
1438
1439 2013-07-24  Anders Carlsson  <andersca@apple.com>
1440
1441         Crash when calling WKPageGetProcessIdentifier after aborted process launch
1442         https://bugs.webkit.org/show_bug.cgi?id=119069
1443         <rdar://problem/14494064>
1444
1445         Reviewed by Andreas Kling.
1446
1447         * UIProcess/WebPageProxy.cpp:
1448         (WebKit::WebPageProxy::processIdentifier):
1449         Check if the page is closed instead of checking whether we have a process - We'll always have a process.
1450         
1451         (WebKit::WebPageProxy::isValid):
1452         Make this const.
1453
1454         * UIProcess/WebPageProxy.h:
1455
1456 2013-07-24  Kwang Yul Seo  <skyul@company100.net>
1457
1458         [WK2][Soup] Add entry point for network process
1459         https://bugs.webkit.org/show_bug.cgi?id=110136
1460
1461         Reviewed by Gustavo Noronha Silva.
1462
1463         Original patch by Balazs Kelemen <kbalazs@webkit.org>.
1464
1465         Added a common entry point for non-Mac Unix ports.
1466
1467         * NetworkProcess/unix/NetworkProcessMainUnix.cpp: Added.
1468         (WebKit::NetworkProcessMain):
1469         * NetworkProcess/unix/NetworkProcessMainUnix.h: Added.
1470         * unix/NetworkMainUnix.cpp: Added.
1471         (main):
1472
1473 2013-07-24  Jessie Berlin  <jberlin@apple.com>
1474
1475         Remove WKPageGetPlugInInformation - it is not used anymore
1476         https://bugs.webkit.org/show_bug.cgi?id=119047
1477
1478         Reviewed by Alexey Proskuryakov.
1479
1480         Revert r151172, which fixed a crash introduced in r151043, r151054, which fixed some naming
1481         and ref-churn issues introduced in r151043, and r151043, which added
1482         WKPageGetPlugInInformation.
1483
1484         * UIProcess/API/C/mac/WKPagePrivateMac.cpp:
1485         (WKPageIsURLKnownHSTSHost):
1486         * UIProcess/API/C/mac/WKPagePrivateMac.h:
1487         * UIProcess/Plugins/PluginProcessManager.h:
1488         * UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
1489         * UIProcess/WebPageProxy.cpp:
1490         (WebKit::WebPageProxy::close):
1491         * UIProcess/WebPageProxy.h:
1492         * UIProcess/WebPageProxy.messages.in:
1493         * UIProcess/mac/WebPageProxyMac.mm:
1494         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1495         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
1496         * WebProcess/Plugins/Plugin.h:
1497         * WebProcess/Plugins/PluginProxy.h:
1498         * WebProcess/Plugins/PluginView.h:
1499         * WebProcess/WebPage/WebPage.h:
1500         * WebProcess/WebPage/WebPage.messages.in:
1501         * WebProcess/WebPage/mac/WebPageMac.mm:
1502
1503 2013-07-24  Jessie Berlin  <jberlin@apple.com>
1504
1505         Remove WKPageGetPlugInInformation - it is not used anymore
1506         https://bugs.webkit.org/show_bug.cgi?id=119047
1507
1508         Rubber-stamped by Alexey Proskuryakov.
1509
1510         Revert r152328, which added a key used only in the callback info for
1511         WKPageGetPlugInInformation.
1512
1513         * Shared/API/c/WKPluginInformation.cpp:
1514         * Shared/API/c/WKPluginInformation.h:
1515         * Shared/Plugins/Netscape/PluginInformation.cpp:
1516         * Shared/Plugins/Netscape/PluginInformation.h:
1517         * UIProcess/WebPageProxy.h:
1518         * UIProcess/WebPageProxy.messages.in:
1519         * UIProcess/mac/WebPageProxyMac.mm:
1520         (WebKit::WebPageProxy::containsPlugInCallback):
1521         * WebProcess/WebPage/mac/WebPageMac.mm:
1522         (WebKit::WebPage::containsPluginViewsWithPluginProcessToken):
1523
1524 2013-07-24  Anton Obzhirov  <a.obzhirov@samsung.com>
1525
1526         [GTK] TestInspectorServer unit test is timing out
1527         https://bugs.webkit.org/show_bug.cgi?id=105866
1528
1529         Reviewed by Gustavo Noronha Silva.
1530
1531         The test failed because it couldn't find inspector resources in default folder
1532         (make install step was missing). It uses now resources available in
1533         WebKitBuild folder. WebInspectorServerGtk was refactored as well to make
1534         easier to use WEBKIT_INSPECTOR_SERVER_PATH variable.
1535
1536         * UIProcess/API/gtk/tests/GNUmakefile.am:
1537         * UIProcess/API/gtk/tests/InspectorTestServer.cpp:
1538         (main):
1539         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
1540         (testInspectorServerPageList):
1541         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
1542         (WebKit::WebInspectorServer::platformResourceForPath):
1543         (WebKit::WebInspectorServer::buildPageList):
1544         (WebKit::WebInspectorServer::inspectorServerFilesPath):
1545
1546 2013-07-23  Simon Cooper  <scooper@apple.com>
1547
1548         10.7: Java applets do not work due to sandbox violation/exception
1549         https://bugs.webkit.org/show_bug.cgi?id=118920
1550         <rdar://problem/14471541&12910934&14223830&14260729&14267679>
1551
1552         Reviewed by Alexey Proskuryakov.
1553
1554         Introduce versioning into the common profile and use it to fix
1555         a number of issues with Java on 10.7 and 10.8. Allow writing the
1556         com.apple.java.util.prefs preference file. This change also
1557         introduces a "/Library/Application Support/Java/PublicFiles"
1558         area which Java can read without any restrictions. Files written
1559         to this location will need to be created and written to by
1560         a privileged process.
1561
1562         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
1563         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
1564
1565 2013-07-23  Eunmi Lee  <eunmi15.lee@samsung.com>
1566
1567         [EFL][WK2] Add doneWithTouchEvent callback to the WKViewClient.
1568         https://bugs.webkit.org/show_bug.cgi?id=110085
1569
1570         Reviewed by Kenneth Rohde Christiansen.
1571
1572         Add doneWithTouchEvent callback to the WKViewClient in order to get the
1573         result of touch events in the EwkView. The result will be used to
1574         recognize gestures in the Bug 102643.
1575
1576         APIs to get values from WKTouchEventRef and WKTouchPointRef are added
1577         because WKTypeRef is opaque to the applications.
1578
1579         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1580         * UIProcess/API/C/efl/WKAPICastEfl.h:
1581         (WebKit::toAPI):
1582         * UIProcess/API/C/efl/WKEventEfl.cpp:
1583         (WKTouchEventGetType):
1584         (WKTouchEventGetTouchPoints):
1585         (WKTouchEventGetModifiers):
1586         (WKTouchEventGetTimestamp):
1587         (WKTouchPointGetID):
1588         (WKTouchPointGetState):
1589         (WKTouchPointGetScreenPosition):
1590         (WKTouchPointGetPosition):
1591         (WKTouchPointGetRadius):
1592         (WKTouchPointGetRotationAngle):
1593         (WKTouchPointGetForceFactor):
1594         * UIProcess/API/C/efl/WKEventEfl.h:
1595         * UIProcess/API/efl/EwkView.cpp:
1596         (EwkView::doneWithTouchEvent):
1597         * UIProcess/API/efl/EwkView.h:
1598         * UIProcess/CoordinatedGraphics/WebView.cpp:
1599         (WebKit::WebView::doneWithTouchEvent):
1600         * UIProcess/CoordinatedGraphics/WebViewClient.cpp:
1601         (WebKit::WebViewClient::doneWithTouchEvent):
1602         * UIProcess/CoordinatedGraphics/WebViewClient.h:
1603         * UIProcess/efl/ViewClientEfl.cpp:
1604         (WebKit::ViewClientEfl::doneWithTouchEvent):
1605         (WebKit::ViewClientEfl::ViewClientEfl):
1606         * UIProcess/efl/ViewClientEfl.h:
1607
1608 2013-07-22  Alexey Proskuryakov  <ap@apple.com>
1609
1610         Frequent MESSAGE_CHECK failures in WebPageProxy::didReceiveEvent
1611         https://bugs.webkit.org/show_bug.cgi?id=118976
1612         <rdar://problem/14155030>
1613
1614         Reviewed by Sam Weinig.
1615
1616         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::resetStateAfterProcessExited):
1617         Clear m_gestureEventQueue, just like we clear all other event queues here.
1618
1619 2013-07-21  Anders Carlsson  <andersca@apple.com>
1620
1621         Java Updater not launched on Lion and Mountain Lion
1622         https://bugs.webkit.org/show_bug.cgi?id=118953
1623         <rdar://problem/14496721>
1624
1625         Reviewed by Sam Weinig.
1626
1627         On Lion and Mountain Lion, -[NSURL isEqual:] will return NO for two file URLs if one of
1628         them has "localhost" specified, even if the paths are otherwise equal. Work around this by
1629         comparing the paths directly.
1630
1631         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1632         (WebKit::isJavaUpdaterURL):
1633
1634 2013-07-19  Morten Stenshorne  <mstensho@opera.com>
1635
1636         [GTK] Need a way to enable region based columns from the command line
1637         https://bugs.webkit.org/show_bug.cgi?id=116611
1638
1639         Reviewed by Martin Robinson.
1640
1641         Add an environment variable to enable experimental features.
1642
1643         This provides a means to enable experimental features without polluting
1644         the public API.
1645
1646         Environment variable name: WEBKITGTK_EXPERIMENTAL_FEATURES
1647
1648         Format: WEBKITGTK_EXPERIMENTAL_FEATURES="<feature1>=1,<feature2>=1,..."
1649         Or, to enable all experimental features: WEBKITGTK_EXPERIMENTAL_FEATURES=all
1650
1651         So far the only feature is region based columns (implement multicol using
1652         the CSS regions implementation rather than ColumnInfo & co) - REGION_BASED_COLUMNS.
1653
1654         Example: WEBKITGTK_EXPERIMENTAL_FEATURES="REGION_BASED_COLUMNS=1"
1655
1656         * GNUmakefile.list.am:
1657         * PlatformGTK.cmake:
1658         * UIProcess/API/gtk/WebKitSettings.cpp:
1659         (webKitSettingsConstructed):
1660         (webkit_settings_class_init):
1661         * UIProcess/gtk/ExperimentalFeatures.cpp: Added.
1662         (WebKit):
1663         (Setting):
1664         (WebKit::ExperimentalFeatures::ExperimentalFeatures):
1665         (WebKit::ExperimentalFeatures::isEnabled):
1666         (WebKit::ExperimentalFeatures::setEnableByName):
1667         (WebKit::ExperimentalFeatures::parseEnvironment):
1668         * UIProcess/gtk/ExperimentalFeatures.h: Added.
1669         (WebKit):
1670         (ExperimentalFeatures):
1671
1672 2013-07-18  Eunmi Lee  <eunmi15.lee@samsung.com>
1673
1674         [WK2] Share Qt port's codes to find zoomable area with CoordinatedGraphics.
1675         https://bugs.webkit.org/show_bug.cgi?id=118585
1676
1677         Reviewed by Anders Carlsson.
1678
1679         The function to find zoomable area is needed in order to implement the
1680         feature to scale for double-tap gesture. The WK2 EFL and NIX port want
1681         to use that function, so extract the code from the Qt port, make it
1682         usable in the CoordinatedGraphics and add API and callback.
1683
1684         * CMakeLists.txt:
1685         * Target.pri:
1686         * UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
1687         (WKViewFindZoomableAreaForRect):
1688         * UIProcess/API/C/CoordinatedGraphics/WKView.h:
1689         * UIProcess/API/efl/EwkView.cpp:
1690         (EwkView::didFindZoomableArea):
1691         * UIProcess/API/efl/EwkView.h:
1692         * UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: Added.
1693         (WebKit::WebPageProxy::findZoomableAreaForPoint):
1694         (WebKit::WebPageProxy::didFindZoomableArea):
1695         * UIProcess/CoordinatedGraphics/WebView.cpp:
1696         (WebKit::WebView::didFindZoomableArea):
1697         (WebKit::WebView::findZoomableAreaForPoint):
1698         * UIProcess/CoordinatedGraphics/WebView.h:
1699         * UIProcess/CoordinatedGraphics/WebViewClient.cpp:
1700         (WebKit::WebViewClient::didFindZoomableArea):
1701         * UIProcess/CoordinatedGraphics/WebViewClient.h:
1702         * UIProcess/PageClient.h:
1703         * UIProcess/WebPageProxy.h:
1704         * UIProcess/WebPageProxy.messages.in:
1705         * UIProcess/efl/ViewClientEfl.cpp:
1706         (WebKit::ViewClientEfl::didFindZoomableArea):
1707         (WebKit::ViewClientEfl::ViewClientEfl):
1708         * UIProcess/efl/ViewClientEfl.h:
1709         * UIProcess/qt/WebPageProxyQt.cpp:
1710         * WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Added.
1711         (WebKit::WebPage::findZoomableAreaForPoint):
1712         * WebProcess/WebPage/WebPage.cpp:
1713         * WebProcess/WebPage/WebPage.h:
1714         * WebProcess/WebPage/WebPage.messages.in:
1715
1716 2013-07-18  Simon Cooper  <scooper@apple.com>
1717
1718         Flash Player: deny file-read-data /Library/Application Support/Macromedia/FlashAuthor.cfg
1719         https://bugs.webkit.org/show_bug.cgi?id=118874
1720         <rdar://problem/14271327>
1721
1722         Reviewed by Alexey Proskuryakov.
1723
1724         Silently deny access to FlashAuthor.cfg. This location contains
1725         files containing lists of paths that Flash Player will
1726         "allow" access to (without asking the user). Since the plugin
1727         sandbox won't permit the access to the listed paths it is better
1728         to silently block attempts to read this "whitelist".
1729
1730         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
1731
1732 2013-07-18  Tim Horton  <timothy_horton@apple.com>
1733
1734         [wk2] Ensure that the plugin layer is removed completely when the PluginProcess crashes
1735         https://bugs.webkit.org/show_bug.cgi?id=118862
1736
1737         Reviewed by Anders Carlsson.
1738
1739         * WebProcess/Plugins/PluginView.cpp:
1740         (WebKit::PluginView::PluginView):
1741         Add m_pluginProcessHasCrashed.
1742
1743         (WebKit::PluginView::platformLayer):
1744         Don't return the plugin's layer if it has crashed.
1745
1746         (WebKit::PluginView::pluginProcessCrashed):
1747         Set m_pluginProcessHasCrashed.
1748         Cause a style recalc so that we rebuild the layer tree; our layer won't be included.
1749
1750         * WebProcess/Plugins/PluginView.h:
1751         Add m_pluginProcessHasCrashed.
1752
1753 2013-07-18  Alexey Proskuryakov  <ap@apple.com>
1754
1755         <rdar://problem/13886443> Assertion failures in NetworkProcess in SandboxExtension::revoke when aborting SyncNetworkResourceLoader
1756         <rdar://problem/13826348> ASSERT(!m_useCount) fails in NetworkProcess at SandboxExtension::~SandboxExtension
1757         https://bugs.webkit.org/show_bug.cgi?id=118855
1758
1759         Reviewed by Brady Eidson.
1760
1761         * NetworkProcess/NetworkResourceLoader.cpp:
1762         (WebKit::NetworkResourceLoader::cleanup):
1763         (WebKit::NetworkResourceLoader::didFinishLoading):
1764         (WebKit::NetworkResourceLoader::didFail):
1765         Moved sandbox extension invalidation to cleanup() meaning that we won't fail to
1766         do this when aborting a loader that currently loading from network.
1767     
1768         * NetworkProcess/SchedulableLoader.cpp:
1769         (WebKit::SchedulableLoader::SchedulableLoader):
1770         (WebKit::SchedulableLoader::consumeSandboxExtensions):
1771         (WebKit::SchedulableLoader::invalidateSandboxExtensions):
1772         * NetworkProcess/SchedulableLoader.h:
1773         Keep track of whether sandbox extensions are consumed, we don't want to revoke
1774         extensions that were never consumed (as used to be the case with sync loaders,
1775         and would be with async ones after the above fix). Also, get rid of extensions
1776         immediately when invalidating, we won't need them again.
1777
1778 2013-07-18  Tim Horton  <timothy_horton@apple.com>
1779
1780         Remove PDFViewController and WKView "custom representations"
1781         https://bugs.webkit.org/show_bug.cgi?id=118720
1782
1783         Reviewed by Alexey Proskuryakov.
1784
1785         PDFViewController was the only implementation of
1786         a "custom representation" for a WKView. As it has
1787         been superceded by PDFPlugin, we can remove both
1788         PDFViewController and the notion of a WKView custom
1789         representation.
1790
1791         * UIProcess/API/gtk/PageClientImpl.cpp:
1792         * UIProcess/API/gtk/PageClientImpl.h:
1793         * UIProcess/API/mac/PDFViewController.h: Removed.
1794         * UIProcess/API/mac/PDFViewController.mm: Removed.
1795         * UIProcess/API/mac/PageClientImpl.h:
1796         * UIProcess/API/mac/PageClientImpl.mm:
1797         * UIProcess/API/mac/WKView.mm:
1798         (-[WKView accessibilityFocusedUIElement]):
1799         (-[WKView accessibilityHitTest:]):
1800         (-[WKView accessibilityAttributeValue:]):
1801         (-[WKView printOperationWithPrintInfo:forFrame:]):
1802         * UIProcess/API/mac/WKViewInternal.h:
1803         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
1804         * UIProcess/CoordinatedGraphics/WebView.cpp:
1805         * UIProcess/CoordinatedGraphics/WebView.h:
1806         * UIProcess/DrawingAreaProxy.h:
1807         * UIProcess/DrawingAreaProxyImpl.cpp:
1808         * UIProcess/DrawingAreaProxyImpl.h:
1809         * UIProcess/PageClient.h:
1810         * UIProcess/WebPageProxy.cpp:
1811         (WebKit::WebPageProxy::WebPageProxy):
1812         (WebKit::WebPageProxy::supportsTextEncoding):
1813         (WebKit::WebPageProxy::supportsTextZoom):
1814         (WebKit::WebPageProxy::setTextZoomFactor):
1815         (WebKit::WebPageProxy::setPageZoomFactor):
1816         (WebKit::WebPageProxy::setPageAndTextZoomFactors):
1817         (WebKit::WebPageProxy::findString):
1818         (WebKit::WebPageProxy::countStringMatches):
1819         (WebKit::WebPageProxy::didCommitLoadForFrame):
1820         * UIProcess/WebPageProxy.h:
1821         (WebKit::WebPageProxy::textZoomFactor):
1822         (WebKit::WebPageProxy::pageZoomFactor):
1823         * UIProcess/WebPageProxy.messages.in:
1824         * UIProcess/qt/QtPageClient.h:
1825         * WebKit2.xcodeproj/project.pbxproj:
1826         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1827         (WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
1828         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1829         (WebKit::WebFrameLoaderClient::committedLoad):
1830         (WebKit::WebFrameLoaderClient::finishedLoading):
1831         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
1832         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
1833         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1834         * WebProcess/WebPage/DrawingArea.h:
1835         * WebProcess/WebPage/DrawingArea.messages.in:
1836         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1837         (WebKit::DrawingAreaImpl::setNeedsDisplayInRect):
1838         (WebKit::DrawingAreaImpl::scroll):
1839         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1840         (WebKit::DrawingAreaImpl::display):
1841         * WebProcess/WebPage/DrawingAreaImpl.h:
1842         * WebProcess/WebPage/WebPage.cpp:
1843         * WebProcess/WebPage/WebPage.h:
1844         * WebProcess/WebPage/mac/WebPageMac.mm:
1845         (WebKit::WebPage::platformPreferencesDidChange):
1846         * mac/WebKit2.order:
1847
1848 2013-07-18  Dong-Gwan Kim  <donggwan.kim@samsung.com>
1849
1850         [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_color_picker.cpp
1851         https://bugs.webkit.org/show_bug.cgi?id=118797
1852
1853         Reviewed by Christophe Dumez.
1854
1855         Some mouseClick methods are used in test_ewk2_color_picker.cpp.
1856         But it is difficult to understand what they mean.
1857         So i would like to replace those with more meaningful method for readability.
1858
1859         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
1860         (EWK2ColorPickerTest::clickButton):
1861         (TEST_F):
1862
1863 2013-07-18  Eunmi Lee  <eunmi15.lee@samsung.com>
1864
1865         [WK2] Replace getRect() to pixelSnappedBoundingBox().
1866         https://bugs.webkit.org/show_bug.cgi?id=118588
1867
1868         Reviewed by Noam Rosenthal.
1869
1870         The Node::getRect() function was removed in the
1871         http://trac.webkit.org/changeset/128006, so use
1872         pixelSnappedBoundingBox() instead.
1873
1874         * WebProcess/WebPage/WebPage.cpp:
1875         (WebKit::WebPage::findZoomableAreaForPoint):
1876
1877 2013-07-18  Dong-Gwan Kim  <donggwan.kim@samsung.com>
1878
1879         [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_context_menu.cpp
1880         https://bugs.webkit.org/show_bug.cgi?id=118796
1881
1882         Reviewed by Christophe Dumez.
1883
1884         Some mouseClick methods are used in test_ewk2_context_menu.cpp.
1885         But it is difficult to understand what they mean.
1886         So i would like to replace those with more meaningful method for readability.
1887
1888         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
1889         (EWK2ContextMenuTest::testContextMenu):
1890         (EWK2ContextMenuTest::testContextMenuForRemoveAndAppend):
1891         (EWK2ContextMenuTest::testContextMenuForSubmenu):
1892         (EWK2ContextMenuTest::finishTest):
1893         (EWK2ContextMenuTest::showContextMenu):
1894         (TEST_F):
1895
1896 2013-07-18  Dong-Gwan Kim  <donggwan.kim@samsung.com>
1897
1898         [EFL][WK2] Replace mouseClick with more meaningful method in test_ewk2_file_chooser_request.cpp
1899         https://bugs.webkit.org/show_bug.cgi?id=118792
1900
1901         Reviewed by Christophe Dumez.
1902
1903         Some mouseClick methods are used in test_ewk2_file_chooser_request.cpp.
1904         But it is difficult to understand what they mean.
1905         So i would like to replace those with more meaningful method for readability.
1906
1907         * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp:
1908         (EWK2FileChooserRequestTest::clickFileInput):
1909         (TEST_F):
1910
1911 2013-07-18  Dong-Gwan Kim  <donggwan.kim@samsung.com>
1912
1913         [EFL][WK2] Move all the static methods into EWK2TextCheckerTest in test_ewk2_text_checker.cpp
1914         https://bugs.webkit.org/show_bug.cgi?id=118790
1915
1916         Reviewed by Christophe Dumez.
1917
1918         All the static methods should be moved to EWK2TextCheckerTest.
1919
1920         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
1921         (EWK2TextCheckerTest::resetCallbacksExecutionStats):
1922         (EWK2TextCheckerTest::onTimeout):
1923         (EWK2TextCheckerTest::onSettingChange):
1924         (EWK2TextCheckerTest::onSpellDocumentTag):
1925         (EWK2TextCheckerTest::onSpellDocumentTagClose):
1926         (EWK2TextCheckerTest::onSpellingCheck):
1927         (EWK2TextCheckerTest::onSpellingForKnownWord):
1928         (EWK2TextCheckerTest::onWordGuesses):
1929         (EWK2TextCheckerTest::onWordLearn):
1930         (EWK2TextCheckerTest::onWordIgnore):
1931         (EWK2TextCheckerTest::findContextMenuItem):
1932         (EWK2TextCheckerTest::checkCorrectnessOfSpellingItems):
1933         (EWK2TextCheckerTest::toogleCheckSpellingWhileTyping):
1934         (EWK2TextCheckerTest::checkClientSuggestionsForWord):
1935         (EWK2TextCheckerTest::selectLearnSpelling):
1936         (EWK2TextCheckerTest::selectIgnoreSpelling):
1937         (EWK2TextCheckerTest::countContextMenuItems):
1938         (EWK2TextCheckerTest::clickButton):
1939         (EWK2TextCheckerTest::showContextMenu):
1940         (EWK2TextCheckerTest::selectFirstWord):
1941
1942 2013-07-17  Tim Horton  <timothy_horton@apple.com>
1943
1944         Update blocked/missing plug-in UI
1945         https://bugs.webkit.org/show_bug.cgi?id=118347
1946         <rdar://problem/14209318>
1947
1948         Reviewed by Sam Weinig.
1949
1950         * Platform/CoreIPC/HandleMessage.h:
1951         (CoreIPC::callMemberFunction):
1952         Add a 6 argument -> 4 reply message handler.
1953         (It seems that FindPlugin is getting a little out of hand.)
1954
1955         * Shared/APIClientTraits.cpp:
1956         * Shared/APIClientTraits.h:
1957         * UIProcess/API/C/WKPage.h:
1958         * UIProcess/WebLoaderClient.cpp:
1959         (WebKit::WebLoaderClient::pluginLoadPolicy):
1960         * UIProcess/WebLoaderClient.h:
1961         Add an unavailability description out-argument to a new version of
1962         pluginLoadPolicy, so clients can override the text of the unavailable
1963         plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits.
1964
1965         * UIProcess/WebPageProxy.cpp:
1966         (WebKit::WebPageProxy::findPlugin):
1967         * UIProcess/WebPageProxy.h:
1968         * UIProcess/WebPageProxy.messages.in:
1969         Plumb the unavailability description through to the WebProcess via
1970         the FindPlugin message.
1971
1972         * WebProcess/WebPage/WebPage.cpp:
1973         (WebKit::WebPage::createPlugin):
1974         Acquire the unavailability description from the client
1975         (via FindPlugin) and hand it to the RenderEmbeddedObject.
1976
1977 2013-07-17  Commit Queue  <commit-queue@webkit.org>
1978
1979         Unreviewed, rolling out r152701, r152703, r152739, r152754,
1980         and r152756.
1981         http://trac.webkit.org/changeset/152701
1982         http://trac.webkit.org/changeset/152703
1983         http://trac.webkit.org/changeset/152739
1984         http://trac.webkit.org/changeset/152754
1985         http://trac.webkit.org/changeset/152756
1986         https://bugs.webkit.org/show_bug.cgi?id=118821
1987
1988         this was a buggy fix and we're going to try something
1989         different (Requested by thorton on #webkit).
1990
1991         * Platform/CoreIPC/HandleMessage.h:
1992         * Shared/APIClientTraits.cpp:
1993         * Shared/APIClientTraits.h:
1994         * UIProcess/API/C/WKPage.h:
1995         * UIProcess/WebLoaderClient.cpp:
1996         (WebKit::WebLoaderClient::pluginLoadPolicy):
1997         * UIProcess/WebLoaderClient.h:
1998         * UIProcess/WebPageProxy.cpp:
1999         (WebKit::WebPageProxy::findPlugin):
2000         * UIProcess/WebPageProxy.h:
2001         * UIProcess/WebPageProxy.messages.in:
2002         * WebProcess/Plugins/PluginProcessConnection.cpp:
2003         (WebKit::PluginProcessConnection::didClose):
2004         * WebProcess/Plugins/PluginView.cpp:
2005         (WebKit::PluginView::pluginProcessCrashed):
2006         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2007         (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton):
2008         * WebProcess/WebCoreSupport/WebChromeClient.h:
2009         * WebProcess/WebPage/WebPage.cpp:
2010         (WebKit::WebPage::createPlugin):
2011         (WebKit::WebPage::canPluginHandleResponse):
2012
2013 2013-07-17  Alexey Proskuryakov  <ap@apple.com>
2014
2015         [Mac] Crashes in CFURLGetBytes under WebProcess::updateActivePages()
2016         https://bugs.webkit.org/show_bug.cgi?id=118814
2017         <rdar://problem/14173389>
2018
2019         Reviewed by Brady Eidson.
2020
2021         Speculative fix. It's unclear how we end up with an invalid URL when committing
2022         a load.
2023
2024         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::updateActivePages):
2025         Added a null check.
2026
2027 2013-07-17  Commit Queue  <commit-queue@webkit.org>
2028
2029         Unreviewed, rolling out r152786 and r152789.
2030         http://trac.webkit.org/changeset/152786
2031         http://trac.webkit.org/changeset/152789
2032         https://bugs.webkit.org/show_bug.cgi?id=118807
2033
2034         overly platform specific and dirty API (and Sam says no)
2035         (Requested by thorton on #webkit).
2036
2037         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2038         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
2039         * WebProcess/WebPage/PageOverlay.cpp:
2040         * WebProcess/WebPage/PageOverlay.h:
2041         * WebProcess/WebPage/WebPage.cpp:
2042         * WebProcess/WebPage/WebPage.h:
2043         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
2044
2045 2013-07-17  Tim Horton  <timothy_horton@apple.com>
2046
2047         AX: VoiceOver not working with data detection page overlays
2048         https://bugs.webkit.org/show_bug.cgi?id=118680
2049
2050         Reviewed by Anders Carlsson.
2051
2052         Bump the API version after r152786.
2053
2054         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
2055
2056 2013-07-17  Simon Cooper  <scooper@apple.com>
2057
2058         YouTube webcam capture (Flash Plug-in) in Safari can't see built-in camera
2059         https://bugs.webkit.org/show_bug.cgi?id=118787
2060         <rdar://problem/14418799>
2061
2062         Reviewed by Alexey Proskuryakov.
2063
2064         Add support for built-in cameras, including the original iSight.
2065
2066         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2067         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2068
2069 2013-07-17  Chris Fleizach  <cfleizach@apple.com>
2070
2071         AX: VoiceOver not working with data detection page overlays
2072         https://bugs.webkit.org/show_bug.cgi?id=118680
2073
2074         Reviewed by Tim Horton.
2075
2076         Expose API methods so that a client implementing data detectors is able to respond
2077         to the needs of accessibility clients like VoiceOver.
2078
2079         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2080         (PageOverlayClientImpl::supportsDataDetection):
2081         (PageOverlayClientImpl::dataDetectorExistsAtPoint):
2082         (PageOverlayClientImpl::dataDetectorCopyTypeAtPoint):
2083         (PageOverlayClientImpl::showDataDetectorMenuAtPoint):
2084         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
2085         * WebProcess/WebPage/PageOverlay.cpp:
2086         (WebKit::PageOverlay::supportsDataDetection):
2087         (WebKit::PageOverlay::dataDetectorExistsAtPoint):
2088         (WebKit::PageOverlay::dataDetectorCopyTypeAtPoint):
2089         (WebKit::PageOverlay::dataDetectorOpenMenuAtPoint):
2090         * WebProcess/WebPage/PageOverlay.h:
2091         (WebKit::PageOverlay::Client::supportsDataDetection):
2092         (WebKit::PageOverlay::Client::dataDetectorExistsAtPoint):
2093         (WebKit::PageOverlay::Client::dataDetectorCopyTypeAtPoint):
2094         (WebKit::PageOverlay::Client::showDataDetectorMenuAtPoint):
2095         * WebProcess/WebPage/WebPage.cpp:
2096         (WebKit::WebPage::pageOverlayOpenDataDetectorMenuAtPoint):
2097         (WebKit::WebPage::pageOverlayDataDetectorCopyTypeAtPoint):
2098         (WebKit::WebPage::pageOverlayDataDetectorExistsAtPoint):
2099         (WebKit::WebPage::pageOverlaySupportsDataDetection):
2100         * WebProcess/WebPage/WebPage.h:
2101         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
2102         (-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
2103         (-[WKAccessibilityWebPageObject _convertScreenPointToWindow:]):
2104         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
2105
2106 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2107
2108         [EFL][WK2] EWK2CookieManagerTest should be defined by inheriting from EWK2UnitTestBase.
2109         https://bugs.webkit.org/show_bug.cgi?id=118721
2110
2111         Reviewed by Christophe Dumez.
2112
2113         It should be defined as relevant test class specific to each test file for more readability.
2114         It could be helpful to remove unnecessary static methods.
2115
2116         * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
2117         (compareHostNames):
2118         (onCookiesChanged):
2119         (EWK2CookieManagerTest::getAcceptPolicy):
2120         (EWK2CookieManagerTest::getHostnamesWithCookies):
2121         (EWK2CookieManagerTest::freeHostNames):
2122         (EWK2CookieManagerTest::countHostnamesWithCookies):
2123         (TEST_F):
2124
2125 2013-07-16  Balazs Kelemen  <kbalazs@webkit.org>
2126
2127         [CMake] Undefined references should be detected at build time
2128         https://bugs.webkit.org/show_bug.cgi?id=110236
2129
2130         Reviewed by Christophe Dumez.
2131
2132         Add library dependencies that were not defined explicitly before.
2133
2134         * CMakeLists.txt:
2135         * PlatformEfl.cmake:
2136
2137 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2138
2139         [EFL][WK2] EWK2WindowFeaturesTest should be defined by inheriting from EWK2UnitTestBase.
2140         https://bugs.webkit.org/show_bug.cgi?id=118780
2141
2142         Reviewed by Christophe Dumez.
2143
2144         It should be defined as relevant test class specific to each test file for more readability.
2145         It could be helpful to remove unnecessary static methods.
2146
2147         * UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
2148         (EWK2WindowFeaturesTest::createDefaultWindow):
2149         (EWK2WindowFeaturesTest::createWindow):
2150         (TEST_F):
2151
2152 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2153
2154         [EFL][WK2] EWK2ViewTest should be defined by inheriting from EWK2UnitTestBase.
2155         https://bugs.webkit.org/show_bug.cgi?id=118779
2156
2157         Reviewed by Christophe Dumez.
2158
2159         It should be defined as relevant test class specific to each test file for more readability.
2160         It could be helpful to remove unnecessary static methods.
2161
2162         * UIProcess/API/efl/tests/test_ewk2_view.cpp:
2163         (EWK2ViewTest::onLoadFinishedForRedirection):
2164         (EWK2ViewTest::serverCallbackNavigation):
2165         (EWK2ViewTest::onFormAboutToBeSubmitted):
2166         (EWK2ViewTest::fullScreenCallback):
2167         (EWK2ViewTest::fullScreenExitCallback):
2168         (EWK2ViewTest::checkAlert):
2169         (EWK2ViewTest::checkConfirm):
2170         (EWK2ViewTest::checkPrompt):
2171         (EWK2ViewTest::onTextFound):
2172         (EWK2ViewTest::onVibrate):
2173         (EWK2ViewTest::onCancelVibration):
2174         (EWK2ViewTest::loadVibrationHTMLString):
2175         (EWK2ViewTest::onContentsSizeChangedPortrait):
2176         (EWK2ViewTest::onContentsSizeChangedLandscape):
2177         (EWK2ViewTest::PageContentsAsMHTMLCallback):
2178         (EWK2ViewTest::PageContentsAsStringCallback):
2179         (TEST_F):
2180
2181 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2182
2183         [EFL][WK2] EWK2StorageManagerTest should be defined by inheriting from EWK2UnitTestBase.
2184         https://bugs.webkit.org/show_bug.cgi?id=118777
2185
2186         Reviewed by Christophe Dumez.
2187
2188         It should be defined as relevant test class specific to each test file for more readability.
2189         It could be helpful to remove unnecessary static methods.
2190
2191         * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
2192         (EWK2StorageManagerTest::OriginData::OriginData):
2193         (EWK2StorageManagerTest::getStorageOriginsCallback):
2194         (EWK2StorageManagerTest::timerCallback):
2195         (EWK2StorageManagerTest::checkOrigin):
2196         (TEST_F):
2197
2198 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2199
2200         [EFL][WK2] EWK2PopupMenuTest should be defined by inheriting from EWK2UnitTestBase.
2201         https://bugs.webkit.org/show_bug.cgi?id=118775
2202
2203         Reviewed by Christophe Dumez.
2204
2205         It should be defined as relevant test class specific to each test file for more readability.
2206         It could be helpful to remove unnecessary static methods.
2207
2208         * UIProcess/API/efl/tests/test_ewk2_popup_menu.cpp:
2209         (EWK2PopupMenuTest::checkBasicPopupMenuItem):
2210         (EWK2PopupMenuTest::selectItemAfterDelayed):
2211         (EWK2PopupMenuTest::showPopupMenu):
2212         (TEST_F):
2213
2214 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2215
2216         [EFL][WK2] EWK2FileChooserRequestTest should be defined by inheriting from EWK2UnitTestBase.
2217         https://bugs.webkit.org/show_bug.cgi?id=118773
2218
2219         Reviewed by Christophe Dumez.
2220
2221         It should be defined as relevant test class specific to each test file for more readability.
2222         It could be helpful to remove unnecessary static methods.
2223
2224         * UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp:
2225         (EWK2FileChooserRequestTest::onFileChooserRequest):
2226         (EWK2FileChooserRequestTest::compareStrings):
2227         (EWK2FileChooserRequestTest::freeStringList):
2228         (TEST_F):
2229
2230 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2231
2232         [EFL][WK2] EWK2FaviconDatabaseTest should be defined by inheriting from EWK2UnitTestBase.
2233         https://bugs.webkit.org/show_bug.cgi?id=118772
2234
2235         Reviewed by Christophe Dumez.
2236
2237         It should be defined as relevant test class specific to each test file for more readability.
2238         It could be helpful to remove unnecessary static methods.
2239
2240         * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
2241         (EWK2FaviconDatabaseTest::serverCallback):
2242         (EWK2FaviconDatabaseTest::requestFaviconData):
2243         (TEST_F):
2244
2245 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2246
2247         [EFL][WK2] EWK2EinaSharedStringTest should be defined by inheriting from EWK2UnitTestBase.
2248         https://bugs.webkit.org/show_bug.cgi?id=118771
2249
2250         Reviewed by Christophe Dumez.
2251
2252         It should be defined as relevant test class specific to each test file for more readability.
2253         It could be helpful to remove unnecessary static methods.
2254
2255         * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
2256         (EWK2EinaSharedStringTest::checkString):
2257         (TEST_F):
2258
2259 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2260
2261         [EFL][WK2] EWK2DownloadJobTest should be defined by inheriting from EWK2UnitTestBase.
2262         https://bugs.webkit.org/show_bug.cgi?id=118769
2263
2264         Reviewed by Christophe Dumez.
2265
2266         It should be defined as relevant test class specific to each test file for more readability.
2267         It could be helpful to remove unnecessary static methods.
2268
2269         * UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
2270         (EWK2DownloadJobTest::fileExists):
2271         (EWK2DownloadJobTest::serverCallback):
2272         (EWK2DownloadJobTest::on_download_requested):
2273         (EWK2DownloadJobTest::on_download_cancelled):
2274         (EWK2DownloadJobTest::on_download_failed):
2275         (EWK2DownloadJobTest::on_download_finished):
2276         (TEST_F):
2277
2278 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2279
2280         [EFL][WK2] EWK2AuthRequestTest should be defined by inheriting from EWK2UnitTestBase.
2281         https://bugs.webkit.org/show_bug.cgi?id=118766
2282
2283         Reviewed by Christophe Dumez.
2284
2285         It should be defined as relevant test class specific to each test file for more readability.
2286         It could be helpful to remove unnecessary static methods.
2287
2288         * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp:
2289         (EWK2AuthRequestTest::serverCallback):
2290         (EWK2AuthRequestTest::onAuthenticationRequest):
2291         (EWK2AuthRequestTest::onLoadFinished):
2292         (TEST_F):
2293
2294 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2295
2296         [EFL][WK2] EWK2ContextMenuTest should be defined by inheriting from EWK2UnitTestBase.
2297         https://bugs.webkit.org/show_bug.cgi?id=118767
2298
2299         Reviewed by Christophe Dumez.
2300
2301         It should be defined as relevant test class specific to each test file for more readability.
2302         It could be helpful to remove unnecessary static methods.
2303
2304         * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
2305         (EWK2ContextMenuTest::checkBasicContextMenuItem):
2306         (EWK2ContextMenuTest::customItemSelected):
2307         (EWK2ContextMenuTest::showContextMenu):
2308         (EWK2ContextMenuTest::showContextMenuForRemoveAndAppend):
2309         (EWK2ContextMenuTest::showContextMenuForSubmenu):
2310         (EWK2ContextMenuTest::hideContextMenu):
2311         (TEST_F):
2312
2313 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2314
2315         [EFL][WK2] EWK2ContextTest should be defined by inheriting from EWK2UnitTestBase.
2316         https://bugs.webkit.org/show_bug.cgi?id=118763
2317
2318         Reviewed by Christophe Dumez.
2319
2320         It should be defined as relevant test class specific to each test file for more readability.
2321         It could be helpful to remove unnecessary static methods.
2322
2323         * UIProcess/API/efl/tests/test_ewk2_context.cpp:
2324         (EWK2ContextTest::schemeRequestCallback):
2325         (TEST_F):
2326
2327 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2328
2329         [EFL][WK2] EWK2DatabaseManagerTest should be defined by inheriting from EWK2UnitTestBase
2330         https://bugs.webkit.org/show_bug.cgi?id=118726
2331
2332         Reviewed by Christophe Dumez.
2333
2334         It should be defined as relevant test class specific to each test file for more readability.
2335         It could be helpful to remove unnecessary static methods.
2336
2337         * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
2338         (EWK2DatabaseManagerTest::OriginData::OriginData):
2339         (EWK2DatabaseManagerTest::databaseOriginsCallback):
2340         (EWK2DatabaseManagerTest::timerCallback):
2341         (TEST_F):
2342
2343 2013-07-17  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2344
2345         [EFL][WK2] EWK2ColorPickerTest should be defined by inheriting from EWK2UnitTestBase.
2346         https://bugs.webkit.org/show_bug.cgi?id=118762
2347
2348         Reviewed by Christophe Dumez.
2349
2350         It should be defined as relevant test class specific to each test file for more readability.
2351         It could be helpful to remove unnecessary static methods.
2352
2353         * UIProcess/API/efl/tests/test_ewk2_color_picker.cpp:
2354         (EWK2ColorPickerTest::onColorPickerDone):
2355         (EWK2ColorPickerTest::setColorPickerColor):
2356         (EWK2ColorPickerTest::showColorPicker):
2357         (EWK2ColorPickerTest::hideColorPicker):
2358         (EWK2ColorPickerTest::hideColorPickerByRemovingElement):
2359         (TEST_F):
2360
2361 2013-07-16  Gordon Sheridan  <gordon_sheridan@apple.com>
2362
2363         setPluginUnavailabilityReason can destroy renderObject before obscurity check
2364         https://bugs.webkit.org/show_bug.cgi?id=118770
2365         <rdar://problem/14462331>
2366
2367         Reviewed by Tim Horton.
2368
2369         * WebProcess/WebPage/WebPage.cpp:
2370         (WebKit::WebPage::createPlugin):
2371         Moved obscurity check to before renderObject is potentially destroyed.
2372
2373 2013-07-16  Alexey Proskuryakov  <ap@apple.com>
2374
2375         REGRESSION (r150291): Chinese predictive input pop-up disappears on twitter.com
2376         https://bugs.webkit.org/show_bug.cgi?id=118739
2377         <rdar://problem/14300350>
2378
2379         Reviewed by Daniel Bates.
2380
2381         EditorState tracking on UI side is very fragile. This is a targeted fix just for
2382         this specific scenario.
2383
2384         The issue was that we had a stale m_temporarilyClosedComposition flag, which was
2385         making UI process believe that a composition was closed from WebProcess side,
2386         and notify input method about that. It shouldn't have been a problem, because there
2387         is no composition at this point indeed, but this extra call is a problem for
2388         predictive input, which works in a somewhat unconventional way (<rdar://problem/14458297>).
2389
2390         * UIProcess/mac/WebPageProxyMac.mm:
2391         (WebKit::WebPageProxy::insertText): Reset m_temporarilyClosedComposition flag when
2392         getting new EditorState in response to performing this action. There is certainly
2393         no composition after insertText, and all interested parties are on the same page
2394         already.
2395
2396 2013-07-16  Jessie Berlin  <jberlin@apple.com>
2397
2398         Fix some NSDictionary misuse pointed out by the clang static analyzer
2399         https://bugs.webkit.org/show_bug.cgi?id=118736
2400
2401         Reviewed by Anders Carlsson.
2402
2403         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2404         (WebKit::WebEditorClient::documentFragmentFromAttributedString):
2405         Do not put a key with a nil value pair into the NSDictionary.
2406
2407 2013-07-16  Michael Brüning  <michael.bruning@digia.com>
2408
2409         [Qt] Replace Nokia with Qt Project in service name.
2410         https://bugs.webkit.org/show_bug.cgi?id=118729
2411
2412         Reviewed by Simon Hausmann.
2413
2414         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2415         (WebKit::ProcessLauncher::launchProcess):
2416
2417 2013-07-16  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2418
2419         EWK2BackForwardListTest should be defined by inheriting from EWK2UnitTestBase.
2420         https://bugs.webkit.org/show_bug.cgi?id=118717
2421
2422         Reviewed by Christophe Dumez.
2423
2424         * UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
2425         (EWK2BackForwardListTest::checkItem):
2426         (EWK2BackForwardListTest::urlFromTitle):
2427         (EWK2BackForwardListTest::freeEinaList):
2428         (TEST_F):
2429
2430 2013-07-16  Kangil Han  <kangil.han@samsung.com>
2431
2432         Use toHTMLSelectElement and dismiss isHTMLSelectElement
2433         https://bugs.webkit.org/show_bug.cgi?id=118714
2434
2435         Reviewed by Ryosuke Niwa.
2436
2437         To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
2438         Additionally, this patch removes isHTMLSelectElement because not all element subclasses can be checked by a combination of tag names.
2439
2440         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
2441         (WebKit::PDFPluginChoiceAnnotation::commit):
2442
2443 2013-07-16  Dong-Gwan Kim  <donggwan.kim@samsung.com>
2444
2445         Replace mouseClick with more meaningful method in test_ewk2_text_checker.cpp
2446         https://bugs.webkit.org/show_bug.cgi?id=118699
2447
2448         Reviewed by Christophe Dumez.
2449
2450         Many mouseClick methods are used in test_ewk2_text_checker.cpp.
2451         But it is difficult to understand what they mean.
2452         So i would like to replace those with more meaningful method for readability.
2453
2454         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
2455         (EWK2TextCheckerTest::clickSelectAllWordsWithSpellcheckButton):
2456         (EWK2TextCheckerTest::clickSelectAllWordsWithoutSpellcheckButton):
2457         (EWK2TextCheckerTest::clickSelectSubWordWithSpellcheckButton):
2458         (EWK2TextCheckerTest::showContextMenuWithFirstLineText):
2459         (EWK2TextCheckerTest::showContextMenuWithSecondLineText):
2460         (EWK2TextCheckerTest::selectFirstWordInFirstLineText):
2461         (EWK2TextCheckerTest::selectFirstWordInSecondLineText):
2462         (TEST_F):
2463
2464 2013-07-15  Kangil Han  <kangil.han@samsung.com>
2465
2466         Introduce toHTMLIFrameElement
2467         https://bugs.webkit.org/show_bug.cgi?id=118672
2468
2469         Reviewed by Ryosuke Niwa.
2470
2471         To avoid direct use of static_cast, this patch introduces toHTMLIFrameElement for code cleanup.
2472
2473         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2474         (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
2475
2476 2013-07-15  Tim Horton  <timothy_horton@apple.com>
2477
2478         Update blocked/missing plug-in UI
2479         https://bugs.webkit.org/show_bug.cgi?id=118347
2480         <rdar://problem/14209318>
2481
2482         Reviewed by Sam Weinig.
2483         Patch by Antoine Quint, Anders Carlsson, Sam Weinig, and myself.
2484
2485         * Platform/CoreIPC/HandleMessage.h:
2486         (CoreIPC::callMemberFunction):
2487         Add a 6 argument -> 4 reply message handler.
2488         (It seems that FindPlugin is getting a little out of hand.)
2489
2490         * Shared/APIClientTraits.cpp:
2491         * Shared/APIClientTraits.h:
2492         * UIProcess/API/C/WKPage.h:
2493         * UIProcess/WebLoaderClient.cpp:
2494         (WebKit::WebLoaderClient::pluginLoadPolicy):
2495         * UIProcess/WebLoaderClient.h:
2496         Add an unavailability description out-argument to a new version of
2497         pluginLoadPolicy, so clients can override the text of the unavailable
2498         plugin indicator. Bump the WKPageLoaderClient version and update APIClientTraits.
2499
2500         * UIProcess/WebPageProxy.cpp:
2501         (WebKit::WebPageProxy::findPlugin):
2502         * UIProcess/WebPageProxy.h:
2503         * UIProcess/WebPageProxy.messages.in:
2504         Plumb the unavailability description through to the WebProcess via
2505         the FindPlugin message.
2506
2507         * WebProcess/Plugins/PluginProcessConnection.cpp:
2508         (WebKit::PluginProcessConnection::didClose):
2509         Make a strongly referencing copy of the list of PluginProxies, so we can
2510         throw them away without the HashMap being mutated underneath us (see the comment).
2511
2512         * WebProcess/Plugins/PluginView.cpp:
2513         (WebKit::PluginView::pluginProcessCrashed):
2514         Invalidate the plug-in's widget before setting the plugin unavailability reason,
2515         because doing so would cause the plug-in's renderer to be torn down, making
2516         invalidate() crash.
2517
2518         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2519         (WebKit::WebChromeClient::shouldUnavailablePluginMessageIncludeButton):
2520         * WebProcess/WebCoreSupport/WebChromeClient.h:
2521         Rename from shouldUnavailablePluginMessageBeButton to
2522         shouldUnavailablePluginMessageIncludeButton for accuracy.
2523
2524         * WebProcess/WebPage/WebPage.cpp:
2525         (WebKit::WebPage::createPlugin):
2526         Acquire the unavailability description from the client
2527         (via FindPlugin) and hand it to the RenderEmbeddedObject.
2528         (WebKit::WebPage::canPluginHandleResponse):
2529         Re-acquire the plugin's renderer, in case setPluginUnavailabilityReason destroyed it.
2530
2531 2013-07-15  Simon Cooper  <scooper@apple.com>
2532
2533         PluginProcess deny file-read-data /Library/Application Support/Macromedia/FlashPlayerTrust
2534         https://bugs.webkit.org/show_bug.cgi?id=118690
2535         <rdar://problem/14255963>
2536
2537         Reviewed by Dean Jackson.
2538
2539         Silently deny access to FlashPlayerTrust. This location contains
2540         files containing lists of paths that Flash Player will
2541         "allow" access to (without asking the user). Since the plugin
2542         sandbox won't permit the access to the listed paths it is better
2543         to silently block attempts to read these "whitelists". The
2544         "whitelists" are created by other Adobe "installer" like
2545         applications.
2546
2547         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2548
2549 2013-07-14  Jon Lee  <jonlee@apple.com>
2550
2551         Calling Notification.requestPermission() without a callback crashes
2552         https://bugs.webkit.org/show_bug.cgi?id=118654
2553         <rdar://problem/14293352>
2554
2555         Reviewed by Alexey Proskuryakov.
2556
2557         When requestPermission() is called, we short-circuit if we know the permission was already set.
2558         The callback handler gets invoked. But now that callbacks are optional, we need to check to make
2559         sure a callback was provided.
2560
2561         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2562         (WebKit::NotificationPermissionRequestManager::startRequest): Check for the callback.
2563
2564 2013-07-15  Anton Obzhirov  <a.obzhirov@samsung.com>
2565
2566         [GTK] Remote inspector server should send an error page if resources not found
2567         https://bugs.webkit.org/show_bug.cgi?id=117137
2568
2569         Reviewed by Gustavo Noronha Silva.
2570
2571         Sometimes it is difficult to understand why remote inspector fails to deliver the content.
2572         This patch gives an option to show error page with some basic explanation.
2573
2574         * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
2575         (WebKit::WebInspectorServer::platformResourceForPath):
2576
2577 2013-07-15  Simon Pena  <simon.pena@samsung.com>
2578
2579         [GTK] [WK2] Check if the keyEventQueue is empty in WebPageProxy::getEditorCommandsForKeyEvent
2580         https://bugs.webkit.org/show_bug.cgi?id=118530
2581
2582         Reviewed by Carlos Garcia Campos.
2583
2584         When a key event is started in the WebProcess (e.g. in the inspector)
2585         it doesn't have an associated GdkEvent queued. Adding a check in 
2586         WebPageProxy::getEditorCommandsForKeyEvent ensures there's always a queued
2587         key event to process.
2588
2589         In GTK-WK2, inspector-protocol/input/dispatchKeyEvent.html no longer crashes once
2590         this fix is in place. 
2591
2592         * UIProcess/gtk/WebPageProxyGtk.cpp:
2593         (WebKit::WebPageProxy::getEditorCommandsForKeyEvent): Ensure m_keyEventQueue is
2594         not empty.
2595
2596 2013-07-15  Alberto Garcia  <berto@igalia.com>
2597
2598         [WK2][GTK] SIGSEV in webkitWebViewBaseSizeAllocate
2599         https://bugs.webkit.org/show_bug.cgi?id=118052
2600
2601         Reviewed by Carlos Garcia Campos.
2602
2603         We don't need to check whether the drawing area is empty or not in
2604         order to set needsResizeOnMap.
2605
2606         It can also happen that the drawing area pointer is null (if
2607         e.g. the web process crashes), which is the reason for this
2608         SIGSEGV.
2609
2610         A test to prevent this was added in r88646 but was later moved to
2611         resizeWebKitWebViewBaseFromAllocation().
2612
2613         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2614         (webkitWebViewBaseSizeAllocate):
2615
2616 2013-07-10  Roger Fong  <roger_fong@apple.com>
2617
2618         Plugins that don't support snapshotting should not all autostart.
2619         https://bugs.webkit.org/show_bug.cgi?id=118572
2620         <rdar://problem/14324391>.
2621
2622         Reviewed by Dean Jackson.
2623
2624         * WebProcess/Plugins/PluginView.cpp:
2625         (WebKit::PluginView::shouldNotAddLayer): This method determines whether or not we should add the plugin's layer to the tree.
2626         It should not be added if the plugin is in it's snapshotted state but does not actually support snapshotting.
2627         (WebKit::PluginView::pluginSnapshotTimerFired): If the plugin does not support snapshotting go straight 
2628         to the the DisplayingSnapshot state.
2629         * WebProcess/Plugins/PluginView.h:
2630
2631 2013-07-11  Jessie Berlin  <jberlin@apple.com>
2632
2633         WebResourceCacheManager::cfURLCacheHostNamesWithCallback leaks an array (pointed out by the
2634         clang static analyzer)
2635         https://bugs.webkit.org/show_bug.cgi?id=118533
2636
2637         Reviewed by Anders Carlsson.
2638
2639         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
2640         (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
2641
2642 2013-07-11  Sergio Correia  <sergio.correia@openbossa.org>
2643
2644         Use GOwnPtr in PluginProcessProxyUnix to manage stdOut variable
2645         https://bugs.webkit.org/show_bug.cgi?id=118568
2646
2647         Reviewed by Martin Robinson.
2648
2649         * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
2650         (WebKit::PluginProcessProxy::scanPlugin):
2651
2652 2013-07-11  Timothy Hatcher  <timothy@apple.com>
2653
2654         Revert r152267 and soft link WebInspectorUI.framework again.
2655
2656         https://bugs.webkit.org/show_bug.cgi?id=118544
2657
2658         Reviewed by David Kilzer.
2659
2660         * Configurations/WebKit2.xcconfig:
2661         * UIProcess/mac/WebInspectorProxyMac.mm:
2662         (WebKit::inspectorReallyUsesWebKitUserInterface):
2663         * WebKit2.xcodeproj/project.pbxproj:
2664         * WebProcess/WebPage/mac/WebInspectorMac.mm:
2665         (WebKit::inspectorReallyUsesWebKitUserInterface):
2666
2667 2013-07-11  Jae Hyun Park  <jae.park@company100.net>
2668
2669         [Coordinated Graphics] Parameter of commitSceneState should be const
2670         https://bugs.webkit.org/show_bug.cgi?id=118564
2671
2672         Reviewed by Noam Rosenthal.
2673
2674         Parameter of commitSceneState should be const as there should not be any
2675         modifications to the passed CoordinatedGraphicsState.
2676
2677         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2678         (WebKit::CoordinatedLayerTreeHost::commitSceneState):
2679         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
2680
2681 2013-07-10  Mark Rowe  <mrowe@apple.com>
2682
2683         <rdar://problem/14395759> PluginProcess sometimes logs an error about being unable to load WebKit2.framework.
2684
2685         Reviewed by Alexey Proskuryakov.
2686
2687         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2688         (WebKit::PluginProcessProxy::createPropertyListFile): Ensure that any environment variables
2689         specified in dynamic linker load commands are passed to the subprocess that we spawn to create
2690         the MIME type property list.
2691
2692 2013-07-10  Brady Eidson  <beidson@apple.com>
2693
2694         Some Java plugin instances can deadlock with the WebProcess on NPP_Destroy.
2695         <rdar://problem/14286390> and https://bugs.webkit.org/show_bug.cgi?id=118535
2696
2697         Reviewed by Alexey Proskuryakov.
2698
2699         * Shared/Plugins/NPObjectProxy.cpp:
2700         (WebKit::NPObjectProxy::~NPObjectProxy): ASSERT this is the main thread.
2701         (WebKit::NPObjectProxy::NP_Deallocate): If this isn't the main thread, call it again on the main thread.
2702
2703 2013-07-10  Sergio Correia  <sergio.correia@openbossa.org>
2704
2705         Remove the meshType from CoordinatedCustomFilterOperation
2706         https://bugs.webkit.org/show_bug.cgi?id=118529
2707
2708         Reviewed by Noam Rosenthal.
2709
2710         Following the removal of the meshType from CustomFilterOperation in r149153,
2711         remove also the meshType from CoordinatedCustomFilterOperation.
2712
2713         No new tests, no new functionality.
2714
2715         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
2716         (CoreIPC::::encode): Remove dead comment.
2717         (CoreIPC::::decode): Remove meshType from CoordinatedCustomFilterOperation
2718         call.
2719
2720 2013-07-09  Byungwoo Lee  <bw80.lee@samsung.com>
2721
2722         [EFL] tooltip callback doesn't work.
2723         https://bugs.webkit.org/show_bug.cgi?id=118522
2724
2725         Reviewed by Christophe Dumez.
2726
2727         Add missing code to connect didChangeTooltip callback.
2728
2729         * UIProcess/efl/ViewClientEfl.cpp:
2730         (WebKit::ViewClientEfl::ViewClientEfl):
2731
2732 2013-07-09  Jer Noble  <jer.noble@apple.com>
2733
2734         Reviewed by Simon Fraser.
2735
2736         Remember the scroll position and restore after exiting full-screen mode.
2737         https://bugs.webkit.org/show_bug.cgi?id=61956
2738         <rdar://problem/9544461>
2739
2740         Call into the main FrameView to save the scroll position before swapping the
2741         WebView into the full-screen window, and restore the scroll position after 
2742         swapping the WebView back into the browser window.
2743
2744         * UIProcess/mac/WKFullScreenWindowController.mm:
2745         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
2746         (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
2747
2748         In WebKit2, this requires some communication between the WebProcess and the
2749         UIProcess, so add two new messages to WebFullScreenManager to be called by
2750         its proxy.
2751
2752         * UIProcess/WebFullScreenManagerProxy.h:
2753         * UIProcess/WebFullScreenManagerProxy.cpp:
2754         (WebKit::WebFullScreenManagerProxy::saveScrollPosition):
2755         (WebKit::WebFullScreenManagerProxy::restoreScrollPosition):
2756         * WebProcess/FullScreen/WebFullScreenManager.h:
2757         * WebProcess/FullScreen/WebFullScreenManager.messages.in:
2758         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2759         (WebKit::WebFullScreenManager::saveScrollPosition):
2760         (WebKit::WebFullScreenManager::restoreScrollPosition):
2761
2762 2013-07-07  Carlos Garcia Campos  <cgarcia@igalia.com>
2763
2764         [GTK] Runtime critical warning when unloading a module that failed to load
2765         https://bugs.webkit.org/show_bug.cgi?id=118425
2766
2767         Reviewed by Martin Robinson.
2768
2769         * Platform/gtk/ModuleGtk.cpp:
2770         (WebKit::Module::load): Show an error message when the module
2771         fails to load.
2772         (WebKit::Module::unload): Check module pointer before calling
2773         unload method.
2774
2775 2013-07-05  Tim Horton  <timothy_horton@apple.com>
2776
2777         [wk2] Add API to lock the scroll position at the top or bottom of the page
2778         https://bugs.webkit.org/show_bug.cgi?id=118429
2779         <rdar://problem/14120323>
2780
2781         Reviewed by Anders Carlsson.
2782
2783         * Shared/WebPageCreationParameters.cpp:
2784         (WebKit::WebPageCreationParameters::encode):
2785         (WebKit::WebPageCreationParameters::decode):
2786         * Shared/WebPageCreationParameters.h:
2787         Pass the current ScrollPinningBehavior across to the WebPage upon creation.
2788
2789         * UIProcess/API/C/WKPage.cpp:
2790         (WKPageGetScrollPinningBehavior):
2791         (WKPageSetScrollPinningBehavior):
2792         * UIProcess/API/C/WKPagePrivate.h:
2793         SPI to get/set the WebPageProxy's current ScrollPinningBehavior.
2794         Convert between WK API type and WebCore enum.
2795
2796         * UIProcess/WebPageProxy.cpp:
2797         (WebKit::WebPageProxy::WebPageProxy):
2798         (WebKit::WebPageProxy::creationParameters):
2799         Send ScrollPinningBehavior when creating a WebPage.
2800
2801         (WebKit::WebPageProxy::setScrollPinningBehavior):
2802         Pass ScrollPinningBehavior changes across to the WebProcess (and save it
2803         in WebPageProxy so it can be sent back across if the WebProcess crashes).
2804
2805         * UIProcess/WebPageProxy.h:
2806         (WebKit::WebPageProxy::scrollPinningBehavior):
2807         Getter/setter and storage for m_scrollPinningBehavior.
2808
2809         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2810         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
2811         Inform new FrameViews of the current ScrollPinningBehavior.
2812
2813         * WebProcess/WebPage/WebPage.cpp:
2814         (WebKit::WebPage::WebPage):
2815         Set our ScrollPinningBehavior based on our creation parameters.
2816
2817         (WebKit::WebPage::setScrollPinningBehavior):
2818         Inform the FrameView of ScrollPinningBehavior changes.
2819
2820         * WebProcess/WebPage/WebPage.h:
2821         (WebKit::WebPage::scrollPinningBehavior): Added.
2822         (WebKit::WebPage::setScrollPinningBehavior): Added.
2823         Add storage for m_scrollPinningBehavior.
2824
2825         * WebProcess/WebPage/WebPage.messages.in:
2826         Add SetScrollPinningBehavior message.
2827
2828 2013-07-05  Krzysztof Wolanski  <k.wolanski@samsung.com>
2829
2830         [EFL][WK2] Implement unit test callbacks: onWordLearn and onWordIgnore.
2831         https://bugs.webkit.org/show_bug.cgi?id=118392
2832
2833         Reviewed by Christophe Dumez.
2834
2835         Simulate behavior of Learn and Ignore Word in the text field.
2836
2837         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
2838         (EWK2UnitTest::EWK2UnitTestBase::mouseDoubleClick):
2839         Select the entire word in the text field.
2840
2841         * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
2842         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
2843         (onSpellingForKnownWord):
2844         (onWordLearn):
2845         (onWordIgnore):
2846         (selectLearnSpelling):
2847         (selectIgnoreSpelling):
2848
2849 2013-07-05  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2850
2851         [GTK] WebKit2 test TestWebKitFaviconDatabase times out with recent glib
2852         https://bugs.webkit.org/show_bug.cgi?id=111434
2853
2854         Reviewed by Carlos Garcia Campos.
2855
2856         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
2857         (testNotInitialized):
2858         (testSetDirectory):
2859         (testClearDatabase):
2860         (testGetFavicon):
2861         (testGetFaviconURI): Removed gconstpointer parameter.
2862         (testWebViewFavicon): Fixed to make it work together with the
2863         other tests and removed gconstpointer parameter.
2864         (testFaviconDatabase): Created to call all tests in the proper
2865         order.
2866         (beforeAll): Changed to call only testFaviconDatabase instead of
2867         the separate tests.
2868
2869 2013-07-05  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2870
2871         TestWebKitFaviconDatabase/clear-database is not testing things properly
2872         https://bugs.webkit.org/show_bug.cgi?id=118404
2873
2874         Reviewed by Carlos Garcia Campos.
2875
2876         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
2877         (testClearDatabase): Check for an existing icon that can make the
2878         test fail if clear database is not working.
2879
2880 2013-07-04  Anders Carlsson  <andersca@apple.com>
2881
2882         Paint the page background if we haven't received our first update
2883         https://bugs.webkit.org/show_bug.cgi?id=118402
2884         <rdar://problem/13893308>
2885
2886         Reviewed by Simon Fraser.
2887
2888         Make sure that we always paint something when we haven't received our first update from the web process.
2889
2890         * UIProcess/API/mac/WKView.mm:
2891         (-[WKView drawRect:]):
2892         * UIProcess/DrawingAreaProxyImpl.h:
2893         (WebKit::DrawingAreaProxyImpl::hasReceivedFirstUpdate):
2894
2895 2013-07-04  Anders Carlsson  <andersca@apple.com>
2896
2897         Crash when createPluginInternal ends up destroying the plug-in
2898         https://bugs.webkit.org/show_bug.cgi?id=118397
2899         <rdar://problem/14155051>
2900
2901         Reviewed by Simon Fraser.
2902
2903         Keep the WebProcessConnection object alive while calling createPluginInternal and handle
2904         the IPC connection going away.
2905
2906         * PluginProcess/WebProcessConnection.cpp:
2907         (WebKit::WebProcessConnection::createPluginAsynchronously):
2908
2909 2013-07-03  Gordon Sheridan  <gordon_sheridan@apple.com>
2910
2911         Implement mechanism to detect (partially) hidden blocked plugins.
2912         https://bugs.webkit.org/show_bug.cgi?id=117998
2913
2914         Reviewed by Dean Jackson.
2915
2916         * Shared/Plugins/Netscape/PluginInformation.h:
2917         * Shared/Plugins/Netscape/PluginInformation.cpp:
2918         (WebKit::plugInInformationReplacementObscuredKey):
2919         Add key for plugInInformation dictionaries.
2920
2921         (WebKit::createPluginInformationDictionary):
2922         Add boolean parameter identifying whether the replacement for a blocked plugin is obscured, and add it to the dictionary.
2923
2924         * Shared/API/c/WKPluginInformation.h:
2925         * Shared/API/c/WKPluginInformation.cpp:
2926         (WKPluginInformationReplacementObscuredKey):
2927         Provide the C API for the plugInInformationReplacementObscuredKey().
2928
2929         * UIProcess/WebPageProxy.h:
2930         * UIProcess/WebPageProxy.cpp:
2931         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
2932         Add bool replacementObscured parameter to pass on argument to createPluginInformationDictionary().
2933
2934         * UIProcess/WebPageProxy.messages.in:
2935         Add bool replacementObscured parameter to DidBlockInsecurePluginVersion() message.
2936
2937         * WebProcess/WebPage/WebPage.cpp:
2938         (WebKit::WebPage::createPlugin):
2939         Invoke isReplacementObscured() method for blocked plugins.
2940
2941 2013-07-03  Alexey Proskuryakov  <ap@apple.com>
2942
2943         <rdar://problem/14271105> Flash Player: deny ipc-posix-sem 59918130
2944         <rdar://problem/14349560> Flash Player: deny ipc-posix-sem MacromediaSemaphoreDig on many sites
2945
2946         Reviewed by Sam Weinig.
2947
2948         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
2949         semaphore-owner doesn't appear to work the way we need it to, removing it (at least for now).
2950
2951 2013-07-03  Simon Pena  <simon.pena@samsung.com>
2952
2953         WebTextCheckerClient doesn't initialize output arguments.
2954         https://bugs.webkit.org/show_bug.cgi?id=83683
2955
2956         Reviewed by Martin Robinson.
2957
2958         Callers of checkSpellingOfString and checkGrammarOfString expect
2959         certain default values when no misspelled (or bad grammar) string
2960         is found. They try to do that by initialising the reply arguments
2961         that go into the IPC calls, but these values are ultimately ignored (see
2962         HandleMessage.h, where the replyArguments are declared).
2963
2964         In the past, this seems to have led to various issues, (see
2965         TextCheckingHelper::findFirstMisspelling in TextCheckingHelper.cpp),
2966         where these return values are asserted and checked to be in the right range.
2967
2968         This patch initialises the values, so even if no available client
2969         implements the methods (or if the implementation forgets to do it) the callers
2970         will have their expected output.
2971
2972         However, and for a general case, we probably need a way to tell the caller
2973         that any existing value in the output arguments will be ignored.
2974
2975         * UIProcess/WebTextCheckerClient.cpp:
2976         (WebKit::WebTextCheckerClient::checkSpellingOfString):
2977         (WebKit::WebTextCheckerClient::checkGrammarOfString):
2978
2979
2980 2013-07-03  Sergio Villar Senin  <svillar@igalia.com>
2981
2982         [GTK][WK2] SIGSEV in WebKit::WebPageContextMenuClient::customContextMenuItemSelected
2983         https://bugs.webkit.org/show_bug.cgi?id=116867
2984
2985         Reviewed by Anders Carlsson.
2986
2987         We did not reset the clients on WebPageProxy::close(), so right
2988         clicking on a link after starting the navigation to some other
2989         page was causing crashes because code was trying to access an
2990         already freed m_contextMenuClient.
2991
2992         There were some other clients that could potentially trigger the
2993         same issues. Reset them all to null to prevent this situation.
2994
2995         * UIProcess/WebPageProxy.cpp:
2996         (WebKit::WebPageProxy::close):
2997
2998 2013-07-03  Simon Pena  <simon.pena@samsung.com>
2999
3000         Output arguments used in IPC calls should be returned initialised
3001         https://bugs.webkit.org/show_bug.cgi?id=118354
3002
3003         Reviewed by Anders Carlsson.
3004
3005         When Download::shouldDecodeSourceDataOfMIMEType and Download::retrieveDestinationWithSuggestedFilename
3006         call DownloadProxy::shouldDecodeSourceDataOfMIMEType and DownloadProxy::decideDestinationWithSuggestedFilename
3007         through IPC, they assume the output arguments result and allowOverwrite have
3008         been initialised.
3009
3010         This patch initialises these arguments also in the unlikely event that a
3011         m_webContext is not available.
3012
3013         * UIProcess/Downloads/DownloadProxy.cpp:
3014         (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
3015         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
3016
3017 2013-07-03  Sergio Villar Senin  <svillar@igalia.com>
3018
3019         [WK2][GTK] Invalid ASSERTs in WebResources loading code
3020         https://bugs.webkit.org/show_bug.cgi?id=118352
3021
3022         Reviewed by Carlos Garcia Campos.
3023
3024         The WebKitWebView keeps track of the resources being loaded in a
3025         map. A couple of ASSERTs verify that every loaded resource is
3026         stored in that map.
3027
3028         The map that is cleared each time a new load starts so there is a
3029         small chance that we get notifications for resources that
3030         correspond to previous page loads
3031         (and thus are not stored in the map). We should remove the ASSERT
3032         which is not valid anymore.
3033
3034         * UIProcess/API/gtk/WebKitWebView.cpp:
3035         (webkitWebViewGetLoadingWebResource):
3036
3037 2013-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>
3038
3039         [GTK] Migrate WebKitWebContext to GTask
3040         https://bugs.webkit.org/show_bug.cgi?id=117153
3041
3042         Reviewed by Gustavo Noronha Silva.
3043
3044         * UIProcess/API/gtk/WebKitWebContext.cpp:
3045         (webkitWebContextGetPluginThread):
3046         (webkit_web_context_get_plugins):
3047         (webkit_web_context_get_plugins_finish):
3048
3049 2013-07-02  Zan Dobersek  <zdobersek@igalia.com>
3050
3051         [WK2] Invalidate FontCache before purging MemoryCache upon WebProcess termination/closure
3052         https://bugs.webkit.org/show_bug.cgi?id=118280
3053
3054         Reviewed by Darin Adler.
3055
3056         Invalidate the FontCache before disabling and purging the MemoryCache in WebProcess::didClose
3057         and WebProcess::terminate. This frees up additional references to objects that were held
3058         by the FontCache, reducing the amount of 'LEAK: *' output when exiting MiniBrowser or
3059         WebKitTestRunner in debug builds.
3060
3061         * WebProcess/WebProcess.cpp:
3062         (WebKit::WebProcess::terminate):
3063         (WebKit::WebProcess::didClose):
3064
3065 2013-07-02  Jessie Berlin  <jberlin@apple.com>
3066
3067         The callback for WKPageGetPlugInInformation needs info about whether or not there are any
3068         non-playing instances of the plug-in on the page
3069         https://bugs.webkit.org/show_bug.cgi?id=118330
3070
3071         Reviewed by Anders Carlsson.
3072
3073         Add another key value pair to the dictionary passed to the callback.
3074
3075         * Shared/API/c/WKPluginInformation.cpp:
3076         (WKPlugInInformationPageContainsNonPlayingInstanceOfPlugInKey):
3077         * Shared/API/c/WKPluginInformation.h:
3078
3079         * Shared/Plugins/Netscape/PluginInformation.cpp:
3080         (WebKit::plugInInformationPageContainsNonPlayingInstanceOfPlugInKey):
3081         (WebKit::createPlugInInformationDictionary):
3082         Add the information about whether or not the page contains a non-playing instance of that
3083         plug-in to the plug-in information dictionary.
3084         * Shared/Plugins/Netscape/PluginInformation.h:
3085
3086         * UIProcess/WebPageProxy.h:
3087         * UIProcess/WebPageProxy.messages.in:
3088         * UIProcess/mac/WebPageProxyMac.mm:
3089         (WebKit::WebPageProxy::containsPlugInCallback):
3090         Check if any of the MIME types of the plug-in instances that are present on the page but are
3091         not playing match the instance of plug-in being searched for.
3092         * WebProcess/WebPage/mac/WebPageMac.mm:
3093         (WebKit::addPlugInMimeTypesFromNodeListForNonPlayingPlugIns):
3094         Based roughly off of addPlugInsFromNodeListMatchingPlugInOrigin in
3095         HTMLPlugInImageElement.cpp.
3096         (WebKit::WebPage::containsPluginViewsWithPluginProcessToken):
3097         Based roughly off of HTMLPlugInImageElement::restartSimilarPlugIns.
3098
3099 2013-07-02  Alexey Proskuryakov  <ap@apple.com>
3100
3101         security/block-test.html fails when NetworkProcess is enabled
3102         https://bugs.webkit.org/show_bug.cgi?id=118320
3103         <rdar://problem/14309423>
3104
3105         Reviewed by Geoff Garen.
3106
3107         * NetworkProcess/NetworkResourceLoader.cpp:
3108         (WebKit::NetworkResourceLoader::wasBlocked):
3109         (WebKit::NetworkResourceLoader::cannotShowURL):
3110         Implemented missing ResourceHandleClient functions.
3111
3112 2013-07-02  Ada Chan  <adachan@apple.com>
3113
3114         Fix crash when PageBanner::detachFromPage() is called from WebPage::~WebPage().
3115         https://bugs.webkit.org/show_bug.cgi?id=118268
3116
3117         Reviewed by Beth Dakin.
3118
3119         * WebProcess/WebPage/mac/PageBannerMac.mm:
3120         (WebKit::PageBanner::detachFromPage): Add some null checks. m_webPage->corePage()
3121         can be null if this method is called after the web page is closed.
3122
3123 2013-07-02  Jae Hyun Park  <jae.park@company100.net>
3124
3125         Implement CoordinatedSurface for Threaded Coordinated Graphics
3126         https://bugs.webkit.org/show_bug.cgi?id=109661
3127
3128         Reviewed by Noam Rosenthal.
3129
3130         This is a preparation patch for Threaded Coordianted Graphics.
3131
3132         This patch implements ThreadSafeCoordinatedSurface using ImageBuffer as a
3133         backend. Also, this patch moves common implementation to CoordinatedSurface to
3134         prevent duplication of code.
3135
3136         * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp:
3137         (WebKit::WebCoordinatedSurface::WebCoordinatedSurface):
3138         * Shared/CoordinatedGraphics/WebCoordinatedSurface.h:
3139
3140 2013-07-01  Alexey Proskuryakov  <ap@apple.com>
3141
3142         Clean up private browsing session tracking
3143         https://bugs.webkit.org/show_bug.cgi?id=118266
3144         <rdar://problem/13078036>
3145
3146         Reviewed by Brady Eidson.
3147
3148         Instead of counting API calls, we now watch actual WebPreferences objects.
3149
3150         * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPrivateBrowsingEnabled):
3151         Removed code that used to notify WebContext. It's now done by WebPreferences.
3152
3153         * UIProcess/WebContext.h:
3154         * UIProcess/WebContext.cpp:
3155         (WebKit::WebContext::ensureNetworkProcess): Instead of counting the number of times
3156         API was called, rely on WebPreferences tracking.
3157         (WebKit::WebContext::willStartUsingPrivateBrowsing): Ditto. This function is
3158         now only called when we detect a change in private browsing state.
3159         (WebKit::WebContext::willStopUsingPrivateBrowsing): Ditto.
3160         (WebKit::WebContext::createNewWebProcess): Tell the new process to create a private
3161         browsing session if needed.
3162
3163         * UIProcess/WebPreferences.h:
3164         * UIProcess/WebPreferences.cpp:
3165         (WebKit::WebPreferences::addPageGroup): Count how many page groups use private
3166         browsing, and notify WebContext when a session is needed. Note that we don't notify
3167         WebContext about WebPreferences without any page groups, because it's likely
3168         that preferences will be updated by the client before groups are associated.
3169         (WebKit::WebPreferences::removePageGroup): Ditto.
3170         (WebKit::WebPreferences::updateBoolValueForKey): Perform special handling for
3171         private browsing mode changes.
3172         (WebKit::WebPreferences::updatePrivateBrowsingValue): Notify WebContext when
3173         it's time to create or destroy a private browsing session.
3174         (WebKit::WebPreferences::anyPageGroupsAreUsingPrivateBrowsing): A getter for
3175         WebContext to know when any page groups are in private browsing mode.
3176
3177         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences):
3178         Don't create a private browsing session implicitly, UI process takes care of it.
3179
3180 2013-07-01  Timothy Hatcher  <timothy@apple.com>
3181
3182         Link to WebInspectorUI.framework at build time instead of soft linking.
3183
3184         https://bugs.webkit.org/show_bug.cgi?id=118261
3185
3186         Reviewed by Joseph Pecoraro.
3187
3188         * Configurations/WebKit2.xcconfig:
3189         * UIProcess/mac/WebInspectorProxyMac.mm:
3190         (WebKit::inspectorReallyUsesWebKitUserInterface):
3191         * WebKit2.xcodeproj/project.pbxproj:
3192         * WebProcess/WebPage/mac/WebInspectorMac.mm:
3193         (WebKit::inspectorReallyUsesWebKitUserInterface):
3194
3195 2013-07-01  Tim Horton  <timothy_horton@apple.com>
3196
3197         [wk2] TiledCoreAnimationDrawingArea should support scrolling its exposed rect
3198         https://bugs.webkit.org/show_bug.cgi?id=118173
3199         <rdar://problem/14301166>
3200
3201         Reviewed by Anders Carlsson.
3202
3203         Offset the exposed rect passed from the WKView by the main frame's current scroll position
3204         before sending it to our TiledBackings, so that it is in the same coordinate space as their
3205         ordinary visibleRects.
3206
3207         This has the side effect of making clips-to-exposed-rect testable (though useless) in Safari.
3208
3209         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3210         Add updateScrolledExposedRect() and m_scrolledExposedRect.
3211
3212         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3213         (WebKit::TiledCoreAnimationDrawingArea::scroll):
3214         Call updateScrolledExposedRect when the main frame scrolls.
3215
3216         (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
3217         Remove a FIXME about this change.
3218         Call updateScrolledExposedRect instead of passing down the unscrolled rect.
3219
3220         (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
3221         Call updateScrolledExposedRect, because that method will short-circuit if
3222         setClipsToExposedRect is false, so we need to update here for correctness
3223         if we get a setExposedRect(), setClipsToExposedRect(true) pair.
3224
3225         (WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
3226         Update m_scrolledExposedRect and propagate it to our TiledBackings.
3227
3228         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3229         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
3230         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
3231         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
3232         Use the scrolled exposed rect.
3233
3234 2013-07-01  Ada Chan  <adachan@apple.com>
3235
3236         Properly hide the header and footer banners if they are set to null.
3237         https://bugs.webkit.org/show_bug.cgi?id=118219
3238
3239         Reviewed by Beth Dakin.
3240         
3241         Call Page::addFooterWithHeight(0) to remove the parent layer that hosts the banner when
3242         the footer banner is detached. Similarly for the header banner.
3243
3244         * WebProcess/WebPage/mac/PageBannerMac.mm:
3245         (WebKit::PageBanner::detachFromPage):
3246
3247 2013-07-01  Jochen Eisinger  <jochen@chromium.org>
3248
3249         Remove support for consumable user gestures
3250         https://bugs.webkit.org/show_bug.cgi?id=118247
3251
3252         Reviewed by Geoffrey Garen.
3253
3254         * WebProcess/Notifications/WebNotificationManager.cpp:
3255         (WebKit::WebNotificationManager::didClickNotification):
3256         * WebProcess/Plugins/PluginView.cpp:
3257         (WebKit::PluginView::performFrameLoadURLRequest):
3258         (WebKit::PluginView::evaluate):
3259         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3260         (WebKit::WebContextMenuClient::searchWithGoogle):
3261
3262 2013-06-27  Jer Noble  <jer.noble@apple.com>
3263
3264         Audio in apps which embed WebViews is corrupted.
3265         https://bugs.webkit.org/show_bug.cgi?id=118163
3266
3267         Reviewed by Maciej Stachowiak.
3268
3269         Expose the WebCore lowPowerVideoAudioBufferSizeEnabled setting to WebKit2 clients.
3270
3271         * Shared/WebPreferencesStore.h:
3272         * WebProcess/WebPage/WebPage.cpp:
3273         (WebKit::WebPage::updatePreferences):
3274
3275 2013-07-01  Sam Weinig  <sam@webkit.org>
3276
3277         WKPageLoadDataWithUserData neglects to set the base URL that is passed in
3278         <rdar://problem/14306784>
3279         https://bugs.webkit.org/show_bug.cgi?id=118256
3280
3281         Reviewed by Anders Carlsson.
3282
3283         * WebProcess/WebPage/WebPage.cpp:
3284         (WebKit::WebPage::loadData):
3285         Pass the baseURL, not blankURL(), and remove an unnecessary multiplication by sizeof(uint8_t) which is always 1.
3286
3287 2013-07-01  Kangil Han  <kangil.han@samsung.com>
3288
3289         Adopt toHTMLTextAreaElement for code cleanup
3290         https://bugs.webkit.org/show_bug.cgi?id=118226
3291
3292         Reviewed by Andreas Kling.
3293
3294         To enhance readability, this patch adopts toHTMLTextAreaElement.
3295         This also helps out to reduce duplicated use of static_cast.
3296
3297         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3298         (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
3299         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
3300         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
3301         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3302         (WebKit::WebEditorClient::textDidChangeInTextArea):
3303         * WebProcess/WebPage/WebFrame.cpp:
3304         (WebKit::WebFrame::containsAnyFormControls):
3305
3306 2013-06-28  Andreas Kling  <akling@apple.com>
3307
3308         Fix Windows builds after deprecatedCharactersWithNullTermination() removal.
3309
3310         * Platform/CoreIPC/win/ConnectionWin.cpp:
3311         (CoreIPC::Connection::createServerAndClientIdentifiers):
3312
3313 2013-06-28  Tim Horton  <timothy_horton@apple.com>
3314
3315         [wk2] WKView shouldn't force scrolling off if shouldClipToVisibleRect is set
3316         https://bugs.webkit.org/show_bug.cgi?id=118174
3317         <rdar://problem/14301175>
3318
3319         Reviewed by Anders Carlsson.
3320
3321         * UIProcess/API/mac/WKView.mm:
3322         (-[WKView _updateViewExposedRect]):
3323         Pass whether or not clips-to-visibleRect is enabled down to the WebPageProxy.
3324
3325         (-[WKView setMinimumSizeForAutoLayout:]):
3326         Disable scrolling when using autolayout instead of when using clips-to-visibleRect.
3327
3328         (-[WKView setShouldClipToVisibleRect:]):
3329         Clipping to the WKView's visibleRect does not strictly require scrolling to be disabled,
3330         and in fact there are cases (RTL/TB pagination) where we *must* scroll, even when the view
3331         is big enough to fit the content (the case clip-to-visibleRect was added for).
3332
3333         * UIProcess/WebPageProxy.cpp:
3334         (WebKit::WebPageProxy::WebPageProxy):
3335         * UIProcess/WebPageProxy.h:
3336         * UIProcess/mac/WebPageProxyMac.mm:
3337         (WebKit::WebPageProxy::viewExposedRectChanged):
3338         (WebKit::WebPageProxy::exposedRectChangedTimerFired):
3339         Keep track of and forward to the drawing area whether or not clips-to-visibleRect is enabled.
3340
3341         * WebProcess/WebPage/DrawingArea.h:
3342         (WebKit::DrawingArea::setClipsToExposedRect): Added.
3343         (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame): Added a missing space.
3344
3345         * WebProcess/WebPage/WebPage.cpp:
3346         (WebKit::WebPage::viewExposedRectChanged):
3347         * WebProcess/WebPage/WebPage.h:
3348         * WebProcess/WebPage/WebPage.messages.in:
3349         Forward clips-to-visibleRect enabled state to the drawing area.
3350
3351         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3352         Add storage for m_clipsToExposedRect.
3353
3354         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3355         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
3356         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3357         (WebKit::TiledCoreAnimationDrawingArea::setClipsToExposedRect):
3358         (WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
3359         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
3360         (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer):
3361         Check m_clipsToExposedRect instead of the main-frame's isScrollable() to determine
3362         whether we should tell our TiledBackings to clip to the exposed rect we provide.
3363
3364         We don't need to listen to mainFrameScrollabilityChanged anymore.
3365
3366 2013-06-28  Gavin Barraclough  <barraclough@apple.com>
3367
3368         Stale occlusion state after moving page back into window
3369         https://bugs.webkit.org/show_bug.cgi?id=118202
3370
3371         Reviewed by Anders Carlsson.
3372         
3373         We need to update the occlusion state when the page goes back into the window.
3374
3375         * UIProcess/API/mac/WKView.mm:
3376         (-[WKView viewDidMoveToWindow]):
3377             - update occlusion state.
3378
3379 2013-06-28  Gwang Yoon Hwang  <ryumiel@company100.net>
3380
3381         Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
3382         https://bugs.webkit.org/show_bug.cgi?id=104360
3383
3384         Reviewed by Noam Rosenthal.
3385
3386         The CoordinatedLayerTreeHost has too many responsibilities. It
3387         implements LayerTreeHost, GraphicsLayerClient,
3388         CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
3389         UpdateAtlas::Client, GraphicsLayerFactory and
3390         WebCustomFilterProgramProxyClient.
3391
3392         This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
3393
3394         This patch introduces a new class called CompositingCoordinator, which
3395         takes the responsibility of managing compositing resources in
3396         WebProcess.
3397
3398         CoordinatedLayerTreeHost is responsible only for the scheduling and
3399         IPC-specific stuff, which are relevant only for WebKit2.
3400
3401         No new tests, covered by existing tests.
3402
3403         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3404         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
3405         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3406         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
3407         (WebKit::CoordinatedLayerTreeHost::invalidate):
3408         (WebKit::CoordinatedLayerTreeHost::forceRepaint):
3409         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
3410         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
3411         (WebKit::CoordinatedLayerTreeHost::renderNextFrame):
3412         (WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
3413         (WebKit::CoordinatedLayerTreeHost::willSyncLayerState):
3414         (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesForAnimations):
3415         (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
3416         (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
3417         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
3418         (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
3419         (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer):
3420         (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
3421         (WebKit::CoordinatedLayerTreeHost::commitSceneState):
3422         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
3423         (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory):
3424         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
3425         (WebKit::CoordinatedLayerTreeHost::commitScrollOffset):
3426         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3427         * WebProcess/WebPage/LayerTreeHost.h:
3428
3429 2013-06-28  Anders Carlsson  <andersca@apple.com>
3430
3431         Make the UI process run the Java Updater
3432         https://bugs.webkit.org/show_bug.cgi?id=118197
3433         <rdar://problem/14255677>
3434
3435         Reviewed by Sam Weinig.
3436
3437         Patch the relevant NSWorkspace method and pipe through the request to launch the Java updater to the UI process.
3438
3439         * PluginProcess/PluginProcess.h:
3440         * PluginProcess/mac/PluginProcessMac.mm:
3441         (WebKit::replacedNSWorkspace_launchApplicationAtURL_options_configuration_error):
3442         (WebKit::initializeCocoaOverrides):
3443         (WebKit::PluginProcess::launchApplicationAtURL):
3444         * UIProcess/Plugins/PluginProcessProxy.h:
3445         * UIProcess/Plugins/PluginProcessProxy.messages.in:
3446         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3447         (WebKit::isJavaUpdaterURL):
3448         (WebKit::shouldLaunchApplicationAtURL):
3449         (WebKit::PluginProcessProxy::launchApplicationAtURL):
3450
3451 2013-06-28  Tim Horton  <timothy_horton@apple.com>
3452
3453         WARN_UNUSED_RESULT can't be used in API headers, but WKBundlePageExtendIncrementalRenderingSuppression tries to
3454         https://bugs.webkit.org/show_bug.cgi?id=118196
3455         <rdar://problem/14303613>
3456
3457         Reviewed by Anders Carlsson.
3458
3459         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
3460
3461 2013-06-28  Andreas Kling  <akling@apple.com>
3462
3463         Don't fire process-became-responsive callback when disconnecting it.
3464         <http://webkit.org/b/118166>
3465
3466         Reviewed by Anders Carlsson.
3467
3468         When disconnecting from a web process, call ResponsivenessTimer::invalidate() instead of
3469         stop() to avoid firing the didBecomeResponsive() callback.
3470
3471         This lets the UI process react faster to actually unresponsive processes.
3472
3473         * UIProcess/WebProcessProxy.cpp:
3474         (WebKit::WebProcessProxy::disconnect):
3475
3476 2013-06-28  Sergio Villar Senin  <svillar@igalia.com>
3477
3478         [WK2][GTK] 100% CPU usage rendering a page with animations
3479         https://bugs.webkit.org/show_bug.cgi?id=117703
3480
3481         Reviewed by Martin Robinson.
3482
3483         Unconditionally update the value of m_lastFlushTime in
3484         ::flushAndRenderLayers. By doing that we avoid a neverending
3485         sequence of layer flushes that happened when m_lastFlushTime==0
3486         and flushPendingLayerChanges() was false. In that situation the
3487         value m_lastFlushTime was never updated so a new flush was always
3488         rescheduled.
3489
3490         * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
3491         (WebKit::LayerTreeHostGtk::flushAndRenderLayers):
3492
3493 2013-06-28  Andres Gomez  <agomez@igalia.com>
3494
3495         [GTK] MiniBrowser doesn't solve the saving location when there are no XDG settings
3496         https://bugs.webkit.org/show_bug.cgi?id=117538
3497
3498         Reviewed by Carlos Garcia Campos.
3499
3500         If the XDG specification is not working for the "Downloads"
3501         directory, let's use HOME as fallback.
3502
3503         * UIProcess/API/gtk/WebKitDownload.cpp:
3504         (webkitDownloadDecideDestination):
3505
3506 2013-06-28  Dariusz Frankiewicz  <d.frankiewic@samsung.com>
3507
3508         [EFL][WK2] Add spellcheck API tests in unit tests.
3509         https://bugs.webkit.org/show_bug.cgi?id=118123
3510
3511         Reviewed by Christophe Dumez.
3512
3513         According to discussion in bug https://bugs.webkit.org/show_bug.cgi?id=113742
3514         we're moving spelling tests from layout tests to unit tests.
3515
3516         * UIProcess/API/efl/tests/resources/spelling_selection_tests.html: Added.
3517         New file is needed to make tests, with and without spellcheck attribute.
3518         File contains basic site with content editable fields and buttons which select
3519         different parts of misspelled words.
3520
3521         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
3522         (countContextMenuItems):
3523         Added method used to count number of items in context menu.
3524
3525 2013-06-27  Kangil Han  <kangil.han@samsung.com>
3526
3527         Adopt is/toHTMLInputElement for code cleanup
3528         https://bugs.webkit.org/show_bug.cgi?id=118130
3529
3530         Reviewed by Antti Koivisto.
3531
3532         To enhance readability, this patch adopts is/toHTMLInputElement.
3533         This also helps out to reduce duplicated use of static_cast.
3534
3535         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3536         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
3537         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
3538         (WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled):
3539         (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
3540         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
3541         (WebKit::PDFPluginTextAnnotation::createAnnotationElement):
3542         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3543         (WebKit::WebChromeClient::focusedNodeChanged):
3544         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3545         (WebKit::WebEditorClient::textFieldDidBeginEditing):
3546         (WebKit::WebEditorClient::textFieldDidEndEditing):
3547         (WebKit::WebEditorClient::textDidChangeInTextField):
3548         (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
3549         (WebKit::WebEditorClient::textWillBeDeletedInTextField):
3550         * WebProcess/WebPage/WebFrame.cpp:
3551         (WebKit::WebFrame::containsAnyFormControls):
3552         * WebProcess/WebPage/WebPage.cpp:
3553         (WebKit::WebPage::editorState):
3554
3555 2013-06-27  Eunmi Lee  <eunmi15.lee@samsung.com>
3556
3557         [EFL][WK2] Add WK2 C API to handle touch events.
3558         https://bugs.webkit.org/show_bug.cgi?id=108915
3559
3560         Reviewed by Gyuyoung Kim.
3561
3562         Touch events for our target platforms differ (XInput2, Wayland, Tizen) so
3563         for the EFL port we want to be able to feed events manually.
3564
3565         To keep our current API for desktop EFL/Enlightenment working, we convert
3566         our currently limited EFL events to the new EFL specific C EwkTouchPoint
3567         and EwkTouchEvent type.
3568
3569         EwkTouchPoint and EwkTouchEvent are exposed as WKTouchPointRef and
3570         WKTouchEventRef, so they are opaque in the applications.
3571
3572         The WKViewSendTouchEvent can be used for any use-case (platform/product)
3573         not involving the EFL events.
3574
3575         At the same time we make sure to avoid using WK2 internals in our EFL API
3576         implementation.
3577
3578         * PlatformEfl.cmake:
3579         * Shared/API/c/efl/WKBaseEfl.h:
3580         * Shared/APIObject.h:
3581         * Shared/NativeWebTouchEvent.h:
3582         (WebKit::NativeWebTouchEvent::nativeEvent):
3583         * Shared/efl/NativeWebTouchEventEfl.cpp:
3584         (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
3585         * Shared/efl/WebEventFactory.cpp:
3586         (WebKit::toWebPlatformTouchPointState):
3587         (WebKit::toWebEventType):
3588         (WebKit::toWebEventModifiers):
3589         (WebKit::WebEventFactory::createWebTouchEvent):
3590         * Shared/efl/WebEventFactory.h:
3591         * UIProcess/API/C/efl/WKAPICastEfl.h:
3592         * UIProcess/API/C/efl/WKEventEfl.cpp: Added.
3593         (WKTouchPointCreate):
3594         (WKTouchEventCreate):
3595         * UIProcess/API/C/efl/WKEventEfl.h: Added.
3596         * UIProcess/API/C/efl/WKViewEfl.cpp:
3597         (WKViewSendTouchEvent):
3598         * UIProcess/API/C/efl/WKViewEfl.h:
3599         * UIProcess/API/efl/EwkView.cpp:
3600         (toWKTouchPointState):
3601         (toWKEventModifiers):
3602         (EwkView::feedTouchEvent):
3603         (EwkView::feedTouchEvents):
3604         * UIProcess/efl/EwkTouchEvent.cpp: Added.
3605         (WebKit::EwkTouchEvent::EwkTouchEvent):
3606         * UIProcess/efl/EwkTouchEvent.h: Added.
3607         (WebKit::EwkTouchEvent::create):
3608         (WebKit::EwkTouchEvent::eventType):
3609         (WebKit::EwkTouchEvent::touchPoints):
3610         (WebKit::EwkTouchEvent::modifiers):
3611         (WebKit::EwkTouchEvent::timestamp):
3612         (WebKit::EwkTouchEvent::type):
3613         * UIProcess/efl/EwkTouchPoint.cpp: Added.
3614         (WebKit::EwkTouchPoint::EwkTouchPoint):
3615         * UIProcess/efl/EwkTouchPoint.h: Added.
3616         (WebKit::EwkTouchPoint::create):
3617         (WebKit::EwkTouchPoint::id):
3618         (WebKit::EwkTouchPoint::state):
3619         (WebKit::EwkTouchPoint::screenPosition):
3620         (WebKit::EwkTouchPoint::position):
3621         (WebKit::EwkTouchPoint::radius):
3622         (WebKit::EwkTouchPoint::rotationAngle):
3623         (WebKit::EwkTouchPoint::forceFactor):
3624         (WebKit::EwkTouchPoint::type):
3625         * UIProcess/efl/WebViewEfl.cpp:
3626         (WebKit::WebViewEfl::sendTouchEvent):
3627         * UIProcess/efl/WebViewEfl.h:
3628
3629 2013-06-27  Csaba Osztrogonác  <ossy@webkit.org>
3630
3631         Fix cast-align warnings in WebKit2/Platform/CoreIPC
3632         https://bugs.webkit.org/show_bug.cgi?id=117987
3633
3634         Reviewed by Rob Buis, WK2 signed-off by Anders Carlsson.
3635
3636         * Platform/CoreIPC/ArgumentDecoder.cpp:
3637         (CoreIPC::ArgumentDecoder::decode):
3638         * Platform/CoreIPC/ArgumentEncoder.cpp:
3639         (CoreIPC::ArgumentEncoder::encode):
3640
3641 2013-06-27  Commit Queue  <commit-queue@webkit.org>
3642
3643         Unreviewed, rolling out r152074.
3644         http://trac.webkit.org/changeset/152074
3645         https://bugs.webkit.org/show_bug.cgi?id=118137
3646
3647         It caused lots of layout and API test crash on Qt Wk2.
3648         (Requested by kadam on #webkit).
3649
3650         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3651         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
3652         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3653         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
3654         (WebKit::CoordinatedLayerTreeHost::invalidate):
3655         (WebKit::CoordinatedLayerTreeHost::forceRepaint):
3656         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
3657         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
3658         (WebKit::CoordinatedLayerTreeHost::clearPendingStateChanges):
3659         (WebKit::CoordinatedLayerTreeHost::initializeRootCompositingLayerIfNeeded):
3660         (WebKit::CoordinatedLayerTreeHost::syncLayerState):
3661         (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded):
3662         (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
3663         (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
3664         (WebKit::CoordinatedLayerTreeHost::detachLayer):
3665         (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
3666         (WebKit::CoordinatedLayerTreeHost::syncDisplayState):
3667         (WebKit::CoordinatedLayerTreeHost::didPerformScheduledLayerFlush):
3668         (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer):
3669         (WebKit::CoordinatedLayerTreeHost::createImageBackingIfNeeded):
3670         (WebKit::CoordinatedLayerTreeHost::createImageBacking):
3671         (WebKit::CoordinatedLayerTreeHost::updateImageBacking):
3672         (WebKit::CoordinatedLayerTreeHost::clearImageBackingContents):
3673         (WebKit::CoordinatedLayerTreeHost::removeImageBacking):
3674         (WebKit::CoordinatedLayerTreeHost::flushPendingImageBackingChanges):
3675         (WebKit::CoordinatedLayerTreeHost::notifyAnimationStarted):
3676         (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired):
3677         (WebKit::CoordinatedLayerTreeHost::paintContents):
3678         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
3679         (WebKit::CoordinatedLayerTreeHost::deviceScaleFactor):
3680         (WebKit::CoordinatedLayerTreeHost::pageScaleFactor):
3681         (WebKit::CoordinatedLayerTreeHost::createUpdateAtlas):
3682         (WebKit::CoordinatedLayerTreeHost::removeUpdateAtlas):
3683         (WebKit::CoordinatedLayerTreeHost::visibleContentsRect):
3684         (WebKit::CoordinatedLayerTreeHost::mainContentsLayer):
3685         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
3686         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
3687         (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory):
3688         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
3689         (WebKit::CoordinatedLayerTreeHost::renderNextFrame):
3690         (WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
3691         (WebKit::CoordinatedLayerTreeHost::paintToSurface):
3692         (WebKit::CoordinatedLayerTreeHost::scheduleReleaseInactiveAtlases):
3693         (WebKit::CoordinatedLayerTreeHost::releaseInactiveAtlasesTimerFired):
3694         (WebKit::CoordinatedLayerTreeHost::commitScrollOffset):
3695         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3696         * WebProcess/WebPage/LayerTreeHost.h:
3697         (WebKit::LayerTreeHost::setVisibleContentsRect):
3698         (WebKit::LayerTreeHost::renderNextFrame):
3699         (WebKit::LayerTreeHost::purgeBackingStores):
3700
3701 2013-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3702
3703         Fixing some compiler warnings
3704         https://bugs.webkit.org/show_bug.cgi?id=117791
3705
3706         Reviewed by Martin Robinson.
3707
3708         * UIProcess/API/gtk/tests/WebExtensionTest.cpp: Properly
3709         initialized GDBusInterfaceVTable.
3710         * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
3711         (webkitWebPageCreate): Added missing fields to the
3712         WKBundlePageLoaderClient.
3713
3714 2013-06-27  Iago Toral Quiroga  <itoral@igalia.com>
3715
3716         Use consistent file names for WidgetBackingStoreGtkX11 class
3717         https://bugs.webkit.org/show_bug.cgi?id=118124
3718
3719         Reviewed by Carlos Garcia Campos.
3720
3721         * UIProcess/cairo/BackingStoreCairo.cpp:
3722
3723 2013-06-27  Alberto Garcia  <agarcia@igalia.com>
3724
3725         [GTK] [WK2] Check value of WEBKIT_INJECTED_BUNDLE_PATH
3726         https://bugs.webkit.org/show_bug.cgi?id=118055
3727
3728         Reviewed by Carlos Garcia Campos.
3729
3730         If the directory pointed at by WEBKIT_INJECTED_BUNDLE_PATH does
3731         not exist, fall back to the system directory.
3732
3733         This makes MiniBrowser work outside the build tree.
3734
3735         * UIProcess/API/gtk/WebKitWebContext.cpp:
3736         (injectedBundleDirectory):
3737
3738 2013-06-26  Simon Cooper  <scooper@apple.com>
3739
3740         Sometimes the Flash Player plugin cannot make outgoing connections
3741         https://bugs.webkit.org/show_bug.cgi?id=118110
3742         <rdar://problem/14270933>
3743
3744         Reviewed by Alexey Proskuryakov.
3745
3746         Allow outgoing and incoming UDP data. Tidy up the QuickTime
3747         profile as it gets the UDP ability from the common profile.
3748
3749         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
3750         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3751
3752 2013-06-26  Simon Cooper  <scooper@apple.com>
3753
3754         Flash Player: deny ipc-posix-sem 59918130
3755         https://bugs.webkit.org/show_bug.cgi?id=118107
3756         <rdar://problem/14271105>
3757
3758         Reviewed by Alexey Proskuryakov.
3759
3760         Allow same-sandbox scoped semaphores on Mavericks. Permit the
3761         named semaphore for older releases.
3762
3763         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
3764
3765 2013-06-26  Gwang Yoon Hwang  <ryumiel@company100.net>
3766
3767         Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
3768         https://bugs.webkit.org/show_bug.cgi?id=104360
3769
3770         Reviewed by Noam Rosenthal.
3771
3772         The CoordinatedLayerTreeHost has too many responsibilities. It
3773         implements LayerTreeHost, GraphicsLayerClient,
3774         CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
3775         UpdateAtlas::Client, GraphicsLayerFactory and
3776         WebCustomFilterProgramProxyClient.
3777
3778         This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
3779
3780         This patch introduces a new class called CompositingCoordinator, which
3781         takes the responsibility of managing compositing resources in
3782         WebProcess.
3783
3784         CoordinatedLayerTreeHost is responsible only for the scheduling and
3785         IPC-specific stuff, which are relevant only for WebKit2.
3786
3787         No new tests, covered by existing tests.
3788
3789         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3790         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
3791         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
3792         (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
3793         (WebKit::CoordinatedLayerTreeHost::invalidate):
3794         (WebKit::CoordinatedLayerTreeHost::forceRepaint):
3795         (WebKit::CoordinatedLayerTreeHost::sizeDidChange):
3796         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
3797         (WebKit::CoordinatedLayerTreeHost::renderNextFrame):
3798         (WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
3799         (WebKit::CoordinatedLayerTreeHost::willSyncLayerState):
3800         (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesForAnimations):
3801         (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies):
3802         (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy):
3803         (WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
3804         (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
3805         (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer):
3806         (WebKit::CoordinatedLayerTreeHost::paintLayerContents):
3807         (WebKit::CoordinatedLayerTreeHost::commitSceneState):
3808         (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
3809         (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory):
3810         (WebKit::CoordinatedLayerTreeHost::scheduleAnimation):
3811         (WebKit::CoordinatedLayerTreeHost::commitScrollOffset):
3812         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3813         * WebProcess/WebPage/LayerTreeHost.h:
3814
3815 2013-06-26  Simon Cooper  <scooper@apple.com>
3816
3817         Silverlight deny ipc-posix-sem LC_Mutex playing Amazon Prime videos
3818         https://bugs.webkit.org/show_bug.cgi?id=118102
3819         <rdar://problem/14194077>
3820
3821         Reviewed by Alexey Proskuryakov.
3822
3823         Allow same-sandbox scoped semaphores on Mavericks. Permit the
3824         named semaphore for older releases.
3825
3826         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
3827
3828 2013-06-26  Simon Cooper  <scooper@apple.com>
3829
3830         Update ColorSync shared memory names in plug-in sandbox profile
3831         https://bugs.webkit.org/show_bug.cgi?id=118099
3832
3833         Reviewed by Alexey Proskuryakov.
3834
3835         Update the common profile to use the names used in Mavericks
3836
3837         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3838
3839 2013-06-26  Anders Carlsson  <andersca@apple.com>
3840
3841         Deprecate StringImpl::charactersWithNullTermination
3842         https://bugs.webkit.org/show_bug.cgi?id=118108
3843
3844         Reviewed by Beth Dakin.
3845
3846         Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.
3847
3848         * Platform/CoreIPC/win/ConnectionWin.cpp:
3849         (CoreIPC::Connection::createServerAndClientIdentifiers):
3850
3851 2013-06-26  Simon Cooper  <scooper@apple.com>
3852
3853         QuickTime plug-in cannot update com.apple.quicktime.plugin.preferences.plist file
3854         https://bugs.webkit.org/show_bug.cgi?id=118098
3855         <rdar://problem/13888138>
3856
3857         Reviewed by Alexey Proskuryakov.
3858
3859         Allow the preference file to be written
3860
3861         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
3862
3863 2013-06-24  Simon Cooper  <scooper@apple.com>
3864
3865         Silverlight triggers sandbox violations: deny network-bind 0.0.0.0:0
3866         https://bugs.webkit.org/show_bug.cgi?id=117966
3867         <rdar://problem/13927918>
3868
3869         Reviewed by Sam Weinig.
3870
3871         Allow assigning (via bind) an ephemeral port before connecting
3872
3873         * Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
3874         * Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
3875         * Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
3876         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
3877
3878 2013-06-24  Simon Cooper  <scooper@apple.com>
3879
3880         PluginProcess deny file-read-data /Network/Library under addVolumeTracker
3881         https://bugs.webkit.org/show_bug.cgi?id=117965
3882         <rdar://problem/14121247>
3883
3884         Reviewed by Alexey Proskuryakov.
3885
3886         Silently deny reading /Network/Applications and 
3887         /Network/Library.
3888
3889         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3890
3891 2013-06-24  Kangil Han  <kangil.han@samsung.com>
3892
3893         Adopt is/toHTMLFormElement for code cleanup
3894         https://bugs.webkit.org/show_bug.cgi?id=117937
3895
3896         Reviewed by Andreas Kling.
3897
3898         This refers to http://src.chromium.org/viewvc/blink?view=revision&revision=152859
3899
3900         To enhance readibility, this patch adopts is/toHTMLFormElement.
3901         This also helps out to reduce duplicated use of static_cast.
3902
3903         * WebProcess/WebPage/WebFrame.cpp:
3904         (WebKit::WebFrame::containsAnyFormElements):
3905
3906 2013-06-24  Simon Cooper  <scooper@apple.com>
3907
3908         deny file-read-data /Library/CoreMediaIO/Plug-Ins/DAL
3909         https://bugs.webkit.org/show_bug.cgi?id=117964
3910         <rdar://problem/14036864>
3911
3912         Reviewed by Alexey Proskuryakov.
3913
3914         Permit reading of the /Library/CoreMediaIO/Plug-Ins/DAL
3915         subdirectory.
3916
3917         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3918
3919 2013-06-24  Simon Cooper  <scooper@apple.com>
3920
3921         Repeating sandbox violations when playing Amazon Prime videos with Flash
3922         https://bugs.webkit.org/show_bug.cgi?id=117953
3923         <rdar://problem/14193693>
3924
3925         Reviewed by Alexey Proskuryakov.
3926
3927         Add some missing "standard" files for network service lookups
3928
3929         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3930
3931 2013-06-24  Simon Cooper  <scooper@apple.com>
3932
3933         Plug-in sandbox violations attempting to access com.apple.CoreGraphics.plist
3934         https://bugs.webkit.org/show_bug.cgi?id=117963
3935         <rdar://problem/14084234>
3936
3937         Reviewed by Alexey Proskuryakov.
3938
3939         Permit the reading of the com.apple.CoreGraphics preference file
3940
3941         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3942
3943 2013-06-24  Simon Cooper  <scooper@apple.com>
3944
3945         com.oracle.javadeployment.plist is not correctly specified in the JavaApplet plugin profile
3946         https://bugs.webkit.org/show_bug.cgi?id=117961
3947         <rdar://problem/14223823>
3948
3949         Reviewed by Alexey Proskuryakov.
3950
3951         Remove the trailing extraneous .plist from the preference file rule
3952
3953         * Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
3954
3955 2013-06-24  Simon Cooper  <scooper@apple.com>
3956
3957         PluginProcess sandbox violations on com.apple.networkConnect.plist when resetting Safari
3958         https://bugs.webkit.org/show_bug.cgi?id=117958
3959         <rdar://problem/13938149>
3960
3961         Reviewed by Alexey Proskuryakov.
3962
3963         Allow reading the com.apple.networkConnect plist.
3964
3965         * Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
3966
3967 2013-06-24  Simon Cooper  <scooper@apple.com>
3968
3969         Java sandbox violation ipc-posix-shm-read-data /tmp/com.apple.csseed.67
3970         https://bugs.webkit.org/show_bug.cgi?id=117954
3971         <rdar://problem/14166577>
3972
3973         Reviewed by Alexey Proskuryakov.
3974
3975         Permit read access to this shared memory segment
3976
3977         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3978
3979 2013-06-24  Simon Cooper  <scooper@apple.com>
3980
3981         Plugin Sandbox violation in /Library/Audio/Sounds/Banks
3982         https://bugs.webkit.org/show_bug.cgi?id=117957
3983         <rdar://problem/14163582>
3984
3985         Reviewed by Alexey Proskuryakov.
3986
3987         Permit read access to subdirectories under /Library/Audio/Sounds
3988
3989         * Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
3990
3991 2013-06-24  Nick Diego Yamane  <nick.yamane@openbossa.org>
3992
3993         Make sure m_iconDatabaseImpl is not null before closing it
3994         https://bugs.webkit.org/show_bug.cgi?id=117943
3995
3996         Reviewed by Simon Fraser.
3997
3998         Since r150474 WebIconDatabase is closed unconditionally in
3999         TestController destructor, in that case WebKitTestRunner crashes
4000         when no icon database path is set. This misbehavior was observed in
4001         ports such as efl and nix.
4002         In this patch, WebIconDatabase::close() calls m_iconDatabaseImpl->close()
4003         only if m_iconDatabaseImpl is not null, as it's already being done in other
4004         WebIconDatabase's methods, such as isOpen().
4005
4006         * UIProcess/WebIconDatabase.cpp:
4007         (WebKit::WebIconDatabase::close):
4008
4009 2013-06-24  Ruth Fong  <ruth_fong@apple.com>
4010
4011         Expose the mediaHasAudio() function in WK2
4012         https://bugs.webkit.org/show_bug.cgi?id=117946
4013         <rdar://problem/14250527>
4014
4015         Reviewed by Beth Dakin.
4016
4017         Exposes the WebCore::HTMLMediaElement::mediaHasAudio() function
4018         in WK2.
4019
4020         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
4021         (WKBundleHitTestResultMediaHasAudio): Added.
4022         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
4023         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
4024         (WebKit::InjectedBundleHitTestResult::mediaHasAudio): Added.
4025         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
4026
4027 2013-06-24  Anders Carlsson  <andersca@apple.com>
4028
4029         REGRESSION (r147591): can't type in Adobe Connect
4030         https://bugs.webkit.org/show_bug.cgi?id=117947
4031         <rdar://problem/14223539>
4032
4033         Reviewed by Andreas Kling.
4034
4035         With the change in r147591, it is now possible for a plug-in element to be focused before the plug-in
4036         starts. Handle this by focusing the plug-in right after it's started if necessary.
4037
4038         * WebProcess/Plugins/PluginView.cpp:
4039         (WebKit::PluginView::didInitializePlugin):
4040
4041 2013-06-24  Simon Fraser  <simon.fraser@apple.com>
4042
4043         Move displayID stuff from Widget to Chrome
4044         https://bugs.webkit.org/show_bug.cgi?id=117944
4045
4046         Reviewed by Anders Carlsson.
4047
4048         In r151877 I polluted Widget with displayID-related stuff. This would
4049         be better on HostWindow, so move it there. This is a net code reduction,
4050         and eliminates PlatformScreenMac.h, and the NSScreen category.
4051
4052         * WebProcess/WebPage/WebPage.cpp:
4053         (WebKit::WebPage::windowScreenDidChange): Go via chrome().
4054
4055 2013-06-24  Krzysztof Wolanski  <k.wolanski@samsung.com>
4056
4057         [EFL][WK2] Implement unit test callback: onWordGuesses.
4058         https://bugs.webkit.org/show_bug.cgi?id=117794
4059
4060         Reviewed by Christophe Dumez.
4061
4062         * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:
4063         (onWordGuesses):
4064         Add client suggestions for the word.
4065
4066         (checkClientSuggestionsForWord):
4067         Verify the suggestions that were given by the client.
4068
4069 2013-06-17  Darin Adler  <darin@apple.com>
4070
4071         Sort all the Xcode project files
4072         https://bugs.webkit.org/show_bug.cgi?id=117696
4073
4074         Reviewed by Anders Carlsson.
4075
4076         * WebKit2.xcodeproj/project.pbxproj: Ran the sort-Xcode-project-file script.
4077
4078 2013-06-22  Dean Jackson  <dino@apple.com>
4079
4080         Slightly reduce width threshold on detection of primary snapshotted Plug-In
4081         https://bugs.webkit.org/show_bug.cgi?id=117914
4082         <rdar://problem/14136687>
4083
4084         Reviewed by Simon Fraser.
4085
4086         We've noticed some content that should be detected as the primary snapshotted plug-in,
4087         but is just a bit smaller than our 450x300 minimum threshold. Reduce the width to 400.
4088
4089         * WebProcess/WebPage/WebPage.cpp: Change primarySnapshottedPlugInMinimumWidth from 450 to 400.
4090
4091 2013-06-22  Simon Fraser  <simon.fraser@apple.com>
4092
4093         screen.availWidth always returns width of primary display
4094         https://bugs.webkit.org/show_bug.cgi?id=117863
4095
4096         Reviewed by Geoffrey Garen.
4097     
4098         In WebKit2, Widgets have no platformWidget, so trying to get to the
4099         NSScreen via the platform widget's window never succeeded, and we always
4100         fell back on getting info for the main display.
4101
4102         However, we were already pushing the WKView's displayID down to the
4103         WebProcess for the requestAnimationFrame infrastructure, so use that.
4104         
4105         The WebProcess would not receive a displayID for a WKView until the window
4106         was activated; fix by calling -doWindowDidChangeScreen when the view
4107         moves to a window, rather than doing it from -_windowDidBecomeKey:.
4108         
4109         * UIProcess/API/mac/WKView.mm:
4110         (-[WKView viewDidMoveToWindow]):
4111         (-[WKView _windowDidBecomeKey:]):
4112
4113 2013-06-21  Carlos Garcia Campos  <cgarcia@igalia.com&