Remove unused parameters from WTF threading API
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-02-17  Kalev Lember  <kalevlember@gmail.com>
2
3         Remove unused parameters from WTF threading API
4         https://bugs.webkit.org/show_bug.cgi?id=78389
5
6         Reviewed by Adam Roben.
7
8         waitForThreadCompletion() had an out param 'void **result' to get the
9         'void *' returned by ThreadFunction. However, the implementation in
10         ThreadingWin.cpp ignored the out param, not filling it in. This had
11         led to a situation where none of the client code made use of the param
12         and just ignored it.
13
14         To clean this up, the patch changes the signature of ThreadFunction to
15         return void instead of void* and drops the the unused 'void **result'
16         parameter from waitForThreadCompletion. Also, all client code is
17         updated for the API change.
18
19         As mentioned in https://bugs.webkit.org/show_bug.cgi?id=78389 , even
20         though the change only affects internal API, Safari is using it
21         directly and we'll need to keep the old versions around for ABI
22         compatibility. For this, the patch adds compatibility wrappers with
23         the old ABI.
24
25         * Platform/WorkQueue.h:
26         (WorkQueue):
27         * Platform/gtk/WorkQueueGtk.cpp:
28         (WorkQueue::startWorkQueueThread):
29         * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
30         (WebKit::webThreadBody):
31         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
32         (WebKit::webThreadBody):
33         * UIProcess/Launcher/win/ThreadLauncherWin.cpp:
34         (WebKit::webThreadBody):
35         * WebProcess/WebProcess.cpp:
36         (WebKit::randomCrashThread):
37         * win/WebKit2.def:
38         * win/WebKit2CFLite.def:
39
40 2012-02-17  Mihnea Ovidenie  <mihnea@adobe.com>
41
42         CSS regions enabled by default
43         https://bugs.webkit.org/show_bug.cgi?id=78525
44
45         Reviewed by David Hyatt.
46
47         Add a runtime preference to enable/disable regions functionality at runtime(WebKitCSSRegionsEnabled).
48         CSSRegions are still enabled by default.
49         In DRT, use layoutTestController.overridePreference("WebKitCSSRegionsEnabled", "0") to disable the css regions functionality.
50
51         * Shared/WebPreferencesStore.h:
52         (WebKit):
53         * UIProcess/API/C/WKPreferences.cpp:
54         (WKPreferencesSetCSSRegionsEnabled):
55         (WKPreferencesGetCSSRegionsEnabled):
56         * UIProcess/API/C/WKPreferencesPrivate.h:
57         * WebProcess/InjectedBundle/InjectedBundle.cpp:
58         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
59         * WebProcess/WebPage/WebPage.cpp:
60         (WebKit::WebPage::updatePreferences):
61
62 2012-02-17  Enrica Casucci  <enrica@apple.com>
63
64         Refactor DragData class to use PlatformStrategies in the Mac implementation.
65         https://bugs.webkit.org/show_bug.cgi?id=78768
66
67         Reviewed by Darin Adler.
68
69         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added color() method.
70         (WebKit::WebPlatformStrategies::color):
71         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
72
73 2012-02-17  Martin Robinson  <mrobinson@igalia.com>
74
75         Fix some warnings encountered during the GTK+ build
76         https://bugs.webkit.org/show_bug.cgi?id=78911
77
78         Reviewed by Xan Lopez.
79
80         * UIProcess/API/gtk/WebKitLoaderClient.cpp:
81         (attachLoaderClientToView): Initialize a new member of the loader client struct.
82
83 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
84
85         [GTK] Allow printing scaled pages in WebKit2 for printers that don't support it
86         https://bugs.webkit.org/show_bug.cgi?id=78823
87
88         Reviewed by Gustavo Noronha Silva.
89
90         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
91         (webkitPrintOperationRunDialogUnix): Enable scale option in print
92         dialog.
93         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
94         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize
95         manual scale to 1.
96         (WebKit::WebPrintOperationGtk::rotatePageIfNeeded): Renamed and
97         moved the needs rotate check here as an early return.
98         (WebKit::WebPrintOperationGtk::prepareContextToDraw): Scale the
99         page according to the manual scale factor.
100         (WebKit::WebPrintOperationGtk::renderPage): Move rotatePage to
101         prepareContextToDraw.
102         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
103
104 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
105
106         [GTK] Allow printing multiple copies in WebKit2 for printers that don't support it
107         https://bugs.webkit.org/show_bug.cgi?id=78805
108
109         Reviewed by Gustavo Noronha Silva.
110
111         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
112         (webkitPrintOperationRunDialogUnix): Enable multiple copies and
113         collate options in print dialog.
114         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
115         (WebKit::PrintPagesData::PrintPagesData): Initialize number of
116         collated and uncolated copies done and total.
117         (WebKit::PrintPagesData::collatedCopiesLeft): Helper function that
118         returns the number of collated copies left to do.
119         (WebKit::PrintPagesData::uncollatedCopiesLeft): Helper function
120         that returns the number of uncollated copies left to do.
121         (WebKit::PrintPagesData::copiesLeft): Helper function
122         that returns the number of collated or uncollated copies left to
123         do.
124         (WebKit::PrintPagesData::incrementPageSequence): Do not finish the
125         print if there are uncollated copies left, and do not increment
126         sheet number if there are collated copies left.
127         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize
128         m_manualCopies to 1 and m_manualCollateCopies to false.
129         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
130
131 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
132
133         [GTK] Allow printing pages in reverse order in WebKit2 for printers that don't support it
134         https://bugs.webkit.org/show_bug.cgi?id=78799
135
136         Reviewed by Gustavo Noronha Silva.
137
138         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
139         (webkitPrintOperationRunDialogUnix): Enable printing in reverse
140         order option in print dialog.
141         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
142         (WebKit::PrintPagesData::PrintPagesData): Initialize sheetNumber
143         and lastPagePosition depending on whether printing is in reverse
144         order or not.
145         (WebKit::PrintPagesData::incrementPageSequence): Use a negative
146         increment step when printing in reverse order. Fix page
147         incrementing when printing only odd/even pages broken in previous
148         commit due to merge conflicts.
149         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize
150         reverse printing to false.
151         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
152
153 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
154
155         [GTK] Allow printing only odd/even pages in WebKit2 for printers that don't support it
156         https://bugs.webkit.org/show_bug.cgi?id=78793
157
158         Reviewed by Gustavo Noronha Silva.
159
160         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
161         (webkitPrintOperationRunDialogUnix): Enable print odd/even pages
162         option in print dialog.
163         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
164         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
165         (WebKit::PrintPagesData::PrintPagesData): Add lastPagePosition and
166         initialize it depending on the page set.
167         (WebKit::PrintPagesData::incrementPageSequence): Use 2 step
168         increment when printing only odd/even pages.
169         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize
170         m_manualPageSet to GTK_PAGE_SET_ALL.
171
172 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
173
174         [GTK] Allow printing multiple pages per sheet in WebKit2 for printers that don't support it
175         https://bugs.webkit.org/show_bug.cgi?id=78715
176
177         Reviewed by Gustavo Noronha Silva.
178
179         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
180         (webkitPrintOperationRunDialogUnix): Enable multiple pages per
181         sheet options in print dialog.
182         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
183         (WebKit::PrintPagesData::PrintPagesData): Initialize sheetNumber
184         and numberOfSheets. Move pagePosition to WebPrintOperationGtk.
185         (WebKit::PrintPagesData::incrementPageSequence): Increment current
186         sheet and page position.
187         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk):
188         (WebKit::WebPrintOperationGtk::currentPageIsFirstPageOfSheet):
189         Helper function to check whether current pages is the first one of
190         the current sheet.
191         (WebKit::WebPrintOperationGtk::currentPageIsLastPageOfSheet):
192         Helper function to check whether current pages is the last one of
193         the current sheet.
194         (WebKit::WebPrintOperationGtk::getRowsAndColumnsOfPagesPerSheet):
195         Returns the number of rows and columns of pages per sheet.
196         (WebKit::WebPrintOperationGtk::getPositionOfPageInSheet): Returns
197         the row and column number of the current page in the current sheet.
198         (WebKit::WebPrintOperationGtk::prepareContextToDraw): Translate,
199         scale and rotate accordingly to render every page in the right
200         place of the sheet.
201         (WebKit::WebPrintOperationGtk::renderPage): Call
202         prepareContextToDraw() before drawing the page.
203         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
204         (WebKit::WebPrintOperationGtk::setNumberOfPagesToPrint):
205         (WebKit::WebPrintOperationGtk::pagePosition):
206         (WebKit::WebPrintOperationGtk::setPagePosition):
207         (WebKit::WebPrintOperationGtk::numberUp):
208         (WebKit::WebPrintOperationGtk::numberUpLayout):
209
210 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
211
212         [GTK] Rename WebKitPrintOperation::done signal to ::finished in WebKit2
213         https://bugs.webkit.org/show_bug.cgi?id=78893
214
215         Reviewed by Gustavo Noronha Silva.
216
217         And it's not emitted anynmore when the print dialog has been
218         cancelled. Since it's not possible to know whether the print
219         dialog was cancelled or not, the enum WebKitPrintOperationResponse
220         has been added, with Print and Cancel values, and it's used as
221         return value of webkit_print_operation_run_dialog().
222
223         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
224         (webkit_print_operation_class_init): Rename done as finished.
225         (webkitPrintOperationRunDialogUnix): Return a
226         WebKitPrintOperationResponse instead of bool.
227         (webkitPrintOperationRunDialogWin32): Ditto.
228         (drawPagesForPrintingCompleted): Emit finished instead of done.
229         (webkitPrintOperationRunDialogForFrame): Do not emit finished if
230         the dialog was cancelled and return a WebKitPrintOperationResponse.
231         (webkit_print_operation_run_dialog): Return
232         WebKitPrintOperationResponse.
233         * UIProcess/API/gtk/WebKitPrintOperation.h: Add
234         WebKitPrintOperationResponse enum.
235         * UIProcess/API/gtk/WebKitPrintOperationPrivate.h:
236         * UIProcess/API/gtk/WebKitWebView.cpp:
237         (webkitWebViewPrintFrame): Check whether the dialog has been
238         cancelled or not and connect to finish when the print operation is
239         in progress to release the print operation object when printing
240         finishes.
241         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add
242         WebKitPrintOperationResponse symbol.
243         * UIProcess/API/gtk/tests/TestPrinting.cpp:
244         (testPrintOperationPrintFinished): Use finished instead of done.
245         (testPrintOperationPrint): Ditto.
246
247 2012-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
248
249         [GTK] Add webkit_print_operation_print() to WebKit2 GTK+ API
250         https://bugs.webkit.org/show_bug.cgi?id=76536
251
252         Reviewed by Gustavo Noronha Silva.
253
254         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
255         (webkitPrintOperationPrintPagesForFrame): Helper function to call
256         WebPageProxy::drawPagesForPrinting using the given
257         GtkPrintSettings and GtkPageSetup.
258         (webkitPrintOperationRunDialogForFrame): Use
259         webkitPrintOperationPrintPagesForFrame().
260         (webkit_print_operation_print): Print directly using current
261         GtkPrintSettings and GtkPageSetup without showing the print
262         dialog.
263         * UIProcess/API/gtk/WebKitPrintOperation.h:
264         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
265         * UIProcess/API/gtk/tests/GNUmakefile.am:
266         * UIProcess/API/gtk/tests/TestPrinting.cpp:
267         (testPrintOperationPrintLoadChanged):
268         (testPrintOperationPrintDone):
269         (testPrintOperationPrintPrinter):
270         (testPrintOperationPrint):
271         (beforeAll):
272         (afterAll):
273
274 2012-02-17  No'am Rosenthal  <noam.rosenthal@nokia.com>
275
276         [Qt][WK2] Allow partial updates
277         https://bugs.webkit.org/show_bug.cgi?id=78824
278
279         Instead of using UpdateInfo to fill the entire tile's texture, we use it as a patch that
280         contains only the dirty rectangle of the current paint. This requires a lot less memory
281         for small updates, for example when typing a text in an input field.
282         This shows a significant reduction in overhead when testing on Mac with Instruments.
283
284         Reviewed by Simon Hausmann.
285
286         * UIProcess/qt/LayerBackingStore.cpp:
287         (WebKit::LayerBackingStoreTile::swapBuffers):
288         (WebKit::LayerBackingStoreTile::setBackBuffer):
289         (WebKit):
290         (WebKit::LayerBackingStore::updateTile):
291         * UIProcess/qt/LayerBackingStore.h:
292         (LayerBackingStoreTile):
293         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
294         (WebKit::LayerTreeHostProxy::updateTileForLayer):
295         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
296         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
297
298 2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
299
300         [GTK] Make sure print operation object is alive until printing finishes in WebKit2
301         https://bugs.webkit.org/show_bug.cgi?id=78829
302
303         Reviewed by Martin Robinson.
304
305         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
306         (drawPagesForPrintingCompleted): Adopt the WebKitPrintOperation
307         reference so that it's released when the callback finishes.
308         (webkitPrintOperationRunDialogForFrame): Pass a reference of
309         WebKitPrintOperation to the printing callback.
310
311 2012-02-15  Geoffrey Garen  <ggaren@apple.com>
312
313         Made Weak<T> single-owner, adding PassWeak<T>
314         https://bugs.webkit.org/show_bug.cgi?id=78740
315
316         Reviewed by Sam Weinig.
317
318         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
319         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): Use raw pointer and
320         PassWeak<T>, as required by our new hash map API.
321
322 2012-02-16  Sergio Villar Senin  <svillar@igalia.com>
323
324         [soup] Move important SoupSession feature initialization to WebCore
325         https://bugs.webkit.org/show_bug.cgi?id=68602
326
327         Reviewed by Martin Robinson.
328
329         Moved content sniffer and decoder initialization from the
330         WebProcess to WebCore because network stuff will not work as
331         expected without them.
332
333         No new tests required as we're just moving stuff from the
334         WebProcess to WebCore.
335
336         * WebProcess/gtk/WebProcessMainGtk.cpp:
337         (WebKit::WebProcessMainGtk):
338
339 2012-02-16  Philippe Normand  <pnormand@igalia.com>
340
341         Unreviewed, rolling out r107941.
342         http://trac.webkit.org/changeset/107941
343         https://bugs.webkit.org/show_bug.cgi?id=68602
344
345         Broke 23 http tests on GTK
346
347         * WebProcess/gtk/WebProcessMainGtk.cpp:
348         (WebKit::WebProcessMainGtk):
349
350 2012-02-16  No'am Rosenthal  <noam.rosenthal@nokia.com>
351
352         [Texmap] Improve the way we deal with BGRA extension
353         https://bugs.webkit.org/show_bug.cgi?id=78822
354
355         Get rid of swizzling in the web process. Instead, we moved swizzling back to
356         TextureMapperGL, as we're moving towards a setup where textures are uploaded
357         in the web process.
358
359         Reviewed by Kenneth Rohde Christiansen.
360
361         * UIProcess/qt/LayerBackingStore.cpp:
362         (WebKit::LayerBackingStoreTile::swapBuffers):
363         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
364         (WebKit::LayerTreeHostProxy::createImage):
365         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
366         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
367         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
368         (WebKit::LayerTreeHostQt::adoptImageBackingStore):
369
370 2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
371
372         Unreviewed. Fix WebKit2 GTK+ build after r107947.
373
374         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
375         (webkitPrintOperationRunDialogForFrame):
376
377 2012-02-16  Alexander Færøy  <ahf@0x90.dk>
378
379         [Qt] Fix linking in debug builds on Mac OS X
380         https://bugs.webkit.org/show_bug.cgi?id=78811
381
382         Reviewed by Kenneth Rohde Christiansen.
383
384         * UIProcess/API/qt/tests/bytearraytestdata.h:
385
386 2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
387
388         [GTK] Page content is incorrectly translated whenh rendering pages for printing in WebKit2
389         https://bugs.webkit.org/show_bug.cgi?id=78712
390
391         Reviewed by Martin Robinson.
392
393         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
394         (WebKit::WebPrintOperationGtk::enumeratePrintersFunction):
395         Simplify the code to select the printer.
396         (WebKit::WebPrintOperationGtk::renderPage): Call cairo_save()
397         before rendering the page and cairo_restore() when page has been
398         rendered.
399
400 2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
401
402         [GTK] Add WebKitPrintOperation to WebKit2 GTK+ API
403         https://bugs.webkit.org/show_bug.cgi?id=76448
404
405         Reviewed by Martin Robinson.
406
407         * GNUmakefile.am: Add new files to compilation.
408         * UIProcess/API/gtk/WebKitDefines.h:
409         * UIProcess/API/gtk/WebKitPrintOperation.cpp: Added.
410         (webViewDestroyed): Delete the print operation when the view
411         widget associated is destroyed.
412         (webkitPrintOperationConstructed): Connect to destroy signal of
413         associated web view.
414         (webkitPrintOperationGetProperty):
415         (webkitPrintOperationSetProperty):
416         (webkit_print_operation_init):
417         (webkit_print_operation_class_init):
418         (webkitPrintOperationRunDialogUnix): Use GtkPrintUnixDialog to
419         show the printing dialog in UNIX platforms.
420         (webkitPrintOperationRunDialogWin32): Empty, not implemented yet.
421         (drawPagesForPrintingCompleted): Callback called when printing
422         operation has finished in the web process.
423         (webkitPrintOperationRunDialogForFrame): Run the printing dialog
424         and start printing the given frame.
425         (webkit_print_operation_new): Create a new print operation for the
426         given web view.
427         (webkit_print_operation_get_print_settings):
428         (webkit_print_operation_set_print_settings):
429         (webkit_print_operation_get_page_setup):
430         (webkit_print_operation_set_page_setup):
431         (webkit_print_operation_run_dialog): Run the print dialog to print
432         the web view main frame.
433         * UIProcess/API/gtk/WebKitPrintOperation.h: Added.
434         * UIProcess/API/gtk/WebKitPrintOperationPrivate.h: Added.
435         * UIProcess/API/gtk/WebKitUIClient.cpp:
436         (printFrame): Call webkitWebViewPrintFrame.
437         (attachUIClientToView): Add implementation for
438         printFrame callback.
439         * UIProcess/API/gtk/WebKitWebView.cpp:
440         (webkit_web_view_class_init): Add WebKitWebView::print-requested
441         signal.
442         (webkitWebViewPrintFrame): Emit print-requested and show the print
443         dialog to print the frame when not signal is not handled by user.
444         * UIProcess/API/gtk/WebKitWebView.h:
445         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
446         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
447         WebKitPrintOperation.
448         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
449         * UIProcess/API/gtk/tests/GNUmakefile.am:
450         * UIProcess/API/gtk/tests/TestPrinting.cpp: Added.
451         (testPrintOperationPrintSettings):
452         (webViewPrintRequestedCallback):
453         (testWebViewPrintRequested):
454         (beforeAll):
455         (afterAll):
456         * UIProcess/API/gtk/webkit2.h: Include WebKitPrintOperation.h.
457
458 2012-02-16  Simon Hausmann  <simon.hausmann@nokia.com>
459
460         [Gtk][Efl][Qt] Move OpenGLShims out of cairo/ subdirectory
461         https://bugs.webkit.org/show_bug.cgi?id=78800
462
463         Reviewed by Kenneth Rohde Christiansen.
464
465         * UIProcess/qt/LayerTreeHostProxyQt.cpp: Adjust to changed OpenGLShims.h
466         location - no more cairo prefix needed.
467
468 2012-02-16  No'am Rosenthal  <noam.rosenthal@nokia.com>
469
470         [Qt][WK2] Allow opaque tiles
471         https://bugs.webkit.org/show_bug.cgi?id=78809
472
473         Set the supportsAlpha flag for TiledBackingStore when the layer has contentsOpaque enabled.
474         Use the flag for ShareableBitmaps created by TiledBackingStore.
475
476         For now this will not have impact on performance/memory, because we allocate the same type
477         of buffers for opaque and transparent tiles.
478
479         Reviewed by Kenneth Rohde Christiansen.
480
481         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
482         (WebCore::WebGraphicsLayer::setContentsOpaque):
483         (WebCore::WebGraphicsLayer::setContentsScale):
484         (WebCore::WebGraphicsLayer::createBackingStore):
485         (WebCore):
486         (WebCore::WebGraphicsLayer::updateContentBuffers):
487         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
488         (WebGraphicsLayer):
489         * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp:
490         (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer):
491
492 2012-02-16  Sergio Villar Senin  <svillar@igalia.com>
493
494         [soup] Move important SoupSession feature initialization to WebCore
495         https://bugs.webkit.org/show_bug.cgi?id=68602
496
497         Reviewed by Martin Robinson.
498
499         Moved content sniffer and decoder initialization from the
500         WebProcess to WebCore because network stuff will not work as
501         expected without them.
502
503         No new tests required as we're just moving stuff from the
504         WebProcess to WebCore.
505
506         * WebProcess/gtk/WebProcessMainGtk.cpp:
507         (WebKit::WebProcessMainGtk):
508
509 2012-02-16  Adenilson Cavalcanti  <cavalcantii@gmail.com>
510
511         [Qt][WK2] Split QWebPermissionRequest into QWebSecurityOrigin
512         https://bugs.webkit.org/show_bug.cgi?id=73215
513
514         Reviewed by Kenneth Rohde Christiansen.
515
516         Introducing a new class to expose security origin information
517         (port/scheme/etc), useful for inspecting the origin of permission
518         requests.
519
520         * Target.pri:
521         * UIProcess/API/qt/qtwebsecurityorigin.cpp: Added.
522         (QtWebSecurityOrigin::QtWebSecurityOrigin):
523         (QtWebSecurityOrigin::~QtWebSecurityOrigin):
524         (QtWebSecurityOrigin::host):
525         (QtWebSecurityOrigin::scheme):
526         (QtWebSecurityOrigin::path):
527         (QtWebSecurityOrigin::port):
528         (QtWebSecurityOrigin::setHost):
529         (QtWebSecurityOrigin::setScheme):
530         (QtWebSecurityOrigin::setPath):
531         (QtWebSecurityOrigin::setPort):
532         * UIProcess/API/qt/qtwebsecurityorigin_p.h: Added.
533         * UIProcess/API/qt/tests/qmltests/WebView/tst_origin.qml: Added.
534         * UIProcess/API/qt/qwebpermissionrequest.cpp:
535         (QWebPermissionRequestPrivate::QWebPermissionRequestPrivate):
536         (QWebPermissionRequest::securityOrigin):
537         * UIProcess/API/qt/qwebpermissionrequest_p.h:
538         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
539
540 2012-02-16  Patrick Gansterer  <paroga@webkit.org>
541
542         [CMake] Add missing include directories.
543
544         * CMakeLists.txt:
545
546 2012-02-16  Carlos Garcia Campos  <cgarcia@igalia.com>
547
548         [GTK] Document that local paths in html loaded with loadHTML might cause the web process to terminate
549         https://bugs.webkit.org/show_bug.cgi?id=78719
550
551         Reviewed by Martin Robinson.
552
553         * UIProcess/API/gtk/WebKitWebView.cpp:
554
555 2012-02-15  Anders Carlsson  <andersca@apple.com>
556
557         Add TiledCoreAnimationDrawingArea::forceRepaint
558         https://bugs.webkit.org/show_bug.cgi?id=78749
559         <rdar://problem/10866221>
560
561         Reviewed by Sam Weinig.
562
563         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
564         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
565         (WebKit::TiledCoreAnimationDrawingArea::forceRepaint):
566         Force a repaint and synchronize the layer tree to the UI process.
567
568 2012-02-15  Enrica Casucci  <enrica@apple.com>
569
570         Refactor ClipboardMac class to use PlatformStrategies.
571         https://bugs.webkit.org/show_bug.cgi?id=78554
572
573         Reviewed by Anders Carlsson.
574
575         * WebProcess/WebCoreSupport/WebDragClient.h: Changed method signature to reference
576         the pasteboard by name.
577         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added new methods.
578         (WebKit::WebPlatformStrategies::changeCount):
579         (WebKit::WebPlatformStrategies::uniqueName):
580         * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto.
581         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
582         (WebKit::WebDragClient::declareAndWriteDragImage): Changed method signature to reference
583         the pasteboard by name.
584
585 2012-02-15  Sadrul Habib Chowdhury  <sadrul@chromium.org>
586
587         Notify ChromeClient when touch-event handlers are installed/removed.
588         https://bugs.webkit.org/show_bug.cgi?id=77440
589
590         Reviewed by Darin Fisher and Ryosuke Niwa.
591
592         * UIProcess/WebPageProxy.h:
593         (WebKit::WebPageProxy::numTouchEventHandlersChanged):
594         * WebProcess/WebCoreSupport/WebChromeClient.h:
595
596 2012-02-15  Patrick Gansterer  <paroga@webkit.org>
597
598         [CMake] Move RunLoop to WebCore/platform
599         https://bugs.webkit.org/show_bug.cgi?id=78504
600
601         Reviewed by Adam Roben.
602
603         * CMakeLists.txt: Remove RunLoop.cpp from list of souces.
604
605 2012-02-14  Simon Hausmann  <simon.hausmann@nokia.com>
606
607         [Qt] Eliminate first set of QtWidgets dependencies from WebCore
608         https://bugs.webkit.org/show_bug.cgi?id=78611
609
610         Reviewed by Kenneth Rohde Christiansen.
611
612         * UIProcess/qt/QtWebPageEventHandler.cpp: Add missing QCursor include
613         to fix compilation.
614
615 2012-02-15  Roland Steiner  <rolandsteiner@chromium.org>
616
617         <style scoped>: Allow <style scoped> as a direct child of a ShadowRoot
618         https://bugs.webkit.org/show_bug.cgi?id=77853
619
620         numberOfScopedHTMLStyleChildren got moved from Element into Node.
621
622         Reviewed by Dimitri Glazkov.
623
624         * win/WebKit2.def:
625         * win/WebKit2CFLite.def:
626
627 2012-02-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
628
629         [Texmap] Divide TextureMapperNode.cpp to 3 files.
630         https://bugs.webkit.org/show_bug.cgi?id=76660
631
632         Rename TextureMapperNode to TextureMapperLayer.
633
634         Reviewed by Kenneth Rohde Christiansen.
635
636         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
637         (WebKit::LayerTreeHostProxy::createLayer):
638         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
639         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
640         (WebKit::LayerTreeHostProxy::getBackingStore):
641         (WebKit::LayerTreeHostProxy::ensureRootLayer):
642         (WebKit::LayerTreeHostProxy::purgeGLResources):
643
644 2012-02-14  Anders Carlsson  <andersca@apple.com>
645
646         Swipe gestures don't work if main frame has a horizontal scrollbar
647         https://bugs.webkit.org/show_bug.cgi?id=78650
648         <rdar://problem/10864993>
649
650         Reviewed by Sam Weinig.
651
652         * WebProcess/WebPage/EventDispatcher.cpp:
653         (WebKit::EventDispatcher::wheelEvent):
654         ScrollingTree::tryToHandleWheelEvent now returns a tri-state enum so handle the extra case.
655
656         (WebKit::EventDispatcher::sendDidReceiveEvent):
657         Rename this now that it takes a parameter indicating whether the event was handled or not.
658
659 2012-02-14  Brian Weinstein  <bweinstein@apple.com>
660
661         Web Inspector: Add the ability to show the resources panel on launch
662         https://bugs.webkit.org/show_bug.cgi?id=78641
663         
664         Add WebKit2 API for the ability to show the resources panel. This calls down
665         from the WK API all the way to InspectorFrontendClientLocal::showResources.
666
667         Reviewed by Timothy Hatcher.
668
669         * UIProcess/API/C/WKInspector.cpp:
670         (WKInspectorShowResources): Call WebInspectorProxy::showResources.
671         * UIProcess/API/C/WKInspector.h:
672         * UIProcess/WebInspectorProxy.cpp:
673         (WebKit::WebInspectorProxy::showResources): Send a message to the web process.
674         * UIProcess/WebInspectorProxy.h:
675         * WebProcess/WebPage/WebInspector.cpp:
676         (WebKit::WebInspector::showResources): Call InspectorFrontendClientLocal::showResources.
677         * WebProcess/WebPage/WebInspector.h:
678         * WebProcess/WebPage/WebInspector.messages.in: Add a ShowResources message.
679
680 2012-02-14  Matt Lilek  <mrl@apple.com>
681
682         Don't ENABLE_DASHBOARD_SUPPORT unconditionally on all Mac platforms
683         https://bugs.webkit.org/show_bug.cgi?id=78629
684
685         Reviewed by David Kilzer.
686
687         * Configurations/FeatureDefines.xcconfig:
688
689 2012-02-13  Raphael Kubo da Costa  <kubo@profusion.mobi>
690
691         [CMake] Merge WebKitEfl.cmake into FindEFL.cmake.
692         https://bugs.webkit.org/show_bug.cgi?id=78566
693
694         Reviewed by Daniel Bates.
695
696         * PlatformEfl.cmake: Do not include WebKitEfl.cmake.
697
698 2012-02-14  No'am Rosenthal  <noam.rosenthal@nokia.com>
699
700         [Qt][Texmap] Refactor backing-store code in TextureMapper
701         https://bugs.webkit.org/show_bug.cgi?id=78305
702
703         Move the backing-store code to LayerTreeBackingStore, implementing the virtual functions
704         in TextureMapperBackingStore.
705         We save the double-buffered tile in the backing-store, and then convert them to regular
706         tiles in updateContents, based on the order of painting.
707         Use TextureMapperCompositedImage for images instead of saving our own composited image
708         registry.
709
710         Reviewed by Kenneth Rohde Christiansen.
711
712         * Target.pri:
713         * UIProcess/LayerTreeHostProxy.h:
714         (WebKit):
715         (LayerTreeHostProxy):
716         * UIProcess/qt/LayerBackingStore.cpp: Added.
717         * UIProcess/qt/LayerBackingStore.h: Added.
718         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
719         (WebKit::LayerTreeHostProxy::createLayer):
720         (WebKit::LayerTreeHostProxy::syncLayerParameters):
721         (WebKit::LayerTreeHostProxy::getBackingStore):
722         (WebKit::LayerTreeHostProxy::createTile):
723         (WebKit::LayerTreeHostProxy::removeTile):
724         (WebKit::LayerTreeHostProxy::updateTile):
725         (WebKit::LayerTreeHostProxy::createImage):
726         (WebKit::LayerTreeHostProxy::assignImageToLayer):
727         (WebKit::LayerTreeHostProxy::purgeGLResources):
728         * WebProcess.pro:
729
730
731 2012-02-14  Shinya Kawanaka  <shinyak@google.com>
732
733         Use youngestShadowRoot and oldestShadowRoot instead of Element::shadowRoot().
734         https://bugs.webkit.org/show_bug.cgi?id=78455
735
736         Reviewed by Hajime Morita.
737
738         Exports necesarry symbols.
739
740         * win/WebKit2.def:
741         * win/WebKit2CFLite.def:
742
743 2012-02-14  Alexey Proskuryakov  <ap@apple.com>
744
745         [Mac][Win][WK2] Switch to RFC 6455 protocol for WebSockets
746         https://bugs.webkit.org/show_bug.cgi?id=78541
747         <rdar://problem/10036695>
748
749         Reviewed by Kent Tamura.
750
751         * Shared/WebPreferencesStore.h: (WebKit): Changed default value of the preference.
752
753 2012-02-13  W. James MacLean  <wjmaclean@chromium.org>
754
755         [chromium] Remove obsolete zoom animation pathway.
756         https://bugs.webkit.org/show_bug.cgi?id=78359
757
758         Reviewed by James Robinson.
759
760         This patch removes dead code from the previous incarnation of zoom animation for chromium.
761
762         WebProcess/Plugins/PDF/BuiltInPDFView.h:
763         (BuiltInPDFView):
764
765 2012-02-13  Enrica Casucci  <enrica@apple.com>
766
767         Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies.
768         https://bugs.webkit.org/show_bug.cgi?id=78282
769
770         This patch removes any accesss to the NSPasteboard object from the Pasteboard class which
771         now makes use of a new pasteboardStrategy object that is implemented both in WebKit and
772         WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard
773         class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy
774         interface but this one more step in the direction of removing access to NSPasteboard from
775         the WebProcess.
776         As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes.
777
778         Reviewed by Anders Carlsson.
779
780         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added implementation of PasteboardStrategy
781         interface.
782         (WebKit::WebPlatformStrategies::createPasteboardStrategy):
783         (WebKit::WebPlatformStrategies::getTypes):
784         (WebKit::WebPlatformStrategies::bufferForType):
785         (WebKit::WebPlatformStrategies::getPathnamesForType):
786         (WebKit::WebPlatformStrategies::stringForType):
787         (WebKit::WebPlatformStrategies::copy):
788         (WebKit::WebPlatformStrategies::setTypes):
789         (WebKit::WebPlatformStrategies::setBufferForType):
790         (WebKit::WebPlatformStrategies::setPathnamesForType):
791         (WebKit::WebPlatformStrategies::setStringForType):
792         * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Added PasteboardStrategy.
793
794 2012-02-13  Anders Carlsson  <andersca@apple.com>
795
796         The scrolling tree needs to know about the back forward state of the page
797         https://bugs.webkit.org/show_bug.cgi?id=78523
798         <rdar://problem/10756548>
799
800         Reviewed by Sam Weinig.
801
802         Pass the back/forward state in the WheelEvent message. This is pretty hacky but works well.
803
804         * Platform/CoreIPC/HandleMessage.h:
805         (CoreIPC):
806         (CoreIPC::callMemberFunction):
807         * UIProcess/WebPageProxy.cpp:
808         (WebKit::WebPageProxy::handleWheelEvent):
809         (WebKit::WebPageProxy::didReceiveEvent):
810         * WebProcess/WebPage/EventDispatcher.cpp:
811         (WebKit::EventDispatcher::wheelEvent):
812         * WebProcess/WebPage/EventDispatcher.h:
813         (EventDispatcher):
814         * WebProcess/WebPage/EventDispatcher.messages.in:
815
816 2012-02-13  Dan Bernstein  <mitz@apple.com>
817
818         WebKit2 build emits a warning about not stripping code-signed PluginProcess.app when copying it into the framework
819         https://bugs.webkit.org/show_bug.cgi?id=78451
820
821         Reviewed by Sam Weinig.
822
823         * Configurations/Base.xcconfig: Set COPY_PHASE_STRIP to NO.
824
825 2012-02-13  Sam Weinig  <sam@webkit.org>
826
827         Windows build fix.
828
829         * UIProcess/win/WebPopupMenuProxyWin.cpp:
830         (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
831
832 2012-02-13  Zalan Bujtas  <zbujtas@gmail.com>
833
834         Manage ShareableBitmap object lifecycle properly, when QImage is created
835         using the shared data.
836         https://bugs.webkit.org/show_bug.cgi?id=77546
837
838         Reviewed by Simon Hausmann.
839
840         * Shared/ShareableBitmap.h:
841         (ShareableBitmap):
842         * Shared/qt/ShareableBitmapQt.cpp:
843         (WebKit::ShareableBitmap::createQImage):
844         (WebKit):
845         (WebKit::ShareableBitmap::releaseSharedMemoryData):
846
847 2012-02-06  Raphael Kubo da Costa  <kubo@profusion.mobi>
848
849         [EFL] Drop support for the Curl network backend.
850         https://bugs.webkit.org/show_bug.cgi?id=77874
851
852         Reviewed by Eric Seidel.
853
854         Nobody seems to be maintaining the Curl backend in WebCore, the
855         EFL port developers all seem to be using the Soup backend and the
856         port itself has many features which are only implemented for the
857         latter.
858
859         * PlatformEfl.cmake: Unconditionally build the glib/soup source
860         files and unconditionally add the required include directories and
861         libraries.
862         * WebProcess/efl/WebProcessMainEfl.cpp:
863         (WebKit::WebProcessMainEfl): Remove USE(SOUP) check.
864
865 2012-02-11  Sheriff Bot  <webkit.review.bot@gmail.com>
866
867         Unreviewed, rolling out r107435.
868         http://trac.webkit.org/changeset/107435
869         https://bugs.webkit.org/show_bug.cgi?id=78410
870
871         It broke the Qt build (Requested by Ossy on #webkit).
872
873         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
874         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
875         (WebPlatformStrategies):
876
877 2012-02-10  Brian Weinstein  <bweinstein@apple.com>
878
879         Web Inspector: Add the ability to jump to the source for a given frame
880         https://bugs.webkit.org/show_bug.cgi?id=78396
881         
882         Add WebKit2 API for the ability to show the source of a frame in the web inspector. This calls down
883         from the WK API all the way to InspectorFrontendClientLocal::showMainResourceForFrame.
884
885         Reviewed by Tim Hatcher.
886
887         * UIProcess/API/C/WKInspector.cpp:
888         (WKInspectorShowMainResourceForFrame): Call WebInspectorProxy::showMainResourceForFrame.
889         * UIProcess/API/C/WKInspector.h:
890
891         * UIProcess/WebInspectorProxy.cpp:
892         (WebKit::WebInspectorProxy::showMainResourceForFrame): Send a message to the web process, passing
893             the frame ID of the frame we want to show the main resource of.
894         * UIProcess/WebInspectorProxy.h:
895
896         * WebProcess/WebPage/WebInspector.cpp:
897         (WebKit::WebInspector::showMainResourceForFrame): Get the WebFrame for the frame we want to show the
898             main resource of from its ID. If we found a frame, call InspectorFrontendClientLocal::showMainResourceForFrame.
899         * WebProcess/WebPage/WebInspector.h:
900         
901         * WebProcess/WebPage/WebInspector.messages.in: Add a new message.
902
903 2012-02-10  Adam Klein  <adamk@chromium.org>
904
905         Enable MUTATION_OBSERVERS by default on all platforms
906         https://bugs.webkit.org/show_bug.cgi?id=78196
907
908         Reviewed by Ojan Vafai.
909
910         * Configurations/FeatureDefines.xcconfig:
911
912 2012-02-10  Enrica Casucci  <enrica@apple.com>
913
914         Refactor Mac platform implementation of the Pasteboard class to use Platform Strategies.
915         https://bugs.webkit.org/show_bug.cgi?id=78282
916
917         This patch removes any accesss to the NSPasteboard object from the Pasteboard class which
918         now makes use of a new pasteboardStrategy object that is implemented both in WebKit and
919         WebKit2. The actual access to NSPasteboard is now performed inside the PlatformPasteboard
920         class. Currently both WebKit and WebKit2 use the same implementation of the PasteboardStrategy
921         interface but this one more step in the direction of removing access to NSPasteboard from
922         the WebProcess.
923         As part of the refactoring the I've reduced to a minimum the use of OBJ-C classes.
924         
925         Reviewed by Anders Carlsson.
926
927         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added implementation of PasteboardStrategy
928         interface.
929         (WebKit::WebPlatformStrategies::createPasteboardStrategy):
930         (WebKit::WebPlatformStrategies::getTypes):
931         (WebKit::WebPlatformStrategies::bufferForType):
932         (WebKit::WebPlatformStrategies::getPathnamesForType):
933         (WebKit::WebPlatformStrategies::stringForType):
934         (WebKit::WebPlatformStrategies::copy):
935         (WebKit::WebPlatformStrategies::setTypes):
936         (WebKit::WebPlatformStrategies::setBufferForType):
937         (WebKit::WebPlatformStrategies::setPathnamesForType):
938         (WebKit::WebPlatformStrategies::setStringForType):
939         * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Added PasteboardStrategy.
940
941 2012-02-09  Timothy Hatcher  <timothy@apple.com>
942
943         Prevent attaching when inspecting the Web Inspector.
944
945         Also adds some comments about keeping in sync with InspectorFrontendClientLocal::canAttachWindow
946         and why there are two implementations of the same function.
947
948         https://webkit.org/b/78304
949
950         Reviewed by Brian Weinstein.
951
952         * UIProcess/WebInspectorProxy.cpp:
953         (WebKit::WebInspectorProxy::canAttach): Prevent attaching when the page is an inspector page.
954         Added comments about InspectorFrontendClientLocal::canAttachWindow.
955         * UIProcess/WebInspectorProxy.h:
956         (WebInspectorProxy): Added comment about keeping in sync with InspectorFrontendClientLocal.
957
958 2012-02-09  Alexey Proskuryakov  <ap@apple.com>
959
960         Managed network proxy settings are not used in WebProcess
961         https://bugs.webkit.org/show_bug.cgi?id=78288
962         <rdar://problem/9962116>
963
964         Reviewed by Anders Carlsson.
965
966         * WebProcess/com.apple.WebProcess.sb: Allow reading managed preferences.
967
968 2012-02-09  Alexey Proskuryakov  <ap@apple.com>
969
970         ASSERTION FAILED: checkURLReceivedFromWebProcess(originalURL) loading a local file, if the WebProcess crashed
971         https://bugs.webkit.org/show_bug.cgi?id=70845
972         <rdar://problem/10269985>
973
974         Reviewed by Anders Carlsson.
975
976         This also fixes some case where WebProcess did not get a sandbox extension after a crash.
977
978         * UIProcess/WebPageProxy.cpp:
979         (WebKit::WebPageProxy::reattachToWebProcessWithItem): We no longer need to pass a sandbox
980         extension here, we're now passing it at b/f navigation bottleneck.
981         (WebKit::WebPageProxy::reload): Pass a sandbox extension - reload may mean reloading an error
982         page after a crash, so WebProcess may no longer have the extension.
983         (WebKit::WebPageProxy::goForward): We no longer need to pass a sandbox extension here,
984         we're now passing it at b/f navigation bottleneck. Also, fixed a bug where we first null checked
985         a WebBackForwardListItem pointer, and then used it anyway.
986         (WebKit::WebPageProxy::goBack): Ditto.
987         (WebKit::WebPageProxy::goToBackForwardItem): Ditto.
988         (WebKit::WebPageProxy::backForwardGoToItem): This is the bottleneck. We get here both for UI
989         actions like pressing the Back button, and for window.history.go() navigations. JS navigations
990         previously didn't open up the sandbox. URLs in UI process b/f list are trusted, so it's
991         always OK to grant a sandbox extension if one of them is a file: one.
992
993         * UIProcess/WebPageProxy.h: backForwardGoToItem() now returns a sandbox extension handle.
994
995         * UIProcess/WebPageProxy.messages.in: Ditto.
996
997         * UIProcess/WebProcessProxy.cpp:
998         (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess): If a URL is in UI process b/f
999         list, then it has been already vetted as something the Web process knows about. No need to
1000         crash if it actually attempts going there.
1001         (WebKit::WebProcessProxy::didReceiveInvalidMessage): Removed a useless comment (we have tons
1002         of fprintfs besides this one). Fixed log message syntax.
1003
1004         * UIProcess/cf/WebPageProxyCF.cpp: (WebKit::WebPageProxy::restoreFromSessionStateData):
1005         We no longer need to pass a sandbox extension here, we're now passing it at b/f navigation
1006         bottleneck. 
1007
1008         * WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::WebBackForwardListProxy::goToItem):
1009         We now get an extension here, when telling UI process that we're navigating to a b/f list item.
1010
1011         * WebProcess/WebPage/WebPage.cpp:
1012         (WebKit::WebPage::reload): Use the extension we're getting.
1013         (WebKit::WebPage::goForward): Don't use one we're not getting.
1014         (WebKit::WebPage::goBack): Ditto.
1015         (WebKit::WebPage::goToBackForwardItem): Ditto.
1016         (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem): Ditto.
1017
1018         * WebProcess/WebPage/WebPage.h: Adjusted signatures accordingly.
1019
1020         * WebProcess/WebPage/WebPage.messages.in: Ditto.
1021
1022 2012-02-09  Matthew Delaney  <mdelaney@apple.com>
1023
1024         HiDPI: WebKit2's drag images are blurry
1025         https://bugs.webkit.org/show_bug.cgi?id=67779
1026
1027         Use the proper deviceScaleFactor() instead of accessing _intrinsicDeviceScaleFactor
1028
1029         Reviewed by Beth Dakin.
1030
1031         * UIProcess/API/mac/WKView.mm:
1032         (-[WKView _setDragImage:at:linkDrag:]):
1033
1034 2012-02-09  Alexey Proskuryakov  <ap@apple.com>
1035
1036         [WK2] Allow reading some debug-only preference files
1037         https://bugs.webkit.org/show_bug.cgi?id=78255
1038         <rdar://problem/9382382>
1039         <rdar://problem/10830558>
1040
1041         Reviewed by Dan Bernstein.
1042
1043         * WebProcess/com.apple.WebProcess.sb:
1044
1045 2012-02-09  Matthew Delaney  <mdelaney@apple.com>
1046
1047         HiDPI: WebKit2's link-dragging images are blurry
1048         https://bugs.webkit.org/show_bug.cgi?id=67779
1049
1050         Reviewed by Beth Dakin.
1051
1052         Teach startDrag about the deviceScaleFactor so that it creates
1053         an appropriately scaled bitmap image to ship over.
1054         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1055         (WebKit::WebDragClient::startDrag):
1056         (WebKit::convertImageToBitmap):
1057
1058         Have setDragImage assume that it's receiving a bitmap image scaled
1059         up by the deviceScaleFactor that it sees.
1060         * UIProcess/API/mac/WKView.mm:
1061         (-[WKView _setDragImage:at:linkDrag:]):
1062
1063 2012-02-09  Carlos Garcia Campos  <cgarcia@igalia.com>
1064
1065         [GTK] Add WebKitWebView::mouse-target-changed signal to WebKit2 GTK+ API
1066         https://bugs.webkit.org/show_bug.cgi?id=78097
1067
1068         Reviewed by Martin Robinson.
1069
1070         * GNUmakefile.am: Add new files to compilation.
1071         * UIProcess/API/gtk/WebKitHitTestResult.cpp: Added.
1072         (webkitHitTestResultFinalize):
1073         (webkitHitTestResultGetProperty):
1074         (webkitHitTestResultSetProperty):
1075         (webkit_hit_test_result_init):
1076         (webkit_hit_test_result_class_init):
1077         (webkitHitTestResultCreate): Create a new WebKitHitTestResult for
1078         the given WKHitTestResult.
1079         (stringIsEqualToCString): Helper function to compare String and
1080         CString considering String::isEmpty() == CString.isNull().
1081         (webkitHitTestResultCompare): Helper function to check whether a
1082         WebKitHitTestResult contains the same information than the given
1083         WKHitTestResult.
1084         (webkit_hit_test_result_get_context):
1085         (webkit_hit_test_result_context_is_link):
1086         (webkit_hit_test_result_context_is_image):
1087         (webkit_hit_test_result_context_is_media):
1088         (webkit_hit_test_result_get_link_uri):
1089         (webkit_hit_test_result_get_link_title):
1090         (webkit_hit_test_result_get_link_label):
1091         (webkit_hit_test_result_get_image_uri):
1092         (webkit_hit_test_result_get_media_uri):
1093         * UIProcess/API/gtk/WebKitHitTestResult.h: Added.
1094         * UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
1095         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
1096         (webkitNavigationPolicyDecisionCreate): Use
1097         wkEventModifiersToGdkModifiers.
1098         * UIProcess/API/gtk/WebKitPrivate.cpp:
1099         (wkEventModifiersToGdkModifiers): Moved from
1100         WebKitNavigationPolicyDecision and renamed to wkEventModifiersToGdkModifiers.
1101         * UIProcess/API/gtk/WebKitPrivate.h:
1102         * UIProcess/API/gtk/WebKitUIClient.cpp:
1103         (mouseDidMoveOverElement): UI client callback that calls
1104         webkitWebViewMouseTargetChanged().
1105         (attachUIClientToView): Add implementation for callback
1106         mouseDidMoveOverElement.
1107         * UIProcess/API/gtk/WebKitWebView.cpp:
1108         (webkit_web_view_class_init): Add
1109         WebKitWebView::mouse-target-changed signal.
1110         (webkitWebViewMouseTargetChanged): Emit
1111         WebKitWebView::mouse-target-changed signal.
1112         * UIProcess/API/gtk/WebKitWebView.h:
1113         * UIProcess/API/gtk/WebKitWebViewPrivate.h:
1114         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
1115         WebKitHitTestResult.
1116         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
1117         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1118         (testWebViewMouseTarget):
1119         (beforeAll):
1120         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1121         (WebViewTest::WebViewTest):
1122         (WebViewTest::~WebViewTest):
1123         (parentWindowMapped):
1124         (WebViewTest::showInWindowAndWaitUntilMapped): Method to add the
1125         view into a popup window and show it running the main loop until
1126         the window is mapped.
1127         (WebViewTest::mouseMoveTo): Method to synthesize a
1128         GDK_MOTION_EVENT on the given coordinates and using the given
1129         modifiers.
1130         * UIProcess/API/gtk/tests/WebViewTest.h:
1131         * UIProcess/API/gtk/webkit2.h: Include WebKitHitTestResult.h.
1132         * UIProcess/API/gtk/webkit2marshal.list:
1133
1134 2012-02-07  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1135
1136         [Qt] Fetch the visible rect from LayerTreeHost instead of keeping a copy in each layer.
1137         https://bugs.webkit.org/show_bug.cgi?id=78009
1138
1139         Reviewed by Noam Rosenthal.
1140
1141         Since WebGraphicsLayers are now accessed directly from LayerTreeHost, they don't
1142         need to keep the visible rect to pass it down their child layers anymore.
1143
1144         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1145         (WebCore::WebGraphicsLayer::setContentsScale):
1146         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
1147         (WebCore::WebGraphicsLayer::adjustVisibleRect):
1148         (WebCore):
1149         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
1150         (WebGraphicsLayerClient):
1151         (WebGraphicsLayer):
1152         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1153         (WebKit::LayerTreeHostQt::registerLayer):
1154         (WebKit::LayerTreeHostQt::visibleContentsRect):
1155         (WebKit):
1156         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
1157         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
1158         (LayerTreeHostQt):
1159
1160 2012-02-09  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1161
1162         [Qt] Control the lifetime of TiledBackingStores in WebGraphicsLayer.
1163         https://bugs.webkit.org/show_bug.cgi?id=78005
1164
1165         Reviewed by Noam Rosenthal.
1166
1167         This makes sure that no empty tiles are generated for layers without contents and that
1168         no interaction is made with the TiledBackingStore until we got a WebGraphicsLayerClient.
1169
1170         - Create the main TiledBackingStore only when the layer has drawsContent and has no
1171           directly composited image
1172         - Removed recreateBackingStoreIfNeeded and do the (re)creation of the backing stores
1173           in updateContentBuffers
1174         - Call purgeBackingStores on registered layers instead of passing it down the layer tree
1175
1176         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1177         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
1178         (WebCore::WebGraphicsLayer::~WebGraphicsLayer):
1179         (WebCore::WebGraphicsLayer::setDrawsContent):
1180         (WebCore::WebGraphicsLayer::setNeedsDisplayInRect):
1181         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
1182         (WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector):
1183         (WebCore::WebGraphicsLayer::tiledBackingStoreContentsRect):
1184         (WebCore::WebGraphicsLayer::updateContentBuffers):
1185         (WebCore::WebGraphicsLayer::purgeBackingStores):
1186         (WebCore::WebGraphicsLayer::setWebGraphicsLayerClient):
1187         (WebCore::WebGraphicsLayer::computeTransformedVisibleRect):
1188         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
1189         (WebGraphicsLayer):
1190         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1191         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
1192         (WebKit::LayerTreeHostQt::flushPendingLayerChanges):
1193         (WebKit):
1194         (WebKit::LayerTreeHostQt::purgeBackingStores):
1195         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
1196         (LayerTreeHostQt):
1197
1198 2012-02-08  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1199
1200         [Qt] Remove WebGraphicsLayer::updateTileBuffersRecursively
1201         https://bugs.webkit.org/show_bug.cgi?id=78105
1202
1203         Reviewed by Kenneth Rohde Christiansen.
1204
1205         The method is unused.
1206
1207         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1208         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
1209         (WebGraphicsLayer):
1210
1211 2012-02-08  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1212
1213         [Qt] Register individual WebGraphicsLayers to LayerTreeHost instead of handling the tree as a whole.
1214         https://bugs.webkit.org/show_bug.cgi?id=77976
1215
1216         Reviewed by Kenneth Rohde Christiansen.
1217
1218         The LayerTreeHost association had to be maintained between re-parented layers and it would be
1219         impossible to know if the layer would be disconnected from the LayerTreeHost only for reparenting
1220         or disconnected for good (in other words, that the LayerTreeHost could be deleted meanwhile).
1221
1222         Instead, this patch assumes that graphics layers will only be in contact with one instance of
1223         LayerTreeHost, and that this association can be kept until either the graphics layer or the layer
1224         tree host gets deleted.
1225
1226         The registered layers are kept in a set and the visible rect and scales are passed directly
1227         to layers instead of down the tree, through the root layer.
1228
1229         This also fixes the !m_layerInfo.imageBackingStoreID ASSERT that was popping in unit tests.
1230
1231         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
1232         (WebCore::WebGraphicsLayer::WebGraphicsLayer):
1233         (WebCore::WebGraphicsLayer::~WebGraphicsLayer):
1234         (WebCore::WebGraphicsLayer::setChildren):
1235         (WebCore::WebGraphicsLayer::addChild):
1236         (WebCore::WebGraphicsLayer::addChildAtIndex):
1237         (WebCore::WebGraphicsLayer::addChildAbove):
1238         (WebCore::WebGraphicsLayer::addChildBelow):
1239         (WebCore::WebGraphicsLayer::replaceChild):
1240         (WebCore::WebGraphicsLayer::removeFromParent):
1241         (WebCore::WebGraphicsLayer::setContentsToImage):
1242         (WebCore::WebGraphicsLayer::setMaskLayer):
1243         (WebCore::WebGraphicsLayer::setReplicatedByLayer):
1244         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
1245         (WebCore::WebGraphicsLayer::setVisibleContentRectAndScale):
1246         (WebCore::WebGraphicsLayer::tiledBackingStoreUpdatesAllowed):
1247         (WebCore::WebGraphicsLayer::createTile):
1248         (WebCore::WebGraphicsLayer::updateTile):
1249         (WebCore::WebGraphicsLayer::removeTile):
1250         (WebCore::WebGraphicsLayer::updateContentBuffers):
1251         (WebCore::WebGraphicsLayer::purgeBackingStores):
1252         (WebCore::WebGraphicsLayer::setWebGraphicsLayerClient):
1253         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
1254         (WebCore):
1255         (WebGraphicsLayerClient):
1256         (WebGraphicsLayer):
1257         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1258         (WebKit::LayerTreeHostQt::~LayerTreeHostQt):
1259         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
1260         (WebKit::LayerTreeHostQt::attachLayer):
1261         (WebKit):
1262         (WebKit::LayerTreeHostQt::detachLayer):
1263         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
1264         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
1265         (LayerTreeHostQt):
1266
1267 2012-02-07  Andras Becsi  <andras.becsi@nokia.com>
1268
1269         [Qt][WK2] WebView should use Flickable instead of QScroller to handle positioning
1270         https://bugs.webkit.org/show_bug.cgi?id=76275
1271
1272         Reviewed by Simon Hausmann and Kenneth Rohde Christiansen.
1273
1274         The current WebView implementation uses QScroller to manage positioning but other
1275         similar items in QML (ie. ListView, GridView) use Flickable as their base class.
1276         Since QScroller will be dropped from Qt5 this patch removes the QScroller code
1277         and redirects pan gestures to a dynamically created encapsulated Flickable instance
1278         (QtFlickProvider) which handles the positioning.
1279
1280         This implementation only uses public QML API and does not depend on declarative-private.
1281         It propagates a small subset of the Flickable API as the public API of the WebView.
1282         This minimalistic API is accessible via the experimental extension and makes it possible
1283         in QML to place additional items (such as toolbars, scroll indicators and floating menus)
1284         aroud the page.
1285         These items can use anchoring and binding for positioning on the flickable contentItem.
1286
1287         The patch depends however on the automatic touch->mouse event synthetization of Qt5.
1288         The touch events sent to the flickProvider are translated to mouse events automatically
1289         as long as the Flickable does not handle touch events directly.
1290
1291         After this change QtWebKit2 does no longer depend on QtWidgets and this dependency can be
1292         removed in a follow-up patch.
1293
1294         * Target.pri: Added QtFlickProvider source.
1295         * UIProcess/API/qt/qquickwebpage.cpp:
1296         (QQuickWebPagePrivate::paintToCurrentGLContext):
1297         (QQuickWebPage::transformToItem):
1298         (QQuickWebPagePrivate::updateSize):
1299         * UIProcess/API/qt/qquickwebview.cpp:
1300         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1301         (QQuickWebViewPrivate::pageItemPos):
1302         (QQuickWebViewFlickablePrivate::pageItemPos):
1303         (QQuickWebViewFlickablePrivate::updateContentsSize):
1304         (QQuickWebViewFlickablePrivate::onComponentComplete):
1305         (QQuickWebViewFlickablePrivate::updateViewportSize):
1306         (QQuickWebViewExperimental::flickableData):
1307         (QQuickWebViewExperimental::contentItem):
1308         (QQuickWebViewExperimental::contentWidth):
1309         (QQuickWebViewExperimental::setContentWidth):
1310         (QQuickWebViewExperimental::contentHeight):
1311         (QQuickWebViewExperimental::setContentHeight):
1312         (QQuickWebViewExperimental::contentX):
1313         (QQuickWebViewExperimental::setContentX):
1314         (QQuickWebViewExperimental::contentY):
1315         (QQuickWebViewExperimental::setContentY):
1316         (QQuickWebView::pageItemPos):
1317         (QQuickWebView::updateContentsSize):
1318         * UIProcess/API/qt/qquickwebview_p.h:
1319         * UIProcess/API/qt/qquickwebview_p_p.h:
1320         (QQuickWebViewPrivate):
1321         (QQuickWebViewPrivate::updateContentsSize):
1322         (QQuickWebViewFlickablePrivate):
1323         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1324         (tst_QQuickWebView::scrollRequest):
1325         * UIProcess/qt/QtFlickProvider.cpp: Added.
1326         (QtFlickProvider::QtFlickProvider):
1327         (QtFlickProvider::handleTouchFlickEvent):
1328         (QtFlickProvider::contentItem):
1329         (QtFlickProvider::flickableData):
1330         (QtFlickProvider::contentPos):
1331         (QtFlickProvider::setContentPos):
1332         (QtFlickProvider::viewportSize):
1333         (QtFlickProvider::setViewportSize):
1334         (QtFlickProvider::returnToBounds):
1335         (QtFlickProvider::cancelFlick):
1336         (QtFlickProvider::isMoving):
1337         (QtFlickProvider::isDragging):
1338         (QtFlickProvider::isFlicking):
1339         (QtFlickProvider::contentWidth):
1340         (QtFlickProvider::setContentWidth):
1341         (QtFlickProvider::contentHeight):
1342         (QtFlickProvider::setContentHeight):
1343         (QtFlickProvider::contentX):
1344         (QtFlickProvider::setContentX):
1345         (QtFlickProvider::contentY):
1346         (QtFlickProvider::setContentY):
1347         * UIProcess/qt/QtFlickProvider.h: Added.
1348         (QtFlickProvider):
1349         * UIProcess/qt/QtPanGestureRecognizer.cpp:
1350         (WebKit::QtPanGestureRecognizer::recognize):
1351         * UIProcess/qt/QtPanGestureRecognizer.h:
1352         (QtPanGestureRecognizer):
1353         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1354         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
1355         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
1356         (WebKit::QtViewportInteractionEngine::scrollStateChanged):
1357         (WebKit):
1358         (WebKit::QtViewportInteractionEngine::wheelEvent):
1359         (WebKit::QtViewportInteractionEngine::reset):
1360         (WebKit::QtViewportInteractionEngine::applyConstraints):
1361         (WebKit::QtViewportInteractionEngine::scrollAnimationActive):
1362         (WebKit::QtViewportInteractionEngine::panGestureActive):
1363         (WebKit::QtViewportInteractionEngine::panGestureStarted):
1364         (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate):
1365         (WebKit::QtViewportInteractionEngine::panGestureCancelled):
1366         (WebKit::QtViewportInteractionEngine::panGestureEnded):
1367         (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate):
1368         (WebKit::QtViewportInteractionEngine::scaleContent):
1369         * UIProcess/qt/QtViewportInteractionEngine.h:
1370         (QtViewportInteractionEngine):
1371         * UIProcess/qt/QtWebPageEventHandler.cpp:
1372         (QtWebPageEventHandler::doneWithTouchEvent):
1373
1374 2012-02-08  Keunsoon Lee  <keunsoon.lee@samsung.com>
1375
1376         [WK2][EFL] creating dummy class derived from ResourceHandleClient for Efl download module.
1377         https://bugs.webkit.org/show_bug.cgi?id=76171
1378
1379         Reviewed by Andreas Kling.
1380
1381         FileDownloaderEfl is a practical class to operate file download.
1382         It communicates with Download class to start download
1383         and to notify downloading states to user(e.g. client application).
1384         Besides FileDownloaderEfl derives from ResourceHandleClient
1385         and receives chunked data from ResourceHandle directly
1386         or redirects data flow which is started from MainResourceLoader
1387         by mean of exchanging ResourceHandle's existing client for FileDownloaderEfl.
1388
1389         This patch has only dummy functions to make easy to review.
1390         Working patch will be uploaded on another bug thread.
1391
1392         * PlatformEfl.cmake: added new file to compile.
1393         * WebProcess/Downloads/Download.h: added FileDownloaderEfl's instance as a form of OwnPtr<FileDownloaderEfl>.
1394         (WebKit):
1395         (Download):
1396         * WebProcess/Downloads/efl/DownloadEfl.cpp:
1397         (WebKit::Download::start): calling to FileDownloaderEfl::start() to start download for passing ResourceRequest.
1398         * WebProcess/Downloads/efl/FileDownloaderEfl.cpp: Added. a practical class to operate file download.
1399         (WebKit):
1400         (WebKit::FileDownloaderEfl::create): create function, which returns PassOwnPtr<FileDownloaderEfl>.
1401         (WebKit::FileDownloaderEfl::FileDownloaderEfl): constructor, which receives Download* as a parameter.
1402         (WebKit::FileDownloaderEfl::~FileDownloaderEfl): deconstructor.
1403         (WebKit::FileDownloaderEfl::start): a function to start downloading for passed ResourceRequest.
1404         It does nothing for now, but shows how Download class can call FileDownloaderEfl's function.
1405         (WebKit::FileDownloaderEfl::didReceiveResponse): virtual function for ResourceHandleClient.
1406         It will receive response header information from ResourceHandle.
1407         (WebKit::FileDownloaderEfl::didReceiveData): virtual function for ResourceHandleClient.
1408         It will receive chunk data from ResourceHandle.
1409         (WebKit::FileDownloaderEfl::didFinishLoading): virtual function for ResourceHandleClient.
1410         It will be notified loading is finished from ResourceHandle.
1411         (WebKit::FileDownloaderEfl::didFail): virtual function for ResourceHandleClient.
1412         It will be notified loading is fail with ResourceError from ResourceHandle.
1413         (WebKit::FileDownloaderEfl::shouldUseCredentialStorage): virtual function for ResourceHandleClient.
1414         It returns whether to use credential storage or not.
1415         (WebKit::FileDownloaderEfl::didReceiveAuthenticationChallenge): virtual function for ResourceHandleClient.
1416         It will receive AuthenticationChallenge.
1417         (WebKit::FileDownloaderEfl::didCancelAuthenticationChallenge): virtual function for ResourceHandleClient.
1418         It will be notified AuthenticationChallenge is canceled.
1419         (WebKit::FileDownloaderEfl::receivedCancellation): virtual function for ResourceHandleClient.
1420         * WebProcess/Downloads/efl/FileDownloaderEfl.h: Added.
1421         (WebCore):
1422         (WebKit):
1423         (FileDownloaderEfl):
1424
1425 2012-02-07  MORITA Hajime  <morrita@google.com>
1426
1427         Replacement text should be available from the marker.
1428         https://bugs.webkit.org/show_bug.cgi?id=77934
1429
1430         Reviewed by Kent Tamura.
1431
1432         * win/WebKit2.def:
1433         * win/WebKit2CFLite.def:
1434
1435 2012-02-08  Anders Carlsson  <andersca@apple.com>
1436
1437         Don't use the wheel event handler count to track if a page has horizontal scrollbars
1438         https://bugs.webkit.org/show_bug.cgi?id=78192
1439
1440         Reviewed by Andreas Kling.
1441
1442         Prior to this change, we were incrementing and decrementing the wheel event handler count
1443         whenever a scrollable area gained or lost a horizontal scrollbar, so we could use the count
1444         to determine if Safari can handle horizontal wheel events directly or whether they have to be sent
1445         to the web process first.
1446
1447         What this meant was that whenever a page had horizontal scrollbars we'd have to send all scroll wheel events
1448         to the main thread instead of the scrolling thread, regardless of whether there were any wheel event handlers.
1449         
1450         After this change, we traverse the tree of scrollable areas after every layout and check if any of them
1451         have a horizontal scrollbar. (We still also check if there are wheel event handlers).
1452
1453         If traversing the tree after every layout is deemed to slow we can go back to caching the number of horizontal scrollbars
1454         in a page, but the number of subframes in a page is usually very small and the number of other scrollable areas is even smaller.
1455
1456         * UIProcess/WebPageProxy.cpp:
1457         (WebKit::WebPageProxy::WebPageProxy):
1458         (WebKit::WebPageProxy::willHandleHorizontalScrollEvents):
1459         * UIProcess/WebPageProxy.h:
1460         (WebKit::WebPageProxy::setCanShortCircuitHorizontalWheelEvents):
1461         (WebPageProxy):
1462         * UIProcess/WebPageProxy.messages.in:
1463         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1464         (WebKit::WebChromeClient::numWheelEventHandlersChanged):
1465         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1466         (WebKit::WebFrameLoaderClient::dispatchDidLayout):
1467         * WebProcess/WebPage/WebPage.cpp:
1468         (WebKit::WebPage::WebPage):
1469         (WebKit::WebPage::numWheelEventHandlersChanged):
1470         (WebKit):
1471         (WebKit::hasEnabledHorizontalScrollbar):
1472         (WebKit::pageContainsAnyHorizontalScrollbars):
1473         (WebKit::WebPage::recomputeShortCircuitHorizontalWheelEventsState):
1474         * WebProcess/WebPage/WebPage.h:
1475         (WebPage):
1476
1477 2012-02-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1478
1479         Unreviewed, rolling out r106920, r106924, r106933, r106939,
1480         and r107090.
1481         http://trac.webkit.org/changeset/106920
1482         http://trac.webkit.org/changeset/106924
1483         http://trac.webkit.org/changeset/106933
1484         http://trac.webkit.org/changeset/106939
1485         http://trac.webkit.org/changeset/107090
1486         https://bugs.webkit.org/show_bug.cgi?id=78124
1487
1488         Something is completely wrong this change (Requested by
1489         Ossy_gardener on #webkit).
1490
1491         * Shared/WebProcessCreationParameters.cpp:
1492         (WebKit::WebProcessCreationParameters::encode):
1493         (WebKit::WebProcessCreationParameters::decode):
1494         * Shared/WebProcessCreationParameters.h:
1495         (WebProcessCreationParameters):
1496         * UIProcess/WebContext.cpp:
1497         (WebKit::WebContext::WebContext):
1498         * UIProcess/qt/WebContextQt.cpp:
1499         (WebKit::WebContext::platformInitializeWebProcess):
1500         * WebProcess/qt/WebProcessQt.cpp:
1501         (WebKit):
1502         (WebKit::WebProcess::platformSetCacheModel):
1503         (WebKit::WebProcess::platformInitializeWebProcess):
1504
1505 2012-02-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1506
1507         [GTK] Fix a crash when WebKitWebView is created without a WebContext
1508         https://bugs.webkit.org/show_bug.cgi?id=78104
1509
1510         Reviewed by Philippe Normand.
1511
1512         * UIProcess/API/gtk/WebKitWebView.cpp:
1513         (webkitWebViewSetProperty): Make sure WebKitWebView:web-context
1514         property is initialized to the default web context when a web
1515         context is not passed to g_object_new().
1516         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1517         (testWebViewDefaultContext): Check that a web view created with
1518         g_object_new has the default context.
1519
1520 2012-02-08  Michael Brüning  <michael.bruning@nokia.com>
1521
1522         [Qt][WK2] Compute and set cache capacities using the current CacheModel
1523         https://bugs.webkit.org/show_bug.cgi?id=73918
1524
1525         Reviewed by Kenneth Rohde Christiansen.
1526
1527         * UIProcess/WebContext.cpp:
1528         (WebKit::WebContext::WebContext): Set default cacheModel for Qt platform to
1529         CacheModelPrimaryWebBrowser.
1530
1531 2012-02-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1532
1533         [GTK] Fix WebKitWebView::decide-policy API documentation
1534         https://bugs.webkit.org/show_bug.cgi?id=78101
1535
1536         Reviewed by Martin Robinson.
1537
1538         - It refers to WebKitPolicyClient instead of WebKitWebView
1539         - Trailing ':' is missing
1540         - References @decision as WebKitNavigationPolicyDecision instead
1541         of WebKitPolicyDecision
1542
1543         * UIProcess/API/gtk/WebKitWebView.cpp:
1544         (webkit_web_view_class_init):
1545
1546 2012-02-08  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
1547
1548         [Qt] Build broken if qt missing openssl
1549         https://bugs.webkit.org/show_bug.cgi?id=77894
1550
1551         Reviewed by Chang Shu.
1552
1553         Build fix. No new test content. 
1554
1555         * WebProcess/qt/QtNetworkAccessManager.cpp:
1556         (WebKit::QtNetworkAccessManager::onSslErrors):
1557
1558 2012-02-08  Yael Aharon  <yael.aharon@nokia.com>
1559
1560         [WK2] Text notifications should have an iconURL
1561         https://bugs.webkit.org/show_bug.cgi?id=77968
1562
1563         Reviewed by Simon Hausmann.
1564         
1565         Per http://www.w3.org/TR/notifications simple text notifications should have an iconURL.
1566         Add an iconURL to WebNotification and add a public API to access it.
1567        
1568         * UIProcess/API/C/WKNotification.cpp:
1569         (WKNotificationCopyiconURL):
1570         * UIProcess/API/C/WKNotification.h:
1571         * UIProcess/Notifications/WebNotification.cpp:
1572         (WebKit::WebNotification::WebNotification):
1573         * UIProcess/Notifications/WebNotification.h:
1574         (WebKit::WebNotification::create):
1575         (WebKit::WebNotification::iconURL):
1576         (WebNotification):
1577         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
1578         (WebKit::WebNotificationManagerProxy::show):
1579         * UIProcess/Notifications/WebNotificationManagerProxy.h:
1580         (WebNotificationManagerProxy):
1581         * UIProcess/WebPageProxy.cpp:
1582         (WebKit::WebPageProxy::showNotification):
1583         * UIProcess/WebPageProxy.h:
1584         (WebPageProxy):
1585         * UIProcess/WebPageProxy.messages.in:
1586         * WebProcess/Notifications/WebNotificationManager.cpp:
1587         (WebKit::WebNotificationManager::show):
1588
1589 2012-02-08  Philippe Normand  <pnormand@igalia.com>
1590
1591         [GTK][WK2] enable-webaudio WebSetting
1592         https://bugs.webkit.org/show_bug.cgi?id=77959
1593
1594         Reviewed by Martin Robinson.
1595
1596         Add a new WebKitGTK WebSetting to enable/disable WebAudio at
1597         runtime.
1598
1599         * UIProcess/API/gtk/WebKitSettings.cpp:
1600         (webKitSettingsSetProperty):
1601         (webKitSettingsGetProperty):
1602         (webkit_settings_class_init):
1603         (webkit_settings_get_enable_webaudio):
1604         (webkit_settings_set_enable_webaudio):
1605         * UIProcess/API/gtk/WebKitSettings.h:
1606         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
1607         (testWebKitSettings):
1608
1609 2012-02-07  Martin Robinson  <mrobinson@igalia.com>
1610
1611         [GTK] [WK2] Add WebKitResponsePolicyDecision
1612         https://bugs.webkit.org/show_bug.cgi?id=76789
1613
1614         Reviewed by Philippe Normand.
1615
1616         Add a WebKitResponsePolicyDecision GObject, use it for response
1617         policy decisions and add a test.
1618
1619         * GNUmakefile.am: Added new source files to the list.
1620         * UIProcess/API/gtk/WebKitPolicyClient.cpp:
1621         (decidePolicyForResponseCallback): Added this callback which creates the request
1622         and fires the signal.
1623         (attachPolicyClientToPage): Added new callback to the C API policy client.
1624         * UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp: Added.
1625         * UIProcess/API/gtk/WebKitResponsePolicyDecision.h: Added.
1626         * UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h: Added.
1627         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new docs.
1628         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
1629         * UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp:
1630         (testResponsePolicy): Added this test for response policy decisions.
1631         (serverCallback): Added a SoupServer to test policy response policy decisions.
1632         (beforeAll): Ditto.
1633         (afterAll): Ditto.
1634
1635 2012-02-07  Timothy Hatcher  <timothy@apple.com>
1636
1637         Avoid making a window for the Web Inspector when it is docked.
1638
1639         This also makes sure the inspector WKView is in a window before the page is loaded.
1640         This avoids some redundant work caused by moving it to a window later.
1641
1642         https://webkit.org/b/78064
1643
1644         Reviewed by Brian Weinstein.
1645
1646         * UIProcess/WebInspectorProxy.cpp:
1647         (WebKit::WebInspectorProxy::createInspectorPage): Set m_isAttached here...
1648         (WebKit::WebInspectorProxy::didLoadInspectorPage): ... instead of here.
1649         * UIProcess/WebInspectorProxy.h:
1650         (WebInspectorProxy):
1651         * UIProcess/mac/WebInspectorProxyMac.mm:
1652         (WebKit::WebInspectorProxy::createInspectorWindow): Added. Factored out of platformOpen.
1653         (WebKit::WebInspectorProxy::updateInspectorWindowTitle): Added. Factored out of platformInspectedURLChanged.
1654         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Call platformAttach or createInspectorWindow.
1655         (WebKit::WebInspectorProxy::platformOpen): Make the view or window visible.
1656         (WebKit::WebInspectorProxy::platformDidClose): Only message m_inspectorWindow if it isn't nil.
1657         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Store the urlString and call updateInspectorWindowTitle.
1658         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Return early if not visible.
1659         (WebKit::WebInspectorProxy::platformAttach): Start out hidden if we are not visible yet. Destroy the window.
1660         (WebKit::WebInspectorProxy::platformDetach): Use createInspectorWindow to create it again.
1661
1662 2012-02-07  Tony Chang  <tony@chromium.org>
1663
1664         merge DashboardSupportCSSPropertyNames.in into CSSPropertyNames.in
1665         https://bugs.webkit.org/show_bug.cgi?id=78036
1666
1667         Reviewed by Darin Adler.
1668
1669         * Configurations/FeatureDefines.xcconfig: Add ENABLE_DASHBOARD_SUPPORT to FEATURE_DEFINES.
1670
1671 2012-02-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1672
1673         [CMAKE] Use *bin* and *lib* directories for executable and libraries.
1674         https://bugs.webkit.org/show_bug.cgi?id=77928
1675
1676         Reviewed by Daniel Bates.
1677
1678         CMake has used *Programs* directory for executable. In addition, shared libraries are being
1679         built in source directory. It is better to set common places in order to maintain executable
1680         and libraries. *bin* is for executable and *lib* is for library.
1681
1682         * CMakeLists.txt:
1683
1684 2012-02-07  Timothy Hatcher  <timothy@apple.com>
1685
1686         Initilize the WebPageProxy intrinsicDeviceScaleFactor on creation of the WKView.
1687
1688         If WKView was created and loaded a page with canvas elements before beinging moved
1689         to a window, the canvas elements would be locked in at a pixel ratio of 1. With this
1690         change the WKView will use the main screen's pixel ratio until it moves to a window.
1691
1692         Reviewed by Anders Carlsson.
1693
1694         * UIProcess/API/mac/WKView.mm:
1695         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Call setIntrinsicDeviceScaleFactor.
1696
1697 2012-02-07  Alexey Proskuryakov  <ap@apple.com>
1698
1699         Keep a reference in didReceiveInvalidMessage.
1700         https://bugs.webkit.org/show_bug.cgi?id=78024
1701
1702         Reviewed by Anders Carlsson.
1703
1704         * UIProcess/WebConnectionToWebProcess.cpp:
1705         (WebKit::WebConnectionToWebProcess::didReceiveInvalidMessage):
1706
1707 2012-02-06  Anders Carlsson  <andersca@apple.com>
1708
1709         ScrollableAreaSet should be moved from Page to FrameView
1710         https://bugs.webkit.org/show_bug.cgi?id=62762
1711
1712         Reviewed by Beth Dakin.
1713
1714         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
1715         (WebKit::BuiltInPDFView::initialize):
1716         Call FrameView::addScrollableArea instead.
1717
1718         (WebKit::BuiltInPDFView::destroy):
1719         Call FrameView::removeScrollableArea instead.
1720
1721         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
1722         Remove disconnectFromPage since it no longer exists on ScrollableArea.
1723
1724 2012-02-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1725
1726         [GTK] Add cut, copy and paste methods to WebKit2 GTK+ API
1727         https://bugs.webkit.org/show_bug.cgi?id=76998
1728
1729         Reviewed by Martin Robinson.
1730
1731         * GNUmakefile.am: Add WebKitEditingCommands.h.
1732         * UIProcess/API/gtk/WebKitEditingCommands.h: Added.
1733         * UIProcess/API/gtk/WebKitWebView.cpp:
1734         (didValidateCommand): Callback called by the C API when an editor
1735         command has been validated.
1736         (webkit_web_view_can_execute_editing_command): Asynchronously
1737         validate the given editing command.
1738         (webkit_web_view_can_execute_editing_command_finish): Finish async
1739         operation started by webkit_web_view_can_execute_editing_command().
1740         (webkit_web_view_execute_editing_command): Execute the given
1741         command.
1742         * UIProcess/API/gtk/WebKitWebView.h:
1743         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
1744         * UIProcess/API/gtk/tests/GNUmakefile.am:
1745         * UIProcess/API/gtk/tests/LoadTrackingTest.cpp:
1746         (LoadTrackingTest::provisionalLoadFailed): Do not finish the main
1747         loop on load failure, now finished is always called.
1748         * UIProcess/API/gtk/tests/TestBackForwardList.cpp: Use WebViewTest
1749         instead of LoadTrackingTest.
1750         * UIProcess/API/gtk/tests/TestWebViewEditor.cpp: Added.
1751         (testWebViewEditorCutCopyPasteNonEditable):
1752         (testWebViewEditorCutCopyPasteEditable):
1753         (beforeAll):
1754         (afterAll):
1755         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1756         (loadChanged):
1757         (WebViewTest::waitUntilLoadFinished): Run a main loop until load
1758         finished.
1759         * UIProcess/API/gtk/tests/WebViewTest.h: Add waitUntilLoadFinished().
1760         * UIProcess/API/gtk/webkit2.h: Include WebKitEditingCommands.h.
1761
1762 2012-02-07  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1763
1764         Encode radius, force and rotationAngle in WebPlatformTouchPoint.
1765         https://bugs.webkit.org/show_bug.cgi?id=77986
1766
1767         Reviewed by Kenneth Rohde Christiansen.
1768
1769         * Shared/WebEvent.h:
1770         (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
1771         (WebPlatformTouchPoint):
1772         (WebKit::WebPlatformTouchPoint::radius):
1773         (WebKit::WebPlatformTouchPoint::rotationAngle):
1774         (WebKit::WebPlatformTouchPoint::force):
1775         * Shared/WebEventConversion.cpp:
1776         (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
1777         * Shared/WebPlatformTouchPoint.cpp:
1778         (WebKit::WebPlatformTouchPoint::WebPlatformTouchPoint):
1779         (WebKit::WebPlatformTouchPoint::encode):
1780         (WebKit::WebPlatformTouchPoint::decode):
1781
1782 2012-02-07  Andras Becsi  <andras.becsi@nokia.com>
1783
1784         [Qt] [WK2] Fix the debug build after r106920
1785
1786         * WebProcess/qt/WebProcessQt.cpp:
1787         (WebKit::WebProcess::platformSetCacheModel):
1788         Remove unnecessary assert.
1789
1790 2012-02-03  Andras Becsi  <andras.becsi@nokia.com>
1791
1792         [Qt][WK2] Add the componentComplete method to WebView
1793         https://bugs.webkit.org/show_bug.cgi?id=77111
1794
1795         Reviewed by Simon Hausmann.
1796
1797         Move the initialization of the interaction engine to componentComplete
1798         in preparation of switching to a Flickable based content positioning
1799         for the touch based WebView.
1800         Suspend the page and delay the dispatch of load success on startup until
1801         the component finished initialization. With this patch instantiating the
1802         WebView in C++ is only possible by creating a QDeclarativeComponent as
1803         the initialization depends on the componentComplete method being called.
1804         Also return valid default values in the viewport info functions if the
1805         interaction engine is not yet initialized because the viewport info
1806         component could finish initialization earlier than the WebView, which
1807         results in QML warnings during MiniBrowser startup.
1808
1809         * UIProcess/API/qt/qquickwebview.cpp:
1810         (QQuickWebViewPrivate::initialize):
1811         (QQuickWebViewPrivate::loadDidSucceed):
1812         (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
1813         (QQuickWebViewFlickablePrivate::initialize):
1814         (QQuickWebViewFlickablePrivate::onComponentComplete):
1815         (QQuickWebViewFlickablePrivate::loadDidSucceed):
1816         (QQuickWebViewFlickablePrivate::updateViewportSize):
1817         (QQuickWebViewFlickablePrivate::_q_resume):
1818         (QQuickWebView::geometryChanged):
1819         (QQuickWebView::componentComplete):
1820         * UIProcess/API/qt/qquickwebview_p.h:
1821         * UIProcess/API/qt/qquickwebview_p_p.h:
1822         (QQuickWebViewPrivate::onComponentComplete):
1823         (QQuickWebViewPrivate):
1824         (QQuickWebViewFlickablePrivate):
1825         * UIProcess/API/qt/qwebviewportinfo.cpp:
1826         (QWebViewportInfo::currentScale):
1827         (QWebViewportInfo::devicePixelRatio):
1828         (QWebViewportInfo::initialScale):
1829         (QWebViewportInfo::minimumScale):
1830         (QWebViewportInfo::maximumScale):
1831         (QWebViewportInfo::isScalable):
1832         (QWebViewportInfo::layoutSize):
1833         * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
1834         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
1835         (tst_QQuickWebView::tst_QQuickWebView):
1836         (tst_QQuickWebView::init):
1837         (tst_QQuickWebView::multipleWebViewWindows):
1838         (tst_QQuickWebView::multipleWebViews):
1839         * UIProcess/qt/QtWebPageLoadClient.cpp:
1840         (QtWebPageLoadClient::dispatchLoadSucceeded):
1841
1842 2012-02-07  YoungTaeck Song  <youngtaeck.song@samsung.com>
1843
1844         [EFL][WK2] Add ModuleEfl.cpp
1845         https://bugs.webkit.org/show_bug.cgi?id=63608
1846
1847         Reviewed by Andreas Kling.
1848
1849         Add first version of ModuleEfl.cpp including load(), unload() and platformFunctionPointer().
1850
1851         * Platform/Module.h:
1852         * Platform/efl/ModuleEfl.cpp: Added.
1853         (WebKit::Module::load):
1854         (WebKit::Module::unload):
1855         (WebKit::Module::platformFunctionPointer):
1856
1857 2012-02-07  Michael Brüning  <michael.bruning@nokia.com>
1858
1859         [Qt][WK2] Compute and set cache capacities using the current CacheModel
1860         https://bugs.webkit.org/show_bug.cgi?id=73918
1861
1862         Reviewed by Kenneth Rohde Christiansen.
1863
1864         First part of the implementation. The next steps are the implementation
1865         of the API for the Qt WebKit 2 port and the hybrid memory and disk cache.
1866
1867         * Shared/WebProcessCreationParameters.cpp:
1868         (WebKit::WebProcessCreationParameters::encode):
1869         (WebKit::WebProcessCreationParameters::decode):
1870         * Shared/WebProcessCreationParameters.h:
1871         (WebProcessCreationParameters):
1872         * UIProcess/qt/WebContextQt.cpp:
1873         (WebKit::defaultDiskCacheDirectory):
1874         (WebKit):
1875         (WebKit::WebContext::platformInitializeWebProcess):
1876         * WebProcess/qt/WebProcessQt.cpp:
1877         (WebKit::physicalMemorySizeInBytes):
1878         (WebKit):
1879         (WebKit::WebProcess::platformSetCacheModel):
1880         (WebKit::WebProcess::platformInitializeWebProcess):
1881
1882 2012-02-06  Shinya Kawanaka  <shinyak@google.com>
1883
1884         Remove Element::ensureShadowRoot export.
1885         https://bugs.webkit.org/show_bug.cgi?id=77932
1886
1887         Reviewed by Hajime Morita.
1888
1889         * win/WebKit2.def:
1890         * win/WebKit2CFLite.def:
1891
1892 2012-02-06  Martin Robinson  <mrobinson@igalia.com>
1893
1894         [GTK] Add TextureMapperGL implementation
1895         https://bugs.webkit.org/show_bug.cgi?id=75308
1896
1897         Reviewed by Alejandro G. Castro.
1898
1899         Fix the WebKit2 + AC build for GTK+.
1900
1901         * GNUmakefile.am: Add some missing source files.
1902         * UIProcess/DrawingAreaProxy.cpp:
1903         (WebKit): Add USE(TILED_BACKING_STORE) to the guard.
1904         * UIProcess/WebPageProxy.cpp:
1905         (WebKit::WebPageProxy::didReceiveMessage): Ditto.
1906         * WebProcess/WebPage/DrawingArea.h:
1907         (DrawingArea): Ditto.
1908         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1909         (WebKit): Ditto.
1910         * WebProcess/WebPage/DrawingAreaImpl.h:
1911         (DrawingAreaImpl): Ditto.
1912
1913 2012-02-06  Martin Robinson  <mrobinson@igalia.com>
1914
1915         Fix some miscellaneous 'make dist' error for WebKitGTK+.
1916
1917         * GNUmakefile.am: Do not distribute generated files.
1918
1919 2012-02-06  Anders Carlsson  <andersca@apple.com>
1920
1921         Overlay scrollbars flash when window is simply activated
1922         https://bugs.webkit.org/show_bug.cgi?id=77911
1923
1924         Reviewed by Kenneth Russell.
1925
1926         * UIProcess/API/mac/WKView.mm:
1927         (-[WKView _updateWindowVisibility]):
1928         Use -[NSWindow isVisible] here, since we also want to consider the window hidden if the application itself is hidden.
1929
1930         (-[WKView _windowDidOrderOffScreen:]):
1931         (-[WKView _windowDidOrderOnScreen:]):
1932         Call -[WKView updateWindowVisibility].
1933
1934         * WebProcess/WebPage/WebPage.cpp:
1935         (WebKit::WebPage::setWindowIsVisible):
1936         Call FocusController::setContainingWindowIsVisible.
1937
1938 2012-02-06  Martin Robinson  <mrobinson@igalia.com>
1939
1940          [GTK] Fix remaining errors in GTK+ WebKit2 API
1941         https://bugs.webkit.org/show_bug.cgi?id=77890
1942
1943         Reviewed by Gustavo Noronha Silva.
1944
1945         Fix some style issues in the GTK+ WebKit2 API section of the source code.
1946
1947         * UIProcess/API/gtk/WebKitPrivate.h:
1948         * UIProcess/API/gtk/WebKitWebView.cpp:
1949         * UIProcess/API/gtk/tests/TestMain.h:
1950
1951 2012-02-06  Matthew Delaney  <mdelaney@apple.com>
1952
1953         toDataURL() uses stale data after putImageData()
1954         https://bugs.webkit.org/show_bug.cgi?id=65767
1955
1956         Reviewed by Chris Marrin.
1957
1958         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1959         (InitWebCoreSystemInterface):
1960
1961 2012-02-06  Ryosuke Niwa  <rniwa@webkit.org>
1962
1963         gcc build fix after r106749.
1964
1965         * UIProcess/WebPreferences.cpp:
1966         (WebKit::WebPreferences::WebPreferences):
1967
1968 2012-02-06  Martin Robinson  <mrobinson@igalia.com>
1969
1970         [GTK] WebKitWebView does a lot of work during size_allocate when not mapped
1971         https://bugs.webkit.org/show_bug.cgi?id=77743
1972
1973         Reviewed by Gustavo Noronha Silva.
1974
1975         Instead of resizing the guts of a WebView when it's not mapped, wait
1976         until it's mapped and do one resize. This prevents unmapped WebViews
1977         from adding to a container's resize cost.
1978
1979         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1980         (_WebKitWebViewBasePrivate): Added a new member needsResizeOnMap.
1981         (resizeWebKitWebViewBaseFromAllocation): Abstracted out this helper.
1982         (webkitWebViewBaseSizeAllocate): Wait until map to resize unmapped WebViews.
1983         (webkitWebViewBaseMap): Added this vmethod implementation.
1984         (webkit_web_view_base_class_init): Added vmethod.
1985
1986 2012-02-06  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1987
1988         WebGestureEvent can not encode delta and area.
1989         https://bugs.webkit.org/show_bug.cgi?id=77728
1990
1991         Support delta and area fields in WebGestureEvent, and send area with Qt tap gesture.
1992
1993         Reviewed by Kenneth Rohde Christiansen.
1994
1995         * Shared/WebEvent.h:
1996         (WebKit::WebGestureEvent::area):
1997         (WebKit::WebGestureEvent::delta):
1998         * Shared/WebEventConversion.cpp:
1999         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
2000         * Shared/WebGestureEvent.cpp:
2001         (WebKit::WebGestureEvent::WebGestureEvent):
2002         (WebKit::WebGestureEvent::encode):
2003         (WebKit::WebGestureEvent::decode):
2004         * UIProcess/qt/QtWebPageEventHandler.cpp:
2005         (QtWebPageEventHandler::handleSingleTapEvent):
2006
2007 2012-02-03  Zalan Bujtas  <zbujtas@gmail.com>  and  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2008
2009         [Qt][WK2] Remove TiledDrawingArea and dependencies.
2010         https://bugs.webkit.org/show_bug.cgi?id=71681
2011
2012         Reviewed by Kenneth Rohde Christiansen.
2013
2014         Tiled drawing surface functionality got converted to LayerTree.
2015         TiledDrawingArea and its dependencies are not used by any port anymore.
2016
2017         * CMakeLists.txt:
2018         * GNUmakefile.am:
2019         * Shared/DrawingAreaInfo.h:
2020         * Target.pri:
2021         * UIProcess/API/qt/qquickwebpage.cpp:
2022         (QQuickWebPagePrivate::QQuickWebPagePrivate):
2023         * UIProcess/API/qt/qquickwebpage_p.h:
2024         * UIProcess/API/qt/qquickwebpage_p_p.h:
2025         (QQuickWebPagePrivate):
2026         * UIProcess/DrawingAreaProxy.h:
2027         * UIProcess/DrawingAreaProxy.messages.in:
2028         * UIProcess/TiledDrawingAreaProxy.cpp: Removed.
2029         * UIProcess/TiledDrawingAreaProxy.h: Removed.
2030         * UIProcess/qt/QtSGTileNode.cpp: Removed.
2031         * UIProcess/qt/QtSGTileNode.h: Removed.
2032         * UIProcess/qt/QtSGUpdateQueue.cpp: Removed.
2033         * UIProcess/qt/QtSGUpdateQueue.h: Removed.
2034         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Removed.
2035         * WebProcess/WebPage/DrawingArea.cpp:
2036         (WebKit::DrawingArea::create):
2037         * WebProcess/WebPage/DrawingArea.h:
2038         * WebProcess/WebPage/DrawingArea.messages.in:
2039         * WebProcess/WebPage/TiledDrawingArea.cpp: Removed.
2040         * WebProcess/WebPage/TiledDrawingArea.h: Removed.
2041         * WebProcess/WebPage/WebPage.h:
2042         (WebPage):
2043
2044 2012-02-03  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2045
2046         [Qt] Don't version QtWebKit.experimental.
2047         https://bugs.webkit.org/show_bug.cgi?id=77739
2048
2049         Reviewed by Tor Arne Vestbø.
2050
2051         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml:
2052         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
2053         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
2054         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
2055         * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml:
2056         * UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
2057         * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
2058         * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml:
2059         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
2060
2061 2012-02-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2062
2063         [GTK] Fix several gtkdoc-fixxref warnings
2064         https://bugs.webkit.org/show_bug.cgi?id=77613
2065
2066         Reviewed by Martin Robinson.
2067
2068         * UIProcess/API/gtk/WebKitWindowProperties.cpp: Fix a typo, a
2069         colon was missing in WebKitWebView::ready-to-show.
2070
2071 2012-02-05  Dan Bernstein  <mitz@apple.com>
2072
2073         <rdar://problem/10809525> WebKit2’s WebFrameLoaderClient::shouldUseCredentialStorage() always returns true
2074         https://bugs.webkit.org/show_bug.cgi?id=77823
2075
2076         Reviewed by Anders Carlsson.
2077
2078         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2079         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
2080         (WebKit::InjectedBundlePageResourceLoadClient::shouldUseCredentialStorage): Added. Calls
2081         through to the client if it implements shouldUseCredentialStorage. Returns true otherwise.
2082         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
2083         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2084         (WebKit::WebFrameLoaderClient::shouldUseCredentialStorage): Changed to call the injected
2085         bundle resource load client.
2086
2087 2012-02-04  Dan Bernstein  <mitz@apple.com>
2088
2089         <rdar://problem/10660698> Clients cannot prevent caching of individual responses
2090         https://bugs.webkit.org/show_bug.cgi?id=77822
2091
2092         Reviewed by Sam Weinig.
2093
2094         * Shared/APIClientTraits.cpp: Added definition of interfaceSizesByVersion for
2095         WKBundlePageResourceLoadClient.
2096         * Shared/APIClientTraits.h: Added APIClientTraits specialization for WKBundlePageResourceLoadClient.
2097         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added WKBundlePageShouldCacheResponseCallback
2098         typedef, added shouldCacheResponse member to WKBundlePageResourceLoadClient, and bumped
2099         kWKBundlePageResourceLoadClientCurrentVersion to 1.
2100         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
2101         (WebKit::InjectedBundlePageResourceLoadClient::shouldCacheResponse): Added. Calls through
2102         to the client if it implements shouldCacheResponse. Returns true otherwise.
2103         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h:
2104         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2105         (WebKit::WebFrameLoaderClient::willCacheResponse): Changed to call
2106         InjectedBundlePageResourceLoadClient::shouldCacheResponse() and return nil if the former
2107         returns false.
2108         (WebKit::WebFrameLoaderClient::shouldCacheResponse): Changed to call
2109         InjectedBundlePageResourceLoadClient::shouldCacheResponse().
2110
2111 2012-02-04  Sam Weinig  <sam@webkit.org>
2112
2113         Add ability to send WKURLRequests in WebKit2 API user messages
2114         https://bugs.webkit.org/show_bug.cgi?id=77819
2115
2116         Reviewed by Anders Carlsson.
2117
2118         Test: WebKit2UserMessageRoundTripTest API test.
2119
2120         * Shared/UserMessageCoders.h:
2121         (WebKit::UserMessageEncoder::baseEncode):
2122         (WebKit::UserMessageDecoder::baseDecode):
2123         Add encode/decode for WebURLRequest.
2124
2125 2012-02-04  Dan Bernstein  <mitz@apple.com>
2126
2127         <rdar://problem/10772406> WKPreferences instances cannot be copied
2128         https://bugs.webkit.org/show_bug.cgi?id=77816
2129
2130         Reviewed by Sam Weinig.
2131
2132         Test added in TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp.
2133
2134         * UIProcess/API/C/WKPreferences.cpp:
2135         (WKPreferencesCreateCopy): Added.
2136         * UIProcess/API/C/WKPreferencesPrivate.h:
2137         * UIProcess/WebPreferences.cpp:
2138         (WebKit::WebPreferences::WebPreferences): Added this constructor that copies the
2139         WebPreferencesStore of the given WebPreferences.
2140         * UIProcess/WebPreferences.h:
2141         (WebKit::WebPreferences::create): Added this create function that takes a WebPreferences
2142         instance and creates a new instance with a copy of the given instance’s store.
2143
2144 2012-02-03  Anders Carlsson  <andersca@apple.com>
2145
2146         WebKit2 should dispatch wheel events to the new ScrollingTree class
2147         https://bugs.webkit.org/show_bug.cgi?id=77795
2148
2149         Reviewed by Andreas Kling.
2150
2151         Replace all uses of ScrollingCoordinator with ScrollingTree instead.
2152         Also, don't try to handle gesture events on the scrolling thread anymore;
2153         we don't need to to that right now.
2154
2155         * WebProcess/WebPage/EventDispatcher.cpp:
2156         (WebKit::EventDispatcher::addScrollingTreeForPage):
2157         (WebKit::EventDispatcher::removeScrollingTreeForPage):
2158         (WebKit::EventDispatcher::wheelEvent):
2159         (WebKit::EventDispatcher::gestureEvent):
2160         * WebProcess/WebPage/EventDispatcher.h:
2161         (WebCore):
2162         (EventDispatcher):
2163         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2164         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2165         (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
2166
2167 2012-02-03  Alexey Proskuryakov  <ap@apple.com>
2168
2169         [WK2 Mac] No need to allow access to input methods or keyboard layouts
2170         https://bugs.webkit.org/show_bug.cgi?id=77775
2171         <rdar://problem/9276253>
2172         <rdar://problem/9276268>
2173
2174         Reviewed by Dan Bernstein.
2175
2176         * WebProcess/com.apple.WebProcess.sb: These rules were likely only necessary in early days
2177         of WebKit2. If there are cases when this happens, that's likely wrong, and we need to know
2178         about that.
2179
2180 2012-02-03  Alexey Proskuryakov  <ap@apple.com>
2181
2182         [WK2] Use properly quoted string literals
2183         https://bugs.webkit.org/show_bug.cgi?id=77583
2184
2185         Reviewed by Darin Adler.
2186
2187         Also added some FIXMEs.
2188
2189         * WebProcess/com.apple.WebProcess.sb:
2190
2191 2012-02-03  Brady Eidson  <beidson@apple.com>
2192
2193         <rdar://problem/10742441> and https://bugs.webkit.org/show_bug.cgi?id=77766
2194         Need a WK2 API to filter which subframes go into WebArchives as they are created.
2195
2196         Reviewed by Darin Adler.
2197
2198         Add a new WKBundleFrame API that takes a filter callback object to allow or reject
2199         subframes from a WebArchive:
2200         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2201         (WKBundleFrameCopyWebArchive):
2202         (WKBundleFrameCopyWebArchiveFilteringSubframes):
2203         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2204
2205         Implement the above API by calling through to WebCore:
2206         * WebProcess/WebPage/WebFrame.cpp:
2207         (WebFrameFilter):
2208         (WebKit::WebFrameFilter::WebFrameFilter):
2209         (WebKit::WebFrameFilter::shouldIncludeSubframe):
2210         (WebKit::WebFrame::webArchiveData):
2211         * WebProcess/WebPage/WebFrame.h:
2212         (WebFrame):
2213
2214         * WebProcess/WebPage/WebPage.cpp:
2215         (WebKit::WebPage::getWebArchiveOfFrame):
2216
2217 2012-02-03  Alexey Proskuryakov  <ap@apple.com>
2218
2219         [Mac WK2] Use a minimally invasive way to fake plug-in process name
2220         https://bugs.webkit.org/show_bug.cgi?id=77682
2221
2222         Reviewed by Darin Adler.
2223
2224         * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::netscapePluginModule):
2225         Only change the name as it's seen from within the process.
2226
2227         * Shared/Plugins/PluginQuirks.h: Fixed a typo.
2228
2229 2012-02-03  Beth Dakin  <bdakin@apple.com>
2230
2231         https://bugs.webkit.org/show_bug.cgi?id=77691
2232         Fix PlatformScreen layering violation and PlatformScreenMac's incorrect use 
2233         of device scale
2234
2235         Reviewed by Andy Estes.
2236
2237         toUserSpace() and toDeviceSpace() don't need to take device scale.
2238         * UIProcess/API/mac/WKView.mm:
2239         (-[WKView _convertToDeviceSpace:]):
2240         (-[WKView _convertToUserSpace:]):
2241
2242 2012-02-03  No'am Rosenthal  <noam.rosenthal@nokia.com>
2243
2244         [Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible.
2245         https://bugs.webkit.org/show_bug.cgi?id=77148
2246
2247         Reviewed by Martin Robinson.
2248
2249         Use TextureMapper::create instead of creating TextureMapperGL/TextureMapperQt directly.
2250         Remove calls to unused API.
2251
2252         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2253         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
2254         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
2255         (WebKit::LayerTreeHostProxy::createImage):
2256         (WebKit::LayerTreeHostProxy::ensureRootLayer):
2257
2258 2012-02-03  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2259
2260         [Qt] Split QQuickWebViewPrivate in two classes, for desktop and touch behavior.
2261         https://bugs.webkit.org/show_bug.cgi?id=77632
2262
2263         Reviewed by Kenneth Rohde Christiansen.
2264
2265         Replace the runtime property setting the desktop behavior on each instance
2266         by a static boolean controlling the behavior used by future created WebViews.
2267
2268         * UIProcess/API/qt/qquickwebpage.cpp:
2269         Let only setContentsSize control the size of the drawing area instead of deferring
2270         it until geometryChanged is called.
2271         (QQuickWebPagePrivate::QQuickWebPagePrivate):
2272         * UIProcess/API/qt/qquickwebpage_p.h:
2273         * UIProcess/API/qt/qquickwebpage_p_p.h:
2274         (QQuickWebPagePrivate):
2275         * UIProcess/API/qt/qquickwebview.cpp:
2276         (createPrivateObject):
2277         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2278         (QQuickWebViewPrivate::~QQuickWebViewPrivate):
2279         (QQuickWebViewPrivate::initialize):
2280         (QQuickWebViewPrivate::processDidCrash):
2281         (QQuickWebViewLegacyPrivate::QQuickWebViewLegacyPrivate):
2282         (QQuickWebViewLegacyPrivate::initialize):
2283         (QQuickWebViewLegacyPrivate::updateViewportSize):
2284         (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
2285         (QQuickWebViewFlickablePrivate::~QQuickWebViewFlickablePrivate):
2286         (QQuickWebViewFlickablePrivate::initialize):
2287         (QQuickWebViewFlickablePrivate::loadDidCommit):
2288         (QQuickWebViewFlickablePrivate::didFinishFirstNonEmptyLayout):
2289         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
2290         (QQuickWebViewFlickablePrivate::updateViewportSize):
2291         (QQuickWebViewFlickablePrivate::_q_updateVisibleContentRectAndScale):
2292         (QQuickWebViewFlickablePrivate::_q_suspend):
2293         (QQuickWebViewFlickablePrivate::_q_resume):
2294         (QQuickWebViewFlickablePrivate::pageDidRequestScroll):
2295         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
2296         (QQuickWebViewFlickablePrivate::computeViewportConstraints):
2297         (QQuickWebViewFlickablePrivate::PostTransitionState::apply):
2298         (QQuickWebViewExperimental::setFlickableViewportEnabled):
2299         The switch is now a static function that has to be called before a WebView
2300         is created. The switch can have it's default defined by the deploying platform.
2301         (QQuickWebViewExperimental::flickableViewportEnabled):
2302         (QQuickWebView::QQuickWebView):
2303         On creation of QQuickWebView, the static boolean is read to know if we want
2304         a QQuickWebViewTouchPrivate or a QQuickWebViewDesktopPrivate.
2305         (QQuickWebView::geometryChanged):
2306         * UIProcess/API/qt/qquickwebview_p.h:
2307         * UIProcess/API/qt/qquickwebview_p_p.h:
2308         (QQuickWebViewPrivate):
2309         (QQuickWebViewPrivate::loadDidCommit):
2310         (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout):
2311         (QQuickWebViewPrivate::didChangeViewportProperties):
2312         (QQuickWebViewPrivate::viewportInteractionEngine):
2313         (QQuickWebViewPrivate::updateViewportSize):
2314         (QQuickWebViewPrivate::_q_updateVisibleContentRectAndScale):
2315         (QQuickWebViewPrivate::_q_suspend):
2316         (QQuickWebViewPrivate::_q_resume):
2317         (QQuickWebViewPrivate::pageDidRequestScroll):
2318         (QQuickWebViewPrivate::didChangeContentsSize):
2319         (QQuickWebViewLegacyPrivate):
2320         (QQuickWebViewFlickablePrivate):
2321         (QQuickWebViewFlickablePrivate::viewportInteractionEngine):
2322         (PostTransitionState):
2323         (QQuickWebViewFlickablePrivate::PostTransitionState::PostTransitionState):
2324         * UIProcess/API/qt/qwebviewportinfo.cpp:
2325         (QWebViewportInfo::currentScale):
2326         (QWebViewportInfo::devicePixelRatio):
2327         (QWebViewportInfo::initialScale):
2328         (QWebViewportInfo::minimumScale):
2329         (QWebViewportInfo::maximumScale):
2330         (QWebViewportInfo::isScalable):
2331         (QWebViewportInfo::layoutSize):
2332         * UIProcess/API/qt/tests/publicapi/publicapi.pro:
2333         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: Added.
2334         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/DesktopWebView.qml: Removed.
2335         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml: Renamed
2336         from Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_itemSelector.qml.
2337         Moved to DesktopBehavior instead of using a DesktopWebView to workaround the touch event limitation.
2338         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
2339         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
2340         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
2341         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
2342         * UIProcess/API/qt/tests/qmltests/WebView.pro: Copied
2343         from Source/WebKit2/UIProcess/API/qt/tests/qmltests/qmltests.pro.
2344         * UIProcess/API/qt/tests/qmltests/qmltests.pro:
2345         Split qmltests in two executables, tst_qmltests_DesktopBehavior and tst_qmltests_WebView.
2346         The former runs without setFlickableViewportEnabled and the later does.
2347         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
2348         (main):
2349         * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
2350         * UIProcess/API/qt/tests/tests.pri:
2351         * UIProcess/qt/QtWebPageEventHandler.cpp:
2352         (QtWebPageEventHandler::QtWebPageEventHandler):
2353
2354 2012-02-02  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2355
2356         [Qt] Rename content* to contents* in QQuickWebPage.
2357         https://bugs.webkit.org/show_bug.cgi?id=77629
2358
2359         Reviewed by Kenneth Rohde Christiansen.
2360
2361         * UIProcess/API/qt/qquickwebpage.cpp:
2362         (QQuickWebPagePrivate::QQuickWebPagePrivate):
2363         (QQuickWebPagePrivate::paintToCurrentGLContext):
2364         (QQuickWebPage::setContentsSize):
2365         (QQuickWebPage::contentsSize):
2366         (QQuickWebPage::setContentsScale):
2367         (QQuickWebPage::contentsScale):
2368         (QQuickWebPage::transformToItem):
2369         (QQuickWebPagePrivate::updateSize):
2370         * UIProcess/API/qt/qquickwebpage_p.h:
2371         * UIProcess/API/qt/qquickwebpage_p_p.h:
2372         (QQuickWebPagePrivate):
2373         * UIProcess/API/qt/qquickwebview.cpp:
2374         (QQuickWebViewPrivate::didChangeContentsSize):
2375         (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
2376         (QQuickWebViewPrivate::PostTransitionState::apply):
2377         * UIProcess/API/qt/qwebviewportinfo.cpp:
2378         (QWebViewportInfo::contentsSize):
2379         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2380         (tst_QQuickWebView::scrollRequest):
2381         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2382         (WebKit::QtViewportInteractionEngine::setItemRectVisible):
2383         (WebKit::QtViewportInteractionEngine::event):
2384         (WebKit::QtViewportInteractionEngine::wheelEvent):
2385         (WebKit::QtViewportInteractionEngine::pagePositionRequest):
2386         (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale):
2387         (WebKit::QtViewportInteractionEngine::applyConstraints):
2388         (WebKit::QtViewportInteractionEngine::currentCSSScale):
2389         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2390         (WebKit::QtViewportInteractionEngine::scaleContent):
2391
2392 2012-02-03  Simon Hausmann  <simon.hausmann@nokia.com>
2393
2394         [Qt] Fix build when cross-compiling
2395         https://bugs.webkit.org/show_bug.cgi?id=77634
2396
2397         Reviewed by Tor Arne Vestbø.
2398
2399         * WebKit2.pri: Link in -lrt on linux mkspecs, regardless of whether gcc
2400         is in use or not. More specifically this fixes the case where the makespace
2401         is not linux-g++* but for a cross-compiling one like linux-arm-gnueabi-g++.
2402
2403 2012-02-03  Shinya Kawanaka  <shinyak@google.com>
2404
2405         Stop calling Element::ensureShadowRoot in Internals.
2406         https://bugs.webkit.org/show_bug.cgi?id=77612
2407
2408         Reviewed by Hajime Morita.
2409
2410         Exports symbols.
2411
2412         * win/WebKit2.def:
2413         * win/WebKit2CFLite.def:
2414
2415 2012-02-02  Sheriff Bot  <webkit.review.bot@gmail.com>
2416
2417         Unreviewed, rolling out r106620.
2418         http://trac.webkit.org/changeset/106620
2419         https://bugs.webkit.org/show_bug.cgi?id=77716
2420
2421         It broke non ENABLE(3D_RENDERING) builds (Requested by
2422         Ossy_morning on #webkit).
2423
2424         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2425         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
2426         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
2427         (WebKit::LayerTreeHostProxy::createImage):
2428         (WebKit::LayerTreeHostProxy::ensureRootLayer):
2429
2430 2012-02-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
2431
2432         [Qt][Texmap] Refactor TextureMapper API to use ImageBuffers when possible.
2433         https://bugs.webkit.org/show_bug.cgi?id=77148
2434
2435         Reviewed by Martin Robinson.
2436
2437         Use TextureMapper::create instead of creating TextureMapperGL/TextureMapperQt directly.
2438         Remove calls to unused API.
2439
2440         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2441         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
2442         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
2443         (WebKit::LayerTreeHostProxy::createImage):
2444         (WebKit::LayerTreeHostProxy::ensureRootLayer):
2445
2446 2012-02-02  Jon Lee  <jonlee@apple.com>
2447
2448         Clear shown notifications when context is no longer active
2449         https://bugs.webkit.org/show_bug.cgi?id=77363
2450         <rdar://problem/10568907>
2451
2452         Reviewed by Darin Adler.
2453
2454         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
2455         (WebKit::WebNotificationClient::clearNotifications): Forward the call to
2456         WebNotificationManager.
2457         * WebProcess/WebCoreSupport/WebNotificationClient.h:
2458         (WebNotificationClient):
2459
2460         * WebProcess/Notifications/WebNotificationManager.h: Add an additional map that maps
2461         all notifications associated with a given ScriptExecutionContext instance.
2462         * WebProcess/Notifications/WebNotificationManager.cpp:
2463         (WebKit::WebNotificationManager::show): Create a map entry for the notification's
2464         context if it doesn't exist already, and note that notification's ID. Also, correct
2465         the return value of show() if notifications are not enabled, to return false.
2466         (WebKit::WebNotificationManager::didCloseNotifications): When the notification is closed,
2467         we remove that notification from the map.
2468         (WebKit::WebNotificationManager::clearNotifications): Use the map entry for the given
2469         context, and pass that along to the proxy so that all of the notifications with those IDs
2470         can be cleared. In the meantime, we remove that context's map entry.
2471
2472         * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: New ClearNotifications()
2473         message.
2474         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2475         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2476         (WebKit::WebNotificationManagerProxy::clearNotifications): Forward the call to the provider.
2477         Then remove this proxy's entries for the given notification IDs.
2478
2479         * UIProcess/Notifications/WebNotificationProvider.cpp:
2480         (WebKit::WebNotificationProvider::clearNotifications): Convert the vector of IDs to a mutable
2481         array.
2482         * UIProcess/Notifications/WebNotificationProvider.h:
2483         (WebNotificationProvider):
2484
2485         * UIProcess/API/C/WKNotificationProvider.h: Add WK API to tell the platform to clear the notifications.
2486
2487         Remove the #if guard since they already exist in WebNotificationManager functions:
2488         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
2489         (WebKit::WebNotificationClient::show):
2490         (WebKit::WebNotificationClient::cancel):
2491         (WebKit::WebNotificationClient::notificationObjectDestroyed):
2492
2493 2012-02-02  Anders Carlsson  <andersca@apple.com>
2494
2495         NPAPI will not send mouse up events when mouse is outside plugin area
2496         https://bugs.webkit.org/show_bug.cgi?id=77657
2497         <rdar://problem/10160674>
2498
2499         Reviewed by Andreas Kling.
2500
2501         Use EventHandler::setCapturingMouseEventsNode to ensure we get all the mouse events when the mouse is down.
2502
2503         * WebProcess/Plugins/PluginView.cpp:
2504         (WebKit::PluginView::handleEvent):
2505
2506 2012-02-02  Claudio Saavedra  <csaavedra@igalia.com> and Martin Robinson  <mrobinson@igalia.com>
2507
2508         [GTK] WebKitWebView won't work in a GtkOffscreenWindow
2509         https://bugs.webkit.org/show_bug.cgi?id=76911
2510
2511         Reviewed by Philippe Normand.
2512
2513         * UIProcess/API/gtk/WebKitUIClient.cpp:
2514         (getWindowFrame): Use the new helper.
2515         * UIProcess/API/gtk/WebKitWebView.cpp:
2516         (webkitWebViewCreateJavaScriptDialog): Ditto
2517         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2518         (webkitWebViewBaseRealize): Ditto.
2519         (webkitWebViewBaseSizeAllocate): Ditto.
2520         (webkitWebViewBaseFocusInEvent): Ditto.
2521
2522 2012-02-01  Philippe Normand  <pnormand@igalia.com>
2523
2524         [GStreamer] FFTFrame implementation
2525         https://bugs.webkit.org/show_bug.cgi?id=73545
2526
2527         Reviewed by Chris Rogers.
2528
2529         * GNUmakefile.am: Remove libfftw compilation flags.
2530
2531 2012-02-01  No'am Rosenthal  <noam.rosenthal@nokia.com>
2532
2533         [Texmap] Use glScissors for clipping in TextureMapperGL when possible
2534         https://bugs.webkit.org/show_bug.cgi?id=77575
2535
2536         Reviewed by Martin Robinson.
2537
2538         Instead of applying the scissor clip in QQuickWebPage, we trickle it down to
2539         TextureMapperGL, and apply it there as part of beginClip(). All direct GL operations are
2540         now cleaned out of QQuickWebPage.
2541
2542         * UIProcess/API/qt/qquickwebpage.cpp:
2543         (QQuickWebPagePrivate::paintToCurrentGLContext):
2544         * UIProcess/DrawingAreaProxy.h:
2545         (WebKit::DrawingAreaProxy::paintToCurrentGLContext):
2546         * UIProcess/DrawingAreaProxyImpl.cpp:
2547         (WebKit::DrawingAreaProxyImpl::paintToCurrentGLContext):
2548         * UIProcess/DrawingAreaProxyImpl.h:
2549         (DrawingAreaProxyImpl):
2550         * UIProcess/LayerTreeHostProxy.h:
2551         (LayerTreeHostProxy):
2552         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2553         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
2554
2555 2012-02-01  Dan Bernstein  <mitz@apple.com>
2556
2557         WebKit2 part of <rdar://problem/10442663> Paginated display does not respect page-break-{before,after}
2558         https://bugs.webkit.org/show_bug.cgi?id=77505
2559
2560         Reviewed by Darin Adler.
2561
2562         * Shared/WebPageCreationParameters.cpp:
2563         (WebKit::WebPageCreationParameters::encode): Encode paginationBehavesLikeColumns.
2564         (WebKit::WebPageCreationParameters::decode): Decode paginationBehavesLikeColumns.
2565         * Shared/WebPageCreationParameters.h:
2566         (WebPageCreationParameters): Added paginationBehavesLikeColumns boolean.
2567         * UIProcess/API/C/WKPage.cpp:
2568         (WKPageSetPaginationBehavesLikeColumns): Added this setter.
2569         (WKPageGetPaginationBehavesLikeColumns): Added this getter.
2570         * UIProcess/API/C/WKPagePrivate.h:
2571         * UIProcess/API/mac/WKBrowsingContextController.mm:
2572         (-[WKBrowsingContextController setPaginationBehavesLikeColumns:]): Added this Objective-C
2573         wrapper around WKPageSetPaginationBehavesLikeColumns.
2574         (-[WKBrowsingContextController paginationBehavesLikeColumns]): Added this Objective-C wrapper
2575         around WKPageGetPaginationBehavesLikeColumns.
2576         * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h:
2577         * UIProcess/WebPageProxy.cpp:
2578         (WebKit::WebPageProxy::WebPageProxy): Added call to setPaginationBehavesLikeColumns() with
2579         the value from the creation parameters.
2580         (WebKit::WebPageProxy::setPaginationBehavesLikeColumns): Added this setter.
2581         (WebKit::WebPageProxy::creationParameters): Populate paginationBehavesLikeColumns.
2582         * UIProcess/WebPageProxy.h:
2583         (WebKit::WebPageProxy::paginationBehavesLikeColumns): Added this getter.
2584         * WebProcess/WebPage/WebPage.cpp:
2585         (WebKit::WebPage::setPaginationBehavesLikeColumns): Added this setter.
2586         * WebProcess/WebPage/WebPage.h:
2587         * WebProcess/WebPage/WebPage.messages.in: Added SetPaginationBehavesLikeColumns message.
2588
2589 2012-02-01  Anders Carlsson  <andersca@apple.com>
2590
2591         REGRESSION (r104727): Strange graphics corruption opening a new tab in Safari
2592         https://bugs.webkit.org/show_bug.cgi?id=77578
2593         <rdar://problem/10767174>
2594
2595         Reviewed by Dan Bernstein.
2596
2597         Resizing a window will always invalidate the window backing store, so make sure to set
2598         _data->_windowHasValidBackingStore to NO whenever that happens.
2599
2600         * UIProcess/API/mac/WKView.mm:
2601         (-[WKView addWindowObserversForWindow:]):
2602         Use separate methods for the NSWindowDidMoveNotification and NSWindowDidResizeNotification notifications.
2603
2604         (-[WKView _windowDidMove:]):
2605         Call -[WKView _updateWindowAndViewFrames].
2606
2607         (-[WKView _windowDidResize:]):
2608         Call -[WKView _updateWindowAndViewFrames] and mark the window backing store as invalid.
2609
2610 2012-02-01  Beth Dakin  <bdakin@apple.com>
2611
2612         https://bugs.webkit.org/show_bug.cgi?id=77383
2613         Add a different didFirstVisuallNonEmptyLayout heuristic to experiment with
2614         -and corresponding-
2615         <rdar://problem/10709560>
2616
2617         Reviewed by Sam Weinig.
2618
2619         Machinery for didNewFirstVisuallNonEmptyLayout.
2620         * UIProcess/API/C/WKPage.h:
2621         * UIProcess/WebLoaderClient.cpp:
2622         (WebKit::WebLoaderClient::didNewFirstVisuallyNonEmptyLayout):
2623         (WebKit):
2624         * UIProcess/WebLoaderClient.h:
2625         (WebLoaderClient):
2626         * UIProcess/WebPageProxy.cpp:
2627         (WebKit::WebPageProxy::didNewFirstVisuallyNonEmptyLayout):
2628         (WebKit):
2629         * UIProcess/WebPageProxy.h:
2630         (WebPageProxy):
2631         * UIProcess/WebPageProxy.messages.in:
2632         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2633         (WebKit::WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout):
2634         (WebKit):
2635         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2636         (WebFrameLoaderClient):
2637
2638         This temporary API allows the client to specify the threshold for the painted 
2639         objects counter on Page. This is temporary.
2640         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2641         (WKBundlePageSetPaintedObjectsCounterThreshold):
2642         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2643         * WebProcess/WebPage/WebPage.cpp:
2644         (WebKit::WebPage::setPaintedObjectsCounterThreshold):
2645         (WebKit):
2646         * WebProcess/WebPage/WebPage.h:
2647         (WebPage):
2648
2649 2012-01-31  Alexey Proskuryakov  <ap@apple.com>
2650
2651         REGRESSION (WebKit2): event.keyCode is always zero when typing in Russian
2652         https://bugs.webkit.org/show_bug.cgi?id=77473
2653         <rdar://problem/10751357>
2654
2655         Reviewed by Darin Adler.
2656
2657         * Shared/mac/WebEventFactory.mm: Removed broken copy/pasted implementation in favor of
2658         WebCore ones.
2659
2660 2012-01-31  Alexey Proskuryakov  <ap@apple.com>
2661
2662         PluginProcess should be able to use remote open and save panels
2663         https://bugs.webkit.org/show_bug.cgi?id=77461
2664         <rdar://problem/10783615>
2665
2666         Reviewed by Mark Rowe.
2667
2668         * PluginProcess/mac/PluginProcess.entitlements: Added.
2669         * PluginProcess/mac/add-entitlements.sh: Added.
2670         * WebKit2.xcodeproj/project.pbxproj:
2671         Add appropriate entitlement, plus ad hoc binary signing for it to work.
2672
2673 2012-01-31  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2674
2675         Ensure tiles are repainted when scrolling using mouse wheel.
2676         https://bugs.webkit.org/show_bug.cgi?id=77339
2677
2678         A new slot visibleContentRectAndScaleChanged has been added
2679         that is emited by non-animated scrolling code in the
2680         QtViewportInteractionEngine.
2681
2682         Reviewed by Kenneth Rohde Christiansen.
2683
2684         * UIProcess/API/qt/qquickwebview.cpp:
2685         (QQuickWebViewPrivate::initializeDesktop):
2686         (QQuickWebViewPrivate::initializeTouch):
2687         (QQuickWebViewPrivate::_q_resume):
2688         (QQuickWebViewPrivate::_q_updateVisibleContentRectAndScale):
2689         (QQuickWebViewPrivate::updateTouchViewportSize):
2690         * UIProcess/API/qt/qquickwebview_p.h:
2691         * UIProcess/API/qt/qquickwebview_p_p.h:
2692         (QQuickWebViewPrivate):
2693         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2694         (WebKit::QtViewportInteractionEngine::wheelEvent):
2695         * UIProcess/qt/QtViewportInteractionEngine.h:
2696         (QtViewportInteractionEngine):
2697
2698 2012-01-31  Zeno Albisser  <zeno@webkit.org>
2699
2700         [Qt][WK2] Make UIProcess decide about encoding of input data for application URL schemes.
2701         https://bugs.webkit.org/show_bug.cgi?id=77417
2702
2703         Make the UIProcess decide about the encoding and display
2704         a warning in case no encoding was defined.
2705         Make the QQuickNetworkReply store a QWeakPointer to the
2706         QQuickWebViewExperimental to get rid of hackish chain of parental queries.
2707
2708         Reviewed by Simon Hausmann.
2709
2710         * UIProcess/API/qt/qquicknetworkreply.cpp:
2711         (QQuickNetworkReply::send):
2712         (QQuickNetworkReply::setWebViewExperimental):
2713         * UIProcess/API/qt/qquicknetworkreply_p.h:
2714         * UIProcess/API/qt/qquickwebview.cpp:
2715         (QQuickWebViewExperimental::schemeDelegates_Append):
2716         * WebProcess/qt/QtNetworkReply.cpp:
2717         (WebKit::QtNetworkReply::QtNetworkReply):
2718         (WebKit::QtNetworkReply::setReplyData):
2719
2720 2012-01-30  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2721
2722         [Qt] Disconnect the LayerTreeHost from layers when they get removed from their parent.
2723         https://bugs.webkit.org/show_bug.cgi?id=77362
2724
2725         Reviewed by Noam Rosenthal.
2726
2727         This fixes crashes seen in layout tests under certain timing circumstances
2728         that appeared after r106109 was landed.
2729
2730         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
2731         (WebCore::WebGraphicsLayer::replaceChild):
2732         (WebCore::WebGraphicsLayer::removeFromParent):
2733
2734 2012-01-30  Beth Dakin  <bdakin@apple.com>
2735
2736         https://bugs.webkit.org/show_bug.cgi?id=77263
2737         PlatformScreenMac should not rely on NSWindow for important bits of data
2738
2739         Reviewed by Geoff Garen.
2740
2741         toUserSpace() and toDeviceSpace() now take a parameter for the 
2742         deviceScaleFactor.
2743         * UIProcess/API/mac/WKView.mm:
2744         (-[WKView _convertToDeviceSpace:]):
2745         (-[WKView _convertToUserSpace:]):
2746
2747 2012-01-26  No'am Rosenthal  <noam.rosenthal@nokia.com> and Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2748
2749         [Qt] WKTR: Use a software rendering pipiline when running tests.
2750         https://bugs.webkit.org/show_bug.cgi?id=76708
2751
2752         Reviewed by Kenneth Rohde Christiansen.
2753
2754         Animation layout tests require the graphics layers tree to be updated
2755         to pass. WebkitTestRunner doesn't show its wrapping QQuickView, which
2756         prevents the rendering pipeline to run and then in turn blocks the web
2757         process from processing further graphics layer updates.
2758
2759         This allows the tests to use a TextureMapperQt to empty the LayerTreeHost's
2760         message queue and render the layers in software on an offscreen buffer.
2761
2762         * UIProcess/API/qt/qquickwebpage.cpp:
2763         (QQuickWebPagePrivate::paint):
2764         * UIProcess/API/qt/qquickwebview.cpp:
2765         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2766         (QQuickWebViewPrivate::setNeedsDisplay):
2767         (QQuickWebViewExperimental::setRenderToOffscreenBuffer):
2768         (QQuickWebViewExperimental::renderToOffscreenBuffer):
2769         * UIProcess/API/qt/qquickwebview_p.h:
2770         * UIProcess/API/qt/qquickwebview_p_p.h:
2771         (QQuickWebViewPrivate::setRenderToOffscreenBuffer):
2772         (QQuickWebViewPrivate::renderToOffscreenBuffer):
2773         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2774         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
2775
2776 2012-01-30  Andras Becsi  <andras.becsi@nokia.com>
2777
2778         [Qt][WK2] Render layers do not get flushed when the scroll animation finishes
2779         https://bugs.webkit.org/show_bug.cgi?id=77338
2780
2781         Reviewed by Noam Rosenthal.
2782
2783         Schedule a layer flush when setting the visible content rect and scale.
2784
2785         Fixed with the help of Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2786
2787         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2788         (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale):
2789
2790 2012-01-30  Carlos Garcia Campos  <cgarcia@igalia.com>
2791
2792         Unreviewed. Fix make distcheck.
2793
2794         * GNUmakefile.am: Add missing files.
2795         * WebProcess/WebPage/TapHighlightController.cpp: Add #if
2796         ENABLE(TOUCH_EVENTS).
2797
2798 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2799
2800         Unreviewed, rolling out r106022.
2801         http://trac.webkit.org/changeset/106022
2802         https://bugs.webkit.org/show_bug.cgi?id=77305
2803
2804         It broke Qt-WK2 API tests (Requested by Ossy_weekend on
2805         #webkit).
2806
2807         * UIProcess/API/qt/qquickwebview.cpp:
2808         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
2809         (QQuickWebView::geometryChanged):
2810         * UIProcess/API/qt/qquickwebview_p.h:
2811         * UIProcess/API/qt/qwebviewportinfo.cpp:
2812         (QWebViewportInfo::currentScale):
2813         (QWebViewportInfo::devicePixelRatio):
2814         (QWebViewportInfo::initialScale):
2815         (QWebViewportInfo::minimumScale):
2816         (QWebViewportInfo::maximumScale):
2817         (QWebViewportInfo::isScalable):
2818         (QWebViewportInfo::layoutSize):
2819
2820 2012-01-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2821
2822         Unreviewed, rolling out r106109.
2823         http://trac.webkit.org/changeset/106109
2824         https://bugs.webkit.org/show_bug.cgi?id=77302
2825
2826         It made tests crash (Requested by Ossy_weekend on #webkit).
2827
2828         * UIProcess/API/qt/qquickwebpage.cpp:
2829         * UIProcess/API/qt/qquickwebpage_p_p.h:
2830         (QQuickWebPagePrivate):
2831         * UIProcess/API/qt/qquickwebview.cpp:
2832         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2833         * UIProcess/API/qt/qquickwebview_p.h:
2834         * UIProcess/API/qt/qquickwebview_p_p.h:
2835         (QQuickWebViewPrivate):
2836         * UIProcess/DrawingAreaProxy.h:
2837         * UIProcess/DrawingAreaProxyImpl.cpp:
2838         * UIProcess/DrawingAreaProxyImpl.h:
2839         (DrawingAreaProxyImpl):
2840         * UIProcess/LayerTreeHostProxy.h:
2841         (LayerTreeHostProxy):
2842         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2843         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
2844         * UIProcess/qt/QtPageClient.cpp:
2845         (QtPageClient::setViewNeedsDisplay):
2846
2847 2012-01-27  Fady Samuel  <fsamuel@chromium.org>
2848
2849         Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
2850         https://bugs.webkit.org/show_bug.cgi?id=76459
2851
2852         Reviewed by Darin Fisher.
2853
2854         * win/WebKit2.def:
2855         * win/WebKit2CFLite.def:
2856
2857 2012-01-27  Martin Robinson  <mrobinson@igalia.com>
2858
2859         Fix a compilation warning in a WebKit2 GTK+ API test.
2860
2861         Reviewed by Gustavo Noronha Silva.
2862
2863         * UIProcess/API/gtk/tests/TestBackForwardList.cpp:
2864         (testBackForwardListLimitAndCache): Use an int instead of size_t
2865         because we want to print them as ints and do subtraction on them.
2866
2867 2012-01-27  Martin Robinson  <mrobinson@igalia.com>
2868
2869         [GTK] [WK2] Implement the policy client
2870         https://bugs.webkit.org/show_bug.cgi?id=76343
2871
2872         Reviewed by Gustavo Noronha Silva.
2873
2874         Implement the abstract WebKitPolicyDecision, WebKitNavigationPolicyDecision,
2875         and add the decide-policy signal to WebKitWebView.
2876
2877         * GNUmakefile.am: Add new files to the source list.
2878         * UIProcess/API/gtk/WebKitError.cpp: Use the WebCore namespace because
2879         of changes to ASSERT_MATCHING_ENUMS.
2880         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp: Added.
2881         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.h: Added.
2882         * UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h: Added.
2883         * UIProcess/API/gtk/WebKitPolicyClient.cpp: Added.
2884         * UIProcess/API/gtk/WebKitPolicyClientPrivate.h: Added.
2885         * UIProcess/API/gtk/WebKitPolicyDecision.cpp: Added.
2886         * UIProcess/API/gtk/WebKitPolicyDecision.h: Added.
2887         * UIProcess/API/gtk/WebKitPolicyDecisionPrivate.h: Added.
2888         * UIProcess/API/gtk/WebKitPrivate.h: Modify ASSERT_MATCHING_ENUMS to make
2889         it useful for non-WebCore enums.
2890         * UIProcess/API/gtk/WebKitWebView.cpp:
2891         (webkitWebViewConstructed): Attach the policy client callbacks to the page.
2892         (webkit_web_view_class_init): Add the decide-policy signal definition.
2893         (webkitWebViewMakePolicyDecision): Added this private method to fire the signal.
2894         * UIProcess/API/gtk/WebKitWebView.h: Added new signal to the list.
2895         * UIProcess/API/gtk/WebKitWebViewPrivate.h: Added new method declaration.
2896         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new classes to the docs.
2897         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
2898         * UIProcess/API/gtk/tests/GNUmakefile.am: Added new test to the source list.
2899         * UIProcess/API/gtk/tests/TestWebKitPolicyClient.cpp: Added.
2900         * UIProcess/API/gtk/webkit2marshal.list: decide-policy has a new signature.
2901
2902 2012-01-27  Ada Chan  <adachan@apple.com>
2903
2904         Add API to get the parent frame in WKBundleFrameRef
2905         https://bugs.webkit.org/show_bug.cgi?id=77161
2906
2907         Reviewed by Anders Carlsson.
2908
2909         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2910         (WKBundleFrameGetParentFrame): Get the parent frame by calling WebFrame::parentFrame().
2911         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2912         * WebProcess/WebPage/WebFrame.cpp:
2913         (WebKit::WebFrame::parentFrame): Return null if the frame does not have an owner element.
2914         Otherwise, return the owner element's frame.
2915         * WebProcess/WebPage/WebFrame.h:
2916
2917 2012-01-27  Gustavo Noronha Silva  <gns@gnome.org>
2918
2919         [GTK] Sometimes fails to build when using make -j
2920         https://bugs.webkit.org/show_bug.cgi?id=77226
2921
2922         Reviewed by Martin Robinson.
2923
2924         * GNUmakefile.am: use a different name for the scripts used to
2925         generate enum files for WebKitGTK+ and WebKit2GTK+, so they do not
2926         clash;
2927
2928 2012-01-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2929
2930         Fix overridePreference for WebKitHixie76WebSocketProtocolEnabled in WebKitTestRunner.
2931         https://bugs.webkit.org/show_bug.cgi?id=77220
2932
2933         Reviewed by Noam Rosenthal.
2934
2935         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2936         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): The macro already stringify TestRunnerName.
2937
2938 2012-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2939
2940         [GTK] Add a GKeyFile especialization to GOwnPtr
2941         https://bugs.webkit.org/show_bug.cgi?id=77191
2942
2943         Reviewed by Martin Robinson.
2944
2945         * Shared/gtk/ArgumentCodersGtk.cpp:
2946         (CoreIPC::decodeGKeyFile): Use GOwnPtr for GKeyFile.
2947         (CoreIPC::encode): Ditto.
2948         (CoreIPC::decode): Ditto.
2949
2950 2012-01-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2951
2952         [Qt] Fade out tap highlighting when starting to pan
2953         https://bugs.webkit.org/show_bug.cgi?id=77202
2954
2955         Reviewed by Simon Hausmann.
2956
2957         Basically we need to fade out the potential tap highlighting
2958         when ever the gesture recognition fails or another gesture
2959         is recognized. We do that with this change.
2960
2961         * UIProcess/qt/QtTapGestureRecognizer.cpp:
2962         (WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
2963         (WebKit::QtTapGestureRecognizer::recognize):
2964         (WebKit::QtTapGestureRecognizer::reset):
2965
2966             Remove reset as it does nothing but call code before the
2967             event handler is installed.
2968
2969 2012-01-26  No'am Rosenthal  <noam.rosenthal@nokia.com> and Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2970
2971         [Qt] WKTR: Use a software rendering pipiline when running tests.
2972         https://bugs.webkit.org/show_bug.cgi?id=76708
2973
2974         Reviewed by Kenneth Rohde Christiansen.
2975
2976         Animation layout tests require the graphics layers tree to be updated
2977         to pass. WebkitTestRunner doesn't show its wrapping QQuickView, which
2978         prevents the rendering pipeline to run and then in turn blocks the web
2979         process from processing further graphics layer updates.
2980
2981         This allows the tests to use a TextureMapperQt to empty the LayerTreeHost's
2982         message queue and render the layers in software on an offscreen buffer.
2983
2984         * UIProcess/API/qt/qquickwebpage.cpp:
2985         (QQuickWebPagePrivate::paint):
2986         * UIProcess/API/qt/qquickwebview.cpp:
2987         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2988         (QQuickWebViewPrivate::setNeedsDisplay):
2989         (QQuickWebViewExperimental::setRenderToOffscreenBuffer):
2990         (QQuickWebViewExperimental::renderToOffscreenBuffer):
2991         * UIProcess/API/qt/qquickwebview_p.h:
2992         * UIProcess/API/qt/qquickwebview_p_p.h:
2993         (QQuickWebViewPrivate::setRenderToOffscreenBuffer):
2994         (QQuickWebViewPrivate::renderToOffscreenBuffer):
2995         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2996         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
2997
2998 2012-01-27  Simon Hausmann  <simon.hausmann@nokia.com>
2999
3000         [Qt] Re-creating QQuickWebView starts new web process every time
3001         https://bugs.webkit.org/show_bug.cgi?id=77194
3002
3003         Reviewed by Kenneth Rohde Christiansen.
3004
3005         Since the WebKit::WebContext is never fully destructed due to circular
3006         references, we should use the real shared context instead of re-creating
3007         a new WebContext every time.
3008
3009         * UIProcess/qt/QtWebContext.cpp:
3010         (WebKit::QtWebContext::defaultContext):
3011
3012 2012-01-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3013
3014         [GTK] Add basic printing support to WebKit2
3015         https://bugs.webkit.org/show_bug.cgi?id=76172
3016
3017         Reviewed by Gustavo Noronha Silva.
3018
3019         * GNUmakefile.am: Add new files to compilation.
3020         * Shared/PrintInfo.cpp:
3021         (WebKit::PrintInfo::encode): Encode also GtkPrintSettings and
3022         GtkPageSetup for the GTK+ port.
3023         (WebKit::PrintInfo::decode): Decode also GtkPrintSettings and
3024         GtkPageSetup for the GTK+ port.
3025         * Shared/PrintInfo.h: Add GtkPrintSettings and GtkPageSetup member
3026         for the GTK+ port.
3027         * Shared/gtk/ArgumentCodersGtk.cpp:
3028         (CoreIPC::encodeGKeyFile): Helper function to encode a GKeyFile as
3029         a DataReference object.
3030         (CoreIPC::decodeGKeyFile): Helper function to decode a GKeyFile to
3031         a DataReference object.
3032         (CoreIPC::encode): Encode GtkPrintSettings and GtkPageSetup using
3033         the GKeyFile representation.
3034         (CoreIPC::decode): Decode GtkPrintSettings and GtkPageSetup using
3035         the GKeyFile representation.
3036         * Shared/gtk/ArgumentCodersGtk.h:
3037         * Shared/gtk/PrintInfoGtk.cpp: Copied from Source/WebKit2/Shared/PrintInfo.cpp.
3038         (WebKit::PrintInfo::PrintInfo): Add PrintInfo constructor that
3039         takes GtkPrintSettings and GtkPageSetup instances.
3040         * UIProcess/WebPageProxy.cpp:
3041         (WebKit::WebPageProxy::drawPagesForPrinting): Send
3042         DrawPagesForPrinting message to Web process to start printing.
3043         * UIProcess/WebPageProxy.h:
3044         * WebProcess/WebPage/WebPage.cpp:
3045         (WebKit::WebPage::beginPrinting): Create a WebPrintOperationGtk.
3046         (WebKit::WebPage::endPrinting): Delete the WebPrintOperationGtk
3047         object.
3048         (WebKit::WebPage::drawPagesForPrinting): Start printing pages.
3049         * WebProcess/WebPage/WebPage.h:
3050         * WebProcess/WebPage/WebPage.messages.in: Add DrawPagesForPrinting message.
3051         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Added.
3052         (WebKit::PrintPagesData::PrintPagesData): Struct to store all data
3053         used to render pages for printing.
3054         (WebKit::PrintPagesData::incrementPageSequence): Helper function
3055         to increment the page sequence.
3056         (WebKit::WebPrintOperationGtk::create): Create a
3057         WebPrintOperationGtkUnix or WebPrintOperationGtkWin32 depending on
3058         the platform.
3059         (WebKit::WebPrintOperationGtk::WebPrintOperationGtk):
3060         (WebKit::WebPrintOperationGtk::~WebPrintOperationGtk):
3061         (WebKit::WebPrintOperationGtk::pageCount): Return the total pages
3062         of the document to print.
3063         (WebKit::WebPrintOperationGtk::rotatePage): Helper function to
3064         transform the context according to orientation.
3065         (WebKit::WebPrintOperationGtk::renderPage): Render the given page
3066         into the printing context.
3067         (WebKit::WebPrintOperationGtk::printPagesIdle): Idle function used
3068         to print pages.
3069         (WebKit::WebPrintOperationGtk::printPagesIdleDone): Callback
3070         called when printPagesIdle finishes.
3071         (WebKit::WebPrintOperationGtk::printDone): Helper function to
3072         finish the print operation, called when all pages have been rendered.
3073         (WebKit::WebPrintOperationGtk::print): Start printing the document
3074         using the given cairo surface.
3075         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: Added.
3076         (WebKit::WebPrintOperationGtk::printSettings):
3077         (WebKit::WebPrintOperationGtk::pageSetup):
3078         (WebKit::WebPrintOperationGtk::pagesToPrint):
3079         (WebKit::WebPrintOperationGtk::pageRanges):
3080         (WebKit::WebPrintOperationGtk::pageRangesCount):
3081
3082 2012-01-26  Tim Horton  <hortont424@gmail.com>
3083
3084         3D transformed elements hide when showing the print dialog
3085         https://bugs.webkit.org/show_bug.cgi?id=45894
3086         <rdar://problem/7441593>
3087
3088         Reviewed by Andy Estes.
3089
3090         Suspend updates of the compositing layer tree while printing is taking place,
3091         preventing on-screen layers from moving to their print-mode positions.
3092
3093         * WebProcess/WebPage/WebPage.cpp:
3094         (WebKit::WebPage::beginPrinting):
3095         (WebKit::WebPage::endPrinting):
3096         * WebProcess/WebPage/ca/LayerTreeHostCA.h:
3097         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
3098         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
3099         (WebKit::LayerTreeHostCAMac::forceRepaint):
3100         (WebKit::LayerTreeHostCAMac::flushPendingLayerChanges):
3101
3102 2012-01-26  Andras Becsi  <andras.becsi@nokia.com>
3103
3104         [Qt][WK2] Add the componentComplete method to WebView
3105         https://bugs.webkit.org/show_bug.cgi?id=77111
3106
3107         Reviewed by Kenneth Rohde Christiansen.
3108
3109         Move the touch/desktop initialization to componentComplete.
3110         Also return valid default values in the viewport info functions
3111         if the interaction engine is not yet initialized because the
3112         viewport info component could finish initialization earlier
3113         than the WebView, which results in QML warnings during MiniBrowser
3114         startup.
3115
3116         * UIProcess/API/qt/qquickwebview.cpp:
3117         (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour):
3118         (QQuickWebView::geometryChanged):
3119         (QQuickWebView::componentComplete):
3120         * UIProcess/API/qt/qquickwebview_p.h:
3121         * UIProcess/API/qt/qwebviewportinfo.cpp:
3122         (QWebViewportInfo::currentScale):
3123         (QWebViewportInfo::devicePixelRatio):
3124         (QWebViewportInfo::initialScale):
3125         (QWebViewportInfo::minimumScale):
3126         (QWebViewportInfo::maximumScale):
3127         (QWebViewportInfo::isScalable):
3128         (QWebViewportInfo::layoutSize):
3129
3130 2012-01-26  Anders Carlsson  <andersca@apple.com>
3131
3132         WebWheelEvent::Phase and PlatformWheelEvent::Phase declarations should match AppKit
3133         https://bugs.webkit.org/show_bug.cgi?id=77123
3134
3135         Reviewed by Beth Dakin.
3136
3137         * Shared/WebEvent.h:
3138         ():
3139         * Shared/mac/WebEventFactory.mm:
3140         (WebKit::phaseForEvent):
3141
3142 2012-01-26  Andras Becsi  <andras.becsi@nokia.com>
3143
3144         ASSERT(!m_overlay) reached in TapHighlightController.cpp:73
3145         https://bugs.webkit.org/show_bug.cgi?id=77117
3146
3147         Reviewed by Tor Arne Vestbø.
3148
3149         The PageOverlay does only get uninstalled after the fade-out animation finishes,
3150         so do not assert on !m_overlay after the uninstallPageOverlay call.
3151
3152         * WebProcess/WebPage/TapHighlightController.cpp:
3153         (WebKit::TapHighlightController::hideHighlight):
3154
3155 2012-01-26  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3156
3157         WebPreferencesStore: use DEFINE_STATIC_LOCAL for overrides HashMap
3158         https://bugs.webkit.org/show_bug.cgi?id=77109
3159
3160         Reviewed by Andreas Kling.
3161
3162         Fix build for Clang.
3163
3164         * Shared/WebPreferencesStore.cpp:
3165         (WebKit):
3166         (WebKit::boolTestRunnerOverridesMap):
3167         (WebKit::WebPreferencesStore::overrideBoolValueForKey):
3168         (WebKit::WebPreferencesStore::removeTestRunnerOverrides):
3169         (WebKit::WebPreferencesStore::getBoolValueForKey):
3170
3171 2012-01-26  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3172
3173         Implement overridePreference for boolean preferences in WebKitTestRunner
3174         https://bugs.webkit.org/show_bug.cgi?id=77033
3175
3176         Reviewed by Alexey Proskuryakov.
3177
3178         Implement a way to WebKitTestRunner override preferences for the pages
3179         loaded. Follows the same approach taken by
3180         overrideXSSAuditorEnabledForTestRunner() from r66551, but generalizing to many
3181         preferences.
3182
3183         Preferences are stored in the UI process using WebPreferencesStore, and when
3184         there's a change, this data is sent to Web process, triggering
3185         WebPage::preferencesDidChange(), which take a WebPreferencesStore and apply it's
3186         data to the WebCore::Settings object.
3187
3188         The overridePreference() is executed on the Web process, and set the preferences
3189         without communicating to the UI process. The overriden preferences are stored in
3190         a static map and WebPreferencesStore query this map before returning the values
3191         of each preference. This static map is used only on the Web process.
3192
3193         To clear the overrides we need to clear the map. Since WTR only sets preferences
3194         when resetting the page, we hook the clearing at WebPage::preferencesDidChange().
3195         A WKPreferences private function was exposed to WTR force the update, in case
3196         there's no effective change at UI process (all the properties remains the same).
3197
3198         This clearing could be improved by creating a proper message instead of hooking
3199         at WebPage::preferencesDidChange().
3200
3201         * Shared/WebPreferencesStore.cpp:
3202         (WebKit::WebPreferencesStore::decode):
3203         (WebKit::WebPreferencesStore::overrideBoolValueForKey):
3204         (WebKit::WebPreferencesStore::removeTestRunnerOverrides):
3205         (WebKit::WebPreferencesStore::getBoolValueForKey):
3206         * Shared/WebPreferencesStore.h:
3207         * UIProcess/API/C/WKPreferences.cpp:
3208         (WKPreferencesResetTestRunnerOverrides):
3209         * UIProcess/API/C/WKPreferencesPrivate.h:
3210         * UIProcess/WebPreferences.h:
3211         (WebKit::WebPreferences::forceUpdate):
3212         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3213         (WKBundleOverrideBoolPreferenceForTestRunner):
3214         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3215         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3216         (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
3217         (WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner):
3218         * WebProcess/InjectedBundle/InjectedBundle.h:
3219
3220 2012-01-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3221
3222         [GTK][WK2] Primary clipboard should be updated with the current selection in X11 platforms
3223         https://bugs.webkit.org/show_bug.cgi?id=77097
3224
3225         Reviewed by Martin Robinson.
3226
3227         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3228         (WebKit::WebEditorClient::respondToChangedSelection): Call
3229         setSelectionPrimaryClipboardIfNeeded() to update primary clipboard
3230         in X11 platforms.
3231         * WebProcess/WebCoreSupport/WebEditorClient.h:
3232         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
3233         (WebKit::collapseSelection): Callback called when clearing
3234         clipboard contents.
3235         (WebKit::WebEditorClient::setSelectionPrimaryClipboardIfNeeded):
3236         Updaye primary clipboard with the current selection.
3237
3238 2012-01-26  Zeno Albisser  <zeno@webkit.org>
3239
3240         [Qt][WK2] Use QVariant for payload data in application URL schemes.
3241         https://bugs.webkit.org/show_bug.cgi?id=77007
3242
3243         Make application schemes use QVariant for payload data.
3244         This allows passing QByteArrays as well as simple String data.
3245
3246         Remove unneeded http header parts that were exposed in
3247         QQuickNetworkReply.
3248
3249         Add ByteArrayTestData class to allow injecting QByteArray
3250         data into an application scheme handler for testing.
3251
3252         Reviewed by Simon Hausmann.
3253
3254         * Shared/qt/QtNetworkReplyData.cpp:
3255         (WebKit::QtNetworkReplyData::QtNetworkReplyData):
3256         (WebKit::QtNetworkReplyData::encode):
3257         (WebKit::QtNetworkReplyData::decode):
3258         * Shared/qt/QtNetworkReplyData.h:
3259         * UIProcess/API/qt/qquicknetworkreply.cpp:
3260         (QQuickNetworkReply::QQuickNetworkReply):
3261         (QQuickNetworkReply::data):
3262         (QQuickNetworkReply::setData):
3263         (QQuickNetworkReply::send):
3264         * UIProcess/API/qt/qquicknetworkreply_p.h:
3265         * UIProcess/API/qt/tests/bytearraytestdata.cpp: Added.
3266         (ByteArrayTestData::ByteArrayTestData):
3267         (ByteArrayTestData::latin1Data):
3268         (ByteArrayTestData::utf8Data):
3269         * UIProcess/API/qt/tests/bytearraytestdata.h: Added.
3270         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
3271         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
3272         (main):
3273         * UIProcess/API/qt/tests/tests.pri:
3274         * WebProcess/qt/QtNetworkReply.cpp:
3275         (WebKit::QtNetworkReply::setReplyData):
3276         * WebProcess/qt/QtNetworkReply.h:
3277
3278 2012-01-26  Thiago Marcos P. Santos  <tmpsantos@gmail.com>
3279
3280         [Qt] Fixed build when using force_static_libs_as_shared
3281         https://bugs.webkit.org/attachment.cgi?bugid=77082
3282
3283         Reviewed by Simon Hausmann.
3284
3285         * Target.pri:
3286
3287 2012-01-26  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
3288
3289         [WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission
3290         https://bugs.webkit.org/show_bug.cgi?id=42545
3291
3292         Reviewed by Zoltan Herczeg.
3293
3294         Implement the setGeolocationPermission method.
3295
3296         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3297         (WKBundleSetGeolocationPermission):
3298         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3299         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3300         (WebKit::InjectedBundle::setGeoLocationPermission):
3301         (WebKit):
3302         * WebProcess/InjectedBundle/InjectedBundle.h:
3303         (InjectedBundle):
3304
3305 2012-01-25  Mark Rowe  <mrowe@apple.com>
3306
3307         Build in to an alternate location when USE_STAGING_INSTALL_PATH is set.
3308
3309         <rdar://problem/10609417> Adopt USE_STAGING_INSTALL_PATH
3310
3311         Reviewed by David Kilzer.
3312
3313         * Configurations/BaseTarget.xcconfig: Define NORMAL_WEBKIT2_FRAMEWORKS_DIR, which contains
3314         the path where WebKit is normally installed. Update WEBKIT2_FRAMEWORKS_DIR to point to
3315         the staged frameworks directory when USE_STAGING_INSTALL_PATH is set. Update
3316         UMBRELLA_FRAMEWORKS_DIR so we can find WebCore at the top level of the staged frameworks
3317         directory when USE_STAGING_INSTALL_PATH is set, rather than finding it embedded inside of
3318         WebKit.framework.
3319         * Configurations/PluginProcess.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR.
3320         * Configurations/WebKit2.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR.
3321         Always set the framework's install name based on the normal framework location. This prevents
3322         an incorrect install name from being used when installing in to the staged frameworks directory.
3323         * Configurations/WebProcess.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR.
3324
3325 2012-01-25  No'am Rosenthal  <noam.rosenthal@nokia.com>
3326
3327         [WK2][Qt] REGRESSION: Pages with transform animations sometimes omit some of the layers since r105413
3328         https://bugs.webkit.org/show_bug.cgi?id=76886
3329
3330         Reviewed by Kenneth Rohde Christiansen.
3331
3332         We now render the whole layer if it or one if its ancestors has an active transform
3333         animations. It's possible to optimize further in the future, but not currently necessary.
3334         Also, we make sure that when a WebGraphicsLayer's property that affects transformation is
3335         changed, all its descandants layers are marked as modified so that we re-adjust their
3336         visible rect in the next pass.
3337
3338         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3339         (WebCore::WebGraphicsLayer::notifyChangeRecursively):
3340         (WebCore):
3341         (WebCore::WebGraphicsLayer::setPosition):
3342         (WebCore::WebGraphicsLayer::setAnchorPoint):
3343         (WebCore::WebGraphicsLayer::setSize):
3344         (WebCore::WebGraphicsLayer::setTransform):
3345         (WebCore::WebGraphicsLayer::setChildrenTransform):
3346         (WebCore::WebGraphicsLayer::setPreserves3D):
3347         (WebCore::WebGraphicsLayer::setMasksToBounds):
3348         (WebCore::WebGraphicsLayer::addAnimation):
3349         (WebCore::WebGraphicsLayer::removeAnimation):
3350         (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect):
3351         (WebCore::WebGraphicsLayer::selfOrAncestorHasActiveTransformAnimations):
3352         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3353         (WebGraphicsLayer):
3354
3355 2012-01-25  Hajime Morita  <morrita@google.com>
3356
3357         ENABLE_SHADOW_DOM should be available via build-webkit --shadow-dom
3358         https://bugs.webkit.org/show_bug.cgi?id=76863
3359
3360         Reviewed by Dimitri Glazkov.
3361
3362         Added a feature flag.
3363
3364         * Configurations/FeatureDefines.xcconfig:
3365
3366 2012-01-25  Martin Robinson  <mrobinson@igalia.com>
3367
3368         [WK2] Navigation events not triggered by a mouse event claim to be triggered by the left mouse button during policy decisions
3369         https://bugs.webkit.org/show_bug.cgi?id=76344
3370
3371         Reviewed by Sam Weinig.
3372
3373         When creating InjectedBundleNavigationActions, initialize the mouse button to NoButton.
3374         This ensures that when there is no mouse event associated with the action, when the event
3375         hits the client-API layer, the button is still NoButton.
3376
3377         * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
3378         (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): Initialize m_mouseButton
3379         to WebMouseEvent::NoButton.
3380
3381 2012-01-25  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3382
3383         [Qt] Implement tap feedback respecting -webkit-tap-highlight-color
3384         https://bugs.webkit.org/show_bug.cgi?id=76914
3385
3386         Reviewed by Simon Hausmann.
3387
3388         Implement tap highlighting for Qt. When a touch press is issued,
3389         which is not handled by the web page, then we highlight any
3390         activatable node below. In all otehr cases, we hide any highlights.
3391
3392         The highlighting itself is painted on an accelerated PageOverlay,
3393         on the web process side.
3394
3395         * Target.pri:
3396         * UIProcess/WebPageProxy.cpp:
3397         (WebKit::WebPageProxy::handlePotentialActivation):
3398         * UIProcess/WebPageProxy.h:
3399         * UIProcess/qt/QtTapGestureRecognizer.cpp:
3400         (WebKit::QtTapGestureRecognizer::recognize):
3401         * UIProcess/qt/QtWebPageEventHandler.cpp:
3402         (QtWebPageEventHandler::handlePotentialSingleTapEvent):
3403         * UIProcess/qt/QtWebPageEventHandler.h:
3404         * WebProcess/WebPage/TapHighlightController.cpp: Added.
3405         (WebKit::TapHighlightController::TapHighlightController):
3406         (WebKit::TapHighlightController::~TapHighlightController):
3407         (WebKit::TapHighlightController::highlight):
3408         (WebKit::TapHighlightController::hideHighlight):
3409         (WebKit::TapHighlightController::pageOverlayDestroyed):
3410         (WebKit::TapHighlightController::willMoveToWebPage):
3411         (WebKit::TapHighlightController::didMoveToWebPage):
3412         (WebKit::highlightColor):
3413         (WebKit::TapHighlightController::drawRect):
3414         (WebKit::TapHighlightController::mouseEvent):
3415         * WebProcess/WebPage/TapHighlightController.h: Added.
3416         * WebProcess/WebPage/WebPage.cpp:
3417         (WebKit::WebPage::WebPage):
3418         (WebKit::WebPage::highlightPotentialActivation):
3419         * WebProcess/WebPage/WebPage.h:
3420         (WebKit::WebPage::tapHighlightController):
3421         * WebProcess/WebPage/WebPage.messages.in:
3422
3423 2012-01-25  Nándor Huszka  <huszka.nandor@stud.u-szeged.hu>
3424
3425         [WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled
3426         https://bugs.webkit.org/show_bug.cgi?id=63458
3427
3428         Reviewed by Adam Roben.
3429
3430         Implement the setPopupBlockingEnabled method.
3431
3432         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3433         (WKBundleSetPrivateBrowsingEnabled):
3434         (WKBundleSetPopupBlockingEnabled):
3435         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3436         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3437         (WebKit::InjectedBundle::setPopupBlockingEnabled):
3438         * WebProcess/InjectedBundle/InjectedBundle.h:
3439
3440 2012-01-25  Yael Aharon  <yael.aharon@nokia.com>
3441
3442         [Qt] Build fix when using force_static_libs_as_shared
3443         https://bugs.webkit.org/show_bug.cgi?id=76832
3444
3445         Reviewed by Simon Hausmann.
3446
3447         Add a dependency on QtWidgets.
3448
3449         * Target.pri:
3450
3451 2012-01-24  Sergio Villar Senin  <svillar@igalia.com>
3452
3453         [WK2] FindController should not assume that ports do not want to highlight text matches
3454         https://bugs.webkit.org/show_bug.cgi?id=76921
3455
3456         Reviewed by Darin Adler.
3457
3458         FindController must obey the FindOptionsShowHighlight flag instead
3459         of assuming that ports do not want to highlight search matches.
3460
3461         * Shared/API/c/WKFindOptions.h: added kWKFindOptionsShowHighlight.
3462         * Shared/API/c/WKSharedAPICast.h:
3463         (WebKit::toFindOptions): Ditto.
3464         * Shared/WebFindOptions.h: added FindOptionsShowHighlight.
3465         * WebProcess/WebPage/FindController.cpp:
3466         (WebKit::FindController::findString):
3467
3468 2012-01-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3469 <