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