[CMAKE] Use *bin* and *lib* directories for executable and libraries.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-02-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2
3         [CMAKE] Use *bin* and *lib* directories for executable and libraries.
4         https://bugs.webkit.org/show_bug.cgi?id=77928
5
6         Reviewed by Daniel Bates.
7
8         CMake has used *Programs* directory for executable. In addition, shared libraries are being
9         built in source directory. It is better to set common places in order to maintain executable
10         and libraries. *bin* is for executable and *lib* is for library.
11
12         * CMakeLists.txt:
13
14 2012-02-07  Timothy Hatcher  <timothy@apple.com>
15
16         Initilize the WebPageProxy intrinsicDeviceScaleFactor on creation of the WKView.
17
18         If WKView was created and loaded a page with canvas elements before beinging moved
19         to a window, the canvas elements would be locked in at a pixel ratio of 1. With this
20         change the WKView will use the main screen's pixel ratio until it moves to a window.
21
22         Reviewed by Anders Carlsson.
23
24         * UIProcess/API/mac/WKView.mm:
25         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Call setIntrinsicDeviceScaleFactor.
26
27 2012-02-07  Alexey Proskuryakov  <ap@apple.com>
28
29         Keep a reference in didReceiveInvalidMessage.
30         https://bugs.webkit.org/show_bug.cgi?id=78024
31
32         Reviewed by Anders Carlsson.
33
34         * UIProcess/WebConnectionToWebProcess.cpp:
35         (WebKit::WebConnectionToWebProcess::didReceiveInvalidMessage):
36
37 2012-02-06  Anders Carlsson  <andersca@apple.com>
38
39         ScrollableAreaSet should be moved from Page to FrameView
40         https://bugs.webkit.org/show_bug.cgi?id=62762
41
42         Reviewed by Beth Dakin.
43
44         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
45         (WebKit::BuiltInPDFView::initialize):
46         Call FrameView::addScrollableArea instead.
47
48         (WebKit::BuiltInPDFView::destroy):
49         Call FrameView::removeScrollableArea instead.
50
51         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
52         Remove disconnectFromPage since it no longer exists on ScrollableArea.
53
54 2012-02-07  Carlos Garcia Campos  <cgarcia@igalia.com>
55
56         [GTK] Add cut, copy and paste methods to WebKit2 GTK+ API
57         https://bugs.webkit.org/show_bug.cgi?id=76998
58
59         Reviewed by Martin Robinson.
60
61         * GNUmakefile.am: Add WebKitEditingCommands.h.
62         * UIProcess/API/gtk/WebKitEditingCommands.h: Added.
63         * UIProcess/API/gtk/WebKitWebView.cpp:
64         (didValidateCommand): Callback called by the C API when an editor
65         command has been validated.
66         (webkit_web_view_can_execute_editing_command): Asynchronously
67         validate the given editing command.
68         (webkit_web_view_can_execute_editing_command_finish): Finish async
69         operation started by webkit_web_view_can_execute_editing_command().
70         (webkit_web_view_execute_editing_command): Execute the given
71         command.
72         * UIProcess/API/gtk/WebKitWebView.h:
73         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
74         * UIProcess/API/gtk/tests/GNUmakefile.am:
75         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
76         (LoadTrackingTest::provisionalLoadFailed): Do not finish the main
77         loop on load failure, now finished is always called.
78         * UIProcess/API/gtk/tests/TestBackForwardList.cpp: Use WebViewTest
79         instead of LoadTrackingTest.
80         * UIProcess/API/gtk/tests/TestWebViewEditor.cpp: Added.
81         (testWebViewEditorCutCopyPasteNonEditable):
82         (testWebViewEditorCutCopyPasteEditable):
83         (beforeAll):
84         (afterAll):
85         * UIProcess/API/gtk/tests/WebViewTest.cpp:
86         (loadChanged):
87         (WebViewTest::waitUntilLoadFinished): Run a main loop until load
88         finished.
89         * UIProcess/API/gtk/tests/WebViewTest.h: Add waitUntilLoadFinished().
90         * UIProcess/API/gtk/webkit2.h: Include WebKitEditingCommands.h.
91
92 2012-02-07  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
93
94         Encode radius, force and rotationAngle in WebPlatformTouchPoint.
95         https://bugs.webkit.org/show_bug.cgi?id=77986
96
97         Reviewed by Kenneth Rohde Christiansen.
98
99         * Shared/WebEvent.h:
100         (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
101         (WebPlatformTouchPoint):
102         (WebKit::WebPlatformTouchPoint::radius):
103         (WebKit::WebPlatformTouchPoint::rotationAngle):
104         (WebKit::WebPlatformTouchPoint::force):
105         * Shared/WebEventConversion.cpp:
106         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
107         * Shared/WebPlatformTouchPoint.cpp:
108         (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
109         (WebKit::WebPlatformTouchPoint::encode):
110         (WebKit::WebPlatformTouchPoint::decode):
111
112 2012-02-07  Andras Becsi  <andras.becsi@nokia.com>
113
114         [Qt] [WK2] Fix the debug build after r106920
115
116         * WebProcess/qt/WebProcessQt.cpp:
117         (WebKit::WebProcess::platformSetCacheModel):
118         Remove unnecessary assert.
119
120 2012-02-03  Andras Becsi  <andras.becsi@nokia.com>
121
122         [Qt][WK2] Add the componentComplete method to WebView
123         https://bugs.webkit.org/show_bug.cgi?id=77111
124
125         Reviewed by Simon Hausmann.
126
127         Move the initialization of the interaction engine to componentComplete
128         in preparation of switching to a Flickable based content positioning
129         for the touch based WebView.
130         Suspend the page and delay the dispatch of load success on startup until
131         the component finished initialization. With this patch instantiating the
132         WebView in C++ is only possible by creating a QDeclarativeComponent as
133         the initialization depends on the componentComplete method being called.
134         Also return valid default values in the viewport info functions if the
135         interaction engine is not yet initialized because the viewport info
136         component could finish initialization earlier than the WebView, which
137         results in QML warnings during MiniBrowser startup.
138
139         * UIProcess/API/qt/qquickwebview.cpp:
140         (QQuickWebViewPrivate::initialize):
141         (QQuickWebViewPrivate::loadDidSucceed):
142         (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
143         (QQuickWebViewFlickablePrivate::initialize):
144         (QQuickWebViewFlickablePrivate::onComponentComplete):
145         (QQuickWebViewFlickablePrivate::loadDidSucceed):
146         (QQuickWebViewFlickablePrivate::updateViewportSize):
147         (QQuickWebViewFlickablePrivate::_q_resume):
148         (QQuickWebView::geometryChanged):
149         (QQuickWebView::componentComplete):
150         * UIProcess/API/qt/qquickwebview_p.h:
151         * UIProcess/API/qt/qquickwebview_p_p.h:
152         (QQuickWebViewPrivate::onComponentComplete):
153         (QQuickWebViewPrivate):
154         (QQuickWebViewFlickablePrivate):
155         * UIProcess/API/qt/qwebviewportinfo.cpp:
156         (QWebViewportInfo::currentScale):
157         (QWebViewportInfo::devicePixelRatio):
158         (QWebViewportInfo::initialScale):
159         (QWebViewportInfo::minimumScale):
160         (QWebViewportInfo::maximumScale):
161         (QWebViewportInfo::isScalable):
162         (QWebViewportInfo::layoutSize):
163         * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
164         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
165         (tst_QQuickWebView::tst_QQuickWebView):
166         (tst_QQuickWebView::init):
167         (tst_QQuickWebView::multipleWebViewWindows):
168         (tst_QQuickWebView::multipleWebViews):
169         * UIProcess/qt/QtWebPageLoadClient.cpp:
170         (QtWebPageLoadClient::dispatchLoadSucceeded):
171
172 2012-02-07  YoungTaeck Song  <youngtaeck.song@samsung.com>
173
174         [EFL][WK2] Add ModuleEfl.cpp
175         https://bugs.webkit.org/show_bug.cgi?id=63608
176
177         Reviewed by Andreas Kling.
178
179         Add first version of ModuleEfl.cpp including load(), unload() and platformFunctionPointer().
180
181         * Platform/Module.h:
182         * Platform/efl/ModuleEfl.cpp: Added.
183         (WebKit::Module::load):
184         (WebKit::Module::unload):
185         (WebKit::Module::platformFunctionPointer):
186
187 2012-02-07  Michael Brüning  <michael.bruning@nokia.com>
188
189         [Qt][WK2] Compute and set cache capacities using the current CacheModel
190         https://bugs.webkit.org/show_bug.cgi?id=73918
191
192         Reviewed by Kenneth Rohde Christiansen.
193
194         First part of the implementation. The next steps are the implementation
195         of the API for the Qt WebKit 2 port and the hybrid memory and disk cache.
196
197         * Shared/WebProcessCreationParameters.cpp:
198         (WebKit::WebProcessCreationParameters::encode):
199         (WebKit::WebProcessCreationParameters::decode):
200         * Shared/WebProcessCreationParameters.h:
201         (WebProcessCreationParameters):
202         * UIProcess/qt/WebContextQt.cpp:
203         (WebKit::defaultDiskCacheDirectory):
204         (WebKit):
205         (WebKit::WebContext::platformInitializeWebProcess):
206         * WebProcess/qt/WebProcessQt.cpp:
207         (WebKit::physicalMemorySizeInBytes):
208         (WebKit):
209         (WebKit::WebProcess::platformSetCacheModel):
210         (WebKit::WebProcess::platformInitializeWebProcess):
211
212 2012-02-06  Shinya Kawanaka  <shinyak@google.com>
213
214         Remove Element::ensureShadowRoot export.
215         https://bugs.webkit.org/show_bug.cgi?id=77932
216
217         Reviewed by Hajime Morita.
218
219         * win/WebKit2.def:
220         * win/WebKit2CFLite.def:
221
222 2012-02-06  Martin Robinson  <mrobinson@igalia.com>
223
224         [GTK] Add TextureMapperGL implementation
225         https://bugs.webkit.org/show_bug.cgi?id=75308
226
227         Reviewed by Alejandro G. Castro.
228
229         Fix the WebKit2 + AC build for GTK+.
230
231         * GNUmakefile.am: Add some missing source files.
232         * UIProcess/DrawingAreaProxy.cpp:
233         (WebKit): Add USE(TILED_BACKING_STORE) to the guard.
234         * UIProcess/WebPageProxy.cpp:
235         (WebKit::WebPageProxy::didReceiveMessage): Ditto.
236         * WebProcess/WebPage/DrawingArea.h:
237         (DrawingArea): Ditto.
238         * WebProcess/WebPage/DrawingAreaImpl.cpp:
239         (WebKit): Ditto.
240         * WebProcess/WebPage/DrawingAreaImpl.h:
241         (DrawingAreaImpl): Ditto.
242
243 2012-02-06  Martin Robinson  <mrobinson@igalia.com>
244
245         Fix some miscellaneous 'make dist' error for WebKitGTK+.
246
247         * GNUmakefile.am: Do not distribute generated files.
248
249 2012-02-06  Anders Carlsson  <andersca@apple.com>
250
251         Overlay scrollbars flash when window is simply activated
252         https://bugs.webkit.org/show_bug.cgi?id=77911
253
254         Reviewed by Kenneth Russell.
255
256         * UIProcess/API/mac/WKView.mm:
257         (-[WKView _updateWindowVisibility]):
258         Use -[NSWindow isVisible] here, since we also want to consider the window hidden if the application itself is hidden.
259
260         (-[WKView _windowDidOrderOffScreen:]):
261         (-[WKView _windowDidOrderOnScreen:]):
262         Call -[WKView updateWindowVisibility].
263
264         * WebProcess/WebPage/WebPage.cpp:
265         (WebKit::WebPage::setWindowIsVisible):
266         Call FocusController::setContainingWindowIsVisible.
267
268 2012-02-06  Martin Robinson  <mrobinson@igalia.com>
269
270          [GTK] Fix remaining errors in GTK+ WebKit2 API
271         https://bugs.webkit.org/show_bug.cgi?id=77890
272
273         Reviewed by Gustavo Noronha Silva.
274
275         Fix some style issues in the GTK+ WebKit2 API section of the source code.
276
277         * UIProcess/API/gtk/WebKitPrivate.h:
278         * UIProcess/API/gtk/WebKitWebView.cpp:
279         * UIProcess/API/gtk/tests/TestMain.h:
280
281 2012-02-06  Matthew Delaney  <mdelaney@apple.com>
282
283         toDataURL() uses stale data after putImageData()
284         https://bugs.webkit.org/show_bug.cgi?id=65767
285
286         Reviewed by Chris Marrin.
287
288         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
289         (InitWebCoreSystemInterface):
290
291 2012-02-06  Ryosuke Niwa  <rniwa@webkit.org>
292
293         gcc build fix after r106749.
294
295         * UIProcess/WebPreferences.cpp:
296         (WebKit::WebPreferences::WebPreferences):
297
298 2012-02-06  Martin Robinson  <mrobinson@igalia.com>
299
300         [GTK] WebKitWebView does a lot of work during size_allocate when not mapped
301         https://bugs.webkit.org/show_bug.cgi?id=77743
302
303         Reviewed by Gustavo Noronha Silva.
304
305         Instead of resizing the guts of a WebView when it's not mapped, wait
306         until it's mapped and do one resize. This prevents unmapped WebViews
307         from adding to a container's resize cost.
308
309         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
310         (_WebKitWebViewBasePrivate): Added a new member needsResizeOnMap.
311         (resizeWebKitWebViewBaseFromAllocation): Abstracted out this helper.
312         (webkitWebViewBaseSizeAllocate): Wait until map to resize unmapped WebViews.
313         (webkitWebViewBaseMap): Added this vmethod implementation.
314         (webkit_web_view_base_class_init): Added vmethod.
315
316 2012-02-06  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
317
318         WebGestureEvent can not encode delta and area.
319         https://bugs.webkit.org/show_bug.cgi?id=77728
320
321         Support delta and area fields in WebGestureEvent, and send area with Qt tap gesture.
322
323         Reviewed by Kenneth Rohde Christiansen.
324
325         * Shared/WebEvent.h:
326         (WebKit::WebGestureEvent::area):
327         (WebKit::WebGestureEvent::delta):
328         * Shared/WebEventConversion.cpp:
329         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
330         * Shared/WebGestureEvent.cpp:
331         (WebKit::WebGestureEvent::WebGestureEvent):
332         (WebKit::WebGestureEvent::encode):
333         (WebKit::WebGestureEvent::decode):
334         * UIProcess/qt/QtWebPageEventHandler.cpp:
335         (QtWebPageEventHandler::handleSingleTapEvent):
336
337 2012-02-03  Zalan Bujtas  <zbujtas@gmail.com>  and  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
338
339         [Qt][WK2] Remove TiledDrawingArea and dependencies.
340         https://bugs.webkit.org/show_bug.cgi?id=71681
341
342         Reviewed by Kenneth Rohde Christiansen.
343
344         Tiled drawing surface functionality got converted to LayerTree.
345         TiledDrawingArea and its dependencies are not used by any port anymore.
346
347         * CMakeLists.txt:
348         * GNUmakefile.am:
349         * Shared/DrawingAreaInfo.h:
350         * Target.pri:
351         * UIProcess/API/qt/qquickwebpage.cpp:
352         (QQuickWebPagePrivate::QQuickWebPagePrivate):
353         * UIProcess/API/qt/qquickwebpage_p.h:
354         * UIProcess/API/qt/qquickwebpage_p_p.h:
355         (QQuickWebPagePrivate):
356         * UIProcess/DrawingAreaProxy.h:
357         * UIProcess/DrawingAreaProxy.messages.in:
358         * UIProcess/TiledDrawingAreaProxy.cpp: Removed.
359         * UIProcess/TiledDrawingAreaProxy.h: Removed.
360         * UIProcess/qt/QtSGTileNode.cpp: Removed.
361         * UIProcess/qt/QtSGTileNode.h: Removed.
362         * UIProcess/qt/QtSGUpdateQueue.cpp: Removed.
363         * UIProcess/qt/QtSGUpdateQueue.h: Removed.
364         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Removed.
365         * WebProcess/WebPage/DrawingArea.cpp:
366         (WebKit::DrawingArea::create):
367         * WebProcess/WebPage/DrawingArea.h:
368         * WebProcess/WebPage/DrawingArea.messages.in:
369         * WebProcess/WebPage/TiledDrawingArea.cpp: Removed.
370         * WebProcess/WebPage/TiledDrawingArea.h: Removed.
371         * WebProcess/WebPage/WebPage.h:
372         (WebPage):
373
374 2012-02-03  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
375
376         [Qt] Don't version QtWebKit.experimental.
377         https://bugs.webkit.org/show_bug.cgi?id=77739
378
379         Reviewed by Tor Arne Vestbø.
380
381         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml:
382         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
383         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
384         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
385         * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml:
386         * UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
387         * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
388         * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml:
389         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
390
391 2012-02-06  Carlos Garcia Campos  <cgarcia@igalia.com>
392
393         [GTK] Fix several gtkdoc-fixxref warnings
394         https://bugs.webkit.org/show_bug.cgi?id=77613
395
396         Reviewed by Martin Robinson.
397
398         * UIProcess/API/gtk/WebKitWindowProperties.cpp: Fix a typo, a
399         colon was missing in WebKitWebView::ready-to-show.
400
401 2012-02-05  Dan Bernstein  <mitz@apple.com>
402
403         <rdar://problem/10809525> WebKit2’s WebFrameLoaderClient::shouldUseCredentialStorage() always returns true
404         https://bugs.webkit.org/show_bug.cgi?id=77823
405
406         Reviewed by Anders Carlsson.
407
408         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
409         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
410         (WebKit::InjectedBundlePageResourceLoadClient::shouldUseCredentialStorage): Added. Calls
411         through to the client if it implements shouldUseCredentialStorage. Returns true otherwise.
412         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
413         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
414         (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Changed to call the injected
415         bundle resource load client.
416
417 2012-02-04  Dan Bernstein  <mitz@apple.com>
418
419         <rdar://problem/10660698> Clients cannot prevent caching of individual responses
420         https://bugs.webkit.org/show_bug.cgi?id=77822
421
422         Reviewed by Sam Weinig.
423
424         * Shared/APIClientTraits.cpp: Added definition of interfaceSizesByVersion for
425         WKBundlePageResourceLoadClient.
426         * Shared/APIClientTraits.h: Added APIClientTraits specialization for WKBundlePageResourceLoadClient.
427         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added WKBundlePageShouldCacheResponseCallback
428         typedef, added shouldCacheResponse member to WKBundlePageResourceLoadClient, and bumped
429         kWKBundlePageResourceLoadClientCurrentVersion to 1.
430         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
431         (WebKit::InjectedBundlePageResourceLoadClient::shouldCacheResponse): Added. Calls through
432         to the client if it implements shouldCacheResponse. Returns true otherwise.
433         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
434         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
435         (WebKit::WebFrameLoaderClient::willCacheResponse): Changed to call
436         InjectedBundlePageResourceLoadClient::shouldCacheResponse() and return nil if the former
437         returns false.
438         (WebKit::WebFrameLoaderClient::shouldCacheResponse): Changed to call
439         InjectedBundlePageResourceLoadClient::shouldCacheResponse().
440
441 2012-02-04  Sam Weinig  <sam@webkit.org>
442
443         Add ability to send WKURLRequests in WebKit2 API user messages
444         https://bugs.webkit.org/show_bug.cgi?id=77819
445
446         Reviewed by Anders Carlsson.
447
448         Test: WebKit2UserMessageRoundTripTest API test.
449
450         * Shared/UserMessageCoders.h:
451         (WebKit::UserMessageEncoder::baseEncode):
452         (WebKit::UserMessageDecoder::baseDecode):
453         Add encode/decode for WebURLRequest.
454
455 2012-02-04  Dan Bernstein  <mitz@apple.com>
456
457         <rdar://problem/10772406> WKPreferences instances cannot be copied
458         https://bugs.webkit.org/show_bug.cgi?id=77816
459
460         Reviewed by Sam Weinig.
461
462         Test added in TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp.
463
464         * UIProcess/API/C/WKPreferences.cpp:
465         (WKPreferencesCreateCopy): Added.
466         * UIProcess/API/C/WKPreferencesPrivate.h:
467         * UIProcess/WebPreferences.cpp:
468         (WebKit::WebPreferences::WebPreferences): Added this constructor that copies the
469         WebPreferencesStore of the given WebPreferences.
470         * UIProcess/WebPreferences.h:
471         (WebKit::WebPreferences::create): Added this create function that takes a WebPreferences
472         instance and creates a new instance with a copy of the given instance’s store.
473
474 2012-02-03  Anders Carlsson  <andersca@apple.com>
475
476         WebKit2 should dispatch wheel events to the new ScrollingTree class
477         https://bugs.webkit.org/show_bug.cgi?id=77795
478
479         Reviewed by Andreas Kling.
480
481         Replace all uses of ScrollingCoordinator with ScrollingTree instead.
482         Also, don't try to handle gesture events on the scrolling thread anymore;
483         we don't need to to that right now.
484
485         * WebProcess/WebPage/EventDispatcher.cpp:
486         (WebKit::EventDispatcher::addScrollingTreeForPage):
487         (WebKit::EventDispatcher::removeScrollingTreeForPage):
488         (WebKit::EventDispatcher::wheelEvent):
489         (WebKit::EventDispatcher::gestureEvent):
490         * WebProcess/WebPage/EventDispatcher.h:
491         (WebCore):
492         (EventDispatcher):
493         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
494         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
495         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
496
497 2012-02-03  Alexey Proskuryakov  <ap@apple.com>
498
499         [WK2 Mac] No need to allow access to input methods or keyboard layouts
500         https://bugs.webkit.org/show_bug.cgi?id=77775
501         <rdar://problem/9276253>
502         <rdar://problem/9276268>
503
504         Reviewed by Dan Bernstein.
505
506         * WebProcess/com.apple.WebProcess.sb: These rules were likely only necessary in early days
507         of WebKit2. If there are cases when this happens, that's likely wrong, and we need to know
508         about that.
509
510 2012-02-03  Alexey Proskuryakov  <ap@apple.com>
511
512         [WK2] Use properly quoted string literals
513         https://bugs.webkit.org/show_bug.cgi?id=77583
514
515         Reviewed by Darin Adler.
516
517         Also added some FIXMEs.
518
519         * WebProcess/com.apple.WebProcess.sb:
520
521 2012-02-03  Brady Eidson  <beidson@apple.com>
522
523         <rdar://problem/10742441> and https://bugs.webkit.org/show_bug.cgi?id=77766
524         Need a WK2 API to filter which subframes go into WebArchives as they are created.
525
526         Reviewed by Darin Adler.
527
528         Add a new WKBundleFrame API that takes a filter callback object to allow or reject
529         subframes from a WebArchive:
530         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
531         (WKBundleFrameCopyWebArchive):
532         (WKBundleFrameCopyWebArchiveFilteringSubframes):
533         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
534
535         Implement the above API by calling through to WebCore:
536         * WebProcess/WebPage/WebFrame.cpp:
537         (WebFrameFilter):
538         (WebKit::WebFrameFilter::WebFrameFilter):
539         (WebKit::WebFrameFilter::shouldIncludeSubframe):
540         (WebKit::WebFrame::webArchiveData):
541         * WebProcess/WebPage/WebFrame.h:
542         (WebFrame):
543
544         * WebProcess/WebPage/WebPage.cpp:
545         (WebKit::WebPage::getWebArchiveOfFrame):
546
547 2012-02-03  Alexey Proskuryakov  <ap@apple.com>
548
549         [Mac WK2] Use a minimally invasive way to fake plug-in process name
550         https://bugs.webkit.org/show_bug.cgi?id=77682
551
552         Reviewed by Darin Adler.
553
554         * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::netscapePluginModule):
555         Only change the name as it's seen from within the process.
556
557         * Shared/Plugins/PluginQuirks.h: Fixed a typo.
558
559 2012-02-03  Beth Dakin  <bdakin@apple.com>
560
561         https://bugs.webkit.org/show_bug.cgi?id=77691
562         Fix PlatformScreen layering violation and PlatformScreenMac's incorrect use 
563         of device scale
564
565         Reviewed by Andy Estes.
566
567         toUserSpace() and toDeviceSpace() don't need to take device scale.
568         * UIProcess/API/mac/WKView.mm:
569         (-[WKView _convertToDeviceSpace:]):
570         (-[WKView _convertToUserSpace:]):
571
572 2012-02-03  No'am Rosenthal  <noam.rosenthal@nokia.com>
573
574         [Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible.
575         https://bugs.webkit.org/show_bug.cgi?id=77148
576
577         Reviewed by Martin Robinson.
578
579         Use TextureMapper::create instead of creating TextureMapperGL/TextureMapperQt directly.
580         Remove calls to unused API.
581
582         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
583         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
584         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
585         (WebKit::LayerTreeHostProxy::createImage):
586         (WebKit::LayerTreeHostProxy::ensureRootLayer):
587
588 2012-02-03  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
589
590         [Qt] Split QQuickWebViewPrivate in two classes, for desktop and touch behavior.
591         https://bugs.webkit.org/show_bug.cgi?id=77632
592
593         Reviewed by Kenneth Rohde Christiansen.
594
595         Replace the runtime property setting the desktop behavior on each instance
596         by a static boolean controlling the behavior used by future created WebViews.
597
598         * UIProcess/API/qt/qquickwebpage.cpp:
599         Let only setContentsSize control the size of the drawing area instead of deferring
600         it until geometryChanged is called.
601         (QQuickWebPagePrivate::QQuickWebPagePrivate):
602         * UIProcess/API/qt/qquickwebpage_p.h:
603         * UIProcess/API/qt/qquickwebpage_p_p.h:
604         (QQuickWebPagePrivate):
605         * UIProcess/API/qt/qquickwebview.cpp:
606         (createPrivateObject):
607         (QQuickWebViewPrivate::QQuickWebViewPrivate):
608         (QQuickWebViewPrivate::~QQuickWebViewPrivate):
609         (QQuickWebViewPrivate::initialize):
610         (QQuickWebViewPrivate::processDidCrash):
611         (QQuickWebViewLegacyPrivate::QQuickWebViewLegacyPrivate):
612         (QQuickWebViewLegacyPrivate::initialize):
613         (QQuickWebViewLegacyPrivate::updateViewportSize):
614         (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
615         (QQuickWebViewFlickablePrivate::~QQuickWebViewFlickablePrivate):
616         (QQuickWebViewFlickablePrivate::initialize):
617         (QQuickWebViewFlickablePrivate::loadDidCommit):
618         (QQuickWebViewFlickablePrivate::didFinishFirstNonEmptyLayout):
619         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
620         (QQuickWebViewFlickablePrivate::updateViewportSize):
621         (QQuickWebViewFlickablePrivate::_q_updateVisibleContentRectAndScale):
622         (QQuickWebViewFlickablePrivate::_q_suspend):
623         (QQuickWebViewFlickablePrivate::_q_resume):
624         (QQuickWebViewFlickablePrivate::pageDidRequestScroll):
625         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
626         (QQuickWebViewFlickablePrivate::computeViewportConstraints):
627         (QQuickWebViewFlickablePrivate::PostTransitionState::apply):
628         (QQuickWebViewExperimental::setFlickableViewportEnabled):
629         The switch is now a static function that has to be called before a WebView
630         is created. The switch can have it's default defined by the deploying platform.
631         (QQuickWebViewExperimental::flickableViewportEnabled):
632         (QQuickWebView::QQuickWebView):
633         On creation of QQuickWebView, the static boolean is read to know if we want
634         a QQuickWebViewTouchPrivate or a QQuickWebViewDesktopPrivate.
635         (QQuickWebView::geometryChanged):
636         * UIProcess/API/qt/qquickwebview_p.h:
637         * UIProcess/API/qt/qquickwebview_p_p.h:
638         (QQuickWebViewPrivate):
639         (QQuickWebViewPrivate::loadDidCommit):
640         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
641         (QQuickWebViewPrivate::didChangeViewportProperties):
642         (QQuickWebViewPrivate::viewportInteractionEngine):
643         (QQuickWebViewPrivate::updateViewportSize):
644         (QQuickWebViewPrivate::_q_updateVisibleContentRectAndScale):
645         (QQuickWebViewPrivate::_q_suspend):
646         (QQuickWebViewPrivate::_q_resume):
647         (QQuickWebViewPrivate::pageDidRequestScroll):
648         (QQuickWebViewPrivate::didChangeContentsSize):
649         (QQuickWebViewLegacyPrivate):
650         (QQuickWebViewFlickablePrivate):
651         (QQuickWebViewFlickablePrivate::viewportInteractionEngine):
652         (PostTransitionState):
653         (QQuickWebViewFlickablePrivate::PostTransitionState::PostTransitionState):
654         * UIProcess/API/qt/qwebviewportinfo.cpp:
655         (QWebViewportInfo::currentScale):
656         (QWebViewportInfo::devicePixelRatio):
657         (QWebViewportInfo::initialScale):
658         (QWebViewportInfo::minimumScale):
659         (QWebViewportInfo::maximumScale):
660         (QWebViewportInfo::isScalable):
661         (QWebViewportInfo::layoutSize):
662         * UIProcess/API/qt/tests/publicapi/publicapi.pro:
663         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: Added.
664         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/DesktopWebView.qml: Removed.
665         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml: Renamed
666         from Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_itemSelector.qml.
667         Moved to DesktopBehavior instead of using a DesktopWebView to workaround the touch event limitation.
668         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
669         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
670         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
671         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
672         * UIProcess/API/qt/tests/qmltests/WebView.pro: Copied
673         from Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro.
674         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
675         Split qmltests in two executables, tst_qmltests_DesktopBehavior and tst_qmltests_WebView.
676         The former runs without setFlickableViewportEnabled and the later does.
677         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
678         (main):
679         * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
680         * UIProcess/API/qt/tests/tests.pri:
681         * UIProcess/qt/QtWebPageEventHandler.cpp:
682         (QtWebPageEventHandler::QtWebPageEventHandler):
683
684 2012-02-02  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
685
686         [Qt] Rename content* to contents* in QQuickWebPage.
687         https://bugs.webkit.org/show_bug.cgi?id=77629
688
689         Reviewed by Kenneth Rohde Christiansen.
690
691         * UIProcess/API/qt/qquickwebpage.cpp:
692         (QQuickWebPagePrivate::QQuickWebPagePrivate):
693         (QQuickWebPagePrivate::paintToCurrentGLContext):
694         (QQuickWebPage::setContentsSize):
695         (QQuickWebPage::contentsSize):
696         (QQuickWebPage::setContentsScale):
697         (QQuickWebPage::contentsScale):
698         (QQuickWebPage::transformToItem):
699         (QQuickWebPagePrivate::updateSize):
700         * UIProcess/API/qt/qquickwebpage_p.h:
701         * UIProcess/API/qt/qquickwebpage_p_p.h:
702         (QQuickWebPagePrivate):
703         * UIProcess/API/qt/qquickwebview.cpp:
704         (QQuickWebViewPrivate::didChangeContentsSize):
705         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
706         (QQuickWebViewPrivate::PostTransitionState::apply):
707         * UIProcess/API/qt/qwebviewportinfo.cpp:
708         (QWebViewportInfo::contentsSize):
709         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
710         (tst_QQuickWebView::scrollRequest):
711         * UIProcess/qt/QtViewportInteractionEngine.cpp:
712         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
713         (WebKit::QtViewportInteractionEngine::event):
714         (WebKit::QtViewportInteractionEngine::wheelEvent):
715         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
716         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
717         (WebKit::QtViewportInteractionEngine::applyConstraints):
718         (WebKit::QtViewportInteractionEngine::currentCSSScale):
719         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
720         (WebKit::QtViewportInteractionEngine::scaleContent):
721
722 2012-02-03  Simon Hausmann  <simon.hausmann@nokia.com>
723
724         [Qt] Fix build when cross-compiling
725         https://bugs.webkit.org/show_bug.cgi?id=77634
726
727         Reviewed by Tor Arne Vestbø.
728
729         * WebKit2.pri: Link in -lrt on linux mkspecs, regardless of whether gcc
730         is in use or not. More specifically this fixes the case where the makespace
731         is not linux-g++* but for a cross-compiling one like linux-arm-gnueabi-g++.
732
733 2012-02-03  Shinya Kawanaka  <shinyak@google.com>
734
735         Stop calling Element::ensureShadowRoot in Internals.
736         https://bugs.webkit.org/show_bug.cgi?id=77612
737
738         Reviewed by Hajime Morita.
739
740         Exports symbols.
741
742         * win/WebKit2.def:
743         * win/WebKit2CFLite.def:
744
745 2012-02-02  Sheriff Bot  <webkit.review.bot@gmail.com>
746
747         Unreviewed, rolling out r106620.
748         http://trac.webkit.org/changeset/106620
749         https://bugs.webkit.org/show_bug.cgi?id=77716
750
751         It broke non ENABLE(3D_RENDERING) builds (Requested by
752         Ossy_morning on #webkit).
753
754         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
755         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
756         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
757         (WebKit::LayerTreeHostProxy::createImage):
758         (WebKit::LayerTreeHostProxy::ensureRootLayer):
759
760 2012-02-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
761
762         [Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible.
763         https://bugs.webkit.org/show_bug.cgi?id=77148
764
765         Reviewed by Martin Robinson.
766
767         Use TextureMapper::create instead of creating TextureMapperGL/TextureMapperQt directly.
768         Remove calls to unused API.
769
770         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
771         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
772         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
773         (WebKit::LayerTreeHostProxy::createImage):
774         (WebKit::LayerTreeHostProxy::ensureRootLayer):
775
776 2012-02-02  Jon Lee  <jonlee@apple.com>
777
778         Clear shown notifications when context is no longer active
779         https://bugs.webkit.org/show_bug.cgi?id=77363
780         <rdar://problem/10568907>
781
782         Reviewed by Darin Adler.
783
784         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
785         (WebKit::WebNotificationClient::clearNotifications): Forward the call to
786         WebNotificationManager.
787         * WebProcess/WebCoreSupport/WebNotificationClient.h:
788         (WebNotificationClient):
789
790         * WebProcess/Notifications/WebNotificationManager.h: Add an additional map that maps
791         all notifications associated with a given ScriptExecutionContext instance.
792         * WebProcess/Notifications/WebNotificationManager.cpp:
793         (WebKit::WebNotificationManager::show): Create a map entry for the notification's
794         context if it doesn't exist already, and note that notification's ID. Also, correct
795         the return value of show() if notifications are not enabled, to return false.
796         (WebKit::WebNotificationManager::didCloseNotifications): When the notification is closed,
797         we remove that notification from the map.
798         (WebKit::WebNotificationManager::clearNotifications): Use the map entry for the given
799         context, and pass that along to the proxy so that all of the notifications with those IDs
800         can be cleared. In the meantime, we remove that context's map entry.
801
802         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: New ClearNotifications()
803         message.
804         * UIProcess/Notifications/WebNotificationManagerProxy.h:
805         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
806         (WebKit::WebNotificationManagerProxy::clearNotifications): Forward the call to the provider.
807         Then remove this proxy's entries for the given notification IDs.
808
809         * UIProcess/Notifications/WebNotificationProvider.cpp:
810         (WebKit::WebNotificationProvider::clearNotifications): Convert the vector of IDs to a mutable
811         array.
812         * UIProcess/Notifications/WebNotificationProvider.h:
813         (WebNotificationProvider):
814
815         * UIProcess/API/C/WKNotificationProvider.h: Add WK API to tell the platform to clear the notifications.
816
817         Remove the #if guard since they already exist in WebNotificationManager functions:
818         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
819         (WebKit::WebNotificationClient::show):
820         (WebKit::WebNotificationClient::cancel):
821         (WebKit::WebNotificationClient::notificationObjectDestroyed):
822
823 2012-02-02  Anders Carlsson  <andersca@apple.com>
824
825         NPAPI will not send mouse up events when mouse is outside plugin area
826         https://bugs.webkit.org/show_bug.cgi?id=77657
827         <rdar://problem/10160674>
828
829         Reviewed by Andreas Kling.
830
831         Use EventHandler::setCapturingMouseEventsNode to ensure we get all the mouse events when the mouse is down.
832
833         * WebProcess/Plugins/PluginView.cpp:
834         (WebKit::PluginView::handleEvent):
835
836 2012-02-02  Claudio Saavedra  <csaavedra@igalia.com> and Martin Robinson  <mrobinson@igalia.com>
837
838         [GTK] WebKitWebView won't work in a GtkOffscreenWindow
839         https://bugs.webkit.org/show_bug.cgi?id=76911
840
841         Reviewed by Philippe Normand.
842
843         * UIProcess/API/gtk/WebKitUIClient.cpp:
844         (getWindowFrame): Use the new helper.
845         * UIProcess/API/gtk/WebKitWebView.cpp:
846         (webkitWebViewCreateJavaScriptDialog): Ditto
847         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
848         (webkitWebViewBaseRealize): Ditto.
849         (webkitWebViewBaseSizeAllocate): Ditto.
850         (webkitWebViewBaseFocusInEvent): Ditto.
851
852 2012-02-01  Philippe Normand  <pnormand@igalia.com>
853
854         [GStreamer] FFTFrame implementation
855         https://bugs.webkit.org/show_bug.cgi?id=73545
856
857         Reviewed by Chris Rogers.
858
859         * GNUmakefile.am: Remove libfftw compilation flags.
860
861 2012-02-01  No'am Rosenthal  <noam.rosenthal@nokia.com>
862
863         [Texmap] Use glScissors for clipping in TextureMapperGL when possible
864         https://bugs.webkit.org/show_bug.cgi?id=77575
865
866         Reviewed by Martin Robinson.
867
868         Instead of applying the scissor clip in QQuickWebPage, we trickle it down to
869         TextureMapperGL, and apply it there as part of beginClip(). All direct GL operations are
870         now cleaned out of QQuickWebPage.
871
872         * UIProcess/API/qt/qquickwebpage.cpp:
873         (QQuickWebPagePrivate::paintToCurrentGLContext):
874         * UIProcess/DrawingAreaProxy.h:
875         (WebKit::DrawingAreaProxy::paintToCurrentGLContext):
876         * UIProcess/DrawingAreaProxyImpl.cpp:
877         (WebKit::DrawingAreaProxyImpl::paintToCurrentGLContext):
878         * UIProcess/DrawingAreaProxyImpl.h:
879         (DrawingAreaProxyImpl):
880         * UIProcess/LayerTreeHostProxy.h:
881         (LayerTreeHostProxy):
882         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
883         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
884
885 2012-02-01  Dan Bernstein  <mitz@apple.com>
886
887         WebKit2 part of <rdar://problem/10442663> Paginated display does not respect page-break-{before,after}
888         https://bugs.webkit.org/show_bug.cgi?id=77505
889
890         Reviewed by Darin Adler.
891
892         * Shared/WebPageCreationParameters.cpp:
893         (WebKit::WebPageCreationParameters::encode): Encode paginationBehavesLikeColumns.
894         (WebKit::WebPageCreationParameters::decode): Decode paginationBehavesLikeColumns.
895         * Shared/WebPageCreationParameters.h:
896         (WebPageCreationParameters): Added paginationBehavesLikeColumns boolean.
897         * UIProcess/API/C/WKPage.cpp:
898         (WKPageSetPaginationBehavesLikeColumns): Added this setter.
899         (WKPageGetPaginationBehavesLikeColumns): Added this getter.
900         * UIProcess/API/C/WKPagePrivate.h:
901         * UIProcess/API/mac/WKBrowsingContextController.mm:
902         (-[WKBrowsingContextController setPaginationBehavesLikeColumns:]): Added this Objective-C
903         wrapper around WKPageSetPaginationBehavesLikeColumns.
904         (-[WKBrowsingContextController paginationBehavesLikeColumns]): Added this Objective-C wrapper
905         around WKPageGetPaginationBehavesLikeColumns.
906         * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h:
907         * UIProcess/WebPageProxy.cpp:
908         (WebKit::WebPageProxy::WebPageProxy): Added call to setPaginationBehavesLikeColumns() with
909         the value from the creation parameters.
910         (WebKit::WebPageProxy::setPaginationBehavesLikeColumns): Added this setter.
911         (WebKit::WebPageProxy::creationParameters): Populate paginationBehavesLikeColumns.
912         * UIProcess/WebPageProxy.h:
913         (WebKit::WebPageProxy::paginationBehavesLikeColumns): Added this getter.
914         * WebProcess/WebPage/WebPage.cpp:
915         (WebKit::WebPage::setPaginationBehavesLikeColumns): Added this setter.
916         * WebProcess/WebPage/WebPage.h:
917         * WebProcess/WebPage/WebPage.messages.in: Added SetPaginationBehavesLikeColumns message.
918
919 2012-02-01  Anders Carlsson  <andersca@apple.com>
920
921         REGRESSION (r104727): Strange graphics corruption opening a new tab in Safari
922         https://bugs.webkit.org/show_bug.cgi?id=77578
923         <rdar://problem/10767174>
924
925         Reviewed by Dan Bernstein.
926
927         Resizing a window will always invalidate the window backing store, so make sure to set
928         _data->_windowHasValidBackingStore to NO whenever that happens.
929
930         * UIProcess/API/mac/WKView.mm:
931         (-[WKView addWindowObserversForWindow:]):
932         Use separate methods for the NSWindowDidMoveNotification and NSWindowDidResizeNotification notifications.
933
934         (-[WKView _windowDidMove:]):
935         Call -[WKView _updateWindowAndViewFrames].
936
937         (-[WKView _windowDidResize:]):
938         Call -[WKView _updateWindowAndViewFrames] and mark the window backing store as invalid.
939
940 2012-02-01  Beth Dakin  <bdakin@apple.com>
941
942         https://bugs.webkit.org/show_bug.cgi?id=77383
943         Add a different didFirstVisuallNonEmptyLayout heuristic to experiment with
944         -and corresponding-
945         <rdar://problem/10709560>
946
947         Reviewed by Sam Weinig.
948
949         Machinery for didNewFirstVisuallNonEmptyLayout.
950         * UIProcess/API/C/WKPage.h:
951         * UIProcess/WebLoaderClient.cpp:
952         (WebKit::WebLoaderClient::didNewFirstVisuallyNonEmptyLayout):
953         (WebKit):
954         * UIProcess/WebLoaderClient.h:
955         (WebLoaderClient):
956         * UIProcess/WebPageProxy.cpp:
957         (WebKit::WebPageProxy::didNewFirstVisuallyNonEmptyLayout):
958         (WebKit):
959         * UIProcess/WebPageProxy.h:
960         (WebPageProxy):
961         * UIProcess/WebPageProxy.messages.in:
962         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
963         (WebKit::WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout):
964         (WebKit):
965         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
966         (WebFrameLoaderClient):
967
968         This temporary API allows the client to specify the threshold for the painted 
969         objects counter on Page. This is temporary.
970         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
971         (WKBundlePageSetPaintedObjectsCounterThreshold):
972         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
973         * WebProcess/WebPage/WebPage.cpp:
974         (WebKit::WebPage::setPaintedObjectsCounterThreshold):
975         (WebKit):
976         * WebProcess/WebPage/WebPage.h:
977         (WebPage):
978
979 2012-01-31  Alexey Proskuryakov  <ap@apple.com>
980
981         REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian
982         https://bugs.webkit.org/show_bug.cgi?id=77473
983         <rdar://problem/10751357>
984
985         Reviewed by Darin Adler.
986
987         * Shared/mac/WebEventFactory.mm: Removed broken copy/pasted implementation in favor of
988         WebCore ones.
989
990 2012-01-31  Alexey Proskuryakov  <ap@apple.com>
991
992         PluginProcess should be able to use remote open and save panels
993         https://bugs.webkit.org/show_bug.cgi?id=77461
994         <rdar://problem/10783615>
995
996         Reviewed by Mark Rowe.
997
998         * PluginProcess/mac/PluginProcess.entitlements: Added.
999         * PluginProcess/mac/add-entitlements.sh: Added.
1000         * WebKit2.xcodeproj/project.pbxproj:
1001         Add appropriate entitlement, plus ad hoc binary signing for it to work.
1002
1003 2012-01-31  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1004
1005         Ensure tiles are repainted when scrolling using mouse wheel.
1006         https://bugs.webkit.org/show_bug.cgi?id=77339
1007
1008         A new slot visibleContentRectAndScaleChanged has been added
1009         that is emited by non-animated scrolling code in the
1010         QtViewportInteractionEngine.
1011
1012         Reviewed by Kenneth Rohde Christiansen.
1013
1014         * UIProcess/API/qt/qquickwebview.cpp:
1015         (QQuickWebViewPrivate::initializeDesktop):
1016         (QQuickWebViewPrivate::initializeTouch):
1017         (QQuickWebViewPrivate::_q_resume):
1018         (QQuickWebViewPrivate::_q_updateVisibleContentRectAndScale):
1019         (QQuickWebViewPrivate::updateTouchViewportSize):
1020         * UIProcess/API/qt/qquickwebview_p.h:
1021         * UIProcess/API/qt/qquickwebview_p_p.h:
1022         (QQuickWebViewPrivate):
1023         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1024         (WebKit::QtViewportInteractionEngine::wheelEvent):
1025         * UIProcess/qt/QtViewportInteractionEngine.h:
1026         (QtViewportInteractionEngine):
1027
1028 2012-01-31  Zeno Albisser  <zeno@webkit.org>
1029
1030         [Qt][WK2] Make UIProcess decide about encoding of input data for application URL schemes.
1031         https://bugs.webkit.org/show_bug.cgi?id=77417
1032
1033         Make the UIProcess decide about the encoding and display
1034         a warning in case no encoding was defined.
1035         Make the QQuickNetworkReply store a QWeakPointer to the
1036         QQuickWebViewExperimental to get rid of hackish chain of parental queries.
1037
1038         Reviewed by Simon Hausmann.
1039
1040         * UIProcess/API/qt/qquicknetworkreply.cpp:
1041         (QQuickNetworkReply::send):
1042         (QQuickNetworkReply::setWebViewExperimental):
1043         * UIProcess/API/qt/qquicknetworkreply_p.h:
1044         * UIProcess/API/qt/qquickwebview.cpp:
1045         (QQuickWebViewExperimental::schemeDelegates_Append):
1046         * WebProcess/qt/QtNetworkReply.cpp:
1047         (WebKit::QtNetworkReply::QtNetworkReply):
1048         (WebKit::QtNetworkReply::setReplyData):
1049
1050 2012-01-30  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1051
1052         [Qt] Disconnect the LayerTreeHost from layers when they get removed from their parent.
1053         https://bugs.webkit.org/show_bug.cgi?id=77362
1054
1055         Reviewed by Noam Rosenthal.
1056
1057         This fixes crashes seen in layout tests under certain timing circumstances
1058         that appeared after r106109 was landed.
1059
1060         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1061         (WebCore::WebGraphicsLayer::replaceChild):
1062         (WebCore::WebGraphicsLayer::removeFromParent):
1063
1064 2012-01-30  Beth Dakin  <bdakin@apple.com>
1065
1066         https://bugs.webkit.org/show_bug.cgi?id=77263
1067         PlatformScreenMac should not rely on NSWindow for important bits of data
1068
1069         Reviewed by Geoff Garen.
1070
1071         toUserSpace() and toDeviceSpace() now take a parameter for the 
1072         deviceScaleFactor.
1073         * UIProcess/API/mac/WKView.mm:
1074         (-[WKView _convertToDeviceSpace:]):
1075         (-[WKView _convertToUserSpace:]):
1076
1077 2012-01-26  No'am Rosenthal  <noam.rosenthal@nokia.com> and Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1078
1079         [Qt] WKTR: Use a software rendering pipiline when running tests.
1080         https://bugs.webkit.org/show_bug.cgi?id=76708
1081
1082         Reviewed by Kenneth Rohde Christiansen.
1083
1084         Animation layout tests require the graphics layers tree to be updated
1085         to pass. WebkitTestRunner doesn't show its wrapping QQuickView, which
1086         prevents the rendering pipeline to run and then in turn blocks the web
1087         process from processing further graphics layer updates.
1088
1089         This allows the tests to use a TextureMapperQt to empty the LayerTreeHost's
1090         message queue and render the layers in software on an offscreen buffer.
1091
1092         * UIProcess/API/qt/qquickwebpage.cpp:
1093         (QQuickWebPagePrivate::paint):
1094         * UIProcess/API/qt/qquickwebview.cpp:
1095         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1096         (QQuickWebViewPrivate::setNeedsDisplay):
1097         (QQuickWebViewExperimental::setRenderToOffscreenBuffer):
1098         (QQuickWebViewExperimental::renderToOffscreenBuffer):
1099         * UIProcess/API/qt/qquickwebview_p.h:
1100         * UIProcess/API/qt/qquickwebview_p_p.h:
1101         (QQuickWebViewPrivate::setRenderToOffscreenBuffer):
1102         (QQuickWebViewPrivate::renderToOffscreenBuffer):
1103         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1104         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
1105
1106 2012-01-30  Andras Becsi  <andras.becsi@nokia.com>
1107
1108         [Qt][WK2] Render layers do not get flushed when the scroll animation finishes
1109         https://bugs.webkit.org/show_bug.cgi?id=77338
1110
1111         Reviewed by Noam Rosenthal.
1112
1113         Schedule a layer flush when setting the visible content rect and scale.
1114
1115         Fixed with the help of Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
1116
1117         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1118         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
1119
1120 2012-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1121
1122         Unreviewed. Fix make distcheck.
1123
1124         * GNUmakefile.am: Add missing files.
1125         * WebProcess/WebPage/TapHighlightController.cpp: Add #if
1126         ENABLE(TOUCH_EVENTS).
1127
1128 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1129
1130         Unreviewed, rolling out r106022.
1131         http://trac.webkit.org/changeset/106022
1132         https://bugs.webkit.org/show_bug.cgi?id=77305
1133
1134         It broke Qt-WK2 API tests (Requested by Ossy_weekend on
1135         #webkit).
1136
1137         * UIProcess/API/qt/qquickwebview.cpp:
1138         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
1139         (QQuickWebView::geometryChanged):
1140         * UIProcess/API/qt/qquickwebview_p.h:
1141         * UIProcess/API/qt/qwebviewportinfo.cpp:
1142         (QWebViewportInfo::currentScale):
1143         (QWebViewportInfo::devicePixelRatio):
1144         (QWebViewportInfo::initialScale):
1145         (QWebViewportInfo::minimumScale):
1146         (QWebViewportInfo::maximumScale):
1147         (QWebViewportInfo::isScalable):
1148         (QWebViewportInfo::layoutSize):
1149
1150 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1151
1152         Unreviewed, rolling out r106109.
1153         http://trac.webkit.org/changeset/106109
1154         https://bugs.webkit.org/show_bug.cgi?id=77302
1155
1156         It made tests crash (Requested by Ossy_weekend on #webkit).
1157
1158         * UIProcess/API/qt/qquickwebpage.cpp:
1159         * UIProcess/API/qt/qquickwebpage_p_p.h:
1160         (QQuickWebPagePrivate):
1161         * UIProcess/API/qt/qquickwebview.cpp:
1162         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1163         * UIProcess/API/qt/qquickwebview_p.h:
1164         * UIProcess/API/qt/qquickwebview_p_p.h:
1165         (QQuickWebViewPrivate):
1166         * UIProcess/DrawingAreaProxy.h:
1167         * UIProcess/DrawingAreaProxyImpl.cpp:
1168         * UIProcess/DrawingAreaProxyImpl.h:
1169         (DrawingAreaProxyImpl):
1170         * UIProcess/LayerTreeHostProxy.h:
1171         (LayerTreeHostProxy):
1172         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1173         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
1174         * UIProcess/qt/QtPageClient.cpp:
1175         (QtPageClient::setViewNeedsDisplay):
1176
1177 2012-01-27  Fady Samuel  <fsamuel@chromium.org>
1178
1179         Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
1180         https://bugs.webkit.org/show_bug.cgi?id=76459
1181
1182         Reviewed by Darin Fisher.
1183
1184         * win/WebKit2.def:
1185         * win/WebKit2CFLite.def:
1186
1187 2012-01-27  Martin Robinson  <mrobinson@igalia.com>
1188
1189         Fix a compilation warning in a WebKit2 GTK+ API test.
1190
1191         Reviewed by Gustavo Noronha Silva.
1192
1193         * UIProcess/API/gtk/tests/TestBackForwardList.cpp:
1194         (testBackForwardListLimitAndCache): Use an int instead of size_t
1195         because we want to print them as ints and do subtraction on them.
1196
1197 2012-01-27  Martin Robinson  <mrobinson@igalia.com>
1198
1199         [GTK] [WK2] Implement the policy client
1200         https://bugs.webkit.org/show_bug.cgi?id=76343
1201
1202         Reviewed by Gustavo Noronha Silva.
1203
1204         Implement the abstract WebKitPolicyDecision, WebKitNavigationPolicyDecision,
1205         and add the decide-policy signal to WebKitWebView.
1206
1207         * GNUmakefile.am: Add new files to the source list.
1208         * UIProcess/API/gtk/WebKitError.cpp: Use the WebCore namespace because
1209         of changes to ASSERT_MATCHING_ENUMS.
1210         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp: Added.
1211         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h: Added.
1212         * UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h: Added.
1213         * UIProcess/API/gtk/WebKitPolicyClient.cpp: Added.
1214         * UIProcess/API/gtk/WebKitPolicyClientPrivate.h: Added.
1215         * UIProcess/API/gtk/WebKitPolicyDecision.cpp: Added.
1216         * UIProcess/API/gtk/WebKitPolicyDecision.h: Added.
1217         * UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h: Added.
1218         * UIProcess/API/gtk/WebKitPrivate.h: Modify ASSERT_MATCHING_ENUMS to make
1219         it useful for non-WebCore enums.
1220         * UIProcess/API/gtk/WebKitWebView.cpp:
1221         (webkitWebViewConstructed): Attach the policy client callbacks to the page.
1222         (webkit_web_view_class_init): Add the decide-policy signal definition.
1223         (webkitWebViewMakePolicyDecision): Added this private method to fire the signal.
1224         * UIProcess/API/gtk/WebKitWebView.h: Added new signal to the list.
1225         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Added new method declaration.
1226         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new classes to the docs.
1227         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
1228         * UIProcess/API/gtk/tests/GNUmakefile.am: Added new test to the source list.
1229         * UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp: Added.
1230         * UIProcess/API/gtk/webkit2marshal.list: decide-policy has a new signature.
1231
1232 2012-01-27  Ada Chan  <adachan@apple.com>
1233
1234         Add API to get the parent frame in WKBundleFrameRef
1235         https://bugs.webkit.org/show_bug.cgi?id=77161
1236
1237         Reviewed by Anders Carlsson.
1238
1239         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1240         (WKBundleFrameGetParentFrame): Get the parent frame by calling WebFrame::parentFrame().
1241         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1242         * WebProcess/WebPage/WebFrame.cpp:
1243         (WebKit::WebFrame::parentFrame): Return null if the frame does not have an owner element.
1244         Otherwise, return the owner element's frame.
1245         * WebProcess/WebPage/WebFrame.h:
1246
1247 2012-01-27  Gustavo Noronha Silva  <gns@gnome.org>
1248
1249         [GTK] Sometimes fails to build when using make -j
1250         https://bugs.webkit.org/show_bug.cgi?id=77226
1251
1252         Reviewed by Martin Robinson.
1253
1254         * GNUmakefile.am: use a different name for the scripts used to
1255         generate enum files for WebKitGTK+ and WebKit2GTK+, so they do not
1256         clash;
1257
1258 2012-01-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1259
1260         Fix overridePreference for WebKitHixie76WebSocketProtocolEnabled in WebKitTestRunner.
1261         https://bugs.webkit.org/show_bug.cgi?id=77220
1262
1263         Reviewed by Noam Rosenthal.
1264
1265         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1266         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): The macro already stringify TestRunnerName.
1267
1268 2012-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1269
1270         [GTK] Add a GKeyFile especialization to GOwnPtr
1271         https://bugs.webkit.org/show_bug.cgi?id=77191
1272
1273         Reviewed by Martin Robinson.
1274
1275         * Shared/gtk/ArgumentCodersGtk.cpp:
1276         (CoreIPC::decodeGKeyFile): Use GOwnPtr for GKeyFile.
1277         (CoreIPC::encode): Ditto.
1278         (CoreIPC::decode): Ditto.
1279
1280 2012-01-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1281
1282         [Qt] Fade out tap highlighting when starting to pan
1283         https://bugs.webkit.org/show_bug.cgi?id=77202
1284
1285         Reviewed by Simon Hausmann.
1286
1287         Basically we need to fade out the potential tap highlighting
1288         when ever the gesture recognition fails or another gesture
1289         is recognized. We do that with this change.
1290
1291         * UIProcess/qt/QtTapGestureRecognizer.cpp:
1292         (WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
1293         (WebKit::QtTapGestureRecognizer::recognize):
1294         (WebKit::QtTapGestureRecognizer::reset):
1295
1296             Remove reset as it does nothing but call code before the
1297             event handler is installed.
1298
1299 2012-01-26  No'am Rosenthal  <noam.rosenthal@nokia.com> and Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1300
1301         [Qt] WKTR: Use a software rendering pipiline when running tests.
1302         https://bugs.webkit.org/show_bug.cgi?id=76708
1303
1304         Reviewed by Kenneth Rohde Christiansen.
1305
1306         Animation layout tests require the graphics layers tree to be updated
1307         to pass. WebkitTestRunner doesn't show its wrapping QQuickView, which
1308         prevents the rendering pipeline to run and then in turn blocks the web
1309         process from processing further graphics layer updates.
1310
1311         This allows the tests to use a TextureMapperQt to empty the LayerTreeHost's
1312         message queue and render the layers in software on an offscreen buffer.
1313
1314         * UIProcess/API/qt/qquickwebpage.cpp:
1315         (QQuickWebPagePrivate::paint):
1316         * UIProcess/API/qt/qquickwebview.cpp:
1317         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1318         (QQuickWebViewPrivate::setNeedsDisplay):
1319         (QQuickWebViewExperimental::setRenderToOffscreenBuffer):
1320         (QQuickWebViewExperimental::renderToOffscreenBuffer):
1321         * UIProcess/API/qt/qquickwebview_p.h:
1322         * UIProcess/API/qt/qquickwebview_p_p.h:
1323         (QQuickWebViewPrivate::setRenderToOffscreenBuffer):
1324         (QQuickWebViewPrivate::renderToOffscreenBuffer):
1325         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1326         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
1327
1328 2012-01-27  Simon Hausmann  <simon.hausmann@nokia.com>
1329
1330         [Qt] Re-creating QQuickWebView starts new web process every time
1331         https://bugs.webkit.org/show_bug.cgi?id=77194
1332
1333         Reviewed by Kenneth Rohde Christiansen.
1334
1335         Since the WebKit::WebContext is never fully destructed due to circular
1336         references, we should use the real shared context instead of re-creating
1337         a new WebContext every time.
1338
1339         * UIProcess/qt/QtWebContext.cpp:
1340         (WebKit::QtWebContext::defaultContext):
1341
1342 2012-01-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1343
1344         [GTK] Add basic printing support to WebKit2
1345         https://bugs.webkit.org/show_bug.cgi?id=76172
1346
1347         Reviewed by Gustavo Noronha Silva.
1348
1349         * GNUmakefile.am: Add new files to compilation.
1350         * Shared/PrintInfo.cpp:
1351         (WebKit::PrintInfo::encode): Encode also GtkPrintSettings and
1352         GtkPageSetup for the GTK+ port.
1353         (WebKit::PrintInfo::decode): Decode also GtkPrintSettings and
1354         GtkPageSetup for the GTK+ port.
1355         * Shared/PrintInfo.h: Add GtkPrintSettings and GtkPageSetup member
1356         for the GTK+ port.
1357         * Shared/gtk/ArgumentCodersGtk.cpp:
1358         (CoreIPC::encodeGKeyFile): Helper function to encode a GKeyFile as
1359         a DataReference object.
1360         (CoreIPC::decodeGKeyFile): Helper function to decode a GKeyFile to
1361         a DataReference object.
1362         (CoreIPC::encode): Encode GtkPrintSettings and GtkPageSetup using
1363         the GKeyFile representation.
1364         (CoreIPC::decode): Decode GtkPrintSettings and GtkPageSetup using
1365         the GKeyFile representation.
1366         * Shared/gtk/ArgumentCodersGtk.h:
1367         * Shared/gtk/PrintInfoGtk.cpp: Copied from Source/WebKit2/Shared/PrintInfo.cpp.
1368         (WebKit::PrintInfo::PrintInfo): Add PrintInfo constructor that
1369         takes GtkPrintSettings and GtkPageSetup instances.
1370         * UIProcess/WebPageProxy.cpp:
1371         (WebKit::WebPageProxy::drawPagesForPrinting): Send
1372         DrawPagesForPrinting message to Web process to start printing.
1373         * UIProcess/WebPageProxy.h:
1374         * WebProcess/WebPage/WebPage.cpp:
1375         (WebKit::WebPage::beginPrinting): Create a WebPrintOperationGtk.
1376         (WebKit::WebPage::endPrinting): Delete the WebPrintOperationGtk
1377         object.
1378         (WebKit::WebPage::drawPagesForPrinting): Start printing pages.
1379         * WebProcess/WebPage/WebPage.h:
1380         * WebProcess/WebPage/WebPage.messages.in: Add DrawPagesForPrinting message.
1381         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Added.
1382         (WebKit::PrintPagesData::PrintPagesData): Struct to store all data
1383         used to render pages for printing.
1384         (WebKit::PrintPagesData::incrementPageSequence): Helper function
1385         to increment the page sequence.
1386         (WebKit::WebPrintOperationGtk::create): Create a
1387         WebPrintOperationGtkUnix or WebPrintOperationGtkWin32 depending on
1388         the platform.
1389         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk):
1390         (WebKit::WebPrintOperationGtk::~WebPrintOperationGtk):
1391         (WebKit::WebPrintOperationGtk::pageCount): Return the total pages
1392         of the document to print.
1393         (WebKit::WebPrintOperationGtk::rotatePage): Helper function to
1394         transform the context according to orientation.
1395         (WebKit::WebPrintOperationGtk::renderPage): Render the given page
1396         into the printing context.
1397         (WebKit::WebPrintOperationGtk::printPagesIdle): Idle function used
1398         to print pages.
1399         (WebKit::WebPrintOperationGtk::printPagesIdleDone): Callback
1400         called when printPagesIdle finishes.
1401         (WebKit::WebPrintOperationGtk::printDone): Helper function to
1402         finish the print operation, called when all pages have been rendered.
1403         (WebKit::WebPrintOperationGtk::print): Start printing the document
1404         using the given cairo surface.
1405         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: Added.
1406         (WebKit::WebPrintOperationGtk::printSettings):
1407         (WebKit::WebPrintOperationGtk::pageSetup):
1408         (WebKit::WebPrintOperationGtk::pagesToPrint):
1409         (WebKit::WebPrintOperationGtk::pageRanges):
1410         (WebKit::WebPrintOperationGtk::pageRangesCount):
1411
1412 2012-01-26  Tim Horton  <hortont424@gmail.com>
1413
1414         3D transformed elements hide when showing the print dialog
1415         https://bugs.webkit.org/show_bug.cgi?id=45894
1416         <rdar://problem/7441593>
1417
1418         Reviewed by Andy Estes.
1419
1420         Suspend updates of the compositing layer tree while printing is taking place,
1421         preventing on-screen layers from moving to their print-mode positions.
1422
1423         * WebProcess/WebPage/WebPage.cpp:
1424         (WebKit::WebPage::beginPrinting):
1425         (WebKit::WebPage::endPrinting):
1426         * WebProcess/WebPage/ca/LayerTreeHostCA.h:
1427         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
1428         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
1429         (WebKit::LayerTreeHostCAMac::forceRepaint):
1430         (WebKit::LayerTreeHostCAMac::flushPendingLayerChanges):
1431
1432 2012-01-26  Andras Becsi  <andras.becsi@nokia.com>
1433
1434         [Qt][WK2] Add the componentComplete method to WebView
1435         https://bugs.webkit.org/show_bug.cgi?id=77111
1436
1437         Reviewed by Kenneth Rohde Christiansen.
1438
1439         Move the touch/desktop initialization to componentComplete.
1440         Also return valid default values in the viewport info functions
1441         if the interaction engine is not yet initialized because the
1442         viewport info component could finish initialization earlier
1443         than the WebView, which results in QML warnings during MiniBrowser
1444         startup.
1445
1446         * UIProcess/API/qt/qquickwebview.cpp:
1447         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
1448         (QQuickWebView::geometryChanged):
1449         (QQuickWebView::componentComplete):
1450         * UIProcess/API/qt/qquickwebview_p.h:
1451         * UIProcess/API/qt/qwebviewportinfo.cpp:
1452         (QWebViewportInfo::currentScale):
1453         (QWebViewportInfo::devicePixelRatio):
1454         (QWebViewportInfo::initialScale):
1455         (QWebViewportInfo::minimumScale):
1456         (QWebViewportInfo::maximumScale):
1457         (QWebViewportInfo::isScalable):
1458         (QWebViewportInfo::layoutSize):
1459
1460 2012-01-26  Anders Carlsson  <andersca@apple.com>
1461
1462         WebWheelEvent::Phase and PlatformWheelEvent::Phase declarations should match AppKit
1463         https://bugs.webkit.org/show_bug.cgi?id=77123
1464
1465         Reviewed by Beth Dakin.
1466
1467         * Shared/WebEvent.h:
1468         ():
1469         * Shared/mac/WebEventFactory.mm:
1470         (WebKit::phaseForEvent):
1471
1472 2012-01-26  Andras Becsi  <andras.becsi@nokia.com>
1473
1474         ASSERT(!m_overlay) reached in TapHighlightController.cpp:73
1475         https://bugs.webkit.org/show_bug.cgi?id=77117
1476
1477         Reviewed by Tor Arne Vestbø.
1478
1479         The PageOverlay does only get uninstalled after the fade-out animation finishes,
1480         so do not assert on !m_overlay after the uninstallPageOverlay call.
1481
1482         * WebProcess/WebPage/TapHighlightController.cpp:
1483         (WebKit::TapHighlightController::hideHighlight):
1484
1485 2012-01-26  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1486
1487         WebPreferencesStore: use DEFINE_STATIC_LOCAL for overrides HashMap
1488         https://bugs.webkit.org/show_bug.cgi?id=77109
1489
1490         Reviewed by Andreas Kling.
1491
1492         Fix build for Clang.
1493
1494         * Shared/WebPreferencesStore.cpp:
1495         (WebKit):
1496         (WebKit::boolTestRunnerOverridesMap):
1497         (WebKit::WebPreferencesStore::overrideBoolValueForKey):
1498         (WebKit::WebPreferencesStore::removeTestRunnerOverrides):
1499         (WebKit::WebPreferencesStore::getBoolValueForKey):
1500
1501 2012-01-26  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1502
1503         Implement overridePreference for boolean preferences in WebKitTestRunner
1504         https://bugs.webkit.org/show_bug.cgi?id=77033
1505
1506         Reviewed by Alexey Proskuryakov.
1507
1508         Implement a way to WebKitTestRunner override preferences for the pages
1509         loaded. Follows the same approach taken by
1510         overrideXSSAuditorEnabledForTestRunner() from r66551, but generalizing to many
1511         preferences.
1512
1513         Preferences are stored in the UI process using WebPreferencesStore, and when
1514         there's a change, this data is sent to Web process, triggering
1515         WebPage::preferencesDidChange(), which take a WebPreferencesStore and apply it's
1516         data to the WebCore::Settings object.
1517
1518         The overridePreference() is executed on the Web process, and set the preferences
1519         without communicating to the UI process. The overriden preferences are stored in
1520         a static map and WebPreferencesStore query this map before returning the values
1521         of each preference. This static map is used only on the Web process.
1522
1523         To clear the overrides we need to clear the map. Since WTR only sets preferences
1524         when resetting the page, we hook the clearing at WebPage::preferencesDidChange().
1525         A WKPreferences private function was exposed to WTR force the update, in case
1526         there's no effective change at UI process (all the properties remains the same).
1527
1528         This clearing could be improved by creating a proper message instead of hooking
1529         at WebPage::preferencesDidChange().
1530
1531         * Shared/WebPreferencesStore.cpp:
1532         (WebKit::WebPreferencesStore::decode):
1533         (WebKit::WebPreferencesStore::overrideBoolValueForKey):
1534         (WebKit::WebPreferencesStore::removeTestRunnerOverrides):
1535         (WebKit::WebPreferencesStore::getBoolValueForKey):
1536         * Shared/WebPreferencesStore.h:
1537         * UIProcess/API/C/WKPreferences.cpp:
1538         (WKPreferencesResetTestRunnerOverrides):
1539         * UIProcess/API/C/WKPreferencesPrivate.h:
1540         * UIProcess/WebPreferences.h:
1541         (WebKit::WebPreferences::forceUpdate):
1542         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1543         (WKBundleOverrideBoolPreferenceForTestRunner):
1544         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1545         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1546         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
1547         (WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner):
1548         * WebProcess/InjectedBundle/InjectedBundle.h:
1549
1550 2012-01-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1551
1552         [GTK][WK2] Primary clipboard should be updated with the current selection in X11 platforms
1553         https://bugs.webkit.org/show_bug.cgi?id=77097
1554
1555         Reviewed by Martin Robinson.
1556
1557         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1558         (WebKit::WebEditorClient::respondToChangedSelection): Call
1559         setSelectionPrimaryClipboardIfNeeded() to update primary clipboard
1560         in X11 platforms.
1561         * WebProcess/WebCoreSupport/WebEditorClient.h:
1562         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1563         (WebKit::collapseSelection): Callback called when clearing
1564         clipboard contents.
1565         (WebKit::WebEditorClient::setSelectionPrimaryClipboardIfNeeded):
1566         Updaye primary clipboard with the current selection.
1567
1568 2012-01-26  Zeno Albisser  <zeno@webkit.org>
1569
1570         [Qt][WK2] Use QVariant for payload data in application URL schemes.
1571         https://bugs.webkit.org/show_bug.cgi?id=77007
1572
1573         Make application schemes use QVariant for payload data.
1574         This allows passing QByteArrays as well as simple String data.
1575
1576         Remove unneeded http header parts that were exposed in
1577         QQuickNetworkReply.
1578
1579         Add ByteArrayTestData class to allow injecting QByteArray
1580         data into an application scheme handler for testing.
1581
1582         Reviewed by Simon Hausmann.
1583
1584         * Shared/qt/QtNetworkReplyData.cpp:
1585         (WebKit::QtNetworkReplyData::QtNetworkReplyData):
1586         (WebKit::QtNetworkReplyData::encode):
1587         (WebKit::QtNetworkReplyData::decode):
1588         * Shared/qt/QtNetworkReplyData.h:
1589         * UIProcess/API/qt/qquicknetworkreply.cpp:
1590         (QQuickNetworkReply::QQuickNetworkReply):
1591         (QQuickNetworkReply::data):
1592         (QQuickNetworkReply::setData):
1593         (QQuickNetworkReply::send):
1594         * UIProcess/API/qt/qquicknetworkreply_p.h:
1595         * UIProcess/API/qt/tests/bytearraytestdata.cpp: Added.
1596         (ByteArrayTestData::ByteArrayTestData):
1597         (ByteArrayTestData::latin1Data):
1598         (ByteArrayTestData::utf8Data):
1599         * UIProcess/API/qt/tests/bytearraytestdata.h: Added.
1600         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
1601         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
1602         (main):
1603         * UIProcess/API/qt/tests/tests.pri:
1604         * WebProcess/qt/QtNetworkReply.cpp:
1605         (WebKit::QtNetworkReply::setReplyData):
1606         * WebProcess/qt/QtNetworkReply.h:
1607
1608 2012-01-26  Thiago Marcos P. Santos  <tmpsantos@gmail.com>
1609
1610         [Qt] Fixed build when using force_static_libs_as_shared
1611         https://bugs.webkit.org/attachment.cgi?bugid=77082
1612
1613         Reviewed by Simon Hausmann.
1614
1615         * Target.pri:
1616
1617 2012-01-26  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
1618
1619         [WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission
1620         https://bugs.webkit.org/show_bug.cgi?id=42545
1621
1622         Reviewed by Zoltan Herczeg.
1623
1624         Implement the setGeolocationPermission method.
1625
1626         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1627         (WKBundleSetGeolocationPermission):
1628         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1629         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1630         (WebKit::InjectedBundle::setGeoLocationPermission):
1631         (WebKit):
1632         * WebProcess/InjectedBundle/InjectedBundle.h:
1633         (InjectedBundle):
1634
1635 2012-01-25  Mark Rowe  <mrowe@apple.com>
1636
1637         Build in to an alternate location when USE_STAGING_INSTALL_PATH is set.
1638
1639         <rdar://problem/10609417> Adopt USE_STAGING_INSTALL_PATH
1640
1641         Reviewed by David Kilzer.
1642
1643         * Configurations/BaseTarget.xcconfig: Define NORMAL_WEBKIT2_FRAMEWORKS_DIR, which contains
1644         the path where WebKit is normally installed. Update WEBKIT2_FRAMEWORKS_DIR to point to
1645         the staged frameworks directory when USE_STAGING_INSTALL_PATH is set. Update
1646         UMBRELLA_FRAMEWORKS_DIR so we can find WebCore at the top level of the staged frameworks
1647         directory when USE_STAGING_INSTALL_PATH is set, rather than finding it embedded inside of
1648         WebKit.framework.
1649         * Configurations/PluginProcess.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR.
1650         * Configurations/WebKit2.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR.
1651         Always set the framework's install name based on the normal framework location. This prevents
1652         an incorrect install name from being used when installing in to the staged frameworks directory.
1653         * Configurations/WebProcess.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR.
1654
1655 2012-01-25  No'am Rosenthal  <noam.rosenthal@nokia.com>
1656
1657         [WK2][Qt] REGRESSION: Pages with transform animations sometimes omit some of the layers since r105413
1658         https://bugs.webkit.org/show_bug.cgi?id=76886
1659
1660         Reviewed by Kenneth Rohde Christiansen.
1661
1662         We now render the whole layer if it or one if its ancestors has an active transform
1663         animations. It's possible to optimize further in the future, but not currently necessary.
1664         Also, we make sure that when a WebGraphicsLayer's property that affects transformation is
1665         changed, all its descandants layers are marked as modified so that we re-adjust their
1666         visible rect in the next pass.
1667
1668         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1669         (WebCore::WebGraphicsLayer::notifyChangeRecursively):
1670         (WebCore):
1671         (WebCore::WebGraphicsLayer::setPosition):
1672         (WebCore::WebGraphicsLayer::setAnchorPoint):
1673         (WebCore::WebGraphicsLayer::setSize):
1674         (WebCore::WebGraphicsLayer::setTransform):
1675         (WebCore::WebGraphicsLayer::setChildrenTransform):
1676         (WebCore::WebGraphicsLayer::setPreserves3D):
1677         (WebCore::WebGraphicsLayer::setMasksToBounds):
1678         (WebCore::WebGraphicsLayer::addAnimation):
1679         (WebCore::WebGraphicsLayer::removeAnimation):
1680         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
1681         (WebCore::WebGraphicsLayer::selfOrAncestorHasActiveTransformAnimations):
1682         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
1683         (WebGraphicsLayer):
1684
1685 2012-01-25  Hajime Morita  <morrita@google.com>
1686
1687         ENABLE_SHADOW_DOM should be available via build-webkit --shadow-dom
1688         https://bugs.webkit.org/show_bug.cgi?id=76863
1689
1690         Reviewed by Dimitri Glazkov.
1691
1692         Added a feature flag.
1693
1694         * Configurations/FeatureDefines.xcconfig:
1695
1696 2012-01-25  Martin Robinson  <mrobinson@igalia.com>
1697
1698         [WK2] Navigation events not triggered by a mouse event claim to be triggered by the left mouse button during policy decisions
1699         https://bugs.webkit.org/show_bug.cgi?id=76344
1700
1701         Reviewed by Sam Weinig.
1702
1703         When creating InjectedBundleNavigationActions, initialize the mouse button to NoButton.
1704         This ensures that when there is no mouse event associated with the action, when the event
1705         hits the client-API layer, the button is still NoButton.
1706
1707         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
1708         (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): Initialize m_mouseButton
1709         to WebMouseEvent::NoButton.
1710
1711 2012-01-25  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1712
1713         [Qt] Implement tap feedback respecting -webkit-tap-highlight-color
1714         https://bugs.webkit.org/show_bug.cgi?id=76914
1715
1716         Reviewed by Simon Hausmann.
1717
1718         Implement tap highlighting for Qt. When a touch press is issued,
1719         which is not handled by the web page, then we highlight any
1720         activatable node below. In all otehr cases, we hide any highlights.
1721
1722         The highlighting itself is painted on an accelerated PageOverlay,
1723         on the web process side.
1724
1725         * Target.pri:
1726         * UIProcess/WebPageProxy.cpp:
1727         (WebKit::WebPageProxy::handlePotentialActivation):
1728         * UIProcess/WebPageProxy.h:
1729         * UIProcess/qt/QtTapGestureRecognizer.cpp:
1730         (WebKit::QtTapGestureRecognizer::recognize):
1731         * UIProcess/qt/QtWebPageEventHandler.cpp:
1732         (QtWebPageEventHandler::handlePotentialSingleTapEvent):
1733         * UIProcess/qt/QtWebPageEventHandler.h:
1734         * WebProcess/WebPage/TapHighlightController.cpp: Added.
1735         (WebKit::TapHighlightController::TapHighlightController):
1736         (WebKit::TapHighlightController::~TapHighlightController):
1737         (WebKit::TapHighlightController::highlight):
1738         (WebKit::TapHighlightController::hideHighlight):
1739         (WebKit::TapHighlightController::pageOverlayDestroyed):
1740         (WebKit::TapHighlightController::willMoveToWebPage):
1741         (WebKit::TapHighlightController::didMoveToWebPage):
1742         (WebKit::highlightColor):
1743         (WebKit::TapHighlightController::drawRect):
1744         (WebKit::TapHighlightController::mouseEvent):
1745         * WebProcess/WebPage/TapHighlightController.h: Added.
1746         * WebProcess/WebPage/WebPage.cpp:
1747         (WebKit::WebPage::WebPage):
1748         (WebKit::WebPage::highlightPotentialActivation):
1749         * WebProcess/WebPage/WebPage.h:
1750         (WebKit::WebPage::tapHighlightController):
1751         * WebProcess/WebPage/WebPage.messages.in:
1752
1753 2012-01-25  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
1754
1755         [WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
1756         https://bugs.webkit.org/show_bug.cgi?id=63458
1757
1758         Reviewed by Adam Roben.
1759
1760         Implement the setPopupBlockingEnabled method.
1761
1762         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1763         (WKBundleSetPrivateBrowsingEnabled):
1764         (WKBundleSetPopupBlockingEnabled):
1765         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1766         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1767         (WebKit::InjectedBundle::setPopupBlockingEnabled):
1768         * WebProcess/InjectedBundle/InjectedBundle.h:
1769
1770 2012-01-25  Yael Aharon  <yael.aharon@nokia.com>
1771
1772         [Qt] Build fix when using force_static_libs_as_shared
1773         https://bugs.webkit.org/show_bug.cgi?id=76832
1774
1775         Reviewed by Simon Hausmann.
1776
1777         Add a dependency on QtWidgets.
1778
1779         * Target.pri:
1780
1781 2012-01-24  Sergio Villar Senin  <svillar@igalia.com>
1782
1783         [WK2] FindController should not assume that ports do not want to highlight text matches
1784         https://bugs.webkit.org/show_bug.cgi?id=76921
1785
1786         Reviewed by Darin Adler.
1787
1788         FindController must obey the FindOptionsShowHighlight flag instead
1789         of assuming that ports do not want to highlight search matches.
1790
1791         * Shared/API/c/WKFindOptions.h: added kWKFindOptionsShowHighlight.
1792         * Shared/API/c/WKSharedAPICast.h:
1793         (WebKit::toFindOptions): Ditto.
1794         * Shared/WebFindOptions.h: added FindOptionsShowHighlight.
1795         * WebProcess/WebPage/FindController.cpp:
1796         (WebKit::FindController::findString):
1797
1798 2012-01-25  Carlos Garcia Campos  <cgarcia@igalia.com>
1799
1800         [GTK] Page clients don't need to be GObjects anymore in WebKit2 GTK+ API
1801         https://bugs.webkit.org/show_bug.cgi?id=76899
1802
1803         Reviewed by Martin Robinson.
1804
1805         * UIProcess/API/gtk/WebKitLoaderClient.cpp: Renamed from
1806         Source/WebKit2/UIProcess/API/gtk/WebKitWebLoaderClient.cpp.
1807         (didStartProvisionalLoadForFrame): Use clientInfo instead fo
1808         getting the view from the page.
1809         (didReceiveServerRedirectForProvisionalLoadForFrame): Ditto.
1810         (didFailProvisionalLoadWithErrorForFrame): Ditto.
1811         (didCommitLoadForFrame): Ditto.
1812         (didFinishLoadForFrame): Ditto.
1813         (didFailLoadWithErrorForFrame): Ditto.
1814         (didSameDocumentNavigationForFrame): Ditto.
1815         (didReceiveTitleForFrame): Ditto.
1816         (didChangeProgress): Ditto.
1817         (didChangeBackForwardList): Ditto.
1818         (attachLoaderClientToView): Pass WebKitWebView as clientInfo to
1819         callbacks.
1820         * UIProcess/API/gtk/WebKitLoaderClient.h: Added.
1821         * UIProcess/API/gtk/WebKitUIClient.cpp:
1822         (createNewPage): Use clientInfo instead fo getting the view from
1823         the page.
1824         (showPage): Ditto.
1825         (closePage): Ditto.
1826         (runJavaScriptAlert): Ditto.
1827         (runJavaScriptConfirm): Ditto.
1828         (runJavaScriptPrompt): Ditto.
1829         (toolbarsAreVisible): Ditto.
1830         (setToolbarsAreVisible): Ditto.
1831         (menuBarIsVisible): Ditto.
1832         (setMenuBarIsVisible): Ditto.
1833         (statusBarIsVisible): Ditto.
1834         (setStatusBarIsVisible): Ditto.
1835         (isResizable): Ditto.
1836         (setIsResizable): Ditto.
1837         (getWindowFrame): Ditto.
1838         (setWindowFrame): Ditto.
1839         (attachUIClientToView): Pass WebKitWebView as clientInfo to
1840         callbacks.
1841         * UIProcess/API/gtk/WebKitUIClient.h: Remove GObject boilerplate.
1842         * UIProcess/API/gtk/WebKitWebLoaderClient.h: Removed.
1843         * UIProcess/API/gtk/WebKitWebView.cpp:
1844         (webkitWebViewConstructed): Remove UIClient and LoaderClient
1845         objects and call attachUIClientToView() and attachLoaderClientToView().
1846         * UIProcess/API/gtk/tests/GNUmakefile.am: Rename
1847         WebKitWebLoaderClient to WebKitLoaderClient.
1848         * UIProcess/API/gtk/tests/TestLoaderClient.cpp: Renamed from
1849         Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp.
1850
1851 2012-01-25  Roland Steiner  <rolandsteiner@chromium.org>
1852
1853         <style scoped>: Implement registering of <style scoped> with the scoping element
1854         https://bugs.webkit.org/show_bug.cgi?id=67790
1855
1856         Add symbols for windows.internals.numberOfScopedHTMLStyleChildren
1857
1858         Reviewed by Dimitri Glazkov.
1859
1860         * win/WebKit2.def:
1861         * win/WebKit2CFLite.def:
1862
1863 2012-01-24  Beth Dakin  <bdakin@apple.com>
1864
1865         https://bugs.webkit.org/show_bug.cgi?id=76928
1866         Accelerated drawing should force compositing mode
1867         -and corresponding-
1868         <rdar://problem/10697417>
1869
1870         Reviewed by Simon Fraser.
1871
1872         * WebProcess/WebPage/WebPage.cpp:
1873         (WebKit::WebPage::updatePreferences):
1874
1875 2012-01-24  Alexis Menard  <alexis.menard@openbossa.org>
1876
1877         Unreviewed build fix for Qt.
1878
1879         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1880         (WebKit::LayerTreeHostQt::showDebugBorders):
1881         (WebKit::LayerTreeHostQt::showRepaintCounter):
1882
1883 2012-01-23  Simon Fraser  <simon.fraser@apple.com>
1884
1885         Show layer borders for scrollbar layers
1886         https://bugs.webkit.org/show_bug.cgi?id=76888
1887
1888         Reviewed by Beth Dakin.
1889         
1890         Update for new signatures of GraphicsLayerClient::showDebugBorders()
1891         and GraphicsLayerClient::showRepaintCounter().
1892
1893         * UIProcess/LayerTreeHostProxy.h:
1894         (WebKit::LayerTreeHostProxy::showDebugBorders):
1895         (WebKit::LayerTreeHostProxy::showRepaintCounter):
1896         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
1897         (WebKit::LayerTreeHostCA::showDebugBorders):
1898         (WebKit::LayerTreeHostCA::showRepaintCounter):
1899         * WebProcess/WebPage/ca/LayerTreeHostCA.h:
1900         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
1901
1902 2012-01-24  David Levin  <levin@chromium.org>
1903
1904         [windows] Convert usage of GetDC to HWndDC Part 3.
1905         https://bugs.webkit.org/show_bug.cgi?id=76889
1906
1907         Reviewed by Adam Roben.
1908
1909         * UIProcess/win/WebPopupMenuProxyWin.cpp:
1910         (WebKit::WebPopupMenuProxyWin::paint): Fix a dc leak and use the dellayed allocation.
1911
1912 2012-01-24  Sergio Villar Senin  <svillar@igalia.com>
1913
1914         [WK2] [GTK] TestDownloads hitting an assertion in Debug builds
1915         https://bugs.webkit.org/show_bug.cgi?id=76915
1916
1917         Reviewed by Martin Robinson.
1918
1919         No new tests required as it fixes some assertions in a unit test.
1920
1921         * WebProcess/Downloads/soup/DownloadSoup.cpp:
1922         (WebKit::Download::start):
1923         (WebKit::Download::startWithHandle):
1924
1925 2012-01-24  No'am Rosenthal  <noam.rosenthal@nokia.com>
1926
1927         [Qt][WK2] Qt's cross-process AC copies images excessively when updating tiles.
1928         https://bugs.webkit.org/show_bug.cgi?id=76877
1929
1930         Reviewed by Kenneth Rohde Christiansen.
1931
1932         Instead of copying QImages, pass a reference to the ShareableBitmap that was originally
1933         created by the web process. Also, swizzle the image's RGB in the web process, before it's
1934         transferred to the UI process.
1935
1936         Data flow before change:
1937         (Web Process) Render to image -> IPC -> (UI Process) Copy (render queue) -> Copy Swizzled RGB -> Upload
1938
1939         Data flow after change:
1940         (Web Process) Render to image -> swizzle RGB -> IPC -> (UI Process) -> Upload
1941
1942         * Shared/ShareableBitmap.h:
1943         * Shared/qt/ShareableBitmapQt.cpp:
1944         (WebKit::ShareableBitmap::swizzleRGB):
1945         * UIProcess/LayerTreeHostProxy.h:
1946         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
1947         (WebKit::LayerTreeHostProxy::updateTile):
1948         (WebKit::LayerTreeHostProxy::createImage):
1949         (WebKit::LayerTreeHostProxy::syncRemoteContent):
1950         (WebKit::LayerTreeHostProxy::updateTileForLayer):
1951         (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
1952         (WebKit::LayerTreeHostProxy::purgeGLResources):
1953         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
1954         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
1955         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1956         (WebKit::LayerTreeHostQt::adoptImageBackingStore):
1957
1958 2012-01-24  Rafael Brandao  <rafael.lobo@openbossa.org>
1959
1960         [Qt][WK2] QtWebIconDatabaseClient leaves a dangling pointer on WebIconDatabase after its destruction
1961         https://bugs.webkit.org/show_bug.cgi?id=76399
1962
1963         Reviewed by Simon Hausmann.
1964
1965         Due a circular dependency between WebContext and WebProcessProxy, WebContext it not
1966         being destroyed, neither WebIconDatabase. As QtWebIconDatabaseClient's life time is the same
1967         as QtWebContext and this one is being destroyed, the remaining reference to our client
1968         on WebIconDatabase should be cleaned upon its destruction.
1969
1970         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
1971         (QtWebIconDatabaseClient::QtWebIconDatabaseClient):
1972         (QtWebIconDatabaseClient::~QtWebIconDatabaseClient): Clear client pointer on WebIconDatabase.
1973         * UIProcess/qt/QtWebIconDatabaseClient.h: Make this client hold a reference to WebIconDatabase.
1974
1975 2012-01-24  Zeno Albisser  <zeno@webkit.org>
1976
1977         [Qt][WK2] Add test for application URL schemes.
1978         https://bugs.webkit.org/show_bug.cgi?id=74933
1979
1980         Add a test that checks handling of url strings.
1981         Add a test that verifies replies in case of multiple
1982         available application url schemes.
1983
1984         Reviewed by Kenneth Rohde Christiansen.
1985
1986         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
1987
1988 2012-01-24  Carlos Garcia Campos  <cgarcia@igalia.com>
1989
1990         [GTK] Fix /webkit2/WebKitWebView/reload after r105688
1991         https://bugs.webkit.org/show_bug.cgi?id=76898
1992
1993         Reviewed by Alejandro G. Castro.
1994
1995         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
1996         (LoadTrackingTest::reload): Add reload method that clears events
1997         and initializes progress.
1998         * UIProcess/API/gtk/tests/LoadTrackingTest.h:
1999         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
2000         (testWebViewReload): Use LoadTrackingTest::reload() instead of
2001         webkit_web_view_reload().
2002
2003 2012-01-24  Simon Hausmann  <simon.hausmann@nokia.com>
2004
2005         Some qmake build files must include Qt5's "quick" module.
2006         https://bugs.webkit.org/show_bug.cgi?id=76671
2007
2008         Unreviewed build fix.
2009
2010         * UIProcess/API/qt/tests/tests.pri:
2011
2012 2012-01-24  Zeno Albisser  <zeno@webkit.org>
2013
2014         [Qt][WK2] Application URL schemes cause asserts when using debug.
2015         https://bugs.webkit.org/show_bug.cgi?id=76700
2016
2017         Instances of QtNetworkRequestData / QtNetworkReplyData are meant
2018         to be used for transfering data over IPC. To allow transferring
2019         instances of these classes over IPC they need to be copyable,
2020         and it must be possible to create such instances on the stack.
2021         Because classes that inherit from RefCounted always need to be
2022         used in connection with RefPtr, QtNetworkRequestData and
2023         QtNetworkReplyData cannot inherit directly from RefCounted.
2024
2025         Deleting an object that inherits from RefCounted, without
2026         the proper sequence of ref()/deref() being called by it's
2027         RefPtr, causes asserts when running a debug version.
2028
2029         Reviewed by Simon Hausmann.
2030
2031         * Shared/qt/QtNetworkReplyData.h:
2032         (WebKit::QtRefCountedNetworkReplyData::data):
2033         * Shared/qt/QtNetworkRequestData.cpp:
2034         (WebKit::QtRefCountedNetworkRequestData::QtRefCountedNetworkRequestData):
2035         * Shared/qt/QtNetworkRequestData.h:
2036         (WebKit::QtRefCountedNetworkRequestData::data):
2037         * Target.pri:
2038         * UIProcess/API/qt/qquicknetworkreply.cpp:
2039         (QQuickNetworkReply::QQuickNetworkReply):
2040         (QQuickNetworkReply::contentType):
2041         (QQuickNetworkReply::setContentType):
2042         (QQuickNetworkReply::operation):
2043         (QQuickNetworkReply::setOperation):
2044         (QQuickNetworkReply::contentDisposition):
2045         (QQuickNetworkReply::setContentDisposition):
2046         (QQuickNetworkReply::location):
2047         (QQuickNetworkReply::setLocation):
2048         (QQuickNetworkReply::lastModified):
2049         (QQuickNetworkReply::setLastModified):
2050         (QQuickNetworkReply::cookie):
2051         (QQuickNetworkReply::setCookie):
2052         (QQuickNetworkReply::userAgent):
2053         (QQuickNetworkReply::setUserAgent):
2054         (QQuickNetworkReply::server):
2055         (QQuickNetworkReply::setServer):
2056         (QQuickNetworkReply::data):
2057         (QQuickNetworkReply::setData):
2058         (QQuickNetworkReply::send):
2059         (QQuickNetworkReply::networkRequestData):
2060         (QQuickNetworkReply::setNetworkRequestData):
2061         (QQuickNetworkReply::networkReplyData):
2062         * UIProcess/API/qt/qquicknetworkreply_p.h:
2063         * UIProcess/API/qt/qquicknetworkrequest.cpp:
2064         (QQuickNetworkRequest::QQuickNetworkRequest):
2065         (QQuickNetworkRequest::setNetworkRequestData):
2066         (QQuickNetworkRequest::url):
2067         * UIProcess/API/qt/qquicknetworkrequest_p.h:
2068         * UIProcess/API/qt/qquickwebview.cpp:
2069         (QQuickWebViewExperimental::invokeApplicationSchemeHandler):
2070         * UIProcess/API/qt/qquickwebview_p.h:
2071         * UIProcess/WebPageProxy.h:
2072         * UIProcess/qt/QtPageClient.cpp:
2073         (QtPageClient::handleApplicationSchemeRequest):
2074         * UIProcess/qt/QtPageClient.h:
2075         * UIProcess/qt/WebPageProxyQt.cpp:
2076         (WebKit::WebPageProxy::resolveApplicationSchemeRequest):
2077         (WebKit::WebPageProxy::sendApplicationSchemeReply):
2078         * WebProcess/qt/QtNetworkReply.cpp:
2079         (WebKit::QtNetworkReply::setData):
2080         (WebKit::QtNetworkReply::readData):
2081
2082 2012-01-24  Carlos Garcia Campos  <cgarcia@igalia.com>
2083
2084         [GTK] Implement DownloadClient in WebKit2 GTK+ API
2085         https://bugs.webkit.org/show_bug.cgi?id=72952
2086
2087         Reviewed by Martin Robinson.
2088
2089         * GNUmakefile.am: Add new files to compilation.
2090         * UIProcess/API/gtk/WebKitDownloadClient.cpp: Added.
2091         (didStart): Call webkitWebContextDownloadStarted().
2092         (didReceiveResponse): Call webkitDownloadSetResponse() with the
2093         received response.
2094         (didReceiveData): Call webkitDownloadNotifyProgress().
2095         (decideDestinationWithSuggestedFilename): Call
2096         webkitDownloadDecideDestinationWithSuggestedFilename().
2097         (didCreateDestination): Call webkitDownloadDestinationCreated().
2098         (didFail): Call webkitDownloadFailed() or
2099         webkitDownloadCancelled() if the download was cancelled before
2100         failing.
2101         (didCancel): Call webkitDownloadCancelled().
2102         (didFinish): Call webkitDownloadFinished().
2103         (attachDownloadClientToContext): Add
2104         implementation for download client callbacks.
2105         * UIProcess/API/gtk/WebKitDownloadClient.h: Added.
2106         * UIProcess/API/gtk/WebKitError.cpp:
2107         (webkit_download_error_quark): Add quark for download errors.
2108         * UIProcess/API/gtk/WebKitError.h:
2109         * UIProcess/API/gtk/WebKitWebContext.cpp:
2110         (webkit_web_context_class_init): Add download-started signal.
2111         (createDefaultWebContext): Initialize the download client.
2112         (downloadsMap): HashMap containing download objects for all
2113         ongoing download operations.
2114         (webkit_web_context_download_uri): Start a new download for the
2115         given URI.
2116         (webkitWebContextGetOrCreateDownload): Helper function to create a
2117         new download object or return the existing one from the downloads map.
2118         (webkitWebContextRemoveDownload): Remove the download object from
2119         the downloads map.
2120         (webkitWebContextDownloadStarted): Emit
2121         WebKitWebContext::download-started for the given download object.
2122         * UIProcess/API/gtk/WebKitWebContext.h:
2123         * UIProcess/API/gtk/WebKitWebContextPrivate.h:
2124         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2125         * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for downloads.
2126         * UIProcess/API/gtk/tests/TestDownloads.cpp: Added.
2127         (getWebKit1TestResoucesDir):
2128         (testDownloadLocalFile):
2129         (testDownloadLocalFileError):
2130         (serverCallback):
2131         (testDownloadRemoteFile):
2132         (testDownloadRemoteFileError):
2133         (beforeAll):
2134         (afterAll):
2135
2136 2012-01-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2137
2138         [GTK] Add WebKitDownload to WebKit2 GTK+ API
2139         https://bugs.webkit.org/show_bug.cgi?id=72949
2140
2141         Reviewed by Martin Robinson.
2142
2143         * GNUmakefile.am: Add new files to compilation.
2144         * UIProcess/API/gtk/WebKitDownload.cpp: Added.
2145         (webkitDownloadFinalize):
2146         (webkitDownloadGetProperty):
2147         (webkitDownloadDecideDestination):
2148         (webkit_download_init):
2149         (webkit_download_class_init):
2150         (webkitDownloadCreate): Create a new WebKitDownload for a given
2151         WKDownloadRef.
2152         (webkitDownloadSetResponse): Set the network response of the
2153         download.
2154         (webkitDownloadIsCancelled): Whether the download has been
2155         cancelled by the user.
2156         (webkitDownloadNotifyProgress): Emit notify::estimated-progress if
2157         needed.
2158         (webkitDownloadFailed): Emit WebKitDownload::failed with the given
2159         error.
2160         (webkitDownloadCancelled): Emit WebKitDownload::failed with
2161         cancelled error.
2162         (webkitDownloadFinished): Emit WebKitDownload::finished.
2163         (webkitDownloadDecideDestinationWithSuggestedFilename): Emit
2164         WebKitDownload::decide-destination.
2165         (webkitDownloadDestinationCreated): Emit
2166         WebKitDownload::created-destination.
2167         (webkit_download_get_destination): Return the destination URI of
2168         the download.
2169         (webkit_download_set_destination): Set the destination URI of the
2170         download.
2171         (webkit_download_get_response): Return the response received by
2172         the server.
2173         (webkit_download_cancel): Cancel the download.
2174         (webkit_download_get_estimated_progress): Return the estimated
2175         progress.
2176         (webkit_download_get_elapsed_time): Return the time elapsed since
2177         the download started.
2178         * UIProcess/API/gtk/WebKitDownload.h: Added.
2179         * UIProcess/API/gtk/WebKitDownloadPrivate.h: Added.
2180         * UIProcess/API/gtk/WebKitPrivate.h:
2181         * UIProcess/API/gtk/WebKitURIResponse.cpp:
2182         (webkitURIResponseGetResourceResponse):
2183         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2184         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
2185         webkit_download_get_type().
2186         * UIProcess/API/gtk/webkit2.h: Include WebKitDownload.h.
2187         * UIProcess/API/gtk/webkit2marshal.list:
2188
2189 2012-01-23  Geoffrey Garen  <ggaren@apple.com>
2190
2191         JSValue::toString() should return a JSString* instead of a UString
2192         https://bugs.webkit.org/show_bug.cgi?id=76861
2193
2194         Reviewed by Gavin Barraclough.
2195
2196         Mechanical changes to call value() after calling toString(), to
2197         convert from "JS string" (JSString*) to "C++ string" (UString), since
2198         toString() no longer returns a "C++ string".
2199
2200         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2201         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
2202
2203 2012-01-23  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2204
2205         [Qt][WK2] QQuickWebView is initializing touch mode twice while being constructed
2206         https://bugs.webkit.org/show_bug.cgi?id=76859
2207
2208         Reviewed by Kenneth Rohde Christiansen.
2209
2210         Removing d->initializeTouch() from QQuickWebView::QQuickWebView()
2211         since in QQuickWebViewPrivate::initialize() there is a call for
2212         setUseTraditionalDesktopBehaviour(false), which will call initializeTouch.
2213
2214         * UIProcess/API/qt/qquickwebview.cpp:
2215         (QQuickWebView::QQuickWebView):
2216
2217 2012-01-23  Martin Robinson  <mrobinson@igalia.com>
2218
2219         [GTK][WK2] Make the LoadTracking and WebView test fixtures more flexible
2220         https://bugs.webkit.org/show_bug.cgi?id=76755
2221
2222         Reviewed by Alejandro G. Castro.
2223
2224         Always clear the loading events when loading new content in the load tracking
2225         test. In the WebView test correctly handle loading HTML with a URL that isn't
2226         "about:blank."
2227
2228         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
2229         (LoadTrackingTest::loadURI): Reset the class state when starting a new load.
2230         (LoadTrackingTest::loadHtml): Ditto.
2231         (LoadTrackingTest::loadPlainText): Ditto.
2232         (LoadTrackingTest::loadRequest): Ditto.
2233         * UIProcess/API/gtk/tests/LoadTrackingTest.h: Added new method definitions.
2234         * UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp:
2235         (assertNormalLoadHappened): No longer clear loading events. The fixture handles that now.
2236         (testLoadHtml): Update to reflect new method name.
2237         (testLoadPlainText): Ditto.
2238         (testLoadRequest): Ditto.
2239         (testWebViewReload): Ditto.
2240         * UIProcess/API/gtk/tests/WebViewTest.cpp:
2241         (WebViewTest::loadHtml): Properly interpret the baseURL parameter.
2242         * UIProcess/API/gtk/tests/WebViewTest.h: Make loading methods virtual.
2243
2244 2012-01-23  Alexander Færøy  <alexander.faeroy@nokia.com>
2245
2246         [Qt] Implement SSL error handling QML API.
2247         https://bugs.webkit.org/show_bug.cgi?id=76793
2248
2249         Reviewed by Simon Hausmann.
2250
2251         This patch implements support for accepting or rejecting invalid SSL
2252         certificates from the QML API.
2253
2254         * UIProcess/API/qt/qquickwebview.cpp:
2255         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2256         (QQuickWebViewPrivate::handleCertificateVerificationRequest):
2257         (QQuickWebViewExperimental::certificateVerificationDialog):
2258         (QQuickWebViewExperimental::setCertificateVerificationDialog):
2259         * UIProcess/API/qt/qquickwebview_p.h:
2260         * UIProcess/API/qt/qquickwebview_p_p.h:
2261         * UIProcess/PageClient.h:
2262         * UIProcess/WebPageProxy.cpp:
2263         (WebKit::WebPageProxy::certificateVerificationRequest):
2264         * UIProcess/WebPageProxy.h:
2265         * UIProcess/WebPageProxy.messages.in:
2266         * UIProcess/qt/QtDialogRunner.cpp:
2267         (CertificateVerificationDialogContextObject::CertificateVerificationDialogContextObject):
2268         (CertificateVerificationDialogContextObject::hostname):
2269         (CertificateVerificationDialogContextObject::accept):
2270         (CertificateVerificationDialogContextObject::reject):
2271         (QtDialogRunner::initForCertificateVerification):
2272         * UIProcess/qt/QtDialogRunner.h:
2273         * UIProcess/qt/QtPageClient.cpp:
2274         (QtPageClient::handleCertificateVerificationRequest):
2275         * UIProcess/qt/QtPageClient.h:
2276         * WebProcess/qt/QtNetworkAccessManager.cpp:
2277         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
2278         (WebKit::QtNetworkAccessManager::onSslErrors):
2279         * WebProcess/qt/QtNetworkAccessManager.h:
2280
2281 2012-01-23  David Levin  <levin@chromium.org>
2282
2283         [windows] Convert usages of GetDC to HWndDC Part 2.
2284         https://bugs.webkit.org/show_bug.cgi?id=76750
2285
2286         Reviewed by Adam Roben.
2287
2288         * Shared/win/ShareableBitmapWin.cpp:
2289         (WebKit::ShareableBitmap::windowsContext): Fix incorrect usage of OwnPtr<HDC> which
2290         would do a DeleteDC instead of a ReleaseDC.
2291
2292 2012-01-23  David Levin  <levin@chromium.org>
2293
2294         [windows] Convert usages of GetDC to HWndDC Part 1.
2295         https://bugs.webkit.org/show_bug.cgi?id=76744
2296
2297         Reviewed by Adam Roben.
2298
2299         * UIProcess/win/WebView.cpp:
2300         (WebKit::WebView::flashBackingStoreUpdates): Typical conversion.
2301
2302 2012-01-21  Timothy Hatcher  <timothy@apple.com>
2303
2304         Make WebKit2 remember the height of the Web Inspector when it is docked.
2305
2306         https://webkit.org/b/76769
2307
2308         Reviewed by Dan Bernstein.
2309
2310         * Shared/WebPreferencesStore.h: Added InspectorAttachedHeight.
2311         * UIProcess/WebInspectorProxy.cpp:
2312         (WebKit::WebInspectorProxy::setAttachedWindowHeight): Call WebPreferencesStore::setInspectorAttachedHeight.
2313         * UIProcess/mac/WebInspectorProxyMac.mm:
2314         (WebKit::WebInspectorProxy::platformAttach): Set the height of the inspector's WKView to inspectorAttachedHeight.
2315         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Remove unneeded setNeedsDisplay: calls.
2316
2317 2012-01-20  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2318
2319         [Qt] [WK2] Division by zero error in QtViewportInteractionEngine::setItemRectVisible
2320         https://bugs.webkit.org/show_bug.cgi?id=76674
2321
2322         Reviewed by Kenneth Rohde Christiansen.
2323
2324         Make sure that itemRect is not empty.
2325
2326         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2327         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
2328
2329 2012-01-20  Steve Falkenburg  <sfalken@apple.com>
2330
2331         Reviewed by Alexey Proskuryakov.
2332
2333         Drag/drop of a file into a WebView on Windows needs to allow access to that file
2334         https://bugs.webkit.org/show_bug.cgi?id=76753
2335         <rdar://problem/10731719>
2336         
2337         The Windows drag/drop code path was missing the code to open a file read exception.
2338
2339         Added code to match the Mac version, while allowing directories and multiple files to
2340         also be dragged (matching our previous behavior).
2341
2342         * UIProcess/win/WebView.cpp:
2343         (WebKit::maybeCreateSandboxExtensionFromDragData): Added.
2344         (WebKit::WebView::Drop): Add a universal read exception if we're dragging a file into a WebView to open it.
2345
2346 2012-01-20  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2347
2348         [Qt] Trigger forcing accelerated compositing from the UI process side.
2349         https://bugs.webkit.org/show_bug.cgi?id=76296
2350
2351         Reviewed by Noam Rosenthal.
2352
2353         Some messages can be sent from the web view to the LayerTreeHost before
2354         accelerated compositing is entered on the web process and signaled back.
2355         By letting the UI process decide if AC has to be forced, we can create
2356         the LayerTreeHostProxy earlier to send messages to the web process while
2357         AC is being entered there.
2358
2359         This patch also fixes the flow of DidRenderFrame and RenderNextFrame messages
2360         by setting the m_waitingForUIProcess flag properly and only send the
2361         RenderNextFrame once the painting thread on the UI process is ready to paint.
2362
2363         This fixes the first visible content rect message not being received when
2364         loading pages from the disk.
2365
2366         * Shared/WebPreferencesStore.h:
2367         * UIProcess/API/qt/qquickwebview.cpp:
2368         (QQuickWebViewPrivate::initialize):
2369         * UIProcess/DrawingAreaProxyImpl.cpp:
2370         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2371         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2372         (WebKit::LayerTreeHostProxy::flushLayerChanges):
2373         (WebKit::LayerTreeHostProxy::didRenderFrame):
2374         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2375         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2376         * WebProcess/WebPage/WebPage.cpp:
2377         (WebKit::WebPage::updatePreferences):
2378         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2379         (WebKit::LayerTreeHostQt::performScheduledLayerFlush):
2380         * WebProcess/WebPage/qt/WebPageQt.cpp:
2381         (WebKit::WebPage::platformInitialize):
2382
2383 2012-01-20  Sheriff Bot  <webkit.review.bot@gmail.com>
2384
2385         Unreviewed, rolling out r105497.
2386         http://trac.webkit.org/changeset/105497
2387         https://bugs.webkit.org/show_bug.cgi?id=76696
2388
2389         Leaking in Qt layout tests and timing out in GTK API tests.
2390         (Requested by jturcotte on #webkit).
2391
2392         * Shared/WebPreferencesStore.h:
2393         * UIProcess/API/qt/qquickwebview.cpp:
2394         (QQuickWebViewPrivate::initialize):
2395         * UIProcess/DrawingAreaProxyImpl.cpp:
2396         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2397         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2398         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2399         * WebProcess/WebPage/WebPage.cpp:
2400         (WebKit::WebPage::updatePreferences):
2401         * WebProcess/WebPage/qt/WebPageQt.cpp:
2402         (WebKit::WebPage::platformInitialize):
2403
2404 2012-01-20  Mario Sanchez Prada  <msanchez@igalia.com>
2405
2406         [GTK] Expose accessibility hierarchy in WebKit2 to ATK/AT-SPI based ATs
2407         https://bugs.webkit.org/show_bug.cgi?id=72589
2408
2409         Reviewed by Martin Robinson.
2410
2411         Expose the accessibility hierarchy in the multi-process
2412         architecture of WK2 through AtkSocket and AtkPlug.
2413
2414         Make the WebView widget return an AtkSocket when calling to
2415         gtk_widget_get_accessible().
2416
2417         * GNUmakefile.am: Add new files.
2418         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2419         (webkit_web_view_base_init):
2420         (webkitWebViewBaseGetAccessible):
2421         (webkit_web_view_base_class_init):
2422         * UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Added.
2423         (webkitWebViewBaseAccessibleWidgetFinalize):
2424         (webkitWebViewBaseAccessibleWidgetDestroyed):
2425         (webkitWebViewBaseAccessibleInitialize):
2426         (webkitWebViewBaseAccessibleRefStateSet):
2427         (webkitWebViewBaseAccessibleGetIndexInParent):
2428         (webkit_web_view_base_accessible_init):
2429         (webkit_web_view_base_accessible_class_init):
2430         (webkitWebViewBaseAccessibleNew):
2431         * UIProcess/API/gtk/WebKitWebViewBaseAccessible.h: Added.
2432
2433         Make the WebPage create an AtkPlug on its initialization and
2434         sending the ID of that plug to the UI process, so it can embed the
2435         plug in the socket.
2436
2437         Also, take care of all the needed wrapping around the WebCore's
2438         accessibility objects, exposing them in the UI process's
2439         accessibility hierarchy thanks to the socket-plug connection.
2440
2441         * UIProcess/WebPageProxy.h:
2442         (WebKit::WebPageProxy::accessibilityPlugID):
2443         * UIProcess/WebPageProxy.messages.in:
2444         * UIProcess/gtk/WebPageProxyGtk.cpp:
2445         (WebKit::WebPageProxy::bindAccessibilityTree):
2446         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2447         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
2448         * WebProcess/WebPage/WebPage.cpp:
2449         (WebKit::WebPage::WebPage):
2450         * WebProcess/WebPage/gtk/WebPageAccessibilityObject.cpp: Added.
2451         (accessibilityRootObjectWrapper):
2452         (webPageAccessibilityObjectInitialize):
2453         (webPageAccessibilityObjectGetIndexInParent):
2454         (webPageAccessibilityObjectGetNChildren):
2455         (webPageAccessibilityObjectRefChild):
2456         (web_page_accessibility_object_init):
2457         (web_page_accessibility_object_class_init):
2458         (webPageAccessibilityObjectNew):
2459         (webPageAccessibilityObjectRefresh):
2460         * WebProcess/WebPage/gtk/WebPageAccessibilityObject.h: Added.
2461         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
2462         (WebKit::WebPage::platformInitialize):
2463         (WebKit::WebPage::updateAccessibilityTree):
2464
2465         New unit test for checking accessibility support in WK2GTK.
2466
2467         * UIProcess/API/gtk/tests/AccessibilityTestServer.cpp: Added.
2468         (loadChangedCallback): Notify the parent process (the test)
2469         when ready.
2470         (main):
2471         * UIProcess/API/gtk/tests/GNUmakefile.am:
2472         * UIProcess/API/gtk/tests/TestWebKitAccessibility.cpp: Added.
2473         (stopTestServer):
2474         (sigAbortHandler):
2475         (testServerMonitorThreadFunc):
2476         (startTestServerMonitor):
2477         (startTestServer):
2478         (checkAtspiAccessible):
2479         (findTestServerApplication):
2480         (testAtspiBasicHierarchy):
2481         (beforeAll):
2482         (afterAll):
2483
2484 2012-01-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2485
2486         [Qt] Public API watch dog auto test.
2487         https://bugs.webkit.org/show_bug.cgi?id=73922
2488
2489         Reviewed by Simon Hausmann.
2490
2491         This test aims to prevent unintended/unapproved
2492         modifications to the public QML API.
2493
2494         * UIProcess/API/qt/tests/publicapi/publicapi.pro: Added.
2495         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: Added.
2496         (isCheckedEnum):
2497         (isCheckedClass):
2498         (checkKnownType):
2499         (gatherAPI):
2500         (tst_publicapi::publicAPI):
2501
2502 2012-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2503
2504         [Qt] Trigger forcing accelerated compositing from the UI process side.
2505         https://bugs.webkit.org/show_bug.cgi?id=76296
2506
2507         Reviewed by Noam Rosenthal.
2508
2509         Some messages can be sent from the web view to the LayerTreeHost before
2510         accelerated compositing is entered on the web process and signaled back.
2511         By letting the UI process decide if AC has to be forced, we can create
2512         the LayerTreeHostProxy earlier to send messages to the web process while
2513         AC is being entered there.
2514
2515         This fixes the first visible content rect message not being received when
2516         loading pages from the disk.
2517
2518         * Shared/WebPreferencesStore.h:
2519         * UIProcess/API/qt/qquickwebview.cpp:
2520         (QQuickWebViewPrivate::initialize):
2521         * UIProcess/DrawingAreaProxyImpl.cpp:
2522         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2523         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2524         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2525         * WebProcess/WebPage/WebPage.cpp:
2526         (WebKit::WebPage::updatePreferences):
2527         * WebProcess/WebPage/qt/WebPageQt.cpp:
2528         (WebKit::WebPage::platformInitialize):
2529
2530 2012-01-20  Alexandru Chiculita  <achicu@adobe.com>
2531
2532         CSS Shaders: Add a Settings flag to enable/disable CSS Shaders at runtime
2533         https://bugs.webkit.org/show_bug.cgi?id=76444
2534
2535         Reviewed by Nikolas Zimmermann.
2536
2537         * Shared/WebPreferencesStore.h:
2538         * UIProcess/API/C/WKPreferences.cpp:
2539         (WKPreferencesSetCSSCustomFilterEnabled):
2540         (WKPreferencesGetCSSCustomFilterEnabled):
2541         * UIProcess/API/C/WKPreferencesPrivate.h:
2542         * WebProcess/WebPage/WebPage.cpp:
2543         (WebKit::WebPage::updatePreferences):
2544
2545 2012-01-19  Sam Weinig  <sam@webkit.org>
2546
2547         Replace improper #import with an #include.
2548
2549         * UIProcess/Plugins/PluginProcessProxy.cpp:
2550         Fixes warnings.
2551
2552 2012-01-18  Sam Weinig  <sam@webkit.org>
2553
2554         Move RunLoop to WebCore/platform
2555         https://bugs.webkit.org/show_bug.cgi?id=76471
2556
2557         Reviewed by Anders Carlsson.
2558
2559         * GNUmakefile.am:
2560         * Platform/CoreIPC/Connection.cpp:
2561         * Platform/CoreIPC/Connection.h:
2562         * Platform/CoreIPC/mac/ConnectionMac.cpp:
2563         * PluginProcess/PluginControllerProxy.h:
2564         * PluginProcess/PluginProcess.cpp:
2565         * PluginProcess/PluginProcess.h:
2566         * PluginProcess/WebProcessConnection.cpp:
2567         * PluginProcess/mac/PluginProcessMainMac.mm:
2568         * PluginProcess/qt/PluginProcessMainQt.cpp:
2569         * Shared/ChildProcess.cpp:
2570         * Shared/ChildProcess.h:
2571         * Target.pri:
2572         * UIProcess/API/mac/FindIndicatorWindow.h:
2573         * UIProcess/API/mac/WKView.mm:
2574         * UIProcess/DrawingAreaProxyImpl.h:
2575         * UIProcess/Launcher/ThreadLauncher.cpp:
2576         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2577         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2578         * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
2579         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2580         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
2581         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
2582         * UIProcess/Launcher/win/ThreadLauncherWin.cpp:
2583         * UIProcess/LayerTreeHostProxy.h:
2584         * UIProcess/Plugins/PluginProcessProxy.cpp:
2585         * UIProcess/ResponsivenessTimer.cpp:
2586         * UIProcess/ResponsivenessTimer.h:
2587         * UIProcess/TiledDrawingAreaProxy.h:
2588         * UIProcess/VisitedLinkProvider.h:
2589         * UIProcess/WebConnectionToWebProcess.cpp:
2590         * UIProcess/WebConnectionToWebProcess.h:
2591         * UIProcess/WebContext.cpp:
2592         * UIProcess/win/WebView.cpp:
2593         * WebKit2.xcodeproj/project.pbxproj:
2594         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
2595         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2596         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2597         * WebProcess/Plugins/PluginView.h:
2598         * WebProcess/WebConnectionToUIProcess.cpp:
2599         * WebProcess/WebConnectionToUIProcess.h:
2600         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
2601         * WebProcess/WebPage/DrawingAreaImpl.h:
2602         * WebProcess/WebPage/EventDispatcher.cpp:
2603         * WebProcess/WebPage/PageOverlay.h:
2604         * WebProcess/WebPage/WebPage.cpp:
2605         * WebProcess/WebPage/WebPage.h:
2606         * WebProcess/WebProcess.cpp:
2607         * WebProcess/WebProcess.h:
2608         (WebKit::WebProcess::runLoop):
2609         * WebProcess/gtk/WebProcessMainGtk.cpp:
2610         * WebProcess/mac/WebProcessMainMac.mm:
2611         * WebProcess/qt/WebProcessMainQt.cpp:
2612         * WebProcess/win/WebProcessMainWin.cpp:
2613         * win/WebKit2.vcproj:
2614         Remove RunLoop code and update #includes.
2615
2616 2012-01-18  Ada Chan  <adachan@apple.com>
2617
2618         Need a WebKit2 API for setting media volume
2619         https://bugs.webkit.org/show_bug.cgi?id=76560
2620
2621         Reviewed by Dan Bernstein.
2622
2623         * Shared/WebPageCreationParameters.cpp:
2624         (WebKit::WebPageCreationParameters::encode): Encode the mediaVolume parameter.
2625         (WebKit::WebPageCreationParameters::decode): Decode the mediaVolume parameter.
2626         * Shared/WebPageCreationParameters.h:
2627         * UIProcess/API/C/WKPage.cpp:
2628         (WKPageSetMediaVolume): Call WebPageProxy::setMediaVolume().
2629         * UIProcess/API/C/WKPagePrivate.h:
2630         * UIProcess/WebPageProxy.cpp:
2631         (WebKit::WebPageProxy::WebPageProxy): Initialize new data member m_mediaVolume.
2632         (WebKit::WebPageProxy::setMediaVolume): Bail if the volume hasn't changed. Update m_mediaVolume 
2633         and bail if the page is no longer valid.  Otherwise, send a WebPage::SetMediaVolume message to 
2634         the web process.
2635         (WebKit::WebPageProxy::creationParameters): Add media volume to the creation parameters.
2636         * UIProcess/WebPageProxy.h:
2637         * WebProcess/WebPage/WebPage.cpp:
2638         (WebKit::WebPage::WebPage): Initialize media volume from the WebPageCreationParameters.
2639         (WebKit::WebPage::setMediaVolume): Call Page::setMediaVolume().
2640         * WebProcess/WebPage/WebPage.h:
2641         * WebProcess/WebPage/WebPage.messages.in: Add the SetMediaVolume message.
2642
2643 2012-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2644
2645         [GTK] WebKit2 GTK+ API public headers are not installed
2646         https://bugs.webkit.org/show_bug.cgi?id=76626
2647
2648         Reviewed by Martin Robinson.
2649
2650         * GNUmakefile.am: Rename webkit2gtk_headers as
2651         libwebkit2gtkinclude_HEADERS to match libwebkit2gtkincludedir so
2652         that headers are installed during make install.
2653
2654 2012-01-19  Carlos Garcia Campos  <cgarcia@igalia.com>
2655
2656         [GTK] Add print-backgrounds setting to WebKit2 GTK+ API
2657         https://bugs.webkit.org/show_bug.cgi?id=76616
2658
2659         Reviewed by Martin Robinson.
2660
2661         * UIProcess/API/gtk/WebKitSettings.cpp:
2662         (webKitSettingsSetProperty):
2663         (webKitSettingsGetProperty):
2664         (webkit_settings_class_init):
2665         (webkit_settings_get_print_backgrounds):
2666         (webkit_settings_set_print_backgrounds):
2667         * UIProcess/API/gtk/WebKitSettings.h:
2668         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2669         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2670         (testWebKitSettings):
2671
2672 2012-01-18  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2673
2674         [Qt] Handle the layers visible rect calculation on the web process.
2675         https://bugs.webkit.org/show_bug.cgi?id=74720
2676
2677         Reviewed by Noam Rosenthal.
2678
2679         The layers now get their visible rect on the web process through the
2680         root layer when the UI process call setVisibleContentRectAndScale,
2681         previously only used for the non-composited content layer.
2682         The rect is then carried down the layers in the tree which apply it the inverse
2683         of their transform before handing it to their tiled backing store.
2684
2685         This ensures that new layers get a proper visible rect right on creation,
2686         and also that simultaneous visible rect and scale changes are applied synchronously.
2687
2688         This patch also uses clampedBoundsOfProjectedQuad instead of mapRect
2689         to transform the visible rect correctly for 3D transformed layers.
2690
2691         * UIProcess/API/qt/qquickwebview.cpp:
2692         (QQuickWebViewPrivate::initializeDesktop):
2693         (QQuickWebViewPrivate::initializeTouch):
2694         (QQuickWebViewPrivate::updateDesktopViewportSize):
2695         (QQuickWebViewPrivate::updateTouchViewportSize):
2696         (QQuickWebView::geometryChanged):
2697         Make sure that the visible rect is updated for the desktop view as well.
2698         * UIProcess/API/qt/qquickwebview_p_p.h:
2699         * UIProcess/LayerTreeHostProxy.h:
2700         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2701         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
2702         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2703         (WebCore::WebGraphicsLayer::setChildren):
2704         (WebCore::WebGraphicsLayer::addChild):
2705         (WebCore::WebGraphicsLayer::addChildAtIndex):
2706         (WebCore::WebGraphicsLayer::addChildAbove):
2707         (WebCore::WebGraphicsLayer::addChildBelow):
2708         (WebCore::WebGraphicsLayer::replaceChild):
2709         (WebCore::WebGraphicsLayer::setMaskLayer):
2710         (WebCore::WebGraphicsLayer::syncCompositingState):
2711         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
2712         (WebCore::WebGraphicsLayer::setVisibleContentRectAndScale):
2713         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
2714         (WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
2715         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
2716         * WebProcess/WebPage/LayerTreeHost.messages.in:
2717         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2718         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
2719         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
2720
2721 2012-01-18  Jon Lee  <jonlee@apple.com>
2722
2723         Another build fix for r105364.
2724
2725         * WebProcess/mac/WebProcessMac.mm:
2726         (WebKit::WebProcess::platformInitializeWebProcess): Missing #if.
2727
2728 2012-01-18  Jon Lee  <jonlee@apple.com>
2729
2730         Build fix for r105364. Unreviewed.
2731
2732         * WebProcess/Notifications/WebNotificationManager.cpp: Wrap methods in #if ENABLE(NOTIFICATIONS)
2733         (WebKit::WebNotificationManager::initialize):
2734         (WebKit::WebNotificationManager::didUpdateNotificationDecision):
2735         (WebKit::WebNotificationManager::didRemoveNotificationDecisions):
2736         (WebKit::WebNotificationManager::policyForOrigin):
2737
2738 2012-01-18  Jon Lee  <jonlee@apple.com>
2739
2740         [WK2] Sync call for notifications permissions causes flashes on gmail.com
2741         https://bugs.webkit.org/show_bug.cgi?id=76570
2742         <rdar://problem/10647155>
2743
2744         Reviewed by Anders Carlsson and Sam Weinig.
2745
2746         The website code figures out the permission level for its security origin by making a JS call (called
2747         checkPermission()) that is synchronous. The way this was implemented was to make a synchronous call from
2748         the WebNotificationManager to its proxy. That call goes to the WK API layer to find the policy, and
2749         returns that policy back to the JS.
2750
2751         The synchronous nature of this call causes the white flash to appear in certain cases.
2752
2753         To fix this, the checkPermission() call is handled all within the web process, instead of going up into
2754         the UI process. To do this, the web process initializes the WebNotificationManager with a copy of the
2755         notification permissions. Any time the WK client makes a change to the permissions, that gets sent down
2756         asynchronously, and the cached copy in WebNotificationManager gets updated.
2757
2758         A page's settings may disable notifications altogether. Before, this would have been handled by the WK
2759         client, since retrieving the permissions were also handled there. Now that the lookup happens in the web
2760         process, we need to add that setting in WebCore.
2761
2762         == Update notification permissions to use the security origin's string representation, rather than its
2763         database identifier.
2764
2765         * UIProcess/Notifications/WebNotification.cpp:
2766         (WebKit::WebNotification::WebNotification):
2767         * UIProcess/Notifications/WebNotification.h:
2768         (WebKit::WebNotification::create):
2769         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2770         (WebKit::WebNotificationManagerProxy::show): Registering the provider with the manager is handled in
2771         initialize() now.
2772         (WebKit::WebNotificationManagerProxy::cancel): Registering the provider with the manager is handled in
2773         initialize() now.
2774         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2775         * UIProcess/WebPageProxy.cpp:
2776         (WebKit::WebPageProxy::requestNotificationPermission):
2777         (WebKit::WebPageProxy::showNotification):
2778         * UIProcess/WebPageProxy.h:
2779
2780         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2781         (WebKit::NotificationPermissionRequestManager::startRequest): Only start the request if notifications
2782         are enabled.
2783         * WebProcess/Notifications/WebNotificationManager.cpp:
2784         (WebKit::WebNotificationManager::show): Only show notification is they are enabled.
2785         (WebKit::WebNotificationManager::cancel): Only cancel if notifications are enabled.
2786
2787         == Remove synchronous message to get policy for a given origin. Instead, use the cached copy in
2788         WebNotificationManager.
2789
2790         * WebProcess/Notifications/WebNotificationManager.h:
2791         * WebProcess/Notifications/WebNotificationManager.cpp:
2792         (WebKit::WebNotificationManager::policyForOrigin): Looks for the permission in the cached copy.
2793         If it doesn't exist, return NotificationPresenter::PermissionNotAllowed.
2794         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2795         (WebKit::NotificationPermissionRequestManager::permissionLevel): Update permissionLevel to use
2796         policyForOrigin().
2797
2798         Remove old WK API function to get the policy. Because this function was the only synchronous message,
2799         we remove the sync-message-related functions also. Also, add in some #includes that might have been
2800         omitted in prior patches.
2801
2802         * UIProcess/API/C/WKNotificationProvider.h:
2803         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Remove NotificationPermissionLevel.
2804         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2805         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2806
2807         * UIProcess/Notifications/WebNotificationProvider.h: Remove policyForNotificationPermissionAtOrigin().
2808         * UIProcess/Notifications/WebNotificationProvider.cpp:
2809
2810         * UIProcess/WebProcessProxy.cpp:
2811         (WebKit::WebProcessProxy::didReceiveSyncMessage): Remove conditional to forward sync messages to the
2812         notification manager proxy.
2813
2814         == Mechanism for client to update the permissions copy in WebNotificationManager.
2815
2816         * WebProcess/Notifications/WebNotificationManager.messages.in: Add new messages
2817         didUpdateNotificationDecision and didRemoveNotificationDecisions.
2818         * WebProcess/Notifications/WebNotificationManager.h:
2819         * WebProcess/Notifications/WebNotificationManager.cpp:
2820         (WebKit::WebNotificationManager::initialize):
2821         (WebKit::WebNotificationManager::didUpdateNotificationDecision): Update the entry.
2822         (WebKit::WebNotificationManager::didRemoveNotificationDecisions): Remove the entry.
2823
2824         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2825         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2826         (WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
2827         (WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies): Convert the array of
2828         origins to remove, and send it to the WebNotificationManager.
2829
2830         * UIProcess/API/C/WKNotificationManager.h: Expose these update functions as WK API.
2831         * UIProcess/API/C/WKNotificationManager.cpp:
2832         (WKNotificationManagerProviderDidUpdateNotificationPolicy):
2833         (WKNotificationManagerProviderDidRemoveNotificationPolicies):
2834
2835         == Initialize WebNotificationManager with permissions. Initialize WebPage with notifications enabled bit
2836         from settings.
2837
2838         * Shared/WebProcessCreationParameters.h: Add map of notification permissions as part of the
2839         parameters.
2840         * Shared/WebProcessCreationParameters.cpp:
2841         (WebKit::WebProcessCreationParameters::encode):
2842         (WebKit::WebProcessCreationParameters::decode):
2843
2844         * UIProcess/Notifications/WebNotificationProvider.h: Retrieve copy of existing notification permissions.
2845         * UIProcess/Notifications/WebNotificationProvider.cpp:
2846         * UIProcess/API/C/WKNotificationProvider.h: Add WK API to get a copy of the permissions.
2847
2848         * UIProcess/Notifications/WebNotificationManagerProxy.h: Add populateCopyOfNotificationPermissions().
2849         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2850         (WebKit::WebNotificationManagerProxy::initializeProvider): Add the manager at the time of initialization.
2851         Similar calls in show() and cancel() are removed in following patch.
2852         (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions): Clear the existing copy.
2853         Populate with origin string, and whether that origin is allowed to post. If no decision has been made
2854         by the user, then there should be no item in this dictionary.
2855
2856         * UIProcess/WebContext.cpp:
2857         (WebKit::WebContext::ensureWebProcess): When the web process is initialized, we get a copy of the
2858         permissions, and send it to the web process to initialize the notification manager.
2859         * WebProcess/mac/WebProcessMac.mm:
2860         (WebKit::WebProcess::platformInitializeWebProcess): Initialize the notification manager.
2861
2862         * WebProcess/Notifications/WebNotificationManager.h:
2863         * WebProcess/Notifications/WebNotificationManager.cpp:
2864         (WebKit::WebNotificationManager::initialize): Initialize the permissions copy.
2865
2866         * WebProcess/WebPage/WebPage.cpp:
2867         (WebKit::WebPage::updatePreferences): Set notifications enabled bit from settings.
2868
2869         == Expose toString() method from WebCore::SecurityOrigin. Work is also towards bug 74956.
2870
2871         * Shared/API/c/WKSecurityOrigin.h: Refactor WKSecurityOriginCreateFromIdentifier to
2872         WKSecurityOriginCreateFromDatabaseIdentifier and add WKSecurityOriginCreateFromString function.
2873         * Shared/API/c/WKSecurityOrigin.cpp:
2874         (WKSecurityOriginCreateFromString):
2875         (WKSecurityOriginCreateFromDatabaseIdentifier):
2876         (WKSecurityOriginCopyToString):
2877
2878         Refactor WebSecurityOrigin::create() to WebSecurityOrigin::createFromDatabaseIdentifier()
2879         and add WebSecurityOrigin::createFromString().
2880
2881         * Shared/WebSecurityOrigin.h:
2882         (WebKit::WebSecurityOrigin::createFromString):
2883         (WebKit::WebSecurityOrigin::createFromDatabaseIdentifier):
2884         (WebKit::WebSecurityOrigin::toString): Added function.
2885         
2886         Refactor with renamed createFromDatabaseIdentifier() method.
2887         
2888         * UIProcess/WebDatabaseManagerProxy.cpp:
2889         (WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
2890         (WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
2891         (WebKit::WebDatabaseManagerProxy::didModifyOrigin):
2892         (WebKit::WebDatabaseManagerProxy::didModifyDatabase):
2893         * UIProcess/WebPageProxy.cpp:
2894         (WebKit::WebPageProxy::exceededDatabaseQuota):
2895         (WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
2896
2897         == Add WK API calls to change notificationsEnabled bit in WebCore::Settings.
2898
2899         * Shared/WebPreferencesStore.h:
2900         * UIProcess/API/C/WKPreferences.cpp:
2901         (WKPreferencesSetNotificationsEnabled):
2902         (WKPreferencesGetNotificationsEnabled):
2903         * UIProcess/API/C/WKPreferences.h:
2904
2905 2012-01-18  Anders Carlsson  <andersca@apple.com>
2906
2907         REGRESSION (r88886): Tabs restore blank when running Safari with a nightly build for the first time
2908         https://bugs.webkit.org/show_bug.cgi?id=76587
2909         <rdar://problem/9739135>
2910
2911         Reviewed by Sam Weinig.
2912
2913         * UIProcess/cf/WebPageProxyCF.cpp:
2914         Change CurrentSessionStateDataVersion back to 2.
2915
2916         * WebProcess/WebPage/DecoderAdapter.cpp:
2917         (WebKit::DecoderAdapter::decodeString):
2918         * WebProcess/WebPage/EncoderAdapter.cpp:
2919         (WebKit::EncoderAdapter::encodeString):
2920         Backport the CoreIPC string encoding and decoding functions that were in place prior to r88886.
2921
2922 2012-01-17  Alexey Proskuryakov  <ap@apple.com>
2923
2924         [Mac] Add a flag telling plug-in if it can enter sandbox
2925         https://bugs.webkit.org/show_bug.cgi?id=76467
2926
2927         Reviewed by Anders Carlsson.
2928
2929         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2930         (WebKit::NPN_GetValue): Added a private flag.
2931
2932 2012-01-18  Eric Carlson  <eric.carlson@apple.com>
2933
2934         Provide access to user's list of preferred languages
2935         https://bugs.webkit.org/show_bug.cgi?id=76138
2936
2937         Reviewed by Alexey Proskuryakov.
2938
2939         * Shared/WebProcessCreationParameters.cpp:
2940         (WebKit::WebProcessCreationParameters::encode): Encode the languages array.
2941         (WebKit::WebProcessCreationParameters::decode): Decode the languages array.
2942         * Shared/WebProcessCreationParameters.h:
2943
2944         * UIProcess/WebContext.cpp:
2945         (WebKit::WebContext::languageChanged): Override the WebProcess userPreferredLanguages.
2946         (WebKit::WebContext::ensureWebProcess): Initialize parameters.languages.
2947
2948         * WebProcess/WebProcess.cpp:
2949         (WebKit::WebProcess::initializeWebProcess): Override user languages array.
2950         (WebKit::WebProcess::userPreferredLanguagesChanged): Ditto.
2951         * WebProcess/WebProcess.h:
2952         * WebProcess/WebProcess.messages.in: Define UserPreferredLanguagesChanged.
2953
2954         * win/WebKit2.def: Export the new functions.
2955         * win/WebKit2CFLite.def: Ditto.
2956
2957 2012-01-18  Luciano Wolf  <luciano.wolf@openbossa.org>
2958
2959         [Qt][WK2] Broken build with undefined reference to shm_open and shm_unlink
2960         https://bugs.webkit.org/show_bug.cgi?id=76538
2961
2962         Reviewed by Tor Arne Vestbø.
2963
2964         The -lrt parameter was coming before -lWebKit2 during linkage.
2965
2966         Moved rt lib inclusion from Source/api.pri to WebKit2.pri as it should be aware
2967         of its own dependencies instead of letting WebKit guess about. Letting
2968         it on api.pri can lead to a wrong parameter's order during linker phase.
2969         Ubuntu 11.10 was giving errors about SharedMemory (shm_open and
2970         shm_unlink undefined symbols).
2971
2972         The issue was fixed with the help of Aloisio Almeida and Lauro Venancio.
2973
2974         * WebKit2.pri:
2975
2976 2012-01-18  Carlos Garnacho  <carlosg@gnome.org>
2977
2978         [GTK] Listen to GDK_SCROLL_MASK
2979         https://bugs.webkit.org/show_bug.cgi?id=76529
2980
2981         Set GDK_SCROLL_MASK explicitly, as WebKitWebViewBase does handle
2982         scroll events, scrolling currently works because GTK+ happens 
2983         to send such events to widgets listening to GDK_BUTTON_PRESS_MASK,
2984         but this isn't the intended behavior, so it's subject to change.
2985
2986         Reviewed by Martin Robinson.
2987
2988         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2989         (webkitWebViewBaseRealize):
2990
2991 2012-01-18  Andras Becsi  <andras.becsi@nokia.com>
2992
2993         [Qt][WK2] Fix the debug build.
2994
2995         Unreviewed.
2996
2997         * UIProcess/qt/QtWebPageEventHandler.cpp:
2998         (setInputPanelVisible): Remove assertion from non-member function.
2999
3000 2012-01-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3001
3002         [Qt] Zoom in to the focused node only when vkb starts becoming visible
3003         https://bugs.webkit.org/show_bug.cgi?id=76174
3004
3005         Reviewed by Simon Hausmann.
3006
3007         Remove the old code which always zoomed in when something got focus,
3008         even via JavaScript, and replaced it with code checking the state of
3009         the Qt input panel.
3010
3011         Also make sure that we do not zoom in or request the input panel if
3012         the item is not focused.
3013
3014         * UIProcess/PageClient.h:
3015         * UIProcess/WebPageProxy.cpp:
3016         * UIProcess/WebPageProxy.h:
3017         * UIProcess/WebPageProxy.messages.in:
3018         * UIProcess/qt/QtPageClient.cpp:
3019         * UIProcess/qt/QtPageClient.h:
3020         * UIProcess/qt/QtWebPageEventHandler.cpp:
3021         (QtWebPageEventHandler::QtWebPageEventHandler):
3022         (QtWebPageEventHandler::~QtWebPageEventHandler):
3023         (QtWebPageEventHandler::inputPanelVisibleChanged):
3024         * UIProcess/qt/QtWebPageEventHandler.h:
3025         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3026         (WebKit::WebEditorClient::respondToChangedSelection):
3027
3028 2012-01-18  Shinya Kawanaka  <shinyak@google.com>
3029
3030         Move ShadowContentElement from dom/ to html/ and make ShadowContentElement subclass of HTMLElement.
3031         https://bugs.webkit.org/show_bug.cgi?id=76241
3032
3033         Reviewed by Dimitri Glazkov.
3034
3035         * win/WebKit2.def: Exposed necessary symbols.
3036         * win/WebKit2CFLite.def: ditto.
3037
3038 2012-01-17  Hajime Morrita  <morrita@chromium.org>
3039
3040         [Internals] Should be able to access corresponding Document object.
3041         https://bugs.webkit.org/show_bug.cgi?id=76425
3042
3043         Reviewed by Adam Barth.
3044
3045         * win/WebKit2.def: Added exporting symbols.
3046         * win/WebKit2CFLite.def: Added exporting symbols.
3047
3048 2012-01-17  Matthew Delaney  <mdelaney@apple.com>
3049
3050         On post-Lion releases, preserve the Lion behavior where WebKit explicitly calls -setGeometryFlipped on the hosting layer for applications that were linked on Lion or earlier.
3051         <rdar://problem/10692025>
3052
3053         Reviewed by Simon Fraser.
3054
3055         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Init new function.
3056         (InitWebCoreSystemInterface):
3057
3058 2012-01-17  Sam Weinig  <sam@webkit.org>
3059
3060         Rename quickLookPreviewItemsAtWindowLocation: to quickLookWithEvent:
3061         <rdar://problem/10688913>
3062
3063         Reviewed by Anders Carlsson.
3064
3065         * UIProcess/API/mac/WKView.mm:
3066         (-[WKView quickLookWithEvent:]):
3067
3068 2012-01-17  Sam Weinig  <sam@webkit.org>
3069
3070         Add helper macro for forward declaring objective-c classes
3071         https://bugs.webkit.org/show_bug.cgi?id=76485
3072
3073         Reviewed by Anders Carlsson.
3074
3075         * WebProcess/WebCoreSupport/WebDragClient.h:
3076         Deploy OBJC_CLASS for a little code reduction.
3077
3078         * config.h:
3079         Remove duplicate copy of OBJC_CLASS.
3080
3081 2012-01-17  Martin Robinson  <mrobinson@igalia.com>
3082
3083         [GTK] [WK2] WebKitPrivate should include the entire WebKit2 C API
3084         https://bugs.webkit.org/show_bug.cgi?id=76345
3085
3086         Reviewed by Gustavo Noronha Silva.
3087
3088         Isolate all of the WebKit2 C API includes into WebKitPrivate.h and no longer
3089         include anything other than WebKit2.h for the C API.
3090
3091         * UIProcess/API/gtk/WebKitBackForwardList.cpp: Use WebKitPrivate.h now.
3092         * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
3093         * UIProcess/API/gtk/WebKitPrivate.h: Add WebKit2.h, WKAPICast.h and WKRetainPtr.h includes.
3094         * UIProcess/API/gtk/WebKitSettings.cpp: Use WebKitPrivate.h.
3095         * UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
3096         * UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
3097         * UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
3098         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
3099         * UIProcess/API/gtk/WebKitWindowProperties.cpp: Ditto.
3100
3101 2012-01-17  Alexander Færøy  <alexander.faeroy@nokia.com>
3102
3103         [Qt] Implement HTTP authentication QML API
3104         https://bugs.webkit.org/show_bug.cgi?id=75535
3105
3106         Reviewed by Kenneth Rohde Christiansen.
3107
3108         This patch implements the QML API for handling HTTP authentication.
3109         The implementation uses a syncronous message between the WebProcess
3110         and the UIProcess which is called when the authenticationRequired
3111         signal is emitted from QNAM.
3112
3113         Based in part upon patch by Peter Hartmann.
3114
3115         * UIProcess/API/qt/qquickwebview.cpp:
3116         (QQuickWebViewPrivate::QQuickWebViewPrivate):
3117         (QQuickWebViewPrivate::handleAuthenticationRequiredRequest):
3118         (QQuickWebViewExperimental::authenticationDialog):
3119         (QQuickWebViewExperimental::setAuthenticationDialog):
3120         * UIProcess/API/qt/qquickwebview_p.h:
3121         * UIProcess/API/qt/qquickwebview_p_p.h:
3122         * UIProcess/PageClient.h:
3123         * UIProcess/WebPageProxy.cpp:
3124         (WebKit::WebPageProxy::authenticationRequiredRequest):
3125         * UIProcess/WebPageProxy.h:
3126         * UIProcess/WebPageProxy.messages.in:
3127         * UIProcess/qt/QtDialogRunner.cpp:
3128         (AuthenticationDialogContextObject::AuthenticationDialogContextObject):
3129         (AuthenticationDialogContextObject::hostname):
3130         (AuthenticationDialogContextObject::realm):
3131         (AuthenticationDialogContextObject::prefilledUsername):
3132         (AuthenticationDialogContextObject::accept):
3133         (AuthenticationDialogContextObject::reject):
3134         (QtDialogRunner::initForAuthentication):
3135         * UIProcess/qt/QtDialogRunner.h:
3136         (QtDialogRunner::username):
3137         (QtDialogRunner::password):
3138         (QtDialogRunner::onAuthenticationAccepted):
3139         * UIProcess/qt/QtPageClient.cpp:
3140         (QtPageClient::handleAuthenticationRequiredRequest):
3141         * UIProcess/qt/QtPageClient.h:
3142         * WebProcess/qt/QtNetworkAccessManager.cpp:
3143         (WebKit::QtNetworkAccessManager::QtNetworkAccessManager):
3144         (WebKit::QtNetworkAccessManager::onAuthenticationRequired):
3145         * WebProcess/qt/QtNetworkAccessManager.h:
3146
3147 2012-01-16  Dan Bernstein  <mitz@apple.com>
3148
3149         <rdar://problem/10702758> REGRESSION: Every Safari Reader WKView leaks
3150
3151         Reviewed by John Sullivan and Ada Chan.
3152
3153         * UIProcess/API/mac/WKView.mm:
3154         (-[WKView viewDidMoveToWindow]): Since this method can be called multiple times in a row
3155         while [self window] is non-nil, check if there isn’t already an event monitor before adding
3156         a new one.
3157
3158 2012-01-16  Anders Carlsson  <andersca@apple.com>
3159
3160         Crash when calling SecItemAdd with a null result pointer
3161         https://bugs.webkit.org/show_bug.cgi?id=76407
3162         <rdar://problem/10696087>
3163
3164         Reviewed by Brady Eidson.
3165
3166         Add null check.
3167
3168         * WebProcess/mac/SecItemShimMethods.mm:
3169         (WebKit::webSecItemAdd):
3170
3171 2012-01-16  Jon Lee  <jonlee@apple.com>
3172
3173         Build fix for r105086.
3174
3175         * Configurations/FeatureDefines.xcconfig:
3176
3177 2012-01-16  Zeno Albisser  <zeno@webkit.org>
3178
3179         [Qt] Fix QT_VERSION related warnings when building on Mac OS X
3180         https://bugs.webkit.org/show_bug.cgi?id=76340
3181
3182         This bug was caused by r104826.
3183         As was already mentioned for https://bugs.webkit.org/show_bug.cgi?id=57239
3184         we should not use "using namespace WebCore" in header files,
3185         because it might cause ambiguous references.
3186         This patch reverts the changes from r104826 and r104981
3187         and removes the "using namespace WebCore" statement from
3188         two header files.
3189
3190         Reviewed by Tor Arne Vestbø.
3191
3192         * Shared/WebLayerTreeInfo.h:
3193         (WebKit::WebLayerUpdateInfo::WebLayerUpdateInfo):
3194         (WebKit::WebLayerAnimation::WebLayerAnimation):
3195         * UIProcess/LayerTreeHostProxy.h:
3196         (WebKit::LayerTreeHostProxy::layerByID):
3197         (WebKit::LayerTreeHostProxy::rootLayer):
3198         (WebKit::LayerTreeHostProxy::notifyAnimationStarted):
3199         (WebKit::LayerTreeHostProxy::notifySyncRequired):
3200         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
3201         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3202         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
3203
3204 2012-01-16  Alexander Færøy  <alexander.faeroy@nokia.com>
3205
3206         [Qt] Remove references to PagePointer in the FrameNetworkingContext
3207         https://bugs.webkit.org/show_bug.cgi?id=76342
3208
3209         Reviewed by Simon Hausmann.
3210
3211         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3212         (WebKit::WebFrameLoaderClient::createNetworkingContext):
3213         * WebProcess/qt/QtNetworkAccessManager.cpp:
3214         (WebKit::QtNetworkAccessManager::obtainOriginatingWebPage):
3215         * WebProcess/qt/QtNetworkAccessManager.h:
3216
3217 2012-01-14  Dan Bernstein  <mitz@apple.com>
3218
3219         <rdar://problem/10696295> Crash in WebProcess at com.apple.CFNetwork: URLCredentialStorage::CreateCurrentPersistentCredentials + 298
3220
3221         Reviewed by Anders Carlsson.
3222
3223         * WebProcess/mac/SecItemShimMethods.mm:
3224         (WebKit::initializeSecItemShim): Removed an early return that was accidentally added in r105008.
3225
3226 2012-01-13  Anders Carlsson  <andersca@apple.com>
3227
3228         Delay updating the root compositing layer if the layer tree state is frozen
3229         https://bugs.webkit.org/show_bug.cgi?id=76316
3230
3231         Reviewed by Dan Bernstein.
3232
3233         When the layer tree is frozen, stash the root layer in m_pendingRootCompositingLayer and set it in flushLayers.
3234
3235         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3236         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3237         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
3238         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3239
3240 2012-01-13  Anders Carlsson  <andersca@apple.com>
3241
3242         Implement TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen
3243         https://bugs.webkit.org/show_bug.cgi?id=76308
3244
3245         Reviewed by Sam Weinig.
3246
3247         Keep track of whether the layer tree state is frozen and suspend/resume the layer flush scheduler accordingly.
3248
3249         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3250         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3251         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
3252         (WebKit::TiledCoreAnimationDrawingArea::setLayerTreeStateIsFrozen):
3253         (WebKit::TiledCoreAnimationDrawingArea::layerTreeStateIsFrozen):
3254         (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync):
3255         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3256
3257 2012-01-13  Anders Carlsson  <andersca@apple.com>
3258
3259         Disable implicit animations when setting the root compositing layer
3260         https://bugs.webkit.org/show_bug.cgi?id=76304
3261
3262         Reviewed by Sam Weinig.
3263
3264         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3265         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
3266
3267 2012-01-13  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3268
3269         TextureMapper: Extract layer transform logic to a LayerTransform class.
3270         https://bugs.webkit.org/show_bug.cgi?id=76291
3271
3272         Reviewed by Noam Rosenthal.
3273
3274         Move the paint call before the visible rect collection to make sure that
3275         transforms are computed. This will increase the delay for the visible rects
3276         to get to the WebProcess until we move this calculation out of the UI Process.
3277         This fixes an assert triggering in LayerTransform::combineTransforms.
3278
3279         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
3280         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
3281
3282 2012-01-13  Brent Fulgham  <bfulgham@webkit.org>
3283
3284         [WinCairo] Build correction.
3285
3286         * Shared/WebGraphicsContext.h: Use proper include path for RefPtrCairo.h.
3287
3288 2012-01-12  Martin Robinson  <mrobinson@igalia.com>
3289
3290         [GTK] [WebKit2] WebKitURIRequest and WebKitURIResponse should wrap the corresponding WebCore classes
3291         https://bugs.webkit.org/show_bug.cgi?id=74478
3292
3293         Reviewed by Gustavo Noronha Silva.
3294
3295         Have WebKitURIRequest wrap a ResourceRquesst and WebKitURIResponse wrap a ResourceResponse.
3296         They are the WebCore types they are meant to represent and we will need to expose more
3297         information from them in the future to make them useful. Later we can have ResourceResponse
3298         generate a SoupMessage lazily if necessary.
3299
3300         * GNUmakefile.am:
3301         * UIProcess/API/gtk/WebKitURIRequest.cpp:
3302         (webkit_uri_request_class_init): Remove the set property vmethod.
3303         (webkit_uri_request_new): The URI property is no longer settable.
3304         (webkitURIRequestCreateForResourceRequest): Added this private constructor.
3305         (webkit_uri_request_get_uri): Now we just get the URI directly from the ResourceRequest.
3306         * UIProcess/API/gtk/WebKitURIResponse.cpp:
3307         (webkit_uri_response_class_init): Remove the set property vmethod.
3308         (webkit_uri_response_get_uri): Get the URI directly from the ResourceReponse.
3309         (webkit_uri_response_get_status_code): Get the status code directly from the ResourceResponse.
3310         (webkit_uri_response_get_content_length): Get the content length directly from the ResourceResponse.
3311         (webkitURIResponseCreateForResourceResponse): Added this private constructor.
3312         * UIProcess/API/gtk/WebKitURIResponsePrivate.h: Removed unnecessary methods.
3313
3314 2012-01-12  No'am Rosenthal  <noam.rosenthal@nokia.com>
3315
3316         [Qt][WK2] WebProcesses crashes when composited reflections/masks are present
3317         https://bugs.webkit.org/show_bug.cgi?id=75883
3318
3319         Reviewed by Kenneth Rohde Christiansen.
3320
3321         Make sure masks and replica layers can access layerTreeTileClient. Let masks
3322         have the right contents/visible rect so that they can render content tiles.
3323         Default the mask's size to be the layer's size.
3324
3325         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3326         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
3327         (WebCore::WebGraphicsLayer::setSize):
3328         (WebCore::WebGraphicsLayer::setMaskLayer):
3329         (WebCore::WebGraphicsLayer::setReplicatedByLayer):
3330         (WebCore::WebGraphicsLayer::syncCompositingState):
3331         (WebCore::WebGraphicsLayer::setContentsScale):
3332         (WebCore::WebGraphicsLayer::setVisibleContentRect):
3333         (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
3334         (WebCore::WebGraphicsLayer::updateTileBuffersRecursively):
3335         (WebCore::WebGraphicsLayer::layerTreeTileClient):
3336         (WebCore::WebGraphicsLayer::purgeBackingStores):
3337         (WebCore::WebGraphicsLayer::recreateBackingStoreIfNeeded):
3338         (WebCore::WebGraphicsLayer::setLayerTreeTileClient):
3339         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3340         (WebCore::WebGraphicsLayer::maskTarget):
3341         (WebCore::WebGraphicsLayer::setMaskTarget):
3342
3343 2012-01-12  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3344
3345         [Qt] Set the input method hints on the QtQuick item
3346         https://bugs.webkit.org/show_bug.cgi?id=76169
3347
3348         Reviewed by Simon Hausmann.
3349
3350         Set the input method hints given the HTMLElement type and state.
3351
3352         * Shared/EditorState.cpp:
3353         (WebKit::EditorState::encode):
3354         (WebKit::EditorState::decode):
3355         * Shared/EditorState.h:
3356         (WebKit::EditorState::EditorState):
3357         * UIProcess/qt/QtWebPageEventHandler.cpp:
3358         (QtWebPageEventHandler::updateTextInputState):
3359         * WebProcess/WebPage/WebPage.cpp:
3360         (WebKit::WebPage::editorState):
3361
3362 2012-01-12  Eunmi Lee  <eunmi15.lee@samsung.com>
3363
3364         [EFL][WK2] Update and show ewk_view with updated webpage.
3365         https://bugs.webkit.org/show_bug.cgi?id=76023
3366
3367         Reviewed by Andreas Kling.
3368
3369         Update ewk_view with BackingStore image which is rendered webpage
3370         image by WebProcess, and show updated image's area when
3371         PageClientImpl::setViewNeedsDisplay() is called.
3372         The ewk_view_display() function is used to display updated area of
3373         evas_object_image and the ewk_view_image_data_set() function is used
3374         to set evas_object_image's data with rendered webpage.
3375
3376         * UIProcess/API/efl/PageClientImpl.cpp:
3377         (WebKit::PageClientImpl::setViewNeedsDisplay):
3378         * UIProcess/API/efl/ewk_private.h: Added.
3379         * UIProcess/API/efl/ewk_view.cpp:
3380         (ewk_view_add):
3381         (ewk_view_display):
3382         (ewk_view_image_data_set):
3383         * UIProcess/cairo/BackingStoreCairo.cpp:
3384         (WebKit::BackingStore::incorporateUpdate):
3385
3386 2012-01-12  Ryuan Choi  <ryuan.choi@samsung.com>
3387
3388         [EFL][WK2] Network is not available when SOUP is enabled.
3389         https://bugs.webkit.org/show_bug.cgi?id=76112
3390
3391         Reviewed by Andreas Kling.
3392
3393         ecore_main_loop_glib_integrate should be called to use glib based library
3394         such as SOUP.
3395
3396         * WebProcess/efl/WebProcessMainEfl.cpp:
3397         (WebKit::WebProcessMainEfl):
3398
3399 2012-01-12  Ryuan Choi  <ryuan.choi@samsung.com>
3400
3401         [EFL][WK2] Add PLATFORM(EFL) in SharedMemory.h, WebProcessStore.h, WebEditorClient.cpp
3402         https://bugs.webkit.org/show_bug.cgi?id=76115
3403
3404         Reviewed by Andreas Kling.
3405
3406         This patch added PLATFORM(EFL) guard in SharedMemory.h to use UNIX_DOMAIN_SOCKETS
3407         and WebProcessStore.h to have font family preference
3408         and WebEditorClient.cpp to use platform specific handleKeyboardEvent(),
3409         handleInputMethodKeydown()
3410
3411         * Platform/SharedMemory.h:
3412         * Shared/WebPreferencesStore.h:
3413         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3414
3415 2012-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
3416
3417         [GTK] Web process should use the same locale than UI process
3418         https://bugs.webkit.org/show_bug.cgi?id=76054
3419
3420         Reviewed by Gustavo Noronha Silva.
3421
3422         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
3423         (WebKit::childSetupFunction): Make child process use the same
3424         locale than its parent.
3425
3426 2012-01-11  Ryuan Choi  <ryuan.choi@samsung.com>
3427
3428         [WK2] Share cairo specific codes with EFL port.
3429         https://bugs.webkit.org/show_bug.cgi?id=75457
3430
3431         Reviewed by Brent Fulgham.
3432
3433         Change PLATFORM(GTK) to USE(CAIRO) in WebGraphicsContext{h,cpp} to share
3434         with EFL port.
3435
3436         * Shared/WebGraphicsContext.cpp:
3437         (WebKit::WebGraphicsContext::WebGraphicsContext):
3438         * Shared/WebGraphicsContext.h:
3439
3440 2012-01-11  Beth Dakin  <bdakin@apple.com>
3441
3442         https://bugs.webkit.org/show_bug.cgi?id=75904
3443         WebKit 1: Scrollbar uiStateTransitionProgress requires tracking the mouse all 
3444         the time
3445         -and corresponding-
3446         <rdar://problem/10498816>
3447
3448         Reviewed by Darin Adler.
3449
3450         This patch gets rid of the optional parameter called onlyUpdateScrollbars for 
3451         WebCore::EventHandler::mouseMoved() and instead moves that functionality into 
3452         its own function called passMouseMovedEventToScrollbars().
3453         * WebProcess/WebPage/WebPage.cpp:
3454         (WebKit::handleMouseEvent):
3455
3456 2012-01-11  Brent Fulgham  <bfulgham@webkit.org>
3457
3458         WinCairo build correction.
3459
3460         * UIProcess/WebPageProxy.h: Don't define viewWidget for WinCairo port.
3461
3462 2012-01-11  Anders Carlsson  <andersca@apple.com>
3463
3464         Webpages flash white when switching between windows
3465         https://bugs.webkit.org/show_bug.cgi?id=76080
3466         <rdar://problem/9893565>
3467
3468         Reviewed by Dan Bernstein.
3469
3470         Introduce a _windowHasValidBackingStore boolean and only paint the background (white or clear)
3471         * UIProcess/API/mac/WKView.mm:
3472         (-[WKView setFrameSize:]):
3473         Set _windowHasValidBackingStore to false if the new size is different from the old size.
3474
3475         (-[WKView viewDidMoveToWindow]):
3476         Set _windowHasValidBackingStore to false.
3477
3478         (-[WKView _windowDidMiniaturize:]):
3479         Set _windowHasValidBackingStore to false.
3480
3481         (-[WKView _windowDidChangeBackingProperties:]):