e66db37e79389a63bcf21c500452c1d26d5b1c73
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2012-03-23  Alexey Proskuryakov  <ap@apple.com>
2
3         [Mac] No need for platform-specific ENABLE_BLOB values
4         https://bugs.webkit.org/show_bug.cgi?id=82102
5
6         Reviewed by David Kilzer.
7
8         * Configurations/FeatureDefines.xcconfig:
9
10 2012-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
11
12         Unreviewed, rolling out r108851.
13         http://trac.webkit.org/changeset/108851
14         https://bugs.webkit.org/show_bug.cgi?id=82098
15
16         "Revert the addition of unnecessary, deprecated functions in
17         WKPreferences.h" (Requested by estes on #webkit).
18
19         * UIProcess/API/C/WKPreferences.cpp:
20         * UIProcess/API/C/WKPreferences.h:
21
22 2012-03-23  Brent Fulgham  <bfulgham@webkit.org>
23
24         [WinCairo] Unreviewed build fix.
25
26         * win/WebKit2CFLite.def: Add missing export symbols so that other
27         tools can link properly.
28
29 2012-03-23  Dean Jackson  <dino@apple.com>
30
31         Disable CSS_SHADERS in Apple builds
32         https://bugs.webkit.org/show_bug.cgi?id=81996
33
34         Reviewed by Simon Fraser.
35
36         Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h.
37
38         * Configurations/FeatureDefines.xcconfig:
39
40 2012-03-23  Dave Michael  <dmichael@chromium.org>
41
42         Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
43         https://bugs.webkit.org/show_bug.cgi?id=80428
44
45         Reviewed by Eric Seidel and Ryosuke Niwa.
46
47         * win/WebKit2.def: Export a symbol for InspectorCounters::counterValue
48         * win/WebKit2CFLite.def: Export a symbol for InspectorCounters::counterValue
49
50 2012-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
51
52         Unreviewed, rolling out r111855.
53         http://trac.webkit.org/changeset/111855
54         https://bugs.webkit.org/show_bug.cgi?id=82053
55
56         It broke 30+ tests (Requested by Ossy on #webkit).
57
58         * UIProcess/qt/QtPageClient.cpp:
59         (QtPageClient::isViewWindowActive):
60
61 2012-03-23  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
62
63         [Qt][WK2] Implement PageClient::isViewWindowActive()
64         https://bugs.webkit.org/show_bug.cgi?id=81143
65
66         Reviewed by Kenneth Rohde Christiansen.
67
68         This patch implements PageClient::isViewWindowActive()
69         now that QQuickCanvas::isActive() is available (from QWindow).
70
71         * UIProcess/qt/QtPageClient.cpp:
72         (QtPageClient::isViewWindowActive):
73
74 2012-03-23  Andras Becsi  <andras.becsi@nokia.com>
75
76         [Qt][WK2] Disable the flickable when pinching.
77
78         Reviewed by Kenneth Rohde Christiansen.
79
80         Set the interactivity of the internal flickable to false
81         when pinching so that it does not react to mouse events
82         which might break pinch zoom.
83         This is a temporal workaround and needed until the event
84         propagation in QtQuick is fixed.
85
86         * UIProcess/qt/QtViewportInteractionEngine.cpp:
87         (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
88         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
89         (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
90
91 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
92
93         REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms
94         https://bugs.webkit.org/show_bug.cgi?id=82035
95
96         * win/WebKit2.def:
97         * win/WebKit2CFLite.def:
98
99 2012-03-22  Anders Carlsson  <andersca@apple.com>
100
101         Remove the Flash NPRuntime short-circuit hacks
102         https://bugs.webkit.org/show_bug.cgi?id=81997
103         <rdar://problem/10409289>
104
105         Reviewed by Sam Weinig.
106
107         This code was added to help speed up Flash plug-in instantiation by reducing the number of
108         synchronous API calls from the plug-in process to the web process during instantiation.
109         However, there was no real indication that this actually improved performance.
110
111         Furthermore, it seems to have introduced crashers when misbehaving plug-ins would make NPRuntime calls
112         after a plug-in had been destroyed. Since Flash is now 64-bit like the rest of WebKit launch time has
113         improved since we don't have to bring in all of the 32-bit system frameworks, so the time has come to
114         rip out this egregious hack.
115
116         * PluginProcess/PluginControllerProxy.cpp:
117         (WebKit::PluginControllerProxy::evaluate):
118         * PluginProcess/PluginControllerProxy.h:
119         (PluginControllerProxy):
120         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
121         (WebKit::NetscapePluginModule::determineQuirks):
122         * Shared/Plugins/PluginQuirks.h:
123         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
124         (WebKit::NPN_Invoke):
125         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
126         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
127         (NetscapePlugin):
128         * WebProcess/Plugins/Plugin.cpp:
129         (WebKit::Plugin::Parameters::encode):
130         (WebKit::Plugin::Parameters::decode):
131         * WebProcess/Plugins/Plugin.h:
132         (Parameters):
133         * WebProcess/Plugins/PluginController.h:
134         (PluginController):
135         * WebProcess/Plugins/PluginView.cpp:
136         * WebProcess/Plugins/PluginView.h:
137         (PluginView):
138         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
139         (WebKit::WebFrameLoaderClient::createPlugin):
140
141 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
142
143         [CMake] Unreviewed build fix after r111778.
144
145         * CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with
146         ${WTF_DIR}/wtf ones.
147
148 2012-03-22  Csaba Osztrogonác  <ossy@webkit.org>
149
150         Actually move WTF files to their new home
151         https://bugs.webkit.org/show_bug.cgi?id=81844
152
153         [Qt] Unreviewed buildfix after r111778.
154
155         * UIProcess/API/qt/qquicknetworkrequest_p.h:
156         * WebKit2.pri:
157
158 2012-03-22  Dave Michael  <dmichael@chromium.org>
159
160         HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
161         https://bugs.webkit.org/show_bug.cgi?id=80428
162
163         Reviewed by Eric Seidel.
164
165         Test: plugins/netscape-dom-access-and-reload.html
166
167         * win/WebKit2.def: Export a symbol for InspectorCounters::counterValue
168         * win/WebKit2CFLite.def: Export a symbol for InspectorCounters::counterValue
169
170 2012-03-22  Pierre Rossi  <pierre.rossi@gmail.com>
171
172         Revert back the device DPI to 160.
173
174         This corresponds to a device pixel ratio of 1, which
175         is nicer on the eye in many cases.
176
177         Rubber-stamped by Kenneth Rohde Christiansen.
178
179         * UIProcess/API/qt/qquickwebview.cpp:
180         (QQuickWebViewFlickablePrivate::computeViewportConstraints):
181
182 2012-03-22  Alexander Færøy  <alexander.faeroy@nokia.com>
183
184         [Qt][WK2] Remember to initialize databaseQuotaDialog
185         https://bugs.webkit.org/show_bug.cgi?id=81942
186
187         Reviewed by Kenneth Rohde Christiansen.
188
189         * UIProcess/API/qt/qquickwebview.cpp:
190         (QQuickWebViewPrivate::QQuickWebViewPrivate):
191
192 2012-03-22  Alexander Færøy  <alexander.faeroy@nokia.com>
193
194         [Qt][WK2] Pass Origin information to the DatabaseQuotaDialogContextObject
195         https://bugs.webkit.org/show_bug.cgi?id=81910
196
197         Reviewed by Simon Hausmann.
198
199         * UIProcess/API/qt/qquickwebview.cpp:
200         (QQuickWebViewPrivate::exceededDatabaseQuota):
201         * UIProcess/API/qt/qquickwebview_p_p.h:
202         (QQuickWebViewPrivate):
203         * UIProcess/qt/QtDialogRunner.cpp:
204         (DatabaseQuotaDialogContextObject):
205         (DatabaseQuotaDialogContextObject::DatabaseQuotaDialogContextObject):
206         (DatabaseQuotaDialogContextObject::securityOrigin):
207         (QtDialogRunner::initForDatabaseQuotaDialog):
208         * UIProcess/qt/QtDialogRunner.h:
209         (QtDialogRunner):
210         * UIProcess/qt/QtWebPageUIClient.cpp:
211         (QtWebPageUIClient::exceededDatabaseQuota):
212         * UIProcess/qt/QtWebPageUIClient.h:
213
214 2012-03-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
215
216         [Qt] Don't resume the suspended page if the user is continuously flicking.
217         https://bugs.webkit.org/show_bug.cgi?id=81895
218
219         Reviewed by Kenneth Rohde Christiansen.
220
221         Create an additional suspend deferrer between TouchBegin and TouchEnd to
222         relay with the one kept while the flick animation is running.
223         This allows the page to be suspended when a pan gesture starts and stay
224         that way until the last flick animation ends.
225
226         * UIProcess/qt/QtViewportInteractionEngine.cpp:
227         (WebKit::QtViewportInteractionEngine::touchBegin):
228         (WebKit):
229         (WebKit::QtViewportInteractionEngine::touchEnd):
230         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
231         * UIProcess/qt/QtViewportInteractionEngine.h:
232         (QtViewportInteractionEngine):
233         * UIProcess/qt/QtWebPageEventHandler.cpp:
234         (QtWebPageEventHandler::doneWithTouchEvent):
235
236 2012-03-22  Carlos Garcia Campos  <cgarcia@bb-webkit-rel-64.local.igalia.com>
237
238         [GTK] Use the angle-bracket form to include wtf headers
239         https://bugs.webkit.org/show_bug.cgi?id=81884
240
241         Reviewed by Eric Seidel.
242
243         Use #include <wtf/foo> instead of #include <JavaScriptCore/foo>.
244
245         * UIProcess/API/gtk/tests/TestMain.h:
246         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
247
248 2012-03-22  No'am Rosenthal  <noam.rosenthal@nokia.com>
249
250         [Qt][WK2] The background appears to have one extra pixel from the contents
251         https://bugs.webkit.org/show_bug.cgi?id=81830
252
253         Reviewed by Kenneth Rohde Christiansen.
254
255         The clip-polygon from the scenegraph uses floats, not integers.
256         This could cause 1-offset clipping problems in some cases.
257
258         * UIProcess/qt/QtWebPageSGNode.cpp:
259         (WebKit::ContentsSGNode::clipRect):
260
261 2012-03-21  Alexander Færøy  <alexander.faeroy@nokia.com>
262
263         [Qt][WK2] Add QML API for handling database quotas
264         https://bugs.webkit.org/show_bug.cgi?id=81827
265
266         Reviewed by Simon Hausmann.
267
268         Patch by Pierre Rossi and Alexander Færøy.
269
270         This patch adds a QML API for handling database quotas.
271
272         * UIProcess/API/qt/qquickwebview.cpp:
273         (QQuickWebViewPrivate::exceededDatabaseQuota):
274         (QQuickWebViewExperimental::databaseQuotaDialog):
275         (QQuickWebViewExperimental::setDatabaseQuotaDialog):
276         * UIProcess/API/qt/qquickwebview_p.h:
277         * UIProcess/API/qt/qquickwebview_p_p.h:
278         (QQuickWebViewPrivate):
279         * UIProcess/qt/QtDialogRunner.cpp:
280         (DatabaseQuotaDialogContextObject):
281         (DatabaseQuotaDialogContextObject::DatabaseQuotaDialogContextObject):
282         (DatabaseQuotaDialogContextObject::databaseName):
283         (DatabaseQuotaDialogContextObject::displayName):
284         (DatabaseQuotaDialogContextObject::currentQuota):
285         (DatabaseQuotaDialogContextObject::currentOriginUsage):
286         (DatabaseQuotaDialogContextObject::currentDatabaseUsage):
287         (DatabaseQuotaDialogContextObject::expectedUsage):
288         (DatabaseQuotaDialogContextObject::accept):
289         (DatabaseQuotaDialogContextObject::reject):
290         (QtDialogRunner::initForDatabaseQuotaDialog):
291         * UIProcess/qt/QtDialogRunner.h:
292         (QtDialogRunner):
293         (QtDialogRunner::databaseQuota):
294         (QtDialogRunner::onDatabaseQuotaAccepted):
295         * UIProcess/qt/QtWebPageUIClient.cpp:
296         (QtWebPageUIClient::QtWebPageUIClient):
297         (QtWebPageUIClient::exceededDatabaseQuota):
298         * UIProcess/qt/QtWebPageUIClient.h:
299         * UIProcess/qt/WebContextQt.cpp:
300         (WebKit::WebContext::platformDefaultDatabaseDirectory):
301
302 2012-03-21  Tim Horton  <timothy_horton@apple.com>
303
304         Make use of CG rounded-rect primitives
305         https://bugs.webkit.org/show_bug.cgi?id=79932
306         <rdar://problem/9274953>
307
308         Reviewed by Simon Fraser.
309         
310         Portions of patch by Nikolas Zimmermann and Mustafizur Rahaman.
311
312         Add wkCGPathAddRoundedRect.
313
314         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
315         (InitWebCoreSystemInterface):
316
317 2012-03-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
318
319         [Qt] WebGraphicsLayer: Untie the layer updates and tile updates.
320         https://bugs.webkit.org/show_bug.cgi?id=81771
321
322         Reviewed by Kenneth Rohde Christiansen.
323
324         The DidRenderFrame message needs to be sent for every UpdateTileForLayer
325         message, but this currently has to be triggered by m_shouldSyncFrame which
326         is only set after sending a SyncCompositingLayerState message.
327         This patch makes sure that tile updates won't trigger sending the whole
328         layer info if it didn't change, and send the DidRenderFrame message directly.
329
330         It also makes sure that the layer info is sent before any tile update so that
331         the layer can be created on the UI process before any tile update is handled.
332
333         * UIProcess/WebLayerTreeRenderer.cpp:
334         (WebKit::WebLayerTreeRenderer::getBackingStore):
335         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
336         (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly):
337         (WebCore::WebGraphicsLayer::tiledBackingStorePaint):
338         (WebCore::WebGraphicsLayer::createTile):
339         (WebCore::WebGraphicsLayer::updateTile):
340         (WebCore::WebGraphicsLayer::removeTile):
341         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
342         (WebKit::LayerTreeHostQt::createTile):
343         (WebKit::LayerTreeHostQt::updateTile):
344         (WebKit::LayerTreeHostQt::removeTile):
345
346 2012-03-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
347
348         [Qt] Don't clip the contents rendering to the contents size.
349         https://bugs.webkit.org/show_bug.cgi?id=81770
350
351         Reviewed by Kenneth Rohde Christiansen.
352
353         The original bug was caused by the contents size updates
354         having to go through the UI process before being applied
355         on the TiledBackingStore of the non composited contents layer.
356         With this bug being fixed, the clipping isn't necessary anymore.
357
358         * UIProcess/qt/LayerBackingStore.cpp:
359         (WebKit::LayerBackingStore::paintToTextureMapper):
360
361 2012-03-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
362
363         [Qt] Apply tile removals at the same time as update buffer swaps.
364         https://bugs.webkit.org/show_bug.cgi?id=81768
365
366         Reviewed by Kenneth Rohde Christiansen.
367
368         When committing the scale, we have to remove old tiles once the
369         tiles for the new scale are rendered. This should however wait
370         until those tiles gets their buffer swapped (following the DidRenderFrame
371         message) to make sure that there is no rendered gap between the removals
372         and updates swap.
373         This patch continues rendering the removed tiles until the DidRenderFrame
374         message is received to discard the old contents and show the new contents
375         at the same frame.
376
377         * UIProcess/WebLayerTreeRenderer.cpp:
378         (WebKit::WebLayerTreeRenderer::commitTileUpdates):
379         (WebKit::WebLayerTreeRenderer::flushLayerChanges):
380         * UIProcess/WebLayerTreeRenderer.h:
381         (WebLayerTreeRenderer):
382         * UIProcess/qt/LayerBackingStore.cpp:
383         (WebKit::LayerBackingStore::removeTile):
384         (WebKit::LayerBackingStore::commitTileUpdates):
385         * UIProcess/qt/LayerBackingStore.h:
386         (LayerBackingStore):
387
388 2012-03-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
389
390         [Qt] Trigger scene graph repaints only for relevant layer updates.
391         https://bugs.webkit.org/show_bug.cgi?id=81765
392
393         Reviewed by Kenneth Rohde Christiansen.
394
395         Tile updates and removal shouldn't re-render the scene all by themselves
396         since they need a buffer swap before having any effect on the framebuffer.
397
398         * UIProcess/LayerTreeHostProxy.cpp:
399         (WebKit::LayerTreeHostProxy::dispatchUpdate):
400         (WebKit::LayerTreeHostProxy::deleteCompositingLayer):
401         (WebKit::LayerTreeHostProxy::setRootCompositingLayer):
402         (WebKit::LayerTreeHostProxy::didRenderFrame):
403
404 2012-03-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
405
406         [Qt] Don't go through the UI process to update a layer's contents size.
407         https://bugs.webkit.org/show_bug.cgi?id=81764
408
409         Reviewed by Kenneth Rohde Christiansen.
410
411         It's happening when navigating pages that contents from the old page
412         is still present on the tiles until the contents size is shrunk to cut it out.
413         Since the contents size updates are asynchronous and go through the UI process,
414         this could occasionally show some glitch frames.
415         Even worse, the user could delay this update by starting to pan and keep
416         his finger on the screen.
417         This patch makes sure that changes to contents size are notifying the LayerTreeHost
418         immediately when in fixed layout mode, and remove the loop through the UI process.
419
420         * UIProcess/API/qt/qquickwebpage.cpp:
421         (QQuickWebPage::setContentsSize):
422         * UIProcess/API/qt/qquickwebpage_p_p.h:
423         (QQuickWebPagePrivate):
424         * UIProcess/API/qt/qquickwebview.cpp:
425         (QQuickWebViewPrivate::didRelaunchProcess):
426         (QQuickWebViewLegacyPrivate::updateViewportSize):
427         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
428         (WebKit::WebChromeClient::contentsSizeChanged):
429         * WebProcess/WebPage/DrawingArea.h:
430         (WebKit):
431         (WebKit::DrawingArea::layerTreeHost):
432         * WebProcess/WebPage/DrawingAreaImpl.cpp:
433         (WebKit::DrawingAreaImpl::updateBackingStoreState):
434         * WebProcess/WebPage/DrawingAreaImpl.h:
435         (WebKit::DrawingAreaImpl::layerTreeHost):
436         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
437         (WebKit::LayerTreeHostQt::sizeDidChange):
438
439 2012-03-21  Kenneth Rohde Christiansen  <kenneth@webkit.org>
440
441         The activation highlight does not always hide
442         https://bugs.webkit.org/show_bug.cgi?id=81767
443
444         Reviewed by Simon Hausmann.
445
446         The zero point used for hiding potential activations should
447         not be transformed.
448
449         * UIProcess/qt/QtWebPageEventHandler.cpp:
450         (QtWebPageEventHandler::handlePotentialSingleTapEvent):
451
452 2012-03-21  Dinu Jacob  <dinu.jacob@nokia.com>
453
454         [Qt][WK2] Item cannot be selected from select list in touch webview
455         https://bugs.webkit.org/show_bug.cgi?id=81674
456
457         Reviewed by Simon Hausmann.
458
459         Activate flag to prevent QQuickWebView from accepting touch event when select
460         dialog is being displayed.
461
462         * UIProcess/API/qt/qquickwebview.cpp:
463         (QQuickWebViewPrivate::QQuickWebViewPrivate):
464         (QQuickWebViewPrivate::execDialogRunner):
465         (QQuickWebView::touchEvent):
466         * UIProcess/API/qt/qquickwebview_p_p.h:
467         (QQuickWebViewPrivate::setDialogActive):
468         (QQuickWebViewPrivate):
469         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
470         (WebKit::WebPopupMenuProxyQt::showPopupMenu):
471         (WebKit::WebPopupMenuProxyQt::hidePopupMenu):
472
473 2012-03-21  Kenneth Rohde Christiansen  <kenneth@webkit.org>
474
475         [Qt] Remove the PostTransitionState
476         https://bugs.webkit.org/show_bug.cgi?id=81751
477
478         Reviewed by Simon Hausmann.
479
480         As we are handling content size change event etc from the
481         WebProcess, that conflicts with the PostTransitionState handling
482         and we therefore need to handle this slightly differently.
483
484         Remove the code and make sure that we never resize the tiled
485         area to something smaller than the layout viewport.
486
487         * UIProcess/API/qt/qquickwebview.cpp:
488         (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate):
489         (QQuickWebViewFlickablePrivate::loadDidCommit):
490         (QQuickWebViewFlickablePrivate::didFinishFirstNonEmptyLayout):
491         (QQuickWebViewFlickablePrivate::didChangeViewportProperties):
492         (QQuickWebViewFlickablePrivate::_q_resume):
493         (QQuickWebViewFlickablePrivate::pageDidRequestScroll):
494         (QQuickWebViewFlickablePrivate::didChangeContentsSize):
495         * UIProcess/API/qt/qquickwebview_p_p.h:
496         (QQuickWebViewFlickablePrivate):
497         * UIProcess/qt/QtViewportInteractionEngine.cpp:
498         (WebKit::QtViewportInteractionEngine::applyConstraints):
499         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
500         (WebKit::WebChromeClient::contentsSizeChanged):
501         * WebProcess/WebPage/WebPage.cpp:
502         (WebKit::WebPage::resizeToContentsIfNeeded):
503
504 2012-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
505
506         [GTK] Add webkit_web_view_run_javascript() to WebKit2 GTK+
507         https://bugs.webkit.org/show_bug.cgi?id=75543
508
509         Reviewed by Martin Robinson.
510
511         * GNUmakefile.am: Add new files to compilation.
512         * UIProcess/API/gtk/WebKitError.cpp:
513         (webkit_javascript_error_quark): Add new error domain for
514         Javascript errors.
515         * UIProcess/API/gtk/WebKitError.h:
516         * UIProcess/API/gtk/WebKitJavascriptResult.cpp: Added.
517         (webkitJavascriptResultCreate): Create a WebKitJavascriptResult
518         for the given WKSerializedScriptValueRef.
519         (webkit_javascript_result_ref): Increment reference count of
520         WebKitJavascriptResult.
521         (webkit_javascript_result_unref): Decrement reference count of
522         WebKitJavascriptResult.
523         (webkit_javascript_result_get_global_context): Get global
524         javascript context of the result.
525         (webkit_javascript_result_get_value): Get the JSValueRef of the
526         result.
527         * UIProcess/API/gtk/WebKitJavascriptResult.h: Added.
528         * UIProcess/API/gtk/WebKitJavascriptResultPrivate.h: Added.
529         * UIProcess/API/gtk/WebKitPrivate.h:
530         * UIProcess/API/gtk/WebKitWebView.cpp:
531         (webkitWebViewFinalize): Release the global javascript context.
532         (webkit_web_view_get_javascript_global_context): Get or create the
533         global javascript context.
534         (webkitWebViewRunJavaScriptCallback): Callback called by C API when
535         javascript execution finishes.
536         (webkit_web_view_run_javascript): Asynchronously run a given
537         javascript.
538         (webkit_web_view_run_javascript_finish): Finish async operation
539         started by webkit_web_view_run_javascript().
540         * UIProcess/API/gtk/WebKitWebView.h:
541         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
542         * UIProcess/API/gtk/docs/webkit2gtk.types: Add
543         webkit_javascript_result_get_type().
544         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
545         (testWebViewRunJavaScript):
546         (beforeAll):
547         * UIProcess/API/gtk/tests/WebViewTest.cpp:
548         (WebViewTest::WebViewTest):
549         (WebViewTest::~WebViewTest):
550         (runJavaScriptReadyCallback):
551         (WebViewTest::runJavaScriptAndWaitUntilFinished):
552         (jsValueToCString):
553         (WebViewTest::javascriptResultToCString):
554         (WebViewTest::javascriptResultToNumber):
555         (WebViewTest::javascriptResultToBoolean):
556         (WebViewTest::javascriptResultIsNull):
557         (WebViewTest::javascriptResultIsUndefined):
558         * UIProcess/API/gtk/tests/WebViewTest.h:
559         * UIProcess/API/gtk/webkit2.h:
560
561 2012-03-20  Eric Seidel  <eric@webkit.org>
562
563         Move wtf/Platform.h from JavaScriptCore to Source/WTF/wtf
564         https://bugs.webkit.org/show_bug.cgi?id=80911
565
566         Reviewed by Adam Barth.
567
568         Update to not depend on "Foo.h" includes for WTF headers.
569
570         * Shared/qt/QtNetworkReplyData.h:
571         * Shared/qt/QtNetworkRequestData.cpp:
572         * Shared/qt/QtNetworkRequestData.h:
573
574 2012-03-20  Anders Carlsson  <andersca@apple.com>
575
576         REGRESSION (r110780): Loading a PDF always makes the WKView layer backed
577         https://bugs.webkit.org/show_bug.cgi?id=81734
578         <rdar://problem/11088172>
579
580         Reviewed by Adele Peterson.
581
582         * UIProcess/API/mac/WKView.mm:
583         (-[WKView _setPageHasCustomRepresentation:]):
584         Don't call -[NSView setWantsLayer:], the web process already takes care of entering and exiting
585         accelerated compositing mode for us.
586
587 2012-03-20  Jon Lee  <jonlee@apple.com>
588
589         Restrict access to notifications for unique origins and file URLs with no local file access
590         https://bugs.webkit.org/show_bug.cgi?id=79704
591         <rdar://problem/10912430>
592
593         Reviewed by Adam Barth.
594
595         In the specific case where a file URL has restricted file access and is denied universal access,
596         SecurityOrigin::canShowNotifications() returns Ask, since it is not considered a unique origin.
597         The cached table of permissions held by the notification manager will typically not have an entry for
598         the toString() representation of these file URLs, which is "null", since that can also cover unique
599         origins, and it is possible that the client will want different permissions between the two types.
600
601         It is reasonable, however, for there to be an entry for "file://", so we use toRawString() to do the lookup.
602
603         * WebProcess/Notifications/WebNotificationManager.cpp:
604         (WebKit::WebNotificationManager::policyForOrigin):
605
606 2012-03-20  Alexey Proskuryakov  <ap@apple.com>
607
608         Address review comment for WebProcess side, too.
609
610         * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): There is no need for
611         path to be in static storage, setenv will copy the value.
612
613 2012-03-20  Alexey Proskuryakov  <ap@apple.com>
614
615         Sandboxed PluginProcess should use private temporary and cache directories
616         https://bugs.webkit.org/show_bug.cgi?id=81702
617         <rdar://problem/10792047>
618
619         Reviewed by Anders Carlsson.
620
621         * Platform/Module.h:
622         * Platform/mac/ModuleMac.mm:
623         (WebKit::Module::bundleIdentifier):
624         Expose plug-in's bundle identifier.
625
626         * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.in: Some unerlated fixes to make
627         networking functional on my testing platforms. These serveices are already allowed for
628         WebProcess.
629
630         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
631         (readSandboxProfile): Unrelated fix - I've been made to rename the profile file, but
632         didn't update where it's read from!
633         (WKN_EnterSandbox): Add a suffix to user directories.
634
635 2012-03-20  Sheriff Bot  <webkit.review.bot@gmail.com>
636
637         Unreviewed, rolling out r111445 and r111446.
638         http://trac.webkit.org/changeset/111445
639         http://trac.webkit.org/changeset/111446
640         https://bugs.webkit.org/show_bug.cgi?id=81708
641
642         It broke Qt and GTK build intentionally (Requested by Ossy on
643         #webkit).
644
645         * WebProcess/Notifications/WebNotificationManager.cpp:
646         (WebKit::WebNotificationManager::policyForOrigin):
647
648 2012-03-20  Jon Lee  <jonlee@apple.com>
649
650         Restrict access to notifications for unique origins and file URLs with no local file access
651         https://bugs.webkit.org/show_bug.cgi?id=79704
652         <rdar://problem/10912430>
653
654         Reviewed by Adam Barth.
655
656         In the specific case where a file URL has restricted file access and is denied universal access,
657         SecurityOrigin::canShowNotifications() returns Ask, since it is not considered a unique origin.
658         The cached table of permissions held by the notification manager will typically not have an entry for
659         the toString() representation of these file URLs, which is "null", since that can also cover unique
660         origins, and it is possible that the client will want different permissions between the two types.
661
662         It is reasonable, however, for there to be an entry for "file://", so we use toRawString() to do the lookup.
663
664         * WebProcess/Notifications/WebNotificationManager.cpp:
665         (WebKit::WebNotificationManager::policyForOrigin):
666
667 2012-03-20  Alexey Proskuryakov  <ap@apple.com>
668
669         WebProcess should use private temporary and cache directories
670         https://bugs.webkit.org/show_bug.cgi?id=80876
671
672         Reviewed by Sam Weinig.
673
674         * Shared/WebProcessCreationParameters.cpp:
675         (WebKit::WebProcessCreationParameters::encode):
676         (WebKit::WebProcessCreationParameters::decode):
677         * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters):
678         * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess):
679         Always pass uiProcessBundleIdentifier to WebProcess on Mac, it's now used for more than
680         CFURL sessions.
681
682         * WebProcess/com.apple.WebProcess.sb.in: Limit old workaround to platforms that need it.
683
684         * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): Tell confstr to use a suffix
685         on user directories.
686
687 2012-03-20  Anders Carlsson  <andersca@apple.com>
688
689         Graphic distortion effect when launching with empty page Safari after reset
690         https://bugs.webkit.org/show_bug.cgi?id=81677
691         <rdar://problem/11065904>
692
693         Reviewed by Sam Weinig.
694
695         Don't set the redraw policy to never, since that was causing the WKView layer to never be updated. Instead,
696         let AppKit decide which redraw policy to use.
697
698         * UIProcess/API/mac/WKView.mm:
699         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
700
701 2012-03-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
702
703         Convert hasSpellingMarker to use Internals interface.
704         https://bugs.webkit.org/show_bug.cgi?id=81300
705
706         Reviewed by Ryosuke Niwa.
707
708         * win/WebKit2.def: Export a symbol for hasSpellingMarker.
709
710 2012-03-20  Antaryami Pandia  <antaryami.pandia@motorola.com>
711
712         [GTK] [WK2] Add javascript clipboard functionality settings to WebKit2 GTK+ API.
713         https://bugs.webkit.org/show_bug.cgi?id=80981
714
715         Reviewed by Martin Robinson.
716
717         Add WebSettings to enable/disable javascript clipboard functionality.
718
719         * UIProcess/API/gtk/WebKitSettings.cpp:
720         (webKitSettingsSetProperty):
721         (webKitSettingsGetProperty):
722         (webkit_settings_class_init):
723         (webkit_settings_get_javascript_can_access_clipboard):
724         (webkit_settings_set_javascript_can_access_clipboard):
725         * UIProcess/API/gtk/WebKitSettings.h:
726         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
727         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
728         (testWebKitSettings):
729
730 2012-03-19  Adam Barth  <abarth@webkit.org>
731
732         Remove support for "magic" iframe
733         https://bugs.webkit.org/show_bug.cgi?id=81590
734
735         Reviewed by Eric Seidel.
736
737         Remove FrameLoaderClient methods that no longer exist.
738
739         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
740         (WebKit):
741         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
742
743 2012-03-19  Gustavo Noronha Silva  <gns@gnome.org>
744
745         [GTK] libWebCore.la has become too big for make
746         https://bugs.webkit.org/show_bug.cgi?id=81582
747
748         Unreviewed build fix.
749
750         * GNUmakefile.am: link-in the new libWebCoreModules.la
751
752 2012-03-19  Sam Weinig  <sam@webkit.org>
753
754         Stop messing with the AppKit grow box on platforms that don't support it
755         <rdar://problem/10752048>
756         https://bugs.webkit.org/show_bug.cgi?id=81614
757
758         Reviewed by Dan Bernstein.
759
760         * UIProcess/API/mac/WKView.mm:
761         (-[WKView viewWillMoveToWindow:]):
762         (-[WKView _didChangeScrollbarsForMainFrame]):
763         Snow Leopard was the last Mac OS to need a grow box.
764
765 2012-03-19  Enrica Casucci  <enrica@apple.com>
766
767         WebKit2: create sandbox extensions for files that are dropped in an input control.
768         https://bugs.webkit.org/show_bug.cgi?id=81153
769         <rdar://problem/11031207>
770
771         Reviewed by Alexey Proskuryakov.
772
773         Now the pasteboard access is performed only in the UI process, it is
774         necessary to create sandbox extensions for each file that is dropped into
775         an input type=file element. The extensions are created at the time the files
776         are dropped and consumed immediately.
777         
778         * Platform/CoreIPC/HandleMessage.h:
779         (CoreIPC::callMemberFunction): Added template that takes 8 arguments.
780         * Shared/SandboxExtension.h:
781         (HandleArray): Added new class to handle an array of sandbox extension handles.
782         (WebKit::SandboxExtension::HandleArray::HandleArray):
783         (WebKit::SandboxExtension::HandleArray::~HandleArray):
784         (WebKit::SandboxExtension::HandleArray::resize):
785         (WebKit::SandboxExtension::HandleArray::operator[]):
786         (WebKit::SandboxExtension::HandleArray::size):
787         (WebKit::SandboxExtension::HandleArray::encode):
788         (WebKit::SandboxExtension::HandleArray::decode):
789         * Shared/mac/SandboxExtensionMac.mm: Added new class implementation.
790         (WebKit::SandboxExtension::HandleArray::HandleArray):
791         (WebKit::SandboxExtension::HandleArray::~HandleArray):
792         (WebKit::SandboxExtension::HandleArray::resize):
793         (WebKit::SandboxExtension::HandleArray::operator[]):
794         (WebKit::SandboxExtension::HandleArray::size):
795         (WebKit::SandboxExtension::HandleArray::encode):
796         (WebKit::SandboxExtension::HandleArray::decode):
797         * UIProcess/API/mac/WKView.mm:
798         (createSandboxExtensionsForFileUpload):
799         (-[WKView performDragOperation:]): Added logic to create the sandbox extensions for each
800         file/directory being dropped.
801         * UIProcess/WebPageProxy.cpp:
802         (WebKit::WebPageProxy::dragEntered):
803         (WebKit::WebPageProxy::dragUpdated):
804         (WebKit::WebPageProxy::dragExited):
805         (WebKit::WebPageProxy::performDrag):
806         (WebKit::WebPageProxy::performDragControllerAction): Added the handle array parameter.
807         * UIProcess/WebPageProxy.h:
808         * UIProcess/qt/QtWebPageEventHandler.cpp:
809         (QtWebPageEventHandler::handleDropEvent):
810         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
811         * UIProcess/win/WebView.cpp:
812         (WebKit::WebView::Drop):
813         * WebProcess/WebCoreSupport/WebDragClient.cpp:
814         (WebKit::WebDragClient::willPerformDragDestinationAction): Added handling of the new DragActionUpload.
815         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
816         (WebKit::WebPlatformStrategies::getPathnamesForType): Implemented using message to the UI process.
817         * WebProcess/WebPage/WebPage.cpp:
818         (WebKit::WebPage::performDragControllerAction):
819         (WebKit::WebPage::performUploadDragDestinationAction): Added method that consumes the received extensions.
820         * WebProcess/WebPage/WebPage.h:
821         * WebProcess/WebPage/WebPage.messages.in:
822
823 2012-03-19  Alexey Proskuryakov  <ap@apple.com>
824
825         Make WebFrameLoaderClient::createFrame more like WebKit1 version.
826         https://bugs.webkit.org/show_bug.cgi?id=81550
827
828         Covered by existing tests.
829
830         Reviewed by Jessie Berlin.
831
832         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createFrame):
833
834 2012-03-19  Anders Carlsson  <andersca@apple.com>
835
836         Find in page highlights get out of place when scrolling
837         https://bugs.webkit.org/show_bug.cgi?id=81543
838         <rdar://problem/10932590>
839
840         Reviewed by Sam Weinig.
841
842         When we have a page overlay layer, always force a full repaint of it whenever the page changes.
843         If this turns out to be a real performance problem (measurements suggest that it isn't), we could once
844         again try to figure out when a full page repaint is needed. Doing so could probably be more expensive than
845         simply repainting the page, given that a page overlay consists of a bunch of rect-fills mostly.
846
847         Also turn on accelerated drawing for the page overlay layer, since that cut CPU usage in half when scrolling
848         on a page that had a find overlay visible.
849
850         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
851         (TiledCoreAnimationDrawingArea):
852         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
853         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
854         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
855
856 2012-03-19  Anders Carlsson  <andersca@apple.com>
857
858         When Find overlay first appears and the page scrolls, the scrolling happens through a fade
859         https://bugs.webkit.org/show_bug.cgi?id=81539
860         <rdar://problem/11031093>
861
862         Reviewed by Dan Bernstein.
863
864         Disable implicit animations when adding the page overlay layer to its superlayer.
865
866         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
867         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
868
869 2012-03-19  Anders Carlsson  <andersca@apple.com>
870
871         Crash when closing an inspected web page with tiled drawing enabled
872         https://bugs.webkit.org/show_bug.cgi?id=81524
873         <rdar://problem/11062396>
874
875         Reviewed by Sam Weinig.
876
877         Guard against the WebPage's underlying WebCore Page being null, which can happen
878         when the inspector highlight overlay is uninstalled by the inspector when the inspected
879         page goes away.
880
881         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
882         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
883
884 2012-03-19  Kenneth Rohde Christiansen  <kenneth@webkit.org>
885
886         Merge _q_commitScaleChange and _q_commitPositionChange
887         https://bugs.webkit.org/show_bug.cgi?id=81511
888
889         Reviewed by Simon Hausmann.
890
891         Both methods were used for notifying WebCore of the new
892         viewport and re-tiling. The methods are merge into
893         _q_contentViewportChanged.
894
895         * UIProcess/API/qt/qquickwebview.cpp:
896         (QQuickWebViewFlickablePrivate::onComponentComplete):
897         (QQuickWebViewFlickablePrivate::updateViewportSize):
898         (QQuickWebViewFlickablePrivate::_q_contentViewportChanged):
899         (QQuickWebViewFlickablePrivate::_q_resume):
900         * UIProcess/API/qt/qquickwebview_p.h:
901         * UIProcess/API/qt/qquickwebview_p_p.h:
902         (QQuickWebViewPrivate::_q_contentViewportChanged):
903         (QQuickWebViewFlickablePrivate):
904         * UIProcess/qt/QtViewportInteractionEngine.cpp:
905         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
906         (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate):
907         (WebKit::QtViewportInteractionEngine::wheelEvent):
908         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
909         * UIProcess/qt/QtViewportInteractionEngine.h:
910         (QtViewportInteractionEngine):
911
912 2012-03-19  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
913
914         Select best target for tap gesture.
915         https://bugs.webkit.org/show_bug.cgi?id=78801
916
917         Reviewed by Kenneth Rohde Christiansen.
918
919         Send radius to handlePotentialSingleTapEvent so it can do the same hit
920         detection the tap gesture later does.
921
922         * UIProcess/WebPageProxy.cpp:
923         (WebKit::WebPageProxy::handlePotentialActivation):
924         * UIProcess/WebPageProxy.h:
925         * UIProcess/qt/QtWebPageEventHandler.cpp:
926         (QtWebPageEventHandler::handlePotentialSingleTapEvent):
927         * WebProcess/WebPage/WebPage.cpp:
928         (WebKit::WebPage::highlightPotentialActivation):
929         * WebProcess/WebPage/WebPage.h:
930         * WebProcess/WebPage/WebPage.messages.in:
931
932 2012-03-19  Alexander Færøy  <alexander.faeroy@nokia.com>
933
934         [Qt] Add experimental API for dynamically changing the UA string
935
936         Reviewed by Simon Hausmann.
937
938         This patch adds a new property named userAgent to the
939         QQuickWebViewExperimental type which allows us to dynamically change
940         the user agent string from the QML API.
941
942         * UIProcess/API/qt/qquickwebview.cpp:
943         (QQuickWebViewExperimental::userAgent):
944         (QQuickWebViewExperimental::setUserAgent):
945         * UIProcess/API/qt/qquickwebview_p.h:
946
947 2012-03-18  No'am Rosenthal  <noam.rosenthal@nokia.com>
948
949         [Qt][WK2] Avoid usage of manual scaling in the Qt scenegraph integration
950         https://bugs.webkit.org/show_bug.cgi?id=81368
951
952         Reviewed by Simon Hausmann.
953
954         Moved the QtScenegraph integration classes to a separate file,
955         QtWebPageSGNode. The nodes created for QQuickWebPage now include
956         a QSGTransformNode that controls the contentsScale, a 
957         QSGSimpleRectNode that controls the background color, and a
958         QSGRenderNode subclass that renders the actual contents.
959         * Target.pri:
960         * UIProcess/API/qt/qquickwebpage.cpp:
961         (QQuickWebPage::updatePaintNode):
962         * UIProcess/qt/QtWebPageSGNode.cpp: Added.
963         * UIProcess/qt/QtWebPageSGNode.h: Added.
964
965 2012-03-18  No'am Rosenthal  <noam.rosenthal@nokia.com>
966
967         [Qt] The background is visible for tiles inside the contents area which are not ready
968         https://bugs.webkit.org/show_bug.cgi?id=81349
969
970         Reviewed by Simon Hausmann.
971
972         Split PageProxyNode to BackgroundSGNode and ContentsSGNode.
973         BackgroundSGNode paints a solid background, either white or transparent
974         (depending on drawsTransparentBackground flag).
975
976         * UIProcess/API/qt/qquickwebpage.cpp:
977         (ContentsSGNode):
978         (ContentsSGNode::ContentsSGNode):
979         (ContentsSGNode::changedStates):
980         (ContentsSGNode::~ContentsSGNode):
981         (BackgroundSGNode):
982         (BackgroundSGNode::BackgroundSGNode):
983         (BackgroundSGNode::contentsNode):
984         (QQuickWebPage::updatePaintNode):
985
986 2012-03-17  Joe Thomas  <joethomas@motorola.com>
987
988         move calc*Value functions out from Length (and platform)
989         https://bugs.webkit.org/show_bug.cgi?id=80897
990
991         Moving the Length calc*Value functions out from Length structure and also from /WebCore/platform/ folder.
992         This helps to avoid the layering violation while length calculation. Otherwise layer violation can be avoided only by adding a virtual interface(bug 27160).
993
994         Reviewed by Antti Koivisto.
995
996         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
997         (WebKit::WebPopupMenu::setUpPlatformData):
998
999 2012-03-17  Dan Bernstein  <mitz@apple.com>
1000
1001         <rdar://problem/10263562> Crash in WebCore::Range::startPosition() when dismissing the Press and Hold panel by clicking in the menu bar
1002         https://bugs.webkit.org/show_bug.cgi?id=81454
1003
1004         Reviewed by Ada Chan.
1005
1006         When the Press and Hold panel is dismissed by clicking in the menu bar,
1007         -insertText:replacementRange: is called with an NSRange whose location is NSNotFound - 1
1008         (see <rdar://problem/11069374>). Trying to convert this bogus range to a WebCore Range
1009         returns 0, which leads to the crash.
1010
1011         * WebProcess/WebPage/mac/WebPageMac.mm:
1012         (WebKit::WebPage::insertText): Added a null check, to protect the code from bogus ranges.
1013
1014 2012-03-16  Stephanie Lewis  <slewis@apple.com>
1015
1016         https://bugs.webkit.org/show_bug.cgi?id=81065
1017         <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142
1018         Add some string function exports to Windows so the WebKitTestRunner can use them.
1019
1020         Reviewed by Geoff Garen.
1021
1022         * win/WebKit2.def:
1023
1024 2012-03-16  Brady Eidson  <beidson@apple.com>
1025
1026         <rdar://problem/11027997> and https://bugs.webkit.org/show_bug.cgi?id=81412
1027         REGRESSION (r107435) Copy a link and paste to Mail: Nothing is pasted
1028
1029         Reviewed by Geoff Garen.
1030
1031         Add new message so the WebProcess can ask the UIProcesses pasteboard for the URL:
1032         * UIProcess/WebContext.h:
1033         * UIProcess/WebContext.messages.in:
1034         * UIProcess/mac/WebContextMac.mm:
1035         (WebKit::WebContext::getPasteboardURL):
1036
1037         Use that new message to implement the pasteboard strategy:
1038         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1039         (WebKit::WebPlatformStrategies::url):
1040         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1041         (WebPlatformStrategies):
1042
1043 2012-03-16  Alexey Proskuryakov  <ap@apple.com>
1044
1045         ASSERTION FAILED: m_loadState == LoadStateCommitted in WebFrameProxy::didFinishLoad causing
1046         "crashes" on Lion Intel Debug WebKit2 Tests
1047         https://bugs.webkit.org/show_bug.cgi?id=81184
1048         <rdar://problem/11052462>
1049
1050         Rubber-stamped by Anders Carlsson.
1051
1052         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::finishedLoading):
1053         Don't leave a lingering m_pluginView after load is finished. When plug-in data was empty,
1054         we would create the plug-in here, but failed to finalize the load.
1055
1056 2012-03-08  Jer Noble  <jer.noble@apple.com>
1057
1058         Support W3C Full Screen API proposal
1059         https://bugs.webkit.org/show_bug.cgi?id=80660
1060
1061         Reviewed by Alexey Proskuryakov.
1062
1063         Allow full screen elements to access the keyboard.
1064
1065         * UIProcess/WebFullScreenManagerProxy.cpp:
1066         (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
1067         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1068         (WebKit::WebFullScreenManager::exitFullScreenForElement):
1069
1070 2012-03-16  Andras Becsi  <andras.becsi@nokia.com>
1071
1072         [Qt][WK2] Fix bounce-back behaviour for panning
1073         https://bugs.webkit.org/show_bug.cgi?id=81144
1074
1075         Reviewed by Kenneth Rohde Christiansen.
1076
1077         If the pan gesture recognizer receives a touch begin event
1078         during an ongoing kinetic scroll animation of a previous
1079         pan gesture, the animation is stopped and the content is
1080         immediately positioned back to valid boundaries.
1081
1082         * UIProcess/qt/QtPanGestureRecognizer.cpp:
1083         (WebKit::QtPanGestureRecognizer::recognize):
1084         * UIProcess/qt/QtViewportInteractionEngine.cpp:
1085         (WebKit::QtViewportInteractionEngine::cancelScrollAnimation):
1086         (WebKit):
1087         * UIProcess/qt/QtViewportInteractionEngine.h:
1088         (QtViewportInteractionEngine):
1089
1090 2012-03-16  Dinu Jacob  <dinu.jacob@nokia.com>
1091
1092         [Qt][Wk2] Assertion Failure and crash on file upload
1093         https://bugs.webkit.org/show_bug.cgi?id=80854
1094
1095         Reviewed by Simon Hausmann.
1096
1097         Crash resulted from attempting to create QFileDialog, a QtWidget based dialog from a 
1098         QGuiApplication. Replace QFileDialog with a QML implementable component.
1099         Added a new property 'filePicker' to WebView experimental to set the QML component for
1100         file upload triggered by an input file element.
1101
1102         Co-authored with Kasthuri Nallappasoundararajan <kasthuri.n-s@nokia.com>
1103
1104         * UIProcess/API/qt/qquickwebview.cpp:
1105         (QQuickWebViewPrivate::QQuickWebViewPrivate):
1106         (QQuickWebViewPrivate::chooseFiles):
1107         (QQuickWebViewExperimental::filePicker):
1108         (QQuickWebViewExperimental::setFilePicker):
1109         * UIProcess/API/qt/qquickwebview_p.h:
1110         * UIProcess/API/qt/qquickwebview_p_p.h:
1111         (QQuickWebViewPrivate):
1112         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
1113         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_singleFileUpload.qml: Added.
1114         * UIProcess/API/qt/tests/qmltests/common/singlefileupload.html: Added.
1115         * UIProcess/qt/QtDialogRunner.cpp:
1116         (FilePickerContextObject):
1117         (FilePickerContextObject::FilePickerContextObject):
1118         (FilePickerContextObject::fileList):
1119         (FilePickerContextObject::reject):
1120         (FilePickerContextObject::accept):
1121         (QtDialogRunner::initForFilePicker):
1122         * UIProcess/qt/QtDialogRunner.h:
1123         (QtDialogRunner):
1124         (QtDialogRunner::filePaths):
1125         (QtDialogRunner::onFileSelected):
1126
1127 2012-03-16  Dinu Jacob  <dinu.jacob@nokia.com>
1128
1129         [Qt][WK2] Build failure when using --no-touch-events
1130         https://bugs.webkit.org/show_bug.cgi?id=81241
1131
1132         Reviewed by Simon Hausmann.
1133
1134         Fixed inconsistency in the use of ENABLE_TOUCH_EVENTS flag that caused build
1135         failure when using --no-touch-events option
1136
1137         * UIProcess/qt/QtPageClient.h:
1138         (QtPageClient):
1139         * UIProcess/qt/QtWebPageEventHandler.cpp:
1140         (QtWebPageEventHandler::handlePotentialSingleTapEvent):
1141         * UIProcess/qt/QtWebPageEventHandler.h:
1142         (QtWebPageEventHandler):
1143         * WebProcess/WebPage/WebPage.cpp:
1144         (WebKit::WebPage::WebPage):
1145         * WebProcess/WebPage/WebPage.h:
1146         (WebPage):
1147         * WebProcess/WebPage/WebPage.messages.in:
1148
1149 2012-03-16  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1150
1151         Merge setVisibleContentsForScaling with setVisibleContentsRectForPanning
1152         https://bugs.webkit.org/show_bug.cgi?id=81346
1153
1154         Reviewed by Simon Hausmann.
1155
1156         This cleans up the code path and is one step on the way to avoid
1157         calling both methods in succession, for instance after ending pinch
1158         zoom.
1159
1160         * UIProcess/API/qt/qquickwebview.cpp:
1161         (QQuickWebViewLegacyPrivate::updateViewportSize):
1162         (QQuickWebViewFlickablePrivate::_q_commitScaleChange):
1163         (QQuickWebViewPrivate::_q_commitPositionChange):
1164         * UIProcess/DrawingAreaProxy.h:
1165         (WebKit::DrawingAreaProxy::setVisibleContentsRect):
1166         * UIProcess/DrawingAreaProxyImpl.cpp:
1167         (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect):
1168         * UIProcess/DrawingAreaProxyImpl.h:
1169         (DrawingAreaProxyImpl):
1170         * UIProcess/LayerTreeHostProxy.cpp:
1171         (WebKit::LayerTreeHostProxy::setVisibleContentsRect):
1172         * UIProcess/LayerTreeHostProxy.h:
1173         (LayerTreeHostProxy):
1174         * UIProcess/WebLayerTreeRenderer.cpp:
1175         (WebKit::WebLayerTreeRenderer::setVisibleContentsRect):
1176         * UIProcess/WebLayerTreeRenderer.h:
1177         (WebLayerTreeRenderer):
1178         * WebProcess/WebPage/LayerTreeHost.h:
1179         (WebKit::LayerTreeHost::setVisibleContentsRect):
1180         * WebProcess/WebPage/LayerTreeHost.messages.in:
1181         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
1182         (WebKit::LayerTreeHostQt::setVisibleContentsRect):
1183         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
1184         (LayerTreeHostQt):
1185
1186 2012-03-16  YoungTaeck Song  <youngtaeck.song@samsung.com>
1187
1188         [EFL][WK2] Add ProcessLauncherEfl.cpp
1189         https://bugs.webkit.org/show_bug.cgi?id=75464
1190
1191         Reviewed by Hajime Morita.
1192
1193         Add first version of ProcessLauncherEfl.cpp including launchProcess() and terminateProcess().
1194
1195         * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: Added.
1196         (WebKit::ProcessLauncher::launchProcess):
1197         (WebKit::ProcessLauncher::terminateProcess):
1198         (WebKit::ProcessLauncher::platformInvalidate):
1199
1200 2012-03-15  Anders Carlsson  <andersca@apple.com>
1201
1202         Try to fix the Snow Leopard build.
1203
1204         * UIProcess/API/mac/PDFViewController.mm:
1205         (WebKit::PDFViewController::pdfKitBundle):
1206
1207 2012-03-07  Jon Lee  <jonlee@apple.com>
1208
1209         Move NotificationContents into Notification
1210         https://bugs.webkit.org/show_bug.cgi?id=80487
1211         <rdar://problem/10965519>
1212
1213         Reviewed by Jian Li.
1214
1215         * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Remove extraneous include.
1216         * WebProcess/Notifications/WebNotificationManager.cpp:
1217         (WebKit::WebNotificationManager::show): Refactor to use accessor methods on Notification.
1218
1219 2012-03-15  Brent Fulgham  <bfulgham@webkit.org>
1220
1221         Unreviewed build correction. WinCairo export definitions
1222         file was not updated when the main Apple file was changed.
1223
1224         * win/WebKit2CFLite.def: Revise export declarations to match
1225         new symbol names.
1226
1227 2012-03-15  Anders Carlsson  <andersca@apple.com>
1228
1229         REGRESSION(r107168?): Assertion failures under pageContainsAnyHorizontalScrollbars causing multiple "crashes" on the Lion Intel Debug WebKit2 testers
1230         https://bugs.webkit.org/show_bug.cgi?id=81162
1231         <rdar://problem/11050423>
1232
1233         Reviewed by Beth Dakin and Jessie Berlin.
1234
1235         Downgrade the ASSERT to a simple if check since scrollableArea->isOnActivePage() can return false when layout happens during page transitions.
1236
1237         * WebProcess/WebPage/WebPage.cpp:
1238         (WebKit::pageContainsAnyHorizontalScrollbars):
1239
1240 2012-03-15  David Hyatt  <hyatt@apple.com>
1241
1242         https://bugs.webkit.org/show_bug.cgi?id=81258
1243
1244         Add a preference for enabling the new multi-column layout code that will be based on regions.
1245
1246         Reviewed by Beth Dakin.
1247
1248         * Shared/WebPreferencesStore.h:
1249         (WebKit):
1250         * UIProcess/API/C/WKPreferences.cpp:
1251         (WKPreferencesSetRegionBasedColumnsEnabled):
1252         (WKPreferencesGetRegionBasedColumnsEnabled):
1253         * UIProcess/API/C/WKPreferencesPrivate.h:
1254         * WebProcess/WebPage/WebPage.cpp:
1255         (WebKit::WebPage::updatePreferences):
1256
1257 2012-03-14  Anders Carlsson  <andersca@apple.com>
1258
1259         Can't swipe to go back/forward when the current page is a PDF document
1260         https://bugs.webkit.org/show_bug.cgi?id=81194
1261         <rdar://problem/6954125>
1262
1263         Reviewed by Sam Weinig.
1264
1265         Override -[PDFViewScrollView scrollWheel:] and have the new implementation call
1266         -[WKPDFView forwardScrollWheelEvent:] when the PDF is pinned to either the left or right side.
1267         WKPDFView will then call PDFController::forwardScrollWheelEvent which checks if we can go back or forward,
1268         and passes the event along to the WKView which ends up triggering the swiping machinery in Safari.
1269
1270         * UIProcess/API/mac/PDFViewController.h:
1271         * UIProcess/API/mac/PDFViewController.mm:
1272         (-[WKPDFView forwardScrollWheelEvent:]):
1273         (WebKit):
1274         (WebKit::PDFViewController::forwardScrollWheelEvent):
1275         (WebKit::findEnclosingWKPDFView):
1276         (WebKit::PDFViewScrollView_scrollWheel):
1277         (WebKit::PDFViewController::pdfKitBundle):
1278         * UIProcess/WebPageProxy.cpp:
1279         (WebKit::WebPageProxy::didCommitLoadForFrame):
1280
1281 2012-03-15  Brady Eidson  <beidson@apple.com>
1282
1283         <rdar://problem/11036900> and https://bugs.webkit.org/show_bug.cgi?id=81079
1284         REGRESSION(r107844): Clipboard API only remembers most recent data set on clipboard
1285
1286         Reviewed by Sam Weinig.
1287
1288         Add the non-destructive "addTypes" to supplement the destructive "setTypes"
1289
1290         * UIProcess/WebContext.h:
1291         * UIProcess/WebContext.messages.in:
1292         * UIProcess/mac/WebContextMac.mm:
1293         (WebKit::WebContext::addPasteboardTypes):
1294
1295         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1296         (WebKit::WebPlatformStrategies::addTypes):
1297         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1298
1299 2012-03-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1300
1301         [GTK] Implement unicode submenu items
1302         https://bugs.webkit.org/show_bug.cgi?id=81117
1303
1304         Reviewed by Martin Robinson.
1305
1306         * WebProcess/WebCoreSupport/WebEditorClient.h:
1307         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
1308         (WebKit::WebEditorClient::shouldShowUnicodeMenu): Implement
1309         shouldShowUnicodeMenu() returning always true. When ContextMenu
1310         API is implemented for GTK+ the UI process will decide whether to
1311         show the unicode menu or not.
1312
1313 2012-03-15  Andras Becsi  <andras.becsi@nokia.com>
1314
1315         [Qt][WK2] Fix bounce-back behaviour for panning
1316         https://bugs.webkit.org/show_bug.cgi?id=81144
1317
1318         Reviewed by Kenneth Rohde Christiansen.
1319
1320         Move the content back to boundaries immediately
1321         in response to a tap gesture during the bounce-back
1322         animation after panning.
1323
1324         * UIProcess/qt/QtPanGestureRecognizer.cpp:
1325         (WebKit::QtPanGestureRecognizer::recognize):
1326         * UIProcess/qt/QtViewportInteractionEngine.h:
1327         Make the ensureContentWithinViewportBoundary function public.
1328         (QtViewportInteractionEngine):
1329
1330 2012-03-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1331
1332         [WK2] WebPageProxy::activeURL should return unreachableURL() when it's not empty
1333         https://bugs.webkit.org/show_bug.cgi?id=75465
1334
1335         Reviewed by Philippe Normand.
1336
1337         * UIProcess/API/gtk/tests/WebViewTest.cpp:
1338         (WebViewTest::replaceContent): Return the main frame
1339         unreachableURL if it's not empty.
1340         * UIProcess/WebPageProxy.cpp:
1341         (WebKit::WebPageProxy::activeURL):
1342
1343 2012-03-14  Anders Carlsson  <andersca@apple.com>
1344
1345         java/java-and-plugins.html test failing
1346         https://bugs.webkit.org/show_bug.cgi?id=81188
1347         <rdar://problem/11048657>
1348
1349         Reviewed by Sam Weinig.
1350
1351         When we're marshaling NPObjects that wrap plug-in objects, make sure to check that the
1352         current plug-in instance is the same as the plug-in instance the object came from and don't
1353         pass the unwrapped object ID if that is the case.
1354
1355         * Shared/Plugins/NPRemoteObjectMap.cpp:
1356         (WebKit::remoteNPObjectID):
1357         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
1358
1359 2012-03-14  Matt Falkenhagen  <falken@chromium.org>
1360
1361         Allow per-script font settings to be specified in layout tests
1362         https://bugs.webkit.org/show_bug.cgi?id=78184
1363
1364         Reviewed by Hajime Morita.
1365
1366         This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of
1367         the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented
1368         for Chromium so far.
1369
1370         * win/WebKit2.def: Added symbols.
1371         * win/WebKit2CFLite.def: Added symbols.
1372
1373 2012-03-14  Michael Saboff  <msaboff@apple.com>
1374
1375         REGRESSION(r110383): ASSERTION failures in JSCell::finishCreation causing multiple tests to "crash" on the Lion Intel Debug Bots
1376         https://bugs.webkit.org/show_bug.cgi?id=80993
1377
1378         Reviewed by Mark Rowe.
1379
1380         Moved $(BUILT_PRODUCTS_DIR)/usr/local/include to the front of HEADER_SEARCH_PATH
1381         to fix builds given the wtf move.
1382
1383         * Configurations/BaseTarget.xcconfig:
1384
1385 2012-03-14  Andy Estes  <aestes@apple.com>
1386
1387         Stop shadowing the argument to drawRect: with a local variable.
1388
1389         Reviewed by Sam Weinig.
1390
1391         * UIProcess/API/mac/WKView.mm:
1392         (-[WKView drawRect:]):
1393
1394 2012-03-13  Jon Lee  <jonlee@apple.com>
1395
1396         Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS
1397         https://bugs.webkit.org/show_bug.cgi?id=80922
1398         <rdar://problem/11035082>
1399
1400         Reviewed by Jian Li.
1401
1402         You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API.
1403         LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the
1404         new API. Therefore, APIs that are common between the two will have:
1405         #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
1406
1407         This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to
1408         the new API, the defines will begin to split. This allows ports to decide which set of APIs to include.
1409
1410         Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
1411         * Shared/WebProcessCreationParameters.cpp:
1412         (WebKit::WebProcessCreationParameters::encode):
1413         (WebKit::WebProcessCreationParameters::decode):
1414         * Shared/WebProcessCreationParameters.h:
1415         (WebProcessCreationParameters):
1416         * UIProcess/WebContext.cpp:
1417         (WebKit::WebContext::ensureWebProcess):
1418         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
1419         (WebKit):
1420         (WebKit::NotificationPermissionRequestManager::startRequest):
1421         (WebKit::NotificationPermissionRequestManager::cancelRequest):
1422         (WebKit::NotificationPermissionRequestManager::permissionLevel):
1423         (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision):
1424         * WebProcess/Notifications/WebNotificationManager.cpp:
1425         (WebKit):
1426         (WebKit::WebNotificationManager::initialize):
1427         (WebKit::WebNotificationManager::didUpdateNotificationDecision):
1428         (WebKit::WebNotificationManager::didRemoveNotificationDecisions):
1429         (WebKit::WebNotificationManager::policyForOrigin):
1430         (WebKit::WebNotificationManager::show):
1431         (WebKit::WebNotificationManager::cancel):
1432         (WebKit::WebNotificationManager::clearNotifications):
1433         (WebKit::WebNotificationManager::didDestroyNotification):
1434         (WebKit::WebNotificationManager::didShowNotification):
1435         (WebKit::WebNotificationManager::didClickNotification):
1436         (WebKit::WebNotificationManager::didCloseNotifications):
1437         * WebProcess/Notifications/WebNotificationManager.h:
1438         (WebNotificationManager):
1439         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
1440         * WebProcess/WebCoreSupport/WebNotificationClient.h:
1441         * WebProcess/WebPage/WebPage.cpp:
1442         (WebKit::WebPage::WebPage):
1443         (WebKit::WebPage::updatePreferences):
1444         * WebProcess/WebProcess.cpp:
1445         (WebKit::WebProcess::WebProcess):
1446         (WebKit::WebProcess::didReceiveMessage):
1447         * WebProcess/WebProcess.h:
1448         (WebProcess):
1449         * WebProcess/mac/WebProcessMac.mm:
1450         (WebKit::WebProcess::platformInitializeWebProcess):
1451
1452 2012-03-14  Dinu Jacob  <dinu.jacob@nokia.com>
1453
1454         [Qt][WK2] Move code common to both ProxyAuthentication and Authentication context objects into a base class
1455         https://bugs.webkit.org/show_bug.cgi?id=80627
1456
1457         Reviewed by Kenneth Rohde Christiansen.
1458
1459         No impact to QML API.
1460
1461         * UIProcess/qt/QtDialogRunner.cpp:
1462         (BaseAuthenticationContextObject):
1463         (BaseAuthenticationContextObject::BaseAuthenticationContextObject):
1464         (HttpAuthenticationDialogContextObject):
1465         (HttpAuthenticationDialogContextObject::HttpAuthenticationDialogContextObject):
1466         (HttpAuthenticationDialogContextObject::realm):
1467         (ProxyAuthenticationDialogContextObject):
1468         (ProxyAuthenticationDialogContextObject::ProxyAuthenticationDialogContextObject):
1469         (QtDialogRunner::initForAuthentication):
1470
1471 2012-03-14  Anders Carlsson  <andersca@apple.com>
1472
1473         With tiled drawing enabled, clicking a link to a PDF causes a cross-fade
1474         https://bugs.webkit.org/show_bug.cgi?id=79247
1475         <rdar://problem/10910808>
1476
1477         Reviewed by Sam Weinig.
1478
1479         Instead of creating a new CALayer for the WKView when we're in tiled mode, re-use the existing layer that AppKit makes for us.
1480         This way, we won't get any implicit animations when we change layer properties (such as sublayers in this case).
1481
1482         * UIProcess/API/mac/WKView.mm:
1483         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1484         (-[WKView wantsUpdateLayer]):
1485         (-[WKView updateLayer]):
1486
1487 2012-03-14  Alexey Proskuryakov  <ap@apple.com>
1488
1489         WebProcess sometimes hits an assertion in SandboxExtensionTracker::didCommitProvisionalLoad after running regression tests
1490         https://bugs.webkit.org/show_bug.cgi?id=81150
1491         <rdar://problem/11002254>
1492
1493         Reviewed by Anders Carlsson.
1494
1495         * WebProcess/WebPage/WebPage.cpp:
1496         (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad):
1497         (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad):
1498         It's not great, but for now we need to handle this case. Hopefully, some day we'll make
1499         both WebKit2 processes better aware of what's going on with loading in WebCore.
1500
1501 2012-03-14  Anders Carlsson  <andersca@apple.com>
1502
1503         Fix UI process crash when a plug-in process crashes with a modal dialog showing
1504         https://bugs.webkit.org/show_bug.cgi?id=81139
1505         <rdar://problem/9641197>
1506
1507         Reviewed by Dan Bernstein.
1508
1509         When a plug-in process crashes, its corresponding PluginProcessProxy object is deleted immediately,
1510         which is bad if we're currently running a nested run loop.
1511
1512         Fix this by making PluginProcessProxy ref-counted and protecting it before the call to -[NSApp runModalForWindow:].
1513
1514         * UIProcess/Plugins/PluginProcessManager.cpp:
1515         (WebKit::PluginProcessManager::pluginProcessWithPath):
1516         (WebKit::PluginProcessManager::getOrCreatePluginProcess):
1517         * UIProcess/Plugins/PluginProcessManager.h:
1518         (PluginProcessManager):
1519         * UIProcess/Plugins/PluginProcessProxy.cpp:
1520         (WebKit::PluginProcessProxy::create):
1521         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
1522         * UIProcess/Plugins/PluginProcessProxy.h:
1523         (PluginProcessProxy):
1524         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1525         (WebKit::PluginProcessProxy::setModalWindowIsShowing):
1526         (WebKit::PluginProcessProxy::beginModal):
1527
1528 2012-03-14  Carlos Garcia Campos  <cgarcia@igalia.com>
1529
1530         [GTK] Handle printing errors in WebKit2
1531         https://bugs.webkit.org/show_bug.cgi?id=77197
1532
1533         Reviewed by Gustavo Noronha Silva.
1534
1535         * UIProcess/API/gtk/WebKitError.cpp:
1536         (webkit_print_error_quark): Add new error domain for print
1537         errors.
1538         * UIProcess/API/gtk/WebKitError.h: Ad print errors.
1539         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
1540         (webkit_print_operation_class_init): Add
1541         WebKitPrintOperation::failed signal.
1542         (drawPagesForPrintingCompleted): Emit WebKitPrintOperation::failed
1543         when the print operation failed with the given error.
1544         (webkitPrintOperationPrintPagesForFrame): Use
1545         PrintFinishedCallback instead of a VoidCallback.
1546         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
1547         * UIProcess/API/gtk/tests/TestPrinting.cpp:
1548         (testPrintOperationPrint):
1549         (testPrintOperationErrors): Test different print errors are
1550         correctly reported.
1551         (beforeAll):
1552         * UIProcess/WebPageProxy.cpp:
1553         (WebKit::WebPageProxy::close): Invalidate print finished callbacks
1554         map.
1555         (WebKit::WebPageProxy::printFinishedCallback): Callback called
1556         when the print operation has finished in the web process.
1557         (WebKit::WebPageProxy::processDidCrash): Invalidate print finished
1558         callbacks map.
1559         (WebKit::WebPageProxy::drawPagesForPrinting): Use a
1560         PrintFinishedCallback instead of a VoidCallback.
1561         * UIProcess/WebPageProxy.h:
1562         (WebKit): Delcare PrintFinishedCallback as a generic callback.
1563         (WebPageProxy):
1564         * UIProcess/WebPageProxy.messages.in: Use PrintFinishedCallback
1565         instead of VoidCallback as callback argument of
1566         DrawPagesForPrinting message.
1567         * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
1568         (WebKit::PrintPagesData::PrintPagesData): Mark the data as invalid
1569         when there are no pages to print.
1570         (PrintPagesData): Add isValid parameter to mark the data struct as
1571         invalid.
1572         (WebKit::WebPrintOperationGtk::printPagesIdleDone): Call
1573         printPagesDone() instead of printDone().
1574         (WebKit::WebPrintOperationGtk::printPagesDone): Renamed.
1575         (WebKit::WebPrintOperationGtk::printDone): Notify the UI process
1576         that the print operation has finsihed.
1577         (WebKit::WebPrintOperationGtk::print): Finish the print if the
1578         PrintPagesData struct is not valid.
1579         * WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
1580
1581 2012-03-13  Jer Noble  <jer.noble@apple.com>
1582
1583         Lion Intel Debug WebKit2 Tests crashing under [WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]
1584         https://bugs.webkit.org/show_bug.cgi?id=81056
1585
1586         Reviewed by Jessie Berlin.
1587
1588         Give the InjectedBundlePageFullScreenClient a first crack at beganEnterFullScreen and beganExitFullScreen:
1589         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1590         (WebKit::WebFullScreenManager::willEnterFullScreen):
1591         (WebKit::WebFullScreenManager::willExitFullScreen):
1592
1593         And call the client function if it exists; otherwise, continue to message the page:
1594         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1595         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
1596         (WebKit::InjectedBundlePageFullScreenClient::beganEnterFullScreen):
1597         (WebKit::InjectedBundlePageFullScreenClient::beganExitFullScreen):
1598         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h:
1599
1600         Add a custom APIClientTraits for InjectedBundlePageFullScreenClient to handle the API number change.
1601         * Shared/APIClientTraits.cpp:
1602         * Shared/APIClientTraits.h:
1603
1604 2012-03-14  Andrey Kosyakov  <caseq@chromium.org>
1605
1606         Web Inspector: add didCancelFrame timeline event
1607         https://bugs.webkit.org/show_bug.cgi?id=80994
1608
1609         Reviewed by Pavel Feldman.
1610
1611         * win/WebKit2.def:
1612         * win/WebKit2CFLite.def:
1613
1614 2012-03-13  Anders Carlsson  <andersca@apple.com>
1615
1616         Find bouncy doesn’t hide when a subframe is scrolled
1617         https://bugs.webkit.org/show_bug.cgi?id=81060
1618         <rdar://problem/9365329>
1619
1620         Reviewed by Andreas Kling.
1621
1622         Instead of hiding the find indicator when pageDidScroll is called, add a check to FindController::drawRect and hide
1623         the find indicator there if the find selection bounds have changed since the last call to drawRect.
1624
1625         * WebProcess/WebPage/FindController.cpp:
1626         (WebKit::FindController::updateFindIndicator):
1627         (WebKit::FindController::drawRect):
1628         * WebProcess/WebPage/FindController.h:
1629         (FindController):
1630         * WebProcess/WebPage/WebPage.cpp:
1631         (WebKit::WebPage::pageDidScroll):
1632
1633 2012-03-13  Jeff Miller  <jeffm@apple.com>
1634
1635         Support loading a WKPage from web archive data
1636         https://bugs.webkit.org/show_bug.cgi?id=81044
1637
1638         This code was written by Jessie Berlin.
1639
1640         Reviewed by Brady Eidson.
1641
1642         * UIProcess/API/C/WKPage.cpp:
1643         (WKPageLoadWebArchiveData): Added.
1644         
1645         * UIProcess/API/C/WKPage.h: Added WKPageLoadWebArchiveData().
1646         
1647         * UIProcess/WebPageProxy.cpp:
1648         (WebKit::WebPageProxy::loadWebArchiveData): Added.
1649         
1650         * UIProcess/WebPageProxy.h: Added loadWebArchiveData().
1651
1652         * WebProcess/WebPage/WebPage.cpp:
1653         (WebKit::WebPage::loadWebArchiveData): Added.
1654         
1655         * WebProcess/WebPage/WebPage.h: Added loadWebArchiveData().
1656
1657         * WebProcess/WebPage/WebPage.messages.in: Added LoadWebArchiveData message.
1658
1659 2012-03-13  Adam Barth  <abarth@webkit.org> && Benjamin Poulain  <bpoulain@apple.com>
1660
1661         Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
1662         https://bugs.webkit.org/show_bug.cgi?id=78853
1663
1664         Reviewed by Adam Barth.
1665
1666         * Configurations/FeatureDefines.xcconfig:
1667         * WebProcess/Geolocation/WebGeolocationManager.cpp:
1668         (WebKit::WebGeolocationManager::registerWebPage):
1669         (WebKit::WebGeolocationManager::unregisterWebPage):
1670         (WebKit::WebGeolocationManager::didChangePosition):
1671         (WebKit::WebGeolocationManager::didFailToDeterminePosition):
1672         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1673         (WebKit::InjectedBundle::setGeoLocationPermission):
1674         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1675         (WebKit):
1676         * WebProcess/WebCoreSupport/WebChromeClient.h:
1677         (WebChromeClient):
1678         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
1679         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
1680         * WebProcess/WebPage/WebPage.cpp:
1681         (WebKit::WebPage::WebPage):
1682         * mac/WebKit2.order:
1683
1684 2012-03-13  Max Vujovic  <mvujovic@adobe.com>
1685
1686         Add a method to window.internals to enable testing of inspector highlight rects
1687         https://bugs.webkit.org/show_bug.cgi?id=80338
1688
1689         Reviewed by Pavel Feldman.
1690
1691         * win/WebKit2.def: Export symbols for win.
1692         * win/WebKit2CFLite.def: Same as above.
1693
1694 2012-03-13  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1695
1696         [Qt] Set correct device width and height.
1697         https://bugs.webkit.org/show_bug.cgi?id=80980
1698
1699         Reviewed by Tor Arne Vestbø.
1700
1701         * UIProcess/API/qt/qquickwebview.cpp:
1702         (QQuickWebViewFlickablePrivate::computeViewportConstraints):
1703
1704 2012-03-12  Sam Weinig  <sam@webkit.org>
1705
1706         Fix typo in PageClientImpl where we were overriding viewLayerHostingMode with
1707         a function called layerHostingMode.
1708
1709         Reviewed by Anders Carlsson.
1710
1711         * UIProcess/API/mac/PageClientImpl.h:
1712         * UIProcess/API/mac/PageClientImpl.mm:
1713         (WebKit::PageClientImpl::viewLayerHostingMode):
1714         Update name and add OVERRIDE to catch this in the future.
1715
1716 2012-03-12  Enrica Casucci  <enrica@apple.com>
1717
1718         WebKit2: remove NSPasteboard access for promised data from the WebProcess
1719         https://bugs.webkit.org/show_bug.cgi?id=80073
1720
1721         Reviewed by Alexey Proskuryakov.
1722
1723         This patch removes the last remaining access to NSPasteboard from the WebProcess.
1724         The code in WebDragClient::declareAndWriteDragImage now packages all the data
1725         required for the drag and the promised drag types and sends one request to the UI
1726         process that will place the data in the NSPasteboard when appropriate.
1727         
1728         * UIProcess/API/mac/PageClientImpl.h: Added setPromisedData method.
1729         * UIProcess/API/mac/PageClientImpl.mm:
1730         (WebKit::PageClientImpl::setPromisedData):
1731         * UIProcess/API/mac/WKView.mm:
1732         (matchesExtensionOrEquivalent): Added.
1733         (fileExists): Added.
1734         (pathWithUniqueFilenameForPath): Added.
1735         (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]):
1736         (-[WKView pasteboardChangedOwner:]):
1737         (-[WKView pasteboard:provideDataForType:]):
1738         (-[WKView namesOfPromisedFilesDroppedAtDestination:]):
1739         * UIProcess/API/mac/WKViewInternal.h: Added _setPromisedData.
1740         * UIProcess/PageClient.h:
1741         * UIProcess/WebPageProxy.h: Added method for the new message.
1742         * UIProcess/WebPageProxy.messages.in: Added setPromisedData message.
1743         * UIProcess/mac/WebPageProxyMac.mm:
1744         (WebKit::WebPageProxy::setPromisedData):
1745         * WebProcess/WebCoreSupport/WebDragClient.cpp:
1746         * WebProcess/WebCoreSupport/WebDragClient.h:
1747         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1748         (WebKit::WebDragClient::declareAndWriteDragImage):
1749         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1750         (InitWebCoreSystemInterface): Added SetMetadataURL.
1751
1752 2012-03-12  Andras Becsi  <andras.becsi@nokia.com>
1753
1754         [Qt][WK2] Add support for rudimentary scroll indicators in MiniBrowser
1755         https://bugs.webkit.org/show_bug.cgi?id=80832
1756
1757         Reviewed by Tor Arne Vestbø.
1758
1759         Since the ScrollDecorator QML component requires a Flickable in its API
1760         we need to expose the Flickable in QML for now and we also need to add
1761         a notifier because we instantiate the internal Flickable only when the
1762         WebView component completes construction.
1763
1764         * UIProcess/API/qt/qquickwebview.cpp:
1765         (QQuickWebViewFlickablePrivate::onComponentComplete):
1766         (QQuickWebViewExperimental::flickable):
1767         * UIProcess/API/qt/qquickwebview_p.h:
1768
1769 2012-03-11  Timothy Hatcher  <timothy@apple.com>
1770
1771         Update how the Web Inspector resources are loaded.
1772
1773         https://bugs.webkit.org/show_bug.cgi?id=80814
1774         rdar://problem/10359959
1775
1776         Reviewed by John Sullivan.
1777
1778         * Shared/WebPreferencesStore.h:
1779         (WebKit): Added InspectorUsesWebKitUserInterface.
1780         * Shared/WebProcessCreationParameters.cpp:
1781         (WebKit::WebProcessCreationParameters::encode): Removed webInspectorLocalizedStringsPath.
1782         (WebKit::WebProcessCreationParameters::decode): Ditto.
1783         * Shared/WebProcessCreationParameters.h: Ditto.
1784         (WebProcessCreationParameters): Ditto.
1785         * UIProcess/API/C/WKContext.cpp:
1786         * UIProcess/API/C/WKContextPrivate.h:
1787         * UIProcess/API/C/WKPreferences.cpp:
1788         (WKPreferencesSetInspectorUsesWebKitUserInterface): Added.
1789         (WKPreferencesGetInspectorUsesWebKitUserInterface): Added.
1790         * UIProcess/API/C/WKPreferencesPrivate.h:
1791         * UIProcess/WebContext.cpp:
1792         (WebKit::WebContext::ensureWebProcess): Removed webInspectorLocalizedStringsPath.
1793         * UIProcess/WebContext.h:
1794         (WebContext): Ditto.
1795         * UIProcess/mac/WebInspectorProxyMac.mm:
1796         (WebKit::inspectorReallyUsesWebKitUserInterface): Added.
1797         (WebKit::WebInspectorProxy::createInspectorWindow): Use inspectorReallyUsesWebKitUserInterface
1798         to determine if texture should be used.
1799         (WebKit::WebInspectorProxy::inspectorPageURL): Choose the right path.
1800         (WebKit::WebInspectorProxy::inspectorBaseURL): Ditto.
1801         * WebProcess/WebPage/WebInspector.h:
1802         * WebProcess/WebPage/mac/WebInspectorMac.mm:
1803         (WebKit::inspectorReallyUsesWebKitUserInterface):
1804         (WebKit::WebInspector::setInspectorUsesWebKitUserInterface): Added.
1805         (WebKit::WebInspector::localizedStringsURL):
1806         * WebProcess/WebPage/mac/WebPageMac.mm:
1807         (WebKit::WebPage::platformPreferencesDidChange): Call WebInspector::setInspectorUsesWebKitUserInterface.
1808         * WebProcess/mac/WebProcessMac.mm:
1809         (WebKit::WebProcess::platformInitializeWebProcess): Removed call to WebInspector::setLocalizedStringsPath.
1810
1811 2012-03-11  Andy Estes  <aestes@apple.com>
1812
1813         Remove unnecessary call to NSSizeToCGSize().
1814         https://bugs.webkit.org/show_bug.cgi?id=80817
1815
1816         Reviewed by Dan Bernstein.
1817
1818         There is no need to call NSSizeToCGSize() to convert an IntSize to a
1819         CGSize. IntSize defines a conversion function to CGSize that will do
1820         this for us implicitly.
1821
1822         * UIProcess/mac/BackingStoreMac.mm:
1823         (WebKit::BackingStore::backingStoreContext): Do not call NSSizeToCGSize().
1824
1825 2012-03-11  Dan Bernstein  <mitz@apple.com>
1826
1827         WebKit2 lacks API for obtaining a representation of the RenderLayer tree of a page, like WebRenderLayer
1828         <http://webkit.org/b/80791>
1829
1830         Reviewed by Anders Carlsson.
1831
1832         * CMakeLists.txt:
1833         * GNUmakefile.am:
1834
1835         * Shared/API/c/WKBase.h: Added a type definition of WKRenderLayerRef.
1836
1837         * Shared/API/c/WKRenderLayer.cpp: Added.
1838         (WKRenderLayerGetTypeID): Added. Returns the WKRenderLayer type ID.
1839         (WKRenderLayerCopyRendererName): Added this getter wrapper.
1840         (WKRenderLayerCopyElementTagName): Ditto.
1841         (WKRenderLayerCopyElementID): Ditto.
1842         (WKRenderLayerGetElementClassNames): Ditto.
1843         (WKRenderLayerGetAbsoluteBounds): Ditto.
1844         (WKRenderLayerIsClipping): Ditto.
1845         (WKRenderLayerIsClipped): Ditto.
1846         (WKRenderLayerIsReflection): Ditto.
1847         (WKRenderLayerGetCompositingLayerType): Ditto.
1848         (WKRenderLayerGetNegativeZOrderList): Ditto.
1849         (WKRenderLayerGetNormalFlowList): Ditto.
1850         (WKRenderLayerGetPositiveZOrderList): Ditto.
1851
1852         * Shared/API/c/WKRenderLayer.h: Added.
1853
1854         * Shared/APIObject.h: Added TypeRenderLayer to the APIObject::Type enum.
1855
1856         * Shared/UserMessageCoders.h:
1857         (WebKit::UserMessageEncoder::baseEncode): Added WebRenderLayer encoding.
1858         (WebKit::UserMessageDecoder::baseDecode): Added WebRenderLayer decoding.
1859
1860         * Shared/WebRenderLayer.cpp: Added.
1861         (WebKit::WebRenderLayer::create): Added. Creates a WebRenderLayer for the page’s main
1862         frame’s root layer.
1863         (WebKit::WebRenderLayer::createArrayFromLayerList): Added this helper function.
1864         (WebKit::WebRenderLayer::WebRenderLayer): Added. Constructs a WebRenderLayer with the
1865         renderer name, element tag, ID and class names, metrics, child lists, and compositing
1866         layer properties of the given RenderLayer.
1867
1868         * Shared/WebRenderLayer.h: Added.
1869         (WebKit::WebRenderLayer::create):
1870         (WebKit::WebRenderLayer::negativeZOrderList):
1871         (WebKit::WebRenderLayer::normalFlowList):
1872         (WebKit::WebRenderLayer::positiveZOrderList):
1873         (WebKit::WebRenderLayer::renderObjectName):
1874         (WebKit::WebRenderLayer::elementTagName):
1875         (WebKit::WebRenderLayer::elementID):
1876         (WebKit::WebRenderLayer::elementClassNames):
1877         (WebKit::WebRenderLayer::isReflection):
1878         (WebKit::WebRenderLayer::isClipping):
1879         (WebKit::WebRenderLayer::isClipped):
1880         (WebKit::WebRenderLayer::compositingLayerType):
1881         (WebKit::WebRenderLayer::absoluteBoundingBox):
1882         (WebKit::WebRenderLayer::WebRenderLayer):
1883
1884         * Target.pri
1885
1886         * UIProcess/API/C/WKAPICast.h: Added a mapping between WKRenderLayerRef and WebRenderLayer.
1887
1888         * WebKit2.xcodeproj/project.pbxproj: Added WebRenderLayer.{cpp,h} and WKRenderLayer.{cpp,h}.
1889
1890         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1891         (WKBundlePageCopyRenderLayerTree): Added this bundle API for getting the layer tree.
1892
1893         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1894
1895         * win/WebKit2.vcproj:
1896
1897 2012-03-11  Joseph Pecoraro  <pecoraro@apple.com>
1898
1899         <http://webkit.org/b/80782> Web Inspector: Crash using released frontendClient when resizing window with closed inspector
1900
1901         The WebInspectorFrontendClient reference should be cleared when the
1902         WebInspectorClient::closeInspectorFrontend is called. This adds a
1903         destroyInspectorPage to mirror createInspectorPage and clear the weak
1904         pointers that are no longer valid.
1905
1906         Reviewed by Pavel Feldman.
1907
1908         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1909         (WebKit::WebInspectorClient::closeInspectorFrontend):
1910         (WebKit::WebInspectorClient::didResizeMainFrame):
1911         * WebProcess/WebPage/WebInspector.cpp:
1912         (WebKit::WebInspector::destroyInspectorPage):
1913         * WebProcess/WebPage/WebInspector.h:
1914
1915 2012-03-11  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1916
1917         [Qt] [WK2] Support threaded renderer in WK2
1918         https://bugs.webkit.org/show_bug.cgi?id=76661
1919
1920         Reviewed by Noam Rosenthal.
1921
1922         Implement Qt5 threaded rendering support for Qt WebKit2.
1923         Parts of LayerTreeHostProxy which contain layer tree and layer painting objects 
1924         are moved to separate class called WebLayerTreeRenderer. WebLayerTreeRenderer is 
1925         thread safe ref counted and referenced by LayerTreeHostProxy and paint node.
1926         All layer tree and graphics objects are created, accessed and deallocated from Qt 
1927         Scenegraph's paint thread only.
1928         Layer tree updates from render queue are fetched in updatePaintNode call stack when 
1929         main thread is locked.
1930         Messages from paint thread to web process are passed through MainThreadGuardedInvoker 
1931         call gate (implemented by Noam Rosenthal and previously reviewed by Kenneth Rohde 
1932         Christiansen).
1933
1934         * Target.pri:
1935         * UIProcess/API/qt/qquickwebpage.cpp:
1936         (PageProxyNode::PageProxyNode):
1937         (PageProxyNode::render):
1938         (PageProxyNode::~PageProxyNode):
1939         (PageProxyNode::layerTreeRenderer):
1940         (PageProxyNode):
1941         (PageProxyNode::setScale):
1942         (QQuickWebPage::updatePaintNode):
1943         (QQuickWebPagePrivate::~QQuickWebPagePrivate):
1944         * UIProcess/LayerTreeHostProxy.cpp: Added.
1945         (WebKit):
1946         (WebKit::LayerTreeHostProxy::LayerTreeHostProxy):
1947         (WebKit::LayerTreeHostProxy::~LayerTreeHostProxy):
1948         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
1949         (WebKit::LayerTreeHostProxy::paintToGraphicsContext):
1950         (WebKit::LayerTreeHostProxy::updateViewport):
1951         (WebKit::LayerTreeHostProxy::dispatchUpdate):
1952         (WebKit::LayerTreeHostProxy::createTileForLayer):
1953         (WebKit::LayerTreeHostProxy::updateTileForLayer):
1954         (WebKit::LayerTreeHostProxy::removeTileForLayer):
1955         (WebKit::LayerTreeHostProxy::deleteCompositingLayer):
1956         (WebKit::LayerTreeHostProxy::setRootCompositingLayer):
1957         (WebKit::LayerTreeHostProxy::syncCompositingLayerState):
1958         (WebKit::LayerTreeHostProxy::didRenderFrame):
1959         (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
1960         (WebKit::LayerTreeHostProxy::destroyDirectlyCompositedImage):
1961         (WebKit::LayerTreeHostProxy::setVisibleContentsRectForPanning):
1962         (WebKit::LayerTreeHostProxy::setVisibleContentsRectForScaling):
1963         (WebKit::LayerTreeHostProxy::renderNextFrame):
1964         (WebKit::LayerTreeHostProxy::purgeBackingStores):
1965         * UIProcess/LayerTreeHostProxy.h:
1966         (WebKit):
1967         (LayerTreeHostProxy):
1968         (WebKit::LayerTreeHostProxy::layerTreeRenderer):
1969         * UIProcess/WebLayerTreeRenderer.cpp: Renamed from Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp.
1970         (WebKit):
1971         (MainThreadGuardedInvoker):
1972         (WebKit::MainThreadGuardedInvoker::call):
1973         (WebKit::MainThreadGuardedInvoker::MainThreadGuardedInvoker):
1974         (WebKit::MainThreadGuardedInvoker::invoke):
1975         (WebKit::WebLayerTreeRenderer::callOnMainTread):
1976         (WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer):
1977         (WebKit::WebLayerTreeRenderer::~WebLayerTreeRenderer):
1978         (WebKit::WebLayerTreeRenderer::createLayer):
1979         (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext):
1980         (WebKit::WebLayerTreeRenderer::syncAnimations):
1981         (WebKit::WebLayerTreeRenderer::paintToGraphicsContext):
1982         (WebKit::WebLayerTreeRenderer::setVisibleContentsRectForScaling):
1983         (WebKit::WebLayerTreeRenderer::updateViewport):
1984         (WebKit::WebLayerTreeRenderer::syncLayerParameters):
1985         (WebKit::WebLayerTreeRenderer::deleteLayer):
1986         (WebKit::WebLayerTreeRenderer::ensureLayer):
1987         (WebKit::WebLayerTreeRenderer::setRootLayerID):
1988         (WebKit::WebLayerTreeRenderer::getBackingStore):
1989         (WebKit::WebLayerTreeRenderer::createTile):
1990         (WebKit::WebLayerTreeRenderer::removeTile):
1991         (WebKit::WebLayerTreeRenderer::updateTile):
1992         (WebKit::WebLayerTreeRenderer::createImage):
1993         (WebKit::WebLayerTreeRenderer::destroyImage):
1994         (WebKit::WebLayerTreeRenderer::assignImageToLayer):
1995         (WebKit::WebLayerTreeRenderer::swapBuffers):
1996         (WebKit::WebLayerTreeRenderer::flushLayerChanges):
1997         (WebKit::WebLayerTreeRenderer::renderNextFrame):
1998         (WebKit::WebLayerTreeRenderer::ensureRootLayer):
1999         (WebKit::WebLayerTreeRenderer::syncRemoteContent):
2000         (WebKit::WebLayerTreeRenderer::purgeGLResources):
2001         (WebKit::WebLayerTreeRenderer::purgeBackingStores):
2002         (WebKit::WebLayerTreeRenderer::detach):
2003         (WebKit::WebLayerTreeRenderer::appendUpdate):
2004         * UIProcess/WebLayerTreeRenderer.h: Copied from Source/WebKit2/UIProcess/LayerTreeHostProxy.h.
2005         (WebKit):
2006         (WebLayerTreeRenderer):
2007         (WebKit::WebLayerTreeRenderer::layerByID):
2008         (WebKit::WebLayerTreeRenderer::rootLayer):
2009         (WebKit::WebLayerTreeRenderer::notifyAnimationStarted):
2010         (WebKit::WebLayerTreeRenderer::notifySyncRequired):
2011         (WebKit::WebLayerTreeRenderer::showDebugBorders):
2012         (WebKit::WebLayerTreeRenderer::showRepaintCounter):
2013         (WebKit::WebLayerTreeRenderer::paintContents):
2014
2015 2012-03-09  Jon Lee  <jonlee@apple.com>
2016
2017         Rename NotificationPresenter to NotificationClient
2018         https://bugs.webkit.org/show_bug.cgi?id=80488
2019         <rdar://problem/10965558>
2020
2021         Reviewed by Kentaro Hara.
2022
2023         Refactor to use renamed WebCore::NotificationClient.
2024         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2025         * WebProcess/Notifications/NotificationPermissionRequestManager.cpp:
2026         (WebKit::NotificationPermissionRequestManager::startRequest):
2027         (WebKit::NotificationPermissionRequestManager::permissionLevel):
2028         * WebProcess/Notifications/NotificationPermissionRequestManager.h:
2029         (NotificationPermissionRequestManager):
2030         * WebProcess/Notifications/WebNotificationManager.cpp:
2031         (WebKit::WebNotificationManager::policyForOrigin):
2032         * WebProcess/Notifications/WebNotificationManager.h:
2033         (WebNotificationManager):
2034         * WebProcess/WebCoreSupport/WebNotificationClient.cpp:
2035         (WebKit::WebNotificationClient::checkPermission):
2036         * WebProcess/WebCoreSupport/WebNotificationClient.h:
2037         (WebNotificationClient):
2038
2039 2012-03-09  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2040
2041         [Qt] [WK2] Shouldn't use item for clipping rect calculation in paint node.
2042         https://bugs.webkit.org/show_bug.cgi?id=80714
2043
2044         Reviewed by Noam Rosenthal.
2045
2046         Replace item based clip-rect calculation with clipping-nodes based calculation.
2047         This is required for threaded rendering, since we don't have access to the QSGItems
2048         from the render thread.
2049
2050         * UIProcess/API/qt/qquickwebpage.cpp:
2051         (QQuickWebPage::QQuickWebPage):
2052         (QQuickWebPagePrivate::paintToCurrentGLContext):
2053         (PageProxyNode::render):
2054         (PageProxyNode::clipRect):
2055         (PageProxyNode):
2056         * UIProcess/API/qt/qquickwebpage_p_p.h:
2057         (QQuickWebPagePrivate):
2058         * UIProcess/API/qt/qquickwebview.cpp:
2059         (QQuickWebView::QQuickWebView):
2060
2061 2012-03-09  Enrica Casucci  <enrica@apple.com>
2062
2063         Move WebNSURLExtras code down to WebCore.
2064         https://bugs.webkit.org/show_bug.cgi?id=80611
2065
2066         Reviewed by Alexey Proskuryakov.
2067
2068         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2069         (InitWebCoreSystemInterface):
2070
2071 2012-03-09  Jeff Miller  <jeffm@apple.com>
2072
2073         Add WKPageEndPrinting() to balance WKPageBeginPrinting()
2074         https://bugs.webkit.org/show_bug.cgi?id=80739
2075
2076         Reviewed by Dan Bernstein.
2077
2078         * UIProcess/API/C/WKPage.cpp:
2079         (WKPageEndPrinting): Added.
2080         
2081         * UIProcess/API/C/WKPagePrivate.h: Added WKPageEndPrinting().
2082
2083 2012-03-09  Emil A Eklund  <eae@chromium.org>
2084
2085         Add roundedPoint to HitTestResult and change platform code to use it
2086         https://bugs.webkit.org/show_bug.cgi?id=80715
2087
2088         Reviewed by James Robinson.
2089
2090         Change ports to use roundedPoint to avoid exposing subpixel types to
2091         platform code.
2092
2093         * WebProcess/WebPage/WebContextMenu.cpp:
2094         (WebKit::WebContextMenu::show):
2095
2096 2012-03-09  Alexey Proskuryakov  <ap@apple.com>
2097
2098         [Mac] Pass sandbox profiles through preprocessor
2099         https://bugs.webkit.org/show_bug.cgi?id=80651
2100
2101         Reviewed by Mark Rowe.
2102
2103         * DerivedSources.make: Preprocess sandbox profiles.
2104
2105         * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb: Removed.
2106         * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.in: Copied from Source/WebKit2/PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.
2107         * WebProcess/com.apple.WebProcess.sb: Removed.
2108         * WebProcess/com.apple.WebProcess.sb.in: Copied from Source/WebKit2/WebProcess/com.apple.WebProcess.sb.
2109         Renamed to avoid make finding the wrong original in default paths.
2110
2111         * WebKit2.xcodeproj/project.pbxproj: Copy preprocessed files to Resources, not originals.
2112         Also, changed DerivedSources target to use BaseTarget.xcconfig to have correct include paths.
2113
2114 2012-03-09  Jon Lee  <jonlee@apple.com>
2115
2116         Add support for ENABLE(LEGACY_NOTIFICATIONS)
2117         https://bugs.webkit.org/show_bug.cgi?id=80497
2118
2119         Reviewed by Adam Barth.
2120
2121         Prep for b80472: Update API for Web Notifications
2122         * Configurations/FeatureDefines.xcconfig:
2123
2124 2012-03-09  Ashod Nakashian  <ashodnakashian@yahoo.com>
2125
2126         Bash scripts should support LF endings only
2127         https://bugs.webkit.org/show_bug.cgi?id=79509
2128
2129         Reviewed by David Kilzer.
2130
2131         * win/build-generated-files.sh: Added properties svn:executable and svn:eol-style.
2132
2133 2012-03-08  Enrica Casucci  <enrica@apple.com>
2134
2135         REGRESSION (r109022): Files dragged onto input controls cannot be read due to sandbox violation.
2136         https://bugs.webkit.org/show_bug.cgi?id=80203
2137         <rdar://problem/10976643>
2138
2139         Reviewed by Alexey Proskuryakov.
2140
2141         This patch reverts a small part fo r109022, leaving access to
2142         NSPasteboard in the WebProcess when retrieving pathnames for
2143         files being dragged. This avoid the sandbox violation until we
2144         implement a mechanism to provide a sandbox extension to the WebProcess.
2145         
2146         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2147         (WebKit::WebPlatformStrategies::getPathnamesForType):
2148
2149 2012-03-09  Sheriff Bot  <webkit.review.bot@gmail.com>
2150
2151         Unreviewed, rolling out r110191, r110202, and r110279.
2152         http://trac.webkit.org/changeset/110191
2153         http://trac.webkit.org/changeset/110202
2154         http://trac.webkit.org/changeset/110279
2155         https://bugs.webkit.org/show_bug.cgi?id=80694
2156
2157         They broke !ENABLE(INSPECTOR) builds (Requested by Ossy on
2158         #webkit).
2159
2160         * win/WebKit2.def:
2161         * win/WebKit2CFLite.def:
2162
2163 2012-03-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
2164
2165         [Qt] Use Qt's module system for install rules and depending on QtWebKit
2166
2167         Instead of rolling our own install rules we now use the same approach as
2168         every other Qt module, by loading qt_module.prf and qt_module_config.prf.
2169
2170         This ensures that we follow the same semantics as the rest of Qt on
2171         what sort of config options are enabled by default (create_cmake eg.).
2172         It also allows us to use QT += webkit instead of the workaround we had
2173         with CONFIG += qtwebkit.
2174
2175         We do however force Qt to always treat our build as a non-developer build,
2176         so the libraries will end up in the WebKit lib directory instead of the
2177         qtbase directory (as with a normal developer-build). This allows us to
2178         keep the webkit-build self-contained. If Qt is a developer build we still
2179         copy the module file manually to Qt, so that you don't have to install
2180         WebKit to make it available.
2181
2182         For non-developer builds of Qt, it is still possible to use the built
2183         WebKit libraries without having to install them, by having the variable
2184         QMAKE_EXTRA_MODULE_FORWARDS set in the project's .qmake.cache file,
2185         pointing to $WEBKITOUTUTDIR/$CONFIGURATION/modules.
2186
2187         https://bugs.webkit.org/show_bug.cgi?id=80590
2188
2189         Reviewed by Simon Hausmann.
2190
2191         * UIProcess/API/qt/tests/publicapi/publicapi.pro:
2192         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
2193         * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro:
2194         * UIProcess/API/qt/tests/qmltests/WebView.pro:
2195         * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp:
2196         * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro:
2197         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2198         * UIProcess/API/qt/tests/tests.pri:
2199         * UIProcess/API/qt/tests/util.cpp:
2200         * WebProcess.pro:
2201
2202 2012-03-08  No'am Rosenthal  <noam.rosenthal@nokia.com>
2203
2204         [Qt][WK2] Allow transparent WebViews
2205         https://bugs.webkit.org/show_bug.cgi?id=80608
2206
2207         Reviewed by Tor Arne Vestbø.
2208
2209         Added support for transparentBackground in QQuickWebViewExperimental.
2210         This uses the existing drawsTransparentBackground property in WebKit2.
2211         Also, changed LayerTreeHostQt to set the contentsOpaque flag when the root layer changes,
2212         otherwise the change doesn't take effect.
2213
2214         A new API test was added.
2215
2216         * UIProcess/API/qt/qquickwebview.cpp:
2217         (QQuickWebViewPrivate::setTransparentBackground):
2218         (QQuickWebViewPrivate::transparentBackground):
2219         (QQuickWebViewExperimental::transparentBackground):
2220         (QQuickWebViewExperimental::setTransparentBackground):
2221         * UIProcess/API/qt/qquickwebview_p.h:
2222         * UIProcess/API/qt/qquickwebview_p_p.h:
2223         (QQuickWebViewPrivate):
2224         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
2225         (tst_QQuickWebView):
2226         (tst_QQuickWebView::transparentWebViews):
2227         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
2228         (WebKit::LayerTreeHostQt::LayerTreeHostQt):
2229         (WebKit::LayerTreeHostQt::setRootCompositingLayer):
2230
2231 2012-03-08  Gustavo Noronha Silva  <gns@gnome.org>
2232
2233         GTK+ build fix. Only try to get the backing from the layer in when
2234         ACCELERATED_COMPOSITING is enabled.
2235
2236         Rubber-stamped by Ryosuke Niwa.
2237
2238         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2239         (WebKit::screenRectOfContents):
2240
2241 2012-03-08  Ryosuke Niwa  <rniwa@webkit.org>
2242
2243         Mac build fix for micro data API.
2244
2245         * Configurations/FeatureDefines.xcconfig:
2246
2247 2012-03-08  Jer Noble  <jer.noble@apple.com>
2248
2249         Unreviewed Snow Leopard build fix.
2250
2251         On Leopard and Snow Leopard, provide an implementation for -[NSWindow convertRectToScreen:].
2252
2253         * UIProcess/mac/WKFullScreenWindowController.mm:
2254         (-[NSWindow convertRectToScreen:]):
2255
2256 2012-03-08  Jer Noble  <jer.noble@apple.com>
2257
2258         Further unreviewed build fix.
2259
2260         Add in the WebCore namespace, so that IntRect is pulled in.
2261
2262         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
2263         * UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
2264         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
2265
2266 2012-03-08  Jer Noble  <jer.noble@apple.com>
2267
2268         Unreviewed build fix.
2269         
2270         Add stub implementations of beganEnterFullScreen and beganExitFullScreen
2271         to platform-specific WebFullScreenManagerProxy implementations.
2272
2273         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
2274         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
2275         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
2276         * UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
2277         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
2278         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
2279         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
2280         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen):
2281         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen):
2282
2283 2012-03-08  Jer Noble  <jer.noble@apple.com>
2284
2285         Full Screen Refactor Part 3: Animate into Full Screen mode using new animation classes.
2286         https://bugs.webkit.org/show_bug.cgi?id=78928
2287
2288         Reviewed by Anders Carlsson.
2289
2290         Boilerplate changes to WebKit2 IPC messages and supporting functions.
2291         * UIProcess/WebFullScreenManagerProxy.cpp:
2292         (WebKit::WebFullScreenManagerProxy::setAnimatingFullScreen): Added boilerplate.
2293         * UIProcess/WebFullScreenManagerProxy.h:
2294         * UIProcess/WebFullScreenManagerProxy.messages.in:
2295         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
2296         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): Added boilerplate.
2297         (WebKit::WebFullScreenManagerProxy::beganExitFullScreen): Added boilerplate.
2298         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2299         (WebKit::screenRectOfContents): Added.  Calculates the screen rect of an element's contents.
2300         (WebKit::WebFullScreenManager::enterFullScreenForElement): Use screenRectOfContents()
2301         (WebKit::WebFullScreenManager::willEnterFullScreen): Ditto. Do not set the background color. Call new BeganEnterFullScreen
2302             XPC message.
2303         (WebKit::WebFullScreenManager::didEnterFullScreen): Do not set the background color.
2304         (WebKit::WebFullScreenManager::willExitFullScreen): Use screenRectOfContents. Do not set the background color. Call new
2305             BeganExitFullScreen XPC message.
2306         (WebKit::WebFullScreenManager::didExitFullScreen): Do not set the background color.
2307         (WebKit::WebFullScreenManager::setAnimatingFullScreen): Added boilerplate.
2308         * WebProcess/FullScreen/WebFullScreenManager.h:
2309         * WebProcess/FullScreen/WebFullScreenManager.messages.in:
2310
2311         * UIProcess/mac/WKFullScreenWindowController.h:
2312         * UIProcess/mac/WKFullScreenWindowController.mm:
2313         (-[WKFullScreenWindowController cancelOperation:]): Renamed from _requestExitWithAnimation:.
2314         (-[WKFullScreenWindowController applicationDidResignActive:]): Call cancelOperation: instead
2315             of _requestExitWithAnimation.
2316         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Set the frame of
2317             both the full screen window and the background window.
2318         (-[WKFullScreenWindowController enterFullScreen:]): Save a rendered image of the current
2319             page to use in the placeholder.
2320         (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Renamed from 
2321             beganEnterFullScreenAnimation.
2322         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): No need to swap 
2323             placeholder views here, as they were already swapped in beganEnter...:.
2324         (-[WKFullScreenWindowController exitFullScreen]):
2325         (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Renamed from 
2326             beganExitFullScreenAnimation.
2327         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Swap web view back into place.
2328         (-[WKFullScreenWindowController close]):
2329         (-[WKFullScreenWindowController animationDidEnd:]): Added.
2330         (createBackgroundFullscreenWindow): Added.
2331         (windowFrameFromApparentFrames): Added.
2332         (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Added.
2333         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Added.
2334
2335 2012-03-08  Jer Noble  <jer.noble@apple.com>
2336
2337         Full Screen Refactor Part 2: Remove unnecessary WebKit2 APIs for Full Screen made
2338         https://bugs.webkit.org/show_bug.cgi?id=78926
2339
2340         Reviewed by John Sullivan.
2341
2342         The following functions (and also their Proxy versions) were removed completely:
2343         WebFullScreenManager::enterAcceleratedCompositingMode(const LayerTreeContext&)
2344         WebFullScreenManager::exitAcceleratedCompositingMode()
2345         WebFullScreenManager::beganEnterFullScreenAnimation()
2346         WebFullScreenManager::finishedEnterFullScreenAnimation(bool)
2347         WebFullScreenManager::beganExitFullScreenAnimation()
2348         WebFullScreenManager::finishedExitFullScreenAnimation(bool)
2349         WebFullScreenManager::getFullScreenRect(WebCore::IntRect&)
2350
2351         * UIProcess/WebFullScreenManagerProxy.cpp:
2352         * UIProcess/WebFullScreenManagerProxy.h:
2353         (WebKit::WebFullScreenManagerProxy::beginEnterFullScreenAnimation):
2354         (WebKit::WebFullScreenManagerProxy::beginExitFullScreenAnimation):
2355         (WebKit::WebFullScreenManagerProxy::disposeOfLayerClient):
2356         (WebFullScreenManagerProxy):
2357         * UIProcess/WebFullScreenManagerProxy.messages.in:
2358         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
2359         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
2360         * UIProcess/qt/WebFullScreenManagerProxyQt.cpp:
2361         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
2362         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation):
2363         * WebKit2.xcodeproj/project.pbxproj:
2364         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2365         (WebKit::WebFullScreenManager::create):
2366         (WebKit::WebFullScreenManager::~WebFullScreenManager):
2367         * WebProcess/FullScreen/WebFullScreenManager.h:
2368         (WebFullScreenManager):
2369         * WebProcess/FullScreen/WebFullScreenManager.messages.in:
2370         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2371         (WebKit::WebChromeClient::exitFullScreenForElement):
2372         * WebProcess/WebCoreSupport/WebChromeClient.h:
2373         (WebChromeClient):
2374
2375         Additionally, the platform-specific WebFullScreenManager subclasses were removed, as no
2376         platform-specific implementations remained after the above functions were removed:
2377         * GNUmakefile.am:
2378         * Target.pri:
2379         * win/WebKit2.vcproj:
2380         * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.cpp: Removed.
2381         * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.h: Removed.
2382         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Removed.
2383         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Removed.
2384         * WebProcess/FullScreen/qt/WebFullScreenManagerQt.cpp: Removed.
2385         * WebProcess/FullScreen/qt/WebFullScreenManagerQt.h: Removed.
2386         * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp: Removed.
2387         * WebProcess/FullScreen/win/WebFullScreenManagerWin.h: Removed.
2388
2389 2012-03-08  Matt Lilek  <mrl@apple.com>
2390
2391         Don't enable VIDEO_TRACK on all OS X platforms
2392         https://bugs.webkit.org/show_bug.cgi?id=80635
2393
2394         Reviewed by Eric Carlson.
2395
2396         * Configurations/FeatureDefines.xcconfig:
2397
2398 2012-03-08  Max Vujovic  <mvujovic@adobe.com>
2399
2400         Add a method to window.internals to enable testing of inspector highlight rects
2401         https://bugs.webkit.org/show_bug.cgi?id=80338
2402
2403         Reviewed by Pavel Feldman.
2404
2405         * win/WebKit2.def: Export symbols for win.
2406         * win/WebKit2CFLite.def: Same as above.
2407
2408 2012-03-08  Dinu Jacob  <dinu.jacob@nokia.com>
2409
2410         [Qt WK2] Remove duplicate code related to dialog handling in QQuickWebView
2411         https://bugs.webkit.org/show_bug.cgi?id=80557
2412
2413         Reviewed by Simon Hausmann.
2414
2415         Move common code related to running QtDialogRunner into a separate function
2416  
2417         * UIProcess/API/qt/qquickwebview.cpp:
2418         (QQuickWebViewPrivate::runJavaScriptAlert):
2419         (QQuickWebViewPrivate::runJavaScriptConfirm):
2420         (QQuickWebViewPrivate::runJavaScriptPrompt):
2421         (QQuickWebViewPrivate::handleAuthenticationRequiredRequest):
2422         (QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest):
2423         (QQuickWebViewPrivate::handleCertificateVerificationRequest):
2424         (QQuickWebViewPrivate::execDialogRunner):
2425         * UIProcess/API/qt/qquickwebview_p_p.h:
2426         (QQuickWebViewPrivate):
2427
2428 2012-03-07  Dinu Jacob  <dinu.jacob@nokia.com>
2429
2430         [Qt] Authentication dialog does not work
2431         https://bugs.webkit.org/show_bug.cgi?id=79738
2432
2433         Reviewed by Simon Hausmann.
2434
2435         QQuickWebView should accept touch events only if there is
2436         no active dialog.
2437
2438         * UIProcess/API/qt/qquickwebview.cpp:
2439         (QQuickWebViewPrivate::QQuickWebViewPrivate):
2440         (QQuickWebViewPrivate::runJavaScriptAlert):
2441         (QQuickWebViewPrivate::runJavaScriptConfirm):
2442         (QQuickWebViewPrivate::runJavaScriptPrompt):
2443         (QQuickWebViewPrivate::handleAuthenticationRequiredRequest):
2444         (QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest):
2445         (QQuickWebViewPrivate::handleCertificateVerificationRequest):
2446         (QQuickWebView::touchEvent):
2447         * UIProcess/API/qt/qquickwebview_p_p.h:
2448         (QQuickWebViewPrivate):
2449
2450 2012-03-07  Dan Bernstein  <mitz@apple.com>
2451
2452         <rdar://problem/8494396> WebKit2 lacks API for obtaining a representation of the render tree of a page, like WebRenderNode
2453         https://bugs.webkit.org/show_bug.cgi?id=80230
2454
2455         Reviewed by Beth Dakin.
2456
2457         * CMakeLists.txt:
2458         * GNUmakefile.am:
2459
2460         * Shared/API/c/WKBase.h: Added a type definition of WKRenderObjectRef.
2461
2462         * Shared/API/c/WKRenderObject.cpp: Added.
2463         (WKRenderObjectGetTypeID): Added. Returns the WKRenderObject type ID.
2464         (WKRenderObjectCopyName): Added this getter wrapper.
2465         (WKRenderObjectGetAbsolutePosition): Ditto.
2466         (WKRenderObjectGetFrameRect): Ditto.
2467         (WKRenderObjectGetChildren): Ditto.
2468
2469         * Shared/API/c/WKRenderObject.h: Added.
2470
2471         * Shared/APIObject.h: Added TypeRenderObject to the APIObject::Type enum.
2472         * Shared/UserMessageCoders.h:
2473         (WebKit::UserMessageEncoder::baseEncode): Added WebRenderObject encoding.
2474         (WebKit::UserMessageDecoder::baseDecode): Added WebRenderObject decoding.
2475         * Shared/WebRenderObject.cpp: Added.
2476         (WebKit::WebRenderObject::create): Added. Creates a WebRenderObject for the page’s main
2477         frame content renderer.
2478         (WebKit::WebRenderObject::WebRenderObject): Added. Constructs a WebRenderObject with the
2479         name, metrics and children of the given RenderObject, following the rules used in WebKit1
2480         WebRenderNode. In particular, a RenderWidget representing a frame gets the frame’s content
2481         renderer as a child.
2482
2483         * Shared/WebRenderObject.h: Added.
2484         (WebKit::WebRenderObject::create):
2485         (WebKit::WebRenderObject::children):
2486         (WebKit::WebRenderObject::name):
2487         (WebKit::WebRenderObject::absolutePosition):
2488         (WebKit::WebRenderObject::frameRect):
2489         (WebKit::WebRenderObject::WebRenderObject):
2490
2491         * Target.pri:
2492
2493         * UIProcess/API/C/WKAPICast.h: Added a mapping between WKRenderObjectRef and WebRenderObject.
2494
2495         * WebKit2.xcodeproj/project.pbxproj: Added WebRenderObject.{cpp,h} and WKRenderObject.{cpp.h}.
2496
2497         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2498         (WKBundlePageCopyRenderTree): Added this bundle API for getting the render tree.
2499
2500         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2501
2502         * win/WebKit2.vcproj:
2503
2504 2012-03-07  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2505
2506         Pinch zoom acts weirdly on nytimes.com while loading
2507         https://webkit.org/b/80508
2508
2509         Reviewed by Simon Hausmann.
2510
2511         Make sure to suspend the page while doing pinch zooming.
2512         If the page is suspended (which happens while pinch zooming)
2513         then do not send touch events to the page, even if it has
2514         listeners.
2515
2516         * UIProcess/WebPageProxy.cpp:
2517         (WebKit::WebPageProxy::handleTouchEvent):
2518         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2519         (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
2520
2521 2012-03-05  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
2522
2523         [Qt] QWebNavigationRequest 'action' property should have an enum type instead of int
2524         https://bugs.webkit.org/show_bug.cgi?id=80164
2525
2526         Reviewed by Simon Hausmann.
2527
2528         Use the appropriate enum type instead of int. Make IgnoreRequest have a bigger
2529         value that give some room for us to put Experimental values in the middle. This
2530         way the Experimental values are in a valid range for the original enumeration. To
2531         avoid confusion, the Experimental enumeration was renamed.
2532
2533         * UIProcess/API/qt/qquickwebview_p.h:
2534         * UIProcess/API/qt/qwebnavigationrequest.cpp:
2535         (QWebNavigationRequestPrivate):
2536         (QWebNavigationRequest::setAction):
2537         (QWebNavigationRequest::action):
2538         * UIProcess/API/qt/qwebnavigationrequest_p.h:
2539         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
2540
2541 2012-03-07  Andras Becsi  <andras.becsi@nokia.com>
2542
2543         [WK2] Make it possible to build without geolocation support
2544         https://bugs.webkit.org/show_bug.cgi?id=80426
2545
2546         Reviewed by Simon Hausmann.
2547
2548         Add missing guards.
2549
2550         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
2551         (WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision):
2552         * UIProcess/WebPageProxy.cpp:
2553         (WebKit::WebPageProxy::close):
2554         (WebKit::WebPageProxy::processDidCrash):
2555         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2556         * WebProcess/WebPage/WebPage.cpp:
2557         (WebKit::WebPage::WebPage):
2558         (WebKit):
2559         * WebProcess/WebPage/WebPage.h:
2560         (WebPage):
2561         * WebProcess/WebPage/WebPage.messages.in:
2562
2563 2012-03-06  Raphael Kubo da Costa  <kubo@profusion.mobi>
2564
2565         [CMake] Make the removal of transitive library dependencies work with CMake < 2.8.7.
2566         https://bugs.webkit.org/show_bug.cgi?id=80469
2567
2568         Reviewed by Antonio Gomes.
2569
2570         * CMakeLists.txt: Manually set the LINK_INTERFACE_LIBRARIES target
2571         property on the library being created.
2572
2573 2012-03-06  Hugo Parente Lima  <hugo.lima@openbossa.org>
2574
2575         MiniBrowser --window-size 480x800 www.nytimes.com doesn't paint bottom tiles.
2576         https://bugs.webkit.org/show_bug.cgi?id=80313
2577
2578         Reviewed by Kenneth Rohde Christiansen.
2579
2580         Fix the math to get the visible rectangle and add a method to get it.
2581
2582         * UIProcess/API/qt/qquickwebview.cpp:
2583         (QQuickWebViewPrivate::visibleContentsRect):
2584         (QQuickWebViewFlickablePrivate::_q_commitScaleChange):
2585         (QQuickWebViewPrivate::_q_commitPositionChange):
2586         * UIProcess/API/qt/qquickwebview_p_p.h:
2587         (QQuickWebViewPrivate):
2588
2589 2012-03-05  Joseph Pecoraro  <pecoraro@apple.com>
2590
2591         Web Inspector: Hide dock button when not allowed to dock
2592         https://bugs.webkit.org/show_bug.cgi?id=78575
2593
2594         Reviewed by Pavel Feldman.
2595
2596         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2597         (WebKit::WebInspectorClient::didResizeMainFrame):
2598         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2599         * WebProcess/WebPage/WebInspector.cpp:
2600         (WebKit::WebInspector::updateDockingAvailability):
2601         * WebProcess/WebPage/WebInspector.h:
2602
2603 2012-03-06  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2604
2605         [Qt] Interaction Engine suspends content during pageload.
2606         https://bugs.webkit.org/show_bug.cgi?id=80294
2607
2608         Only suspend content when viewport updates are deferred
2609         for a non-instantanious interaction.
2610
2611         Reviewed by Kenneth Rohde Christiansen.
2612
2613         * UIProcess/qt/QtViewportInteractionEngine.cpp:
2614         (WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer):
2615         (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer):
2616         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
2617         (WebKit::QtViewportInteractionEngine::flickableMoveStarted):
2618         (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
2619         * UIProcess/qt/QtViewportInteractionEngine.h:
2620         (QtViewportInteractionEngine):
2621
2622 2012-03-06  Simon Hausmann  <simon.hausmann@nokia.com>
2623
2624         [Qt] Make QQuickWebView's url property work with a flickable webview
2625
2626         Reviewed by Tor Arne Vestbø.
2627
2628         QQuickWebViewPrivate::onComponentComplete implements the deferred url loading
2629         when the url property is set in the component instantiation. QQuickWebViewFlickablePrivate
2630         is the private sub-class used for a flickable webview, which re-implemented onComponentComplete
2631         but forgot to call the base implementation.
2632
2633         * UIProcess/API/qt/qquickwebview.cpp:
2634         (QQuickWebViewFlickablePrivate::onComponentComplete):
2635
2636 2012-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2637
2638         [GTK] Fix several documentation issues in WebKit2 GTK+ API
2639         https://bugs.webkit.org/show_bug.cgi?id=80281
2640
2641         Reviewed by Martin Robinson.
2642
2643         * UIProcess/API/gtk/WebKitFindController.cpp:
2644         * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
2645         (webkit_navigation_policy_decision_class_init):
2646         * UIProcess/API/gtk/WebKitPrintOperation.cpp:
2647         * UIProcess/API/gtk/WebKitWebView.h:
2648
2649 2012-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2650
2651         [GTK] Use a single signal for script dialogs in WebKit2 GTK+ API
2652         https://bugs.webkit.org/show_bug.cgi?id=80271
2653
2654         Reviewed by Martin Robinson.
2655
2656         Add a new signal WebKitWebView::script-dialog that passes a
2657         WebKitScriptDialog boxed type that can be used to build the dialog
2658         and set the responses. It simplifies the API and makes it bindings
2659         friendly.
2660
2661         * GNUmakefile.am:
2662         * UIProcess/API/gtk/WebKitScriptDialog.cpp: Added.
2663         (webkitScriptDialogCopy): Copy method for boxed type.
2664         (webkitScriptDialogFree): Free method for boxed type.
2665         (webkit_script_dialog_get_dialog_type): Return the type of dialog:
2666         alert, confirm or prompt.
2667         (webkit_script_dialog_get_message): Return the message of the dialog.
2668         (webkit_script_dialog_confirm_set_confirmed): Set whether user
2669         confirmed the dialog, for confirm dialogs.
2670         (webkit_script_dialog_prompt_get_default_text): Get the default
2671         text of prompt dialogs.
2672         (webkit_script_dialog_prompt_set_text): Set the text entered by
2673         the user, for prompt dialogs.
2674         * UIProcess/API/gtk/WebKitScriptDialog.h: Added.
2675         * UIProcess/API/gtk/WebKitScriptDialogPrivate.h: Added.
2676         * UIProcess/API/gtk/WebKitWebView.cpp:
2677         (webkitWebViewScriptDialog): Default implementation of
2678         WebKitWebView::script-dialog signal.
2679         (webkit_web_view_class_init): Add WebKitWebView::script-dialog and
2680         remove alert, confirm and propmpt.
2681         (webkitWebViewRunJavaScriptAlert): Create a WebKitScriptDialog and
2682         emit WebKitWebView::script-dialog signal.
2683         (webkitWebViewRunJavaScriptConfirm): Ditto.
2684         (webkitWebViewRunJavaScriptPrompt): Ditto.
2685         * UIProcess/API/gtk/WebKitWebView.h:
2686         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new
2687         symbols.
2688         * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_script_dialog_get_type().
2689         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
2690         (testWebViewJavaScriptDialogs): Update javascript dialog test to
2691         use the new API.
2692         * UIProcess/API/gtk/webkit2marshal.list:
2693         * UIProcess/API/gtk/webkit2.h:
2694
2695 2012-03-05  Gavin Barraclough  <barraclough@apple.com>
2696
2697         putByIndex should throw in strict mode
2698         https://bugs.webkit.org/show_bug.cgi?id=80335
2699
2700         Reviewed by Filip Pizlo.
2701
2702         Make the MethodTable PutByIndex trap take a boolean 'shouldThrow' parameter.
2703
2704         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2705         (WebKit::NPJSObject::setProperty):
2706
2707 2012-03-05  Joseph Pecoraro  <pecoraro@apple.com>
2708
2709         Unreviewed rollout of r109858 for restructuring.
2710
2711 2012-03-05  Joseph Pecoraro  <pecoraro@apple.com>
2712
2713         <http://webkit.org/b/78575> Web Inspector: Hide dock button when not allowed to dock
2714
2715         Reviewed by Timothy Hatcher.
2716
2717         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2718         (WebKit::WebInspectorClient::updateDockingAvailability):
2719         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2720         * WebProcess/WebPage/WebInspector.cpp:
2721         (WebKit::WebInspector::updateDockingAvailability):
2722         * WebProcess/WebPage/WebInspector.h:
2723
2724 2012-03-05  Anders Carlsson  <andersca@apple.com>
2725
2726         pinch-to-zoom and double-tap flicker when using the new scrolling model
2727         https://bugs.webkit.org/show_bug.cgi?id=80368
2728         <rdar://problem/10866221>
2729
2730         Reviewed by Sam Weinig.
2731
2732         Add a way for drawing areas to respond to callback based force repaint requests asynchronously.
2733         This is currently needed for the tiled drawing area when there might be outstanding scroll updates
2734         that are sent from the scrolling thread to the main thread and we need to ensure that they're processed
2735         before sending a message back.
2736
2737         * WebProcess/WebPage/DrawingArea.h:
2738         (WebKit::DrawingArea::forceRepaintAsync):
2739         Add new member function.
2740
2741         * WebProcess/WebPage/WebPage.cpp:
2742         (WebKit::WebPage::forceRepaint):
2743         Try forceRepaintAsync first.
2744
2745         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2746         (WebKit::forceRepaintAndSendMessage):
2747         Force the repaint and send the message.
2748
2749         (WebKit::dispatchBackToMainThread):
2750         Dispatch a call to forceRepaintAndSendMessage to the main thread.
2751
2752         (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
2753         Dispatch a function on the scrolling thread. Its sole purpose is to dispatch a function back to the
2754         main thread, ensuring that all previously dispatched functions have been executed.
2755
2756 2012-03-05  Enrica Casucci  <enrica@apple.com>
2757
2758         Can't type on some websites (plug-ins steal key events).
2759         <rdar://problem/10892291>
2760
2761         When the plugin is disabled, it is necessary to reset _pluginComplexTextInputIdentifier
2762         in order to return the correct input context. Failure to do so results in the inputContext
2763         method to return the plugin input context instead of the context of the browser view.
2764         
2765         Reviewed by Sam Weinig.
2766
2767         * UIProcess/API/mac/WKView.mm:
2768         (-[WKView _setPluginComplexTextInputState:]):
2769         (-[WKView _handlePluginComplexTextInputKeyDown:]):
2770
2771 2012-03-05  Anders Carlsson  <andersca@apple.com>
2772
2773         Be more aggressive about repainting page overlays
2774         https://bugs.webkit.org/show_bug.cgi?id=80336
2775         <rdar://problem/10965943>
2776
2777         Reviewed by Simon Fraser.
2778
2779         Whenever we're flushing layers and we have a page overlay, check if the main frame
2780         has scrolled or if the main frame root content layer needs to be repainted and force the
2781         overlay layer to be repainted if either of those conditions are true.
2782
2783         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2784         (TiledCoreAnimationDrawingArea):
2785         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2786         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2787         (WebKit::TiledCoreAnimationDrawingArea::shouldRepaintPageOverlayLayer):
2788         (WebKit):
2789
2790 2012-03-05  Sam Weinig  <sam@webkit.org>
2791
2792         Add support for hosting layers in the window server in WebKit2
2793         <rdar://problem/10400246>
2794         https://bugs.webkit.org/show_bug.cgi?id=80310
2795
2796         Reviewed by Anders Carlsson.
2797
2798         This currently only works if you are using TiledCoreAnimation drawing model.
2799
2800         * Platform/mac/LayerHostingContext.h: Renamed from Source/WebKit2/Platform/mac/RemoteLayerClient.h.
2801         * Platform/mac/LayerHostingContext.mm: Renamed from Source/WebKit2/Platform/mac/RemoteLayerClient.mm.
2802         (WebKit::LayerHostingContext::createForPort):
2803         (WebKit::LayerHostingContext::LayerHostingContext):
2804         (WebKit::LayerHostingContext::createForWindowServer):
2805         (WebKit::LayerHostingContext::~LayerHostingContext):
2806         (WebKit::LayerHostingContext::setRootLayer):
2807         (WebKit::LayerHostingContext::rootLayer):
2808         (WebKit::LayerHostingContext::contextID):
2809         (WebKit::LayerHostingContext::invalidate):
2810         Renamed RemoteLayerClient to LayerHostingContext and add ability to use the window server
2811         as the remote context.
2812
2813         * PluginProcess/PluginControllerProxy.cpp:
2814         * PluginProcess/PluginControllerProxy.h:
2815         * PluginProcess/mac/PluginControllerProxyMac.mm:
2816         Update for new names.
2817
2818         * Shared/LayerTreeContext.h:
2819         Add LayerHostingMode enum.
2820
2821         * UIProcess/PageClient.h:
2822         * UIProcess/API/mac/PageClientImpl.h:
2823         * UIProcess/API/mac/PageClientImpl.mm:
2824         (WebKit::PageClientImpl::layerHostingMode):
2825         (WebKit::PageClientImpl::updateAcceleratedCompositingMode):
2826         Add PageClient access points to get the current layer hosting mode,
2827         and a hook to tell the underlying view that the layer hosting context
2828         has changed.
2829
2830         * UIProcess/API/mac/WKViewInternal.h:
2831         * UIProcess/API/mac/WKView.mm:
2832         (-[WKView _updateAcceleratedCompositingMode:WebKit::]):
2833         Implement responding to a new layer hosting context as a simple
2834         exit and re-entrance of compositing.
2835
2836         * UIProcess/DrawingAreaProxy.h:
2837         (WebKit::DrawingAreaProxy::layerHostingModeDidChange):
2838         (WebKit::DrawingAreaProxy::updateAcceleratedCompositingMode):
2839         * UIProcess/DrawingAreaProxy.messages.in:
2840         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2841         (TiledCoreAnimationDrawingAreaProxy):
2842         * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
2843         (WebKit::TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange):
2844         (WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode):
2845         Pipe layer hosting changes around.
2846
2847         * UIProcess/WebPageProxy.h:
2848         (WebKit::WebPageProxy::layerHostingMode):
2849         * UIProcess/WebPageProxy.cpp:
2850         (WebKit::WebPageProxy::WebPageProxy):
2851         (WebKit::WebPageProxy::viewStateDidChange):
2852         Cache the current layer hosting mode so we don't overzealously
2853         tell the WebProcess to reset its context. Re-check layer hosting
2854         mode each time we are added/removed from a window.
2855
2856         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
2857         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
2858         Update for new names.
2859
2860         * WebProcess/WebPage/DrawingArea.h:
2861         (WebKit::DrawingArea::setDeviceScaleFactor):
2862         (WebKit::DrawingArea::setLayerHostingMode):
2863         * WebProcess/WebPage/DrawingArea.messages.in:
2864         Pipe layer hosting changes around.
2865
2866         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
2867         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
2868         (WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac):
2869         (WebKit::LayerTreeHostCAMac::platformInitialize):
2870         (WebKit::LayerTreeHostCAMac::invalidate):
2871         Update for new names.
2872
2873         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2874         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2875         (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
2876         (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode):
2877         Respond to a change in the layer hosting mode by invalidating our old context,
2878         making a new one of the right type, and informing the UIProcess of our new context.
2879
2880         * WebKit2.xcodeproj/project.pbxproj:
2881         Add new files.
2882
2883 2012-03-05  Anders Carlsson  <andersca@apple.com>
2884
2885         Always update the scroll layer position on the main thread when we have an overlay
2886         https://bugs.webkit.org/show_bug.cgi?id=80324
2887
2888         Reviewed by Sam Weinig.
2889
2890         Call setForceMainThreadScrollLayerPositionUpdates when installing and uninstalling page overlays,
2891         so we'll be able to synchronize painting between the tile cache and the page overlays.
2892
2893         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
2894         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
2895         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
2896
2897 2012-03-05  Timothy Hatcher  <timothy@apple.com>
2898
2899         Change how the Web Inspector Develop menu actions work.
2900
2901         This removes the methods used by Safari's Develop menu. They can now be implemented in Safari.
2902
2903         https://webkit.org/b/80308
2904
2905         Reviewed by John Sullivan.
2906
2907         * UIProcess/API/C/mac/WKInspectorPrivateMac.h: Renamed from Source/WebKit2/UIProcess/API/C/mac/WKInspectorMac.h.
2908         * UIProcess/mac/WebInspectorProxyMac.mm:
2909         (-[WKWebInspectorProxyObjCAdapter inspectorRef]): Added.
2910         * WebKit2.xcodeproj/project.pbxproj: Renamed WKInspectorPrivateMac.h to better reflect its private nature.
2911
2912 2012-03-02  Jon Lee  <jonlee@apple.com>
2913
2914         Add support for notification replaceId in Mac WebKit and WK2
2915         https://bugs.webkit.org/show_bug.cgi?id=80206
2916         <rdar://problem/10965574>
2917
2918         Reviewed by Sam Weinig.
2919
2920         * UIProcess/API/C/WKNotification.cpp: Add WK API.
2921         (WKNotificationCopyReplaceID):
2922         * UIProcess/API/C/WKNotification.h:
2923         * UIProcess/Notifications/WebNotification.cpp:
2924         (WebKit::WebNotification::WebNotification):
2925         * UIProcess/Notifications/WebNotification.h: Add replaceID member.
2926         (WebKit::WebNotification::create):
2927         (WebKit::WebNotification::replaceID):
2928         (WebNotification):
2929         * UIProcess/Notifications/WebNotificationManagerProxy.cpp:
2930         (WebKit::WebNotificationManagerProxy::show):
2931         * UIProcess/Notifications/WebNotificationManagerProxy.h:
2932         (WebNotificationManagerProxy):
2933         * UIProcess/WebPageProxy.cpp:
2934         (WebKit::WebPageProxy::showNotification):
2935         * UIProcess/WebPageProxy.h:
2936         (WebPageProxy):
2937         * UIProcess/WebPageProxy.messages.in: Add replaceID to the showNotification message.
2938         * WebProcess/Notifications/WebNotificationManager.cpp:
2939         (WebKit::WebNotificationManager::show):
2940
2941 2012-03-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2942
2943         Unreviewed, rolling out r109748.
2944         http://trac.webkit.org/changeset/109748
2945         https://bugs.webkit.org/show_bug.cgi?id=80296
2946
2947         Made some tests crash, will fix and recommit (Requested by
2948         noamr on #webkit).
2949
2950         * Target.pri:
2951         * UIProcess/API/qt/qquickwebpage.cpp:
2952         (QQuickWebPagePrivate::paintToCurrentGLContext):
2953         (PageProxyNode::PageProxyNode):
2954         (PageProxyNode):
2955         (PageProxyNode::changedStates):
2956         (PageProxyNode::render):
2957         (PageProxyNode::~PageProxyNode):
2958         (QQuickWebPage::updatePaintNode):
2959         (QQuickWebPagePrivate::updateSize):
2960         (QQuickWebPagePrivate::resetPaintNode):
2961         (QQuickWebPagePrivate::~QQuickWebPagePrivate):
2962         * UIProcess/API/qt/qquickwebpage_p_p.h:
2963         (QQuickWebPagePrivate):
2964         * UIProcess/DrawingAreaProxy.h:
2965         (WebKit):
2966         (WebKit::DrawingAreaProxy::layerTreeHostProxy):
2967         (DrawingAreaProxy):
2968         * UIProcess/DrawingAreaProxyImpl.cpp:
2969         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2970         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2971         * UIProcess/LayerTreeHostProxy.h:
2972         (LayerTreeHostProxy):
2973         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
2974         (WebKit::LayerTreeHostProxy::syncAnimations):
2975         (WebKit::LayerTreeHostProxy::updateViewport):
2976         (WebKit::LayerTreeHostProxy::syncLayerParameters):
2977         (WebKit::LayerTreeHostProxy::flushLayerChanges):
2978         (WebKit::LayerTreeHostProxy::ensureRootLayer):
2979         (WebKit::LayerTreeHostProxy::syncRemoteContent):
2980         (WebKit::LayerTreeHostProxy::dispatchUpdate):
2981         (WebKit):
2982         (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
2983         (WebKit::LayerTreeHostProxy::purgeGLResources):
2984         * UIProcess/qt/QtWebPageSGNode.cpp: Removed.
2985         * UIProcess/qt/QtWebPageSGNode.h: Removed.
2986
2987 2012-03-05  Joone Hur  <joone.hur@collabora.co.uk>
2988
2989         [GTK] zlib link error with --enable-webkit2
2990         https://bugs.webkit.org/show_bug.cgi?id=79877
2991
2992         Reviewed by Martin Robinson.
2993
2994         zlib should be linked properly.
2995
2996         * GNUmakefile.am: Link $(ZLIB_LIBS) with libwebkit2gtk instead of
2997         linking it with WebKitWebProcess.
2998
2999 2012-03-05  Carlos Garcia Campos  <cgarcia@igalia.com>
3000
3001         [WK2] WKPageGetContextMenuFromProposedContextMenuCallback should pass a HitTestResult
3002         https://bugs.webkit.org/show_bug.cgi?id=77208
3003
3004         Reviewed by Anders Carlsson.
3005
3006         A HitTestResultData is now passed to ShowContextMenu WebPageProxy
3007         message instead of the ContextMenuState. ContextMenu client has
3008         been updated to pass the HitTestResult to the
3009         getContextMenuFromProposedMenu callback.
3010
3011         * GNUmakefile.am: Remove ContextMenuState.h.
3012         * Shared/APIClientTraits.h:
3013         * Shared/ContextMenuState.h: Removed.
3014         * Shared/WebHitTestResult.h:
3015         (WebKit::WebHitTestResult::Data::Data): Add constructor that takes
3016         a WebCore::HitTestResult.
3017         * UIProcess/API/C/WKPage.h: Add HitTestResult parameter to
3018         getContextMenuFromProposedMenu callback and deprecate the old
3019         version.
3020         * UIProcess/WebPageContextMenuClient.cpp:
3021         (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
3022         Pass a HitTestResult to getContextMenuFromProposedMenu or use the
3023         deprecated one if client version is an old one.
3024         * UIProcess/WebPageContextMenuClient.h:
3025         * UIProcess/WebPageProxy.cpp:
3026         (WebKit::WebPageProxy::showContextMenu):
3027         (WebKit::WebPageProxy::internalShowContextMenu): Save the
3028         WebHitTestResult::Data to use it for handling context menu actions.
3029         (WebKit::WebPageProxy::contextMenuItemSelected): Use the saved
3030         WebHitTestResult::Data.
3031         * UIProcess/WebPageProxy.h:
3032         * UIProcess/WebPageProxy.messages.in:
3033         * WebKit2.xcodeproj/project.pbxproj: Remove ContextMenuState.h.
3034         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3035         (WebKit::WebChromeClient::mouseDidMoveOverElement): Use the new
3036         WebHitTestResult::Data constructor that takes a WebCore::HitTestResult.
3037         * WebProcess/WebPage/WebContextMenu.cpp:
3038         (WebKit::WebContextMenu::show): Create a WebHitTestResult::Data
3039         instead of a ContextMenuState and pass it to ShowContextMenu message.
3040         * win/WebKit2.vcproj: ContextMenuState.h.
3041
3042 2012-03-05  No'am Rosenthal  <noam.rosenthal@nokia.com>
3043
3044         [Qt] [WK2] Support threaded renderer in WK2
3045         https://bugs.webkit.org/show_bug.cgi?id=76661
3046
3047         Made the appropriate fixes in the UI process code to make rendering thread-safe.
3048         - Separated the scenegraph node code to QtWebPageSGNode. QtWebPageSGNode has direct access
3049           to LayerTreeHostProxy.
3050
3051         - Each function in LayerTreeHostProxy can be either called from the main thread (handling
3052           messages from the web process), or from the renderer thread (handling the GL context).
3053           The render-queue is locked with a mutex, and messages back to the web process are sent
3054           via callOnMainThread.
3055
3056         - LayerTreeHostProxy is now ThreadSafeRefCounted. That is done to make sure that the GL
3057           resources it creates are only freed when the QtWebPageSGNode is deleted, which can be
3058           before or after the owning DrawingAreaProxy is deleted. This ensures that the class is
3059           deleted only after its GL resources are freed, otherwise those resources may leak.
3060
3061         Based on a patch by Viatcheslav Ostapenko.
3062
3063         Reviewed by Kenneth Rohde Christiansen.
3064
3065         * Target.pri: Added new files.
3066         * UIProcess/API/qt/qquickwebpage.cpp: Moved QtWebPageSGNode out.
3067         (QQuickWebPage::updatePaintNode): Call QtWebPageSGNode
3068         (QQuickWebPagePrivate::updateSize): Call QtWebPageSGNode
3069         (QQuickWebPagePrivate::didDeleteSGWebPageNode): Override QtWebPageSGNode::Client
3070         (QQuickWebPagePrivate::~QQuickWebPagePrivate):
3071         * UIProcess/API/qt/qquickwebpage_p_p.h:
3072         (QQuickWebPagePrivate):
3073         * UIProcess/DrawingAreaProxy.h:
3074         (WebKit):
3075         (WebKit::DrawingAreaProxy::layerTreeHostProxy): Made LayerTreeHostProxy ref-counted.
3076         (DrawingAreaProxy):
3077         * UIProcess/DrawingAreaProxyImpl.cpp:
3078         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
3079         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3080         * UIProcess/LayerTreeHostProxy.h:
3081         (WebKit):
3082         (WebKit::LayerTreeHostProxy::create):
3083         (LayerTreeHostProxy):
3084         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
3085         (WebKit::LayerTreeHostProxy::paintToCurrentGLContext):
3086         (WebKit):
3087         (MainThreadGuardedInvoker):
3088             A class that allows invoking functions in the main thread, while guarding a ref-
3089             counted object.
3090
3091         (WebKit::MainThreadGuardedInvoker::call):
3092         (WebKit::MainThreadGuardedInvoker::MainThreadGuardedInvoker):
3093         (WebKit::MainThreadGuardedInvoker::invoke):
3094         (WebKit::LayerTreeHostProxy::syncAnimations):
3095         (WebKit::LayerTreeHostProxy::updateViewport):
3096         (WebKit::LayerTreeHostProxy::detachDrawingArea):
3097         (WebKit::LayerTreeHostProxy::syncLayerParameters):
3098         (WebKit::LayerTreeHostProxy::setShouldRenderNextFrame):
3099         (WebKit::LayerTreeHostProxy::flushLayerChanges):
3100         (WebKit::LayerTreeHostProxy::ensureRootLayer):
3101         (WebKit::LayerTreeHostProxy::syncRemoteContent):
3102         (WebKit::LayerTreeHostProxy::dispatchUpdate):
3103         (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage):
3104         (WebKit::LayerTreeHostProxy::purgeGLResources):
3105         * UIProcess/qt/QtWebPageSGNode.cpp: Added.
3106         * UIProcess/qt/QtWebPageSGNode.h: Added.
3107
3108 2012-03-04  Raphael Kubo da Costa  <kubo@profusion.mobi>
3109
3110         [CMake] Libraries are installed to /usr/lib and not /usr/lib64 on x86_64
3111         https://bugs.webkit.org/show_bug.cgi?id=71507
3112
3113         Reviewed by Antonio Gomes.
3114
3115         * CMakeLists.txt: Use ${LIB_INSTALL_DIR} instead of hardcoding "lib".
3116
3117 2012-03-03  Simon Hausmann  <simon.hausmann@nokia.com>
3118
3119         [Qt] Fix static_libs_as_shared build
3120         https://bugs.webkit.org/show_bug.cgi?id=80214
3121
3122         Reviewed by Tor Arne Vestbø.
3123
3124         Replace (static) link time dependency to WK1 with entrypoint
3125         in the separate WebProcess for activating the QStyle theme if
3126         necessary.
3127
3128         * Target.pri:
3129         * UIProcess/Launcher/ProcessLauncher.h:
3130         * WebProcess/qt/WebProcessMainQt.cpp:
3131         (WebKit::WebProcessMainQt):
3132         * qt/MainQt.cpp:
3133         (WebKit):
3134         (main):
3135
3136 2012-03-03  Hans Wennborg  <hans@chromium.org>
3137
3138         Implement Speech JavaScript API
3139         https://bugs.webkit.org/show_bug.cgi?id=80019
3140
3141         Reviewed by Adam Barth.
3142
3143         Add ENABLE_SCRIPTED_SPEECH.
3144
3145         * Configurations/FeatureDefines.xcconfig:
3146
3147 2012-03-03  No'am Rosenthal  <noam.rosenthal@nokia.com>
3148
3149         [Qt] Use the existing inheritedOpacity/matrix properties of QSGNode
3150         https://bugs.webkit.org/show_bug.cgi?id=79543
3151
3152         Use QSGNode::inheritedOpacity() and QSGNode::matrix().
3153         Also, remove flags from changedStates() that we don't actually touch.
3154         This is covered by existing API tests.
3155
3156         Reviewed by Kenneth Rohde Christiansen.
3157
3158         * UIProcess/API/qt/qquickwebpage.cpp:
3159         (QQuickWebPagePrivate::paintToCurrentGLContext):
3160         (PageProxyNode::changedStates):
3161         (PageProxyNode::render):
3162         * UIProcess/API/qt/qquickwebpage_p_p.h:
3163         (QQuickWebPagePrivate):
3164
3165 2012-03-03  Anders Carlsson  <andersca@apple.com>
3166
3167         Fix build with newer versions of clang.
3168
3169         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3170         (WebKit::NPN_GetValue):
3171         Cast the switch parameter to unsigned to prevent warnings about case values not being part of the enum type.
3172
3173 2012-03-02  Andy Estes  <aestes@apple.com>
3174
3175         Move nsStringFromWebCoreString out of PageClientImpl
3176         https://bugs.webkit.org/show_bug.cgi?id=80202
3177
3178         Reviewed by Sam Weinig.
3179
3180         nsStringFromWebCoreString() doesn't really belong in PageClientImpl.mm,
3181         and it makes us include PageClientImpl.h in places where we shouldn't.
3182         Move this function into StringUtilities.{h, mm}.
3183
3184         * Platform/mac/StringUtilities.h: Added.
3185         * Platform/mac/StringUtilities.mm: Added.
3186         (WebKit::nsStringFromWebCoreString):
3187         * UIProcess/API/mac/PageClientImpl.h:
3188         * UIProcess/API/mac/PageClientImpl.mm:
3189         * UIProcess/API/mac/WKView.mm:
3190         * UIProcess/mac/WebContextMenuProxyMac.mm:
3191         * UIProcess/mac/WebPageProxyMac.mm:
3192         * UIProcess/mac/WebPopupMenuProxyMac.mm:
3193         * UIProcess/mac/WebPreferencesMac.mm:
3194         * WebKit2.xcodeproj/project.pbxproj:
3195
3196 2012-03-02  Andy Estes  <aestes@apple.com>
3197
3198         Remove com.apple.WebKit.PluginProcess.sb from WebKit2.xcodeproj's Headers build phase
3199         https://bugs.webkit.org/show_bug.cgi?id=80197
3200
3201         Reviewed by Alexey Proskuryakov.
3202
3203         It doesn't belong there, and it makes Xcode consider the project to be
3204         invalid, triggering assertions in some builds of Xcode.
3205
3206         * WebKit2.xcodeproj/project.pbxproj:
3207
3208 2012-03-02  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3209
3210         [Qt] Fix spelling mistake in header guard
3211
3212         Reviewed by Noam Rosenthal.
3213
3214         * UIProcess/API/qt/qwebviewportinfo_p.h:
3215
3216 2012-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
3217
3218         [GTK] Invalid check in webkit_web_view_set_zoom_level() when zoom-text-only is enabled
3219         https://bugs.webkit.org/show_bug.cgi?id=80150
3220
3221         Reviewed by Philippe Normand.
3222
3223         * UIProcess/API/gtk/WebKitWebView.cpp:
3224         (webkit_web_view_set_zoom_level): Use
3225         webkit_web_view_get_zoom_level() instead of
3226         WKPageGetPageZoomFactor() to get the current effective zoom level
3227         depending on zoom-text-only setting.
3228
3229 2012-03-02  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3230
3231         Fix build on AppleWebKit after 109548.
3232
3233         * mac/WebKit2.order:
3234
3235 2012-03-02  Simon Hausmann  <simon.hausmann@nokia.com>
3236
3237         [Qt] Fix tests run with WTR not using QStyle theme
3238         https://bugs.webkit.org/show_bug.cgi?id=80147
3239
3240         Reviewed by Csaba Osztrogonác.
3241
3242         Use an environment variable (set by WTR) to select the QStyle theme.
3243         This is a temporary kludge until we rebase the layout tests to use the
3244         QStyle independent "mobile" theme. This also temporarily breaks the
3245         force_static_libs_as_shared build.
3246
3247         * Target.pri:
3248         * WebProcess/qt/WebProcessMainQt.cpp:
3249         (WebKit::WebProcessMainQt):
3250
3251 2012-03-02  Simon Hausmann  <simon.hausmann@nokia.com>
3252
3253         [Qt] Compile WebCore without QtWidgets
3254         https://bugs.webkit.org/show_bug.cgi?id=80141
3255
3256         Reviewed by Tor Arne Vestbø.
3257
3258         * Shared/qt/WebEventFactoryQt.cpp: Removed unnecessary include.
3259         * Target.pri: Require widgets for WK2 for the moment, until bug #79458
3260         is fixed.
3261
3262 2012-03-02  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
3263
3264         Suspend/Resume API for pausing timers and animations.
3265         https://bugs.webkit.org/show_bug.cgi?id=76063
3266
3267         Based on the initial work of Zalan Bujtas <zalan.bujtas@nokia.com>,
3268
3269         Adds suspend and resume API for WebKit2 and uses it in Qt to
3270         suspend animations and DOM timers during panning and zoom.
3271
3272         Reviewed by Kenneth Rohde Christiansen.
3273
3274         * UIProcess/API/qt/qquickwebview.cpp:
3275         (QQuickWebViewFlickablePrivate::_q_suspend):
3276         (QQuickWebViewFlickablePrivate::_q_resume):
3277         * UIProcess/WebPageProxy.cpp:
3278         (WebKit::WebPageProxy::WebPageProxy):
3279         (WebKit::WebPageProxy::resumeActiveDOMObjectsAndAnimations):
3280         (WebKit::WebPageProxy::suspendActiveDOMObjectsAndAnimations):
3281         (WebKit::WebPageProxy::processDidCrash):
3282         * UIProcess/WebPageProxy.h:
3283         * WebProcess/WebPage/WebPage.cpp:
3284         (WebKit::WebPage::suspendActiveDOMObjectsAndAnimations):
3285         (WebKit::WebPage::resumeActiveDOMObjectsAndAnimations):
3286         * WebProcess/WebPage/WebPage.h:
3287         * WebProcess/WebPage/WebPage.messages.in:
3288
3289 2012-03-02  Joone Hur  <joone.hur@collabora.co.uk>
3290
3291         Unreviewed. Fix WebKit2 GTK+ build.
3292
3293         * GNUmakefile.am: allow WebKitWebProcess to link with zlib properly.
3294
3295 2012-03-01  Andras Becsi  <andras.becsi@nokia.com>
3296
3297         [Qt][WK2] Make the interaction with the Flickable work on the N9
3298         https://bugs.webkit.org/show_bug.cgi?id=80029
3299
3300         Reviewed by Simon Hausmann.
3301
3302         Because the WebView item accepts all touch events it receives and sends
3303         them to the web process before propagating them to the gesture recognizers,
3304         which is correct behaviour, we can not rely on the touch->mouse conversion
3305         of Qt5 when controlling Flickable. Hence we need to convert the received
3306         touch events to mouse events in the QtFlickProvider.
3307
3308         * UIProcess/qt/QtFlickProvider.cpp:
3309         (QtFlickProvider::handleTouchFlickEvent):
3310         Do the touch to mouse event conversion for the Flickable.
3311         * UIProcess/qt/QtPanGestureRecognizer.cpp:
3312         (WebKit::QtPanGestureRecognizer::recognize):
3313         A touch begin event should cancel the previous pan gesture
3314         and stop the ongoing flick animation.
3315
3316 2012-03-01  Anders Carlsson  <andersca@apple.com>
3317
3318         Assertion failure in pageContainsAnyHorizontalScrollbars() (scrollableArea->isOnActivePage()) when leaving pages with embedded PDFs
3319         https://bugs.webkit.org/show_bug.cgi?id=80044
3320         <rdar://problem/10919940>
3321
3322         Reviewed by Brady Eidson.
3323
3324         Remove the code that would add and remove wheel event handlers since that's not what we want to track.
3325         Instead, dynamically add and remove the view as its scrollbars come and go.
3326
3327         * WebProcess/Plugins/PDF/BuiltInPDFView.cpp:
3328         (WebKit::BuiltInPDFView::updateScrollbars):
3329         (WebKit::BuiltInPDFView::initialize):
3330         * WebProcess/Plugins/PDF/BuiltInPDFView.h:
3331         (BuiltInPDFView):
3332
3333 2012-03-01  Kangil Han  <kangil.han@samsung.com>
3334
3335         [DRT] Remove all PlainTextController usages in existing tests by adding internal API
3336         https://bugs.webkit.org/show_bug.cgi?id=78570
3337
3338         Reviewed by Hajime Morita.
3339
3340         This patch will remove all PlainTextController usages
3341         in existing DRT tests by adding internal API to WebCore/testing/Internals
3342
3343         * win/WebKit2.def:
3344         * win/WebKit2CFLite.def:
3345
3346 2012-03-01  Nikolas Zimmermann  <nzimmermann@rim.com>
3347
3348         Unreviewed, rolling out r109255.
3349         http://trac.webkit.org/changeset/109255
3350         https://bugs.webkit.org/show_bug.cgi?id=79932
3351
3352         Breaks rounded rects with dashed strokes in SVG
3353
3354         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3355         (InitWebCoreSystemInterface):
3356
3357 2012-03-01  Sergio Villar Senin  <svillar@igalia.com>
3358
3359         [WK2] [GTK] [libsoup] SoupSession should use system CA
3360         https://bugs.webkit.org/show_bug.cgi?id=79657
3361
3362         Reviewed by Martin Robinson.
3363
3364         SoupSession sould use system CA list to validate SSL
3365         certificates. Do not use strict certificate validation though as
3366         we want clients to decide whether or not accept/decline invalid
3367         certificates (API to be added later).
3368
3369         No new tests required as current behaviour does not change at all
3370         as we continue to accept invalid certificates by default.
3371
3372         * WebProcess/gtk/WebProcessMainGtk.cpp:
3373         (WebKit::WebProcessMainGtk):
3374
3375 2012-03-01  Carlos Garcia Campos  <cgarcia@igalia.com>
3376
3377         Unreviewed. Fix WebKit2 GTK+ build.
3378
3379         * UIProcess/API/gtk/WebKitDefines.h:
3380         * UIProcess/API/gtk/WebKitWebView.h:
3381
3382 2012-02-29  Simon Hausmann  <simon.hausmann@nokia.com>
3383
3384         [Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle
3385         https://bugs.webkit.org/show_bug.cgi?id=78047
3386
3387         Reviewed by Kenneth Rohde Christiansen.
3388
3389         Replaced double-dispatch of events with direct forwarding of events from QQuickWebView::*Event to
3390         QtWebPageEventHandler::handle*Event.
3391
3392         * UIProcess/API/qt/qquickwebview.cpp:
3393         (QQuickWebView::keyPressEvent):
3394         (QQuickWebView::keyReleaseEvent):
3395         (QQuickWebView::inputMethodEvent):
3396         (QQuickWebView::focusInEvent):
3397         (QQuickWebView::focusOutEvent):
3398         (QQuickWebView::touchEvent):
3399         (QQuickWebView::mousePressEvent):
3400         (QQuickWebView::mouseMoveEvent):
3401         (QQuickWebView::mouseReleaseEvent):
3402         (QQuickWebView::mouseDoubleClickEvent):
3403         (QQuickWebView::wheelEvent):
3404         (QQuickWebView::hoverEnterEvent):
3405         (QQuickWebView::hoverMoveEvent):
3406         (QQuickWebView::hoverLeaveEvent):
3407         (QQuickWebView::dragMoveEvent):
3408         (QQuickWebView::dragEnterEvent):
3409         (QQuickWebView::dragLeaveEvent):
3410         (QQuickWebView::dropEvent):
3411         (QQuickWebView::event):
3412         * UIProcess/qt/QtWebPageEventHandler.cpp:
3413         (QtWebPageEventHandler::handleMouseMoveEvent):
3414         (QtWebPageEventHandler::handleMousePressEvent):
3415         (QtWebPageEventHandler::handleMouseReleaseEvent):
3416         (QtWebPageEventHandler::handleWheelEvent):
3417         (QtWebPageEventHandler::handleHoverLeaveEvent):
3418         (QtWebPageEventHandler::handleHoverMoveEvent):
3419         (QtWebPageEventHandler::handleDragEnterEvent):
3420         (QtWebPageEventHandler::handleDragLeaveEvent):
3421         (QtWebPageEventHandler::handleDragMoveEvent):
3422         (QtWebPageEventHandler::handleDropEvent):
3423         (QtWebPageEventHandler::handleKeyPressEvent):
3424         (QtWebPageEventHandler::handleKeyReleaseEvent):
3425         (QtWebPageEventHandler::handleFocusInEvent):
3426         (QtWebPageEventHandler::handleFocusOutEvent):
3427         (QtWebPageEventHandler::handleInputMethodEvent):
3428         (QtWebPageEventHandler::handleTouchEvent):
3429         * UIProcess/qt/QtWebPageEventHandler.h:
3430         (QtWebPageEventHandler):
3431
3432 2012-03-01  Csaba Osztrogonác  <ossy@webkit.org>
3433
3434         [Qt][WK2] Unreviewed buildfix after r109277.
3435
3436         * WebProcess/qt/QtBuiltinBundlePage.cpp:
3437         (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
3438
3439 2012-02-29  No'am Rosenthal  <noam.rosenthal@nokia.com>
3440
3441         [Qt][WK2] Get rid of the #ifdef mess in LayerTreeHost[Proxy]
3442         https://bugs.webkit.org/show_bug.cgi?id=79501
3443
3444         Use a new UI_SIDE_COMPOSITING flag instead of the several #ifdef flags we currently use.
3445
3446         Reviewed by Kenneth Rohde Christiansen.
3447
3448         * Shared/WebLayerTreeInfo.cpp:
3449         * Shared/WebLayerTreeInfo.h:
3450         * UIProcess/DrawingAreaProxy.cpp:
3451         (WebKit):
3452         * UIProcess/DrawingAreaProxy.h:
3453         (DrawingAreaProxy):
3454         * UIProcess/DrawingAreaProxyImpl.cpp:
3455         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
3456         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3457         (WebKit):
3458         * UIProcess/DrawingAreaProxyImpl.h:
3459         (DrawingAreaProxyImpl):
3460         * UIProcess/LayerTreeHostProxy.h:
3461         (LayerTreeHostProxy):
3462         * UIProcess/WebPageProxy.cpp:
3463         (WebKit::WebPageProxy::didReceiveMessage):
3464         * UIProcess/qt/LayerBackingStore.cpp:
3465         * UIProcess/qt/LayerBackingStore.h:
3466         * UIProcess/qt/LayerTreeHostProxyQt.cpp:
3467         * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp:
3468         * WebProcess/WebCoreSupport/WebGraphicsLayer.h:
3469         * WebProcess/WebPage/DrawingArea.h:
3470         (DrawingArea):
3471         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3472         (WebKit):
3473         * WebProcess/WebPage/DrawingAreaImpl.h:
3474         (DrawingAreaImpl):
3475         * WebProcess/WebPage/LayerTreeHost.cpp:
3476         (WebKit::LayerTreeHost::create):
3477         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp:
3478         (WebKit::LayerTreeHostQt::purgeBackingStores):
3479         * WebProcess/WebPage/qt/LayerTreeHostQt.h:
3480         (LayerTreeHostQt):
3481
3482 2012-02-28  Brian Weinstein  <bweinstein@apple.com>
3483
3484         WebKit2: didNewFirstVisuallyNonEmptyLayout should be sent to injected bundle
3485         https://bugs.webkit.org/show_bug.cgi?id=79849
3486         
3487         Tell the injected bundle about didNewFirstVisuallyNonEmptyLayout (we currently
3488         just tell the UI process).
3489
3490         Reviewed by Beth Dakin.
3491
3492         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add didNewFirstVisuallyNonEmptyLayout to version 1.
3493         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3494         (WebKit::InjectedBundlePageLoaderClient::didNewFirstVisuallyNonEmptyLayout): Call through to the
3495             client.
3496         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3497         (InjectedBundlePageLoaderClient):
3498         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3499         (WebKit::WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout): Tell the injected
3500             bundle.
3501
3502 2012-02-29  Tim Horton  <timothy_horton@apple.com>
3503
3504         Make use of CG rounded-rect primitives
3505         https://bugs.webkit.org/show_bug.cgi?id=79932
3506         <rdar://problem/9274953>
3507
3508         Reviewed by Simon Fraser.
3509
3510         Add wkCGPathAddRoundedRect.
3511
3512         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3513         (InitWebCoreSystemInterface):
3514
3515 2012-02-29  Andy Estes  <aestes@apple.com>
3516
3517         CFURLDownloadScheduleWithCurrentMessageQueue only exists on Windows
3518         https://bugs.webkit.org/show_bug.cgi?id=79936
3519
3520         Reviewed by Brady Eidson.
3521
3522         CFURLDownloadScheduleWithCurrentMessageQueue only exists on Windows
3523         platforms. Non-Windows platforms that use CFNetwork-based downloads
3524         should omit this call.
3525
3526         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
3527         (WebKit::Download::start):
3528
3529 2012-02-29  Rafael Brandao  <rafael.lobo@openbossa.org>
3530
3531         [Qt][WK2] We should not add NetscapeBrowserFuncs.cpp as header
3532         https://bugs.webkit.org/show_bug.cgi?id=79847
3533
3534         Reviewed by Alexey Proskuryakov.
3535
3536         * Target.pri: Fix typo, so we can add ".h" file instead.
3537
3538 2012-02-29  Sam Weinig  <sam@webkit.org>
3539
3540         When invoking Lookup while zoomed in, the highlighted word renders out of line
3541         <rdar://problem/10812527>
3542
3543         Reviewed by Simon Fraser.
3544
3545         * WebProcess/WebPage/mac/WebPageMac.mm:
3546         (WebKit::WebPage::performDictionaryLookupForRange):
3547         Make sure to scale the ascent when determining the origin for the overlay.
3548
3549 2012-02-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3550
3551         [GTK] Use text or page zoom factor in WebKitWebView depending on zoom-text-only
3552         https://bugs.webkit.org/show_bug.cgi?id=75252
3553
3554         Reviewed by Gustavo Noronha Silva.
3555
3556         * UIProcess/API/gtk/WebKitWebView.cpp:
3557         (zoomTextOnlyChanged): Update text/page zoom factor when
3558         zoom-text-only setting changes.
3559         (webkitWebViewSetSettings): Helper function to set the settings
3560         object for the web view, initializing the settings for the page
3561         and connecting to notify::zoom-text-only signal.
3562         (webkitWebViewConstructed): Use webkitWebViewSetSettings().
3563         (webkit_web_view_set_settings): Use webkitWebViewSetSettings() and
3564         disconnect from the notify::zoom-text-only signal of the previous
3565         settings object.
3566         (webkit_web_view_set_zoom_level): Set text/page zoom factor
3567         depending on WebKitSettings:zoom-text-only property.
3568         (webkit_web_view_get_zoom_level): Get text/page zoom factor
3569         depending on WebKitSettings:zoom-text-only property.
3570         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3571         (testWebViewZoomLevel):
3572
3573 2012-02-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3574
3575         [GTK] Add zoom-text-only setting to WebKit2 GTK+ API
3576         https://bugs.webkit.org/show_bug.cgi?id=75249
3577
3578         Reviewed by Gustavo Noronha Silva.
3579
3580         To set whether zoom level of web view should affect only the text
3581         or all page contents. It's disabled by default.
3582
3583         * UIProcess/API/gtk/WebKitSettings.cpp:
3584         (webKitSettingsSetProperty):
3585         (webKitSettingsGetProperty):
3586         (webkit_settings_class_init): Add WebKitSettings:zoom-text-only
3587         property.
3588         (webkit_settings_set_zoom_text_only): Set
3589         WebKitSettings:zoom-text-only.
3590         (webkit_settings_get_zoom_text_only): Get
3591         WebKitSettings:zoom-text-only.
3592         * UIProcess/API/gtk/WebKitSettings.h:
3593         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new
3594         symbols.
3595         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
3596         (testWebKitSettings):
3597
3598 2012-02-29  Sergio Villar Senin  <svillar@igalia.com>
3599
3600         DidFindString should be emitted even if FindOptionsShowOverlay is not enabled
3601         https://bugs.webkit.org/show_bug.cgi?id=76522
3602
3603         Reviewed by Darin Adler.
3604
3605         DidFindString message should be issued always even if neither
3606         FindOptionsShowOverlay or FindOptionsShowHighlight are
3607         provided. The difference is that if any of those flags are present
3608         the find operation will look for all the appearances of the text
3609         in the web view, otherwise it will just look and report the next
3610         occurrence.
3611
3612         This patch removes the temporary workaround added in r109222 to
3613         the WebKitFindController unit tests.
3614
3615         * UIProcess/API/gtk/tests/TestWebKitFindController.cpp:
3616         * WebProcess/WebPage/FindController.cpp:
3617         (WebKit::FindController::findString):
3618
3619 2012-01-19  Sergio Villar Senin  <svillar@igalia.com>
3620
3621         [GTK] [WK2] Add Find API
3622         https://bugs.webkit.org/show_bug.cgi?id=76070
3623
3624         Reviewed by Martin Robinson.
3625
3626         This patch adds a new public find API for the Gtk+ WK2 port. It
3627         defines a new object called WebKitFindController owned by each
3628         WebKitWebView. Clients will use this new object to search strings
3629         in the WebKitWebView.
3630
3631         Changes include also documentation and unit tests for the new
3632         public API.
3633
3634         * GNUmakefile.am:
3635         * UIProcess/API/gtk/WebKitDefines.h:
3636         * UIProcess/API/gtk/WebKitFindController.cpp: Added.
3637         (didFindString): implementation of the WKPage Find interface.
3638         (didFailToFindString): Ditto.
3639         (didCountStringMatches): Ditto.
3640         (webkit_find_controller_init):
3641         (getWKPageFromWebKitWebView):
3642         (webkitFindControllerConstructed):
3643         (webkitFindControllerGetProperty):
3644         (webkitFindControllerSetProperty):
3645         (webkitFindControllerFinalize):
3646         (webkit_find_controller_class_init):
3647         (webkit_find_controller_get_search_text):
3648         (webkit_find_controller_get_options):
3649         (webkit_find_controller_get_max_match_count):
3650         (webkit_find_controller_get_web_view):
3651         (webKitFindControllerPerform):
3652         (webKitFindControllerSetSearchData):
3653         (webkit_find_controller_search): asynchronously looks for the
3654         search string in the WebKitWebView.
3655         (webkit_find_controller_search_finish): unhighlights text matches.
3656         (webkit_find_controller_search_next):
3657         (webkit_find_controller_search_previous):
3658         (webkit_find_controller_count_matches): asynchronously counts the
3659         number of matches of the search string in the WebKitWebView.
3660         * UIProcess/API/gtk/WebKitFindController.h: Added.
3661         * UIProcess/API/gtk/WebKitPrivate.h:
3662         * UIProcess/API/gtk/WebKitWebView.cpp:
3663         (webkit_web_view_get_find_controller): returns the
3664         WebKitFindController instance owned by the WebKitWebView.
3665         * UIProcess/API/gtk/WebKitWebView.h:
3666         * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
3667         * UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
3668         * UIProcess/API/gtk/docs/webkit2gtk.types:
3669         * UIProcess/API/gtk/tests/GNUmakefile.am:
3670         * UIProcess/API/gtk/tests/TestWebKitFindController.cpp: Added.
3671         (testFindControllerTextFound):
3672         (testFindControllerTextNotFound):
3673         (testFindControllerMatchCount):
3674         (testFindControllerMaxMatchCount):
3675         (testFindControllerNext):
3676         (testFindControllerPrevious):
3677         (testFindControllerCountedMatches):
3678         (testFindControllerOptions):
3679         (testFindControllerInstance):
3680         (testFindControllerGetters):
3681         (testFindControllerHide):
3682         (beforeAll):
3683         (afterAll):
3684         * UIProcess/API/gtk/webkit2.h:
3685
3686 2012-02-28  Simon Fraser  <simon.fraser@apple.com>
3687
3688         Update WebKitSystemInterface.
3689
3690         Reviewed by Sam Weinig.
3691
3692         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3693         (InitWebCoreSystemInterface):
3694
3695 2012-02-28  Hugo Parente Lima  <hugo.lima@openbossa.org>
3696
3697         All mouse events after a right click are ignored when they came from WebkitTestRunner
3698         https://bugs.webkit.org/show_bug.cgi?id=77350
3699
3700         Reviewed by Chang Shu.
3701
3702         Never ignore mouse events when using sync events, even if the context menu is being
3703         show but the Ui did replied the ShowContextMenu event with a ContextMenuHidden.
3704
3705         * WebProcess/WebPage/WebPage.cpp:
3706         (WebKit::WebPage::mouseEventSyncForTesting):
3707
3708 2012-02-28  Alexey Proskuryakov  <ap@apple.com>
3709
3710         More build fix.
3711
3712         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Check for build platform
3713         properly.
3714
3715 2012-02-28  Alexey Proskuryakov  <ap@apple.com>
3716
3717         Build fix.
3718
3719         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue):
3720         Check for build platform properly.
3721
3722 2012-02-28  Enrica Casucci  <enrica@apple.com>
3723
3724         More Pasteboard code cleanup.
3725         https://bugs.webkit.org/show_bug.cgi?id=79816
3726
3727         Removing the last references to NSPasteboard.
3728         
3729         Reviewed by Alexey Proskuryakov.
3730
3731         * WebProcess/WebCoreSupport/WebEditorClient.h:
3732         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3733         (WebKit::WebEditorClient::setInsertionPasteboard):
3734
3735 2012-02-28  Alexey Proskuryakov  <ap@apple.com>
3736
3737         [Mac] Add an experimental SPI for plug-ins to enter sandbox
3738         https://bugs.webkit.org/show_bug.cgi?id=79709
3739
3740         Reviewed by Anders Carlsson.
3741
3742         * PluginProcess/PluginProcess.h: (WebKit::PluginProcess::pluginPath): Exposed plugin path.
3743
3744         * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb: Added.
3745
3746         * WebKit2.xcodeproj/project.pbxproj: Added new files.
3747
3748         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Exposed
3749         a function to access sandboxing functions when available.
3750
3751         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: Added.
3752         * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Added.
3753
3754 2012-02-28  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
3755
3756         [Qt] Allow read/write to the WebView.url property
3757         https://bugs.webkit.org/show_bug.cgi?id=77554
3758
3759         Reviewed by Tor Arne Vestbø.
3760
3761         Change QML API WebView.url to read/write to reflect either the url requested by the user.
3762         Also removed WebView.load(url). Defers setting url (loading page) until onComponentComplete is triggered. 
3763         Fixed c++ and qml tests to reflect the new API.
3764
3765         * Target.pri:
3766         * UIProcess/API/qt/qquickwebview.cpp:
3767         (QQuickWebViewPrivate::QQuickWebViewPrivate):
3768         (QQuickWebViewPrivate::onComponentComplete):
3769         (QQuickWebView::setUrl):
3770         * UIProcess/API/qt/qquickwebview_p_p.h:
3771         (QQuickWebViewPrivate):
3772         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
3773         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml:
3774         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
3775         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:
3776         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
3777         * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml:
3778         * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml:
3779         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
3780         * UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
3781         * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:
3782         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml:
3783         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml:
3784         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml:
3785         * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml:
3786         * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml:
3787         * UIProcess/API/qt/tests/qmltests/WebView/tst_origin.qml:
3788         * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml:
3789         * UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml:
3790         * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml:
3791         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3792         (tst_QQuickWebView::loadEmptyPageViewHidden):
3793         (tst_QQuickWebView::loadNonexistentFileUrl):
3794
3795 2012-02-28  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3796
3797         [Qt] Signal and property cleanup in QQuickWebView
3798         https://bugs.webkit.org/show_bug.cgi?id=78820
3799
3800         Reviewed by Noam Rosenthal.
3801
3802         - Remove parameters from property change notify signals:
3803           titleChanged, urlChanged, iconChanged, loadProgressChanged
3804         - Rename the parameters of linkHovered to prevent shadoing properties of WebView
3805         - Rename navigationStateChanged to navigationHistoryChanged
3806
3807         * UIProcess/API/qt/qquickwebview.cpp:
3808         (QQuickWebViewPrivate::QQuickWebViewPrivate):
3809         (QQuickWebViewPrivate::initialize):
3810         (QQuickWebViewPrivate::_q_onUrlChanged):
3811         (QQuickWebViewPrivate::setIcon):
3812         * UIProcess/API/qt/qquickwebview_p.h:
3813         * UIProcess/API/qt/qquickwebview_p_p.h:
3814         (QQuickWebViewPrivate):
3815         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
3816         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml:
3817         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml:
3818         * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp:
3819         (tst_QQuickWebView::loadProgress):
3820         * UIProcess/qt/QtWebPageLoadClient.cpp:
3821         (QtWebPageLoadClient::didCommitLoadForFrame):
3822         (QtWebPageLoadClient::didSameDocumentNavigationForFrame):
3823         (QtWebPageLoadClient::didReceiveTitleForFrame):
3824         (QtWebPageLoadClient::setLoadProgress):
3825         * UIProcess/qt/QtWebPageLoadClient.h:
3826         (QtWebPageLoadClient):
3827
3828 2012-02-28  Mario Sanchez Prada  <msanchez@igalia.com>
3829
3830         [GTK] Add GMainLoop and GMainContext to be handled by GRefPtr
3831         https://bugs.webkit.org/show_bug.cgi?id=79496
3832
3833         Reviewed by Martin Robinson.
3834
3835         Updated places where raw pointers to GMainLoop and GMainContext
3836         were being used, replacing them with GRefPtr-based code.
3837
3838         * Platform/WorkQueue.h:
3839         (WorkQueue):
3840         * Platform/gtk/WorkQueueGtk.cpp:
3841         (WorkQueue::platformInitialize):
3842         (WorkQueue::platformInvalidate):
3843         (WorkQueue::workQueueThreadBody):
3844         (WorkQueue::registerEventSourceHandler):
3845         (WorkQueue::dispatchOnSource):
3846         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
3847         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
3848         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
3849         (WebKit::WebPopupMenuProxyGtk::shutdownRunLoop):
3850         * UIProcess/gtk/WebPopupMenuProxyGtk.h:
3851         (WebPopupMenuProxyGtk):
3852
3853 2012-02-28  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3854
3855         [Qt] Initialize QtWebContext as much as we can in its constructor.
3856         https://bugs.webkit.org/show_bug.cgi?id=79809
3857
3858         Reviewed by Tor Arne Vestbø.
3859
3860         The icon database wouldn't be initialized on the QtWebContext while in WebKitTestRunner
3861         since it doesn't call the initialize method on it after creating it.
3862         Remove the initialize method, move the download manager and icon database initialization
3863         in the constructor and call initializeContextInjectedBundleClient directly in
3864         defaultContext to prevent overriding WKTR's injected bundle client.
3865
3866         * UIProcess/qt/QtWebContext.cpp:
3867         (WebKit::QtWebContext::QtWebContext):
3868         (WebKit::QtWebContext::defaultContext):
3869         * UIProcess/qt/QtWebContext.h:
3870         (QtWebContext):
3871
3872 2012-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3873
3874         [GTK] Inconsistent state of WebKitWebView when replacing content in WebKit2
3875         https://bugs.webkit.org/show_bug.cgi?id=79775
3876
3877         Reviewed by Martin Robinson.
3878
3879         Use an enum instead of a boolean to track the status of a
3880         replace_content() load operation. We need to know when the load of
3881         the replace content actually starts to not ignore valid load
3882         events of a previous ongoing load operation.
3883
3884         * UIProcess/API/gtk/WebKitWebView.cpp:
3885         (webkitWebViewLoadChanged): Transit to new replace content state
3886         when replacing content depending on the load event.
3887         (webkitWebViewLoadFailed): Ignore load failed events when
3888         replacing content.
3889         (webkitWebViewSetEstimatedLoadProgress): Ignore load progress when
3890         replacing content.
3891         (webkit_web_view_replace_content): Set replace content status to
3892         WillReplaceContent.
3893         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
3894         (replaceContentLoadCallback):
3895         (testWebViewReplaceContent):
3896         * UIProcess/API/gtk/tests/WebViewTest.cpp:
3897         (titleChanged):
3898         (WebViewTest::waitUntilTitleChanged): Convenient method to wait
3899         until title changes. Use with replaceConent() since load events
3900         are not emitted when replacing content.
3901         * UIProcess/API/gtk/tests/WebViewTest.h:
3902
3903 2012-02-27  Anders Carlsson  <andersca@apple.com>
3904
3905         Add basic page overlay support to TiledCoreAnimationDrawingArea
3906         https://bugs.webkit.org/show_bug.cgi?id=79716
3907         <rdar://problem/10923079>
3908
3909         Reviewed by Sam Weinig.
3910
3911         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
3912         Make TiledCoreAnimationDrawingArea a GraphicsLayerClient.
3913
3914         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3915         (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
3916         Create the page overlay layer.
3917
3918         (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
3919         Destroy the page overlay layer.
3920
3921         (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
3922         Mark the page overlay layer as needing display.
3923
3924         (WebKit::TiledCoreAnimationDrawingArea::notifyAnimationStarted):
3925         (WebKit::TiledCoreAnimationDrawingArea::notifySyncRequired):
3926         Add empty GraphisLayerClient member function implementations.
3927
3928         (WebKit::TiledCoreAnimationDrawingArea::paintContents):
3929         Ask the page overlay to paint itself.
3930
3931         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
3932         Flush the page overlay layer.
3933         
3934         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
3935         Resize the page overlay layer.
3936
3937         (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
3938         If we have a page overlay layer, add it as a sublayer of the root layer.
3939
3940         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
3941         Create the page overlay layer and add it as a sublayer of the root layer.
3942
3943         (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer):
3944         Remove the page overlay layer and destroy it.
3945
3946 2012-02-28  Carlos Garcia Campos  <cgarcia@igalia.com>
3947
3948         [GTK] Remove virtual methods of WebKitDownload signals in WebKit2 GTK+ API
3949         https://bugs.webkit.org/show_bug.cgi?id=79804
3950
3951         Reviewed by Martin Robinson.
3952
3953         That comes from the first patch that followed the approach of the
3954         first LoaderClient implementation. With current implementation
3955         download signals, except decide-destination, don't need to be
3956         true_handled, and they won't have a default handler
3957         implementation. Also the download object is not supposed to be
3958         inheritable, since instances are created privately by the
3959         WebContext, so it's not possible to override the virtual methods
3960         in derived classes.
3961
3962         * UIProcess/API/gtk/WebKitDownload.cpp:
3963         (webkit_download_class_init):
3964         (webkitDownloadNotifyProgress):
3965         (webkitDownloadFailed):
3966         (webkitDownloadFinished):
3967         * UIProcess/API/gtk/WebKitDownload.h:
3968         (_WebKitDownloadClass):
3969         * UIProcess/API/gtk/webkit2marshal.list:
3970
3971 2012-02-28  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3972
3973         [Qt] Fix build for WK2, do not use enum type if values can be outside the enum
3974         https://bugs.webkit.org/show_bug.cgi?id=79800
3975
3976         Reviewed by Csaba Osztrogonác.
3977
3978         We have two different enums called NavigationRequestAction. If we use one of them
3979         to store the variables, compilers can rightfully warn about comparison with
3980         values from other enums.
3981
3982         We might revisit the strategy of exposing different enumerations in experimental,
3983         but for now, fallback to using int for the 'action' property in
3984         QWebNavigationRequest.
3985
3986         * UIProcess/API/qt/qwebnavigationrequest.cpp:
3987         (QWebNavigationRequestPrivate):
3988         (QWebNavigationRequest::setAction):
3989         (QWebNavigationRequest::action):
3990         * UIProcess/API/qt/qwebnavigationrequest_p.h:
3991         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
3992
3993 2012-02-27  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
3994
3995         [Qt] API changes to QWebNavigationRequest
3996         https://bugs.webkit.org/show_bug.cgi?id=78821
3997
3998         Reviewed by Kenneth Rohde Christiansen.
3999
4000         Changes discussed in API review at Szeged: rename 'button' to 'mouseButton',
4001         rename 'modifiers' to 'keyboardModifiers', remove 'originatingUrl' and
4002         use the enum type for 'action'.
4003
4004         * UIProcess/API/qt/qwebnavigationrequest.cpp:
4005         (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
4006         (QWebNavigationRequestPrivate):
4007         (QWebNavigationRequest::QWebNavigationRequest):
4008         (QWebNavigationRequest::setAction):
4009         (QWebNavigationRequest::mouseButton):
4010         (QWebNavigationRequest::keyboardModifiers):
4011         (QWebNavigationRequest::action):
4012         * UIProcess/API/qt/qwebnavigationrequest_p.h:
4013         * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp:
4014         * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml:
4015         * UIProcess/qt/QtWebPagePolicyClient.cpp:
4016         (QtWebPagePolicyClient::decidePolicyForNavigationAction):
4017         * UIProcess/qt/QtWebPagePolicyClient.h:
4018         (QtWebPagePolicyClient):
4019
4020 2012-02-28  Shinya Kawanaka  <shinyak@chromium.org>
4021
4022         Element should be able to have multiple shadow roots.
4023         https://bugs.webkit.org/show_bug.cgi?id=77931
4024
4025         Reviewed by Hajime Morita.
4026
4027         * win/WebKit2.def:
4028         * win/WebKit2CFLite.def:
4029
4030 2012-02-28  Hugo Parente Lima  <hugo.lima@openbossa.org>
4031
4032         [Qt][WK2] Use movementStarted/Ended signals instead of movingChanged on QtViewportInterationEngine
4033         https://bugs.webkit.org/show_bug.cgi?id=79521
4034
4035         Reviewed by Kenneth Rohde Christiansen.
4036
4037         movingChanged() signal is emitted many times, so the use of movementStarted() and
4038         movementEnded() is a better choice.
4039
4040         * UIProcess/qt/QtFlickProvider.cpp:
4041         (QtFlickProvider::QtFlickProvider):
4042         * UIProcess/qt/QtFlickProvider.h:
4043         (QtFlickProvider):
4044         * UIProcess/qt/QtViewportInteractionEngine.cpp:
4045         (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine):
4046         * UIProcess/qt/QtViewportInteractionEngine.h:
4047         (QtViewportInteractionEngine):
4048
4049 2012-02-27  Shinya Kawanaka  <shinyak@chromium.org>
4050
4051         Element::removeShadowRoot() and setShadowRoot() should be moved into ShadowTree.
4052         https://bugs.webkit.org/show_bug.cgi?id=78313
4053
4054         Reviewed by Hajime Morita.
4055
4056         * win/WebKit2.def:
4057         * win/WebKit2CFLite.def:
4058
4059 2012-02-27  Brady Eidson  <beidson@apple.com>
4060
4061         <rdar://problem/10924993> and https://bugs.webkit.org/show_bug.cgi?id=79725
4062         <a ping> doesn't work in WebKit2
4063
4064         Reviewed by Alexey Proskuryakov.
4065
4066         * WebProcess/WebPage/WebPage.cpp:
4067         (WebKit::WebPage::updatePreferences): Push the WK2 <a ping> setting to WebCore::Settings.
4068
4069 2012-02-27  Enrica Casucci  <enrica@apple.com>
4070
4071         WebKit2: implement platform strategy to access Pasteboard in the UI process.
4072         https://bugs.webkit.org/show_bug.cgi?id=79253
4073         <rdar://problem/9971876>
4074
4075         Reviewed by Alexey Proskuryakov.
4076
4077         * UIProcess/WebContext.h:
4078         * UIProcess/WebContext.messages.in: Added messages to access NSPasteboard
4079         in the UI process.
4080         * UIProcess/mac/WebContextMac.mm: Added methods corresponding to the
4081         new messages.
4082         (WebKit::WebContext::getPasteboardTypes):
4083         (WebKit::WebContext::getPasteboardPathnamesForType):
4084         (WebKit::WebContext::getPasteboardStringForType):
4085         (WebKit::WebContext::getPasteboardBufferForType):
4086         (WebKit::WebContext::pasteboardCopy):
4087         (WebKit::WebContext::getPasteboardChangeCount):
4088         (WebKit::WebContext::getPasteboardUniqueName):
4089         (WebKit::WebContext::getPasteboardColor):
4090         (WebKit::WebContext::setPasteboardTypes):
4091         (WebKit::WebContext::setPasteboardPathnamesForType):
4092         (WebKit::WebContext::setPasteboardStringForType):
4093         (WebKit::WebContext::setPasteboardBufferForType):
4094         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: New implementation of the PasteboardStrategy using message exchange
4095         with the UI process.
4096         (WebKit::WebPlatformStrategies::getTypes):
4097         (WebKit::WebPlatformStrategies::bufferForType):
4098         (WebKit::WebPlatformStrategies::getPathnamesForType):
4099         (WebKit::WebPlatformStrategies::stringForType):
4100         (WebKit::WebPlatformStrategies::copy):
4101         (WebKit::WebPlatformStrategies::changeCount):
4102         (WebKit::WebPlatformStrategies::uniqueName):
4103         (WebKit::WebPlatformStrategies::color):
4104         (WebKit::WebPlatformStrategies::setTypes):