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