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